X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fc-ctype.h;h=6404fd40bf6eb563e6d2254a539afbd11f2f5e18;hb=a731808a4ac512228e870d5f443b91557f418559;hp=395c7a13611ff76fd71593565260e767b092a382;hpb=ea5d548fb41efb918c2f128be43b01e744f8d113;p=gnulib.git diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 395c7a136..6404fd40b 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-2010 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 @@ -27,6 +27,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include +#ifdef __cplusplus +extern "C" { +#endif + + /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII @@ -98,6 +103,21 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* 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); @@ -267,4 +287,9 @@ extern int c_toupper (int c); #endif /* optimizing for speed */ + +#ifdef __cplusplus +} +#endif + #endif /* C_CTYPE_H */