emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Ken Raeburn
Subject: [Emacs-diffs] Changes to emacs/src/casefiddle.c
Date: Sun, 14 Jul 2002 20:00:44 -0400

Index: emacs/src/casefiddle.c
diff -c emacs/src/casefiddle.c:1.40 emacs/src/casefiddle.c:1.41
*** emacs/src/casefiddle.c:1.40 Fri Nov  2 15:18:37 2001
--- emacs/src/casefiddle.c      Sun Jul 14 20:00:35 2002
***************
*** 68,79 ****
          int multibyte = STRING_MULTIBYTE (obj);
  
          obj = Fcopy_sequence (obj);
!         len = STRING_BYTES (XSTRING (obj));
  
          /* Scan all single-byte characters from start of string.  */
          for (i = 0; i < len;)
            {
!             c = XSTRING (obj)->data[i];
  
              if (multibyte && c >= 0x80)
                /* A multibyte character can't be handled in this
--- 68,79 ----
          int multibyte = STRING_MULTIBYTE (obj);
  
          obj = Fcopy_sequence (obj);
!         len = SBYTES (obj);
  
          /* Scan all single-byte characters from start of string.  */
          for (i = 0; i < len;)
            {
!             c = SREF (obj, i);
  
              if (multibyte && c >= 0x80)
                /* A multibyte character can't be handled in this
***************
*** 90,96 ****
                  : ! SINGLE_BYTE_CHAR_P (c))
                break;
  
!             XSTRING (obj)->data[i] = c;
              if ((int) flag >= (int) CASE_CAPITALIZE)
                inword = SYNTAX (c) == Sword;
              i++;
--- 90,96 ----
                  : ! SINGLE_BYTE_CHAR_P (c))
                break;
  
!             SREF (obj, i) = c;
              if ((int) flag >= (int) CASE_CAPITALIZE)
                inword = SYNTAX (c) == Sword;
              i++;
***************
*** 107,118 ****
                = (char *) alloca ((len - i) * MAX_MULTIBYTE_LENGTH + i);
  
              /* Copy data already handled.  */
!             bcopy (XSTRING (obj)->data, buf, i);
  
              /* From now on, I counts bytes.  */
              while (i < len)
                {
!                 c = STRING_CHAR_AND_LENGTH (XSTRING (obj)->data + i,
                                              len - i, fromlen);
                  if (inword && flag != CASE_CAPITALIZE_UP)
                    c = DOWNCASE (c);
--- 107,118 ----
                = (char *) alloca ((len - i) * MAX_MULTIBYTE_LENGTH + i);
  
              /* Copy data already handled.  */
!             bcopy (SDATA (obj), buf, i);
  
              /* From now on, I counts bytes.  */
              while (i < len)
                {
!                 c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i,
                                              len - i, fromlen);
                  if (inword && flag != CASE_CAPITALIZE_UP)
                    c = DOWNCASE (c);
***************
*** 124,130 ****
                  if ((int) flag >= (int) CASE_CAPITALIZE)
                    inword = SYNTAX (c) == Sword;
                }
!             obj = make_multibyte_string (buf, XSTRING (obj)->size,
                                           j_byte);
            }
          return obj;
--- 124,130 ----
                  if ((int) flag >= (int) CASE_CAPITALIZE)
                    inword = SYNTAX (c) == Sword;
                }
!             obj = make_multibyte_string (buf, SCHARS (obj),
                                           j_byte);
            }
          return obj;



reply via email to

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