aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog10
-rw-r--r--src/bidi.c7
-rw-r--r--src/filelock.c2
-rw-r--r--src/filemode.c3
-rw-r--r--src/sysdep.c3
-rw-r--r--src/termcap.c56
-rw-r--r--src/tparam.c47
-rw-r--r--src/unexalpha.c2
8 files changed, 10 insertions, 120 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 415211558a5..cdbecfc5455 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12010-07-08 Dan Nicolaescu <dann@ics.uci.edu> 12010-07-08 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 Clean up include guards.
4 * tparam.c: Remove include guards for config.h, string.h and code
5 that assumes #ifndef emacs.
6 * termcap.c:
7 * unexalpha.c:
8 * sysdep.c:
9 * filemode.c:
10 * filelock.c:
11 * bidi.c: Likewise.
12
3 Remove prefix-args.c 13 Remove prefix-args.c
4 * prefix-args.c: Remove file. 14 * prefix-args.c: Remove file.
5 * autodeps.mk (ALLOBJS): Remove reference to prefix-args. 15 * autodeps.mk (ALLOBJS): Remove reference to prefix-args.
diff --git a/src/bidi.c b/src/bidi.c
index d47fe9b7d33..e17676ea6d7 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -49,16 +49,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
49 rule X9 and to its modifications decribed in the "Implementation 49 rule X9 and to its modifications decribed in the "Implementation
50 Notes" section of UAX#9, under "Retaining Format Codes". */ 50 Notes" section of UAX#9, under "Retaining Format Codes". */
51 51
52#ifdef HAVE_CONFIG_H
53#include <config.h> 52#include <config.h>
54#endif
55
56#include <stdio.h> 53#include <stdio.h>
57
58#ifdef HAVE_STRING_H
59#include <string.h> 54#include <string.h>
60#endif
61
62#include <setjmp.h> 55#include <setjmp.h>
63 56
64#include "lisp.h" 57#include "lisp.h"
diff --git a/src/filelock.c b/src/filelock.c
index 769e5aa7a92..0ed236f8cc2 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -34,9 +34,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#ifdef HAVE_FCNTL_H 34#ifdef HAVE_FCNTL_H
35#include <fcntl.h> 35#include <fcntl.h>
36#endif 36#endif
37#ifdef HAVE_STRING_H
38#include <string.h> 37#include <string.h>
39#endif
40 38
41#ifdef HAVE_UNISTD_H 39#ifdef HAVE_UNISTD_H
42#include <unistd.h> 40#include <unistd.h>
diff --git a/src/filemode.c b/src/filemode.c
index c3a5a924a93..3048077ff52 100644
--- a/src/filemode.c
+++ b/src/filemode.c
@@ -17,10 +17,7 @@
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18 USA. */ 18 USA. */
19 19
20#ifdef HAVE_CONFIG_H
21#include <config.h> 20#include <config.h>
22#endif
23
24#include <sys/types.h> 21#include <sys/types.h>
25#include <sys/stat.h> 22#include <sys/stat.h>
26 23
diff --git a/src/sysdep.c b/src/sysdep.c
index ecdb7fcc21b..daca9d12510 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -18,10 +18,7 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#ifdef HAVE_CONFIG_H
22#include <config.h> 21#include <config.h>
23#endif
24
25#include <ctype.h> 22#include <ctype.h>
26#include <signal.h> 23#include <signal.h>
27#include <stdio.h> 24#include <stdio.h>
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
diff --git a/src/tparam.c b/src/tparam.c
index c768581aeb5..d8a8f0260f0 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -18,61 +18,14 @@ 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#include <setjmp.h> 22#include <setjmp.h>
27#include "lisp.h" /* for xmalloc */ 23#include "lisp.h" /* for xmalloc */
28#else
29
30#ifdef STDC_HEADERS
31#include <stdlib.h>
32#include <string.h>
33#else
34char *malloc ();
35char *realloc ();
36#endif
37
38#endif /* not emacs */
39 24
40#ifndef NULL 25#ifndef NULL
41#define NULL (char *) 0 26#define NULL (char *) 0
42#endif 27#endif
43 28
44#ifndef emacs
45static void
46memory_out ()
47{
48 write (2, "virtual memory exhausted\n", 25);
49 exit (1);
50}
51
52static char *
53xmalloc (size)
54 unsigned size;
55{
56 register char *tem = malloc (size);
57
58 if (!tem)
59 memory_out ();
60 return tem;
61}
62
63static char *
64xrealloc (ptr, size)
65 char *ptr;
66 unsigned size;
67{
68 register char *tem = realloc (ptr, size);
69
70 if (!tem)
71 memory_out ();
72 return tem;
73}
74#endif /* not emacs */
75
76/* Assuming STRING is the value of a termcap string entry 29/* Assuming STRING is the value of a termcap string entry
77 containing `%' constructs to expand parameters, 30 containing `%' constructs to expand parameters,
78 merge in parameter values and store result in block OUTSTRING points to. 31 merge in parameter values and store result in block OUTSTRING points to.
diff --git a/src/unexalpha.c b/src/unexalpha.c
index 982097a9318..d0faa179931 100644
--- a/src/unexalpha.c
+++ b/src/unexalpha.c
@@ -28,9 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28#include <sys/mman.h> 28#include <sys/mman.h>
29#include <stdio.h> 29#include <stdio.h>
30#include <errno.h> 30#include <errno.h>
31#ifdef HAVE_STRING_H
32#include <string.h> 31#include <string.h>
33#endif
34#if !defined (__NetBSD__) && !defined (__OpenBSD__) 32#if !defined (__NetBSD__) && !defined (__OpenBSD__)
35#include <filehdr.h> 33#include <filehdr.h>
36#include <aouthdr.h> 34#include <aouthdr.h>