/* Header for charset handler.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
#include <verify.h>
INLINE_HEADER_BEGIN
-#ifndef CHARSET_INLINE
-# define CHARSET_INLINE INLINE
-#endif
/* Index to arguments of Fdefine_charset_internal. */
unsigned char *code_space_mask;
/* True if there's no gap in code-points. */
- unsigned code_linear_p : 1;
+ bool_bf code_linear_p : 1;
/* True if the charset is treated as 96 chars in ISO-2022
as opposed to 94 chars. */
- unsigned iso_chars_96 : 1;
+ bool_bf iso_chars_96 : 1;
/* True if the charset is compatible with ASCII. */
- unsigned ascii_compatible_p : 1;
+ bool_bf ascii_compatible_p : 1;
/* True if the charset is supplementary. */
- unsigned supplementary_p : 1;
+ bool_bf supplementary_p : 1;
/* True if all the code points are representable by Lisp_Int. */
- unsigned compact_codes_p : 1;
+ bool_bf compact_codes_p : 1;
/* True if the charset is unified with Unicode. */
- unsigned unified_p : 1;
+ bool_bf unified_p : 1;
/* ISO final byte of the charset: 48..127. It may be -1 if the
charset doesn't conform to ISO-2022. */
unsigned min_code, max_code;
/* Offset value used by macros CODE_POINT_TO_INDEX and
- INDEX_TO_CODE_POINT. . */
+ INDEX_TO_CODE_POINT. */
unsigned char_index_offset;
/* Minimum and Maximum character codes of the charset. If the
#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)
{
do { \
if (! SYMBOLP (x) || CHARSET_SYMBOL_HASH_INDEX (x) < 0) \
wrong_type_argument (Qcharsetp, (x)); \
- } while (0)
+ } while (false)
/* Check if X is a valid charset symbol. If valid, set ID to the id
wrong_type_argument (Qcharsetp, (x)); \
id = XINT (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \
charset_id)); \
- } while (0)
+ } while (false)
/* Check if X is a valid charset symbol. If valid, set ATTR to the
do { \
if (!SYMBOLP (x) || NILP (attr = CHARSET_SYMBOL_ATTRIBUTES (x))) \
wrong_type_argument (Qcharsetp, (x)); \
- } while (0)
+ } while (false)
#define CHECK_CHARSET_GET_CHARSET(x, charset) \
int csid; \
CHECK_CHARSET_GET_ID (x, csid); \
charset = CHARSET_FROM_ID (csid); \
- } while (0)
+ } while (false)
/* Lookup Vcharset_ordered_list and return the first charset that
((c) < 0x80 ? CHARSET_FROM_ID (charset_ascii) \
: char_charset ((c), Qnil, NULL))
-#if 0
+#if false
/* Char-table of charset-sets. Each element is a bool vector indexed
by a charset ID. */
extern Lisp_Object Vchar_charset_set;
: encode_char (charset, c))))
-/* Set to 1 when a charset map is loaded to warn that a buffer text
+/* Set to true when a charset map is loaded to warn that a buffer text
and a string data may be relocated. */
extern bool charset_map_loaded;
(fast_map)[(c) >> 10] |= 1 << (((c) >> 7) & 7); \
else \
(fast_map)[((c) >> 15) + 62] |= 1 << (((c) >> 12) & 7); \
- } while (0)
+ } while (false)
extern struct charset *char_charset (int, Lisp_Object, unsigned *);
extern Lisp_Object charset_attributes (int);
-extern int maybe_unify_char (int, Lisp_Object);
extern int decode_char (struct charset *, unsigned);
extern unsigned encode_char (struct charset *, int);
extern int string_xstring_p (Lisp_Object);