[BRLTTY] Low-level BrlAPI questions

Aura Kelloniemi kaura.dev at sange.fi
Tue Apr 20 08:26:53 EDT 2021


On 2021-04-17 at 23:19 +0200, Samuel Thibault <samuel.thibault at ens-lyon.org> wrote:
 > Aura Kelloniemi, le ven. 16 avril 2021 09:22:32 +0300, a ecrit:
 > > On 2021-04-16 at 01:04 +0200, Samuel Thibault <samuel.thibault at ens-lyon.org> wrote:
 > >  > Such languages can then use brlapi__write with setting the charset, the
 > >  > textSize, regionBegin set to 0, and regionSize with that flag or special
 > >  > value. Is there something missing here?
 > > 
 > > No, there isn't. This would be a working solution.

 > This has now landed!

According to documentation, setting regionSize to a negative value blanks the
rest of the display. If the masks are shorter than the number of cells until
the end of the display, but text is longer than regionSize, what happens?

I wonder whether it would be semantically clearer to blank only up to
(regionSize * -1) if regionSize < 0, because we already decided that it is
most likely a programming bug, if the masks do not match the text length (in
code points). This is partly because the caller of brlapi__write uses masks to
add/remove dots from particular characters, and to do that they need to know
about the exact indices of those characters.

Thinking about regional writes brought oen more question to my mind:

If an application uses regional writes, and another application "steals" the
TTY from the original client, and later restores it, will the display contents
be restored to original text the first client was showing? If not, regional
writes won't work as the parts of the display that are not refreshed will
contain invalid information.

-- 
Aura


More information about the BRLTTY mailing list