* miscfuncs.cc (next_char): Fix typos in comment.

* strfuncs.cc: Remove cygserver guards.
This commit is contained in:
Corinna Vinschen 2008-02-06 22:04:16 +00:00
parent fb7331e34c
commit 93591f4200
3 changed files with 7 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2008-02-06 Corinna Vinschen <corinna@vinschen.de>
* miscfuncs.cc (next_char): Fix typos in comment.
* strfuncs.cc: Remove cygserver guards.
2008-02-06 Corinna Vinschen <corinna@vinschen.de> 2008-02-06 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_console::trunc_buf): Add to use as cache for * fhandler.h (fhandler_console::trunc_buf): Add to use as cache for

View File

@ -219,11 +219,11 @@ is_cp_multibyte (UINT cp)
double byte charsets. So we have to do it ourselves for UTF-8. double byte charsets. So we have to do it ourselves for UTF-8.
While being at it, we do more. If a double-byte or multibyte While being at it, we do more. If a double-byte or multibyte
sequence is trucated due to an early end, we need a way to recognize sequence is truncated due to an early end, we need a way to recognize
it. The reason is that multiple buffered write statements might it. The reason is that multiple buffered write statements might
accidentally stop and start in the middle of a single character byte accidentally stop and start in the middle of a single character byte
sequence. If we have to interpret the byte sequences (as in sequence. If we have to interpret the byte sequences (as in
fhandler_console, we would print wrong output in these cases. fhandler_console), we would print wrong output in these cases.
So we have four possible return values here: So we have four possible return values here:

View File

@ -24,10 +24,6 @@ details. */
codepage_type current_codepage = ansi_cp; codepage_type current_codepage = ansi_cp;
UINT active_codepage = 0; UINT active_codepage = 0;
#ifdef __OUTSIDE_CYGWIN__
#define codepage_init(cp) (active_codepage = GetACP ())
#endif
UINT UINT
get_cp () get_cp ()
{ {
@ -73,14 +69,10 @@ sys_wcstombs_alloc (char **tgt_p, int type, const PWCHAR src, int slen)
{ {
size_t tlen = (slen == -1 ? ret : ret + 1); size_t tlen = (slen == -1 ? ret : ret + 1);
#ifndef __OUTSIDE_CYGWIN__
if (type == HEAP_NOTHEAP) if (type == HEAP_NOTHEAP)
#endif
*tgt_p = (char *) calloc (tlen, sizeof (char)); *tgt_p = (char *) calloc (tlen, sizeof (char));
#ifndef __OUTSIDE_CYGWIN__
else else
*tgt_p = (char *) ccalloc ((cygheap_types) type, tlen, sizeof (char)); *tgt_p = (char *) ccalloc ((cygheap_types) type, tlen, sizeof (char));
#endif
if (!*tgt_p) if (!*tgt_p)
return 0; return 0;
ret = sys_wcstombs (*tgt_p, tlen, src, slen); ret = sys_wcstombs (*tgt_p, tlen, src, slen);
@ -104,14 +96,10 @@ sys_mbstowcs_alloc (PWCHAR *tgt_p, int type, const char *src)
ret = MultiByteToWideChar (get_cp (), 0, src, -1, NULL, 0); ret = MultiByteToWideChar (get_cp (), 0, src, -1, NULL, 0);
if (ret) if (ret)
{ {
#ifndef __OUTSIDE_CYGWIN__
if (type == HEAP_NOTHEAP) if (type == HEAP_NOTHEAP)
#endif
*tgt_p = (PWCHAR) calloc (ret, sizeof (WCHAR)); *tgt_p = (PWCHAR) calloc (ret, sizeof (WCHAR));
#ifndef __OUTSIDE_CYGWIN__
else else
*tgt_p = (PWCHAR) ccalloc ((cygheap_types) type, ret, sizeof (WCHAR)); *tgt_p = (PWCHAR) ccalloc ((cygheap_types) type, ret, sizeof (WCHAR));
#endif
if (!*tgt_p) if (!*tgt_p)
return 0; return 0;
ret = sys_mbstowcs (*tgt_p, src, ret); ret = sys_mbstowcs (*tgt_p, src, ret);