Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.

This commit is contained in:
rsc 2006-04-01 19:24:03 +00:00
parent 226d80b821
commit cbeb0b26e4
492 changed files with 3218 additions and 3167 deletions

View file

@ -27,7 +27,7 @@ static char *myenv[] =
"stem7",
"stem8",
"stem9",
0,
0
};
void

View file

@ -37,7 +37,7 @@ applyrules(char *target, char *cnt)
char stem[NAMEBLOCK], buf[NAMEBLOCK];
Resub rmatch[NREGEXP];
/* print("applyrules(%lux='%s')\n", target, target);*//**/
/* print("applyrules(%lux='%s')\n", target, target); */
sym = symlook(target, S_NODE, 0);
if(sym)
return (Node *)(sym->value);

View file

@ -76,7 +76,7 @@ work(Node *node, Node *p, Arc *parc)
int ready;
int did = 0;
/*print("work(%s) flags=0x%x time=%ld\n", node->name, node->flags, node->time);*//**/
/*print("work(%s) flags=0x%x time=%ld\n", node->name, node->flags, node->time); */
if(node->flags&BEINGMADE)
return(did);
if((node->flags&MADE) && (node->flags&PRETENDING) && p && outofdate(p, parc, 0)){
@ -188,7 +188,7 @@ update(int fake, Node *node)
if(a->n && outofdate(node, a, 1))
node->time = a->n->time;
}
/* print("----node %s time=%ld flags=0x%x\n", node->name, node->time, node->flags);*//**/
/* print("----node %s time=%ld flags=0x%x\n", node->name, node->time, node->flags);*/
}
static int

View file

@ -190,5 +190,5 @@ Shell rcshell = {
rcexpandquote,
rcescapetoken,
rccopyq,
rcmatchname,
rcmatchname
};

View file

@ -99,7 +99,7 @@ dorecipe(Node *node)
}
MADESET(n, BEINGMADE);
}
/*print("lt=%s ln=%s lp=%s\n",wtos(head.next, ' '),wtos(ln.next, ' '),wtos(lp.next, ' '));*//**/
/*print("lt=%s ln=%s lp=%s\n",wtos(head.next, ' '),wtos(ln.next, ' '),wtos(lp.next, ' '));*/
run(newjob(r, node, aa->stem, aa->match, lp.next, ln.next, head.next, ahead.next));
return(1);
}

View file

@ -201,6 +201,6 @@ Shell shshell = {
shexpandquote,
shescapetoken,
shcopyq,
shmatchname,
shmatchname
};

View file

@ -2,7 +2,7 @@
static Shell *shells[] = {
&rcshell,
&shshell,
&shshell
};
Shell *shelldefault = &shshell;

View file

@ -259,7 +259,7 @@ static struct
SIGFPE, "sys: fp: fptrap",
SIGPIPE, "sys: write on closed pipe",
SIGILL, "sys: trap: illegal instruction",
// SIGSEGV, "sys: segmentation violation",
/* SIGSEGV, "sys: segmentation violation", */
0, 0
};