]> code.delx.au - gnu-emacs/commitdiff
Clean up include guards.
authorDan Nicolaescu <dann@ics.uci.edu>
Thu, 8 Jul 2010 04:55:07 +0000 (21:55 -0700)
committerDan Nicolaescu <dann@ics.uci.edu>
Thu, 8 Jul 2010 04:55:07 +0000 (21:55 -0700)
* src/tparam.c: Remove include guards for config.h, string.h and code
that assumes #ifndef emacs.
* src/termcap.c:
* src/unexalpha.c:
* src/sysdep.c:
* src/filemode.c:
* src/filelock.c:
* src/bidi.c: Likewise.

src/ChangeLog
src/bidi.c
src/filelock.c
src/filemode.c
src/sysdep.c
src/termcap.c
src/tparam.c
src/unexalpha.c

index 415211558a5906a68d81f52492297be10571eead..cdbecfc5455bb585ab040efa5a7cff73fb83de19 100644 (file)
@@ -1,5 +1,15 @@
 2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
+       Clean up include guards.
+       * tparam.c: Remove include guards for config.h, string.h and code
+       that assumes #ifndef emacs.
+       * termcap.c:
+       * unexalpha.c:
+       * sysdep.c:
+       * filemode.c:
+       * filelock.c:
+       * bidi.c: Likewise.
+
        Remove prefix-args.c
        * prefix-args.c: Remove file.
        * autodeps.mk (ALLOBJS): Remove reference to prefix-args.
index d47fe9b7d3384ecb7da6a2c948a1b791d7120c06..e17676ea6d7a0b689a35fb07d498aa384ccbdf51 100644 (file)
@@ -49,16 +49,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    rule X9 and to its modifications decribed in the "Implementation
    Notes" section of UAX#9, under "Retaining Format Codes".  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <stdio.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
 #include <setjmp.h>
 
 #include "lisp.h"
index 769e5aa7a92745b9bb1886b4a3ef9bfa6135aa43..0ed236f8cc287c190514d725d7d930cdf3a75f7f 100644 (file)
@@ -34,9 +34,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
index c3a5a924a93c55fdf6a841236aaa8f3a23a37b2a..3048077ff52363393728156f27e7224243f34905 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
    USA.  */
 \f
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 
index ecdb7fcc21bfbe4ff7cad9c7893c4fdcc5d05ddf..daca9d125103b8229a503a2489ca3f48ebeba7ce 100644 (file)
@@ -18,10 +18,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <ctype.h>
 #include <signal.h>
 #include <stdio.h>
index fd8a666d0f23226b51981f9b24ee5720625e1c33..ea4ef244f641303879beb55c6c08bc9073f2e652 100644 (file)
@@ -18,12 +18,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 Boston, MA 02110-1301, USA.  */
 
 /* Emacs config.h may rename various library functions such as malloc.  */
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-#ifdef emacs
-
 #include <setjmp.h>
 #include <lisp.h>              /* xmalloc is here */
 /* Get the O_* definitions for open et al.  */
@@ -35,26 +30,6 @@ Boston, MA 02110-1301, USA.  */
 #include <unistd.h>
 #endif
 
-#else /* not emacs */
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
-#else
-char *getenv ();
-char *malloc ();
-char *realloc ();
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#endif /* not emacs */
-
 #ifndef NULL
 #define NULL (char *) 0
 #endif
@@ -84,37 +59,6 @@ int bufsize = 128;
 #define TERMCAP_FILE "/etc/termcap"
 #endif
 
-#ifndef emacs
-static void
-memory_out ()
-{
-  write (2, "virtual memory exhausted\n", 25);
-  exit (1);
-}
-
-static char *
-xmalloc (size)
-     unsigned size;
-{
-  register char *tem = malloc (size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-
-static char *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned size;
-{
-  register char *tem = realloc (ptr, size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-#endif /* not emacs */
 \f
 /* Looking up capabilities in the entry already found.  */
 
index c768581aeb5213132de3b49e2157b8931e01dca1..d8a8f0260f03ac0d8c20a079988c7728ed79e1ee 100644 (file)
@@ -18,61 +18,14 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 Boston, MA 02110-1301, USA.  */
 
 /* Emacs config.h may rename various library functions such as malloc.  */
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-#ifdef emacs
 #include <setjmp.h>
 #include "lisp.h"              /* for xmalloc */
-#else
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
-#else
-char *malloc ();
-char *realloc ();
-#endif
-
-#endif /* not emacs */
 
 #ifndef NULL
 #define NULL (char *) 0
 #endif
 \f
-#ifndef emacs
-static void
-memory_out ()
-{
-  write (2, "virtual memory exhausted\n", 25);
-  exit (1);
-}
-
-static char *
-xmalloc (size)
-     unsigned size;
-{
-  register char *tem = malloc (size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-
-static char *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned size;
-{
-  register char *tem = realloc (ptr, size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-#endif /* not emacs */
-\f
 /* Assuming STRING is the value of a termcap string entry
    containing `%' constructs to expand parameters,
    merge in parameter values and store result in block OUTSTRING points to.
index 982097a9318949a2e8faf66c9753199972a23854..d0faa179931c987c3b3900ebe7b851796416b1cf 100644 (file)
@@ -28,9 +28,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/mman.h>
 #include <stdio.h>
 #include <errno.h>
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 #if !defined (__NetBSD__) && !defined (__OpenBSD__)
 #include <filehdr.h>
 #include <aouthdr.h>