diff options
| author | Francesco Potortì | 2004-09-08 16:31:35 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2004-09-08 16:31:35 +0000 |
| commit | fba74375608bcbf2d970c260037bbc84430e3a13 (patch) | |
| tree | a4968109339ab1f031d5709198a6d45e9ddb80b7 /lib-src | |
| parent | c78d2bbfc47bc47a2b4b92169e867681262aad27 (diff) | |
| download | emacs-fba74375608bcbf2d970c260037bbc84430e3a13.tar.gz emacs-fba74375608bcbf2d970c260037bbc84430e3a13.zip | |
[LONG_OPTIONS]: make it TRUE (ifdef) or FALSE for ease of use.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/etags.c | 37 |
2 files changed, 23 insertions, 19 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4764871fa54..909a5717bcc 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-09-08 Francesco Potort,Al(B <pot@gnu.org> | ||
| 2 | |||
| 3 | * etags.c: [LONG_OPTIONS]: make it TRUE (ifdef) or FALSE (ifndef) | ||
| 4 | for ease of use. | ||
| 5 | |||
| 1 | 2004-07-17 Richard M. Stallman <rms@gnu.org> | 6 | 2004-07-17 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * emacsclient.c (quote_file_name): Pass COPY thru %s to output it. | 8 | * emacsclient.c (quote_file_name): Pass COPY thru %s to output it. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 829fc97fbfd..094c81e91a0 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | * | 35 | * |
| 36 | */ | 36 | */ |
| 37 | 37 | ||
| 38 | char pot_etags_version[] = "@(#) pot revision number is 16.56"; | 38 | char pot_etags_version[] = "@(#) pot revision number is 16.58"; |
| 39 | 39 | ||
| 40 | #define TRUE 1 | 40 | #define TRUE 1 |
| 41 | #define FALSE 0 | 41 | #define FALSE 0 |
| @@ -76,6 +76,13 @@ char pot_etags_version[] = "@(#) pot revision number is 16.56"; | |||
| 76 | # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ | 76 | # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ |
| 77 | #endif | 77 | #endif |
| 78 | 78 | ||
| 79 | #ifdef LONG_OPTIONS | ||
| 80 | # undef LONG_OPTIONS | ||
| 81 | # define LONG_OPTIONS TRUE | ||
| 82 | #else | ||
| 83 | # define LONG_OPTIONS FALSE | ||
| 84 | #endif | ||
| 85 | |||
| 79 | /* WIN32_NATIVE is for Xemacs. | 86 | /* WIN32_NATIVE is for Xemacs. |
| 80 | MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ | 87 | MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ |
| 81 | #ifdef WIN32_NATIVE | 88 | #ifdef WIN32_NATIVE |
| @@ -147,7 +154,7 @@ char pot_etags_version[] = "@(#) pot revision number is 16.56"; | |||
| 147 | # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | 154 | # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
| 148 | #endif | 155 | #endif |
| 149 | 156 | ||
| 150 | #ifdef LONG_OPTIONS | 157 | #if LONG_OPTIONS |
| 151 | # include <getopt.h> | 158 | # include <getopt.h> |
| 152 | #else | 159 | #else |
| 153 | # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr) | 160 | # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr) |
| @@ -465,7 +472,7 @@ static bool need_filebuf; /* some regexes are multi-line */ | |||
| 465 | # define need_filebuf FALSE | 472 | # define need_filebuf FALSE |
| 466 | #endif /* ETAGS_REGEXPS */ | 473 | #endif /* ETAGS_REGEXPS */ |
| 467 | 474 | ||
| 468 | #ifdef LONG_OPTIONS | 475 | #if LONG_OPTIONS |
| 469 | static struct option longopts[] = | 476 | static struct option longopts[] = |
| 470 | { | 477 | { |
| 471 | { "packages-only", no_argument, &packages_only, TRUE }, | 478 | { "packages-only", no_argument, &packages_only, TRUE }, |
| @@ -845,12 +852,11 @@ print_help (argbuffer) | |||
| 845 | printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ | 852 | printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ |
| 846 | \n\ | 853 | \n\ |
| 847 | These are the options accepted by %s.\n", progname, progname); | 854 | These are the options accepted by %s.\n", progname, progname); |
| 848 | #ifdef LONG_OPTIONS | 855 | if (LONG_OPTIONS) |
| 849 | puts ("You may use unambiguous abbreviations for the long option names."); | 856 | puts ("You may use unambiguous abbreviations for the long option names."); |
| 850 | #else | 857 | else |
| 851 | puts ("Long option names do not work with this executable, as it is not\n\ | 858 | puts ("Long option names do not work with this executable, as it is not\n\ |
| 852 | linked with GNU getopt."); | 859 | linked with GNU getopt."); |
| 853 | #endif /* LONG_OPTIONS */ | ||
| 854 | puts (" A - as file name means read names from stdin (one per line).\n\ | 860 | puts (" A - as file name means read names from stdin (one per line).\n\ |
| 855 | Absolute names are stored in the output file as they are.\n\ | 861 | Absolute names are stored in the output file as they are.\n\ |
| 856 | Relative ones are stored relative to the output file's directory.\n"); | 862 | Relative ones are stored relative to the output file's directory.\n"); |
| @@ -1158,9 +1164,8 @@ main (argc, argv) | |||
| 1158 | #ifdef ETAGS_REGEXPS | 1164 | #ifdef ETAGS_REGEXPS |
| 1159 | optstring = "-r:Rc:"; | 1165 | optstring = "-r:Rc:"; |
| 1160 | #endif /* ETAGS_REGEXPS */ | 1166 | #endif /* ETAGS_REGEXPS */ |
| 1161 | #ifndef LONG_OPTIONS | 1167 | if (LONG_OPTIONS) |
| 1162 | optstring = optstring + 1; | 1168 | optstring += 1; |
| 1163 | #endif /* LONG_OPTIONS */ | ||
| 1164 | optstring = concat (optstring, | 1169 | optstring = concat (optstring, |
| 1165 | "Cf:Il:o:SVhH", | 1170 | "Cf:Il:o:SVhH", |
| 1166 | (CTAGS) ? "BxdtTuvw" : "aDi:"); | 1171 | (CTAGS) ? "BxdtTuvw" : "aDi:"); |
| @@ -6475,14 +6480,8 @@ pfatal (s1) | |||
| 6475 | static void | 6480 | static void |
| 6476 | suggest_asking_for_help () | 6481 | suggest_asking_for_help () |
| 6477 | { | 6482 | { |
| 6478 | 6483 | fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", | |
| 6479 | #ifdef LONG_OPTIONS | 6484 | progname, LONG_OPTIONS ? "--help" : "-h"); |
| 6480 | fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", | ||
| 6481 | progname, "--help"); | ||
| 6482 | #else | ||
| 6483 | fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", | ||
| 6484 | progname, "-h"); | ||
| 6485 | #endif | ||
| 6486 | exit (EXIT_FAILURE); | 6485 | exit (EXIT_FAILURE); |
| 6487 | } | 6486 | } |
| 6488 | 6487 | ||