>> in addition, i've already reported a bug in the config parsing whereby
>> if something could be a string or an integer, and the string contains
>> an integer value, it assumes the item was an integer.
>
>It depends on the code which uses a configuration node what information it
>expects. It's not a problem to request an ascii representation of value if
>it's useable.

precisely. this is backwards. if you say:

           card 9652
and
           card "9652"

its completely unclear what is meant by each statement.

in a real parser, the argument would be tagged with a type code, so
that the handler for "card" could check what kind of argument was
given.

but instead, it asks for an integer, and since the value is "usable",
it gets it. you've allowed the handler for "card" to determine the
priority of integer over string arguments, which is backwards: the
handlers for each keyword should inquire what type was used, and go on
from there.

i don't know how many more little problems like this exist. perhaps
none. perhaps several. there probably aren't more than a hundred or so
people who've even written an asoundrc file at this point ...

to be fair, perl (which is an established though changing language)
has its fair share of these kinds of issues. it occurs to me that when
i look at the system-wide asoundrc, it is reminiscent of a perl
program :)

--p


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to