* syntax.h (SETUP_SYNTAX_TABLE):
(SETUP_SYNTAX_TABLE_FOR_OBJECT): Likewise.
* buffer.h (DECODE_POSITION): Likewise.
+ * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
+ (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
+ (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Likewise.
+ (FETCH_CHAR_ADVANCE): Likewise.
+ (FETCH_CHAR_ADVANCE_NO_CHECK): Likewise.
2008-02-07 Jim Meyering <meyering@redhat.com>
we increment them past the character fetched. */
#define FETCH_STRING_CHAR_ADVANCE(OUTPUT, STRING, CHARIDX, BYTEIDX) \
- if (1) \
+ do \
{ \
CHARIDX++; \
if (STRING_MULTIBYTE (STRING)) \
else \
OUTPUT = XSTRING (STRING)->data[BYTEIDX++]; \
} \
- else
+ while (0)
/* Like FETCH_STRING_CHAR_ADVANCE but return a multibyte character eve
if STRING is unibyte. */
#define FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE(OUTPUT, STRING, CHARIDX, BYTEIDX) \
- if (1) \
+ do \
{ \
CHARIDX++; \
if (STRING_MULTIBYTE (STRING)) \
MAKE_CHAR_MULTIBYTE (OUTPUT); \
} \
} \
- else
+ while (0)
/* Like FETCH_STRING_CHAR_ADVANCE but assumes STRING is multibyte. */
#define FETCH_STRING_CHAR_ADVANCE_NO_CHECK(OUTPUT, STRING, CHARIDX, BYTEIDX) \
- if (1) \
+ do \
{ \
unsigned char *ptr = &XSTRING (STRING)->data[BYTEIDX]; \
int len; \
BYTEIDX += len; \
CHARIDX++; \
} \
- else
+ while (0)
/* Like FETCH_STRING_CHAR_ADVANCE but fetch character from the current
buffer. */
#define FETCH_CHAR_ADVANCE(OUTPUT, CHARIDX, BYTEIDX) \
- if (1) \
+ do \
{ \
CHARIDX++; \
if (!NILP (current_buffer->enable_multibyte_characters)) \
BYTEIDX++; \
} \
} \
- else
+ while (0)
/* Like FETCH_CHAR_ADVANCE but assumes the current buffer is multibyte. */
#define FETCH_CHAR_ADVANCE_NO_CHECK(OUTPUT, CHARIDX, BYTEIDX) \
- if (1) \
+ do \
{ \
unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \
int len; \
BYTEIDX += len; \
CHARIDX++; \
} \
- else
+ while (0)
/* Increase the buffer byte position POS_BYTE of the current buffer to