]> git.eshelyaron.com Git - emacs.git/commitdiff
(casify_object): Use make_string instead of
authorKenichi Handa <handa@m17n.org>
Sat, 17 Oct 1998 01:58:01 +0000 (01:58 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 17 Oct 1998 01:58:01 +0000 (01:58 +0000)
make_specified_string to cope with byte-combining situation.

src/casefiddle.c

index 65fc4f0d80a7ad15fb4daefe602b7417d2b0b3d3..2b14cd17d34476cc536e23f2ba1a4bb049b2363d 100644 (file)
@@ -101,7 +101,7 @@ casify_object (flag, obj)
            {
              /* The work is not yet finished because of a multibyte
                 character just encountered.  */
-             int fromlen, tolen, j = i, j_byte = i;
+             int fromlen, tolen, j_byte = i;
              char *buf
                = (char *) alloca ((len - i) * MAX_LENGTH_OF_MULTI_BYTE_FORM
                                   + i);
@@ -123,13 +123,11 @@ casify_object (flag, obj)
                  tolen = CHAR_STRING (c, workbuf, str);
                  bcopy (str, buf + j_byte, tolen);
                  i += fromlen;
-                 j++;
                  j_byte += tolen;
                  if ((int) flag >= (int) CASE_CAPITALIZE)
                    inword = SYNTAX (c) == Sword;
                }
-             obj = make_specified_string (buf, j, j_byte,
-                                          STRING_MULTIBYTE (obj));
+             obj = make_string (buf, j_byte);
            }
          return obj;
        }