aboutsummaryrefslogtreecommitdiffstats
path: root/src/termcap.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-07 21:55:07 -0700
committerDan Nicolaescu2010-07-07 21:55:07 -0700
commit295d0d8f2008cbd2deb200fc6ecb30d19847f725 (patch)
treeb5ce54b485bc65a9e4ae0529353da47fed956ebc /src/termcap.c
parent49d9e6b07bc34acf755ded0fc255e974a37f9189 (diff)
downloademacs-295d0d8f2008cbd2deb200fc6ecb30d19847f725.tar.gz
emacs-295d0d8f2008cbd2deb200fc6ecb30d19847f725.zip
Clean up include guards.
* 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.
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/termcap.c b/src/termcap.c
index fd8a666d0f2..ea4ef244f64 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -18,12 +18,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18Boston, MA 02110-1301, USA. */ 18Boston, MA 02110-1301, USA. */
19 19
20/* Emacs config.h may rename various library functions such as malloc. */ 20/* Emacs config.h may rename various library functions such as malloc. */
21#ifdef HAVE_CONFIG_H
22#include <config.h> 21#include <config.h>
23#endif
24
25#ifdef emacs
26
27#include <setjmp.h> 22#include <setjmp.h>
28#include <lisp.h> /* xmalloc is here */ 23#include <lisp.h> /* xmalloc is here */
29/* Get the O_* definitions for open et al. */ 24/* Get the O_* definitions for open et al. */
@@ -35,26 +30,6 @@ Boston, MA 02110-1301, USA. */
35#include <unistd.h> 30#include <unistd.h>
36#endif 31#endif
37 32
38#else /* not emacs */
39
40#ifdef STDC_HEADERS
41#include <stdlib.h>
42#include <string.h>
43#else
44char *getenv ();
45char *malloc ();
46char *realloc ();
47#endif
48
49#ifdef HAVE_UNISTD_H
50#include <unistd.h>
51#endif
52#ifdef HAVE_FCNTL_H
53#include <fcntl.h>
54#endif
55
56#endif /* not emacs */
57
58#ifndef NULL 33#ifndef NULL
59#define NULL (char *) 0 34#define NULL (char *) 0
60#endif 35#endif
@@ -84,37 +59,6 @@ int bufsize = 128;
84#define TERMCAP_FILE "/etc/termcap" 59#define TERMCAP_FILE "/etc/termcap"
85#endif 60#endif
86 61
87#ifndef emacs
88static void
89memory_out ()
90{
91 write (2, "virtual memory exhausted\n", 25);
92 exit (1);
93}
94
95static char *
96xmalloc (size)
97 unsigned size;
98{
99 register char *tem = malloc (size);
100
101 if (!tem)
102 memory_out ();
103 return tem;
104}
105
106static char *
107xrealloc (ptr, size)
108 char *ptr;
109 unsigned size;
110{
111 register char *tem = realloc (ptr, size);
112
113 if (!tem)
114 memory_out ();
115 return tem;
116}
117#endif /* not emacs */
118 62
119/* Looking up capabilities in the entry already found. */ 63/* Looking up capabilities in the entry already found. */
120 64