Changes to existing files by the win32 port additions.

This commit is contained in:
nethack.allison
2002-01-13 05:53:39 +00:00
parent 963e5e69bf
commit e02ab47597
13 changed files with 441 additions and 50 deletions

View File

@@ -638,7 +638,15 @@ char *str;
# ifndef WIN32
Strcpy (tmp, str);
# else
*(tmp + GetModuleFileName((HANDLE)0, tmp, bsize)) = '\0';
#ifdef UNICODE
{
TCHAR wbuf[BUFSZ];
GetModuleFileName((HANDLE)0, wbuf, BUFSZ);
WideCharToMultiByte(CP_ACP, 0, wbuf, -1, tmp, bsize, NULL, NULL);
}
#else
*(tmp + GetModuleFileName((HANDLE)0, tmp, bsize)) = '\0';
#endif
# endif
tmp2 = strrchr(tmp, PATH_SEPARATOR);
if (tmp2) *tmp2 = '\0';

View File

@@ -11,7 +11,7 @@
#include <ctype.h>
#include <fcntl.h>
#ifndef MSDOS /* already done */
#if !defined(MSDOS) && !defined(WIN_CE) /* already done */
#include <process.h>
#endif
#ifdef __GO32__