X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=lib%2Fc-ctype.h;h=4d72e90b7bff9a0122d37812a16af954e9f60c22;hp=b26eccfb3d1df818013f7b62562cc20a393f9798;hb=cb555a94fa5188122569ed3803c463f27ccd0261;hpb=b7c6c35be5930695cc64ef2d54d6f421f8511553 diff --git a/lib/c-ctype.h b/lib/c-ctype.h index b26eccfb..4d72e90b 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -5,11 +5,12 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2006, 2008, 2009 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 -the Free Software Foundation; either version 2 of the License, or +the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -103,6 +104,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);