[BRLTTY] Low-level BrlAPI questions

Dave Mielke Dave at mielke.cc
Sat May 8 13:49:00 EDT 2021


[quoted lines by Samuel Thibault on 2021/05/07 at 00:29 +0200]

>Adding a field to a read-only structure does not pose problem, it's
>backward-compatible.

To complete the statement (I know that you yourself know this): That'd be as long as the new field is added to the end of the structure so that older data won't move.

>> - brlapi_param_properties_t defines the parameter properties for all
>>   parameters. When type of a parameter is BRLAPI_PARAM_TYPE_STRING, the count
>>   member is not initialized (and thus will be zero). Shouldn't count be set
>>   to 1, if the parameter has a single value – like one string?
>
>Dave, what do you think?
>I don't really mind either way.

If we want to support more than one string then it'd be useful. Since there's only ever one string then making it nonzero could create the illusion that there might be more.

>> - Is the isArray member in brlapi_param_properties_t somehow useful in
>>   parameter properties. If count is greater than 1, doesn't it mean that the
>>   parameter value is an array – or are there varaible-length arrays, and if
>>   so, how are they represented in properties?

An array can have only one element. That's one reason why we really do need to know the difference. Also, to be picky, a non-array can contain more than one number.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |


More information about the BRLTTY mailing list