emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src ChangeLog buffer.c buffer.h casefiddl...


From: Andreas Schwab
Subject: [Emacs-diffs] emacs/src ChangeLog buffer.c buffer.h casefiddl...
Date: Sat, 21 Nov 2009 11:52:33 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Andreas Schwab <schwab> 09/11/21 11:52:31

Modified files:
        src            : ChangeLog buffer.c buffer.h casefiddle.c 
                         character.c character.h composite.c data.c 
                         doc.c editfns.c fileio.c fns.c font.c indent.c 
                         insdel.c lread.c print.c process.c regex.c 
                         search.c syntax.c xdisp.c xterm.c 

Log message:
        * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Remove
        ignored second argument.  All callers changed.
        * regex.c (STRING_CHAR, STRING_CHAR_AND_LENGTH, RE_STRING_CHAR)
        (RE_STRING_CHAR_AND_LENGTH): Likewise.
        * xdisp.c (string_char_and_length): Likewise.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7887&r2=1.7888
http://cvs.savannah.gnu.org/viewcvs/emacs/src/buffer.c?cvsroot=emacs&r1=1.590&r2=1.591
http://cvs.savannah.gnu.org/viewcvs/emacs/src/buffer.h?cvsroot=emacs&r1=1.129&r2=1.130
http://cvs.savannah.gnu.org/viewcvs/emacs/src/casefiddle.c?cvsroot=emacs&r1=1.71&r2=1.72
http://cvs.savannah.gnu.org/viewcvs/emacs/src/character.c?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/src/character.h?cvsroot=emacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/emacs/src/composite.c?cvsroot=emacs&r1=1.75&r2=1.76
http://cvs.savannah.gnu.org/viewcvs/emacs/src/data.c?cvsroot=emacs&r1=1.306&r2=1.307
http://cvs.savannah.gnu.org/viewcvs/emacs/src/doc.c?cvsroot=emacs&r1=1.139&r2=1.140
http://cvs.savannah.gnu.org/viewcvs/emacs/src/editfns.c?cvsroot=emacs&r1=1.475&r2=1.476
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fileio.c?cvsroot=emacs&r1=1.663&r2=1.664
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fns.c?cvsroot=emacs&r1=1.468&r2=1.469
http://cvs.savannah.gnu.org/viewcvs/emacs/src/font.c?cvsroot=emacs&r1=1.143&r2=1.144
http://cvs.savannah.gnu.org/viewcvs/emacs/src/indent.c?cvsroot=emacs&r1=1.222&r2=1.223
http://cvs.savannah.gnu.org/viewcvs/emacs/src/insdel.c?cvsroot=emacs&r1=1.210&r2=1.211
http://cvs.savannah.gnu.org/viewcvs/emacs/src/lread.c?cvsroot=emacs&r1=1.420&r2=1.421
http://cvs.savannah.gnu.org/viewcvs/emacs/src/print.c?cvsroot=emacs&r1=1.264&r2=1.265
http://cvs.savannah.gnu.org/viewcvs/emacs/src/process.c?cvsroot=emacs&r1=1.603&r2=1.604
http://cvs.savannah.gnu.org/viewcvs/emacs/src/regex.c?cvsroot=emacs&r1=1.239&r2=1.240
http://cvs.savannah.gnu.org/viewcvs/emacs/src/search.c?cvsroot=emacs&r1=1.246&r2=1.247
http://cvs.savannah.gnu.org/viewcvs/emacs/src/syntax.c?cvsroot=emacs&r1=1.227&r2=1.228
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xdisp.c?cvsroot=emacs&r1=1.1321&r2=1.1322
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xterm.c?cvsroot=emacs&r1=1.1054&r2=1.1055

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7887
retrieving revision 1.7888
diff -u -b -r1.7887 -r1.7888
--- ChangeLog   21 Nov 2009 02:33:45 -0000      1.7887
+++ ChangeLog   21 Nov 2009 11:52:23 -0000      1.7888
@@ -1,3 +1,11 @@
+2009-11-21  Andreas Schwab  <address@hidden>
+
+       * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Remove
+       ignored second argument.  All callers changed.
+       * regex.c (STRING_CHAR, STRING_CHAR_AND_LENGTH, RE_STRING_CHAR)
+       (RE_STRING_CHAR_AND_LENGTH): Likewise.
+       * xdisp.c (string_char_and_length): Likewise.
+
 2009-11-21  Dan Nicolaescu  <address@hidden>
 
        * xterm.c (x_new_font):

Index: buffer.c
===================================================================
RCS file: /sources/emacs/emacs/src/buffer.c,v
retrieving revision 1.590
retrieving revision 1.591
diff -u -b -r1.590 -r1.591
--- buffer.c    11 Nov 2009 19:25:25 -0000      1.590
+++ buffer.c    21 Nov 2009 11:52:26 -0000      1.591
@@ -2409,7 +2409,7 @@
            p++, pos++;
          else if (CHAR_BYTE8_HEAD_P (*p))
            {
-             c = STRING_CHAR_AND_LENGTH (p, stop - pos, bytes);
+             c = STRING_CHAR_AND_LENGTH (p, bytes);
              /* Delete all bytes for this 8-bit character but the
                 last one, and change the last one to the charcter
                 code.  */

Index: buffer.h
===================================================================
RCS file: /sources/emacs/emacs/src/buffer.h,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -b -r1.129 -r1.130
--- buffer.h    18 Oct 2009 03:08:34 -0000      1.129
+++ buffer.h    21 Nov 2009 11:52:26 -0000      1.130
@@ -330,7 +330,7 @@
 #define FETCH_MULTIBYTE_CHAR(pos)                                      \
   (_fetch_multibyte_char_p = (((pos) >= GPT_BYTE ? GAP_SIZE : 0)       \
                               + (pos) + BEG_ADDR - BEG_BYTE),          \
-   STRING_CHAR (_fetch_multibyte_char_p, 0))
+   STRING_CHAR (_fetch_multibyte_char_p))
 
 /* Return character at position POS.  If the current buffer is unibyte
    and the character is not ASCII, make the returning character
@@ -389,7 +389,7 @@
   (_fetch_multibyte_char_p                                             \
      = (((pos) >= BUF_GPT_BYTE (buf) ? BUF_GAP_SIZE (buf) : 0)         \
         + (pos) + BUF_BEG_ADDR (buf) - BEG_BYTE),                      \
-   STRING_CHAR (_fetch_multibyte_char_p, 0))
+   STRING_CHAR (_fetch_multibyte_char_p))
 
 /* Define the actual buffer data structures.  */
 

