Anthony Liguori aligu...@us.ibm.com 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!
On 27 July 2012 08:44, Markus Armbruster arm...@redhat.com 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 '-';
}
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 aligu...@us.ibm.com
---
qemu-option.c | 53 +
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 counterpoint
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 ch)
+{
+
On 25 July 2012 17:25, Anthony Liguori aligu...@us.ibm.com 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 aligu...@us.ibm.com
---
Eric Blake ebl...@redhat.com 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 18:33, Anthony Liguori aligu...@us.ibm.com wrote:
Peter Maydell peter.mayd...@linaro.org 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,
Peter Maydell peter.mayd...@linaro.org writes:
On 25 July 2012 17:25, Anthony Liguori aligu...@us.ibm.com 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: