mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
* character.h, charset.h: Use verify_expr, not verify_true.
This commit is contained in:
parent
dfc926249a
commit
a2a0186171
@ -175,7 +175,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
(p)[1] = (0x80 | (((c) >> 6) & 0x3F)), \
|
||||
(p)[2] = (0x80 | ((c) & 0x3F)), \
|
||||
3) \
|
||||
: (char_string (c, p) + !verify_true (sizeof (c) <= sizeof (unsigned))))
|
||||
: verify_expr (sizeof (c) <= sizeof (unsigned), char_string (c, p)))
|
||||
|
||||
/* Store multibyte form of byte B in P. The caller should allocate at
|
||||
least MAX_MULTIBYTE_LENGTH bytes area at P in advance. Returns the
|
||||
|
@ -426,29 +426,30 @@ extern Lisp_Object charset_work;
|
||||
/* Return a code point of CHAR in CHARSET.
|
||||
Try some optimization before calling encode_char. */
|
||||
|
||||
#define ENCODE_CHAR(charset, c) \
|
||||
((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \
|
||||
? (c) \
|
||||
: (!verify_true (sizeof (c) <= sizeof (int)) \
|
||||
|| (charset)->unified_p \
|
||||
|| (charset)->method == CHARSET_METHOD_SUBSET \
|
||||
|| (charset)->method == CHARSET_METHOD_SUPERSET) \
|
||||
? encode_char ((charset), (c)) \
|
||||
: ((c) < (charset)->min_char || (c) > (charset)->max_char) \
|
||||
? (charset)->invalid_code \
|
||||
: (charset)->method == CHARSET_METHOD_OFFSET \
|
||||
? ((charset)->code_linear_p \
|
||||
? (c) - (charset)->code_offset + (charset)->min_code \
|
||||
: encode_char ((charset), (c))) \
|
||||
: (charset)->method == CHARSET_METHOD_MAP \
|
||||
? (((charset)->compact_codes_p \
|
||||
&& CHAR_TABLE_P (CHARSET_ENCODER (charset))) \
|
||||
? (charset_work = CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c)), \
|
||||
(NILP (charset_work) \
|
||||
? (charset)->invalid_code \
|
||||
: XFASTINT (charset_work))) \
|
||||
: encode_char ((charset), (c))) \
|
||||
: encode_char ((charset), (c)))
|
||||
#define ENCODE_CHAR(charset, c) \
|
||||
(verify_expr \
|
||||
(sizeof (c) <= sizeof (int), \
|
||||
(ASCII_CHAR_P (c) && (charset)->ascii_compatible_p \
|
||||
? (c) \
|
||||
: ((charset)->unified_p \
|
||||
|| (charset)->method == CHARSET_METHOD_SUBSET \
|
||||
|| (charset)->method == CHARSET_METHOD_SUPERSET) \
|
||||
? encode_char (charset, c) \
|
||||
: (c) < (charset)->min_char || (c) > (charset)->max_char \
|
||||
? (charset)->invalid_code \
|
||||
: (charset)->method == CHARSET_METHOD_OFFSET \
|
||||
? ((charset)->code_linear_p \
|
||||
? (c) - (charset)->code_offset + (charset)->min_code \
|
||||
: encode_char (charset, c)) \
|
||||
: (charset)->method == CHARSET_METHOD_MAP \
|
||||
? (((charset)->compact_codes_p \
|
||||
&& CHAR_TABLE_P (CHARSET_ENCODER (charset))) \
|
||||
? (charset_work = CHAR_TABLE_REF (CHARSET_ENCODER (charset), c), \
|
||||
(NILP (charset_work) \
|
||||
? (charset)->invalid_code \
|
||||
: XFASTINT (charset_work))) \
|
||||
: encode_char (charset, c)) \
|
||||
: encode_char (charset, c))))
|
||||
|
||||
|
||||
/* Set to 1 when a charset map is loaded to warn that a buffer text
|
||||
|
Loading…
Reference in New Issue
Block a user