* autoload (noload): Avoid clobbering bx register.

* environ.cc (codepage_init): Use case insensitive match.
* fhandler_console.cc (cp_get_internal): Delete.
(con_to_str): Use get_cp to derive code page.
(str_to_con): Ditto.
* miscfuncs.cc (get_cp): New function.
(sys_wcstombs): New function.  Converted from macro.
(sys_mbstowcs): Ditto.
* winsup.h: Reflect above changes.
This commit is contained in:
Christopher Faylor
2002-06-26 05:29:41 +00:00
parent 109e482278
commit f279e522b0
6 changed files with 52 additions and 25 deletions

View File

@@ -68,15 +68,18 @@ extern "C" DWORD WINAPI GetLastError (void);
enum codepage_type {ansi_cp, oem_cp};
extern codepage_type current_codepage;
extern int cygserver_running;
UINT get_cp ();
int __stdcall sys_wcstombs(char *, const WCHAR *, int)
__attribute__ ((regparm(3)));
int __stdcall sys_mbstowcs(WCHAR *, const char *, int)
__attribute__ ((regparm(3)));
/* Used to check if Cygwin DLL is dynamically loaded. */
extern int dynamically_loaded;
#define sys_wcstombs(tgt,src,len) \
WideCharToMultiByte((current_codepage==ansi_cp?CP_ACP:CP_OEMCP),0,(src),-1,(tgt),(len),NULL,NULL)
#define sys_mbstowcs(tgt,src,len) \
MultiByteToWideChar((current_codepage==ansi_cp?CP_ACP:CP_OEMCP),0,(src),-1,(tgt),(len))
extern int cygserver_running;
#define TITLESIZE 1024