[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4d77c4a: Assume ‘emacs’ is defined in Emacs-only c
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 4d77c4a: Assume ‘emacs’ is defined in Emacs-only code |
Date: |
Mon, 17 Dec 2018 12:31:58 -0500 (EST) |
branch: master
commit 4d77c4ac3b9c40c62b1505bcaa1e0377d63a4956
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Assume ‘emacs’ is defined in Emacs-only code
* src/charset.c, src/coding.c, src/coding.h, src/gmalloc.c:
* src/ralloc.c, src/regex-emacs.c: Simplify slightly by
assuming that ‘emacs’ is defined. These modules have long
been specific to Emacs, and are not used elsewhere.
---
src/charset.c | 4 ----
src/coding.c | 10 ----------
src/coding.h | 5 -----
src/gmalloc.c | 8 +-------
src/ralloc.c | 12 ++++--------
src/regex-emacs.c | 5 -----
6 files changed, 5 insertions(+), 39 deletions(-)
diff --git a/src/charset.c b/src/charset.c
index 83f4de7..8508b80 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -2328,8 +2328,6 @@ init_charset_once (void)
charset_ksc5601 = -1;
}
-#ifdef emacs
-
/* Allocate an initial charset table that is large enough to handle
Emacs while it is bootstrapping. As of September 2011, the size
needs to be at least 166; make it a bit bigger to allow for future
@@ -2430,5 +2428,3 @@ the value may be a list of mnemonics. */);
MAX_5_BYTE_CHAR + 1);
charset_unibyte = charset_iso_8859_1;
}
-
-#endif /* emacs */
diff --git a/src/coding.c b/src/coding.c
index c294570..ba06087 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -307,16 +307,12 @@ Lisp_Object Vcoding_system_hash_table;
file and process), not for in-buffer or Lisp string encoding. */
static Lisp_Object system_eol_type;
-#ifdef emacs
-
/* Coding-systems are handed between Emacs Lisp programs and C internal
routines by the following three variables. */
/* Coding system to be used to encode text for terminal display when
terminal coding system is nil. */
struct coding_system safe_terminal_coding;
-#endif /* emacs */
-
/* Two special coding systems. */
static Lisp_Object Vsjis_coding_system;
static Lisp_Object Vbig5_coding_system;
@@ -8478,7 +8474,6 @@ to_unicode (Lisp_Object str, Lisp_Object *buf)
#endif /* WINDOWSNT || CYGWIN */
-#ifdef emacs
/*** 8. Emacs Lisp library functions ***/
DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0,
@@ -10732,8 +10727,6 @@ coding system whose eol-type is N. */)
return make_fixnum (n);
}
-#endif /* emacs */
-
/*** 9. Post-amble ***/
@@ -10777,8 +10770,6 @@ init_coding_once (void)
emacs_mule_bytes[EMACS_MULE_LEADING_CODE_PRIVATE_22] = 4;
}
-#ifdef emacs
-
void
syms_of_coding (void)
{
@@ -11321,4 +11312,3 @@ internal character representation. */);
#endif
staticpro (&system_eol_type);
}
-#endif /* emacs */
diff --git a/src/coding.h b/src/coding.h
index d2cf4d8..e984375 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -762,15 +762,10 @@ surrogates_to_codepoint (int low, int high)
extern Lisp_Object preferred_coding_system (void);
-
-#ifdef emacs
-
/* Coding system to be used to encode text for terminal display when
terminal coding system is nil. */
extern struct coding_system safe_terminal_coding;
-#endif
-
extern char emacs_mule_bytes[256];
INLINE_HEADER_END
diff --git a/src/gmalloc.c b/src/gmalloc.c
index ebba789..c07ead7 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -36,9 +36,7 @@ License along with this library. If not, see
<https://www.gnu.org/licenses/>.
#include <pthread.h>
#endif
-#ifdef emacs
-# include "lisp.h"
-#endif
+#include "lisp.h"
#include "ptr-bounds.h"
@@ -2022,11 +2020,7 @@ mabort (enum mcheck_status status)
#else
fprintf (stderr, "mcheck: %s\n", msg);
fflush (stderr);
-# ifdef emacs
emacs_abort ();
-# else
- abort ();
-# endif
#endif
}
diff --git a/src/ralloc.c b/src/ralloc.c
index 046d550..4dc9fe3 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -26,11 +26,9 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include <stddef.h>
-#ifdef emacs
-# include "lisp.h"
-# include "blockinput.h"
-# include <unistd.h>
-#endif
+#include "lisp.h"
+#include "blockinput.h"
+#include <unistd.h>
#include "getpagesize.h"
@@ -924,9 +922,7 @@ r_alloc_free (void **ptr)
free_bloc (dead_bloc);
*ptr = 0;
-#ifdef emacs
refill_memory_reserve ();
-#endif
}
/* Given a pointer at address PTR to relocatable data, resize it to SIZE.
@@ -1000,7 +996,7 @@ r_re_alloc (void **ptr, size_t size)
}
-#if defined (emacs) && defined (DOUG_LEA_MALLOC)
+#ifdef DOUG_LEA_MALLOC
/* Reinitialize the morecore hook variables after restarting a dumped
Emacs. This is needed when using Doug Lea's malloc from GNU libc. */
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index d19838a..5cb7bba 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -698,7 +698,6 @@ print_partial_compiled_pattern (re_char *start, re_char
*end)
fprintf (stderr, "/%d", mcnt);
break;
-# ifdef emacs
case at_dot:
fprintf (stderr, "/at_dot");
break;
@@ -714,7 +713,6 @@ print_partial_compiled_pattern (re_char *start, re_char
*end)
mcnt = *p++;
fprintf (stderr, "/%d", mcnt);
break;
-# endif /* emacs */
case begbuf:
fprintf (stderr, "/begbuf");
@@ -753,9 +751,6 @@ print_compiled_pattern (struct re_pattern_buffer *bufp)
printf ("re_nsub: %zu\t", bufp->re_nsub);
printf ("regs_alloc: %d\t", bufp->regs_allocated);
printf ("can_be_null: %d\t", bufp->can_be_null);
-#ifndef emacs
- printf ("syntax: %lx\n", bufp->syntax);
-#endif
fflush (stdout);
/* Perhaps we should print the translate table? */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4d77c4a: Assume ‘emacs’ is defined in Emacs-only code,
Paul Eggert <=