diff options
| author | Francesco Potortì | 1994-02-17 18:01:38 +0000 |
|---|---|---|
| committer | Francesco Potortì | 1994-02-17 18:01:38 +0000 |
| commit | 14c90d01c58a8c5e25cc0ea9830cf60695246850 (patch) | |
| tree | 752eb6df5a20be8df90c13b36d44021a15ee1136 /lib-src | |
| parent | 3d0387c0f3be8e915aef9c5733be5bcec5f8924c (diff) | |
| download | emacs-14c90d01c58a8c5e25cc0ea9830cf60695246850.tar.gz emacs-14c90d01c58a8c5e25cc0ea9830cf60695246850.zip | |
* etags.c (--absolute-pathnames): this option removed.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/etags.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 45d742e2562..f65336f3c45 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -48,7 +48,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 48 | #include "getopt.h" | 48 | #include "getopt.h" |
| 49 | 49 | ||
| 50 | extern char *getenv (); | 50 | extern char *getenv (); |
| 51 | extern char *getcwd (); | ||
| 52 | 51 | ||
| 53 | char *etags_index (), *etags_rindex (); | 52 | char *etags_index (), *etags_rindex (); |
| 54 | char *savenstr (); | 53 | char *savenstr (); |
| @@ -246,7 +245,6 @@ char *curfile, /* current input file name */ | |||
| 246 | *intk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789"; | 245 | *intk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789"; |
| 247 | 246 | ||
| 248 | int append_to_tagfile; /* -a: append to tags */ | 247 | int append_to_tagfile; /* -a: append to tags */ |
| 249 | int absolute_pathnames; /* -A: use absolute pathnames in tag file */ | ||
| 250 | int emacs_tags_format; /* emacs style output (no -e option any more) */ | 248 | int emacs_tags_format; /* emacs style output (no -e option any more) */ |
| 251 | /* The following three default to 1 for etags, but to 0 for ctags. */ | 249 | /* The following three default to 1 for etags, but to 0 for ctags. */ |
| 252 | int typedefs; /* -t: create tags for typedefs */ | 250 | int typedefs; /* -t: create tags for typedefs */ |
| @@ -267,12 +265,8 @@ int noindentypedefs; /* -S: ignore indentation in C */ | |||
| 267 | /* Name this program was invoked with. */ | 265 | /* Name this program was invoked with. */ |
| 268 | char *progname; | 266 | char *progname; |
| 269 | 267 | ||
| 270 | /* The current working directory, used if --absolute-pathnames. */ | ||
| 271 | char *cwd; | ||
| 272 | |||
| 273 | struct option longopts[] = { | 268 | struct option longopts[] = { |
| 274 | { "append", no_argument, NULL, 'a' }, | 269 | { "append", no_argument, NULL, 'a' }, |
| 275 | { "absolute-pathnames", no_argument, NULL, 'A' }, | ||
| 276 | { "backward-search", no_argument, NULL, 'B' }, | 270 | { "backward-search", no_argument, NULL, 'B' }, |
| 277 | { "c++", no_argument, NULL, 'C' }, | 271 | { "c++", no_argument, NULL, 'C' }, |
| 278 | { "cxref", no_argument, NULL, 'x' }, | 272 | { "cxref", no_argument, NULL, 'x' }, |
| @@ -343,8 +337,6 @@ names from stdin.\n\n", progname); | |||
| 343 | 337 | ||
| 344 | puts ("-a, --append\n\ | 338 | puts ("-a, --append\n\ |
| 345 | Append tag entries to existing tags file."); | 339 | Append tag entries to existing tags file."); |
| 346 | puts ("-A, --absolute-pathnames\n\ | ||
| 347 | Use absolute pathnames for tagged files."); | ||
| 348 | 340 | ||
| 349 | #ifdef CTAGS | 341 | #ifdef CTAGS |
| 350 | puts ("-B, --backward-search\n\ | 342 | puts ("-B, --backward-search\n\ |
| @@ -489,9 +481,6 @@ main (argc, argv) | |||
| 489 | case 'a': | 481 | case 'a': |
| 490 | append_to_tagfile++; | 482 | append_to_tagfile++; |
| 491 | break; | 483 | break; |
| 492 | case 'A': | ||
| 493 | absolute_pathnames++; | ||
| 494 | break; | ||
| 495 | case 'C': | 484 | case 'C': |
| 496 | cplusplus = 1; | 485 | cplusplus = 1; |
| 497 | break; | 486 | break; |
| @@ -625,16 +614,6 @@ main (argc, argv) | |||
| 625 | } /* solely to balance out the ifdef'd parens above */ | 614 | } /* solely to balance out the ifdef'd parens above */ |
| 626 | #endif | 615 | #endif |
| 627 | #else | 616 | #else |
| 628 | if (absolute_pathnames) | ||
| 629 | { | ||
| 630 | cwd = getcwd (NULL, 2*BUFSIZ); | ||
| 631 | if (cwd == NULL) | ||
| 632 | { | ||
| 633 | perror ("pwd"); | ||
| 634 | exit (BAD); | ||
| 635 | } | ||
| 636 | strcat (cwd, "/"); | ||
| 637 | } | ||
| 638 | for (; optind < argc; optind++) | 617 | for (; optind < argc; optind++) |
| 639 | { | 618 | { |
| 640 | this_file = argv[optind]; | 619 | this_file = argv[optind]; |
| @@ -722,9 +701,7 @@ process_file (file) | |||
| 722 | } | 701 | } |
| 723 | if (emacs_tags_format) | 702 | if (emacs_tags_format) |
| 724 | { | 703 | { |
| 725 | fprintf (outf, "\f\n%s%s,%d\n", | 704 | fprintf (outf, "\f\n%s,%d\n", file, total_size_of_entries (head)); |
| 726 | ((absolute_pathnames && file[0] != '/') ? cwd : ""), | ||
| 727 | file, total_size_of_entries (head)); | ||
| 728 | put_entries (head); | 705 | put_entries (head); |
| 729 | free_tree (head); | 706 | free_tree (head); |
| 730 | head = NULL; | 707 | head = NULL; |
| @@ -1920,7 +1897,7 @@ consider_token (c, tokp, c_ext, cblev, is_func) | |||
| 1920 | case dignorerest: | 1897 | case dignorerest: |
| 1921 | return (FALSE); | 1898 | return (FALSE); |
| 1922 | default: | 1899 | default: |
| 1923 | error ("internal error: definedef value is %d", definedef); | 1900 | error ("internal error: definedef value.", 0); |
| 1924 | } | 1901 | } |
| 1925 | 1902 | ||
| 1926 | /* | 1903 | /* |