summaryrefslogtreecommitdiff
path: root/lib/mbchar.h
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2014-01-15 13:17:08 +0100
committerŁukasz Stelmach <l.stelmach@samsung.com>2014-01-15 13:17:08 +0100
commit90b2de102fe4c773f9d6ba2da2065f254a5803b6 (patch)
treee1fa3d099d6e8eeafd3dd0eef243b8d2f41a0b9b /lib/mbchar.h
parent20c6d7ec2c817aa561410130efc8c8254fbef2b2 (diff)
downloaddiffutils-90b2de102fe4c773f9d6ba2da2065f254a5803b6.tar.gz
diffutils-90b2de102fe4c773f9d6ba2da2065f254a5803b6.tar.bz2
diffutils-90b2de102fe4c773f9d6ba2da2065f254a5803b6.zip
Imported Upstream version 3.3upstream/3.3
Diffstat (limited to 'lib/mbchar.h')
-rw-r--r--lib/mbchar.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/mbchar.h b/lib/mbchar.h
index 6dcb6cf..327c957 100644
--- a/lib/mbchar.h
+++ b/lib/mbchar.h
@@ -1,5 +1,5 @@
/* Multibyte character data type.
- Copyright (C) 2001, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -156,6 +156,11 @@
#include <wchar.h>
#include <wctype.h>
+_GL_INLINE_HEADER_BEGIN
+#ifndef MBCHAR_INLINE
+# define MBCHAR_INLINE _GL_INLINE
+#endif
+
#define MBCHAR_BUF_SIZE 24
struct mbchar
@@ -235,7 +240,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 +261,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 +309,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 +318,7 @@ is_basic (char c)
#else
-static inline bool
+MBCHAR_INLINE bool
is_basic (char c)
{
switch (c)
@@ -347,4 +352,6 @@ is_basic (char c)
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _MBCHAR_H */