summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-09-20 08:34:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-09-20 08:34:36 -0700
commit00382e8b9834e58203507d0461884671b78ebc01 (patch)
treecf28670199af0c1189cbcfbd14ffa49cbaaa0fba
parent2fd3a9f7491a59d427150fab0ad4df6ea12b3249 (diff)
downloademacs-00382e8b9834e58203507d0461884671b78ebc01.tar.gz
A simpler, centralized INLINE.
* lib-src/profile.c (INLINE): New macro. (SYSTIME_INLINE): Remove. * src/conf_post.h (INLINE): Define only if not already defined. This allows us to use a single INLINE, defined by one file per executable. * src/emacs.c (INLINE): Define it. Also, include category.h, charset.h, composite.h, dispextern.h, syntax.h, systime.h, so that their INLINE definitions are expanded properly for Emacs. * src/blockinput.h, src/keyboard.c (BLOCKINPUT_INLINE): * src/buffer.h, src/buffer.c (BUFFER_INLINE): * src/category.h, src/category.c (CATEGORY_INLINE): * src/character.h, src/character.c (CHARACTER_INLINE): * src/charset.h, src/charset.c (CHARSET_INLINE): * src/composite.h, src/composite.c (COMPOSITE_INLINE): * src/dispextern.h, src/dispnew.c (DISPEXTERN_INLINE): * src/frame.h, src/frame.c (FRAME_INLINE): * src/intervals.h, src/intervals.c (INTERVALS_INLINE): * src/keyboard.h, src/keyboard.c (KEYBOARD_INLINE): * src/lisp.h, src/alloc.c (LISP_INLINE): * src/process.h, src/process.c (PROCESS_INLINE): * src/syntax.h, src/syntax.c (SYNTAX_INLINE): * src/systime.h, src/sysdep.c (SYSTIME_INLINE): * src/termhooks.h, src/terminal.h (TERMHOOKS_INLINE): * src/window.h, src/window.c (WINDOW_INLINE): Remove. All uses replaced with INLINE.
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/profile.c4
-rw-r--r--src/ChangeLog28
-rw-r--r--src/alloc.c2
-rw-r--r--src/blockinput.h7
-rw-r--r--src/buffer.c2
-rw-r--r--src/buffer.h75
-rw-r--r--src/category.c2
-rw-r--r--src/category.h5
-rw-r--r--src/character.c2
-rw-r--r--src/character.h7
-rw-r--r--src/charset.c2
-rw-r--r--src/charset.h5
-rw-r--r--src/composite.c2
-rw-r--r--src/composite.h11
-rw-r--r--src/conf_post.h18
-rw-r--r--src/dispextern.h19
-rw-r--r--src/dispnew.c2
-rw-r--r--src/emacs.c9
-rw-r--r--src/frame.c2
-rw-r--r--src/frame.h51
-rw-r--r--src/intervals.c2
-rw-r--r--src/intervals.h7
-rw-r--r--src/keyboard.c3
-rw-r--r--src/keyboard.h19
-rw-r--r--src/lisp.h365
-rw-r--r--src/process.c2
-rw-r--r--src/process.h7
-rw-r--r--src/syntax.c2
-rw-r--r--src/syntax.h19
-rw-r--r--src/sysdep.c2
-rw-r--r--src/systime.h9
-rw-r--r--src/termhooks.h7
-rw-r--r--src/terminal.c2
-rw-r--r--src/window.c2
-rw-r--r--src/window.h19
36 files changed, 345 insertions, 383 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index d2e9dd18177..1186a0c025c 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ A simpler, centralized INLINE.
+ * profile.c (INLINE): New macro.
+ (SYSTIME_INLINE): Remove.
+
2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
diff --git a/lib-src/profile.c b/lib-src/profile.c
index bddfea76334..aab44a0fe86 100644
--- a/lib-src/profile.c
+++ b/lib-src/profile.c
@@ -29,9 +29,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
** abstraction : a stopwatch
** operations: reset_watch, get_time
*/
-#include <config.h>
-#define SYSTIME_INLINE EXTERN_INLINE
+#define INLINE EXTERN_INLINE
+#include <config.h>
#include <inttypes.h>
#include <stdio.h>
diff --git a/src/ChangeLog b/src/ChangeLog
index bf6fcc3c870..5cce3ad3056 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,31 @@
+2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ A simpler, centralized INLINE.
+ * conf_post.h (INLINE): Define only if not already defined.
+ This allows us to use a single INLINE, defined by one file
+ per executable.
+ * emacs.c (INLINE): Define it.
+ Also, include category.h, charset.h, composite.h, dispextern.h,
+ syntax.h, systime.h, so that their INLINE definitions are expanded
+ properly for Emacs.
+ * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
+ * buffer.h, buffer.c (BUFFER_INLINE):
+ * category.h, category.c (CATEGORY_INLINE):
+ * character.h, character.c (CHARACTER_INLINE):
+ * charset.h, charset.c (CHARSET_INLINE):
+ * composite.h, composite.c (COMPOSITE_INLINE):
+ * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
+ * frame.h, frame.c (FRAME_INLINE):
+ * intervals.h, intervals.c (INTERVALS_INLINE):
+ * keyboard.h, keyboard.c (KEYBOARD_INLINE):
+ * lisp.h, alloc.c (LISP_INLINE):
+ * process.h, process.c (PROCESS_INLINE):
+ * syntax.h, syntax.c (SYNTAX_INLINE):
+ * systime.h, sysdep.c (SYSTIME_INLINE):
+ * termhooks.h, terminal.h (TERMHOOKS_INLINE):
+ * window.h, window.c (WINDOW_INLINE):
+ Remove. All uses replaced with INLINE.
+
2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
* xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
diff --git a/src/alloc.c b/src/alloc.c
index 0989e63664f..de73ce9bae0 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define LISP_INLINE EXTERN_INLINE
-
#include <stdio.h>
#include <limits.h> /* For CHAR_BIT. */
diff --git a/src/blockinput.h b/src/blockinput.h
index 6dc22c6f5dd..8f1b1e18985 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -20,9 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define EMACS_BLOCKINPUT_H
INLINE_HEADER_BEGIN
-#ifndef BLOCKINPUT_INLINE
-# define BLOCKINPUT_INLINE INLINE
-#endif
/* Emacs should avoid doing anything hairy in a signal handler, because
so many system functions are non-reentrant. For example, malloc
@@ -52,7 +49,7 @@ extern volatile int interrupt_input_blocked;
/* Begin critical section. */
-BLOCKINPUT_INLINE void
+INLINE void
block_input (void)
{
interrupt_input_blocked++;
@@ -64,7 +61,7 @@ extern void unblock_input_to (int);
/* In critical section ? */
-BLOCKINPUT_INLINE bool
+INLINE bool
input_blocked_p (void)
{
return interrupt_input_blocked > 0;
diff --git a/src/buffer.c b/src/buffer.c
index 3d7468904f2..815f3926c55 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define BUFFER_INLINE EXTERN_INLINE
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
diff --git a/src/buffer.h b/src/buffer.h
index 169a15c7d0f..a36c0d13c9e 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -22,9 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <time.h>
INLINE_HEADER_BEGIN
-#ifndef BUFFER_INLINE
-# define BUFFER_INLINE INLINE
-#endif
/* Accessing the parameters of the current buffer. */
@@ -875,97 +872,97 @@ struct buffer
/* Most code should use these functions to set Lisp fields in struct
buffer. */
-BUFFER_INLINE void
+INLINE void
bset_bidi_paragraph_direction (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (bidi_paragraph_direction) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_case_canon_table (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (case_canon_table) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_case_eqv_table (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (case_eqv_table) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_directory (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (directory) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_display_count (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (display_count) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_display_time (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (display_time) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_downcase_table (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (downcase_table) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_enable_multibyte_characters (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (enable_multibyte_characters) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_filename (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (filename) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_keymap (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (keymap) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_last_selected_window (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (last_selected_window) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_local_var_alist (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (local_var_alist) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_mark_active (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (mark_active) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_point_before_scroll (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (point_before_scroll) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_read_only (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (read_only) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_truncate_lines (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (truncate_lines) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_undo_list (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (undo_list) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_upcase_table (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (upcase_table) = val;
}
-BUFFER_INLINE void
+INLINE void
bset_width_table (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (width_table) = val;
@@ -1089,7 +1086,7 @@ extern void set_buffer_if_live (Lisp_Object);
windows than the selected one requires a select_window at some
time, and that increments windows_or_buffers_changed. */
-BUFFER_INLINE void
+INLINE void
set_buffer_internal (struct buffer *b)
{
if (current_buffer != b)
@@ -1099,7 +1096,7 @@ set_buffer_internal (struct buffer *b)
/* Arrange to go back to the original buffer after the next
call to unbind_to if the original buffer is still alive. */
-BUFFER_INLINE void
+INLINE void
record_unwind_current_buffer (void)
{
record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
@@ -1138,7 +1135,7 @@ extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
/* Get text properties of B. */
-BUFFER_INLINE INTERVAL
+INLINE INTERVAL
buffer_intervals (struct buffer *b)
{
eassert (b->text != NULL);
@@ -1147,7 +1144,7 @@ buffer_intervals (struct buffer *b)
/* Set text properties of B to I. */
-BUFFER_INLINE void
+INLINE void
set_buffer_intervals (struct buffer *b, INTERVAL i)
{
eassert (b->text != NULL);
@@ -1156,7 +1153,7 @@ set_buffer_intervals (struct buffer *b, INTERVAL i)
/* Non-zero if current buffer has overlays. */
-BUFFER_INLINE bool
+INLINE bool
buffer_has_overlays (void)
{
return current_buffer->overlays_before || current_buffer->overlays_after;
@@ -1176,7 +1173,7 @@ buffer_has_overlays (void)
the buffer to the next character after fetching this one. Instead,
use either FETCH_CHAR_ADVANCE or STRING_CHAR_AND_LENGTH. */
-BUFFER_INLINE int
+INLINE int
FETCH_MULTIBYTE_CHAR (ptrdiff_t pos)
{
unsigned char *p = ((pos >= GPT_BYTE ? GAP_SIZE : 0)
@@ -1188,7 +1185,7 @@ FETCH_MULTIBYTE_CHAR (ptrdiff_t pos)
If POS doesn't point the head of valid multi-byte form, only the byte at
POS is returned. No range checking. */
-BUFFER_INLINE int
+INLINE int
BUF_FETCH_MULTIBYTE_CHAR (struct buffer *buf, ptrdiff_t pos)
{
unsigned char *p
@@ -1199,7 +1196,7 @@ BUF_FETCH_MULTIBYTE_CHAR (struct buffer *buf, ptrdiff_t pos)
/* Return number of windows showing B. */
-BUFFER_INLINE int
+INLINE int
buffer_window_count (struct buffer *b)
{
if (b->base_buffer)
@@ -1306,13 +1303,13 @@ extern int last_per_buffer_idx;
/* Functions to get and set default value of the per-buffer
variable at offset OFFSET in the buffer structure. */
-BUFFER_INLINE Lisp_Object
+INLINE Lisp_Object
per_buffer_default (int offset)
{
return *(Lisp_Object *)(offset + (char *) &buffer_defaults);
}
-BUFFER_INLINE void
+INLINE void
set_per_buffer_default (int offset, Lisp_Object value)
{
*(Lisp_Object *)(offset + (char *) &buffer_defaults) = value;
@@ -1321,20 +1318,20 @@ set_per_buffer_default (int offset, Lisp_Object value)
/* Functions to get and set buffer-local value of the per-buffer
variable at offset OFFSET in the buffer structure. */
-BUFFER_INLINE Lisp_Object
+INLINE Lisp_Object
per_buffer_value (struct buffer *b, int offset)
{
return *(Lisp_Object *)(offset + (char *) b);
}
-BUFFER_INLINE void
+INLINE void
set_per_buffer_value (struct buffer *b, int offset, Lisp_Object value)
{
*(Lisp_Object *)(offset + (char *) b) = value;
}
/* Downcase a character C, or make no change if that cannot be done. */
-BUFFER_INLINE int
+INLINE int
downcase (int c)
{
Lisp_Object downcase_table = BVAR (current_buffer, downcase_table);
@@ -1343,10 +1340,10 @@ downcase (int c)
}
/* 1 if C is upper case. */
-BUFFER_INLINE bool uppercasep (int c) { return downcase (c) != c; }
+INLINE bool uppercasep (int c) { return downcase (c) != c; }
/* Upcase a character C known to be not upper case. */
-BUFFER_INLINE int
+INLINE int
upcase1 (int c)
{
Lisp_Object upcase_table = BVAR (current_buffer, upcase_table);
@@ -1355,13 +1352,13 @@ upcase1 (int c)
}
/* 1 if C is lower case. */
-BUFFER_INLINE bool
+INLINE bool
lowercasep (int c)
{
return !uppercasep (c) && upcase1 (c) != c;
}
/* Upcase a character C, or make no change if that cannot be done. */
-BUFFER_INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); }
+INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); }
INLINE_HEADER_END
diff --git a/src/category.c b/src/category.c
index b28978fb721..da5e81e4709 100644
--- a/src/category.c
+++ b/src/category.c
@@ -30,8 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define CATEGORY_INLINE EXTERN_INLINE
-
#include "lisp.h"
#include "character.h"
#include "buffer.h"
diff --git a/src/category.h b/src/category.h
index 17cd203db45..828dcd1f325 100644
--- a/src/category.h
+++ b/src/category.h
@@ -54,9 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
But, for the moment, we are not using this slot. */
INLINE_HEADER_BEGIN
-#ifndef CATEGORY_INLINE
-# define CATEGORY_INLINE INLINE
-#endif
#define CATEGORYP(x) RANGED_INTEGERP (0x20, x, 0x7E)
@@ -84,7 +81,7 @@ INLINE_HEADER_BEGIN
>> ((category) % 8)) & 1)
/* Return true if category set of CH contains CATEGORY. */
-CATEGORY_INLINE bool
+INLINE bool
CHAR_HAS_CATEGORY (int ch, int category)
{
Lisp_Object category_set = CATEGORY_SET (ch);
diff --git a/src/character.c b/src/character.c
index 6fefb6e8824..9807339a61e 100644
--- a/src/character.c
+++ b/src/character.c
@@ -29,8 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#endif
-#define CHARACTER_INLINE EXTERN_INLINE
-
#include <stdio.h>
#ifdef emacs
diff --git a/src/character.h b/src/character.h
index b2cdcb76699..cb03cb39947 100644
--- a/src/character.h
+++ b/src/character.h
@@ -26,9 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <verify.h>
INLINE_HEADER_BEGIN
-#ifndef CHARACTER_INLINE
-# define CHARACTER_INLINE INLINE
-#endif
/* character code 1st byte byte sequence
-------------- -------- -------------
@@ -558,7 +555,7 @@ INLINE_HEADER_BEGIN
#define SANE_TAB_WIDTH(buf) \
sanitize_tab_width (XFASTINT (BVAR (buf, tab_width)))
-CHARACTER_INLINE int
+INLINE int
sanitize_tab_width (EMACS_INT width)
{
return 0 < width && width <= 1000 ? width : 8;
@@ -579,7 +576,7 @@ sanitize_tab_width (EMACS_INT width)
/* Return a non-outlandish value for a character width. */
-CHARACTER_INLINE int
+INLINE int
sanitize_char_width (EMACS_INT width)
{
return 0 <= width && width <= 1000 ? width : 1000;
diff --git a/src/charset.c b/src/charset.c
index d46cb445f85..ef040a94605 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -26,8 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define CHARSET_INLINE EXTERN_INLINE
-
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/src/charset.h b/src/charset.h
index d9a5662e520..6e6a8891b4a 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -30,9 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <verify.h>
INLINE_HEADER_BEGIN
-#ifndef CHARSET_INLINE
-# define CHARSET_INLINE INLINE
-#endif
/* Index to arguments of Fdefine_charset_internal. */
@@ -331,7 +328,7 @@ extern int emacs_mule_charset[256];
#define CHARSET_DEUNIFIER(charset) \
(CHARSET_ATTR_DEUNIFIER (CHARSET_ATTRIBUTES (charset)))
-CHARSET_INLINE void
+INLINE void
set_charset_attr (struct charset *charset, enum charset_attr_index idx,
Lisp_Object val)
{
diff --git a/src/composite.c b/src/composite.c
index 28942fe4f74..ee4195572a5 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -24,8 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define COMPOSITE_INLINE EXTERN_INLINE
-
#include "lisp.h"
#include "character.h"
#include "buffer.h"
diff --git a/src/composite.h b/src/composite.h
index df170093797..9026d03f7b6 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -28,9 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "font.h"
INLINE_HEADER_BEGIN
-#ifndef COMPOSITE_INLINE
-# define COMPOSITE_INLINE INLINE
-#endif
/* Methods to display a sequence of components of a composition. */
enum composition_method {
@@ -59,7 +56,7 @@ enum composition_method {
They don't check validity of PROP. */
/* Return true if PROP is already registered. */
-COMPOSITE_INLINE bool
+INLINE bool
composition_registered_p (Lisp_Object prop)
{
return INTEGERP (XCAR (prop));
@@ -207,7 +204,7 @@ extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object,
/* Return the method of a composition with property PROP. */
-COMPOSITE_INLINE enum composition_method
+INLINE enum composition_method
composition_method (Lisp_Object prop)
{
if (composition_registered_p (prop))
@@ -226,7 +223,7 @@ composition_method (Lisp_Object prop)
/* Given offsets START and END, return true if PROP is a valid composition
property with length END - START. */
-COMPOSITE_INLINE bool
+INLINE bool
composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop)
{
return (CONSP (prop)
@@ -262,7 +259,7 @@ composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop)
#define LGSTRING_GLYPH_LEN(lgs) (ASIZE ((lgs)) - 2)
#define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 2)
#define LGSTRING_SET_GLYPH(lgs, idx, val) ASET ((lgs), (idx) + 2, (val))
-COMPOSITE_INLINE Lisp_Object *
+INLINE Lisp_Object *
lgstring_glyph_addr (Lisp_Object lgs, ptrdiff_t idx)
{
return aref_addr (lgs, idx + 2);
diff --git a/src/conf_post.h b/src/conf_post.h
index 16714076f6f..30a4a5a9422 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -208,11 +208,8 @@ extern void _DebPrint (const char *fmt, ...);
[#include any other .h files first.]
...
INLINE_HEADER_BEGIN
- #ifndef FOO_INLINE
- # define FOO_INLINE INLINE
- #endif
...
- FOO_INLINE int
+ INLINE int
incr (int i)
{
return i + 1;
@@ -220,19 +217,22 @@ extern void _DebPrint (const char *fmt, ...);
...
INLINE_HEADER_END
- The corresponding foo.c file should do this:
+ For every executable, exactly one file that includes the header
+ should do this:
- #define FOO_INLINE EXTERN_INLINE
+ #define INLINE EXTERN_INLINE
- before including any .h file other than config.h.
- Other .c files should not define FOO_INLINE.
+ before including config.h or any other .h file.
+ Other .c files should not define INLINE.
C99 compilers compile functions like 'incr' as C99-style extern
inline functions. Pre-C99 GCCs do something similar with
GNU-specific keywords. Pre-C99 non-GCC compilers use static
functions, which bloats the code but is good enough. */
-#define INLINE _GL_INLINE
+#ifndef INLINE
+# define INLINE _GL_INLINE
+#endif
#define EXTERN_INLINE _GL_EXTERN_INLINE
#define INLINE_HEADER_BEGIN _GL_INLINE_HEADER_BEGIN
#define INLINE_HEADER_END _GL_INLINE_HEADER_END
diff --git a/src/dispextern.h b/src/dispextern.h
index e1d48b0e460..45c1bedb64c 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -49,12 +49,9 @@ typedef struct {
#endif
INLINE_HEADER_BEGIN
-#ifndef DISPEXTERN_INLINE
-# define DISPEXTERN_INLINE INLINE
-#endif
#include <c-strcase.h>
-DISPEXTERN_INLINE int
+INLINE int
xstrcasecmp (char const *a, char const *b)
{
return c_strcasecmp (a, b);
@@ -289,10 +286,10 @@ typedef struct {
} GLYPH;
/* Return a glyph's character code. */
-DISPEXTERN_INLINE int GLYPH_CHAR (GLYPH glyph) { return glyph.ch; }
+INLINE int GLYPH_CHAR (GLYPH glyph) { return glyph.ch; }
/* Return a glyph's face ID. */
-DISPEXTERN_INLINE int GLYPH_FACE (GLYPH glyph) { return glyph.face_id; }
+INLINE int GLYPH_FACE (GLYPH glyph) { return glyph.face_id; }
#define SET_GLYPH_CHAR(glyph, char) ((glyph).ch = (char))
#define SET_GLYPH_FACE(glyph, face) ((glyph).face_id = (face))
@@ -301,7 +298,7 @@ DISPEXTERN_INLINE int GLYPH_FACE (GLYPH glyph) { return glyph.face_id; }
/* The following are valid only if GLYPH_CODE_P (gc). */
-DISPEXTERN_INLINE int
+INLINE int
GLYPH_CODE_CHAR (Lisp_Object gc)
{
return (CONSP (gc)
@@ -309,7 +306,7 @@ GLYPH_CODE_CHAR (Lisp_Object gc)
: XINT (gc) & MAX_CHAR);
}
-DISPEXTERN_INLINE int
+INLINE int
GLYPH_CODE_FACE (Lisp_Object gc)
{
return CONSP (gc) ? XINT (XCDR (gc)) : XINT (gc) >> CHARACTERBITS;
@@ -1824,7 +1821,7 @@ struct face_cache
#endif /* not HAVE_WINDOW_SYSTEM */
/* Return true if G contains a valid character code. */
-DISPEXTERN_INLINE bool
+INLINE bool
GLYPH_CHAR_VALID_P (GLYPH g)
{
return CHAR_VALID_P (GLYPH_CHAR (g));
@@ -1834,7 +1831,7 @@ GLYPH_CHAR_VALID_P (GLYPH g)
encodes a char code in the lower CHARACTERBITS bits and a (very small)
face-id in the upper bits, or it may be a cons (CHAR . FACE-ID). */
-DISPEXTERN_INLINE bool
+INLINE bool
GLYPH_CODE_P (Lisp_Object gc)
{
return (CONSP (gc)
@@ -2705,7 +2702,7 @@ typedef struct {
unsigned mouse_face_hidden : 1;
} Mouse_HLInfo;
-DISPEXTERN_INLINE void
+INLINE void
reset_mouse_highlight (Mouse_HLInfo *hlinfo)
{
diff --git a/src/dispnew.c b/src/dispnew.c
index 2b16e881c80..5bdc84f1b1d 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define DISPEXTERN_INLINE EXTERN_INLINE
-
#include "sysstdio.h"
#include <unistd.h>
diff --git a/src/emacs.c b/src/emacs.c
index dc4c23b3991..79f759cd5b5 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -18,8 +18,9 @@ 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/>. */
-
+#define INLINE EXTERN_INLINE
#include <config.h>
+
#include <errno.h>
#include <stdio.h>
@@ -72,6 +73,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "termhooks.h"
#include "keyboard.h"
#include "keymap.h"
+#include "category.h"
+#include "charset.h"
+#include "composite.h"
+#include "dispextern.h"
+#include "syntax.h"
+#include "systime.h"
#ifdef HAVE_GNUTLS
#include "gnutls.h"
diff --git a/src/frame.c b/src/frame.c
index 78cd6914bc4..d2943211377 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -19,8 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define FRAME_INLINE EXTERN_INLINE
-
#include <stdio.h>
#include <errno.h>
#include <limits.h>
diff --git a/src/frame.h b/src/frame.h
index f5fd7dbcc36..ffab992023a 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -27,9 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "termhooks.h"
INLINE_HEADER_BEGIN
-#ifndef FRAME_INLINE
-# define FRAME_INLINE INLINE
-#endif
enum vertical_scroll_bar_type
{
@@ -448,105 +445,105 @@ struct frame
/* Most code should use these functions to set Lisp fields in struct frame. */
-FRAME_INLINE void
+INLINE void
fset_buffer_list (struct frame *f, Lisp_Object val)
{
f->buffer_list = val;
}
-FRAME_INLINE void
+INLINE void
fset_buried_buffer_list (struct frame *f, Lisp_Object val)
{
f->buried_buffer_list = val;
}
-FRAME_INLINE void
+INLINE void
fset_condemned_scroll_bars (struct frame *f, Lisp_Object val)
{
f->condemned_scroll_bars = val;
}
-FRAME_INLINE void
+INLINE void
fset_face_alist (struct frame *f, Lisp_Object val)
{
f->face_alist = val;
}
-FRAME_INLINE void
+INLINE void
fset_focus_frame (struct frame *f, Lisp_Object val)
{
f->focus_frame = val;
}
-FRAME_INLINE void
+INLINE void
fset_icon_name (struct frame *f, Lisp_Object val)
{
f->icon_name = val;
}
-FRAME_INLINE void
+INLINE void
fset_menu_bar_items (struct frame *f, Lisp_Object val)
{
f->menu_bar_items = val;
}
-FRAME_INLINE void
+INLINE void
fset_menu_bar_vector (struct frame *f, Lisp_Object val)
{
f->menu_bar_vector = val;
}
#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
-FRAME_INLINE void
+INLINE void
fset_menu_bar_window (struct frame *f, Lisp_Object val)
{
f->menu_bar_window = val;
}
#endif
-FRAME_INLINE void
+INLINE void
fset_name (struct frame *f, Lisp_Object val)
{
f->name = val;
}
-FRAME_INLINE void
+INLINE void
fset_param_alist (struct frame *f, Lisp_Object val)
{
f->param_alist = val;
}
-FRAME_INLINE void
+INLINE void
fset_root_window (struct frame *f, Lisp_Object val)
{
f->root_window = val;
}
-FRAME_INLINE void
+INLINE void
fset_scroll_bars (struct frame *f, Lisp_Object val)
{
f->scroll_bars = val;
}
-FRAME_INLINE void
+INLINE void
fset_selected_window (struct frame *f, Lisp_Object val)
{
f->selected_window = val;
}
-FRAME_INLINE void
+INLINE void
fset_title (struct frame *f, Lisp_Object val)
{
f->title = val;
}
-FRAME_INLINE void
+INLINE void
fset_tool_bar_items (struct frame *f, Lisp_Object val)
{
f->tool_bar_items = val;
}
-FRAME_INLINE void
+INLINE void
fset_tool_bar_position (struct frame *f, Lisp_Object val)
{
f->tool_bar_position = val;
}
#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
-FRAME_INLINE void
+INLINE void
fset_tool_bar_window (struct frame *f, Lisp_Object val)
{
f->tool_bar_window = val;
}
-FRAME_INLINE void
+INLINE void
fset_current_tool_bar_string (struct frame *f, Lisp_Object val)
{
f->current_tool_bar_string = val;
}
-FRAME_INLINE void
+INLINE void
fset_desired_tool_bar_string (struct frame *f, Lisp_Object val)
{
f->desired_tool_bar_string = val;
@@ -555,7 +552,7 @@ fset_desired_tool_bar_string (struct frame *f, Lisp_Object val)
#define NUMVAL(X) ((INTEGERP (X) || FLOATP (X)) ? XFLOATINT (X) : -1)
-FRAME_INLINE double
+INLINE double
default_pixels_per_inch_x (void)
{
Lisp_Object v = (CONSP (Vdisplay_pixels_per_inch)
@@ -564,7 +561,7 @@ default_pixels_per_inch_x (void)
return NUMVAL (v) > 0 ? NUMVAL (v) : 72.0;
}
-FRAME_INLINE double
+INLINE double
default_pixels_per_inch_y (void)
{
Lisp_Object v = (CONSP (Vdisplay_pixels_per_inch)
@@ -1282,7 +1279,7 @@ extern int x_bitmap_icon (struct frame *, Lisp_Object);
/* Set F's bitmap icon, if specified among F's parameters. */
-FRAME_INLINE void
+INLINE void
x_set_bitmap_icon (struct frame *f)
{
Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist);
@@ -1295,7 +1292,7 @@ x_set_bitmap_icon (struct frame *f)
#endif /* HAVE_WINDOW_SYSTEM */
-FRAME_INLINE void
+INLINE void
flush_frame (struct frame *f)
{
struct redisplay_interface *rif = FRAME_RIF (f);
diff --git a/src/intervals.c b/src/intervals.c
index ded536ca3c8..66b486e1422 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -40,8 +40,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define INTERVALS_INLINE EXTERN_INLINE
-
#include <intprops.h>
#include "lisp.h"
#include "intervals.h"
diff --git a/src/intervals.h b/src/intervals.h
index a38e83cf10e..51dfa09c5c4 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -19,9 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "dispextern.h"
INLINE_HEADER_BEGIN
-#ifndef INTERVALS_INLINE
-# define INTERVALS_INLINE INLINE
-#endif
/* Basic data type for use of intervals. */
@@ -136,14 +133,14 @@ struct interval
/* Use these functions to set Lisp_Object
or pointer slots of struct interval. */
-INTERVALS_INLINE void
+INLINE void
set_interval_parent (INTERVAL i, INTERVAL parent)
{
i->up_obj = 0;
i->up.interval = parent;
}
-INTERVALS_INLINE void
+INLINE void
set_interval_plist (INTERVAL i, Lisp_Object plist)
{
i->plist = plist;
diff --git a/src/keyboard.c b/src/keyboard.c
index 020c8859941..201b9ec8f5b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -20,9 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define BLOCKINPUT_INLINE EXTERN_INLINE
-#define KEYBOARD_INLINE EXTERN_INLINE
-
#include "sysstdio.h"
#include "lisp.h"
diff --git a/src/keyboard.h b/src/keyboard.h
index 1ee4a97c5c5..49f87b20a43 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -22,9 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "termhooks.h"
INLINE_HEADER_BEGIN
-#ifndef KEYBOARD_INLINE
-# define KEYBOARD_INLINE INLINE
-#endif
/* Most code should use this macro to access Lisp fields in struct kboard. */
@@ -179,42 +176,42 @@ struct kboard
ptrdiff_t echo_after_prompt;
};
-KEYBOARD_INLINE void
+INLINE void
kset_default_minibuffer_frame (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vdefault_minibuffer_frame) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_defining_kbd_macro (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (defining_kbd_macro) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_input_decode_map (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vinput_decode_map) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_last_command (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vlast_command) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_last_kbd_macro (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vlast_kbd_macro) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_prefix_arg (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vprefix_arg) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_system_key_alist (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vsystem_key_alist) = val;
}
-KEYBOARD_INLINE void
+INLINE void
kset_window_system (struct kboard *kb, Lisp_Object val)
{
kb->INTERNAL_FIELD (Vwindow_system) = val;
diff --git a/src/lisp.h b/src/lisp.h
index 2b1af1faa19..bd09cab5a75 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -33,9 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <intprops.h>
INLINE_HEADER_BEGIN
-#ifndef LISP_INLINE
-# define LISP_INLINE INLINE
-#endif
/* The ubiquitous max and min macros. */
#undef min
@@ -345,11 +342,11 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
ARGS should be parenthesized. Implement the function by calling
lisp_h_NAME ARGS. */
#define LISP_MACRO_DEFUN(name, type, argdecls, args) \
- LISP_INLINE type (name) argdecls { return lisp_h_##name args; }
+ INLINE type (name) argdecls { return lisp_h_##name args; }
/* like LISP_MACRO_DEFUN, except NAME returns void. */
#define LISP_MACRO_DEFUN_VOID(name, argdecls, args) \
- LISP_INLINE void (name) argdecls { lisp_h_##name args; }
+ INLINE void (name) argdecls { lisp_h_##name args; }
/* Define the fundamental Lisp data structures. */
@@ -610,14 +607,14 @@ LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
/* Make a Lisp integer representing the value of the low order
bits of N. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
make_number (EMACS_INT n)
{
return XIL (USE_LSB_TAG ? n << INTTYPEBITS : n & INTMASK);
}
/* Extract A's value as a signed integer. */
-LISP_INLINE EMACS_INT
+INLINE EMACS_INT
XINT (Lisp_Object a)
{
EMACS_INT i = XLI (a);
@@ -627,7 +624,7 @@ XINT (Lisp_Object a)
/* Like XINT (A), but may be faster. A must be nonnegative.
If ! USE_LSB_TAG, this takes advantage of the fact that Lisp
integers have zero-bits in their tags. */
-LISP_INLINE EMACS_INT
+INLINE EMACS_INT
XFASTINT (Lisp_Object a)
{
EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a);
@@ -636,7 +633,7 @@ XFASTINT (Lisp_Object a)
}
/* Extract A's type. */
-LISP_INLINE enum Lisp_Type
+INLINE enum Lisp_Type
XTYPE (Lisp_Object a)
{
EMACS_UINT i = XLI (a);
@@ -644,7 +641,7 @@ XTYPE (Lisp_Object a)
}
/* Extract A's pointer value, assuming A's type is TYPE. */
-LISP_INLINE void *
+INLINE void *
XUNTAG (Lisp_Object a, int type)
{
if (USE_LSB_TAG)
@@ -658,7 +655,7 @@ XUNTAG (Lisp_Object a, int type)
#endif /* ! USE_LSB_TAG */
/* Extract A's value as an unsigned integer. */
-LISP_INLINE EMACS_UINT
+INLINE EMACS_UINT
XUINT (Lisp_Object a)
{
EMACS_UINT i = XLI (a);
@@ -671,7 +668,7 @@ XUINT (Lisp_Object a)
LISP_MACRO_DEFUN (XHASH, EMACS_INT, (Lisp_Object a), (a))
/* Like make_number (N), but may be faster. N must be in nonnegative range. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
make_natnum (EMACS_INT n)
{
eassert (0 <= n && n <= MOST_POSITIVE_FIXNUM);
@@ -688,7 +685,7 @@ LISP_MACRO_DEFUN (EQ, bool, (Lisp_Object x, Lisp_Object y), (x, y))
#define FIXNUM_OVERFLOW_P(i) \
(! ((0 <= (i) || MOST_NEGATIVE_FIXNUM <= (i)) && (i) <= MOST_POSITIVE_FIXNUM))
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
{
return num < lower ? lower : num <= upper ? num : upper;
@@ -698,31 +695,31 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
/* Defined in this file. */
union Lisp_Fwd;
-LISP_INLINE bool BOOL_VECTOR_P (Lisp_Object);
-LISP_INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *);
-LISP_INLINE bool BUFFERP (Lisp_Object);
-LISP_INLINE bool CHAR_TABLE_P (Lisp_Object);
-LISP_INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t);
-LISP_INLINE bool (CONSP) (Lisp_Object);
-LISP_INLINE bool (FLOATP) (Lisp_Object);
-LISP_INLINE bool functionp (Lisp_Object);
-LISP_INLINE bool (INTEGERP) (Lisp_Object);
-LISP_INLINE bool (MARKERP) (Lisp_Object);
-LISP_INLINE bool (MISCP) (Lisp_Object);
-LISP_INLINE bool (NILP) (Lisp_Object);
-LISP_INLINE bool OVERLAYP (Lisp_Object);
-LISP_INLINE bool PROCESSP (Lisp_Object);
-LISP_INLINE bool PSEUDOVECTORP (Lisp_Object, int);
-LISP_INLINE bool SAVE_VALUEP (Lisp_Object);
-LISP_INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t,
+INLINE bool BOOL_VECTOR_P (Lisp_Object);
+INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *);
+INLINE bool BUFFERP (Lisp_Object);
+INLINE bool CHAR_TABLE_P (Lisp_Object);
+INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t);
+INLINE bool (CONSP) (Lisp_Object);
+INLINE bool (FLOATP) (Lisp_Object);
+INLINE bool functionp (Lisp_Object);
+INLINE bool (INTEGERP) (Lisp_Object);
+INLINE bool (MARKERP) (Lisp_Object);
+INLINE bool (MISCP) (Lisp_Object);
+INLINE bool (NILP) (Lisp_Object);
+INLINE bool OVERLAYP (Lisp_Object);
+INLINE bool PROCESSP (Lisp_Object);
+INLINE bool PSEUDOVECTORP (Lisp_Object, int);
+INLINE bool SAVE_VALUEP (Lisp_Object);
+INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t,
Lisp_Object);
-LISP_INLINE bool STRINGP (Lisp_Object);
-LISP_INLINE bool SUB_CHAR_TABLE_P (Lisp_Object);
-LISP_INLINE bool SUBRP (Lisp_Object);
-LISP_INLINE bool (SYMBOLP) (Lisp_Object);
-LISP_INLINE bool (VECTORLIKEP) (Lisp_Object);
-LISP_INLINE bool WINDOWP (Lisp_Object);
-LISP_INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
+INLINE bool STRINGP (Lisp_Object);
+INLINE bool SUB_CHAR_TABLE_P (Lisp_Object);
+INLINE bool SUBRP (Lisp_Object);
+INLINE bool (SYMBOLP) (Lisp_Object);
+INLINE bool (VECTORLIKEP) (Lisp_Object);
+INLINE bool WINDOWP (Lisp_Object);
+INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
/* Defined in chartab.c. */
extern Lisp_Object char_table_ref (Lisp_Object, int);
@@ -761,14 +758,14 @@ extern Lisp_Object Qimage;
LISP_MACRO_DEFUN (XCONS, struct Lisp_Cons *, (Lisp_Object a), (a))
-LISP_INLINE struct Lisp_Vector *
+INLINE struct Lisp_Vector *
XVECTOR (Lisp_Object a)
{
eassert (VECTORLIKEP (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct Lisp_String *
+INLINE struct Lisp_String *
XSTRING (Lisp_Object a)
{
eassert (STRINGP (a));
@@ -777,7 +774,7 @@ XSTRING (Lisp_Object a)
LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a))
-LISP_INLINE struct Lisp_Float *
+INLINE struct Lisp_Float *
XFLOAT (Lisp_Object a)
{
eassert (FLOATP (a));
@@ -786,55 +783,55 @@ XFLOAT (Lisp_Object a)
/* Pseudovector types. */
-LISP_INLINE struct Lisp_Process *
+INLINE struct Lisp_Process *
XPROCESS (Lisp_Object a)
{
eassert (PROCESSP (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct window *
+INLINE struct window *
XWINDOW (Lisp_Object a)
{
eassert (WINDOWP (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct terminal *
+INLINE struct terminal *
XTERMINAL (Lisp_Object a)
{
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct Lisp_Subr *
+INLINE struct Lisp_Subr *
XSUBR (Lisp_Object a)
{
eassert (SUBRP (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct buffer *
+INLINE struct buffer *
XBUFFER (Lisp_Object a)
{
eassert (BUFFERP (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct Lisp_Char_Table *
+INLINE struct Lisp_Char_Table *
XCHAR_TABLE (Lisp_Object a)
{
eassert (CHAR_TABLE_P (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct Lisp_Sub_Char_Table *
+INLINE struct Lisp_Sub_Char_Table *
XSUB_CHAR_TABLE (Lisp_Object a)
{
eassert (SUB_CHAR_TABLE_P (a));
return XUNTAG (a, Lisp_Vectorlike);
}
-LISP_INLINE struct Lisp_Bool_Vector *
+INLINE struct Lisp_Bool_Vector *
XBOOL_VECTOR (Lisp_Object a)
{
eassert (BOOL_VECTOR_P (a));
@@ -843,7 +840,7 @@ XBOOL_VECTOR (Lisp_Object a)
/* Construct a Lisp_Object from a value or address. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
make_lisp_ptr (void *ptr, enum Lisp_Type type)
{
EMACS_UINT utype = type;
@@ -853,7 +850,7 @@ make_lisp_ptr (void *ptr, enum Lisp_Type type)
return a;
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
make_lisp_proc (struct Lisp_Process *p)
{
return make_lisp_ptr (p, Lisp_Vectorlike);
@@ -937,12 +934,12 @@ struct Lisp_Cons
fields are not accessible. (What if we want to switch to
a copying collector someday? Cached cons cell field addresses may be
invalidated at arbitrary points.) */
-LISP_INLINE Lisp_Object *
+INLINE Lisp_Object *
xcar_addr (Lisp_Object c)
{
return &XCONS (c)->car;
}
-LISP_INLINE Lisp_Object *
+INLINE Lisp_Object *
xcdr_addr (Lisp_Object c)
{
return &XCONS (c)->u.cdr;
@@ -956,26 +953,26 @@ LISP_MACRO_DEFUN (XCDR, Lisp_Object, (Lisp_Object c), (c))
Note that both arguments may refer to the same object, so 'n'
should not be read after 'c' is first modified. */
-LISP_INLINE void
+INLINE void
XSETCAR (Lisp_Object c, Lisp_Object n)
{
*xcar_addr (c) = n;
}
-LISP_INLINE void
+INLINE void
XSETCDR (Lisp_Object c, Lisp_Object n)
{
*xcdr_addr (c) = n;
}
/* Take the car or cdr of something whose type is not known. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
CAR (Lisp_Object c)
{
return (CONSP (c) ? XCAR (c)
: NILP (c) ? Qnil
: wrong_type_argument (Qlistp, c));
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
CDR (Lisp_Object c)
{
return (CONSP (c) ? XCDR (c)
@@ -984,12 +981,12 @@ CDR (Lisp_Object c)
}
/* Take the car or cdr of something whose type is not known. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
CAR_SAFE (Lisp_Object c)
{
return CONSP (c) ? XCAR (c) : Qnil;
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
CDR_SAFE (Lisp_Object c)
{
return CONSP (c) ? XCDR (c) : Qnil;
@@ -1006,7 +1003,7 @@ struct Lisp_String
};
/* True if STR is a multibyte string. */
-LISP_INLINE bool
+INLINE bool
STRING_MULTIBYTE (Lisp_Object str)
{
return 0 <= XSTRING (str)->size_byte;
@@ -1043,28 +1040,28 @@ STRING_MULTIBYTE (Lisp_Object str)
/* Convenience functions for dealing with Lisp strings. */
-LISP_INLINE unsigned char *
+INLINE unsigned char *
SDATA (Lisp_Object string)
{
return XSTRING (string)->data;
}
-LISP_INLINE char *
+INLINE char *
SSDATA (Lisp_Object string)
{
/* Avoid "differ in sign" warnings. */
return (char *) SDATA (string);
}
-LISP_INLINE unsigned char
+INLINE unsigned char
SREF (Lisp_Object string, ptrdiff_t index)
{
return SDATA (string)[index];
}
-LISP_INLINE void
+INLINE void
SSET (Lisp_Object string, ptrdiff_t index, unsigned char new)
{
SDATA (string)[index] = new;
}
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
SCHARS (Lisp_Object string)
{
return XSTRING (string)->size;
@@ -1073,7 +1070,7 @@ SCHARS (Lisp_Object string)
#ifdef GC_CHECK_STRING_BYTES
extern ptrdiff_t string_bytes (struct Lisp_String *);
#endif
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
STRING_BYTES (struct Lisp_String *s)
{
#ifdef GC_CHECK_STRING_BYTES
@@ -1083,17 +1080,17 @@ STRING_BYTES (struct Lisp_String *s)
#endif
}
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
SBYTES (Lisp_Object string)
{
return STRING_BYTES (XSTRING (string));
}
-LISP_INLINE void
+INLINE void
STRING_SET_CHARS (Lisp_Object string, ptrdiff_t newsize)
{
XSTRING (string)->size = newsize;
}
-LISP_INLINE void
+INLINE void
STRING_COPYIN (Lisp_Object string, ptrdiff_t index, char const *new,
ptrdiff_t count)
{
@@ -1164,32 +1161,32 @@ enum
/* Conveniences for dealing with Lisp arrays. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
AREF (Lisp_Object array, ptrdiff_t idx)
{
return XVECTOR (array)->contents[idx];
}
-LISP_INLINE Lisp_Object *
+INLINE Lisp_Object *
aref_addr (Lisp_Object array, ptrdiff_t idx)
{
return & XVECTOR (array)->contents[idx];
}
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
ASIZE (Lisp_Object array)
{
return XVECTOR (array)->header.size;
}
-LISP_INLINE void
+INLINE void
ASET (Lisp_Object array, ptrdiff_t idx, Lisp_Object val)
{
eassert (0 <= idx && idx < ASIZE (array));
XVECTOR (array)->contents[idx] = val;
}
-LISP_INLINE void
+INLINE void
gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val)
{
/* Like ASET, but also can be used in the garbage collector:
@@ -1296,7 +1293,7 @@ struct Lisp_Sub_Char_Table
Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
};
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
CHAR_TABLE_REF_ASCII (Lisp_Object ct, ptrdiff_t idx)
{
struct Lisp_Char_Table *tbl = NULL;
@@ -1316,7 +1313,7 @@ CHAR_TABLE_REF_ASCII (Lisp_Object ct, ptrdiff_t idx)
/* Almost equivalent to Faref (CT, IDX) with optimization for ASCII
characters. Do not check validity of CT. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
CHAR_TABLE_REF (Lisp_Object ct, int idx)
{
return (ASCII_CHAR_P (idx)
@@ -1326,7 +1323,7 @@ CHAR_TABLE_REF (Lisp_Object ct, int idx)
/* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and
8-bit European characters. Do not check validity of CT. */
-LISP_INLINE void
+INLINE void
CHAR_TABLE_SET (Lisp_Object ct, int idx, Lisp_Object val)
{
if (ASCII_CHAR_P (idx) && SUB_CHAR_TABLE_P (XCHAR_TABLE (ct)->ascii))
@@ -1371,7 +1368,7 @@ enum CHAR_TABLE_STANDARD_SLOTS
/* Return the number of "extra" slots in the char table CT. */
-LISP_INLINE int
+INLINE int
CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct)
{
return ((ct->header.size & PSEUDOVECTOR_SIZE_MASK)
@@ -1450,19 +1447,19 @@ struct Lisp_Symbol
LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym))
-LISP_INLINE struct Lisp_Symbol *
+INLINE struct Lisp_Symbol *
SYMBOL_ALIAS (struct Lisp_Symbol *sym)
{
eassert (sym->redirect == SYMBOL_VARALIAS);
return sym->val.alias;
}
-LISP_INLINE struct Lisp_Buffer_Local_Value *
+INLINE struct Lisp_Buffer_Local_Value *
SYMBOL_BLV (struct Lisp_Symbol *sym)
{
eassert (sym->redirect == SYMBOL_LOCALIZED);
return sym->val.blv;
}
-LISP_INLINE union Lisp_Fwd *
+INLINE union Lisp_Fwd *
SYMBOL_FWD (struct Lisp_Symbol *sym)
{
eassert (sym->redirect == SYMBOL_FORWARDED);
@@ -1472,26 +1469,26 @@ SYMBOL_FWD (struct Lisp_Symbol *sym)
LISP_MACRO_DEFUN_VOID (SET_SYMBOL_VAL,
(struct Lisp_Symbol *sym, Lisp_Object v), (sym, v))
-LISP_INLINE void
+INLINE void
SET_SYMBOL_ALIAS (struct Lisp_Symbol *sym, struct Lisp_Symbol *v)
{
eassert (sym->redirect == SYMBOL_VARALIAS);
sym->val.alias = v;
}
-LISP_INLINE void
+INLINE void
SET_SYMBOL_BLV (struct Lisp_Symbol *sym, struct Lisp_Buffer_Local_Value *v)
{
eassert (sym->redirect == SYMBOL_LOCALIZED);
sym->val.blv = v;
}
-LISP_INLINE void
+INLINE void
SET_SYMBOL_FWD (struct Lisp_Symbol *sym, union Lisp_Fwd *v)
{
eassert (sym->redirect == SYMBOL_FORWARDED);
sym->val.fwd = v;
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
SYMBOL_NAME (Lisp_Object sym)
{
return XSYMBOL (sym)->name;
@@ -1499,7 +1496,7 @@ SYMBOL_NAME (Lisp_Object sym)
/* Value is true if SYM is an interned symbol. */
-LISP_INLINE bool
+INLINE bool
SYMBOL_INTERNED_P (Lisp_Object sym)
{
return XSYMBOL (sym)->interned != SYMBOL_UNINTERNED;
@@ -1507,7 +1504,7 @@ SYMBOL_INTERNED_P (Lisp_Object sym)
/* Value is true if SYM is interned in initial_obarray. */
-LISP_INLINE bool
+INLINE bool
SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
{
return XSYMBOL (sym)->interned == SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
@@ -1603,7 +1600,7 @@ struct Lisp_Hash_Table
};
-LISP_INLINE struct Lisp_Hash_Table *
+INLINE struct Lisp_Hash_Table *
XHASH_TABLE (Lisp_Object a)
{
return XUNTAG (a, Lisp_Vectorlike);
@@ -1612,21 +1609,21 @@ XHASH_TABLE (Lisp_Object a)
#define XSET_HASH_TABLE(VAR, PTR) \
(XSETPSEUDOVECTOR (VAR, PTR, PVEC_HASH_TABLE))
-LISP_INLINE bool
+INLINE bool
HASH_TABLE_P (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_HASH_TABLE);
}
/* Value is the key part of entry IDX in hash table H. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
HASH_KEY (struct Lisp_Hash_Table *h, ptrdiff_t idx)
{
return AREF (h->key_and_value, 2 * idx);
}
/* Value is the value part of entry IDX in hash table H. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
HASH_VALUE (struct Lisp_Hash_Table *h, ptrdiff_t idx)
{
return AREF (h->key_and_value, 2 * idx + 1);
@@ -1634,14 +1631,14 @@ HASH_VALUE (struct Lisp_Hash_Table *h, ptrdiff_t idx)
/* Value is the index of the next entry following the one at IDX
in hash table H. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
HASH_NEXT (struct Lisp_Hash_Table *h, ptrdiff_t idx)
{
return AREF (h->next, idx);
}
/* Value is the hash code computed for entry IDX in hash table H. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
HASH_HASH (struct Lisp_Hash_Table *h, ptrdiff_t idx)
{
return AREF (h->hash, idx);
@@ -1649,14 +1646,14 @@ HASH_HASH (struct Lisp_Hash_Table *h, ptrdiff_t idx)
/* Value is the index of the element in hash table H that is the
start of the collision list at index IDX in the index vector of H. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
HASH_INDEX (struct Lisp_Hash_Table *h, ptrdiff_t idx)
{
return AREF (h->index, idx);
}
/* Value is the size of hash table H. */
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
HASH_TABLE_SIZE (struct Lisp_Hash_Table *h)
{
return ASIZE (h->next);
@@ -1679,7 +1676,7 @@ static double const DEFAULT_REHASH_SIZE = 1.5;
/* Combine two integers X and Y for hashing. The result might not fit
into a Lisp integer. */
-LISP_INLINE EMACS_UINT
+INLINE EMACS_UINT
sxhash_combine (EMACS_UINT x, EMACS_UINT y)
{
return (x << 4) + (x >> (BITS_PER_EMACS_INT - 4)) + y;
@@ -1687,7 +1684,7 @@ sxhash_combine (EMACS_UINT x, EMACS_UINT y)
/* Hash X, returning a value that fits into a fixnum. */
-LISP_INLINE EMACS_UINT
+INLINE EMACS_UINT
SXHASH_REDUCE (EMACS_UINT x)
{
return (x ^ x >> (BITS_PER_EMACS_INT - FIXNUM_BITS)) & INTMASK;
@@ -1857,7 +1854,7 @@ struct Lisp_Save_Value
};
/* Return the type of V's Nth saved value. */
-LISP_INLINE int
+INLINE int
save_type (struct Lisp_Save_Value *v, int n)
{
eassert (0 <= n && n < SAVE_VALUE_SLOTS);
@@ -1866,19 +1863,19 @@ save_type (struct Lisp_Save_Value *v, int n)
/* Get and set the Nth saved pointer. */
-LISP_INLINE void *
+INLINE void *
XSAVE_POINTER (Lisp_Object obj, int n)
{
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER);
return XSAVE_VALUE (obj)->data[n].pointer;
}
-LISP_INLINE void
+INLINE void
set_save_pointer (Lisp_Object obj, int n, void *val)
{
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_POINTER);
XSAVE_VALUE (obj)->data[n].pointer = val;
}
-LISP_INLINE voidfuncptr
+INLINE voidfuncptr
XSAVE_FUNCPOINTER (Lisp_Object obj, int n)
{
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_FUNCPOINTER);
@@ -1887,13 +1884,13 @@ XSAVE_FUNCPOINTER (Lisp_Object obj, int n)
/* Likewise for the saved integer. */
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
XSAVE_INTEGER (Lisp_Object obj, int n)
{
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER);
return XSAVE_VALUE (obj)->data[n].integer;
}
-LISP_INLINE void
+INLINE void
set_save_integer (Lisp_Object obj, int n, ptrdiff_t val)
{
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_INTEGER);
@@ -1902,7 +1899,7 @@ set_save_integer (Lisp_Object obj, int n, ptrdiff_t val)
/* Extract Nth saved object. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
XSAVE_OBJECT (Lisp_Object obj, int n)
{
eassert (save_type (XSAVE_VALUE (obj), n) == SAVE_OBJECT);
@@ -1930,40 +1927,40 @@ union Lisp_Misc
struct Lisp_Save_Value u_save_value;
};
-LISP_INLINE union Lisp_Misc *
+INLINE union Lisp_Misc *
XMISC (Lisp_Object a)
{
return XUNTAG (a, Lisp_Misc);
}
-LISP_INLINE struct Lisp_Misc_Any *
+INLINE struct Lisp_Misc_Any *
XMISCANY (Lisp_Object a)
{
eassert (MISCP (a));
return & XMISC (a)->u_any;
}
-LISP_INLINE enum Lisp_Misc_Type
+INLINE enum Lisp_Misc_Type
XMISCTYPE (Lisp_Object a)
{
return XMISCANY (a)->type;
}
-LISP_INLINE struct Lisp_Marker *
+INLINE struct Lisp_Marker *
XMARKER (Lisp_Object a)
{
eassert (MARKERP (a));
return & XMISC (a)->u_marker;
}
-LISP_INLINE struct Lisp_Overlay *
+INLINE struct Lisp_Overlay *
XOVERLAY (Lisp_Object a)
{
eassert (OVERLAYP (a));
return & XMISC (a)->u_overlay;
}
-LISP_INLINE struct Lisp_Save_Value *
+INLINE struct Lisp_Save_Value *
XSAVE_VALUE (Lisp_Object a)
{
eassert (SAVE_VALUEP (a));
@@ -2077,13 +2074,13 @@ union Lisp_Fwd
struct Lisp_Kboard_Objfwd u_kboard_objfwd;
};
-LISP_INLINE enum Lisp_Fwd_Type
+INLINE enum Lisp_Fwd_Type
XFWDTYPE (union Lisp_Fwd *a)
{
return a->u_intfwd.type;
}
-LISP_INLINE struct Lisp_Buffer_Objfwd *
+INLINE struct Lisp_Buffer_Objfwd *
XBUFFER_OBJFWD (union Lisp_Fwd *a)
{
eassert (BUFFER_OBJFWDP (a));
@@ -2100,7 +2097,7 @@ struct Lisp_Float
} u;
};
-LISP_INLINE double
+INLINE double
XFLOAT_DATA (Lisp_Object f)
{
return XFLOAT (f)->u.data;
@@ -2164,18 +2161,18 @@ enum char_bits
LISP_MACRO_DEFUN (NILP, bool, (Lisp_Object x), (x))
-LISP_INLINE bool
+INLINE bool
NUMBERP (Lisp_Object x)
{
return INTEGERP (x) || FLOATP (x);
}
-LISP_INLINE bool
+INLINE bool
NATNUMP (Lisp_Object x)
{
return INTEGERP (x) && 0 <= XINT (x);
}
-LISP_INLINE bool
+INLINE bool
RANGED_INTEGERP (intmax_t lo, Lisp_Object x, intmax_t hi)
{
return INTEGERP (x) && lo <= XINT (x) && XINT (x) <= hi;
@@ -2194,40 +2191,40 @@ LISP_MACRO_DEFUN (INTEGERP, bool, (Lisp_Object x), (x))
LISP_MACRO_DEFUN (VECTORLIKEP, bool, (Lisp_Object x), (x))
LISP_MACRO_DEFUN (MARKERP, bool, (Lisp_Object x), (x))
-LISP_INLINE bool
+INLINE bool
STRINGP (Lisp_Object x)
{
return XTYPE (x) == Lisp_String;
}
-LISP_INLINE bool
+INLINE bool
VECTORP (Lisp_Object x)
{
return VECTORLIKEP (x) && ! (ASIZE (x) & PSEUDOVECTOR_FLAG);
}
-LISP_INLINE bool
+INLINE bool
OVERLAYP (Lisp_Object x)
{
return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Overlay;
}
-LISP_INLINE bool
+INLINE bool
SAVE_VALUEP (Lisp_Object x)
{
return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value;
}
-LISP_INLINE bool
+INLINE bool
AUTOLOADP (Lisp_Object x)
{
return CONSP (x) && EQ (Qautoload, XCAR (x));
}
-LISP_INLINE bool
+INLINE bool
BUFFER_OBJFWDP (union Lisp_Fwd *a)
{
return XFWDTYPE (a) == Lisp_Fwd_Buffer_Obj;
}
-LISP_INLINE bool
+INLINE bool
PSEUDOVECTOR_TYPEP (struct vectorlike_header *a, int code)
{
return ((a->size & (PSEUDOVECTOR_FLAG | PVEC_TYPE_MASK))
@@ -2235,7 +2232,7 @@ PSEUDOVECTOR_TYPEP (struct vectorlike_header *a, int code)
}
/* True if A is a pseudovector whose code is CODE. */
-LISP_INLINE bool
+INLINE bool
PSEUDOVECTORP (Lisp_Object a, int code)
{
if (! VECTORLIKEP (a))
@@ -2251,87 +2248,87 @@ PSEUDOVECTORP (Lisp_Object a, int code)
/* Test for specific pseudovector types. */
-LISP_INLINE bool
+INLINE bool
WINDOW_CONFIGURATIONP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_WINDOW_CONFIGURATION);
}
-LISP_INLINE bool
+INLINE bool
PROCESSP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_PROCESS);
}
-LISP_INLINE bool
+INLINE bool
WINDOWP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_WINDOW);
}
-LISP_INLINE bool
+INLINE bool
TERMINALP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_TERMINAL);
}
-LISP_INLINE bool
+INLINE bool
SUBRP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_SUBR);
}
-LISP_INLINE bool
+INLINE bool
COMPILEDP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_COMPILED);
}
-LISP_INLINE bool
+INLINE bool
BUFFERP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_BUFFER);
}
-LISP_INLINE bool
+INLINE bool
CHAR_TABLE_P (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_CHAR_TABLE);
}
-LISP_INLINE bool
+INLINE bool
SUB_CHAR_TABLE_P (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_SUB_CHAR_TABLE);
}
-LISP_INLINE bool
+INLINE bool
BOOL_VECTOR_P (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_BOOL_VECTOR);
}
-LISP_INLINE bool
+INLINE bool
FRAMEP (Lisp_Object a)
{
return PSEUDOVECTORP (a, PVEC_FRAME);
}
/* Test for image (image . spec) */
-LISP_INLINE bool
+INLINE bool
IMAGEP (Lisp_Object x)
{
return CONSP (x) && EQ (XCAR (x), Qimage);
}
/* Array types. */
-LISP_INLINE bool
+INLINE bool
ARRAYP (Lisp_Object x)
{
return VECTORP (x) || STRINGP (x) || CHAR_TABLE_P (x) || BOOL_VECTOR_P (x);
}
-LISP_INLINE void
+INLINE void
CHECK_LIST (Lisp_Object x)
{
CHECK_TYPE (CONSP (x) || NILP (x), Qlistp, x);
@@ -2341,52 +2338,52 @@ LISP_MACRO_DEFUN_VOID (CHECK_LIST_CONS, (Lisp_Object x, Lisp_Object y), (x, y))
LISP_MACRO_DEFUN_VOID (CHECK_SYMBOL, (Lisp_Object x), (x))
LISP_MACRO_DEFUN_VOID (CHECK_NUMBER, (Lisp_Object x), (x))
-LISP_INLINE void
+INLINE void
CHECK_STRING (Lisp_Object x)
{
CHECK_TYPE (STRINGP (x), Qstringp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_STRING_CAR (Lisp_Object x)
{
CHECK_TYPE (STRINGP (XCAR (x)), Qstringp, XCAR (x));
}
-LISP_INLINE void
+INLINE void
CHECK_CONS (Lisp_Object x)
{
CHECK_TYPE (CONSP (x), Qconsp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_VECTOR (Lisp_Object x)
{
CHECK_TYPE (VECTORP (x), Qvectorp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_VECTOR_OR_STRING (Lisp_Object x)
{
CHECK_TYPE (VECTORP (x) || STRINGP (x), Qarrayp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_ARRAY (Lisp_Object x, Lisp_Object Qxxxp)
{
CHECK_TYPE (ARRAYP (x), Qxxxp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_BUFFER (Lisp_Object x)
{
CHECK_TYPE (BUFFERP (x), Qbufferp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_WINDOW (Lisp_Object x)
{
CHECK_TYPE (WINDOWP (x), Qwindowp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_PROCESS (Lisp_Object x)
{
CHECK_TYPE (PROCESSP (x), Qprocessp, x);
}
-LISP_INLINE void
+INLINE void
CHECK_NATNUM (Lisp_Object x)
{
CHECK_TYPE (NATNUMP (x), Qwholenump, x);
@@ -2415,13 +2412,13 @@ CHECK_NATNUM (Lisp_Object x)
do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \
else CHECK_TYPE (INTEGERP (x), Qinteger_or_marker_p, x); } while (0)
-LISP_INLINE double
+INLINE double
XFLOATINT (Lisp_Object n)
{
return extract_float (n);
}
-LISP_INLINE void
+INLINE void
CHECK_NUMBER_OR_FLOAT (Lisp_Object x)
{
CHECK_TYPE (FLOATP (x) || INTEGERP (x), Qnumberp, x);
@@ -2433,7 +2430,7 @@ CHECK_NUMBER_OR_FLOAT (Lisp_Object x)
/* Since we can't assign directly to the CAR or CDR fields of a cons
cell, use these when checking that those fields contain numbers. */
-LISP_INLINE void
+INLINE void
CHECK_NUMBER_CAR (Lisp_Object x)
{
Lisp_Object tmp = XCAR (x);
@@ -2441,7 +2438,7 @@ CHECK_NUMBER_CAR (Lisp_Object x)
XSETCAR (x, tmp);
}
-LISP_INLINE void
+INLINE void
CHECK_NUMBER_CDR (Lisp_Object x)
{
Lisp_Object tmp = XCDR (x);
@@ -2519,7 +2516,7 @@ CHECK_NUMBER_CDR (Lisp_Object x)
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
/* True if OBJ is a Lisp function. */
-LISP_INLINE bool
+INLINE bool
FUNCTIONP (Lisp_Object obj)
{
return functionp (obj);
@@ -2686,7 +2683,7 @@ extern union specbinding *specpdl;
extern union specbinding *specpdl_ptr;
extern ptrdiff_t specpdl_size;
-LISP_INLINE ptrdiff_t
+INLINE ptrdiff_t
SPECPDL_INDEX (void)
{
return specpdl_ptr - specpdl;
@@ -3014,7 +3011,7 @@ struct frame;
/* Copy COUNT Lisp_Objects from ARGS to contents of V starting from OFFSET. */
-LISP_INLINE void
+INLINE void
vcopy (Lisp_Object v, ptrdiff_t offset, Lisp_Object *args, ptrdiff_t count)
{
eassert (0 <= offset && 0 <= count && offset + count <= ASIZE (v));
@@ -3023,13 +3020,13 @@ vcopy (Lisp_Object v, ptrdiff_t offset, Lisp_Object *args, ptrdiff_t count)
/* Functions to modify hash tables. */
-LISP_INLINE void
+INLINE void
set_hash_key_slot (struct Lisp_Hash_Table *h, ptrdiff_t idx, Lisp_Object val)
{
gc_aset (h->key_and_value, 2 * idx, val);
}
-LISP_INLINE void
+INLINE void
set_hash_value_slot (struct Lisp_Hash_Table *h, ptrdiff_t idx, Lisp_Object val)
{
gc_aset (h->key_and_value, 2 * idx + 1, val);
@@ -3038,19 +3035,19 @@ set_hash_value_slot (struct Lisp_Hash_Table *h, ptrdiff_t idx, Lisp_Object val)
/* Use these functions to set Lisp_Object
or pointer slots of struct Lisp_Symbol. */
-LISP_INLINE void
+INLINE void
set_symbol_function (Lisp_Object sym, Lisp_Object function)
{
XSYMBOL (sym)->function = function;
}
-LISP_INLINE void
+INLINE void
set_symbol_plist (Lisp_Object sym, Lisp_Object plist)
{
XSYMBOL (sym)->plist = plist;
}
-LISP_INLINE void
+INLINE void
set_symbol_next (Lisp_Object sym, struct Lisp_Symbol *next)
{
XSYMBOL (sym)->next = next;
@@ -3058,7 +3055,7 @@ set_symbol_next (Lisp_Object sym, struct Lisp_Symbol *next)
/* Buffer-local (also frame-local) variable access functions. */
-LISP_INLINE int
+INLINE int
blv_found (struct Lisp_Buffer_Local_Value *blv)
{
eassert (blv->found == !EQ (blv->defcell, blv->valcell));
@@ -3067,7 +3064,7 @@ blv_found (struct Lisp_Buffer_Local_Value *blv)
/* Set overlay's property list. */
-LISP_INLINE void
+INLINE void
set_overlay_plist (Lisp_Object overlay, Lisp_Object plist)
{
XOVERLAY (overlay)->plist = plist;
@@ -3075,7 +3072,7 @@ set_overlay_plist (Lisp_Object overlay, Lisp_Object plist)
/* Get text properties of S. */
-LISP_INLINE INTERVAL
+INLINE INTERVAL
string_intervals (Lisp_Object s)
{
return XSTRING (s)->intervals;
@@ -3083,7 +3080,7 @@ string_intervals (Lisp_Object s)
/* Set text properties of S to I. */
-LISP_INLINE void
+INLINE void
set_string_intervals (Lisp_Object s, INTERVAL i)
{
XSTRING (s)->intervals = i;
@@ -3092,12 +3089,12 @@ set_string_intervals (Lisp_Object s, INTERVAL i)
/* Set a Lisp slot in TABLE to VAL. Most code should use this instead
of setting slots directly. */
-LISP_INLINE void
+INLINE void
set_char_table_defalt (Lisp_Object table, Lisp_Object val)
{
XCHAR_TABLE (table)->defalt = val;
}
-LISP_INLINE void
+INLINE void
set_char_table_purpose (Lisp_Object table, Lisp_Object val)
{
XCHAR_TABLE (table)->purpose = val;
@@ -3105,21 +3102,21 @@ set_char_table_purpose (Lisp_Object table, Lisp_Object val)
/* Set different slots in (sub)character tables. */
-LISP_INLINE void
+INLINE void
set_char_table_extras (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
{
eassert (0 <= idx && idx < CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (table)));
XCHAR_TABLE (table)->extras[idx] = val;
}
-LISP_INLINE void
+INLINE void
set_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
{
eassert (0 <= idx && idx < (1 << CHARTAB_SIZE_BITS_0));
XCHAR_TABLE (table)->contents[idx] = val;
}
-LISP_INLINE void
+INLINE void
set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
{
XSUB_CHAR_TABLE (table)->contents[idx] = val;
@@ -3436,19 +3433,19 @@ extern Lisp_Object listn (enum constype, ptrdiff_t, Lisp_Object, ...);
/* Build a frequently used 2/3/4-integer lists. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
list2i (EMACS_INT x, EMACS_INT y)
{
return list2 (make_number (x), make_number (y));
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
list3i (EMACS_INT x, EMACS_INT y, EMACS_INT w)
{
return list3 (make_number (x), make_number (y), make_number (w));
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
list4i (EMACS_INT x, EMACS_INT y, EMACS_INT w, EMACS_INT h)
{
return list4 (make_number (x), make_number (y),
@@ -3463,7 +3460,7 @@ extern Lisp_Object make_unibyte_string (const char *, ptrdiff_t);
/* Make unibyte string from C string when the length isn't known. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
build_unibyte_string (const char *str)
{
return make_unibyte_string (str, strlen (str));
@@ -3481,7 +3478,7 @@ extern Lisp_Object make_pure_c_string (const char *, ptrdiff_t);
/* Make a string allocated in pure space, use STR as string data. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
build_pure_c_string (const char *str)
{
return make_pure_c_string (str, strlen (str));
@@ -3490,7 +3487,7 @@ build_pure_c_string (const char *str)
/* Make a string from the data at STR, treating it as multibyte if the
data warrants. */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
build_string (const char *str)
{
return make_string (str, strlen (str));
@@ -3511,7 +3508,7 @@ extern struct Lisp_Vector *allocate_vector (EMACS_INT);
ASET (v, 1, Ffunction_can_gc ());
ASET (v, 2, obj1); */
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
make_uninit_vector (ptrdiff_t size)
{
Lisp_Object v;
@@ -3558,7 +3555,7 @@ extern int valid_lisp_object_p (Lisp_Object);
#ifdef GC_CHECK_CONS_LIST
extern void check_cons_list (void);
#else
-LISP_INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); }
+INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); }
#endif
#ifdef REL_ALLOC
@@ -3626,7 +3623,7 @@ extern Lisp_Object check_obarray (Lisp_Object);
extern Lisp_Object intern_1 (const char *, ptrdiff_t);
extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t);
extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t);
-LISP_INLINE void
+INLINE void
LOADHIST_ATTACH (Lisp_Object x)
{
if (initialized)
@@ -3642,13 +3639,13 @@ extern void init_obarray (void);
extern void init_lread (void);
extern void syms_of_lread (void);
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
intern (const char *str)
{
return intern_1 (str, strlen (str));
}
-LISP_INLINE Lisp_Object
+INLINE Lisp_Object
intern_c_string (const char *str)
{
return intern_c_string_1 (str, strlen (str));
@@ -3927,9 +3924,9 @@ void fixup_locale (void);
void synchronize_system_messages_locale (void);
void synchronize_system_time_locale (void);
#else
-LISP_INLINE void fixup_locale (void) {}
-LISP_INLINE void synchronize_system_messages_locale (void) {}
-LISP_INLINE void synchronize_system_time_locale (void) {}
+INLINE void fixup_locale (void) {}
+INLINE void synchronize_system_messages_locale (void) {}
+INLINE void synchronize_system_time_locale (void) {}
#endif
extern void shut_down_emacs (int, Lisp_Object);
@@ -4308,7 +4305,7 @@ extern void *record_xmalloc (size_t);
/* Check whether it's time for GC, and run it if so. */
-LISP_INLINE void
+INLINE void
maybe_gc (void)
{
if ((consing_since_gc > gc_cons_threshold
@@ -4318,7 +4315,7 @@ maybe_gc (void)
Fgarbage_collect ();
}
-LISP_INLINE bool
+INLINE bool
functionp (Lisp_Object object)
{
if (SYMBOLP (object) && !NILP (Ffboundp (object)))
diff --git a/src/process.c b/src/process.c
index 20f84990d6f..0f53577331d 100644
--- a/src/process.c
+++ b/src/process.c
@@ -21,8 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define PROCESS_INLINE EXTERN_INLINE
-
#include <stdio.h>
#include <errno.h>
#include <sys/types.h> /* Some typedefs are used in sys/file.h. */
diff --git a/src/process.h b/src/process.h
index 6aff95686a2..a9b15f03da4 100644
--- a/src/process.h
+++ b/src/process.h
@@ -27,9 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
INLINE_HEADER_BEGIN
-#ifndef PROCESS_INLINE
-# define PROCESS_INLINE INLINE
-#endif
/* Bound on number of file descriptors opened on behalf of a process,
that need to be closed. */
@@ -179,14 +176,14 @@ struct Lisp_Process
/* Most code should use these functions to set Lisp fields in struct
process. */
-PROCESS_INLINE void
+INLINE void
pset_childp (struct Lisp_Process *p, Lisp_Object val)
{
p->childp = val;
}
#ifdef HAVE_GNUTLS
-PROCESS_INLINE void
+INLINE void
pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val)
{
p->gnutls_cred_type = val;
diff --git a/src/syntax.c b/src/syntax.c
index 31eb86faed8..3785bf45515 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define SYNTAX_INLINE EXTERN_INLINE
-
#include <sys/types.h>
#include "lisp.h"
diff --git a/src/syntax.h b/src/syntax.h
index 1b96284af42..1350d87162b 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -19,9 +19,6 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
INLINE_HEADER_BEGIN
-#ifndef SYNTAX_INLINE
-# define SYNTAX_INLINE INLINE
-#endif
extern void update_syntax_table (ptrdiff_t, EMACS_INT, bool, Lisp_Object);
@@ -89,7 +86,7 @@ extern struct gl_state_s gl_state;
in syntax table TABLE, or from globally kept data (gl_state).
Does inheritance. */
-SYNTAX_INLINE Lisp_Object
+INLINE Lisp_Object
SYNTAX_ENTRY (int c)
{
#ifdef SYNTAX_ENTRY_VIA_PROPERTY
@@ -104,14 +101,14 @@ SYNTAX_ENTRY (int c)
/* Extract the information from the entry for character C
in the current syntax table. */
-SYNTAX_INLINE int
+INLINE int
SYNTAX_WITH_FLAGS (int c)
{
Lisp_Object ent = SYNTAX_ENTRY (c);
return CONSP (ent) ? XINT (XCAR (ent)) : Swhitespace;
}
-SYNTAX_INLINE enum syntaxcode
+INLINE enum syntaxcode
SYNTAX (int c)
{
return SYNTAX_WITH_FLAGS (c) & 0xff;
@@ -137,7 +134,7 @@ extern char const syntax_code_spec[16];
The value is meant for use in code that does nothing when
parse_sexp_lookup_properties is 0, so return 0 in that case, for speed. */
-SYNTAX_INLINE ptrdiff_t
+INLINE ptrdiff_t
SYNTAX_TABLE_BYTE_TO_CHAR (ptrdiff_t bytepos)
{
return (! parse_sexp_lookup_properties
@@ -157,7 +154,7 @@ SYNTAX_TABLE_BYTE_TO_CHAR (ptrdiff_t bytepos)
/* Make syntax table state (gl_state) good for CHARPOS, assuming it is
currently good for a position before CHARPOS. */
-SYNTAX_INLINE void
+INLINE void
UPDATE_SYNTAX_TABLE_FORWARD (ptrdiff_t charpos)
{
if (parse_sexp_lookup_properties && charpos >= gl_state.e_property)
@@ -167,7 +164,7 @@ UPDATE_SYNTAX_TABLE_FORWARD (ptrdiff_t charpos)
/* Make syntax table state (gl_state) good for CHARPOS, assuming it is
currently good for a position after CHARPOS. */
-SYNTAX_INLINE void
+INLINE void
UPDATE_SYNTAX_TABLE_BACKWARD (ptrdiff_t charpos)
{
if (parse_sexp_lookup_properties && charpos < gl_state.b_property)
@@ -176,7 +173,7 @@ UPDATE_SYNTAX_TABLE_BACKWARD (ptrdiff_t charpos)
/* Make syntax table good for CHARPOS. */
-SYNTAX_INLINE void
+INLINE void
UPDATE_SYNTAX_TABLE (ptrdiff_t charpos)
{
UPDATE_SYNTAX_TABLE_BACKWARD (charpos);
@@ -185,7 +182,7 @@ UPDATE_SYNTAX_TABLE (ptrdiff_t charpos)
/* Set up the buffer-global syntax table. */
-SYNTAX_INLINE void
+INLINE void
SETUP_BUFFER_SYNTAX_TABLE (void)
{
gl_state.use_global = 0;
diff --git a/src/sysdep.c b/src/sysdep.c
index 6439697501e..84859813249 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -19,8 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define SYSTIME_INLINE EXTERN_INLINE
-
#include <execinfo.h>
#include "sysstdio.h"
#ifdef HAVE_PWD_H
diff --git a/src/systime.h b/src/systime.h
index b1c3d940b0e..a9bdf53b09f 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -22,9 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <timespec.h>
INLINE_HEADER_BEGIN
-#ifndef SYSTIME_INLINE
-# define SYSTIME_INLINE INLINE
-#endif
#ifdef emacs
# ifdef HAVE_X_WINDOWS
@@ -54,7 +51,7 @@ typedef unsigned long Time;
should be an absolute time since the epoch and B a nonnegative offset. */
/* Return an invalid timespec. */
-SYSTIME_INLINE struct timespec
+INLINE struct timespec
invalid_timespec (void)
{
return make_timespec (0, -1);
@@ -63,14 +60,14 @@ invalid_timespec (void)
/* Return 1 if TIME is a valid timespec. This currently doesn't worry
about whether tv_nsec is less than TIMESPEC_RESOLUTION; leap seconds
might cause a problem if it did. */
-SYSTIME_INLINE int
+INLINE int
timespec_valid_p (struct timespec t)
{
return t.tv_nsec >= 0;
}
/* Return current system time. */
-SYSTIME_INLINE struct timespec
+INLINE struct timespec
current_timespec (void)
{
struct timespec r;
diff --git a/src/termhooks.h b/src/termhooks.h
index a050c3292c2..c2bc42724e2 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -26,9 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "systime.h" /* for Time */
INLINE_HEADER_BEGIN
-#ifndef TERMHOOKS_INLINE
-# define TERMHOOKS_INLINE INLINE
-#endif
enum scroll_bar_part {
scroll_bar_nowhere = -1,
@@ -608,12 +605,12 @@ struct terminal
/* Most code should use these functions to set Lisp fields in struct
terminal. */
-TERMHOOKS_INLINE void
+INLINE void
tset_charset_list (struct terminal *t, Lisp_Object val)
{
t->charset_list = val;
}
-TERMHOOKS_INLINE void
+INLINE void
tset_selection_alist (struct terminal *t, Lisp_Object val)
{
t->Vselection_alist = val;
diff --git a/src/terminal.c b/src/terminal.c
index 4b5532e3a44..61c5d050945 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -18,8 +18,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define TERMHOOKS_INLINE EXTERN_INLINE
-
#include <stdio.h>
#include "lisp.h"
diff --git a/src/window.c b/src/window.c
index 677cb991025..7e2f52e12b1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#define WINDOW_INLINE EXTERN_INLINE
-
#include <stdio.h>
#include "lisp.h"
diff --git a/src/window.h b/src/window.h
index a419bf7e7f0..6d2478ecaf9 100644
--- a/src/window.h
+++ b/src/window.h
@@ -23,9 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "dispextern.h"
INLINE_HEADER_BEGIN
-#ifndef WINDOW_INLINE
-# define WINDOW_INLINE INLINE
-#endif
/* Windows are allocated as if they were vectors, but then the
Lisp data type is changed to Lisp_Window. They are garbage
@@ -349,37 +346,37 @@ struct window
/* Most code should use these functions to set Lisp fields in struct
window. */
-WINDOW_INLINE void
+INLINE void
wset_frame (struct window *w, Lisp_Object val)
{
w->frame = val;
}
-WINDOW_INLINE void
+INLINE void
wset_next (struct window *w, Lisp_Object val)
{
w->next = val;
}
-WINDOW_INLINE void
+INLINE void
wset_prev (struct window *w, Lisp_Object val)
{
w->prev = val;
}
-WINDOW_INLINE void
+INLINE void
wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
{
w->redisplay_end_trigger = val;
}
-WINDOW_INLINE void
+INLINE void
wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
{
w->vertical_scroll_bar = val;
}
-WINDOW_INLINE void
+INLINE void
wset_prev_buffers (struct window *w, Lisp_Object val)
{
w->prev_buffers = val;
}
-WINDOW_INLINE void
+INLINE void
wset_next_buffers (struct window *w, Lisp_Object val)
{
w->next_buffers = val;
@@ -966,7 +963,7 @@ extern void keys_of_window (void);
window update, so the position is the future output cursor position
for currently updated window W. */
-WINDOW_INLINE void
+INLINE void
output_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
{
eassert (w);