mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
ctype sign fixes (Tom Miller)
This commit is contained in:
parent
96029e052b
commit
a47fbb1641
6 changed files with 7 additions and 6 deletions
|
@ -253,7 +253,7 @@ lexc(void)
|
|||
}
|
||||
|
||||
int
|
||||
escchar(char c)
|
||||
escchar(int c)
|
||||
{
|
||||
int n;
|
||||
char buf[Strsize];
|
||||
|
|
|
@ -56,7 +56,7 @@ work(void){
|
|||
int c;
|
||||
struct keyw *lptr;
|
||||
char *pt;
|
||||
char cc;
|
||||
int cc;
|
||||
int ct;
|
||||
|
||||
while ((c = getch()) != Beof){
|
||||
|
|
|
@ -258,7 +258,7 @@ numb(float *np, int *argcp, char ***argvp){
|
|||
return(0);
|
||||
while((c=(*argvp)[1][0]) == '+')
|
||||
(*argvp)[1]++;
|
||||
if(!(isdigit(c) || c=='-'&&(*argvp)[1][1]<'A' || c=='.'))
|
||||
if(!(isdigit((uchar)c) || c=='-'&&(*argvp)[1][1]<'A' || c=='.'))
|
||||
return(0);
|
||||
*np = atof((*argvp)[1]);
|
||||
(*argcp)--;
|
||||
|
|
|
@ -23,7 +23,7 @@ gettbl(void)
|
|||
break;
|
||||
}
|
||||
fullbot[nlin] = 0;
|
||||
if (cstore[0] == '.' && !isdigit(cstore[1])) {
|
||||
if (cstore[0] == '.' && !isdigit((uchar)cstore[1])) {
|
||||
instead[nlin] = cstore;
|
||||
while (*cstore++)
|
||||
;
|
||||
|
|
|
@ -29,7 +29,7 @@ domore(char *dataln)
|
|||
|
||||
if (prefix(".TE", dataln))
|
||||
return(0);
|
||||
if (dataln[0] == '.' && !isdigit(dataln[1])) {
|
||||
if (dataln[0] == '.' && !isdigit((uchar)dataln[1])) {
|
||||
Bprint(&tabout, "%s\n", dataln);
|
||||
return(1);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ n10.c
|
|||
Device interfaces
|
||||
*/
|
||||
|
||||
#include <u.h>
|
||||
#include "tdef.h"
|
||||
#include "ext.h"
|
||||
#include "fns.h"
|
||||
|
@ -48,7 +49,7 @@ static char *parse(char *s, int typeit) /* convert \0, etc to nroff driving tabl
|
|||
*t++ = *s++;
|
||||
else {
|
||||
s++; /* skip \\ */
|
||||
if (isdigit(s[0]) && isdigit(s[1]) && isdigit(s[2])) {
|
||||
if (isdigit((uchar)s[0]) && isdigit((uchar)s[1]) && isdigit((uchar)s[2])) {
|
||||
*t++ = (s[0]-'0')<<6 | (s[1]-'0')<<3 | s[2]-'0';
|
||||
s += 2;
|
||||
} else if (isdigit(s[0])) {
|
||||
|
|
Loading…
Reference in a new issue