diff options
author | ache <ache@FreeBSD.org> | 1997-10-23 02:44:23 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-10-23 02:44:23 +0000 |
commit | 11e6b28c316cc704cbd4a44e14f3a18fb508d03c (patch) | |
tree | 675f701bf244823fd2214e20c82e5b7d9ae4b676 /gnu/usr.bin/patch/patch.c | |
parent | fdcf922d4ffc0149c3e7868da24182f4da36b501 (diff) | |
download | FreeBSD-src-11e6b28c316cc704cbd4a44e14f3a18fb508d03c.zip FreeBSD-src-11e6b28c316cc704cbd4a44e14f3a18fb508d03c.tar.gz |
Add (unsigned char) cast to ctype macros
Diffstat (limited to 'gnu/usr.bin/patch/patch.c')
-rw-r--r-- | gnu/usr.bin/patch/patch.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gnu/usr.bin/patch/patch.c b/gnu/usr.bin/patch/patch.c index 9a29178..88c1017 100644 --- a/gnu/usr.bin/patch/patch.c +++ b/gnu/usr.bin/patch/patch.c @@ -1,5 +1,5 @@ char rcsid[] = - "$Header: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v 1.7 1997/02/13 21:10:41 jmg Exp $"; + "$Header: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v 1.8 1997/03/17 01:44:42 jmg Exp $"; /* patch - a program to apply diffs to original files * @@ -9,6 +9,15 @@ char rcsid[] = * money off of it, or pretend that you wrote it. * * $Log: patch.c,v $ + * Revision 1.8 1997/03/17 01:44:42 jmg + * fix compilation warnings in patch... (with slight modification) + * + * also remove -Wall that I acidentally committed last time I was here... + * + * Submitted-by: Philippe Charnier + * + * Closes PR#2998 + * * Revision 1.7 1997/02/13 21:10:41 jmg * Fix a problem with patch in that is will always default, even when the * controlling terminal is closed. Now the function ask() will return 1 when th @@ -544,7 +553,7 @@ get_some_switches() break; case 'D': do_defines = TRUE; - if (!isalpha(*optarg) && '_' != *optarg) + if (!isalpha((unsigned char)*optarg) && '_' != *optarg) fatal1("argument to -D is not an identifier\n"); Sprintf(if_defined, "#ifdef %s\n", optarg); Sprintf(not_defined, "#ifndef %s\n", optarg); @@ -954,12 +963,12 @@ Reg2 char *b; Reg3 int len; { while (len) { - if (isspace(*b)) { /* whitespace (or \n) to match? */ - if (!isspace(*a)) /* no corresponding whitespace? */ + if (isspace((unsigned char)*b)) { /* whitespace (or \n) to match? */ + if (!isspace((unsigned char)*a)) /* no corresponding whitespace? */ return FALSE; - while (len && isspace(*b) && *b != '\n') + while (len && isspace((unsigned char)*b) && *b != '\n') b++,len--; /* skip pattern whitespace */ - while (isspace(*a) && *a != '\n') + while (isspace((unsigned char)*a) && *a != '\n') a++; /* skip target whitespace */ if (*a == '\n' || *b == '\n') return (*a == *b); /* should end in sync */ |