emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fns.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/fns.c
Date: Sun, 16 Feb 2003 19:32:12 -0500

Index: emacs/src/fns.c
diff -c emacs/src/fns.c:1.332 emacs/src/fns.c:1.333
*** emacs/src/fns.c:1.332       Fri Feb 14 13:56:16 2003
--- emacs/src/fns.c     Sun Feb 16 19:32:12 2003
***************
*** 1053,1062 ****
      return string;
  
    nbytes = parse_str_to_multibyte (SDATA (string), SBYTES (string));
!   /* If all the chars are ASCII, they won't need any more bytes
!      once converted.  In that case, we can return STRING itself.  */
    if (nbytes == SBYTES (string))
!     return string;
  
    buf = (unsigned char *) alloca (nbytes);
    bcopy (SDATA (string), buf, SBYTES (string));
--- 1053,1062 ----
      return string;
  
    nbytes = parse_str_to_multibyte (SDATA (string), SBYTES (string));
!   /* If all the chars are ASCII or eight-bit-graphic, they won't need
!      any more bytes once converted.  */
    if (nbytes == SBYTES (string))
!     return make_multibyte_string (SDATA (string), nbytes, nbytes);
  
    buf = (unsigned char *) alloca (nbytes);
    bcopy (SDATA (string), buf, SBYTES (string));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]