On 27 July 2012 08:44, Markus Armbruster wrote:
> The implementation is too longwinded for my taste :)
>
> static unsigned char opt_canon_ch(char ch)
> {
> if (ch >= 'A' && ch <= 'Z') {
> return 'a' + (ch - 'A');
> } else if (ch == '_') {
> return '-';
> }
>
> retur
Anthony Liguori writes:
> We don't use the standard C functions for conversion because we don't want to
> depend on the user's locale. All option names in QEMU are en_US in plain
> ASCII.
Fails to explain the important part, namely the actual change to option
comparison!
> Signed-off-by: Anth
Peter Maydell writes:
> On 25 July 2012 17:25, Anthony Liguori wrote:
>> We don't use the standard C functions for conversion because we don't want to
>> depend on the user's locale. All option names in QEMU are en_US in plain
>> ASCII.
>>
>> Signed-off-by: Anthony Liguori
>> ---
>> qemu-opt
On 25 July 2012 18:33, Anthony Liguori wrote:
> Peter Maydell writes:
>> This is not in line with the return value that the C library
>> strcmp() would return. C99 7.21.4 says "The sign of a nonzero
>> value returned by the comparison functions memcmp, strcmp,
>> and strncmp is determined by the
Eric Blake writes:
> On 07/25/2012 10:45 AM, Eric Blake wrote:
>> On 07/25/2012 10:25 AM, Anthony Liguori wrote:
>>> We don't use the standard C functions for conversion because we don't want
>>> to
>>> depend on the user's locale. All option names in QEMU are en_US in plain
>>> ASCII.
>>
>>>
On 25 July 2012 17:25, Anthony Liguori wrote:
> We don't use the standard C functions for conversion because we don't want to
> depend on the user's locale. All option names in QEMU are en_US in plain
> ASCII.
>
> Signed-off-by: Anthony Liguori
> ---
> qemu-option.c | 53
On 07/25/2012 10:45 AM, Eric Blake wrote:
> On 07/25/2012 10:25 AM, Anthony Liguori wrote:
>> We don't use the standard C functions for conversion because we don't want to
>> depend on the user's locale. All option names in QEMU are en_US in plain
>> ASCII.
>
>>
>> +static int opt_tolower(int
On 07/25/2012 10:25 AM, Anthony Liguori wrote:
> We don't use the standard C functions for conversion because we don't want to
> depend on the user's locale. All option names in QEMU are en_US in plain
> ASCII.
[Wondering if I should bring up the US 'canceled' vs. UK 'cancelled' as
a counterpoin
We don't use the standard C functions for conversion because we don't want to
depend on the user's locale. All option names in QEMU are en_US in plain ASCII.
Signed-off-by: Anthony Liguori
---
qemu-option.c | 53 +
qemu-option.h |2 ++
2