Add weapon cycling bindings for mouse and joystick buttons. Add weapon cycling bindi...
[chocolate-doom.git] / wince / fileops.c
blobb0617bd31bbdc3462edac52a1b8c948761eb81fd
1 //
2 // "Extension" implementation of ANSI C file functions for Windows CE.
3 //
4 // I (Simon Howard) release this file to the public domain.
5 //
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.h>
11 #include <windows.h>
13 #include "fileops.h"
15 int remove(const char *pathname)
17 wchar_t temp[MAX_PATH + 1];
19 MultiByteToWideChar(CP_OEMCP,
21 pathname,
22 strlen(pathname) + 1,
23 temp,
24 MAX_PATH);
26 return DeleteFileW(temp) != 0;
29 int rename(const char *oldpath, const char *newpath)
31 wchar_t oldpath1[MAX_PATH + 1];
32 wchar_t newpath1[MAX_PATH + 1];
34 MultiByteToWideChar(CP_OEMCP,
36 oldpath,
37 strlen(oldpath) + 1,
38 oldpath1,
39 MAX_PATH);
40 MultiByteToWideChar(CP_OEMCP,
42 newpath,
43 strlen(newpath) + 1,
44 newpath1,
45 MAX_PATH);
47 return MoveFileW(oldpath1, newpath1);