search for: a433fad

Displaying 3 results from an estimated 3 matches for "a433fad".

2015 Jul 03
0
boot... round 2
...enable(bool); static inline int my_isspace(char c) { - return (unsigned char)c <= ' '; + return (unsigned char)c <= ' ' || (unsigned char)c == '\x7f'; } int my_isxdigit(char c); diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c index b7814be..a433fad 100644 --- a/com32/menu/readconfig.c +++ b/com32/menu/readconfig.c @@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src) char c; while ((c = *src++)) { - if (c <= ' ' || c == '\x7f') { + if (my_isspace(c)) { if (!was_space) *dst++...
2015 Jul 03
7
boot... round 2
...r_enable(bool); static inline int my_isspace(char c) { - return (unsigned char)c <= ' '; + return (unsigned char)c <= ' ' || (unsigned char)c == '\x7f'; } int my_isxdigit(char c); diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c index 257b042..a433fad 100644 --- a/com32/menu/readconfig.c +++ b/com32/menu/readconfig.c @@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src) char c; while ((c = *src++)) { - if (c <= ' ' || c == '\x7f') { + if (my_isspace(c)) { if (!was_space)...
2015 Jul 02
6
boot... round 2
Hi, hpa wrote: > On PowerPC (I think) "unsigned char" is the default. In any case it seems a good idea to interpret the character more explicitely. To my experience, one signdness change causes a little tree of consequential signedness changes or questionable cast operations. How about the following instead ? if ((c >= 0 && c <= ' ') || c == '\x7f')