diff options
| author | Francesco Potortì | 2001-01-30 17:22:09 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2001-01-30 17:22:09 +0000 |
| commit | b28e26be4148d218f1f52f972a5f5b8f2d8217a6 (patch) | |
| tree | bfe5ac33dbbfbbfaeee46582add4edc9ddd2265c /lib-src | |
| parent | eef93f9914aaabcf720df2b5ed9815319315963f (diff) | |
| download | emacs-b28e26be4148d218f1f52f972a5f5b8f2d8217a6.tar.gz emacs-b28e26be4148d218f1f52f972a5f5b8f2d8217a6.zip | |
Comment updates to etags.c
C macros changes to etags.c for the sake of standalone building and
Xemacs building. Does not affect building under Emacs.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 12 | ||||
| -rw-r--r-- | lib-src/etags.c | 45 |
2 files changed, 38 insertions, 19 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index fa819043329..2b5ccb265b0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2001-01-30 Francesco Potorti` <pot@gnu.org> | ||
| 2 | |||
| 3 | * etags.c: [WIN32-NATIVE]: #undef MSDOS, #undef WINDOWSNT and | ||
| 4 | #define it for the sake of Xemacs. | ||
| 5 | [WINDOWSNT]: #undef HAVE_NTGUI even if built without | ||
| 6 | HAVE_CONFIG_H. This change only affects a standalone etags. | ||
| 7 | [WINDOWSNT]: #undef DOS_NT and #define it even if built with | ||
| 8 | HAVE_CONFIG_H. This change does nothing in Emacs, as DOS_NT is | ||
| 9 | always defined when HAVE_CONFIG_H and WINDOWS are both defined. | ||
| 10 | [!HAVE_UNISTD_H]: use defined(WINDOWSNT) instead of the bare | ||
| 11 | WINDOWSNT, as this is the correct way to use it. | ||
| 12 | |||
| 1 | 2001-01-28 Francesco Potorti` <pot@gnu.org> | 13 | 2001-01-28 Francesco Potorti` <pot@gnu.org> |
| 2 | 14 | ||
| 3 | * etags.c: Be capable to parse nested struct-like structures. | 15 | * etags.c: Be capable to parse nested struct-like structures. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 57a25c4467a..1e1478886b6 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -24,7 +24,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |||
| 24 | * Fortran added by Jim Kleckner. | 24 | * Fortran added by Jim Kleckner. |
| 25 | * Ed Pelegri-Llopart added C typedefs. | 25 | * Ed Pelegri-Llopart added C typedefs. |
| 26 | * Gnu Emacs TAGS format and modifications by RMS? | 26 | * Gnu Emacs TAGS format and modifications by RMS? |
| 27 | * 199x Sam Kendall added C++. | 27 | * 1989 Sam Kendall added C++. |
| 28 | * 1993 Francesco Potortì reorganised C and C++ based on work by Joe Wells. | 28 | * 1993 Francesco Potortì reorganised C and C++ based on work by Joe Wells. |
| 29 | * 1994 Regexp tags by Tom Tromey. | 29 | * 1994 Regexp tags by Tom Tromey. |
| 30 | * 2001 Nested classes by Francesco Potortì based on work by Mykola Dzyuba. | 30 | * 2001 Nested classes by Francesco Potortì based on work by Mykola Dzyuba. |
| @@ -32,7 +32,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |||
| 32 | * Francesco Potortì <pot@gnu.org> has maintained it since 1993. | 32 | * Francesco Potortì <pot@gnu.org> has maintained it since 1993. |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | char pot_etags_version[] = "@(#) pot revision number is 14.11"; | 35 | char pot_etags_version[] = "@(#) pot revision number is 14.13"; |
| 36 | 36 | ||
| 37 | #define TRUE 1 | 37 | #define TRUE 1 |
| 38 | #define FALSE 0 | 38 | #define FALSE 0 |
| @@ -64,6 +64,14 @@ char pot_etags_version[] = "@(#) pot revision number is 14.11"; | |||
| 64 | # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ | 64 | # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ |
| 65 | #endif | 65 | #endif |
| 66 | 66 | ||
| 67 | /* WIN32_NATIVE is for Xemacs. | ||
| 68 | MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ | ||
| 69 | #ifdef WIN32_NATIVE | ||
| 70 | # undef MSDOS | ||
| 71 | # undef WINDOWSNT | ||
| 72 | # define WINDOWSNT | ||
| 73 | #endif /* WIN32_NATIVE */ | ||
| 74 | |||
| 67 | #ifdef MSDOS | 75 | #ifdef MSDOS |
| 68 | # undef MSDOS | 76 | # undef MSDOS |
| 69 | # define MSDOS TRUE | 77 | # define MSDOS TRUE |
| @@ -85,11 +93,9 @@ char pot_etags_version[] = "@(#) pot revision number is 14.11"; | |||
| 85 | # include <direct.h> | 93 | # include <direct.h> |
| 86 | # include <io.h> | 94 | # include <io.h> |
| 87 | # define MAXPATHLEN _MAX_PATH | 95 | # define MAXPATHLEN _MAX_PATH |
| 88 | # ifdef HAVE_CONFIG_H | 96 | # undef HAVE_NTGUI |
| 89 | # undef HAVE_NTGUI | 97 | # undef DOS_NT |
| 90 | # else | 98 | # define DOS_NT |
| 91 | # define DOS_NT | ||
| 92 | # endif /* not HAVE_CONFIG_H */ | ||
| 93 | # ifndef HAVE_GETCWD | 99 | # ifndef HAVE_GETCWD |
| 94 | # define HAVE_GETCWD | 100 | # define HAVE_GETCWD |
| 95 | # endif /* undef HAVE_GETCWD */ | 101 | # endif /* undef HAVE_GETCWD */ |
| @@ -105,7 +111,7 @@ char pot_etags_version[] = "@(#) pot revision number is 14.11"; | |||
| 105 | #ifdef HAVE_UNISTD_H | 111 | #ifdef HAVE_UNISTD_H |
| 106 | # include <unistd.h> | 112 | # include <unistd.h> |
| 107 | #else | 113 | #else |
| 108 | # if defined (HAVE_GETCWD) && !WINDOWSNT | 114 | # if defined (HAVE_GETCWD) && !defined (WINDOWSNT) |
| 109 | extern char *getcwd (char *buf, size_t size); | 115 | extern char *getcwd (char *buf, size_t size); |
| 110 | # endif | 116 | # endif |
| 111 | #endif /* HAVE_UNISTD_H */ | 117 | #endif /* HAVE_UNISTD_H */ |
| @@ -155,15 +161,6 @@ char pot_etags_version[] = "@(#) pot revision number is 14.11"; | |||
| 155 | # define BAD 1 | 161 | # define BAD 1 |
| 156 | #endif | 162 | #endif |
| 157 | 163 | ||
| 158 | /* C extensions. */ | ||
| 159 | #define C_EXT 0x00fff /* C extensions */ | ||
| 160 | #define C_PLAIN 0x00000 /* C */ | ||
| 161 | #define C_PLPL 0x00001 /* C++ */ | ||
| 162 | #define C_STAR 0x00003 /* C* */ | ||
| 163 | #define C_JAVA 0x00005 /* JAVA */ | ||
| 164 | #define C_AUTO 0x01000 /* C, switch to C++ if `class' is met */ | ||
| 165 | #define YACC 0x10000 /* yacc file */ | ||
| 166 | |||
| 167 | #define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) | 164 | #define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) |
| 168 | #define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) | 165 | #define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) |
| 169 | 166 | ||
| @@ -475,7 +472,8 @@ char *Asm_suffixes [] = { "a", /* Unix assembler */ | |||
| 475 | }; | 472 | }; |
| 476 | 473 | ||
| 477 | /* Note that .c and .h can be considered C++, if the --c++ flag was | 474 | /* Note that .c and .h can be considered C++, if the --c++ flag was |
| 478 | given. That is why default_C_entries is called here. */ | 475 | given, or if the `class' keyowrd is met inside the file. |
| 476 | That is why default_C_entries is called for these. */ | ||
| 479 | char *default_C_suffixes [] = | 477 | char *default_C_suffixes [] = |
| 480 | { "c", "h", NULL }; | 478 | { "c", "h", NULL }; |
| 481 | 479 | ||
| @@ -563,7 +561,7 @@ language lang_names [] = | |||
| 563 | { "lisp", Lisp_functions, NULL, Lisp_suffixes, NULL }, | 561 | { "lisp", Lisp_functions, NULL, Lisp_suffixes, NULL }, |
| 564 | { "makefile", Makefile_targets, Makefile_filenames, NULL, NULL }, | 562 | { "makefile", Makefile_targets, Makefile_filenames, NULL, NULL }, |
| 565 | { "pascal", Pascal_functions, NULL, Pascal_suffixes, NULL }, | 563 | { "pascal", Pascal_functions, NULL, Pascal_suffixes, NULL }, |
| 566 | { "perl", Perl_functions, NULL, Perl_suffixes, Perl_interpreters }, | 564 | { "perl", Perl_functions, NULL, Perl_suffixes, Perl_interpreters }, |
| 567 | { "postscript", Postscript_functions, NULL, Postscript_suffixes, NULL }, | 565 | { "postscript", Postscript_functions, NULL, Postscript_suffixes, NULL }, |
| 568 | { "proc", plain_C_entries, NULL, plain_C_suffixes, NULL }, | 566 | { "proc", plain_C_entries, NULL, plain_C_suffixes, NULL }, |
| 569 | { "prolog", Prolog_functions, NULL, Prolog_suffixes, NULL }, | 567 | { "prolog", Prolog_functions, NULL, Prolog_suffixes, NULL }, |
| @@ -1920,6 +1918,15 @@ total_size_of_entries (np) | |||
| 1920 | } | 1918 | } |
| 1921 | 1919 | ||
| 1922 | 1920 | ||
| 1921 | /* C extensions. */ | ||
| 1922 | #define C_EXT 0x00fff /* C extensions */ | ||
| 1923 | #define C_PLAIN 0x00000 /* C */ | ||
| 1924 | #define C_PLPL 0x00001 /* C++ */ | ||
| 1925 | #define C_STAR 0x00003 /* C* */ | ||
| 1926 | #define C_JAVA 0x00005 /* JAVA */ | ||
| 1927 | #define C_AUTO 0x01000 /* C, but switch to C++ if `class' is met */ | ||
| 1928 | #define YACC 0x10000 /* yacc file */ | ||
| 1929 | |||
| 1923 | /* | 1930 | /* |
| 1924 | * The C symbol tables. | 1931 | * The C symbol tables. |
| 1925 | */ | 1932 | */ |