change wint_t's back to wchar_t's to fix compilation on Mac OS 10.4.1

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2676 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-06-15 16:07:14 +00:00
parent ff6c1997b9
commit ed7ad33802
3 changed files with 22 additions and 18 deletions

View File

@ -55,20 +55,20 @@ CVS code -
main(), search_init(), nanorc.sample, nano.1, nanorc.5, main(), search_init(), nanorc.sample, nano.1, nanorc.5,
nano.texi, etc. (DLR) nano.texi, etc. (DLR)
- Various cleanups and improvements in chars.c. Remove some - Various cleanups and improvements in chars.c. Remove some
unnecessary w?ctype wrappers; change other ctype wrappers to unnecessary w?ctype wrappers; change the wctype wrappers to
take wint_t instead of wchar_t; rename some functions for take wint_t instead of wchar_t to match the functions they
consistency; add functions to detect blank characters in a wrap; rename some functions for consistency; add functions to
string, for use in rcfile option parsing; and don't count detect blank characters in a string, for use in rcfile option
matches between valid and invalid multibyte sequences anymore, parsing; and don't count matches between valid and invalid
as it causes problems when doing a replace. New functions multibyte sequences anymore, as it causes problems when doing
is_valid_mbstring(), has_blank_chars(), and a replace. New functions is_valid_mbstring(),
has_blank_mbchars(); changes to is_alnum_mbchar(), has_blank_chars(), and has_blank_mbchars(); changes to
is_blank_char() (renamed nisblank()), is_blank_mbchar(), is_alnum_mbchar(), is_blank_char() (renamed nisblank()),
is_blank_wchar() (renamed niswblank()), is_cntrl_wchar(), is_blank_mbchar(), is_blank_wchar() (renamed niswblank()),
control_rep(), control_mbrep(), make_mbstring() (renamed is_cntrl_wchar(), control_rep(), control_mbrep(),
make_valid_mbstring()), mbstrncasecmp(), mbstrcasestr(), make_mbstring() (renamed make_valid_mbstring()),
mbrevstrcasestr(), etc.; removal of is_alnum_char() and mbstrncasecmp(), mbstrcasestr(), mbrevstrcasestr(), etc.;
is_alnum_wchar(). (DLR) removal of is_alnum_char() and is_alnum_wchar(). (DLR)
- Implement word count via Meta-D at the main window. Note that - Implement word count via Meta-D at the main window. Note that
this is disabled when NANO_SMALL is defined. New functions this is disabled when NANO_SMALL is defined. New functions
do_word_count() and do_next_word_void(); changes to do_word_count() and do_next_word_void(); changes to
@ -82,6 +82,10 @@ CVS code -
- Fix #ifdefs so that nano compiles with NANO_SMALL defined and - Fix #ifdefs so that nano compiles with NANO_SMALL defined and
DISABLE_TABCOMP undefined. Changes to revstrstr() and DISABLE_TABCOMP undefined. Changes to revstrstr() and
free_charptrarray() (renamed free_chararray()). (DLR) free_charptrarray() (renamed free_chararray()). (DLR)
- Change the wctype wrappers to take wchar_t's again, as they
still work the same way with them. This also fixes
compilation on Mac OS X 10.4.1, which doesn't seem to define a
wint_t type. (DLR, problem found by Emily Jackson)
- chars.c: - chars.c:
make_mbstring() make_mbstring()
- Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a - Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a

View File

@ -49,7 +49,7 @@ int nisblank(int c)
#if defined(NANO_WIDE) && !defined(HAVE_ISWBLANK) #if defined(NANO_WIDE) && !defined(HAVE_ISWBLANK)
/* This function is equivalent to iswblank(). */ /* This function is equivalent to iswblank(). */
int niswblank(wint_t wc) int niswblank(wchar_t wc)
{ {
return iswspace(wc) && (wc == '\t' || !is_cntrl_wchar(wc)); return iswspace(wc) && (wc == '\t' || !is_cntrl_wchar(wc));
} }
@ -116,7 +116,7 @@ bool is_cntrl_char(int c)
/* This function is equivalent to iscntrl() for wide characters, except /* This function is equivalent to iscntrl() for wide characters, except
* in that it also handles wide control characters with their high bits * in that it also handles wide control characters with their high bits
* set. */ * set. */
bool is_cntrl_wchar(wint_t wc) bool is_cntrl_wchar(wchar_t wc)
{ {
return (0 <= wc && wc < 32) || (127 <= wc && wc < 160); return (0 <= wc && wc < 32) || (127 <= wc && wc < 160);
} }

View File

@ -163,14 +163,14 @@ extern char *homedir;
int nisblank(int c); int nisblank(int c);
#endif #endif
#if defined(NANO_WIDE) && !defined(HAVE_ISWBLANK) #if defined(NANO_WIDE) && !defined(HAVE_ISWBLANK)
int niswblank(wint_t wc); int niswblank(wchar_t wc);
#endif #endif
bool is_byte(int c); bool is_byte(int c);
bool is_alnum_mbchar(const char *c); bool is_alnum_mbchar(const char *c);
bool is_blank_mbchar(const char *c); bool is_blank_mbchar(const char *c);
bool is_cntrl_char(int c); bool is_cntrl_char(int c);
#ifdef NANO_WIDE #ifdef NANO_WIDE
bool is_cntrl_wchar(wint_t wc); bool is_cntrl_wchar(wchar_t wc);
#endif #endif
bool is_cntrl_mbchar(const char *c); bool is_cntrl_mbchar(const char *c);
bool is_punct_mbchar(const char *c); bool is_punct_mbchar(const char *c);