APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1506783410 -3600
# Sat Sep 30 15:56:50 2017 +0100
# Node ID 6f9111895fd5675fbdbb41da7370ff03f2cb687c
# Parent 7d977d2475494e52eb00fe1eb1fae9b33c5c672e
Give CHAR_CODE_LIMIT a more useful value, old-Mule
src/ChangeLog addition:
2017-09-30 Aidan Kehoe <kehoea(a)parhasard.net>
* text.c (old_mule_non_ascii_valid_ichar_p):
Use CHAR_CODE_LIMIT here rather than a magic constant.
* text.h:
Give CHAR_CODE_LIMIT a more useful value on old-Mule, especially
helpful for #'test-chars in mule-tests.el
diff -r 7d977d247549 -r 6f9111895fd5 src/ChangeLog
--- a/src/ChangeLog Sat Sep 30 15:51:56 2017 +0100
+++ b/src/ChangeLog Sat Sep 30 15:56:50 2017 +0100
@@ -1,3 +1,11 @@
+2017-09-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * text.c (old_mule_non_ascii_valid_ichar_p):
+ Use CHAR_CODE_LIMIT here rather than a magic constant.
+ * text.h:
+ Give CHAR_CODE_LIMIT a more useful value on old-Mule, especially
+ helpful for #'test-chars in mule-tests.el
+
2017-09-28 Stephen J. Turnbull <stephen(a)xemacs.org>
Fix crash in unicode_to_charset_codepoint_raw.
diff -r 7d977d247549 -r 6f9111895fd5 src/text.c
--- a/src/text.c Sat Sep 30 15:51:56 2017 +0100
+++ b/src/text.c Sat Sep 30 15:56:50 2017 +0100
@@ -1507,7 +1507,7 @@
int f1, f2, f3;
/* Must have only lowest 21 bits set */
- if (ch & ~0x1FFFFF)
+ if (ch & ~(CHAR_CODE_LIMIT - 1))
return 0;
f1 = ichar_field1 (ch);
diff -r 7d977d247549 -r 6f9111895fd5 src/text.h
--- a/src/text.h Sat Sep 30 15:51:56 2017 +0100
+++ b/src/text.h Sat Sep 30 15:56:50 2017 +0100
@@ -507,13 +507,13 @@
#ifdef UNICODE_INTERNAL
#define MAX_ICHAR_LEN 6
+/* Exclusive upper bound on char codes. */
+#define CHAR_CODE_LIMIT 0x40000000
#else
#define MAX_ICHAR_LEN 4
+#define CHAR_CODE_LIMIT 0x200000
#endif
-/* Exclusive upper bound on char codes. */
-#define CHAR_CODE_LIMIT 0x40000000
-
#ifdef UNICODE_INTERNAL
#define FIRST_TRAILING_BYTE 0x80
#define LAST_TRAILING_BYTE 0xBF
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date