Index: casefiddle.c
===================================================================
RCS file: /sources/emacs/emacs/src/casefiddle.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- casefiddle.c        6 Nov 2009 06:50:54 -0000       1.71
+++ casefiddle.c        21 Nov 2009 11:52:26 -0000      1.72
@@ -133,7 +133,7 @@
              bcopy (old_dst, dst, o - old_dst);
              o = dst + (o - old_dst);
            }
-         c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i_byte, 0, len);
+         c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i_byte, len);
          if (inword && flag != CASE_CAPITALIZE_UP)
            c = DOWNCASE (c);
          else if (!UPPERCASEP (c)

Index: character.c
===================================================================
RCS file: /sources/emacs/emacs/src/character.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- character.c 6 Nov 2009 06:50:54 -0000       1.29
+++ character.c 21 Nov 2009 11:52:26 -0000      1.30
@@ -405,7 +405,7 @@
     {
       int bytes, thiswidth;
       Lisp_Object val;
-      int c = STRING_CHAR_AND_LENGTH (str + i_byte, len - i_byte, bytes);
+      int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
 
       if (dp)
        {
@@ -495,7 +495,7 @@
          int c;
 
          if (multibyte)
-           c = STRING_CHAR_AND_LENGTH (str + i_byte, len - i_byte, bytes);
+           c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
          else
            c = str[i_byte], bytes = 1;
          chars = 1;
@@ -1061,7 +1061,7 @@
       if (! STRING_MULTIBYTE (string))
        return make_number (*p);
     }
-  c = STRING_CHAR (p, 0);
+  c = STRING_CHAR (p);
   if (CHAR_BYTE8_P (c))
     c = CHAR_TO_BYTE8 (c);
   else if (! ASCII_CHAR_P (c))

Index: character.h
===================================================================
RCS file: /sources/emacs/emacs/src/character.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- character.h 6 Nov 2009 06:07:48 -0000       1.18
+++ character.h 21 Nov 2009 11:52:26 -0000      1.19
@@ -311,10 +311,9 @@
   } while (0)
 
 /* Return the character code of character whose multibyte form is at
-   P.  The argument LEN is ignored.  It will be removed in the
-   future.  */
+   P.  */
 
-#define STRING_CHAR(p, len)                                    \
+#define STRING_CHAR(p)                                         \
   (!((p)[0] & 0x80)                                            \
    ? (p)[0]                                                    \
    : ! ((p)[0] & 0x20)                                         \
@@ -329,10 +328,9 @@
 
 
 /* Like STRING_CHAR, but set ACTUAL_LEN to the length of multibyte
-   form.  The argument LEN is ignored.  It will be removed in the
-   future.  */
+   form.  */
 
-#define STRING_CHAR_AND_LENGTH(p, len, actual_len)             \
+#define STRING_CHAR_AND_LENGTH(p, actual_len)                  \
   (!((p)[0] & 0x80)                                            \
    ? ((actual_len) = 1, (p)[0])                                        \
    : ! ((p)[0] & 0x20)                                         \
@@ -382,7 +380,7 @@
          unsigned char *ptr = &SDATA (STRING)[BYTEIDX];                \
          int len;                                                      \
                                                                        \
-         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, 0, len);                \
+         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);                   \
          BYTEIDX += len;                                               \
        }                                                               \
       else                                                             \
@@ -405,7 +403,7 @@
          unsigned char *ptr = &SDATA (STRING)[BYTEIDX];                      \
          int len;                                                            \
                                                                              \
-         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, 0, len);                      \
+         OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);                         \
          BYTEIDX += len;                                                     \
        }                                                                     \
       else                                                                   \
@@ -426,7 +424,7 @@
       unsigned char *ptr = &SDATA (STRING)[BYTEIDX];                        \
       int len;                                                              \
                                                                             \
-      OUTPUT = STRING_CHAR_AND_LENGTH (ptr, 0, len);                        \
+      OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);                           \
       BYTEIDX += len;                                                       \
       CHARIDX++;                                                            \
     }                                                                       \
@@ -445,7 +443,7 @@
          unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX);         \
          int len;                                              \
                                                                \
-         OUTPUT= STRING_CHAR_AND_LENGTH (ptr, 0, len);         \
+         OUTPUT= STRING_CHAR_AND_LENGTH (ptr, len);            \
          BYTEIDX += len;                                       \
        }                                                       \
       else                                                     \
@@ -465,7 +463,7 @@
       unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX);            \
       int len;                                                 \
                                                                \
-      OUTPUT= STRING_CHAR_AND_LENGTH (ptr, 0, len);            \
+      OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len);              \
       BYTEIDX += len;                                          \
       CHARIDX++;                                               \
     }                                                          \

Index: composite.c
===================================================================
RCS file: /sources/emacs/emacs/src/composite.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- composite.c 6 Nov 2009 06:50:55 -0000       1.75
+++ composite.c 21 Nov 2009 11:52:26 -0000      1.76
@@ -1321,7 +1321,7 @@
  retry:
   check_val = Qnil;
   /* At first, check if POS is composable.  */
-  c = STRING_CHAR (cur.p, 0);
+  c = STRING_CHAR (cur.p);
   if (! CHAR_COMPOSABLE_P (c))
     {
       if (limit < 0)
@@ -1347,7 +1347,7 @@
                fore_check_limit = cur.pos;
                break;
              }
