diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-02-12 11:10:53 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-02-12 11:10:53 +0900 |
commit | 70740cb91024ea9d2eef79e37ea8a757e60ae13b (patch) | |
tree | a8176711a55362d174d5478e1cb6fb18bda1b898 /win32/uc.c | |
parent | 0fd0d1599e4fcc6b142aef0b8fb7b8b77e33ef91 (diff) |
win32: use msvcrt
Diffstat (limited to 'win32/uc.c')
-rw-r--r-- | win32/uc.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/win32/uc.c b/win32/uc.c deleted file mode 100644 index 70d2e85..0000000 --- a/win32/uc.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <string.h> -#include <windows.h> - -int memcmp(const void *s1, const void *s2, size_t n) { - size_t i = RtlCompareMemory(s1, s2, n); - if (i == n) return 0; - return ((const unsigned char *)s1)[i] - ((const unsigned char *)s2)[i]; -} - -void *memset(void *s, int c, size_t n) { - RtlFillMemory(s, n, c); - return s; -} - -void *memcpy(void *dest, const void *src, size_t n) { - RtlCopyMemory(dest, src, n); - return dest; -} - -void *memmove(void *dest, const void *src, size_t n) { - RtlMoveMemory(dest, src, n); - return dest; -} - -int CALLBACK wWinMain(HINSTANCE hinst, HINSTANCE hpinst, - wchar_t *cmdline, int cmdshow); - -DWORD CALLBACK entry(void *ptr) { - (void)ptr; - STARTUPINFO si; - GetStartupInfo(&si); - int cmdshow = si.wShowWindow; - if (si.dwFlags & STARTF_USESHOWWINDOW) cmdshow = SW_SHOWNORMAL; - DWORD ret = wWinMain(GetModuleHandle(0), 0, 0, cmdshow); - ExitProcess(ret); -} |