diff options
author | Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com> | 2016-05-26 16:48:39 +0100 |
---|---|---|
committer | Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com> | 2016-05-26 16:48:39 +0100 |
commit | 8dfc46115527afe3706e9e4225e9ad019c97d695 (patch) | |
tree | 372d5192b218455834781a0037c57e919a06b488 /lib/mbchar.h | |
parent | 2291cf138eb72ad38d8c59b8b6f762875c8c4ff2 (diff) | |
parent | 5f2b09982312c98863eb9a8dfe2c608b81f58259 (diff) |
Merge tag 'upstream/0.9.6'
Upstream version 0.9.6
Diffstat (limited to 'lib/mbchar.h')
-rw-r--r-- | lib/mbchar.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/mbchar.h b/lib/mbchar.h index f9f52b9..9c70162 100644 --- a/lib/mbchar.h +++ b/lib/mbchar.h @@ -1,5 +1,5 @@ /* Multibyte character data type. - Copyright (C) 2001, 2005-2007, 2009-2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2005-2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -156,6 +156,14 @@ #include <wchar.h> #include <wctype.h> +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef MBCHAR_INLINE +# define MBCHAR_INLINE _GL_INLINE +#endif + #define MBCHAR_BUF_SIZE 24 struct mbchar @@ -235,7 +243,7 @@ typedef struct mbchar mbchar_t; /* Unprintable characters appear as a small box of width 1. */ #define MB_UNPRINTABLE_WIDTH 1 -static inline int +MBCHAR_INLINE int mb_width_aux (wint_t wc) { int w = wcwidth (wc); @@ -256,7 +264,7 @@ mb_width_aux (wint_t wc) (mbc)->wc = (mbc)->buf[0] = (sc)) /* Copying a character. */ -static inline void +MBCHAR_INLINE void mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) { if (old_mbc->ptr == &old_mbc->buf[0]) @@ -304,7 +312,7 @@ mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) extern const unsigned int is_basic_table[]; -static inline bool +MBCHAR_INLINE bool is_basic (char c) { return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) @@ -313,7 +321,7 @@ is_basic (char c) #else -static inline bool +MBCHAR_INLINE bool is_basic (char c) { switch (c) @@ -347,4 +355,6 @@ is_basic (char c) #endif +_GL_INLINE_HEADER_END + #endif /* _MBCHAR_H */ |