aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/charset.h b/src/charset.h
index d2fd94e6ade..b25e66a5632 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -587,16 +587,14 @@ extern int iso_charset_table[2][2][128];
587 MULTIBYTE_FORM_LENGTH. */ 587 MULTIBYTE_FORM_LENGTH. */
588 588
589#define STRING_CHAR_AND_LENGTH(str, len, actual_len) \ 589#define STRING_CHAR_AND_LENGTH(str, len, actual_len) \
590 ((BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) == 1 \ 590 (BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) == 1 \
591 || BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) > (len)) \
592 ? (actual_len = 1), (unsigned char) *(str) \ 591 ? (actual_len = 1), (unsigned char) *(str) \
593 : string_to_non_ascii_char (str, len, &actual_len, 0)) 592 : string_to_non_ascii_char (str, len, &actual_len, 0))
594 593
595/* This is like STRING_CHAR_AND_LENGTH but the third arg ACTUAL_LEN 594/* This is like STRING_CHAR_AND_LENGTH but the third arg ACTUAL_LEN
596 does not include garbage bytes following the multibyte character. */ 595 does not include garbage bytes following the multibyte character. */
597#define STRING_CHAR_AND_CHAR_LENGTH(str, len, actual_len) \ 596#define STRING_CHAR_AND_CHAR_LENGTH(str, len, actual_len) \
598 ((BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) == 1 \ 597 (BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) == 1 \
599 || BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) > (len)) \
600 ? (actual_len = 1), (unsigned char) *(str) \ 598 ? (actual_len = 1), (unsigned char) *(str) \
601 : string_to_non_ascii_char (str, len, &actual_len, 1)) 599 : string_to_non_ascii_char (str, len, &actual_len, 1))
602 600