-           c = STRING_CHAR (cur.p, 0);
+           c = STRING_CHAR (cur.p);
            if (! CHAR_COMPOSABLE_P (c))
              break;
            val = CHAR_TABLE_REF (Vcomposition_function_table, c);
@@ -1368,7 +1368,7 @@
       if (get_property_and_range (cur.pos, Qcomposition, &val, &b, &e, Qnil)
          && COMPOSITION_VALID_P (b, e, val))
        break;
-      c = STRING_CHAR (cur.p, 0);
+      c = STRING_CHAR (cur.p);
       if (! CHAR_COMPOSABLE_P (c))
        break;
       val = CHAR_TABLE_REF (Vcomposition_function_table, c);
@@ -1391,7 +1391,7 @@
 
          if (NILP (check_val))
            {
-             c = STRING_CHAR (cur.p, 0);
+             c = STRING_CHAR (cur.p);
              check_val = CHAR_TABLE_REF (Vcomposition_function_table, c);
            }
          for (; CONSP (check_val); check_val = XCDR (check_val))

Index: data.c
===================================================================
RCS file: /sources/emacs/emacs/src/data.c,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -b -r1.306 -r1.307
--- data.c      6 Nov 2009 18:47:51 -0000       1.306
+++ data.c      21 Nov 2009 11:52:27 -0000      1.307
@@ -2007,8 +2007,7 @@
        return make_number ((unsigned char) SREF (array, idxval));
       idxval_byte = string_char_to_byte (array, idxval);
 
-      c = STRING_CHAR (SDATA (array) + idxval_byte,
-                      SBYTES (array) - idxval_byte);
+      c = STRING_CHAR (SDATA (array) + idxval_byte);
       return make_number (c);
     }
   else if (BOOL_VECTOR_P (array))

Index: doc.c
===================================================================
RCS file: /sources/emacs/emacs/src/doc.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -b -r1.139 -r1.140
--- doc.c       11 Nov 2009 06:10:44 -0000      1.139
+++ doc.c       21 Nov 2009 11:52:27 -0000      1.140
@@ -767,9 +767,8 @@
          if (multibyte)
            {
              int len;
-             int maxlen = SDATA (string) + SBYTES (string) - strp;
 
-             STRING_CHAR_AND_LENGTH (strp, maxlen, len);
+             STRING_CHAR_AND_LENGTH (strp, len);
              if (len == 1)
                *bufp = *strp;
              else
@@ -931,9 +930,8 @@
       else
        {
          int len;
-         int maxlen = SDATA (string) + SBYTES (string) - strp;
 
-         STRING_CHAR_AND_LENGTH (strp, maxlen, len);
+         STRING_CHAR_AND_LENGTH (strp, len);
          if (len == 1)
            *bufp = *strp;
          else

Index: editfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/editfns.c,v
retrieving revision 1.475
retrieving revision 1.476
diff -u -b -r1.475 -r1.476
--- editfns.c   6 Nov 2009 06:50:55 -0000       1.475
+++ editfns.c   21 Nov 2009 11:52:27 -0000      1.476
@@ -231,7 +231,7 @@
   if (SCHARS (string))
     {
       if (STRING_MULTIBYTE (string))
-       XSETFASTINT (val, STRING_CHAR (SDATA (string), SBYTES (string)));
+       XSETFASTINT (val, STRING_CHAR (SDATA (string)));
       else
        XSETFASTINT (val, SREF (string, 0));
     }
@@ -2983,7 +2983,7 @@
                      memcpy (newbuf, buf, sizeof (int) * buf_used);
                      buf = newbuf;
                    }
-                 buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, 0, len);
+                 buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len);
                  pos_byte += len;
                }
              if (XINT (AREF (elt, i)) != buf[i])
@@ -3052,7 +3052,7 @@
       Lisp_Object val;
 
       if (multibyte)
-       oc = STRING_CHAR_AND_LENGTH (p, MAX_MULTIBYTE_LENGTH, len);
+       oc = STRING_CHAR_AND_LENGTH (p, len);
       else
        oc = *p, len = 1;
       if (oc < size)
@@ -3064,8 +3064,7 @@
              if (string_multibyte)
                {
                  str = tt + string_char_to_byte (table, oc);
-                 nc = STRING_CHAR_AND_LENGTH (str, MAX_MULTIBYTE_LENGTH,
-                                              str_len);
+                 nc = STRING_CHAR_AND_LENGTH (str, str_len);
                }
              else
                {

Index: fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.663
retrieving revision 1.664
diff -u -b -r1.663 -r1.664
--- fileio.c    11 Nov 2009 20:11:53 -0000      1.663
+++ fileio.c    21 Nov 2009 11:52:27 -0000      1.664
@@ -277,7 +277,7 @@
            int c;
 
            str = (char *) SDATA (errstring);
-           c = STRING_CHAR (str, 0);
+           c = STRING_CHAR (str);
            Faset (errstring, make_number (0), make_number (DOWNCASE (c)));
          }
 

