version 1.4, 1999/07/02 18:37:11 |
version 1.5, 2000/07/25 19:28:30 |
|
|
int exit_val; /* exit value */ |
int exit_val; /* exit value */ |
int step; /* step through args */ |
int step; /* step through args */ |
int ch; /* getopts char */ |
int ch; /* getopts char */ |
char cmd[100]; /* too ugly to explain */ |
char *cmd; |
|
|
aflag = uflag = NO; |
aflag = uflag = NO; |
while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1) |
while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1) |
|
|
else { |
else { |
if (uflag) { |
if (uflag) { |
for (step = 0; step < argc; step++) { |
for (step = 0; step < argc; step++) { |
(void)sprintf(cmd, |
(void)asprintf(&cmd, |
"mv %s OTAGS; fgrep -v '\t%s\t' OTAGS >%s; rm OTAGS", |
"mv %s OTAGS; fgrep -v '\t%s\t' OTAGS >%s; rm OTAGS", |
outfile, argv[step], |
outfile, argv[step], outfile); |
outfile); |
if (cmd == NULL) |
|
err(1, "out of space"); |
system(cmd); |
system(cmd); |
|
free(cmd); |
|
cmd = NULL; |
} |
} |
++aflag; |
++aflag; |
} |
} |
|
|
put_entries(head); |
put_entries(head); |
(void)fclose(outf); |
(void)fclose(outf); |
if (uflag) { |
if (uflag) { |
(void)sprintf(cmd, "sort -o %s %s", |
(void)asprintf(&cmd, "sort -o %s %s", |
outfile, outfile); |
outfile, outfile); |
|
if (cmd == NULL) |
|
err(1, "out of space"); |
system(cmd); |
system(cmd); |
|
free(cmd); |
|
cmd = NULL; |
} |
} |
} |
} |
} |
} |
|
|
char *cp; |
char *cp; |
|
|
lineno = 0; /* should be 1 ?? KB */ |
lineno = 0; /* should be 1 ?? KB */ |
if (cp = strrchr(file, '.')) { |
if ((cp = strrchr(file, '.'))) { |
if (cp[1] == 'l' && !cp[2]) { |
if (cp[1] == 'l' && !cp[2]) { |
int c; |
int c; |
|
|