delinted
This commit is contained in:
parent
c488a4d491
commit
79295ca3ea
|
@ -189,7 +189,7 @@ Salloc(str)
|
|||
if (str == 0)
|
||||
str = "";
|
||||
|
||||
return strcpy(Malloc(strlen(str) + 1), str);
|
||||
return strcpy(Malloc((unsigned)strlen(str) + 1), str);
|
||||
}
|
||||
|
||||
EnHash(id)
|
||||
|
|
|
@ -55,6 +55,7 @@ DoOption(str)
|
|||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
CheckId(id, len)
|
||||
char *id;
|
||||
{
|
||||
|
@ -100,7 +101,7 @@ GetMacros(fn)
|
|||
|
||||
if ((fp = fopen(fn, "r")) == NULL) {
|
||||
fprintf(stderr, "%s: cannot read file \"%s\"\n", ProgName, fn);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
while ((c = getc(fp)) != EOF) {
|
||||
|
@ -163,7 +164,7 @@ Salloc(str)
|
|||
if (str == 0) {
|
||||
str = "";
|
||||
}
|
||||
return strcpy(Malloc(strlen(str) + 1), str);
|
||||
return strcpy(Malloc((unsigned)strlen(str) + 1), str);
|
||||
}
|
||||
|
||||
struct idf *
|
||||
|
|
|
@ -76,7 +76,7 @@ add_name(nm)
|
|||
nlp = nlp->next;
|
||||
}
|
||||
|
||||
(nnlp = new_namelist())->name = strcpy(Malloc(strlen(nm) + 1), nm);
|
||||
(nnlp = new_namelist())->name = strcpy(Malloc((unsigned)strlen(nm) + 1), nm);
|
||||
|
||||
if (lnlp) {
|
||||
nnlp->next = lnlp->next;
|
||||
|
@ -100,6 +100,7 @@ print_namelist(nm, nlp)
|
|||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
main(argc, argv)
|
||||
char *argv[];
|
||||
{
|
||||
|
@ -135,10 +136,12 @@ contains_slash(s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern char *fgets();
|
||||
|
||||
dofile(fn)
|
||||
char *fn;
|
||||
{
|
||||
char *fgets(), buf[BSIZ];
|
||||
char buf[BSIZ];
|
||||
FILE *fp;
|
||||
char *nm, *include_line();
|
||||
|
||||
|
@ -156,7 +159,7 @@ dofile(fn)
|
|||
while (fgets(buf, BSIZ, fp) != NULL)
|
||||
if (nm = include_line(buf)) {
|
||||
add_name(nm);
|
||||
dofile(nm);
|
||||
if (dofile(nm)) ;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
|
|
|
@ -106,7 +106,7 @@ Salloc(str)
|
|||
if (str == 0)
|
||||
str = "";
|
||||
|
||||
return strcpy(Malloc(strlen(str) + 1), str);
|
||||
return strcpy(Malloc((unsigned)strlen(str) + 1), str);
|
||||
}
|
||||
|
||||
EnHash(id)
|
||||
|
|
Loading…
Reference in a new issue