aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorKenichi Handa1999-12-15 00:08:39 +0000
committerKenichi Handa1999-12-15 00:08:39 +0000
commite19c1eb40e018a2b587a85d29ce67fdc36f5dfe9 (patch)
tree0310dc12b56925611d0aca7593efdc15069cbae2 /src/data.c
parentca4c9455f8d4b719574e4dc6a6e8a4fc06dd408c (diff)
downloademacs-e19c1eb40e018a2b587a85d29ce67fdc36f5dfe9.tar.gz
emacs-e19c1eb40e018a2b587a85d29ce67fdc36f5dfe9.zip
(Faref): Delete codes for a composite character..
(Faset): Likewise. Adjusted for the change of CHAR_STRING.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/data.c b/src/data.c
index 3d2cd4a7332..ecd4b4b7ea7 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1697,11 +1697,9 @@ or a byte-code object. IDX starts at 0.")
1697 Lisp_Object sub_table; 1697 Lisp_Object sub_table;
1698 1698
1699 SPLIT_NON_ASCII_CHAR (idxval, code[0], code[1], code[2]); 1699 SPLIT_NON_ASCII_CHAR (idxval, code[0], code[1], code[2]);
1700 if (code[0] != CHARSET_COMPOSITION) 1700 if (code[1] < 32) code[1] = -1;
1701 { 1701 else if (code[2] < 32) code[2] = -1;
1702 if (code[1] < 32) code[1] = -1; 1702
1703 else if (code[2] < 32) code[2] = -1;
1704 }
1705 /* Here, the possible range of CODE[0] (== charset ID) is 1703 /* Here, the possible range of CODE[0] (== charset ID) is
1706 128..MAX_CHARSET. Since the top level char table contains 1704 128..MAX_CHARSET. Since the top level char table contains
1707 data for multibyte characters after 256th element, we must 1705 data for multibyte characters after 256th element, we must
@@ -1807,11 +1805,9 @@ IDX starts at 0.")
1807 Lisp_Object val; 1805 Lisp_Object val;
1808 1806
1809 SPLIT_NON_ASCII_CHAR (idxval, code[0], code[1], code[2]); 1807 SPLIT_NON_ASCII_CHAR (idxval, code[0], code[1], code[2]);
1810 if (code[0] != CHARSET_COMPOSITION) 1808 if (code[1] < 32) code[1] = -1;
1811 { 1809 else if (code[2] < 32) code[2] = -1;
1812 if (code[1] < 32) code[1] = -1; 1810
1813 else if (code[2] < 32) code[2] = -1;
1814 }
1815 /* See the comment of the corresponding part in Faref. */ 1811 /* See the comment of the corresponding part in Faref. */
1816 code[0] += 128; 1812 code[0] += 128;
1817 code[3] = -1; /* anchor */ 1813 code[3] = -1; /* anchor */
@@ -1842,7 +1838,7 @@ IDX starts at 0.")
1842 { 1838 {
1843 int idxval_byte, new_len, actual_len; 1839 int idxval_byte, new_len, actual_len;
1844 int prev_byte; 1840 int prev_byte;
1845 unsigned char *p, workbuf[4], *str; 1841 unsigned char *p, workbuf[MAX_MULTIBYTE_LENGTH], *str = workbuf;
1846 1842
1847 if (idxval < 0 || idxval >= XSTRING (array)->size) 1843 if (idxval < 0 || idxval >= XSTRING (array)->size)
1848 args_out_of_range (array, idx); 1844 args_out_of_range (array, idx);
@@ -1852,7 +1848,7 @@ IDX starts at 0.")
1852 1848
1853 actual_len = MULTIBYTE_FORM_LENGTH (p, STRING_BYTES (XSTRING (array))); 1849 actual_len = MULTIBYTE_FORM_LENGTH (p, STRING_BYTES (XSTRING (array)));
1854 CHECK_NUMBER (newelt, 2); 1850 CHECK_NUMBER (newelt, 2);
1855 new_len = CHAR_STRING (XINT (newelt), workbuf, str); 1851 new_len = CHAR_STRING (XINT (newelt), str);
1856 if (actual_len != new_len) 1852 if (actual_len != new_len)
1857 error ("Attempt to change byte length of a string"); 1853 error ("Attempt to change byte length of a string");
1858 1854