diff options
author | Christopher Faylor <me@cgf.cx> | 2007-08-02 14:21:53 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2007-08-02 14:21:53 +0000 |
commit | 7e4f1942e4a3a3d1477dcffd5b45255007ed13d4 (patch) | |
tree | cdb98f9b9bfed984b579b0f6decc25a715ee0cac /winsup/cygwin/miscfuncs.cc | |
parent | dcd1ef4516bf43cdd866069ef5df2a6a958945d2 (diff) | |
download | cygnal-7e4f1942e4a3a3d1477dcffd5b45255007ed13d4.tar.gz cygnal-7e4f1942e4a3a3d1477dcffd5b45255007ed13d4.tar.bz2 cygnal-7e4f1942e4a3a3d1477dcffd5b45255007ed13d4.zip |
* dcrt0.cc (codepage_type): Remove definition.
* strfuncs.cc: Move it here. New file with bits of miscfuncs.cc.
* miscfuncs.cc: Remove wide character stuff.
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 9bab138cf..bbbcd59e9 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -15,8 +15,6 @@ details. */ #include <sys/uio.h> #include <assert.h> #include <limits.h> -#include <winbase.h> -#include <winnls.h> #include "cygthread.h" #include "cygtls.h" @@ -163,6 +161,7 @@ dummytest (volatile char *p) { return *p; } + ssize_t check_iovec (const struct iovec *iov, int iovcnt, bool forwrite) { @@ -203,35 +202,6 @@ check_iovec (const struct iovec *iov, int iovcnt, bool forwrite) return (ssize_t) tot; } -UINT -get_cp () -{ - return current_codepage == ansi_cp ? GetACP() : GetOEMCP(); -} - -/* tlen is always treated as the maximum buffer size, including the '\0' - character. sys_wcstombs will always return a 0-terminated result, no - matter what. */ -int __stdcall -sys_wcstombs (char *tgt, int tlen, const WCHAR *src, int slen) -{ - int ret; - - ret = WideCharToMultiByte (get_cp (), 0, src, slen, tgt, tlen, NULL, NULL); - if (ret) - tgt[ret < tlen ? ret : tlen - 1] = '\0'; - return ret; -} - -int __stdcall -sys_mbstowcs (WCHAR *tgt, const char *src, int len) -{ - int res = MultiByteToWideChar (get_cp (), 0, src, -1, tgt, len); - if (!res) - debug_printf ("MultiByteToWideChar %E"); - return res; -} - extern "C" int low_priority_sleep (DWORD secs) { |