Index: fns.c
===================================================================
RCS file: /sources/emacs/emacs/src/fns.c,v
retrieving revision 1.468
retrieving revision 1.469
diff -u -b -r1.468 -r1.469
--- fns.c       11 Nov 2009 20:11:53 -0000      1.468
+++ fns.c       21 Nov 2009 11:52:27 -0000      1.469
@@ -1711,8 +1711,7 @@
        {
          if (STRING_MULTIBYTE (seq))
            {
-             c = STRING_CHAR (SDATA (seq) + ibyte,
-                              SBYTES (seq) - ibyte);
+             c = STRING_CHAR (SDATA (seq) + ibyte);
              cbytes = CHAR_BYTES (c);
            }
          else
@@ -1742,8 +1741,7 @@
            {
              if (STRING_MULTIBYTE (seq))
                {
-                 c = STRING_CHAR (SDATA (seq) + ibyte,
-                                  SBYTES (seq) - ibyte);
+                 c = STRING_CHAR (SDATA (seq) + ibyte);
                  cbytes = CHAR_BYTES (c);
                }
              else
@@ -3363,7 +3361,7 @@
     {
       if (multibyte)
        {
-         c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes);
+         c = STRING_CHAR_AND_LENGTH (from + i, bytes);
          if (CHAR_BYTE8_P (c))
            c = CHAR_TO_BYTE8 (c);
          else if (c >= 256)
@@ -3403,7 +3401,7 @@
 
       if (multibyte)
        {
-         c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes);
+         c = STRING_CHAR_AND_LENGTH (from + i, bytes);
          if (CHAR_BYTE8_P (c))
            c = CHAR_TO_BYTE8 (c);
          else if (c >= 256)
@@ -3427,7 +3425,7 @@
 
       if (multibyte)
        {
-         c = STRING_CHAR_AND_LENGTH (from + i, length - i, bytes);
+         c = STRING_CHAR_AND_LENGTH (from + i, bytes);
          if (CHAR_BYTE8_P (c))
            c = CHAR_TO_BYTE8 (c);
          else if (c >= 256)

Index: font.c
===================================================================
RCS file: /sources/emacs/emacs/src/font.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -b -r1.143 -r1.144
--- font.c      17 Nov 2009 08:21:34 -0000      1.143
+++ font.c      21 Nov 2009 11:52:27 -0000      1.144
@@ -3863,7 +3863,7 @@
              EMACS_INT pos_byte = string_char_to_byte (string, pos);
 
              str = SDATA (string) + pos_byte;
-             c = STRING_CHAR (str, 0);
+             c = STRING_CHAR (str);
            }
          else
            c = SDATA (string)[pos];

Index: indent.c
===================================================================
RCS file: /sources/emacs/emacs/src/indent.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -b -r1.222 -r1.223
--- indent.c    19 Oct 2009 04:27:16 -0000      1.222
+++ indent.c    21 Nov 2009 11:52:28 -0000      1.223
@@ -295,7 +295,7 @@
     int c;                                                             \
                                                                        \
     wide_column = 0;                                                   \
-    c = STRING_CHAR_AND_LENGTH (p, MAX_MULTIBYTE_LENGTH, bytes);       \
+    c = STRING_CHAR_AND_LENGTH (p, bytes);                             \
     if (BYTES_BY_CHAR_HEAD (*p) != bytes)                              \
       width = bytes * 4;                                               \
     else                                                               \

Index: insdel.c
===================================================================
RCS file: /sources/emacs/emacs/src/insdel.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -b -r1.210 -r1.211
--- insdel.c    19 Nov 2009 01:40:26 -0000      1.210
+++ insdel.c    21 Nov 2009 11:52:28 -0000      1.211
@@ -648,7 +648,7 @@
       while (bytes_left > 0)
        {
          int thislen, c;
-         c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen);
+         c = STRING_CHAR_AND_LENGTH (from_addr, thislen);
          if (! ASCII_CHAR_P (c))
            c &= 0xFF;
          *to_addr++ = c;

Index: lread.c
===================================================================
RCS file: /sources/emacs/emacs/src/lread.c,v
retrieving revision 1.420
retrieving revision 1.421
diff -u -b -r1.420 -r1.421
--- lread.c     19 Nov 2009 22:10:41 -0000      1.420
+++ lread.c     21 Nov 2009 11:52:28 -0000      1.421
@@ -303,7 +303,7 @@
          /* Fetch the character code from the buffer.  */
          unsigned char *p = BUF_BYTE_ADDRESS (inbuffer, pt_byte);
          BUF_INC_POS (inbuffer, pt_byte);
-         c = STRING_CHAR (p, pt_byte - orig_pt_byte);
+         c = STRING_CHAR (p);
          if (multibyte)
            *multibyte = 1;
        }
@@ -332,7 +332,7 @@
          /* Fetch the character code from the buffer.  */
          unsigned char *p = BUF_BYTE_ADDRESS (inbuffer, bytepos);
          BUF_INC_POS (inbuffer, bytepos);
-         c = STRING_CHAR (p, bytepos - orig_bytepos);
+         c = STRING_CHAR (p);
          if (multibyte)
            *multibyte = 1;
        }
@@ -439,7 +439,7 @@
        }
       buf[i++] = c;
     }
-  return STRING_CHAR (buf, i);
+  return STRING_CHAR (buf);
 }
 
 /* Unread the character C in the way appropriate for the stream READCHARFUN.

Index: print.c
===================================================================
RCS file: /sources/emacs/emacs/src/print.c,v
retrieving revision 1.264
retrieving revision 1.265
diff -u -b -r1.264 -r1.265
--- print.c     21 Nov 2009 02:33:47 -0000      1.264
+++ print.c     21 Nov 2009 11:52:28 -0000      1.265
@@ -401,7 +401,7 @@
          int len;
          for (i = 0; i < size_byte; i += len)
            {
-             int ch = STRING_CHAR_AND_LENGTH (ptr + i, size_byte - i, len);
+             int ch = STRING_CHAR_AND_LENGTH (ptr + i, len);
              insert_char (ch);
            }
        }
@@ -427,7 +427,7 @@
                 corresponding character code before handing it to
                 PRINTCHAR.  */
              int len;
-             int ch = STRING_CHAR_AND_LENGTH (ptr + i, size_byte - i, len);
+             int ch = STRING_CHAR_AND_LENGTH (ptr + i, len);
              PRINTCHAR (ch);
              i += len;
            }
@@ -519,8 +519,7 @@
            /* Here, we must convert each multi-byte form to the
               corresponding character code before handing it to PRINTCHAR.  */
            int len;
-           int ch = STRING_CHAR_AND_LENGTH (SDATA (string) + i,
-                                            size_byte - i, len);
+           int ch = STRING_CHAR_AND_LENGTH (SDATA (string) + i, len);
            PRINTCHAR (ch);
            i += len;
          }
