1 | /*
|
---|
2 | * Header file for the stripped down version of MSVCRT that only
|
---|
3 | * contains functions specific to the MS VC Runtime.
|
---|
4 | *
|
---|
5 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
6 | *
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifndef _minivcrt_h_
|
---|
10 | #define _minivcrt_h_
|
---|
11 |
|
---|
12 | #include <winnt.h>
|
---|
13 |
|
---|
14 | #include <time.h>
|
---|
15 |
|
---|
16 | #ifdef __cplusplus
|
---|
17 | extern "C" {
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | #define MSVCRT(x) x
|
---|
21 |
|
---|
22 | #define FILENAME_MAX 260
|
---|
23 |
|
---|
24 | #ifndef max
|
---|
25 | #define max(a,b) ( (a>b) ? a : b )
|
---|
26 | #endif
|
---|
27 | #ifndef min
|
---|
28 | #define min(a,b) ( (a<b) ? a : b )
|
---|
29 | #endif
|
---|
30 |
|
---|
31 | typedef unsigned long _fsize_t;
|
---|
32 |
|
---|
33 | struct _wfinddata_t {
|
---|
34 | unsigned attrib;
|
---|
35 | MSVCRT(time_t) time_create;
|
---|
36 | MSVCRT(time_t) time_access;
|
---|
37 | MSVCRT(time_t) time_write;
|
---|
38 | _fsize_t size;
|
---|
39 | WCHAR name[MSVCRT(FILENAME_MAX)];
|
---|
40 | };
|
---|
41 |
|
---|
42 | int _wchdir(const WCHAR*);
|
---|
43 | WCHAR* _wgetcwd(WCHAR*,int);
|
---|
44 | WCHAR* _wgetdcwd(int,WCHAR*,int);
|
---|
45 | int _wmkdir(const WCHAR*);
|
---|
46 | int _wrmdir(const WCHAR*);
|
---|
47 |
|
---|
48 | WCHAR* _itow(int,WCHAR*,int); /* NTDLL */
|
---|
49 | WCHAR* _i64tow(__int64,WCHAR*,int); /* NTDLL */
|
---|
50 | WCHAR* _ltow(long,WCHAR*,int); /* NTDLL */
|
---|
51 | WCHAR* _ui64tow(unsigned __int64,WCHAR*,int); /* NTDLL */
|
---|
52 | WCHAR* _ultow(unsigned long,WCHAR*,int); /* NTDLL */
|
---|
53 |
|
---|
54 | WCHAR* _wfullpath(WCHAR*,const WCHAR*,MSVCRT(size_t));
|
---|
55 | WCHAR* _wgetenv(const WCHAR*);
|
---|
56 | void _wmakepath(WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*);
|
---|
57 | void _wperror(const WCHAR*); /* NTDLL */
|
---|
58 | int _wputenv(const WCHAR*);
|
---|
59 | void _wsearchenv(const WCHAR*,const WCHAR*,WCHAR*); /* NTDLL */
|
---|
60 | void _wsplitpath(const WCHAR*,WCHAR*,WCHAR*,WCHAR*,WCHAR*);
|
---|
61 |
|
---|
62 | int _wsystem(const WCHAR*);
|
---|
63 | int _wtoi(const WCHAR*); /* NTDLL */
|
---|
64 | __int64 _wtoi64(const WCHAR*); /* NTDLL */
|
---|
65 | long _wtol(const WCHAR*); /* NTDLL */
|
---|
66 |
|
---|
67 | #define _wcsicmp NTDLL__wcsicmp
|
---|
68 | #define _wcslwr NTDLL__wcslwr
|
---|
69 | #define _wcsnicmp NTDLL__wcsnicmp
|
---|
70 | #define _wcsupr NTDLL__wcsupr
|
---|
71 |
|
---|
72 | WCHAR* _wcsdup(const WCHAR*);
|
---|
73 | int _wcsicmp(const WCHAR*,const WCHAR*);
|
---|
74 | int _wcsicoll(const WCHAR*,const WCHAR*);
|
---|
75 | WCHAR* _wcslwr(WCHAR*);
|
---|
76 | int _wcsnicmp(const WCHAR*,const WCHAR*,MSVCRT(size_t));
|
---|
77 | WCHAR* _wcsnset(WCHAR*,WCHAR,MSVCRT(size_t));
|
---|
78 | WCHAR* _wcsrev(WCHAR*);
|
---|
79 | WCHAR* _wcsset(WCHAR*,WCHAR);
|
---|
80 | WCHAR* _wcsupr(WCHAR*);
|
---|
81 |
|
---|
82 | int _waccess(const WCHAR*,int);
|
---|
83 | int _wchmod(const WCHAR*,int);
|
---|
84 | int _wcreat(const WCHAR*,int);
|
---|
85 | long _wfindfirst(const WCHAR*,struct _wfinddata_t*);
|
---|
86 | int _wfindnext(long,struct _wfinddata_t*);
|
---|
87 | WCHAR* _wmktemp(WCHAR*);
|
---|
88 | int _wrename(const WCHAR*,const WCHAR*);
|
---|
89 | int _wunlink(const WCHAR*);
|
---|
90 |
|
---|
91 | #define wcstok NTDLL_wcstok
|
---|
92 |
|
---|
93 | WCHAR* wcstok(WCHAR*,WCHAR*);
|
---|
94 |
|
---|
95 | #define _stat stat
|
---|
96 | struct _stat;
|
---|
97 | int _wstat(const WCHAR*,struct _stat*);
|
---|
98 |
|
---|
99 | int _wremove(const WCHAR*);
|
---|
100 | WCHAR* _wtempnam(const WCHAR*,const WCHAR*);
|
---|
101 |
|
---|
102 | char *MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int size);
|
---|
103 | #undef _fullpath
|
---|
104 | #define _fullpath MSVCRT__fullpath
|
---|
105 |
|
---|
106 | #define swprintf NTDLL_swprintf
|
---|
107 | #define swscanf NTDLL_swscanf
|
---|
108 |
|
---|
109 | int swprintf(WCHAR*,const WCHAR*,...);
|
---|
110 | int swscanf(const WCHAR*,const WCHAR*,...);
|
---|
111 |
|
---|
112 | #define wcsdup _wcsdup
|
---|
113 | #define wcsicmp _wcsicmp
|
---|
114 | #define wcsnicmp _wcsnicmp
|
---|
115 | #define wcsnset _wcsnset
|
---|
116 | #define wcsrev _wcsrev
|
---|
117 | #define wcsset _wcsset
|
---|
118 | #define wcslwr _wcslwr
|
---|
119 | #define wcsupr _wcsupr
|
---|
120 | #define wcsicoll _wcsicoll
|
---|
121 |
|
---|
122 | #ifdef __cplusplus
|
---|
123 | }
|
---|
124 | #endif
|
---|
125 |
|
---|
126 | #endif /* _minivcrt_h_ */
|
---|