comparison src/charset.h @ 42473:ab30bd62a6a8

(UNIBYTE_STR_AS_MULTIBYTE_P): Parenthesize assignment when used as truth value to prevent gcc warnings.
author Pavel Janík <Pavel@Janik.cz>
date Tue, 01 Jan 2002 22:12:56 +0000
parents b7a9187751b2
children fcc0f55d734f f6557aebe110
comparison
equal deleted inserted replaced
42472:5787452daded 42473:ab30bd62a6a8
445 is valid as a multibyte form. If valid, by a side effect, BYTES is 445 is valid as a multibyte form. If valid, by a side effect, BYTES is
446 set to the byte length of the multibyte form. */ 446 set to the byte length of the multibyte form. */
447 447
448 #define UNIBYTE_STR_AS_MULTIBYTE_P(str, length, bytes) \ 448 #define UNIBYTE_STR_AS_MULTIBYTE_P(str, length, bytes) \
449 (((str)[0] < 0x80 || (str)[0] >= 0xA0) \ 449 (((str)[0] < 0x80 || (str)[0] >= 0xA0) \
450 ? (bytes) = 1 \ 450 ? ((bytes) = 1) \
451 : (((bytes) = BYTES_BY_CHAR_HEAD ((str)[0])), \ 451 : (((bytes) = BYTES_BY_CHAR_HEAD ((str)[0])), \
452 ((bytes) > 1 && (bytes) <= (length) \ 452 ((bytes) > 1 && (bytes) <= (length) \
453 && (str)[0] != LEADING_CODE_8_BIT_CONTROL \ 453 && (str)[0] != LEADING_CODE_8_BIT_CONTROL \
454 && !CHAR_HEAD_P ((str)[1]) \ 454 && !CHAR_HEAD_P ((str)[1]) \
455 && ((bytes) == 2 \ 455 && ((bytes) == 2 \