Merged revisions 85561 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Mon, 15 Oct 2007 16:36:48 +0000 (16:36 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 15 Oct 2007 16:36:48 +0000 (16:36 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85561 | russell | 2007-10-15 11:34:13 -0500 (Mon, 15 Oct 2007) | 4 lines

Make a few changes so that characters in the upper half of the ISO-8859-1
character set don't get stripped when reading configuration.
(closes issue #10982, dandre)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85562 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/strings.h

index 6038318..62df5a3 100644 (file)
@@ -54,7 +54,7 @@ static force_inline int ast_strlen_zero(const char *s)
 AST_INLINE_API(
 char *ast_skip_blanks(const char *str),
 {
 AST_INLINE_API(
 char *ast_skip_blanks(const char *str),
 {
-       while (*str && *str < 33)
+       while (*str && ((unsigned char) *str) < 33)
                str++;
        return (char *)str;
 }
                str++;
        return (char *)str;
 }
@@ -79,7 +79,7 @@ char *ast_trim_blanks(char *str),
                   actually set anything unless we must, and it's easier just
                   to set each position to \0 than to keep track of a variable
                   for it */
                   actually set anything unless we must, and it's easier just
                   to set each position to \0 than to keep track of a variable
                   for it */
-               while ((work >= str) && *work < 33)
+               while ((work >= str) && ((unsigned char) *work) < 33)
                        *(work--) = '\0';
        }
        return str;
                        *(work--) = '\0';
        }
        return str;
@@ -95,7 +95,7 @@ char *ast_trim_blanks(char *str),
 AST_INLINE_API(
 char *ast_skip_nonblanks(char *str),
 {
 AST_INLINE_API(
 char *ast_skip_nonblanks(char *str),
 {
-       while (*str && *str > 32)
+       while (*str && ((unsigned char) *str) > 32)
                str++;
        return str;
 }
                str++;
        return str;
 }