diff options
| author | Karoly Lorentey | 2007-01-06 15:25:16 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-01-06 15:25:16 +0000 |
| commit | 191ae1cf7cd2571277635b3b8e488e773ca5c9b9 (patch) | |
| tree | e0b26e3040767dae38fb39a03b757da05088c58f /lib-src | |
| parent | 382707ecfb50f8c7794a7ba3d8cd9db9b6cd29d0 (diff) | |
| parent | f85c5e3b72855951b071eacb7b6e2d002c5fc4be (diff) | |
| download | emacs-191ae1cf7cd2571277635b3b8e488e773ca5c9b9.tar.gz emacs-191ae1cf7cd2571277635b3b8e488e773ca5c9b9.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-585
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-586
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-587
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-588
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-589
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-590
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-591
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-592
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 8 | ||||
| -rw-r--r-- | lib-src/etags.c | 80 |
2 files changed, 53 insertions, 35 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 76a0dcf1b9e..fd0f61a6eff 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2007-01-02 Francesco Potort,Al(B <pot@gnu.org> | ||
| 2 | |||
| 3 | * etags.c: (longopts): New undocumented option --no-duplicates. | ||
| 4 | (no_duplicates): Static variables for the above option. | ||
| 5 | (print_help): Do not print help for --no-warn, now undocumented. | ||
| 6 | (add_node): Allow duplicate tags in ctags mode unless --no-duplicates. | ||
| 7 | (main): Pass the -u option to sort in ctags mode. | ||
| 8 | |||
| 1 | 2006-12-28 Francesco Potort,Al(B <pot@gnu.org> | 9 | 2006-12-28 Francesco Potort,Al(B <pot@gnu.org> |
| 2 | 10 | ||
| 3 | * etags.c (readline): When creating a relative file name from a | 11 | * etags.c (readline): When creating a relative file name from a |
diff --git a/lib-src/etags.c b/lib-src/etags.c index c4f7fdc4d69..43ce2fdf3eb 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | * configuration file containing regexp definitions for etags. | 41 | * configuration file containing regexp definitions for etags. |
| 42 | */ | 42 | */ |
| 43 | 43 | ||
| 44 | char pot_etags_version[] = "@(#) pot revision number is 17.25"; | 44 | char pot_etags_version[] = "@(#) pot revision number is 17.26"; |
| 45 | 45 | ||
| 46 | #define TRUE 1 | 46 | #define TRUE 1 |
| 47 | #define FALSE 0 | 47 | #define FALSE 0 |
| @@ -456,9 +456,10 @@ static bool globals; /* create tags for global variables */ | |||
| 456 | static bool declarations; /* --declarations: tag them and extern in C&Co*/ | 456 | static bool declarations; /* --declarations: tag them and extern in C&Co*/ |
| 457 | static bool members; /* create tags for C member variables */ | 457 | static bool members; /* create tags for C member variables */ |
| 458 | static bool no_line_directive; /* ignore #line directives (undocumented) */ | 458 | static bool no_line_directive; /* ignore #line directives (undocumented) */ |
| 459 | static bool no_duplicates; /* no duplicate tags for ctags (undocumented) */ | ||
| 459 | static bool update; /* -u: update tags */ | 460 | static bool update; /* -u: update tags */ |
| 460 | static bool vgrind_style; /* -v: create vgrind style index output */ | 461 | static bool vgrind_style; /* -v: create vgrind style index output */ |
| 461 | static bool no_warnings; /* -w: suppress warnings */ | 462 | static bool no_warnings; /* -w: suppress warnings (undocumented) */ |
| 462 | static bool cxref_style; /* -x: create cxref style output */ | 463 | static bool cxref_style; /* -x: create cxref style output */ |
| 463 | static bool cplusplus; /* .[hc] means C++, not C */ | 464 | static bool cplusplus; /* .[hc] means C++, not C */ |
| 464 | static bool ignoreindent; /* -I: ignore indentation in C */ | 465 | static bool ignoreindent; /* -I: ignore indentation in C */ |
| @@ -477,39 +478,40 @@ static bool need_filebuf; /* some regexes are multi-line */ | |||
| 477 | 478 | ||
| 478 | static struct option longopts[] = | 479 | static struct option longopts[] = |
| 479 | { | 480 | { |
| 480 | { "append", no_argument, NULL, 'a' }, | 481 | { "append", no_argument, NULL, 'a' }, |
| 481 | { "packages-only", no_argument, &packages_only, TRUE }, | 482 | { "packages-only", no_argument, &packages_only, TRUE }, |
| 482 | { "c++", no_argument, NULL, 'C' }, | 483 | { "c++", no_argument, NULL, 'C' }, |
| 483 | { "declarations", no_argument, &declarations, TRUE }, | 484 | { "declarations", no_argument, &declarations, TRUE }, |
| 484 | { "no-line-directive", no_argument, &no_line_directive, TRUE }, | 485 | { "no-line-directive", no_argument, &no_line_directive, TRUE }, |
| 485 | { "help", no_argument, NULL, 'h' }, | 486 | { "no-duplicates", no_argument, &no_duplicates, TRUE }, |
| 486 | { "help", no_argument, NULL, 'H' }, | 487 | { "help", no_argument, NULL, 'h' }, |
| 487 | { "ignore-indentation", no_argument, NULL, 'I' }, | 488 | { "help", no_argument, NULL, 'H' }, |
| 488 | { "language", required_argument, NULL, 'l' }, | 489 | { "ignore-indentation", no_argument, NULL, 'I' }, |
| 489 | { "members", no_argument, &members, TRUE }, | 490 | { "language", required_argument, NULL, 'l' }, |
| 490 | { "no-members", no_argument, &members, FALSE }, | 491 | { "members", no_argument, &members, TRUE }, |
| 491 | { "output", required_argument, NULL, 'o' }, | 492 | { "no-members", no_argument, &members, FALSE }, |
| 492 | { "regex", required_argument, NULL, 'r' }, | 493 | { "output", required_argument, NULL, 'o' }, |
| 493 | { "no-regex", no_argument, NULL, 'R' }, | 494 | { "regex", required_argument, NULL, 'r' }, |
| 494 | { "ignore-case-regex", required_argument, NULL, 'c' }, | 495 | { "no-regex", no_argument, NULL, 'R' }, |
| 496 | { "ignore-case-regex", required_argument, NULL, 'c' }, | ||
| 495 | { "parse-stdin", required_argument, NULL, STDIN }, | 497 | { "parse-stdin", required_argument, NULL, STDIN }, |
| 496 | { "version", no_argument, NULL, 'V' }, | 498 | { "version", no_argument, NULL, 'V' }, |
| 497 | 499 | ||
| 498 | #if CTAGS /* Ctags options */ | 500 | #if CTAGS /* Ctags options */ |
| 499 | { "backward-search", no_argument, NULL, 'B' }, | 501 | { "backward-search", no_argument, NULL, 'B' }, |
| 500 | { "cxref", no_argument, NULL, 'x' }, | 502 | { "cxref", no_argument, NULL, 'x' }, |
| 501 | { "defines", no_argument, NULL, 'd' }, | 503 | { "defines", no_argument, NULL, 'd' }, |
| 502 | { "globals", no_argument, &globals, TRUE }, | 504 | { "globals", no_argument, &globals, TRUE }, |
| 503 | { "typedefs", no_argument, NULL, 't' }, | 505 | { "typedefs", no_argument, NULL, 't' }, |
| 504 | { "typedefs-and-c++", no_argument, NULL, 'T' }, | 506 | { "typedefs-and-c++", no_argument, NULL, 'T' }, |
| 505 | { "update", no_argument, NULL, 'u' }, | 507 | { "update", no_argument, NULL, 'u' }, |
| 506 | { "vgrind", no_argument, NULL, 'v' }, | 508 | { "vgrind", no_argument, NULL, 'v' }, |
| 507 | { "no-warn", no_argument, NULL, 'w' }, | 509 | { "no-warn", no_argument, NULL, 'w' }, |
| 508 | 510 | ||
| 509 | #else /* Etags options */ | 511 | #else /* Etags options */ |
| 510 | { "no-defines", no_argument, NULL, 'D' }, | 512 | { "no-defines", no_argument, NULL, 'D' }, |
| 511 | { "no-globals", no_argument, &globals, FALSE }, | 513 | { "no-globals", no_argument, &globals, FALSE }, |
| 512 | { "include", required_argument, NULL, 'i' }, | 514 | { "include", required_argument, NULL, 'i' }, |
| 513 | #endif | 515 | #endif |
| 514 | { NULL } | 516 | { NULL } |
| 515 | }; | 517 | }; |
| @@ -976,9 +978,13 @@ Relative ones are stored relative to the output file's directory.\n"); | |||
| 976 | Print on the standard output an index of items intended for\n\ | 978 | Print on the standard output an index of items intended for\n\ |
| 977 | human consumption, similar to the output of vgrind. The index\n\ | 979 | human consumption, similar to the output of vgrind. The index\n\ |
| 978 | is sorted, and gives the page number of each item."); | 980 | is sorted, and gives the page number of each item."); |
| 981 | # if PRINT_UNDOCUMENTED_OPTIONS_HELP | ||
| 982 | puts ("-w, --no-duplicates\n\ | ||
| 983 | Do not create duplicate tag entries, for compatibility with\n\ | ||
| 984 | traditional ctags."); | ||
| 979 | puts ("-w, --no-warn\n\ | 985 | puts ("-w, --no-warn\n\ |
| 980 | Suppress warning messages about entries defined in multiple\n\ | 986 | Suppress warning messages about duplicate tag entries."); |
| 981 | files."); | 987 | # endif /* PRINT_UNDOCUMENTED_OPTIONS_HELP */ |
| 982 | puts ("-x, --cxref\n\ | 988 | puts ("-x, --cxref\n\ |
| 983 | Like --vgrind, but in the style of cxref, rather than vgrind.\n\ | 989 | Like --vgrind, but in the style of cxref, rather than vgrind.\n\ |
| 984 | The output uses line numbers instead of page numbers, but\n\ | 990 | The output uses line numbers instead of page numbers, but\n\ |
| @@ -1454,8 +1460,11 @@ main (argc, argv) | |||
| 1454 | if (CTAGS) | 1460 | if (CTAGS) |
| 1455 | if (append_to_tagfile || update) | 1461 | if (append_to_tagfile || update) |
| 1456 | { | 1462 | { |
| 1457 | char cmd[2*BUFSIZ+10]; | 1463 | char cmd[2*BUFSIZ+20]; |
| 1458 | sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); | 1464 | /* Maybe these should be used: |
| 1465 | setenv ("LC_COLLATE", "C", 1); | ||
| 1466 | setenv ("LC_ALL", "C", 1); */ | ||
| 1467 | sprintf (cmd, "sort -u -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); | ||
| 1459 | exit (system (cmd)); | 1468 | exit (system (cmd)); |
| 1460 | } | 1469 | } |
| 1461 | return EXIT_SUCCESS; | 1470 | return EXIT_SUCCESS; |
| @@ -2168,7 +2177,7 @@ add_node (np, cur_node_p) | |||
| 2168 | * If this tag name matches an existing one, then | 2177 | * If this tag name matches an existing one, then |
| 2169 | * do not add the node, but maybe print a warning. | 2178 | * do not add the node, but maybe print a warning. |
| 2170 | */ | 2179 | */ |
| 2171 | if (!dif) | 2180 | if (no_duplicates && !dif) |
| 2172 | { | 2181 | { |
| 2173 | if (np->fdp == cur_node->fdp) | 2182 | if (np->fdp == cur_node->fdp) |
| 2174 | { | 2183 | { |
| @@ -6885,6 +6894,7 @@ xrealloc (ptr, size) | |||
| 6885 | * tab-width: 8 | 6894 | * tab-width: 8 |
| 6886 | * fill-column: 79 | 6895 | * fill-column: 79 |
| 6887 | * c-font-lock-extra-types: ("FILE" "bool" "language" "linebuffer" "fdesc" "node" "regexp") | 6896 | * c-font-lock-extra-types: ("FILE" "bool" "language" "linebuffer" "fdesc" "node" "regexp") |
| 6897 | * c-file-style: gnu | ||
| 6888 | * End: | 6898 | * End: |
| 6889 | */ | 6899 | */ |
| 6890 | 6900 | ||