standalone-ruby 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -22
- data/lib/data/bat-cmd/default_bat_cmd.txt +9 -9
- data/lib/data/c_compilers/tcc/include/_mingw.h +54 -0
- data/lib/data/c_compilers/tcc/include/assert.h +71 -0
- data/lib/data/c_compilers/tcc/include/conio.h +159 -0
- data/lib/data/c_compilers/tcc/include/ctype.h +232 -0
- data/lib/data/c_compilers/tcc/include/dir.h +26 -0
- data/lib/data/c_compilers/tcc/include/direct.h +95 -0
- data/lib/data/c_compilers/tcc/include/dirent.h +96 -0
- data/lib/data/c_compilers/tcc/include/dos.h +110 -0
- data/lib/data/c_compilers/tcc/include/errno.h +117 -0
- data/lib/data/c_compilers/tcc/include/excpt.h +20 -0
- data/lib/data/c_compilers/tcc/include/fcntl.h +135 -0
- data/lib/data/c_compilers/tcc/include/fenv.h +85 -0
- data/lib/data/c_compilers/tcc/include/float.h +224 -0
- data/lib/data/c_compilers/tcc/include/inttypes.h +275 -0
- data/lib/data/c_compilers/tcc/include/io.h +296 -0
- data/lib/data/c_compilers/tcc/include/limits.h +115 -0
- data/lib/data/c_compilers/tcc/include/locale.h +100 -0
- data/lib/data/c_compilers/tcc/include/malloc.h +87 -0
- data/lib/data/c_compilers/tcc/include/math.h +438 -0
- data/lib/data/c_compilers/tcc/include/mem.h +8 -0
- data/lib/data/c_compilers/tcc/include/memory.h +9 -0
- data/lib/data/c_compilers/tcc/include/process.h +158 -0
- data/lib/data/c_compilers/tcc/include/setjmp.h +72 -0
- data/lib/data/c_compilers/tcc/include/share.h +44 -0
- data/lib/data/c_compilers/tcc/include/signal.h +111 -0
- data/lib/data/c_compilers/tcc/include/stdarg.h +16 -0
- data/lib/data/c_compilers/tcc/include/stdbool.h +10 -0
- data/lib/data/c_compilers/tcc/include/stddef.h +26 -0
- data/lib/data/c_compilers/tcc/include/stdint.h +184 -0
- data/lib/data/c_compilers/tcc/include/stdio.h +413 -0
- data/lib/data/c_compilers/tcc/include/stdlib.h +482 -0
- data/lib/data/c_compilers/tcc/include/string.h +206 -0
- data/lib/data/c_compilers/tcc/include/sys/fcntl.h +8 -0
- data/lib/data/c_compilers/tcc/include/sys/file.h +9 -0
- data/lib/data/c_compilers/tcc/include/sys/locking.h +52 -0
- data/lib/data/c_compilers/tcc/include/sys/stat.h +190 -0
- data/lib/data/c_compilers/tcc/include/sys/time.h +3 -0
- data/lib/data/c_compilers/tcc/include/sys/timeb.h +82 -0
- data/lib/data/c_compilers/tcc/include/sys/types.h +118 -0
- data/lib/data/c_compilers/tcc/include/sys/unistd.h +9 -0
- data/lib/data/c_compilers/tcc/include/sys/utime.h +89 -0
- data/lib/data/c_compilers/tcc/include/tchar.h +367 -0
- data/lib/data/c_compilers/tcc/include/time.h +219 -0
- data/lib/data/c_compilers/tcc/include/unistd.h +10 -0
- data/lib/data/c_compilers/tcc/include/values.h +4 -0
- data/lib/data/c_compilers/tcc/include/varargs.h +11 -0
- data/lib/data/c_compilers/tcc/include/wchar.h +318 -0
- data/lib/data/c_compilers/tcc/include/wctype.h +127 -0
- data/lib/data/c_compilers/tcc/include/winapi/basetsd.h +119 -0
- data/lib/data/c_compilers/tcc/include/winapi/basetyps.h +144 -0
- data/lib/data/c_compilers/tcc/include/winapi/winbase.h +1852 -0
- data/lib/data/c_compilers/tcc/include/winapi/wincon.h +207 -0
- data/lib/data/c_compilers/tcc/include/winapi/windef.h +240 -0
- data/lib/data/c_compilers/tcc/include/winapi/windows.h +176 -0
- data/lib/data/c_compilers/tcc/include/winapi/winerror.h +1054 -0
- data/lib/data/c_compilers/tcc/include/winapi/wingdi.h +2843 -0
- data/lib/data/c_compilers/tcc/include/winapi/winnetwk.h +346 -0
- data/lib/data/c_compilers/tcc/include/winapi/winnls.h +651 -0
- data/lib/data/c_compilers/tcc/include/winapi/winnt.h +2667 -0
- data/lib/data/c_compilers/tcc/include/winapi/winreg.h +159 -0
- data/lib/data/c_compilers/tcc/include/winapi/winsvc.h +309 -0
- data/lib/data/c_compilers/tcc/include/winapi/winuser.h +3472 -0
- data/lib/data/c_compilers/tcc/include/winapi/winver.h +133 -0
- data/lib/data/c_compilers/tcc/lib/gdi32.def +337 -0
- data/lib/data/c_compilers/tcc/lib/kernel32.def +763 -0
- data/lib/data/c_compilers/tcc/lib/libtcc1.a +0 -0
- data/lib/data/c_compilers/tcc/lib/msvcrt.def +782 -0
- data/lib/data/c_compilers/tcc/lib/user32.def +654 -0
- data/lib/data/c_compilers/tcc/tcc.exe +0 -0
- data/lib/data/exe_templates/launcher_stub.c +30 -0
- data/lib/data/exe_templates/launcher_stub.cpp +31 -0
- data/lib/data/launcher_templates/vbs/default_vbs.txt +7 -0
- data/lib/data/launcher_templates/vbs/vbs_gui.txt +8 -0
- data/lib/data/resource_files/default.rc +17 -0
- data/lib/data/tcc/include/_mingw.h +54 -54
- data/lib/data/tcc/include/assert.h +71 -71
- data/lib/data/tcc/include/conio.h +159 -159
- data/lib/data/tcc/include/ctype.h +232 -232
- data/lib/data/tcc/include/dir.h +26 -26
- data/lib/data/tcc/include/direct.h +95 -95
- data/lib/data/tcc/include/dirent.h +96 -96
- data/lib/data/tcc/include/dos.h +110 -110
- data/lib/data/tcc/include/errno.h +117 -117
- data/lib/data/tcc/include/excpt.h +20 -20
- data/lib/data/tcc/include/fcntl.h +135 -135
- data/lib/data/tcc/include/fenv.h +85 -85
- data/lib/data/tcc/include/float.h +224 -224
- data/lib/data/tcc/include/inttypes.h +275 -275
- data/lib/data/tcc/include/io.h +296 -296
- data/lib/data/tcc/include/limits.h +115 -115
- data/lib/data/tcc/include/locale.h +100 -100
- data/lib/data/tcc/include/malloc.h +87 -87
- data/lib/data/tcc/include/math.h +438 -438
- data/lib/data/tcc/include/mem.h +8 -8
- data/lib/data/tcc/include/memory.h +9 -9
- data/lib/data/tcc/include/process.h +158 -158
- data/lib/data/tcc/include/setjmp.h +72 -72
- data/lib/data/tcc/include/share.h +44 -44
- data/lib/data/tcc/include/signal.h +111 -111
- data/lib/data/tcc/include/stdarg.h +16 -16
- data/lib/data/tcc/include/stdbool.h +10 -10
- data/lib/data/tcc/include/stddef.h +26 -26
- data/lib/data/tcc/include/stdint.h +184 -184
- data/lib/data/tcc/include/stdio.h +413 -413
- data/lib/data/tcc/include/stdlib.h +482 -482
- data/lib/data/tcc/include/string.h +206 -206
- data/lib/data/tcc/include/sys/fcntl.h +8 -8
- data/lib/data/tcc/include/sys/file.h +9 -9
- data/lib/data/tcc/include/sys/locking.h +52 -52
- data/lib/data/tcc/include/sys/stat.h +190 -190
- data/lib/data/tcc/include/sys/time.h +3 -3
- data/lib/data/tcc/include/sys/timeb.h +82 -82
- data/lib/data/tcc/include/sys/types.h +118 -118
- data/lib/data/tcc/include/sys/unistd.h +9 -9
- data/lib/data/tcc/include/sys/utime.h +89 -89
- data/lib/data/tcc/include/tchar.h +367 -367
- data/lib/data/tcc/include/time.h +219 -219
- data/lib/data/tcc/include/unistd.h +10 -10
- data/lib/data/tcc/include/values.h +4 -4
- data/lib/data/tcc/include/varargs.h +11 -11
- data/lib/data/tcc/include/wchar.h +318 -318
- data/lib/data/tcc/include/wctype.h +127 -127
- data/lib/data/tcc/include/winapi/basetsd.h +119 -119
- data/lib/data/tcc/include/winapi/basetyps.h +144 -144
- data/lib/data/tcc/include/winapi/winbase.h +1852 -1852
- data/lib/data/tcc/include/winapi/wincon.h +207 -207
- data/lib/data/tcc/include/winapi/windef.h +240 -240
- data/lib/data/tcc/include/winapi/windows.h +176 -176
- data/lib/data/tcc/include/winapi/winerror.h +1054 -1054
- data/lib/data/tcc/include/winapi/wingdi.h +2843 -2843
- data/lib/data/tcc/include/winapi/winnetwk.h +346 -346
- data/lib/data/tcc/include/winapi/winnls.h +651 -651
- data/lib/data/tcc/include/winapi/winnt.h +2667 -2667
- data/lib/data/tcc/include/winapi/winreg.h +159 -159
- data/lib/data/tcc/include/winapi/winsvc.h +309 -309
- data/lib/data/tcc/include/winapi/winuser.h +3472 -3472
- data/lib/data/tcc/include/winapi/winver.h +133 -133
- data/lib/data/tcc/lib/gdi32.def +337 -337
- data/lib/data/tcc/lib/kernel32.def +763 -763
- data/lib/data/tcc/lib/msvcrt.def +782 -782
- data/lib/data/tcc/lib/user32.def +654 -654
- data/lib/data/vbs/default_vbs.txt +7 -7
- data/lib/data/vbs/vbs_gui.txt +8 -8
- data/lib/displayer.rb +66 -0
- data/lib/exe_packer.rb +82 -0
- data/lib/launcher.rb +84 -0
- data/lib/launcher_handler.rb +53 -0
- data/lib/logger_helper.rb +24 -0
- data/lib/parameter_parser.rb +210 -0
- data/lib/ruby_copy.rb +26 -0
- data/lib/sfx_generator.rb +11 -0
- data/lib/standalone_ruby.rb +1 -1
- data/lib/utils/launcher_handler.rb +110 -110
- data/lib/version/version.rb +1 -1
- metadata +85 -3
@@ -0,0 +1,367 @@
|
|
1
|
+
/*
|
2
|
+
* tchar.h
|
3
|
+
*
|
4
|
+
* Unicode mapping layer for the standard C library. By including this
|
5
|
+
* file and using the 't' names for string functions
|
6
|
+
* (eg. _tprintf) you can make code which can be easily adapted to both
|
7
|
+
* Unicode and non-unicode environments. In a unicode enabled compile define
|
8
|
+
* _UNICODE before including tchar.h, otherwise the standard non-unicode
|
9
|
+
* library functions will be used.
|
10
|
+
*
|
11
|
+
* Note that you still need to include string.h or stdlib.h etc. to define
|
12
|
+
* the appropriate functions. Also note that there are several defines
|
13
|
+
* included for non-ANSI functions which are commonly available (but using
|
14
|
+
* the convention of prepending an underscore to non-ANSI library function
|
15
|
+
* names).
|
16
|
+
*
|
17
|
+
* This file is part of the Mingw32 package.
|
18
|
+
*
|
19
|
+
* Contributors:
|
20
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
21
|
+
*
|
22
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
23
|
+
*
|
24
|
+
* This source code is offered for use in the public domain. You may
|
25
|
+
* use, modify or distribute it freely.
|
26
|
+
*
|
27
|
+
* This code is distributed in the hope that it will be useful but
|
28
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
29
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
30
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
31
|
+
*
|
32
|
+
* $Revision: 1.2 $
|
33
|
+
* $Author: bellard $
|
34
|
+
* $Date: 2005/04/17 13:14:29 $
|
35
|
+
*
|
36
|
+
*/
|
37
|
+
|
38
|
+
#ifndef _TCHAR_H_
|
39
|
+
#define _TCHAR_H_
|
40
|
+
|
41
|
+
/* All the headers include this file. */
|
42
|
+
#include <_mingw.h>
|
43
|
+
|
44
|
+
/*
|
45
|
+
* NOTE: This tests _UNICODE, which is different from the UNICODE define
|
46
|
+
* used to differentiate Win32 API calls.
|
47
|
+
*/
|
48
|
+
#ifdef _UNICODE
|
49
|
+
|
50
|
+
|
51
|
+
/*
|
52
|
+
* Use TCHAR instead of char or wchar_t. It will be appropriately translated
|
53
|
+
* if _UNICODE is correctly defined (or not).
|
54
|
+
*/
|
55
|
+
#ifndef _TCHAR_DEFINED
|
56
|
+
#ifndef RC_INVOKED
|
57
|
+
typedef wchar_t TCHAR;
|
58
|
+
typedef wchar_t _TCHAR;
|
59
|
+
#endif /* Not RC_INVOKED */
|
60
|
+
#define _TCHAR_DEFINED
|
61
|
+
#endif
|
62
|
+
|
63
|
+
|
64
|
+
/*
|
65
|
+
* __TEXT is a private macro whose specific use is to force the expansion of a
|
66
|
+
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
|
67
|
+
* macro within your programs. It's name and function could change without
|
68
|
+
* notice.
|
69
|
+
*/
|
70
|
+
#define __TEXT(x) L##x
|
71
|
+
|
72
|
+
/* for porting from other Windows compilers */
|
73
|
+
#if 0 // no wide startup module
|
74
|
+
#define _tmain wmain
|
75
|
+
#define _tWinMain wWinMain
|
76
|
+
#define _tenviron _wenviron
|
77
|
+
#define __targv __wargv
|
78
|
+
#endif
|
79
|
+
|
80
|
+
/*
|
81
|
+
* Unicode functions
|
82
|
+
*/
|
83
|
+
#define _tprintf wprintf
|
84
|
+
#define _ftprintf fwprintf
|
85
|
+
#define _stprintf swprintf
|
86
|
+
#define _sntprintf _snwprintf
|
87
|
+
#define _vtprintf vwprintf
|
88
|
+
#define _vftprintf vfwprintf
|
89
|
+
#define _vstprintf vswprintf
|
90
|
+
#define _vsntprintf _vsnwprintf
|
91
|
+
#define _tscanf wscanf
|
92
|
+
#define _ftscanf fwscanf
|
93
|
+
#define _stscanf swscanf
|
94
|
+
#define _fgettc fgetwc
|
95
|
+
#define _fgettchar _fgetwchar
|
96
|
+
#define _fgetts fgetws
|
97
|
+
#define _fputtc fputwc
|
98
|
+
#define _fputtchar _fputwchar
|
99
|
+
#define _fputts fputws
|
100
|
+
#define _gettc getwc
|
101
|
+
#define _getts getws
|
102
|
+
#define _puttc putwc
|
103
|
+
#define _putts putws
|
104
|
+
#define _ungettc ungetwc
|
105
|
+
#define _tcstod wcstod
|
106
|
+
#define _tcstol wcstol
|
107
|
+
#define _tcstoul wcstoul
|
108
|
+
#define _itot _itow
|
109
|
+
#define _ltot _ltow
|
110
|
+
#define _ultot _ultow
|
111
|
+
#define _ttoi _wtoi
|
112
|
+
#define _ttol _wtol
|
113
|
+
#define _tcscat wcscat
|
114
|
+
#define _tcschr wcschr
|
115
|
+
#define _tcscmp wcscmp
|
116
|
+
#define _tcscpy wcscpy
|
117
|
+
#define _tcscspn wcscspn
|
118
|
+
#define _tcslen wcslen
|
119
|
+
#define _tcsncat wcsncat
|
120
|
+
#define _tcsncmp wcsncmp
|
121
|
+
#define _tcsncpy wcsncpy
|
122
|
+
#define _tcspbrk wcspbrk
|
123
|
+
#define _tcsrchr wcsrchr
|
124
|
+
#define _tcsspn wcsspn
|
125
|
+
#define _tcsstr wcsstr
|
126
|
+
#define _tcstok wcstok
|
127
|
+
#define _tcsdup _wcsdup
|
128
|
+
#define _tcsicmp _wcsicmp
|
129
|
+
#define _tcsnicmp _wcsnicmp
|
130
|
+
#define _tcsnset _wcsnset
|
131
|
+
#define _tcsrev _wcsrev
|
132
|
+
#define _tcsset _wcsset
|
133
|
+
#define _tcslwr _wcslwr
|
134
|
+
#define _tcsupr _wcsupr
|
135
|
+
#define _tcsxfrm wcsxfrm
|
136
|
+
#define _tcscoll wcscoll
|
137
|
+
#define _tcsicoll _wcsicoll
|
138
|
+
#define _istalpha iswalpha
|
139
|
+
#define _istupper iswupper
|
140
|
+
#define _istlower iswlower
|
141
|
+
#define _istdigit iswdigit
|
142
|
+
#define _istxdigit iswxdigit
|
143
|
+
#define _istspace iswspace
|
144
|
+
#define _istpunct iswpunct
|
145
|
+
#define _istalnum iswalnum
|
146
|
+
#define _istprint iswprint
|
147
|
+
#define _istgraph iswgraph
|
148
|
+
#define _istcntrl iswcntrl
|
149
|
+
#define _istascii iswascii
|
150
|
+
#define _totupper towupper
|
151
|
+
#define _totlower towlower
|
152
|
+
#define _tcsftime wcsftime
|
153
|
+
/* Macro functions */
|
154
|
+
#define _tcsdec _wcsdec
|
155
|
+
#define _tcsinc _wcsinc
|
156
|
+
#define _tcsnbcnt _wcsncnt
|
157
|
+
#define _tcsnccnt _wcsncnt
|
158
|
+
#define _tcsnextc _wcsnextc
|
159
|
+
#define _tcsninc _wcsninc
|
160
|
+
#define _tcsspnp _wcsspnp
|
161
|
+
#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
|
162
|
+
#define _wcsinc(_wcs) ((_wcs)+1)
|
163
|
+
#define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
|
164
|
+
#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
|
165
|
+
#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
|
166
|
+
#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
|
167
|
+
|
168
|
+
#if 1 // defined __MSVCRT__
|
169
|
+
/*
|
170
|
+
* These wide functions not in crtdll.dll.
|
171
|
+
* Define macros anyway so that _wfoo rather than _tfoo is undefined
|
172
|
+
*/
|
173
|
+
#define _ttoi64 _wtoi64
|
174
|
+
#define _i64tot _i64tow
|
175
|
+
#define _ui64tot _ui64tow
|
176
|
+
#define _tasctime _wasctime
|
177
|
+
#define _tctime _wctime
|
178
|
+
#define _tstrdate _wstrdate
|
179
|
+
#define _tstrtime _wstrtime
|
180
|
+
#define _tutime _wutime
|
181
|
+
#define _tcsnccoll _wcsncoll
|
182
|
+
#define _tcsncoll _wcsncoll
|
183
|
+
#define _tcsncicoll _wcsnicoll
|
184
|
+
#define _tcsnicoll _wcsnicoll
|
185
|
+
#define _taccess _waccess
|
186
|
+
#define _tchmod _wchmod
|
187
|
+
#define _tcreat _wcreat
|
188
|
+
#define _tfindfirst _wfindfirst
|
189
|
+
#define _tfindnext _wfindnext
|
190
|
+
#define _tfopen _wfopen
|
191
|
+
#define _tgetenv _wgetenv
|
192
|
+
#define _tmktemp _wmktemp
|
193
|
+
#define _topen _wopen
|
194
|
+
#define _tremove _wremove
|
195
|
+
#define _trename _wrename
|
196
|
+
#define _tsopen _wsopen
|
197
|
+
#define _tsetlocale _wsetlocale
|
198
|
+
#define _tunlink _wunlink
|
199
|
+
#define _tfinddata_t _wfinddata_t
|
200
|
+
#define _tfindfirsti64 _wfindfirsti64
|
201
|
+
#define _tfindnexti64 _wfindnexti64
|
202
|
+
#define _tfinddatai64_t _wfinddatai64_t
|
203
|
+
#endif /* __MSVCRT__ */
|
204
|
+
|
205
|
+
#else /* Not _UNICODE */
|
206
|
+
|
207
|
+
/*
|
208
|
+
* TCHAR, the type you should use instead of char.
|
209
|
+
*/
|
210
|
+
#ifndef _TCHAR_DEFINED
|
211
|
+
#ifndef RC_INVOKED
|
212
|
+
typedef char TCHAR;
|
213
|
+
typedef char _TCHAR;
|
214
|
+
#endif
|
215
|
+
#define _TCHAR_DEFINED
|
216
|
+
#endif
|
217
|
+
|
218
|
+
/*
|
219
|
+
* __TEXT is a private macro whose specific use is to force the expansion of a
|
220
|
+
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
|
221
|
+
* macro within your programs. It's name and function could change without
|
222
|
+
* notice.
|
223
|
+
*/
|
224
|
+
#define __TEXT(x) x
|
225
|
+
|
226
|
+
/* for porting from other Windows compilers */
|
227
|
+
#define _tmain main
|
228
|
+
#define _tWinMain WinMain
|
229
|
+
#define _tenviron _environ
|
230
|
+
#define __targv __argv
|
231
|
+
|
232
|
+
/*
|
233
|
+
* Non-unicode (standard) functions
|
234
|
+
*/
|
235
|
+
|
236
|
+
#define _tprintf printf
|
237
|
+
#define _ftprintf fprintf
|
238
|
+
#define _stprintf sprintf
|
239
|
+
#define _sntprintf _snprintf
|
240
|
+
#define _vtprintf vprintf
|
241
|
+
#define _vftprintf vfprintf
|
242
|
+
#define _vstprintf vsprintf
|
243
|
+
#define _vsntprintf _vsnprintf
|
244
|
+
#define _tscanf scanf
|
245
|
+
#define _ftscanf fscanf
|
246
|
+
#define _stscanf sscanf
|
247
|
+
#define _fgettc fgetc
|
248
|
+
#define _fgettchar _fgetchar
|
249
|
+
#define _fgetts fgets
|
250
|
+
#define _fputtc fputc
|
251
|
+
#define _fputtchar _fputchar
|
252
|
+
#define _fputts fputs
|
253
|
+
#define _tfopen fopen
|
254
|
+
#define _tgetenv getenv
|
255
|
+
#define _gettc getc
|
256
|
+
#define _getts gets
|
257
|
+
#define _puttc putc
|
258
|
+
#define _putts puts
|
259
|
+
#define _ungettc ungetc
|
260
|
+
#define _tcstod strtod
|
261
|
+
#define _tcstol strtol
|
262
|
+
#define _tcstoul strtoul
|
263
|
+
#define _itot _itoa
|
264
|
+
#define _ltot _ltoa
|
265
|
+
#define _ultot _ultoa
|
266
|
+
#define _ttoi atoi
|
267
|
+
#define _ttol atol
|
268
|
+
#define _tcscat strcat
|
269
|
+
#define _tcschr strchr
|
270
|
+
#define _tcscmp strcmp
|
271
|
+
#define _tcscpy strcpy
|
272
|
+
#define _tcscspn strcspn
|
273
|
+
#define _tcslen strlen
|
274
|
+
#define _tcsncat strncat
|
275
|
+
#define _tcsncmp strncmp
|
276
|
+
#define _tcsncpy strncpy
|
277
|
+
#define _tcspbrk strpbrk
|
278
|
+
#define _tcsrchr strrchr
|
279
|
+
#define _tcsspn strspn
|
280
|
+
#define _tcsstr strstr
|
281
|
+
#define _tcstok strtok
|
282
|
+
#define _tcsdup _strdup
|
283
|
+
#define _tcsicmp _stricmp
|
284
|
+
#define _tcsnicmp _strnicmp
|
285
|
+
#define _tcsnset _strnset
|
286
|
+
#define _tcsrev _strrev
|
287
|
+
#define _tcsset _strset
|
288
|
+
#define _tcslwr _strlwr
|
289
|
+
#define _tcsupr _strupr
|
290
|
+
#define _tcsxfrm strxfrm
|
291
|
+
#define _tcscoll strcoll
|
292
|
+
#define _tcsicoll _stricoll
|
293
|
+
#define _istalpha isalpha
|
294
|
+
#define _istupper isupper
|
295
|
+
#define _istlower islower
|
296
|
+
#define _istdigit isdigit
|
297
|
+
#define _istxdigit isxdigit
|
298
|
+
#define _istspace isspace
|
299
|
+
#define _istpunct ispunct
|
300
|
+
#define _istalnum isalnum
|
301
|
+
#define _istprint isprint
|
302
|
+
#define _istgraph isgraph
|
303
|
+
#define _istcntrl iscntrl
|
304
|
+
#define _istascii isascii
|
305
|
+
#define _totupper toupper
|
306
|
+
#define _totlower tolower
|
307
|
+
#define _tasctime asctime
|
308
|
+
#define _tctime ctime
|
309
|
+
#define _tstrdate _strdate
|
310
|
+
#define _tstrtime _strtime
|
311
|
+
#define _tutime _utime
|
312
|
+
#define _tcsftime strftime
|
313
|
+
/* Macro functions */
|
314
|
+
#define _tcsdec _strdec
|
315
|
+
#define _tcsinc _strinc
|
316
|
+
#define _tcsnbcnt _strncnt
|
317
|
+
#define _tcsnccnt _strncnt
|
318
|
+
#define _tcsnextc _strnextc
|
319
|
+
#define _tcsninc _strninc
|
320
|
+
#define _tcsspnp _strspnp
|
321
|
+
#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
|
322
|
+
#define _strinc(_str) ((_str)+1)
|
323
|
+
#define _strnextc(_str) ((unsigned int) *(_str))
|
324
|
+
#define _strninc(_str, _inc) (((_str)+(_inc)))
|
325
|
+
#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
|
326
|
+
#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
|
327
|
+
|
328
|
+
#define _tchmod _chmod
|
329
|
+
#define _tcreat _creat
|
330
|
+
#define _tfindfirst _findfirst
|
331
|
+
#define _tfindnext _findnext
|
332
|
+
#define _tmktemp _mktemp
|
333
|
+
#define _topen _open
|
334
|
+
#define _taccess _access
|
335
|
+
#define _tremove remove
|
336
|
+
#define _trename rename
|
337
|
+
#define _tsopen _sopen
|
338
|
+
#define _tsetlocale setlocale
|
339
|
+
#define _tunlink _unlink
|
340
|
+
#define _tfinddata_t _finddata_t
|
341
|
+
|
342
|
+
|
343
|
+
#if 1 // defined __MSVCRT__
|
344
|
+
/* Not in crtdll.dll. Define macros anyway? */
|
345
|
+
#define _ttoi64 _atoi64
|
346
|
+
#define _i64tot _i64toa
|
347
|
+
#define _ui64tot _ui64toa
|
348
|
+
#define _tcsnccoll _strncoll
|
349
|
+
#define _tcsncoll _strncoll
|
350
|
+
#define _tcsncicoll _strnicoll
|
351
|
+
#define _tcsnicoll _strnicoll
|
352
|
+
#define _tfindfirsti64 _findfirsti64
|
353
|
+
#define _tfindnexti64 _findnexti64
|
354
|
+
#define _tfinddatai64_t _finddatai64_t
|
355
|
+
#endif /* __MSVCRT__ */
|
356
|
+
|
357
|
+
#endif /* Not _UNICODE */
|
358
|
+
|
359
|
+
/*
|
360
|
+
* UNICODE a constant string when _UNICODE is defined else returns the string
|
361
|
+
* unmodified. Also defined in w32api/winnt.h.
|
362
|
+
*/
|
363
|
+
#define _TEXT(x) __TEXT(x)
|
364
|
+
#define _T(x) __TEXT(x)
|
365
|
+
|
366
|
+
#endif /* Not _TCHAR_H_ */
|
367
|
+
|
@@ -0,0 +1,219 @@
|
|
1
|
+
/*
|
2
|
+
* time.h
|
3
|
+
*
|
4
|
+
* Date and time functions and types.
|
5
|
+
*
|
6
|
+
* This file is part of the Mingw32 package.
|
7
|
+
*
|
8
|
+
* Contributors:
|
9
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
12
|
+
*
|
13
|
+
* This source code is offered for use in the public domain. You may
|
14
|
+
* use, modify or distribute it freely.
|
15
|
+
*
|
16
|
+
* This code is distributed in the hope that it will be useful but
|
17
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
18
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
+
*
|
21
|
+
* $Revision: 1.2 $
|
22
|
+
* $Author: bellard $
|
23
|
+
* $Date: 2005/04/17 13:14:29 $
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
#ifndef _TIME_H_
|
28
|
+
#define _TIME_H_
|
29
|
+
|
30
|
+
/* All the headers include this file. */
|
31
|
+
#include <_mingw.h>
|
32
|
+
|
33
|
+
#define __need_wchar_t
|
34
|
+
#define __need_size_t
|
35
|
+
#ifndef RC_INVOKED
|
36
|
+
#include <stddef.h>
|
37
|
+
#endif /* Not RC_INVOKED */
|
38
|
+
|
39
|
+
/*
|
40
|
+
* Need a definition of time_t.
|
41
|
+
*/
|
42
|
+
#include <sys/types.h>
|
43
|
+
|
44
|
+
/*
|
45
|
+
* Number of clock ticks per second. A clock tick is the unit by which
|
46
|
+
* processor time is measured and is returned by 'clock'.
|
47
|
+
*/
|
48
|
+
#define CLOCKS_PER_SEC ((clock_t)1000)
|
49
|
+
#define CLK_TCK CLOCKS_PER_SEC
|
50
|
+
|
51
|
+
|
52
|
+
#ifndef RC_INVOKED
|
53
|
+
|
54
|
+
/*
|
55
|
+
* A type for storing the current time and date. This is the number of
|
56
|
+
* seconds since midnight Jan 1, 1970.
|
57
|
+
* NOTE: Normally this is defined by the above include of sys/types.h
|
58
|
+
*/
|
59
|
+
#ifndef _TIME_T_DEFINED
|
60
|
+
typedef long time_t;
|
61
|
+
#define _TIME_T_DEFINED
|
62
|
+
#endif
|
63
|
+
|
64
|
+
/*
|
65
|
+
* A type for measuring processor time (in clock ticks).
|
66
|
+
*/
|
67
|
+
#ifndef _CLOCK_T_DEFINED
|
68
|
+
typedef long clock_t;
|
69
|
+
#define _CLOCK_T_DEFINED
|
70
|
+
#endif
|
71
|
+
|
72
|
+
|
73
|
+
/*
|
74
|
+
* A structure for storing all kinds of useful information about the
|
75
|
+
* current (or another) time.
|
76
|
+
*/
|
77
|
+
struct tm
|
78
|
+
{
|
79
|
+
int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
|
80
|
+
int tm_min; /* Minutes: 0-59 */
|
81
|
+
int tm_hour; /* Hours since midnight: 0-23 */
|
82
|
+
int tm_mday; /* Day of the month: 1-31 */
|
83
|
+
int tm_mon; /* Months *since* january: 0-11 */
|
84
|
+
int tm_year; /* Years since 1900 */
|
85
|
+
int tm_wday; /* Days since Sunday (0-6) */
|
86
|
+
int tm_yday; /* Days since Jan. 1: 0-365 */
|
87
|
+
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
|
88
|
+
* -1 don't know */
|
89
|
+
};
|
90
|
+
|
91
|
+
#ifdef __cplusplus
|
92
|
+
extern "C" {
|
93
|
+
#endif
|
94
|
+
|
95
|
+
clock_t clock (void);
|
96
|
+
time_t time (time_t*);
|
97
|
+
double difftime (time_t, time_t);
|
98
|
+
time_t mktime (struct tm*);
|
99
|
+
|
100
|
+
/*
|
101
|
+
* These functions write to and return pointers to static buffers that may
|
102
|
+
* be overwritten by other function calls. Yikes!
|
103
|
+
*
|
104
|
+
* NOTE: localtime, and perhaps the others of the four functions grouped
|
105
|
+
* below may return NULL if their argument is not 'acceptable'. Also note
|
106
|
+
* that calling asctime with a NULL pointer will produce an Invalid Page
|
107
|
+
* Fault and crap out your program. Guess how I know. Hint: stat called on
|
108
|
+
* a directory gives 'invalid' times in st_atime etc...
|
109
|
+
*/
|
110
|
+
char* asctime (const struct tm*);
|
111
|
+
char* ctime (const time_t*);
|
112
|
+
struct tm* gmtime (const time_t*);
|
113
|
+
struct tm* localtime (const time_t*);
|
114
|
+
|
115
|
+
|
116
|
+
size_t strftime (char*, size_t, const char*, const struct tm*);
|
117
|
+
|
118
|
+
size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
119
|
+
|
120
|
+
#ifndef __STRICT_ANSI__
|
121
|
+
extern void _tzset (void);
|
122
|
+
|
123
|
+
#ifndef _NO_OLDNAMES
|
124
|
+
extern void tzset (void);
|
125
|
+
#endif
|
126
|
+
|
127
|
+
size_t strftime(char*, size_t, const char*, const struct tm*);
|
128
|
+
char* _strdate(char*);
|
129
|
+
char* _strtime(char*);
|
130
|
+
|
131
|
+
#endif /* Not __STRICT_ANSI__ */
|
132
|
+
|
133
|
+
/*
|
134
|
+
* _daylight: non zero if daylight savings time is used.
|
135
|
+
* _timezone: difference in seconds between GMT and local time.
|
136
|
+
* _tzname: standard/daylight savings time zone names (an array with two
|
137
|
+
* elements).
|
138
|
+
*/
|
139
|
+
#ifdef __MSVCRT__
|
140
|
+
|
141
|
+
/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
|
142
|
+
extern int* __p__daylight (void);
|
143
|
+
extern long* __p__timezone (void);
|
144
|
+
extern char** __p__tzname (void);
|
145
|
+
|
146
|
+
__MINGW_IMPORT int _daylight;
|
147
|
+
__MINGW_IMPORT long _timezone;
|
148
|
+
__MINGW_IMPORT char *_tzname[2];
|
149
|
+
|
150
|
+
#else /* not __MSVCRT (ie. crtdll) */
|
151
|
+
|
152
|
+
#ifndef __DECLSPEC_SUPPORTED
|
153
|
+
|
154
|
+
extern int* __imp__daylight_dll;
|
155
|
+
extern long* __imp__timezone_dll;
|
156
|
+
extern char** __imp__tzname;
|
157
|
+
|
158
|
+
#define _daylight (*__imp__daylight_dll)
|
159
|
+
#define _timezone (*__imp__timezone_dll)
|
160
|
+
#define _tzname (__imp__tzname)
|
161
|
+
|
162
|
+
#else /* __DECLSPEC_SUPPORTED */
|
163
|
+
|
164
|
+
__MINGW_IMPORT int _daylight_dll;
|
165
|
+
__MINGW_IMPORT long _timezone_dll;
|
166
|
+
__MINGW_IMPORT char* _tzname[2];
|
167
|
+
|
168
|
+
#define _daylight _daylight_dll
|
169
|
+
#define _timezone _timezone_dll
|
170
|
+
|
171
|
+
#endif /* __DECLSPEC_SUPPORTED */
|
172
|
+
|
173
|
+
#endif /* not __MSVCRT__ */
|
174
|
+
|
175
|
+
#ifndef _NO_OLDNAMES
|
176
|
+
|
177
|
+
#ifdef __MSVCRT__
|
178
|
+
|
179
|
+
/* These go in the oldnames import library for MSVCRT. */
|
180
|
+
__MINGW_IMPORT int daylight;
|
181
|
+
__MINGW_IMPORT long timezone;
|
182
|
+
__MINGW_IMPORT char *tzname[2];
|
183
|
+
|
184
|
+
#ifndef _WTIME_DEFINED
|
185
|
+
|
186
|
+
/* wide function prototypes, also declared in wchar.h */
|
187
|
+
|
188
|
+
wchar_t * _wasctime(const struct tm*);
|
189
|
+
wchar_t * _wctime(const time_t*);
|
190
|
+
wchar_t* _wstrdate(wchar_t*);
|
191
|
+
wchar_t* _wstrtime(wchar_t*);
|
192
|
+
|
193
|
+
#define _WTIME_DEFINED
|
194
|
+
#endif /* _WTIME_DEFINED */
|
195
|
+
|
196
|
+
|
197
|
+
#else /* not __MSVCRT__ */
|
198
|
+
|
199
|
+
/* CRTDLL is royally messed up when it comes to these macros.
|
200
|
+
TODO: import and alias these via oldnames import library instead
|
201
|
+
of macros. */
|
202
|
+
|
203
|
+
#define daylight _daylight
|
204
|
+
/* NOTE: timezone not defined because it would conflict with sys/timeb.h.
|
205
|
+
Also, tzname used to a be macro, but now it's in moldname. */
|
206
|
+
__MINGW_IMPORT char *tzname[2];
|
207
|
+
|
208
|
+
#endif /* not __MSVCRT__ */
|
209
|
+
|
210
|
+
#endif /* Not _NO_OLDNAMES */
|
211
|
+
|
212
|
+
#ifdef __cplusplus
|
213
|
+
}
|
214
|
+
#endif
|
215
|
+
|
216
|
+
#endif /* Not RC_INVOKED */
|
217
|
+
|
218
|
+
#endif /* Not _TIME_H_ */
|
219
|
+
|