Dave Mielke, le jeu. 15 avril 2021 06:33:10 -0400, a ecrit: > [quoted lines by Aura Kelloniemi on 2021/04/15 at 13:19 +0300] > > > > I do not really see the use of being able to pass different sizes. > > > That's most probably a sign of a bug in the application output preparing > > > code, which the programmer would rather want to catch. > > > >You are probably right. The only case where the programmer may not care about > >the size of the output is when they want to just send some text on the > >display, and hope that it fits. For example brltty-ttb and apitest work this > >way in some situations. > > I disagree, but maybe not for an obvious reason. The fact is that bindings > like Tcl, Java, Python (and maybe Rust) have arrays, sequences, or whatever. > These things are constructed and have a size. This is a common case - the > fact that C lacks this is the exception. That's one big reason why I think > the write arguments should include optional sizes for the masks. Then the > bindings could just set those fields and let some well-defined, common > handling take place underneath.
Still. If the end-programmer produced a mask that isn't of the same size of the text, it'll very probably be due to a bug, and it's better reported than silently truncated. Samuel _______________________________________________ This message was sent via the BRLTTY mailing list. To post a message, send an e-mail to: [email protected] For general information, go to: http://brltty.app/mailman/listinfo/brltty
