diff options
Diffstat (limited to 'src/bidi.c')
-rw-r--r-- | src/bidi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/bidi.c b/src/bidi.c index 216279cbc3a..c530d49c107 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1,6 +1,8 @@ /* Low-level bidirectional buffer/string-scanning functions for GNU Emacs. - Copyright (C) 2000-2001, 2004-2005, 2009-2019 Free Software - Foundation, Inc. + +Copyright (C) 2000-2001, 2004-2005, 2009-2019 Free Software Foundation, Inc. + +Author: Eli Zaretskii <eliz@gnu.org> This file is part of GNU Emacs. @@ -17,9 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ -/* Written by Eli Zaretskii <eliz@gnu.org>. - - A sequential implementation of the Unicode Bidirectional algorithm, +/* A sequential implementation of the Unicode Bidirectional algorithm, (UBA) as per UAX#9, a part of the Unicode Standard. Unlike the Reference Implementation and most other implementations, @@ -280,7 +280,7 @@ bidi_get_type (int ch, bidi_dir_t override) if (ch < 0 || ch > MAX_CHAR) emacs_abort (); - default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); + default_type = (bidi_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_type_table, ch)); /* Every valid character code, even those that are unassigned by the UCD, have some bidi-class property, according to DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT @@ -379,15 +379,15 @@ bidi_mirror_char (int c) emacs_abort (); val = CHAR_TABLE_REF (bidi_mirror_table, c); - if (INTEGERP (val)) + if (FIXNUMP (val)) { int v; /* When debugging, check before assigning to V, so that the check isn't broken by undefined behavior due to int overflow. */ - eassert (CHAR_VALID_P (XINT (val))); + eassert (CHAR_VALID_P (XFIXNUM (val))); - v = XINT (val); + v = XFIXNUM (val); /* Minimal test we must do in optimized builds, to prevent weird crashes further down the road. */ @@ -409,7 +409,7 @@ bidi_paired_bracket_type (int c) if (c < 0 || c > MAX_CHAR) emacs_abort (); - return (bidi_bracket_type_t) XINT (CHAR_TABLE_REF (bidi_brackets_table, c)); + return (bidi_bracket_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_brackets_table, c)); } /* Determine the start-of-sequence (sos) directional type given the two @@ -1805,7 +1805,7 @@ bidi_explicit_dir_char (int ch) eassert (ch == BIDI_EOB); return false; } - ch_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); + ch_type = (bidi_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_type_table, ch)); return (ch_type == LRE || ch_type == LRO || ch_type == RLE || ch_type == RLO || ch_type == PDF); @@ -2335,7 +2335,7 @@ bidi_resolve_weak (struct bidi_it *bidi_it) and make it L right away, to avoid the potentially costly loop below. This is important when the buffer has a long series of - control characters, like binary nulls, and no + control characters, like binary NULs, and no R2L characters at all. */ && new_level == 0 && !bidi_explicit_dir_char (bidi_it->ch) @@ -2993,7 +2993,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) } /* The next two "else if" clauses are shortcuts for the important special case when we have a long sequence of - neutral or WEAK_BN characters, such as whitespace or nulls or + neutral or WEAK_BN characters, such as whitespace or NULs or other control characters, on the base embedding level of the paragraph, and that sequence goes all the way to the end of the paragraph and follows a character whose resolved |