@@ -1645,8 +1644,7 @@
 
              if (multibyte)
                {
-                 c = STRING_CHAR_AND_LENGTH (str + i_byte,
-                                             size_byte - i_byte, len);
+                 c = STRING_CHAR_AND_LENGTH (str + i_byte, len);
                  i_byte += len;
                }
              else

Index: process.c
===================================================================
RCS file: /sources/emacs/emacs/src/process.c,v
retrieving revision 1.603
retrieving revision 1.604
diff -u -b -r1.603 -r1.604
--- process.c   11 Nov 2009 20:11:54 -0000      1.603
+++ process.c   21 Nov 2009 11:52:28 -0000      1.604
@@ -477,7 +477,7 @@
          if (! NILP (Vlocale_coding_system))
            string = (code_convert_string_norecord
                      (string, Vlocale_coding_system, 0));
-         c1 = STRING_CHAR ((char *) SDATA (string), 0);
+         c1 = STRING_CHAR ((char *) SDATA (string));
          c2 = DOWNCASE (c1);
          if (c1 != c2)
            Faset (string, make_number (0), make_number (c2));

Index: regex.c
===================================================================
RCS file: /sources/emacs/emacs/src/regex.c,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -b -r1.239 -r1.240
--- regex.c     19 Oct 2009 04:27:18 -0000      1.239
+++ regex.c     21 Nov 2009 11:52:28 -0000      1.240
@@ -147,10 +147,10 @@
 
 # define RE_MULTIBYTE_P(bufp) ((bufp)->multibyte)
 # define RE_TARGET_MULTIBYTE_P(bufp) ((bufp)->target_multibyte)
-# define RE_STRING_CHAR(p, s, multibyte) \
-  (multibyte ? (STRING_CHAR (p, s)) : (*(p)))
-# define RE_STRING_CHAR_AND_LENGTH(p, s, len, multibyte) \
-  (multibyte ? (STRING_CHAR_AND_LENGTH (p, s, len)) : ((len) = 1, *(p)))
+# define RE_STRING_CHAR(p, multibyte) \
+  (multibyte ? (STRING_CHAR (p)) : (*(p)))
+# define RE_STRING_CHAR_AND_LENGTH(p, len, multibyte) \
+  (multibyte ? (STRING_CHAR_AND_LENGTH (p, len)) : ((len) = 1, *(p)))
 
 # define RE_CHAR_TO_MULTIBYTE(c) UNIBYTE_TO_CHAR (c)
 
@@ -166,7 +166,7 @@
        re_char *dtemp = (p) == (str2) ? (end1) : (p);                       \
        re_char *dlimit = ((p) > (str2) && (p) <= (end2)) ? (str2) : (str1); \
        while (dtemp-- > dlimit && !CHAR_HEAD_P (*dtemp));                   \
