diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-10 19:57:35 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-10 19:57:35 -0700 |
commit | d36002e99bd8c844a0f1abdc26e66be7f94409b4 (patch) | |
tree | 9658e92e45356b20003e1d66567e416f99d0f01a /regex.h | |
parent | 7d962e011cbb56d33d2874ad12205ecea68a7191 (diff) | |
download | txr-d36002e99bd8c844a0f1abdc26e66be7f94409b4.tar.gz txr-d36002e99bd8c844a0f1abdc26e66be7f94409b4.tar.bz2 txr-d36002e99bd8c844a0f1abdc26e66be7f94409b4.zip |
Count East Asian Wide and Full Fidth chars as two columns.
* regex.c (create_wide_cs): New static function.
(wide_display_char_p): New function.
* regex.h (wide_display_char_p): Declared.
* stream.c (put_string, put_char): Use wide_display_char_p
to determine whether an extra column need be counted. Also bugfix:
iswprint evidently cannot be relied to work over the entire Unicode
range, at least not in the C locale. Glibc's version and is reporting
valid Japanese characters as unprintable on Ubuntu. As a hack we
instead check for control characters and invert the result: control
chars are unprintable.
* tests/009/json.expected: Updated.
Diffstat (limited to 'regex.h')
-rw-r--r-- | regex.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -39,5 +39,5 @@ val search_regst(val haystack, val needle_regex, val start_num, val from_end); val match_regst(val str, val regex, val pos); val match_regst_right(val str, val regex, val end); val regsub(val regex, val repl, val str); - +int wide_display_char_p(wchar_t ch); void regex_init(void); |