177 |
# define CTAGS FALSE |
# define CTAGS FALSE |
178 |
#endif |
#endif |
179 |
|
|
|
/* Exit codes for success and failure. */ |
|
|
#ifdef VMS |
|
|
# define GOOD 1 |
|
|
# define BAD 0 |
|
|
#else |
|
|
# define GOOD 0 |
|
|
# define BAD 1 |
|
|
#endif |
|
|
|
|
180 |
#define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) |
#define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) |
181 |
#define strcaseeq(s,t) (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t)) |
#define strcaseeq(s,t) (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t)) |
182 |
#define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) |
#define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) |
821 |
puts ("Copyright (C) 2002 Free Software Foundation, Inc. and Ken Arnold"); |
puts ("Copyright (C) 2002 Free Software Foundation, Inc. and Ken Arnold"); |
822 |
puts ("This program is distributed under the same terms as Emacs"); |
puts ("This program is distributed under the same terms as Emacs"); |
823 |
|
|
824 |
exit (GOOD); |
exit (EXIT_SUCCESS); |
825 |
} |
} |
826 |
|
|
827 |
static void |
static void |
840 |
} |
} |
841 |
|
|
842 |
if (help_for_lang) |
if (help_for_lang) |
843 |
exit (GOOD); |
exit (EXIT_SUCCESS); |
844 |
|
|
845 |
printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ |
printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ |
846 |
\n\ |
\n\ |
981 |
puts (""); |
puts (""); |
982 |
puts ("Report bugs to bug-gnu-emacs@gnu.org"); |
puts ("Report bugs to bug-gnu-emacs@gnu.org"); |
983 |
|
|
984 |
exit (GOOD); |
exit (EXIT_SUCCESS); |
985 |
} |
} |
986 |
|
|
987 |
|
|
1404 |
|
|
1405 |
if (fclose (tagf) == EOF) |
if (fclose (tagf) == EOF) |
1406 |
pfatal (tagfile); |
pfatal (tagfile); |
1407 |
exit (GOOD); |
exit (EXIT_SUCCESS); |
1408 |
} |
} |
1409 |
|
|
1410 |
if (update) |
if (update) |
1423 |
sprintf (cmd, |
sprintf (cmd, |
1424 |
"mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS", |
"mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS", |
1425 |
tagfile, argbuffer[i].what, tagfile); |
tagfile, argbuffer[i].what, tagfile); |
1426 |
if (system (cmd) != GOOD) |
if (system (cmd) != EXIT_SUCCESS) |
1427 |
fatal ("failed to execute shell command", (char *)NULL); |
fatal ("failed to execute shell command", (char *)NULL); |
1428 |
} |
} |
1429 |
append_to_tagfile = TRUE; |
append_to_tagfile = TRUE; |
1444 |
sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); |
sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); |
1445 |
exit (system (cmd)); |
exit (system (cmd)); |
1446 |
} |
} |
1447 |
return GOOD; |
return EXIT_SUCCESS; |
1448 |
} |
} |
1449 |
|
|
1450 |
|
|
6461 |
char *s1, *s2; |
char *s1, *s2; |
6462 |
{ |
{ |
6463 |
error (s1, s2); |
error (s1, s2); |
6464 |
exit (BAD); |
exit (EXIT_FAILURE); |
6465 |
} |
} |
6466 |
|
|
6467 |
static void |
static void |
6469 |
char *s1; |
char *s1; |
6470 |
{ |
{ |
6471 |
perror (s1); |
perror (s1); |
6472 |
exit (BAD); |
exit (EXIT_FAILURE); |
6473 |
} |
} |
6474 |
|
|
6475 |
static void |
static void |
6483 |
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", |
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", |
6484 |
progname, "-h"); |
progname, "-h"); |
6485 |
#endif |
#endif |
6486 |
exit (BAD); |
exit (EXIT_FAILURE); |
6487 |
} |
} |
6488 |
|
|
6489 |
/* Print error message. `s1' is printf control string, `s2' is arg for it. */ |
/* Print error message. `s1' is printf control string, `s2' is arg for it. */ |
6779 |
|
|
6780 |
/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051 |
/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051 |
6781 |
(do not change this comment) */ |
(do not change this comment) */ |
6782 |
|
|
6783 |
|
/* etags.c ends here */ |