15
15
* License along with this library; if not, write to the Free Software
16
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17
17
*/
18
-
18
+ #ifndef UNICODE
19
+ #define UNICODE
20
+ #endif
21
+ #ifndef _UNICODE
22
+ #define _UNICODE
23
+ #endif
19
24
#include <stdarg.h>
20
25
#include <stdio.h>
21
- #include <windef.h>
22
- #include <winbase.h>
23
- #include <winuser.h>
26
+ #include <windows.h>
27
+ #ifdef __TINYC__
28
+ LPWSTR * WINAPI CommandLineToArgvW (LPCWSTR , int * );
29
+ #else
30
+ #include <shlwapi.h>
31
+ #endif
24
32
#if defined( __MINGW64_VERSION_MAJOR ) && __MINGW64_VERSION_MAJOR < 4
25
33
typedef struct {
26
34
DWORD style ;
@@ -36,11 +44,15 @@ __MINGW_TYPEDEF_AW(LPCDLGTEMPLATE)
36
44
WINUSERAPI int WINAPI LoadStringW (HINSTANCE hInstance , UINT uID , LPWSTR lpBuffer , int cchBufferMax );
37
45
#define sprintfW swprintf
38
46
#else
47
+ #ifdef __TINYC__
48
+ #define sprintfW swprintf
49
+ #else
39
50
#define sprintfW _swprintf
40
51
#endif
52
+ #endif
41
53
#include <winreg.h>
42
54
#include <wincon.h>
43
- #include <shlwapi.h>
55
+
44
56
//#include <wine/unicode.h>
45
57
//#include <wine/debug.h>
46
58
#include <errno.h>
@@ -1086,7 +1098,7 @@ static enum operations get_operation(const WCHAR *str, int *op_help)
1086
1098
return REG_INVALID ;
1087
1099
}
1088
1100
1089
- int wmain (int argc , WCHAR * argvW [] )
1101
+ int main (int argc , char * * argv )
1090
1102
{
1091
1103
int i , op , op_help , ret ;
1092
1104
BOOL show_op_help = FALSE;
@@ -1095,6 +1107,7 @@ int wmain(int argc, WCHAR *argvW[])
1095
1107
WCHAR * key_name , * path , * value_name = NULL , * type = NULL , * data = NULL , separator = '\0' ;
1096
1108
BOOL value_empty = FALSE, value_all = FALSE, recurse = FALSE, force = FALSE;
1097
1109
HKEY root ;
1110
+ wchar_t * * argvW = CommandLineToArgvW (GetCommandLineW (), & argc );
1098
1111
1099
1112
if (argc == 1 )
1100
1113
{
0 commit comments