Mercurial > emacs
comparison src/coding.c @ 90363:ec0a46fadd7e
(DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
condition to terminate the loop.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 10 Mar 2006 04:37:43 +0000 |
parents | 041f75914d0c |
children | 0aec08f4c729 |
comparison
equal
deleted
inserted
replaced
90362:1f998d77c782 | 90363:ec0a46fadd7e |
---|---|
1994 charbuf_base[0] -= i; \ | 1994 charbuf_base[0] -= i; \ |
1995 } \ | 1995 } \ |
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 |
2020 #define DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION(c) \ | 2020 #define DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION(c) \ |
2021 do { \ | 2021 do { \ |