I just hate to be pushed around by some @#$%^& machine.
This commit is contained in:
parent
86a1a5e7b3
commit
1c171e3add
15 changed files with 29 additions and 29 deletions
|
|
@ -39,7 +39,7 @@ typedef struct Srv Srv;
|
||||||
struct Fid
|
struct Fid
|
||||||
{
|
{
|
||||||
ulong fid;
|
ulong fid;
|
||||||
char omode; /* -1 = not open */
|
int omode; /* -1 = not open */
|
||||||
File* file;
|
File* file;
|
||||||
char* uid;
|
char* uid;
|
||||||
Qid qid;
|
Qid qid;
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,7 @@ struct Symbol
|
||||||
uint locals;
|
uint locals;
|
||||||
char *dir;
|
char *dir;
|
||||||
char *file;
|
char *file;
|
||||||
char frameptr;
|
schar frameptr;
|
||||||
uint framesize;
|
uint framesize;
|
||||||
} stabs;
|
} stabs;
|
||||||
} u;
|
} u;
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ void
|
||||||
upper2lower(char *to, char *from, int len)
|
upper2lower(char *to, char *from, int len)
|
||||||
{
|
{
|
||||||
while(--len>0 && *from!='\0')
|
while(--len>0 && *from!='\0')
|
||||||
*to++ = tolower(*from++);
|
*to++ = tolower((uchar)*from++);
|
||||||
*to = 0;
|
*to = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ nspaceafter(char *s)
|
||||||
n = strlen(s);
|
n = strlen(s);
|
||||||
if(n < 2)
|
if(n < 2)
|
||||||
return 1;
|
return 1;
|
||||||
if(isupper(s[0]) && n < 4)
|
if(isupper((uchar)s[0]) && n < 4)
|
||||||
return 1;
|
return 1;
|
||||||
if(strchr(".!?", s[n-1]) != nil)
|
if(strchr(".!?", s[n-1]) != nil)
|
||||||
return 2;
|
return 2;
|
||||||
|
|
|
||||||
|
|
@ -712,7 +712,7 @@ hhmtime(char *p, URL *u, Range *r)
|
||||||
tm.mon = 5;
|
tm.mon = 5;
|
||||||
} else {
|
} else {
|
||||||
for(p = month; *p; p++)
|
for(p = month; *p; p++)
|
||||||
*p = tolower(*p);
|
*p = tolower((uchar)*p);
|
||||||
for(i = 0; i < 12; i++)
|
for(i = 0; i < 12; i++)
|
||||||
if(strncmp(&monthchars[i*3], month, 3) == 0){
|
if(strncmp(&monthchars[i*3], month, 3) == 0){
|
||||||
tm.mon = i;
|
tm.mon = i;
|
||||||
|
|
@ -732,7 +732,7 @@ hhmtime(char *p, URL *u, Range *r)
|
||||||
tm.sec = strtoul(p, &p, 10);
|
tm.sec = strtoul(p, &p, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(tolower(*p) == 'p')
|
if(tolower((uchar)*p) == 'p')
|
||||||
tm.hour += 12;
|
tm.hour += 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1129,7 +1129,7 @@ passive(int ctl, URL *u)
|
||||||
p = strchr(msg, '(');
|
p = strchr(msg, '(');
|
||||||
if(p == nil){
|
if(p == nil){
|
||||||
for(p = msg+3; *p; p++)
|
for(p = msg+3; *p; p++)
|
||||||
if(isdigit(*p))
|
if(isdigit((uchar)*p))
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
p++;
|
p++;
|
||||||
|
|
@ -1253,7 +1253,7 @@ int
|
||||||
cistrncmp(char *a, char *b, int n)
|
cistrncmp(char *a, char *b, int n)
|
||||||
{
|
{
|
||||||
while(n-- > 0){
|
while(n-- > 0){
|
||||||
if(tolower(*a++) != tolower(*b++))
|
if(tolower((uchar)*a++) != tolower((uchar)*b++))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ oparse(char *s)
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
case '2':
|
case '2':
|
||||||
if(s[1] == '.' && isdigit(s[2])) {
|
if(s[1] == '.' && isdigit((uchar)s[2])) {
|
||||||
olistf[no] = *s=='1'? F1: F2;
|
olistf[no] = *s=='1'? F1: F2;
|
||||||
olist[no] = atoi(s += 2);
|
olist[no] = atoi(s += 2);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ fold(char *s, int n)
|
||||||
fline = realloc(fline,n+1);
|
fline = realloc(fline,n+1);
|
||||||
linesize = n+1;
|
linesize = n+1;
|
||||||
}
|
}
|
||||||
for(t=fline; *t++ = tolower(*s++); )
|
for(t=fline; *t++ = tolower((uchar)*s++); )
|
||||||
continue;
|
continue;
|
||||||
/* we assume the 'A'-'Z' only appear as themselves
|
/* we assume the 'A'-'Z' only appear as themselves
|
||||||
* in a utf encoding.
|
* in a utf encoding.
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ getnumber(char *s)
|
||||||
{
|
{
|
||||||
if(*s=='-' || *s=='+')
|
if(*s=='-' || *s=='+')
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
return 0;
|
return 0;
|
||||||
if(s[-1] == '+')
|
if(s[-1] == '+')
|
||||||
origin = BEG;
|
origin = BEG;
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ main(int argc, char *argv[])
|
||||||
f = 0;
|
f = 0;
|
||||||
while(argc > 1) {
|
while(argc > 1) {
|
||||||
if(*argv[1] == '-') {
|
if(*argv[1] == '-') {
|
||||||
if(isdigit(argv[1][1]))
|
if(isdigit((uchar)argv[1][1]))
|
||||||
fields = atoi(&argv[1][1]);
|
fields = atoi(&argv[1][1]);
|
||||||
else
|
else
|
||||||
mode = argv[1][1];
|
mode = argv[1][1];
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ encodefmt(Fmt *f)
|
||||||
rv = enc16(out, len, b, ilen);
|
rv = enc16(out, len, b, ilen);
|
||||||
if(rv >= 0 && (f->flags & FmtLong))
|
if(rv >= 0 && (f->flags & FmtLong))
|
||||||
for(p = buf; *p; p++)
|
for(p = buf; *p; p++)
|
||||||
*p = tolower(*p);
|
*p = tolower((uchar)*p);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rv = -1;
|
rv = -1;
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,5 @@ s_tolower(String *sp)
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
for(cp=sp->ptr; *cp; cp++)
|
for(cp=sp->ptr; *cp; cp++)
|
||||||
*cp = tolower(*cp);
|
*cp = tolower((uchar)*cp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ strtochan(char *s)
|
||||||
|
|
||||||
c = 0;
|
c = 0;
|
||||||
p=s;
|
p=s;
|
||||||
while(*p && isspace(*p))
|
while(*p && isspace((uchar)*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while(*p && !isspace(*p)){
|
while(*p && !isspace((uchar)*p)){
|
||||||
if((q = strchr(channames, p[0])) == nil)
|
if((q = strchr(channames, p[0])) == nil)
|
||||||
return 0;
|
return 0;
|
||||||
t = q-channames;
|
t = q-channames;
|
||||||
|
|
|
||||||
|
|
@ -880,7 +880,7 @@ parsewinsize(char *s, Rectangle *r, int *havemin)
|
||||||
i = strtol(s, &s, 0);
|
i = strtol(s, &s, 0);
|
||||||
if(*s == 'x'){
|
if(*s == 'x'){
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
goto oops;
|
goto oops;
|
||||||
j = strtol(s, &s, 0);
|
j = strtol(s, &s, 0);
|
||||||
r->max.x = i;
|
r->max.x = i;
|
||||||
|
|
@ -891,13 +891,13 @@ parsewinsize(char *s, Rectangle *r, int *havemin)
|
||||||
goto oops;
|
goto oops;
|
||||||
|
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
goto oops;
|
goto oops;
|
||||||
i = strtol(s, &s, 0);
|
i = strtol(s, &s, 0);
|
||||||
if(*s != ',' && *s != ' ')
|
if(*s != ',' && *s != ' ')
|
||||||
goto oops;
|
goto oops;
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
goto oops;
|
goto oops;
|
||||||
j = strtol(s, &s, 0);
|
j = strtol(s, &s, 0);
|
||||||
if(*s != 0)
|
if(*s != 0)
|
||||||
|
|
@ -911,19 +911,19 @@ parsewinsize(char *s, Rectangle *r, int *havemin)
|
||||||
if(c != ' ' && c != ',')
|
if(c != ' ' && c != ',')
|
||||||
goto oops;
|
goto oops;
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
goto oops;
|
goto oops;
|
||||||
j = strtol(s, &s, 0);
|
j = strtol(s, &s, 0);
|
||||||
if(*s != c)
|
if(*s != c)
|
||||||
goto oops;
|
goto oops;
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
goto oops;
|
goto oops;
|
||||||
k = strtol(s, &s, 0);
|
k = strtol(s, &s, 0);
|
||||||
if(*s != c)
|
if(*s != c)
|
||||||
goto oops;
|
goto oops;
|
||||||
s++;
|
s++;
|
||||||
if(!isdigit(*s))
|
if(!isdigit((uchar)*s))
|
||||||
goto oops;
|
goto oops;
|
||||||
l = strtol(s, &s, 0);
|
l = strtol(s, &s, 0);
|
||||||
if(*s != 0)
|
if(*s != 0)
|
||||||
|
|
|
||||||
|
|
@ -327,9 +327,9 @@ struct Instr
|
||||||
char asize; /* address size 'W' or 'L' */
|
char asize; /* address size 'W' or 'L' */
|
||||||
uchar mod; /* bits 6-7 of mod r/m field */
|
uchar mod; /* bits 6-7 of mod r/m field */
|
||||||
uchar reg; /* bits 3-5 of mod r/m field */
|
uchar reg; /* bits 3-5 of mod r/m field */
|
||||||
char ss; /* bits 6-7 of SIB */
|
schar ss; /* bits 6-7 of SIB */
|
||||||
char index; /* bits 3-5 of SIB */
|
schar index; /* bits 3-5 of SIB */
|
||||||
char base; /* bits 0-2 of SIB */
|
schar base; /* bits 0-2 of SIB */
|
||||||
short seg; /* segment of far address */
|
short seg; /* segment of far address */
|
||||||
ulong disp; /* displacement */
|
ulong disp; /* displacement */
|
||||||
ulong imm; /* immediate */
|
ulong imm; /* immediate */
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ ipattr(char *name)
|
||||||
|
|
||||||
for(p = name; *p; p++){
|
for(p = name; *p; p++){
|
||||||
c = *p;
|
c = *p;
|
||||||
if(isdigit(c))
|
if(isdigit((uchar)c))
|
||||||
continue;
|
continue;
|
||||||
if(isxdigit(c))
|
if(isxdigit((uchar)c))
|
||||||
hex = 1;
|
hex = 1;
|
||||||
else if(isalpha(c) || c == '-')
|
else if(isalpha((uchar)c) || c == '-')
|
||||||
alpha = 1;
|
alpha = 1;
|
||||||
else if(c == '.')
|
else if(c == '.')
|
||||||
dot = 1;
|
dot = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue