35 |
* |
* |
36 |
*/ |
*/ |
37 |
|
|
38 |
char pot_etags_version[] = "@(#) pot revision number is 16.56"; |
char pot_etags_version[] = "@(#) pot revision number is 16.58"; |
39 |
|
|
40 |
#define TRUE 1 |
#define TRUE 1 |
41 |
#define FALSE 0 |
#define FALSE 0 |
76 |
# define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ |
# define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ |
77 |
#endif |
#endif |
78 |
|
|
79 |
|
#ifdef LONG_OPTIONS |
80 |
|
# undef LONG_OPTIONS |
81 |
|
# define LONG_OPTIONS TRUE |
82 |
|
#else |
83 |
|
# define LONG_OPTIONS FALSE |
84 |
|
#endif |
85 |
|
|
86 |
/* WIN32_NATIVE is for Xemacs. |
/* WIN32_NATIVE is for Xemacs. |
87 |
MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ |
MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ |
88 |
#ifdef WIN32_NATIVE |
#ifdef WIN32_NATIVE |
154 |
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
155 |
#endif |
#endif |
156 |
|
|
157 |
#ifdef LONG_OPTIONS |
#if LONG_OPTIONS |
158 |
# include <getopt.h> |
# include <getopt.h> |
159 |
#else |
#else |
160 |
# define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr) |
# define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr) |
472 |
# define need_filebuf FALSE |
# define need_filebuf FALSE |
473 |
#endif /* ETAGS_REGEXPS */ |
#endif /* ETAGS_REGEXPS */ |
474 |
|
|
475 |
#ifdef LONG_OPTIONS |
#if LONG_OPTIONS |
476 |
static struct option longopts[] = |
static struct option longopts[] = |
477 |
{ |
{ |
478 |
{ "packages-only", no_argument, &packages_only, TRUE }, |
{ "packages-only", no_argument, &packages_only, TRUE }, |
852 |
printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ |
printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ |
853 |
\n\ |
\n\ |
854 |
These are the options accepted by %s.\n", progname, progname); |
These are the options accepted by %s.\n", progname, progname); |
855 |
#ifdef LONG_OPTIONS |
if (LONG_OPTIONS) |
856 |
puts ("You may use unambiguous abbreviations for the long option names."); |
puts ("You may use unambiguous abbreviations for the long option names."); |
857 |
#else |
else |
858 |
puts ("Long option names do not work with this executable, as it is not\n\ |
puts ("Long option names do not work with this executable, as it is not\n\ |
859 |
linked with GNU getopt."); |
linked with GNU getopt."); |
|
#endif /* LONG_OPTIONS */ |
|
860 |
puts (" A - as file name means read names from stdin (one per line).\n\ |
puts (" A - as file name means read names from stdin (one per line).\n\ |
861 |
Absolute names are stored in the output file as they are.\n\ |
Absolute names are stored in the output file as they are.\n\ |
862 |
Relative ones are stored relative to the output file's directory.\n"); |
Relative ones are stored relative to the output file's directory.\n"); |
1164 |
#ifdef ETAGS_REGEXPS |
#ifdef ETAGS_REGEXPS |
1165 |
optstring = "-r:Rc:"; |
optstring = "-r:Rc:"; |
1166 |
#endif /* ETAGS_REGEXPS */ |
#endif /* ETAGS_REGEXPS */ |
1167 |
#ifndef LONG_OPTIONS |
if (LONG_OPTIONS) |
1168 |
optstring = optstring + 1; |
optstring += 1; |
|
#endif /* LONG_OPTIONS */ |
|
1169 |
optstring = concat (optstring, |
optstring = concat (optstring, |
1170 |
"Cf:Il:o:SVhH", |
"Cf:Il:o:SVhH", |
1171 |
(CTAGS) ? "BxdtTuvw" : "aDi:"); |
(CTAGS) ? "BxdtTuvw" : "aDi:"); |
6480 |
static void |
static void |
6481 |
suggest_asking_for_help () |
suggest_asking_for_help () |
6482 |
{ |
{ |
6483 |
|
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", |
6484 |
#ifdef LONG_OPTIONS |
progname, LONG_OPTIONS ? "--help" : "-h"); |
|
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", |
|
|
progname, "--help"); |
|
|
#else |
|
|
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", |
|
|
progname, "-h"); |
|
|
#endif |
|
6485 |
exit (EXIT_FAILURE); |
exit (EXIT_FAILURE); |
6486 |
} |
} |
6487 |
|
|