diff options
author | pfaedit <pfaedit> | 2010-04-14 23:52:18 +0000 |
---|---|---|
committer | pfaedit <pfaedit> | 2010-04-14 23:52:18 +0000 |
commit | 4beb537233b8ec6b31c9331c745de0ec00802994 (patch) | |
tree | 7d4be110087493e3af8f41997929c92c98dc2122 /Unicode | |
parent | 80763ef5631760107ba134f38c955993a422a58c (diff) |
Tabs and newlines should be allowed in ASCII strings.
Diffstat (limited to 'Unicode')
-rw-r--r-- | Unicode/ustring.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Unicode/ustring.c b/Unicode/ustring.c index d9922a9c..2bc6bc7e 100644 --- a/Unicode/ustring.c +++ b/Unicode/ustring.c @@ -969,7 +969,9 @@ return( newcr ); int AllAscii(const char *txt) { for ( ; *txt!='\0'; ++txt ) { - if ( *txt<' ' || *txt>='\177' ) + if ( *txt=='\t' || *txt=='\n' || *txt=='\r' ) + /* All right */; + else if ( *txt<' ' || *txt>='\177' ) return( false ); } return( true ); @@ -977,7 +979,9 @@ return( true ); int uAllAscii(const unichar_t *txt) { for ( ; *txt!='\0'; ++txt ) { - if ( *txt<' ' || *txt>='\177' ) + if ( *txt=='\t' || *txt=='\n' || *txt=='\r' ) + /* All right */; + else if ( *txt<' ' || *txt>='\177' ) return( false ); } return( true ); |