X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fc-ctype.h;h=ed8859ed3633b273bc51d4ac45a55ffd4d317018;hb=e901c96e0151d00195c60e9efb1a7668c4b5e3bd;hp=b26eccfb3d1df818013f7b62562cc20a393f9798;hpb=2c4a44a5d092da2f1c2864b27ca382f77faeb63d;p=gnulib.git diff --git a/lib/c-ctype.h b/lib/c-ctype.h index b26eccfb3..ed8859ed3 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -5,7 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -103,6 +103,21 @@ extern "C" { /* Function declarations. */ +/* Unlike the functions in , which require an argument in the range + of the 'unsigned char' type, the functions here operate on values that are + in the 'unsigned char' range or in the 'char' range. In other words, + when you have a 'char' value, you need to cast it before using it as + argument to a function: + + const char *s = ...; + if (isalpha ((unsigned char) *s)) ... + + but you don't need to cast it for the functions defined in this file: + + const char *s = ...; + if (c_isalpha (*s)) ... + */ + extern bool c_isascii (int c); /* not locale dependent */ extern bool c_isalnum (int c);