aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/troff
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-10-31 16:42:32 +0000
committerrsc <devnull@localhost>2005-10-31 16:42:32 +0000
commit74374cc8a40c450423785015c2e30d5a2ed2920c (patch)
tree1d8a5ca97056a320115a342fd251aa0cf0cda751 /src/cmd/troff
parentb330c942b468ab82fd8853590145187e859258cb (diff)
downloadplan9port-74374cc8a40c450423785015c2e30d5a2ed2920c.tar.gz
plan9port-74374cc8a40c450423785015c2e30d5a2ed2920c.tar.bz2
plan9port-74374cc8a40c450423785015c2e30d5a2ed2920c.zip
ctype sign fixes (Tom Miller)
Diffstat (limited to 'src/cmd/troff')
-rw-r--r--src/cmd/troff/dwbinit.c5
-rw-r--r--src/cmd/troff/n1.c5
-rw-r--r--src/cmd/troff/n8.c3
3 files changed, 8 insertions, 5 deletions
diff --git a/src/cmd/troff/dwbinit.c b/src/cmd/troff/dwbinit.c
index 59f74ec8..9c1845b0 100644
--- a/src/cmd/troff/dwbinit.c
+++ b/src/cmd/troff/dwbinit.c
@@ -73,6 +73,7 @@
*
*/
+#include <u.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
@@ -169,10 +170,10 @@ char *DWBhome(void)
if ( (fp = fopen(DWBCONFIG, "r")) != NULL ) {
len = strlen(DWBENV);
while ( fgets(buf, sizeof(buf), fp) != NULL ) {
- for ( ptr = buf; isspace(*ptr); ptr++ ) ;
+ for ( ptr = buf; isspace((uchar)*ptr); ptr++ ) ;
if ( strncmp(ptr, DWBENV, len) == 0 && *(ptr+len) == '=' ) {
path = ptr + len + 1;
- for ( ptr = path; !isspace(*ptr) && *ptr != ';'; ptr++ ) ;
+ for ( ptr = path; !isspace((uchar)*ptr) && *ptr != ';'; ptr++ ) ;
*ptr = '\0';
if ( home != NULL )
free(home);
diff --git a/src/cmd/troff/n1.c b/src/cmd/troff/n1.c
index 7fe87b63..4c2bec4b 100644
--- a/src/cmd/troff/n1.c
+++ b/src/cmd/troff/n1.c
@@ -5,6 +5,7 @@
* input routines, escape function calling
*/
+#include <u.h>
#include "tdef.h"
#include "fns.h"
#include "ext.h"
@@ -1091,10 +1092,10 @@ void getpn(char *a)
continue;
default:
n = 0;
- if (isdigit(*a)) {
+ if (isdigit((uchar)*a)) {
do
n = 10 * n + *a++ - '0';
- while (isdigit(*a));
+ while (isdigit((uchar)*a));
a--;
} else
n = 9999;
diff --git a/src/cmd/troff/n8.c b/src/cmd/troff/n8.c
index ded45438..b2ab175b 100644
--- a/src/cmd/troff/n8.c
+++ b/src/cmd/troff/n8.c
@@ -1,3 +1,4 @@
+#include <u.h>
#include "tdef.h"
#include "fns.h"
#include "ext.h"
@@ -495,7 +496,7 @@ static void install(char *s) /* map ab4c5de to: 12 abcde \0 00405 \0 */
num[0] = '0';
*nextpat++ = ' '; /* fill in with count later */
for (npat = lastpat = 0; *s != '\n' && *s != '\0'; s++) {
- if (isdigit(*s)) {
+ if (isdigit((uchar)*s)) {
num[npat] = *s;
lastpat = npat;
} else {