Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-26 09:29:41 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-26 09:29:41 +0400
commitf279e522b05950655c6b4699ecd7a7f115261bc8 (patch)
tree9ef00309bf328db0d891c4078147d830d84375c4 /winsup/cygwin/winsup.h
parent109e4822783c39090bc4c1d3a0ff670ca56839bb (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r--winsup/cygwin/winsup.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index 5735985c7..4cfce5d4c 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -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