diff options
author | ache <ache@FreeBSD.org> | 1996-08-11 22:51:00 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-08-11 22:51:00 +0000 |
commit | 8affe69b986c0b8bb82151a3b5717f1279fb4864 (patch) | |
tree | e3a45bb03f226bffcc615e7bd211f67122b2c56b /bin/sh/mksyntax.c | |
parent | 3c7673013285ac763e247767e237240275819280 (diff) | |
download | FreeBSD-src-8affe69b986c0b8bb82151a3b5717f1279fb4864.zip FreeBSD-src-8affe69b986c0b8bb82151a3b5717f1279fb4864.tar.gz |
Localize it
Diffstat (limited to 'bin/sh/mksyntax.c')
-rw-r--r-- | bin/sh/mksyntax.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c index b55545c..d7edf70 100644 --- a/bin/sh/mksyntax.c +++ b/bin/sh/mksyntax.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: mksyntax.c,v 1.2 1994/09/24 02:57:57 davidg Exp $ */ #ifndef lint @@ -155,6 +155,7 @@ main() { digit_contig = 0; } + fputs("#include <ctype.h>\n", hfile); fputs("#include <sys/cdefs.h>\n", hfile); /* Generate the #define statements in the header file */ @@ -327,9 +328,9 @@ print(name) char *macro[] = { "#define is_digit(c)\t((is_type+SYNBASE)[c] & ISDIGIT)", - "#define is_alpha(c)\t((is_type+SYNBASE)[c] & (ISUPPER|ISLOWER))", - "#define is_name(c)\t((is_type+SYNBASE)[c] & (ISUPPER|ISLOWER|ISUNDER))", - "#define is_in_name(c)\t((is_type+SYNBASE)[c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))", + "#define is_alpha(c)\t((c) != PEOF && isalpha((unsigned char) (c)))", + "#define is_name(c)\t((c) != PEOF && ((c) == '_' || isalpha((unsigned char) (c))))", + "#define is_in_name(c)\t((c) != PEOF && ((c) == '_' || isdigit((unsigned char) (c)) || isalpha((unsigned char) (c))))", "#define is_special(c)\t((is_type+SYNBASE)[c] & (ISSPECL|ISDIGIT))", NULL }; |