support to a few more functions as well, and move multibyte
character-specific functions to their own source file. New
file chars.c; new functions is_alnum_char(),
- is_alnum_mbchar(), is_alnum_wchar(), is_blank_mbchar(),
- is_blank_wchar(), is_cntrl_mbchar(), is_cntrl_wchar(),
- control_mbrep(), control_wrep(), mbwidth(), mb_cur_max(),
- make_mbchar(), mbstrlen(), mbstrnlen(), mbstrcasecmp(),
- mbstrncasecmp(), mbstrcasestr(), and mbrevstrcasestr();
- changes to help_init(), is_byte() (moved to chars.c),
- is_blank_char() (moved to chars.c), is_cntrl_char() (moved to
- chars.c), nstricmp() (renamed nstrcasecmp() and moved to
- chars.c), nstrnicmp() (renamed nstrncasecmp() and moved to
- chars.c), nstristr() (renamed nstrcasestr() and moved to
- chars.c), revstrstr() (moved to chars.c), revstristr()
+ is_alnum_mbchar(), is_alnum_wchar(), is_ascii_char(),
+ is_blank_mbchar(), is_blank_wchar(), is_cntrl_mbchar(),
+ is_cntrl_wchar(), control_mbrep(), control_wrep(), mbwidth(),
+ mb_cur_max(), make_mbchar(), mbstrlen(), mbstrnlen(),
+ mbstrcasecmp(), mbstrncasecmp(), mbstrcasestr(), and
+ mbrevstrcasestr(); changes to help_init(), is_byte() (moved to
+ chars.c), is_blank_char() (moved to chars.c), is_cntrl_char()
+ (moved to chars.c), nstricmp() (renamed nstrcasecmp() and
+ moved to chars.c), nstrnicmp() (renamed nstrncasecmp() and
+ moved to chars.c), nstristr() (renamed nstrcasestr() and moved
+ to chars.c), revstrstr() (moved to chars.c), revstristr()
(renamed revstrcasestr() and moved to chars.c), nstrnlen()
(moved to chars.c), parse_char() (renamed parse_mbchar() and
moved to chars.c), move_left() (renamed move_mbleft() and
obsolete and it defines a struct termio that we don't use
anywhere. (DLR)
- Typo fixes. (DLR)
- - Add checks for iswalnum(), iswblank() or iswspace(), mblen(),
- and wctype.h. (DLR)
+ - Add checks for isascii(), iswalnum(), iswblank() or
+ iswspace(), mblen(), and wctype.h. (DLR)
- doc/faq.html:
- Remove now-inaccurate note about verbatim input's not working
at prompts, and update its description to mention that it
if (allow_funcs) {
/* If we got a character, and it isn't a shortcut, toggle, or
- * control character, it's a normal text character. Display the
- * warning if we're in view mode, or add the character to the
- * input buffer if we're not. */
- if (input != ERR && *s_or_t == FALSE && !is_cntrl_char(input)) {
+ * ASCII control character, it's a normal text character.
+ * Display the warning if we're in view mode, or add the
+ * character to the input buffer if we're not. */
+ if (input != ERR && *s_or_t == FALSE &&
+ (!is_ascii_char(input) || !is_cntrl_char(input))) {
if (ISSET(VIEW_MODE))
print_view_warning();
else {
*s_or_t = have_shortcut;
if (allow_funcs) {
- if (input != ERR && *s_or_t == FALSE && !is_cntrl_char(input)) {
+ /* If we got a character, and it isn't a shortcut, toggle, or
+ * ASCII control character, it's a normal text character.
+ * Display the warning if we're in view mode, or add the
+ * character to the input buffer if we're not. */
+ if (input != ERR && *s_or_t == FALSE &&
+ (!is_ascii_char(input) || !is_cntrl_char(input))) {
/* If we're using restricted mode, the filename isn't blank,
* and we're at the "Write File" prompt, disable text
* input. */