aboutsummaryrefslogtreecommitdiffstats
path: root/src/character.h
diff options
context:
space:
mode:
authorPaul Eggert2012-08-02 00:31:34 -0700
committerPaul Eggert2012-08-02 00:31:34 -0700
commitf162bcc31c3d7d168da47ca2f007f58e11a36948 (patch)
treeeef19d0a840bd99304751fef539ba100134c91b9 /src/character.h
parent8922df07b2f370debf70424f778073e1ca32e5e3 (diff)
downloademacs-f162bcc31c3d7d168da47ca2f007f58e11a36948.tar.gz
emacs-f162bcc31c3d7d168da47ca2f007f58e11a36948.zip
Use C99-style 'extern inline' if available.
* lib-src/profile.c (SYSTIME_INLINE): Define. * nt/config.nt: Sync with autogen/config.in. (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN) (_GL_INLINE_HEADER_END): New macros. * src/buffer.h (BUFFER_INLINE): * src/category.h (CATEGORY_INLINE): * src/character.h (CHARACTER_INLINE): * src/charset.h (CHARSET_INLINE): * src/composite.h (COMPOSITE_INLINE): * src/dispextern.h (DISPEXTERN_INLINE): * src/lisp.h (LISP_INLINE): * src/systime.h (SYSTIME_INLINE): New macro, replacing 'static inline' in this header. * src/buffer.h, src/category.h, src/character.h, src/charset.h: * src/composite.h, src/dispextern.h, lisp.h, systime.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END. * src/alloc.c (LISP_INLINE): * src/buffer.c (BUFFER_INLINE): * src/category.c (CATEGORY_INLINE): * src/character.c (CHARACTER_INLINE): * src/charset.c (CHARSET_INLINE): * src/composite.c (COMPOSITE_INLINE): * src/dispnew.c (DISPEXTERN_INLINE): * src/sysdep.c (SYSTIME_INLINE): Define to EXTERN_INLINE, so that the corresponding functions are compiled into code. * src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN) (INLINE_HEADER_END): New macros. * src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant, since it's used in non-static inline functions now.
Diffstat (limited to 'src/character.h')
-rw-r--r--src/character.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/character.h b/src/character.h
index 2cfeff85fee..332dfee373a 100644
--- a/src/character.h
+++ b/src/character.h
@@ -25,6 +25,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 25
26#include <verify.h> 26#include <verify.h>
27 27
28INLINE_HEADER_BEGIN
29#ifndef CHARACTER_INLINE
30# define CHARACTER_INLINE INLINE
31#endif
32
28/* character code 1st byte byte sequence 33/* character code 1st byte byte sequence
29 -------------- -------- ------------- 34 -------------- -------- -------------
30 0-7F 00..7F 0xxxxxxx 35 0-7F 00..7F 0xxxxxxx
@@ -570,7 +575,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
570 575
571#define SANE_TAB_WIDTH(buf) \ 576#define SANE_TAB_WIDTH(buf) \
572 sanitize_tab_width (XFASTINT (BVAR (buf, tab_width))) 577 sanitize_tab_width (XFASTINT (BVAR (buf, tab_width)))
573static inline int 578CHARACTER_INLINE int
574sanitize_tab_width (EMACS_INT width) 579sanitize_tab_width (EMACS_INT width)
575{ 580{
576 return 0 < width && width <= 1000 ? width : 8; 581 return 0 < width && width <= 1000 ? width : 8;
@@ -591,7 +596,7 @@ sanitize_tab_width (EMACS_INT width)
591 596
592/* Return a non-outlandish value for a character width. */ 597/* Return a non-outlandish value for a character width. */
593 598
594static inline int 599CHARACTER_INLINE int
595sanitize_char_width (EMACS_INT width) 600sanitize_char_width (EMACS_INT width)
596{ 601{
597 return 0 <= width && width <= 1000 ? width : 1000; 602 return 0 <= width && width <= 1000 ? width : 1000;
@@ -695,4 +700,6 @@ extern Lisp_Object string_escape_byte8 (Lisp_Object);
695#define GET_TRANSLATION_TABLE(id) \ 700#define GET_TRANSLATION_TABLE(id) \
696 (XCDR(XVECTOR(Vtranslation_table_vector)->contents[(id)])) 701 (XCDR(XVECTOR(Vtranslation_table_vector)->contents[(id)]))
697 702
703INLINE_HEADER_END
704
698#endif /* EMACS_CHARACTER_H */ 705#endif /* EMACS_CHARACTER_H */