aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-10-17 01:58:01 +0000
committerKenichi Handa1998-10-17 01:58:01 +0000
commit3742fe75f8a704b537f3ff7add903d18e6826244 (patch)
tree393fe5ac495df4aa79df2acff777f1e3aa7ca333 /src
parent174a4cbee140d8c1bea7993c031a64d95b8c37ff (diff)
downloademacs-3742fe75f8a704b537f3ff7add903d18e6826244.tar.gz
emacs-3742fe75f8a704b537f3ff7add903d18e6826244.zip
(casify_object): Use make_string instead of
make_specified_string to cope with byte-combining situation.
Diffstat (limited to 'src')
-rw-r--r--src/casefiddle.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 65fc4f0d80a..2b14cd17d34 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -101,7 +101,7 @@ casify_object (flag, obj)
101 { 101 {
102 /* The work is not yet finished because of a multibyte 102 /* The work is not yet finished because of a multibyte
103 character just encountered. */ 103 character just encountered. */
104 int fromlen, tolen, j = i, j_byte = i; 104 int fromlen, tolen, j_byte = i;
105 char *buf 105 char *buf
106 = (char *) alloca ((len - i) * MAX_LENGTH_OF_MULTI_BYTE_FORM 106 = (char *) alloca ((len - i) * MAX_LENGTH_OF_MULTI_BYTE_FORM
107 + i); 107 + i);
@@ -123,13 +123,11 @@ casify_object (flag, obj)
123 tolen = CHAR_STRING (c, workbuf, str); 123 tolen = CHAR_STRING (c, workbuf, str);
124 bcopy (str, buf + j_byte, tolen); 124 bcopy (str, buf + j_byte, tolen);
125 i += fromlen; 125 i += fromlen;
126 j++;
127 j_byte += tolen; 126 j_byte += tolen;
128 if ((int) flag >= (int) CASE_CAPITALIZE) 127 if ((int) flag >= (int) CASE_CAPITALIZE)
129 inword = SYNTAX (c) == Sword; 128 inword = SYNTAX (c) == Sword;
130 } 129 }
131 obj = make_specified_string (buf, j, j_byte, 130 obj = make_string (buf, j_byte);
132 STRING_MULTIBYTE (obj));
133 } 131 }
134 return obj; 132 return obj;
135 } 133 }