[BRLTTY] Low-level BrlAPI questions

Samuel Thibault samuel.thibault at ens-lyon.org
Tue May 11 03:57:07 EDT 2021


Aura Kelloniemi, le mar. 11 mai 2021 10:01:35 +0300, a ecrit:
> How are strings handled in the parameters API?
> 
> My initial thought was that string parameter values (as returned by BrlAPI)
> are const char* so that this pointer is contained into the parameter value.
> This would allow having a parameter that is an array of strings.

We don't use \0 over the wires, so we don't have arrays of strings, you
request for the different strings.

> If the second, could the parameter type be changed from a string to char, and
> the array handling would be applied to strings the same way as for all other
> array types – except that the terminating NUL is also counted as one element.
> I think this could be done in an ABI-compatible way.

brlapi__getParameterAlloc already adds a NUL after the `count` chars.

Samuel


More information about the BRLTTY mailing list