[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100523: Remove obsolete pre-unicode2
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100523: Remove obsolete pre-unicode2 macros. |
Date: |
Thu, 03 Jun 2010 21:02:32 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100523
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Thu 2010-06-03 21:02:32 +0200
message:
Remove obsolete pre-unicode2 macros.
* character.h (MULTIBYTE_FORM_LENGTH, PARSE_MULTIBYTE_SEQ): Remove.
* composite.c (composition_reseat_it):
* data.c (Faset):
* fns.c (Ffillarray):
* regex.c (re_search_2): Use BYTES_BY_CHAR_HEAD.
[!emacs] (BYTES_BY_CHAR_HEAD): Define instead of MULTIBYTE_FORM_LENGTH.
modified:
src/ChangeLog
src/character.h
src/composite.c
src/data.c
src/fns.c
src/regex.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-06-03 18:50:00 +0000
+++ b/src/ChangeLog 2010-06-03 19:02:32 +0000
@@ -1,3 +1,13 @@
+2010-06-03 Juanma Barranquero <address@hidden>
+
+ Remove obsolete pre-unicode2 macros.
+ * character.h (MULTIBYTE_FORM_LENGTH, PARSE_MULTIBYTE_SEQ): Remove.
+ * composite.c (composition_reseat_it):
+ * data.c (Faset):
+ * fns.c (Ffillarray):
+ * regex.c (re_search_2): Use BYTES_BY_CHAR_HEAD.
+ [!emacs] (BYTES_BY_CHAR_HEAD): Define instead of MULTIBYTE_FORM_LENGTH.
+
2010-06-03 Juri Linkov <address@hidden>
* buffer.c (Fother_buffer): Add CHECK_FRAME.
=== modified file 'src/character.h'
--- a/src/character.h 2010-04-20 01:50:52 +0000
+++ b/src/character.h 2010-06-03 19:02:32 +0000
@@ -235,23 +235,6 @@
: 5)
-/* Return the length of the multi-byte form at string STR of length
- LEN while assuming that STR points a valid multi-byte form. As
- this macro isn't necessary anymore, all callers will be changed to
- use BYTES_BY_CHAR_HEAD directly in the future. */
-
-#define MULTIBYTE_FORM_LENGTH(str, len) \
- BYTES_BY_CHAR_HEAD (*(str))
-
-/* Parse multibyte string STR of length LENGTH and set BYTES to the
- byte length of a character at STR while assuming that STR points a
- valid multibyte form. As this macro isn't necessary anymore, all
- callers will be changed to use BYTES_BY_CHAR_HEAD directly in the
- future. */
-
-#define PARSE_MULTIBYTE_SEQ(str, length, bytes) \
- (bytes) = BYTES_BY_CHAR_HEAD (*(str))
-
/* The byte length of multibyte form at unibyte string P ending at
PEND. If STR doesn't point to a valid multibyte form, return 0. */
=== modified file 'src/composite.c'
--- a/src/composite.c 2010-05-26 01:14:51 +0000
+++ b/src/composite.c 2010-06-03 19:02:32 +0000
@@ -1266,7 +1266,7 @@
{
if (endpos < 0)
endpos = BEGV;
- if (endpos < PT && PT < charpos)
+ if (endpos < PT && PT < charpos)
endpos = PT;
}
else if (endpos < 0)
@@ -1317,7 +1317,7 @@
|| ! INTEGERP (AREF (elt, 1)))
continue;
if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback)
- goto no_composition;
+ goto no_composition;
lgstring = autocmp_chars (elt, charpos, bytepos, endpos,
w, face, string);
if (composition_gstring_p (lgstring))
@@ -1389,7 +1389,7 @@
if (NILP (string))
INC_POS (bytepos);
else
- bytepos += MULTIBYTE_FORM_LENGTH (SDATA (string) + bytepos, 0);
+ bytepos += BYTES_BY_CHAR_HEAD (*(SDATA (string) + bytepos));
}
else
{
=== modified file 'src/data.c'
--- a/src/data.c 2010-05-07 20:33:00 +0000
+++ b/src/data.c 2010-06-03 19:02:32 +0000
@@ -959,14 +959,14 @@
CHECK_NUMBER (newval);
*XINTFWD (valcontents)->intvar = XINT (newval);
break;
-
+
case Lisp_Fwd_Bool:
*XBOOLFWD (valcontents)->boolvar = !NILP (newval);
break;
-
+
case Lisp_Fwd_Obj:
*XOBJFWD (valcontents)->objvar = newval;
-
+
/* If this variable is a default for something stored
in the buffer itself, such as default-fill-column,
find the buffers that don't have local values for it
@@ -977,12 +977,12 @@
int offset = ((char *) XOBJFWD (valcontents)->objvar
- (char *) &buffer_defaults);
int idx = PER_BUFFER_IDX (offset);
-
+
Lisp_Object tail;
-
+
if (idx <= 0)
break;
-
+
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object buf;
@@ -1943,7 +1943,7 @@
Lisp_Object tail, elt, tmp;
struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym);
XSETBUFFER (tmp, buf);
-
+
for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
{
elt = XCAR (tail);
@@ -2274,7 +2274,7 @@
idxval_byte = string_char_to_byte (array, idxval);
p1 = SDATA (array) + idxval_byte;
- PARSE_MULTIBYTE_SEQ (p1, nbytes - idxval_byte, prev_bytes);
+ prev_bytes = BYTES_BY_CHAR_HEAD (*p1);
new_bytes = CHAR_STRING (XINT (newelt), p0);
if (prev_bytes != new_bytes)
{
=== modified file 'src/fns.c'
--- a/src/fns.c 2010-04-25 22:16:58 +0000
+++ b/src/fns.c 2010-06-03 19:02:32 +0000
@@ -2280,7 +2280,7 @@
if (size != size_byte)
while (p1 < endp)
{
- int this_len = MULTIBYTE_FORM_LENGTH (p1, endp - p1);
+ int this_len = BYTES_BY_CHAR_HEAD (*p1);
if (len != this_len)
error ("Attempt to change byte length of a string");
p1 += this_len;
=== modified file 'src/regex.c'
--- a/src/regex.c 2010-03-10 14:45:21 +0000
+++ b/src/regex.c 2010-06-03 19:02:32 +0000
@@ -300,7 +300,7 @@
# define CHAR_HEAD_P(p) (1)
# define SINGLE_BYTE_CHAR_P(c) (1)
# define SAME_CHARSET_P(c1, c2) (1)
-# define MULTIBYTE_FORM_LENGTH(p, s) (1)
+# define BYTES_BY_CHAR_HEAD(p) (1)
# define PREV_CHAR_BOUNDARY(p, limit) ((p)--)
# define STRING_CHAR(p) (*(p))
# define RE_STRING_CHAR(p, multibyte) STRING_CHAR (p)
@@ -4643,7 +4643,7 @@
{
re_char *p = POS_ADDR_VSTRING (startpos);
re_char *pend = STOP_ADDR_VSTRING (startpos);
- int len = MULTIBYTE_FORM_LENGTH (p, pend - p);
+ int len = BYTES_BY_CHAR_HEAD (*p);
range -= len;
if (range < 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100523: Remove obsolete pre-unicode2 macros.,
Juanma Barranquero <=