diff options
Diffstat (limited to 'gl/isascii.c')
-rw-r--r-- | gl/isascii.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gl/isascii.c b/gl/isascii.c new file mode 100644 index 0000000000..d6be982335 --- /dev/null +++ b/gl/isascii.c @@ -0,0 +1,29 @@ +/* Test for a 7-bit US-ASCII character. + Copyright (C) 2005 Free Software Foundation, Inc. + Written by Simon Josefsson. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#if HAVE_CONFIG_H +# include <config.h> +#endif + +#include "isascii.h" + +int +isascii (int c) +{ + return (c & ~0x7f) == 0; +} |