changeset 35740:9a7c0217c7bd

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.
author Francesco Potortì <pot@gnu.org>
date Tue, 30 Jan 2001 17:22:09 +0000
parents a91f15824245
children e0acf4b43873
files lib-src/ChangeLog lib-src/etags.c
diffstat 2 files changed, 38 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Tue Jan 30 15:18:45 2001 +0000
+++ b/lib-src/ChangeLog	Tue Jan 30 17:22:09 2001 +0000
@@ -1,3 +1,15 @@
+2001-01-30  Francesco Potorti`  <pot@gnu.org>
+
+	* etags.c: [WIN32-NATIVE]: #undef MSDOS, #undef WINDOWSNT and
+	#define it for the sake of Xemacs.
+	[WINDOWSNT]: #undef HAVE_NTGUI even if built without
+	HAVE_CONFIG_H.  This change only affects a standalone etags.
+	[WINDOWSNT]: #undef DOS_NT and #define it even if built with
+	HAVE_CONFIG_H.  This change does nothing in Emacs, as DOS_NT is
+	always defined when HAVE_CONFIG_H and WINDOWS are both defined.
+	[!HAVE_UNISTD_H]: use defined(WINDOWSNT) instead of the bare
+	WINDOWSNT, as this is the correct way to use it.
+
 2001-01-28  Francesco Potorti`  <pot@gnu.org>
 
 	* etags.c: Be capable to parse nested struct-like structures.
--- a/lib-src/etags.c	Tue Jan 30 15:18:45 2001 +0000
+++ b/lib-src/etags.c	Tue Jan 30 17:22:09 2001 +0000
@@ -24,7 +24,7 @@
  *	Fortran added by Jim Kleckner.
  *	Ed Pelegri-Llopart added C typedefs.
  *	Gnu Emacs TAGS format and modifications by RMS?
- * 199x	Sam Kendall added C++.
+ * 1989	Sam Kendall added C++.
  * 1993	Francesco Potort́ reorganised C and C++ based on work by Joe Wells.
  * 1994	Regexp tags by Tom Tromey.
  * 2001 Nested classes by Francesco Potort́ based on work by Mykola Dzyuba.
@@ -32,7 +32,7 @@
  *	Francesco Potort́ <pot@gnu.org> has maintained it since 1993.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 14.11";
+char pot_etags_version[] = "@(#) pot revision number is 14.13";
 
 #define	TRUE	1
 #define	FALSE	0
@@ -64,6 +64,14 @@
 # define _GNU_SOURCE 1		/* enables some compiler checks on GNU */
 #endif
 
+/* WIN32_NATIVE is for Xemacs.
+   MSDOS, WINDOWSNT, DOS_NT are for Emacs. */
+#ifdef WIN32_NATIVE
+# undef MSDOS
+# undef  WINDOWSNT
+# define WINDOWSNT
+#endif /* WIN32_NATIVE */
+
 #ifdef MSDOS
 # undef MSDOS
 # define MSDOS TRUE
@@ -85,11 +93,9 @@
 # include <direct.h>
 # include <io.h>
 # define MAXPATHLEN _MAX_PATH
-# ifdef HAVE_CONFIG_H
-#   undef HAVE_NTGUI
-# else
-#   define DOS_NT
-# endif /* not HAVE_CONFIG_H */
+# undef HAVE_NTGUI
+# undef  DOS_NT
+# define DOS_NT
 # ifndef HAVE_GETCWD
 #   define HAVE_GETCWD
 # endif /* undef HAVE_GETCWD */
@@ -105,7 +111,7 @@
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #else
-# if defined (HAVE_GETCWD) && !WINDOWSNT
+# if defined (HAVE_GETCWD) && !defined (WINDOWSNT)
     extern char *getcwd (char *buf, size_t size);
 # endif
 #endif /* HAVE_UNISTD_H */
@@ -155,15 +161,6 @@
 # define	BAD	1
 #endif
 
-/* C extensions. */
-#define C_EXT	0x00fff		/* C extensions */
-#define C_PLAIN 0x00000		/* C */
-#define C_PLPL	0x00001		/* C++ */
-#define C_STAR	0x00003		/* C* */
-#define C_JAVA	0x00005		/* JAVA */
-#define C_AUTO  0x01000		/* C, switch to C++ if `class' is met */
-#define YACC	0x10000		/* yacc file */
-
 #define streq(s,t)	(assert((s)!=NULL || (t)!=NULL), !strcmp (s, t))
 #define strneq(s,t,n)	(assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n))
 
@@ -475,7 +472,8 @@
 			};
 
 /* Note that .c and .h can be considered C++, if the --c++ flag was
-   given.  That is why default_C_entries is called here. */
+   given, or if the `class' keyowrd is met inside the file.
+   That is why default_C_entries is called for these. */
 char *default_C_suffixes [] =
   { "c", "h", NULL };
 
@@ -563,7 +561,7 @@
   { "lisp",    	  Lisp_functions,      	NULL, Lisp_suffixes,       	NULL },
   { "makefile",   Makefile_targets,     Makefile_filenames, NULL,     	NULL },
   { "pascal",  	  Pascal_functions,    	NULL, Pascal_suffixes,     	NULL },
-  { "perl",    	  Perl_functions,       NULL, Perl_suffixes, Perl_interpreters },
+  { "perl",    	  Perl_functions,     NULL, Perl_suffixes, Perl_interpreters },
   { "postscript", Postscript_functions, NULL, Postscript_suffixes, 	NULL },
   { "proc",    	  plain_C_entries,     	NULL, plain_C_suffixes,    	NULL },
   { "prolog",  	  Prolog_functions,    	NULL, Prolog_suffixes,     	NULL },
@@ -1920,6 +1918,15 @@
 }
 
 
+/* C extensions. */
+#define C_EXT	0x00fff		/* C extensions */
+#define C_PLAIN 0x00000		/* C */
+#define C_PLPL	0x00001		/* C++ */
+#define C_STAR	0x00003		/* C* */
+#define C_JAVA	0x00005		/* JAVA */
+#define C_AUTO  0x01000		/* C, but switch to C++ if `class' is met */
+#define YACC	0x10000		/* yacc file */
+
 /*
  * The C symbol tables.
  */