comparison src/composite.h @ 37240:77c7dc464611

(COMPOSITION_VALID_P): Allow integers as cdrs of PROP.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 06 Apr 2001 10:14:24 +0000
parents 144162f5b2e3
children 924488395239
comparison
equal deleted inserted replaced
37239:4bfdb0896d45 37240:77c7dc464611
88 ? COMPOSITION_WITH_ALTCHARS \ 88 ? COMPOSITION_WITH_ALTCHARS \
89 : COMPOSITION_WITH_RULE_ALTCHARS)))) 89 : COMPOSITION_WITH_RULE_ALTCHARS))))
90 90
91 /* Return 1 iff the composition is valid. It is valid if length of 91 /* Return 1 iff the composition is valid. It is valid if length of
92 the composition equals to (END - START). */ 92 the composition equals to (END - START). */
93 #define COMPOSITION_VALID_P(start, end, prop) \ 93 #define COMPOSITION_VALID_P(start, end, prop) \
94 (CONSP (prop) \ 94 (CONSP (prop) \
95 && (COMPOSITION_REGISTERD_P (prop) \ 95 && (COMPOSITION_REGISTERD_P (prop) \
96 ? (COMPOSITION_ID (prop) >= 0 \ 96 ? (COMPOSITION_ID (prop) >= 0 \
97 && COMPOSITION_ID (prop) <= n_compositions \ 97 && COMPOSITION_ID (prop) <= n_compositions \
98 && CONSP (XCDR (prop))) \ 98 && CONSP (XCDR (prop))) \
99 : (composition_temp = XCAR (prop), \ 99 : (composition_temp = XCAR (prop), \
100 (CONSP (composition_temp) \ 100 (CONSP (composition_temp) \
101 && (composition_temp = XCDR (composition_temp), \ 101 && (composition_temp = XCDR (composition_temp), \
102 (NILP (composition_temp) || STRINGP (composition_temp) \ 102 (NILP (composition_temp) \
103 || VECTORP (composition_temp) || CONSP (composition_temp))))))\ 103 || STRINGP (composition_temp) \
104 || VECTORP (composition_temp) \
105 || INTEGERP (composition_temp) \
106 || CONSP (composition_temp)))))) \
104 && (end - start) == COMPOSITION_LENGTH (prop)) 107 && (end - start) == COMPOSITION_LENGTH (prop))
105 108
106 /* Return the Nth glyph of composition specified by CMP. CMP is a 109 /* Return the Nth glyph of composition specified by CMP. CMP is a
107 pointer to `struct composition'. */ 110 pointer to `struct composition'. */
108 #define COMPOSITION_GLYPH(cmp, n) \ 111 #define COMPOSITION_GLYPH(cmp, n) \