summaryrefslogtreecommitdiff
path: root/src/bidi.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-08-11 15:53:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-08-11 15:53:56 -0700
commitd6640d6e4c4f1a85edf924bca0f8a90d1aa6341a (patch)
tree4590c28d3a3810f8615bd1bef52773063d8fa8ac /src/bidi.c
parent85f7e5115f9f409126d355997e8103ea5126ada2 (diff)
downloademacs-d6640d6e4c4f1a85edf924bca0f8a90d1aa6341a.tar.gz
Give names to Unicode code points in C code
* src/character.h (NO_BREAK_SPACE, SOFT_HYPHEN) (ZERO_WIDTH_NON_JOINER, ZERO_WIDTH_JOINER, HYPHEN) (NON_BREAKING_HYPHEN, LEFT_SINGLE_QUOTATION_MARK) (RIGHT_SINGLE_QUOTATION_MARK, PARAGRAPH_SEPARATOR) (LEFT_POINTING_ANGLE_BRACKET, RIGHT_POINTING_ANGLE_BRACKET) (LEFT_ANGLE_BRACKET, RIGHT_ANGLE_BRACKET) (OBJECT_REPLACEMENT_CHARACTER): New named constants for Unicode code points. * src/bidi.c (bidi_fetch_char, CANONICAL_EQU): * src/composite.c (char_composable_p): * src/lread.c (readevalloop, read1): * src/xdisp.c (get_next_display_element): Use them. * src/doc.c (LEFT_SINGLE_QUOTATION_POINT): Remove; now in character.h.
Diffstat (limited to 'src/bidi.c')
-rw-r--r--src/bidi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bidi.c b/src/bidi.c
index e06430c8b84..bcc15b8c8f5 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1313,13 +1313,13 @@ bidi_fetch_char (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t *disp_pos,
/* `(space ...)' display specs are handled as paragraph
separators for the purposes of the reordering; see UAX#9
section 3 and clause HL1 in section 4.3 there. */
- ch = 0x2029;
+ ch = PARAGRAPH_SEPARATOR;
}
else
{
/* All other display specs are handled as the Unicode Object
Replacement Character. */
- ch = 0xFFFC;
+ ch = OBJECT_REPLACEMENT_CHARACTER;
}
disp_end_pos = compute_display_string_end (*disp_pos, string);
if (disp_end_pos < 0)
@@ -2482,8 +2482,8 @@ typedef struct bpa_stack_entry {
#define CANONICAL_EQU(c) \
( ASCII_CHAR_P (c) ? c \
- : (c) == 0x2329 ? 0x3008 \
- : (c) == 0x232a ? 0x3009 \
+ : (c) == LEFT_POINTING_ANGLE_BRACKET ? LEFT_ANGLE_BRACKET \
+ : (c) == RIGHT_POINTING_ANGLE_BRACKET ? RIGHT_ANGLE_BRACKET \
: c )
#ifdef ENABLE_CHECKING