aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2006-03-10 04:37:43 +0000
committerKenichi Handa2006-03-10 04:37:43 +0000
commitd959f5123e8ac52035c899704954dfcf426529c9 (patch)
tree4e83ef16966c143b98ed3919b82aa6c2ab8b8811 /src/coding.c
parentf2557ef4210ef81372fcbefe32c2e68849b15913 (diff)
downloademacs-d959f5123e8ac52035c899704954dfcf426529c9.tar.gz
emacs-d959f5123e8ac52035c899704954dfcf426529c9.zip
(DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
condition to terminate the loop.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/coding.c b/src/coding.c
index 3bec805fe10..648b6675053 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1996,24 +1996,24 @@ detect_coding_emacs_mule (coding, detect_info)
1996 } while (0) 1996 } while (0)
1997 1997
1998 1998
1999#define DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION(c) \ 1999#define DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION(c) \
2000 do { \ 2000 do { \
2001 /* Emacs 20 style format for relative composition. */ \ 2001 /* Emacs 20 style format for relative composition. */ \
2002 /* Store multibyte form of characters to be composed. */ \ 2002 /* Store multibyte form of characters to be composed. */ \
2003 enum composition_method method = COMPOSITION_RELATIVE; \ 2003 enum composition_method method = COMPOSITION_RELATIVE; \
2004 int components[MAX_COMPOSITION_COMPONENTS * 2 - 1]; \ 2004 int components[MAX_COMPOSITION_COMPONENTS * 2 - 1]; \
2005 int *buf = components; \ 2005 int *buf = components; \
2006 int i, j; \ 2006 int i, j; \
2007 \ 2007 \
2008 src = src_base; \ 2008 src = src_base; \
2009 ONE_MORE_BYTE (c); /* skip 0x80 */ \ 2009 ONE_MORE_BYTE (c); /* skip 0x80 */ \
2010 for (i = 0; i < MAX_COMPOSITION_COMPONENTS; i++) \ 2010 for (i = 0; *src >= 0xA0 && i < MAX_COMPOSITION_COMPONENTS; i++) \
2011 DECODE_EMACS_MULE_COMPOSITION_CHAR (buf); \ 2011 DECODE_EMACS_MULE_COMPOSITION_CHAR (buf); \
2012 if (i < 2) \ 2012 if (i < 2) \
2013 goto invalid_code; \ 2013 goto invalid_code; \
2014 ADD_COMPOSITION_DATA (charbuf, i, method); \ 2014 ADD_COMPOSITION_DATA (charbuf, i, method); \
2015 for (j = 0; j < i; j++) \ 2015 for (j = 0; j < i; j++) \
2016 *charbuf++ = components[j]; \ 2016 *charbuf++ = components[j]; \
2017 } while (0) 2017 } while (0)
2018 2018
2019 2019