diff options
| author | Dan Nicolaescu | 2010-10-10 08:49:31 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-10-10 08:49:31 -0700 |
| commit | edfd76ce9129a09cc5c338254127514fd0aea4be (patch) | |
| tree | 6d0f26a0f5e8b81f7f35565ed06b6483ce0663e7 /src | |
| parent | a4daeecfef2bf5822f2b514b2878391b90edf741 (diff) | |
| download | emacs-edfd76ce9129a09cc5c338254127514fd0aea4be.tar.gz emacs-edfd76ce9129a09cc5c338254127514fd0aea4be.zip | |
Remove #ifdef emacs / #ifndef emacs code, unused.
* src/vm-limit.c:
* src/unexhp9k800.c:
* src/unexelf.c:
* src/unexaix.c:
* src/termcap.c: Remove #ifdef emacs / #ifndef emacs code, unused.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/termcap.c | 25 | ||||
| -rw-r--r-- | src/unexaix.c | 12 | ||||
| -rw-r--r-- | src/unexelf.c | 12 | ||||
| -rw-r--r-- | src/unexhp9k800.c | 5 | ||||
| -rw-r--r-- | src/vm-limit.c | 3 |
6 files changed, 7 insertions, 56 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2e0aeef2971..e2c92031659 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2010-10-10 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2010-10-10 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * vm-limit.c: | ||
| 4 | * unexhp9k800.c: | ||
| 5 | * unexelf.c: | ||
| 6 | * unexaix.c: | ||
| 7 | * termcap.c: Remove #ifdef emacs / #ifndef emacs code, unused. | ||
| 8 | |||
| 3 | * Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line. | 9 | * Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line. |
| 4 | (PROFILING_LDFLAGS): Remove, not needed anymore. | 10 | (PROFILING_LDFLAGS): Remove, not needed anymore. |
| 5 | 11 | ||
diff --git a/src/termcap.c b/src/termcap.c index 03476b15761..4ad0cee6264 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -262,45 +262,20 @@ tgetst1 (char *ptr, char **area) | |||
| 262 | 262 | ||
| 263 | /* Outputting a string with padding. */ | 263 | /* Outputting a string with padding. */ |
| 264 | 264 | ||
| 265 | #ifndef emacs | ||
| 266 | short ospeed; | ||
| 267 | /* If OSPEED is 0, we use this as the actual baud rate. */ | ||
| 268 | int tputs_baud_rate; | ||
| 269 | #endif | ||
| 270 | |||
| 271 | char PC; | 265 | char PC; |
| 272 | 266 | ||
| 273 | #ifndef emacs | ||
| 274 | /* Actual baud rate if positive; | ||
| 275 | - baud rate / 100 if negative. */ | ||
| 276 | |||
| 277 | static const int speeds[] = | ||
| 278 | { | ||
| 279 | 0, 50, 75, 110, 135, 150, -2, -3, -6, -12, | ||
| 280 | -18, -24, -48, -96, -192, -288, -384, -576, -1152 | ||
| 281 | }; | ||
| 282 | |||
| 283 | #endif /* not emacs */ | ||
| 284 | |||
| 285 | void | 267 | void |
| 286 | tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) | 268 | tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) |
| 287 | { | 269 | { |
| 288 | register int padcount = 0; | 270 | register int padcount = 0; |
| 289 | register int speed; | 271 | register int speed; |
| 290 | 272 | ||
| 291 | #ifdef emacs | ||
| 292 | extern EMACS_INT baud_rate; | 273 | extern EMACS_INT baud_rate; |
| 293 | speed = baud_rate; | 274 | speed = baud_rate; |
| 294 | /* For quite high speeds, convert to the smaller | 275 | /* For quite high speeds, convert to the smaller |
| 295 | units to avoid overflow. */ | 276 | units to avoid overflow. */ |
| 296 | if (speed > 10000) | 277 | if (speed > 10000) |
| 297 | speed = - speed / 100; | 278 | speed = - speed / 100; |
| 298 | #else | ||
| 299 | if (ospeed == 0) | ||
| 300 | speed = tputs_baud_rate; | ||
| 301 | else | ||
| 302 | speed = speeds[ospeed]; | ||
| 303 | #endif | ||
| 304 | 279 | ||
| 305 | if (!str) | 280 | if (!str) |
| 306 | return; | 281 | return; |
diff --git a/src/unexaix.c b/src/unexaix.c index 8365396b498..2d128bc6806 100644 --- a/src/unexaix.c +++ b/src/unexaix.c | |||
| @@ -40,13 +40,8 @@ what you give them. Help stamp out software-hoarding! */ | |||
| 40 | * | 40 | * |
| 41 | */ | 41 | */ |
| 42 | 42 | ||
| 43 | #ifndef emacs | ||
| 44 | #define PERROR(arg) perror (arg); return -1 | ||
| 45 | #else | ||
| 46 | #include <config.h> | 43 | #include <config.h> |
| 47 | #define PERROR(file) report_error (file, new) | 44 | #define PERROR(file) report_error (file, new) |
| 48 | #endif | ||
| 49 | |||
| 50 | #include <a.out.h> | 45 | #include <a.out.h> |
| 51 | /* Define getpagesize () if the system does not. | 46 | /* Define getpagesize () if the system does not. |
| 52 | Note that this may depend on symbols defined in a.out.h | 47 | Note that this may depend on symbols defined in a.out.h |
| @@ -92,7 +87,6 @@ static int adjust_lnnoptrs (int, int, char *); | |||
| 92 | 87 | ||
| 93 | static int pagemask; | 88 | static int pagemask; |
| 94 | 89 | ||
| 95 | #ifdef emacs | ||
| 96 | #include <setjmp.h> | 90 | #include <setjmp.h> |
| 97 | #include "lisp.h" | 91 | #include "lisp.h" |
| 98 | 92 | ||
| @@ -103,7 +97,6 @@ report_error (char *file, int fd) | |||
| 103 | close (fd); | 97 | close (fd); |
| 104 | report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); | 98 | report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); |
| 105 | } | 99 | } |
| 106 | #endif /* emacs */ | ||
| 107 | 100 | ||
| 108 | #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 | 101 | #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 |
| 109 | #define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1 | 102 | #define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1 |
| @@ -113,12 +106,7 @@ static void | |||
| 113 | report_error_1 (int fd, char *msg, int a1, int a2) | 106 | report_error_1 (int fd, char *msg, int a1, int a2) |
| 114 | { | 107 | { |
| 115 | close (fd); | 108 | close (fd); |
| 116 | #ifdef emacs | ||
| 117 | error (msg, a1, a2); | 109 | error (msg, a1, a2); |
| 118 | #else | ||
| 119 | fprintf (stderr, msg, a1, a2); | ||
| 120 | fprintf (stderr, "\n"); | ||
| 121 | #endif | ||
| 122 | } | 110 | } |
| 123 | 111 | ||
| 124 | static int make_hdr (int, int, unsigned, unsigned, unsigned, char *, char *); | 112 | static int make_hdr (int, int, unsigned, unsigned, unsigned, char *, char *); |
diff --git a/src/unexelf.c b/src/unexelf.c index e4d26b310ff..605b9f75ac0 100644 --- a/src/unexelf.c +++ b/src/unexelf.c | |||
| @@ -386,13 +386,8 @@ temacs: | |||
| 386 | /* We do not use mmap because that fails with NFS. | 386 | /* We do not use mmap because that fails with NFS. |
| 387 | Instead we read the whole file, modify it, and write it out. */ | 387 | Instead we read the whole file, modify it, and write it out. */ |
| 388 | 388 | ||
| 389 | #ifndef emacs | ||
| 390 | #define fatal(a, b, c) fprintf (stderr, a, b, c), exit (1) | ||
| 391 | #include <string.h> | ||
| 392 | #else | ||
| 393 | #include <config.h> | 389 | #include <config.h> |
| 394 | extern void fatal (const char *msgid, ...); | 390 | extern void fatal (const char *msgid, ...); |
| 395 | #endif | ||
| 396 | 391 | ||
| 397 | #include <sys/types.h> | 392 | #include <sys/types.h> |
| 398 | #include <stdio.h> | 393 | #include <stdio.h> |
| @@ -403,7 +398,7 @@ extern void fatal (const char *msgid, ...); | |||
| 403 | #include <fcntl.h> | 398 | #include <fcntl.h> |
| 404 | #if !defined (__NetBSD__) && !defined (__OpenBSD__) | 399 | #if !defined (__NetBSD__) && !defined (__OpenBSD__) |
| 405 | #include <elf.h> | 400 | #include <elf.h> |
| 406 | #endif | 401 | #endif /* not __NetBSD__ and not __OpenBSD__ */ |
| 407 | #include <sys/mman.h> | 402 | #include <sys/mman.h> |
| 408 | #if defined (_SYSTYPE_SYSV) | 403 | #if defined (_SYSTYPE_SYSV) |
| 409 | #include <sys/elf_mips.h> | 404 | #include <sys/elf_mips.h> |
| @@ -1287,13 +1282,8 @@ temacs: | |||
| 1287 | /* Write out new_file, and free the buffers. */ | 1282 | /* Write out new_file, and free the buffers. */ |
| 1288 | 1283 | ||
| 1289 | if (write (new_file, new_base, new_file_size) != new_file_size) | 1284 | if (write (new_file, new_base, new_file_size) != new_file_size) |
| 1290 | #ifndef emacs | ||
| 1291 | fatal ("Didn't write %d bytes: errno %d\n", | ||
| 1292 | new_file_size, errno); | ||
| 1293 | #else | ||
| 1294 | fatal ("Didn't write %d bytes to %s: errno %d\n", | 1285 | fatal ("Didn't write %d bytes to %s: errno %d\n", |
| 1295 | new_file_size, new_name, errno); | 1286 | new_file_size, new_name, errno); |
| 1296 | #endif | ||
| 1297 | munmap (old_base, old_file_size); | 1287 | munmap (old_base, old_file_size); |
| 1298 | munmap (new_base, new_file_size); | 1288 | munmap (new_base, new_file_size); |
| 1299 | 1289 | ||
diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index b410092b1cc..b9edd4f3a84 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c | |||
| @@ -49,16 +49,11 @@ | |||
| 49 | sigsetreturn (_sigreturn); | 49 | sigsetreturn (_sigreturn); |
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | #ifdef emacs | ||
| 53 | #include <config.h> | 52 | #include <config.h> |
| 54 | #endif | ||
| 55 | |||
| 56 | #include <stdio.h> | 53 | #include <stdio.h> |
| 57 | #include <fcntl.h> | 54 | #include <fcntl.h> |
| 58 | #include <errno.h> | 55 | #include <errno.h> |
| 59 | |||
| 60 | #include <a.out.h> | 56 | #include <a.out.h> |
| 61 | |||
| 62 | #include <dl.h> | 57 | #include <dl.h> |
| 63 | 58 | ||
| 64 | /* brk value to restore, stored as a global. | 59 | /* brk value to restore, stored as a global. |
diff --git a/src/vm-limit.c b/src/vm-limit.c index 63f0f47e2d0..813ee6163c9 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c | |||
| @@ -17,12 +17,9 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | #ifdef emacs | ||
| 21 | #include <config.h> | 20 | #include <config.h> |
| 22 | #include <setjmp.h> | 21 | #include <setjmp.h> |
| 23 | #include "lisp.h" | 22 | #include "lisp.h" |
| 24 | #endif | ||
| 25 | |||
| 26 | #include "mem-limits.h" | 23 | #include "mem-limits.h" |
| 27 | 24 | ||
| 28 | /* | 25 | /* |