-       c = STRING_CHAR (dtemp, (p) - dtemp);                                \
+       c = STRING_CHAR (dtemp);                                             \
       }                                                                        
     \
     else                                                                    \
       {                                                                        
     \
@@ -180,7 +180,7 @@
 # define GET_CHAR_AFTER(c, p, len)             \
   do {                                         \
     if (target_multibyte)                      \
-      (c) = STRING_CHAR_AND_LENGTH (p, 0, len);        \
+      (c) = STRING_CHAR_AND_LENGTH (p, len);   \
     else                                       \
       {                                                \
        (c) = *p;                               \
@@ -302,11 +302,11 @@
 # define SAME_CHARSET_P(c1, c2) (1)
 # define MULTIBYTE_FORM_LENGTH(p, s) (1)
 # define PREV_CHAR_BOUNDARY(p, limit) ((p)--)
-# define STRING_CHAR(p, s) (*(p))
-# define RE_STRING_CHAR(p, s, multibyte) STRING_CHAR ((p), (s))
+# define STRING_CHAR(p) (*(p))
+# define RE_STRING_CHAR(p, multibyte) STRING_CHAR (p)
 # define CHAR_STRING(c, s) (*(s) = (c), 1)
-# define STRING_CHAR_AND_LENGTH(p, s, actual_len) ((actual_len) = 1, *(p))
-# define RE_STRING_CHAR_AND_LENGTH(p, s, len, multibyte) 
STRING_CHAR_AND_LENGTH ((p), (s), (len))
+# define STRING_CHAR_AND_LENGTH(p, actual_len) ((actual_len) = 1, *(p))
+# define RE_STRING_CHAR_AND_LENGTH(p, len, multibyte) STRING_CHAR_AND_LENGTH 
(p, len)
 # define RE_CHAR_TO_MULTIBYTE(c) (c)
 # define RE_CHAR_TO_UNIBYTE(c) (c)
 # define GET_CHAR_BEFORE_2(c, p, str1, end1, str2, end2) \
@@ -1757,7 +1757,7 @@
   do {                                                                 \
     int len;                                                           \
     if (p == pend) return REG_EEND;                                    \
-    c = RE_STRING_CHAR_AND_LENGTH (p, pend - p, len, multibyte);       \
+    c = RE_STRING_CHAR_AND_LENGTH (p, len, multibyte);                 \
     p += len;                                                          \
   } while (0)
 
@@ -4541,8 +4541,7 @@
                      {
                        int buf_charlen;
 
-                       buf_ch = STRING_CHAR_AND_LENGTH (d, range - lim,
-                                                        buf_charlen);
+                       buf_ch = STRING_CHAR_AND_LENGTH (d, buf_charlen);
                        buf_ch = RE_TRANSLATE (translate, buf_ch);
                        if (fastmap[CHAR_LEADING_CODE (buf_ch)])
                          break;
@@ -4574,8 +4573,7 @@
                      {
                        int buf_charlen;
 
-                       buf_ch = STRING_CHAR_AND_LENGTH (d, range - lim,
-                                                        buf_charlen);
+                       buf_ch = STRING_CHAR_AND_LENGTH (d, buf_charlen);
                        if (fastmap[CHAR_LEADING_CODE (buf_ch)])
                          break;
                        range -= buf_charlen;
@@ -4592,12 +4590,9 @@
            }
          else                          /* Searching backwards.  */
            {
-             int room = (startpos >= size1
-                         ? size2 + size1 - startpos
-                         : size1 - startpos);
              if (multibyte)
                {
-                 buf_ch = STRING_CHAR (d, room);
+                 buf_ch = STRING_CHAR (d);
                  buf_ch = TRANSLATE (buf_ch);
                  if (! fastmap[CHAR_LEADING_CODE (buf_ch)])
                    goto advance;
@@ -4888,11 +4883,11 @@
       {
        register re_wchar_t c
          = (re_opcode_t) *p2 == endline ? '\n'
-         : RE_STRING_CHAR (p2 + 2, pend - p2 - 2, multibyte);
+         : RE_STRING_CHAR (p2 + 2, multibyte);
 
        if ((re_opcode_t) *p1 == exactn)
          {
-           if (c != RE_STRING_CHAR (p1 + 2, pend - p1 - 2, multibyte))
+           if (c != RE_STRING_CHAR (p1 + 2, multibyte))
              {
                DEBUG_PRINT3 ("  '%c' != '%c' => fast loop.\n", c, p1[2]);
                return 1;
@@ -5543,13 +5538,13 @@
 
                PREFETCH ();
                if (multibyte)
-                 pat_ch = STRING_CHAR_AND_LENGTH (p, pend - p, pat_charlen);
+                 pat_ch = STRING_CHAR_AND_LENGTH (p, pat_charlen);
                else
                  {
                    pat_ch = RE_CHAR_TO_MULTIBYTE (*p);
                    pat_charlen = 1;
                  }
-               buf_ch = STRING_CHAR_AND_LENGTH (d, dend - d, buf_charlen);
+               buf_ch = STRING_CHAR_AND_LENGTH (d, buf_charlen);
 
                if (TRANSLATE (buf_ch) != pat_ch)
                  {
@@ -5571,7 +5566,7 @@
                PREFETCH ();
                if (multibyte)
                  {
-                   pat_ch = STRING_CHAR_AND_LENGTH (p, pend - p, pat_charlen);
+                   pat_ch = STRING_CHAR_AND_LENGTH (p, pat_charlen);
                    pat_ch = RE_CHAR_TO_UNIBYTE (pat_ch);
                  }
                else
@@ -5611,7 +5606,7 @@
            DEBUG_PRINT1 ("EXECUTING anychar.\n");
 
            PREFETCH ();
-           buf_ch = RE_STRING_CHAR_AND_LENGTH (d, dend - d, buf_charlen,
+           buf_ch = RE_STRING_CHAR_AND_LENGTH (d, buf_charlen,
                                                target_multibyte);
            buf_ch = TRANSLATE (buf_ch);
 
@@ -5659,7 +5654,7 @@
              }
 
            PREFETCH ();
-           c = RE_STRING_CHAR_AND_LENGTH (d, dend - d, len, target_multibyte);
+           c = RE_STRING_CHAR_AND_LENGTH (d, len, target_multibyte);
            if (target_multibyte)
              {
                int c1;
@@ -6257,7 +6252,7 @@
              UPDATE_SYNTAX_TABLE (charpos);
 #endif
              PREFETCH ();
-             c2 = RE_STRING_CHAR (d, dend - d, target_multibyte);
+             c2 = RE_STRING_CHAR (d, target_multibyte);
              s2 = SYNTAX (c2);
 
              /* Case 2: S2 is neither Sword nor Ssymbol. */
@@ -6310,7 +6305,7 @@
              if (!AT_STRINGS_END (d))
                {
                  PREFETCH_NOLIMIT ();
-                 c2 = RE_STRING_CHAR (d, dend - d, target_multibyte);
+                 c2 = RE_STRING_CHAR (d, target_multibyte);
 #ifdef emacs
                  UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1);
 #endif

Index: search.c
===================================================================
RCS file: /sources/emacs/emacs/src/search.c,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -b -r1.246 -r1.247
--- search.c    6 Nov 2009 06:50:58 -0000       1.246
+++ search.c    21 Nov 2009 11:52:29 -0000      1.247
@@ -1387,7 +1387,7 @@
                  base_pat++;
                }
 
-             c = STRING_CHAR_AND_LENGTH (base_pat, len_byte, in_charlen);
+             c = STRING_CHAR_AND_LENGTH (base_pat, in_charlen);
 
              if (NILP (trt))
                {
@@ -1527,7 +1527,6 @@
            EMACS_INT this_pos = pos;
            EMACS_INT this_pos_byte = pos_byte;
            int this_len = len;
-           int this_len_byte = len_byte;
            unsigned char *p = pat;
            if (pos + len > lim || pos_byte + len_byte > lim_byte)
              goto stop;
@@ -1537,16 +1536,14 @@
                int charlen, buf_charlen;
                int pat_ch, buf_ch;
 
-               pat_ch = STRING_CHAR_AND_LENGTH (p, this_len_byte, charlen);
+               pat_ch = STRING_CHAR_AND_LENGTH (p, charlen);
                buf_ch = STRING_CHAR_AND_LENGTH (BYTE_POS_ADDR (this_pos_byte),
-                                                ZV_BYTE - this_pos_byte,
                                                 buf_charlen);
                TRANSLATE (buf_ch, trt, buf_ch);
 
                if (buf_ch != pat_ch)
                  break;
 
-               this_len_byte -= charlen;
                this_len--;
                p += charlen;
 
@@ -1615,7 +1612,6 @@
            EMACS_INT this_pos = pos - len;
            EMACS_INT this_pos_byte;
            int this_len = len;
-           int this_len_byte = len_byte;
            unsigned char *p = pat;
 
            if (this_pos < lim || (pos_byte - len_byte) < lim_byte)
@@ -1628,16 +1624,14 @@
                int charlen, buf_charlen;
                int pat_ch, buf_ch;
 
-               pat_ch = STRING_CHAR_AND_LENGTH (p, this_len_byte, charlen);
+               pat_ch = STRING_CHAR_AND_LENGTH (p, charlen);
                buf_ch = STRING_CHAR_AND_LENGTH (BYTE_POS_ADDR (this_pos_byte),
-                                                ZV_BYTE - this_pos_byte,
                                                 buf_charlen);
                TRANSLATE (buf_ch, trt, buf_ch);
 
                if (buf_ch != pat_ch)
                  break;
 
-               this_len_byte -= charlen;
                this_len--;
                p += charlen;
                this_pos_byte += buf_charlen;
@@ -1841,7 +1835,7 @@
 
              while (! (CHAR_HEAD_P (*charstart)))
                charstart--;
-             ch = STRING_CHAR (charstart, ptr - charstart + 1);
+             ch = STRING_CHAR (charstart);
              if (char_base != (ch & ~0x3F))
                ch = -1;
            }

Index: syntax.c
===================================================================
RCS file: /sources/emacs/emacs/src/syntax.c,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -b -r1.227 -r1.228
--- syntax.c    6 Nov 2009 06:50:59 -0000       1.227
+++ syntax.c    21 Nov 2009 11:52:29 -0000      1.228
@@ -911,8 +911,7 @@
   if (*p)
     {
       int len;
-      int character = (STRING_CHAR_AND_LENGTH
-                      (p, SBYTES (string) - 1, len));
+      int character = STRING_CHAR_AND_LENGTH (p, len);
       XSETINT (match, character);
       if (XFASTINT (match) == ' ')
        match = Qnil;
@@ -1588,12 +1587,12 @@
          unsigned char leading_code;
 
          leading_code = str[i_byte];
-         c = STRING_CHAR_AND_LENGTH (str + i_byte, size_byte-i_byte, len);
+         c = STRING_CHAR_AND_LENGTH (str + i_byte, len);
          i_byte += len;
 
          if (handle_iso_classes && c == '['
              && i_byte < size_byte
-             && STRING_CHAR (str + i_byte, size_byte - i_byte) == ':')
+             && STRING_CHAR (str + i_byte) == ':')
            {
              const unsigned char *class_beg = str + i_byte + 1;
              const unsigned char *class_end = class_beg;
@@ -1633,8 +1632,7 @@
                break;
 
              leading_code = str[i_byte];
-             c = STRING_CHAR_AND_LENGTH (str + i_byte,
-                                         size_byte - i_byte, len);
+             c = STRING_CHAR_AND_LENGTH (str + i_byte, len);
              i_byte += len;
            }
          /* Treat `-' as range character only if another character
@@ -1650,15 +1648,14 @@
 
              /* Get the end of the range.  */
              leading_code2 = str[i_byte];
-             c2 = STRING_CHAR_AND_LENGTH (str + i_byte,
-                                          size_byte - i_byte, len);
+             c2 = STRING_CHAR_AND_LENGTH (str + i_byte, len);
              i_byte += len;
 
              if (c2 == '\\'
                  && i_byte < size_byte)
                {
                  leading_code2 = str[i_byte];
-                 c2 =STRING_CHAR_AND_LENGTH (str + i_byte, size_byte-i_byte, 
len);
+                 c2 =STRING_CHAR_AND_LENGTH (str + i_byte, len);
                  i_byte += len;
                }
 
@@ -1764,7 +1761,7 @@
                  p = GAP_END_ADDR;
                  stop = endp;
                }
-             c = STRING_CHAR_AND_LENGTH (p, MAX_MULTIBYTE_LENGTH, nbytes);
+             c = STRING_CHAR_AND_LENGTH (p, nbytes);
              if (! NILP (iso_classes) && in_classes (c, iso_classes))
                {
                  if (negate)
@@ -1835,7 +1832,7 @@
                }
              prev_p = p;
              while (--p >= stop && ! CHAR_HEAD_P (*p));
-             c = STRING_CHAR (p, MAX_MULTIBYTE_LENGTH);
+             c = STRING_CHAR (p);
 
              if (! NILP (iso_classes) && in_classes (c, iso_classes))
                {
@@ -1989,7 +1986,7 @@
                    p = GAP_END_ADDR;
                    stop = endp;
                  }
-               c = STRING_CHAR_AND_LENGTH (p, MAX_MULTIBYTE_LENGTH, nbytes);
+               c = STRING_CHAR_AND_LENGTH (p, nbytes);
                if (! fastmap[(int) SYNTAX (c)])
                  break;
                p += nbytes, pos++, pos_byte += nbytes;
@@ -2032,7 +2029,7 @@
                UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
                prev_p = p;
                while (--p >= stop && ! CHAR_HEAD_P (*p));
-               c = STRING_CHAR (p, MAX_MULTIBYTE_LENGTH);
+               c = STRING_CHAR (p);
                if (! fastmap[(int) SYNTAX (c)])
                  break;
                pos--, pos_byte -= prev_p - p;

Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1321
retrieving revision 1.1322
diff -u -b -r1.1321 -r1.1322
--- xdisp.c     17 Nov 2009 04:16:33 -0000      1.1321
+++ xdisp.c     21 Nov 2009 11:52:29 -0000      1.1322
@@ -919,7 +919,7 @@
 static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, 
EMACS_INT));
 static int resize_mini_window_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, 
EMACS_INT));
 static Lisp_Object unwind_redisplay P_ ((Lisp_Object));
-static int string_char_and_length P_ ((const unsigned char *, int, int *));
+static int string_char_and_length P_ ((const unsigned char *, int *));
 static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object,
                                             struct text_pos));
 static int compute_window_start_on_continuation_line P_ ((struct window *));
@@ -1485,13 +1485,13 @@
    character.  */
 
 static INLINE int
-string_char_and_length (str, maxlen, len)
+string_char_and_length (str, len)
      const unsigned char *str;
-     int maxlen, *len;
+     int *len;
 {
   int c;
 
-  c = STRING_CHAR_AND_LENGTH (str, maxlen, *len);
+  c = STRING_CHAR_AND_LENGTH (str, *len);
   if (!CHAR_VALID_P (c, 1))
     /* We may not change the length here because other places in Emacs
        don't use this function, i.e. they silently accept invalid
@@ -1522,7 +1522,7 @@
 
       while (nchars--)
        {
-         string_char_and_length (p, rest, &len);
+         string_char_and_length (p, &len);
          p += len, rest -= len;
          xassert (rest >= 0);
          CHARPOS (pos) += 1;
@@ -1574,7 +1574,7 @@
       SET_TEXT_POS (pos, 0, 0);
       while (charpos--)
        {
-         string_char_and_length (s, rest, &len);
+         string_char_and_length (s, &len);
          s += len, rest -= len;
          xassert (rest >= 0);
          CHARPOS (pos) += 1;
@@ -1605,7 +1605,7 @@
 
       for (nchars = 0; rest > 0; ++nchars)
        {
-         string_char_and_length (p, rest, &len);
+         string_char_and_length (p, &len);
          rest -= len, p += len;
        }
     }
@@ -3648,7 +3648,7 @@
          int c, len;
          struct face *face = FACE_FROM_ID (it->f, face_id);
 
-         c = string_char_and_length (p, rest, &len);
+         c = string_char_and_length (p, &len);
          face_id = FACE_FOR_CHAR (it->f, face, c, CHARPOS (pos), it->string);
        }
     }
@@ -4650,7 +4650,7 @@
       pos_byte = IT_STRING_BYTEPOS (*it);
       string = it->string;
       s = SDATA (string) + pos_byte;
-      it->c = STRING_CHAR (s, 0);
+      it->c = STRING_CHAR (s);
     }
   else
     {
@@ -6312,7 +6312,7 @@
          int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
          const unsigned char *s = (SDATA (it->string)
                                    + IT_STRING_BYTEPOS (*it));
-         it->c = string_char_and_length (s, remaining, &it->len);
+         it->c = string_char_and_length (s, &it->len);
        }
       else
        {
@@ -6348,7 +6348,7 @@
          int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
          const unsigned char *s = (SDATA (it->string)
                                    + IT_STRING_BYTEPOS (*it));
-         it->c = string_char_and_length (s, maxlen, &it->len);
+         it->c = string_char_and_length (s, &it->len);
        }
       else
        {
@@ -6404,8 +6404,7 @@
         performance problem because there is no noticeable performance
         difference between Emacs running in unibyte or multibyte mode.  */
       int maxlen = strlen (it->s) - IT_BYTEPOS (*it);
-      it->c = string_char_and_length (it->s + IT_BYTEPOS (*it),
-                                     maxlen, &it->len);
+      it->c = string_char_and_length (it->s + IT_BYTEPOS (*it), &it->len);
     }
   else
     it->c = it->s[IT_BYTEPOS (*it)], it->len = 1;
@@ -6535,7 +6534,7 @@
       /* Get the next character, maybe multibyte.  */
       p = BYTE_POS_ADDR (IT_BYTEPOS (*it));
       if (it->multibyte_p && !ASCII_BYTE_P (*p))
-       it->c = STRING_CHAR_AND_LENGTH (p, 0, it->len);
+       it->c = STRING_CHAR_AND_LENGTH (p, it->len);
       else
        it->c = *p, it->len = 1;
 
@@ -7756,7 +7755,7 @@
             for the *Message* buffer.  */
          for (i = 0; i < nbytes; i += char_bytes)
            {
-             c = string_char_and_length (m + i, nbytes - i, &char_bytes);
+             c = string_char_and_length (m + i, &char_bytes);
              work[0] = (ASCII_CHAR_P (c)
                         ? c
                         : multibyte_char_to_unibyte (c, Qnil));
@@ -9061,7 +9060,7 @@
          /* Convert a multibyte string to single-byte.  */
          for (i = 0; i < nbytes; i += n)
            {
-             c = string_char_and_length (s + i, nbytes - i, &n);
+             c = string_char_and_length (s + i, &n);
              work[0] = (ASCII_CHAR_P (c)
                         ? c
                         : multibyte_char_to_unibyte (c, Qnil));
@@ -15903,7 +15902,7 @@
 
       /* Get the next character.  */
       if (multibyte_p)
-       it.c = string_char_and_length (p, arrow_len, &it.len);
+       it.c = string_char_and_length (p, &it.len);
       else
        it.c = *p, it.len = 1;
       p += it.len;
@@ -20930,7 +20929,7 @@
        {
          int maxlen = ((IT_BYTEPOS (*it) >= GPT ? ZV : GPT)
                        - IT_BYTEPOS (*it));
-         it2.c = STRING_CHAR_AND_LENGTH (p, maxlen, it2.len);
+         it2.c = STRING_CHAR_AND_LENGTH (p, it2.len);
        }
       else
        it2.c = *p, it2.len = 1;

Index: xterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/xterm.c,v
retrieving revision 1.1054
retrieving revision 1.1055
diff -u -b -r1.1054 -r1.1055
--- xterm.c     21 Nov 2009 02:33:47 -0000      1.1054
+++ xterm.c     21 Nov 2009 11:52:30 -0000      1.1055
@@ -6578,8 +6578,7 @@
                if (nchars == nbytes)
                  c = copy_bufptr[i], len = 1;
                else
-                 c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
-                                             nbytes - i, len);
+                 c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, len);
                inev.ie.kind = (SINGLE_BYTE_CHAR_P (c)
                                ? ASCII_KEYSTROKE_EVENT
                                : MULTIBYTE_CHAR_KEYSTROKE_EVENT);




reply via email to

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