standalone-ruby 1.3 → 1.4

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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -19
  3. data/bin/standalone-ruby +3 -3
  4. data/lib/data/exe_template/launcher_stub.c +35 -0
  5. data/lib/data/exe_template/launcher_stub.cpp +9 -0
  6. data/lib/data/tcc/include/_mingw.h +54 -0
  7. data/lib/data/tcc/include/assert.h +71 -0
  8. data/lib/data/tcc/include/conio.h +159 -0
  9. data/lib/data/tcc/include/ctype.h +232 -0
  10. data/lib/data/tcc/include/dir.h +26 -0
  11. data/lib/data/tcc/include/direct.h +95 -0
  12. data/lib/data/tcc/include/dirent.h +96 -0
  13. data/lib/data/tcc/include/dos.h +110 -0
  14. data/lib/data/tcc/include/errno.h +117 -0
  15. data/lib/data/tcc/include/excpt.h +20 -0
  16. data/lib/data/tcc/include/fcntl.h +135 -0
  17. data/lib/data/tcc/include/fenv.h +85 -0
  18. data/lib/data/tcc/include/float.h +224 -0
  19. data/lib/data/tcc/include/inttypes.h +275 -0
  20. data/lib/data/tcc/include/io.h +296 -0
  21. data/lib/data/tcc/include/limits.h +115 -0
  22. data/lib/data/tcc/include/locale.h +100 -0
  23. data/lib/data/tcc/include/malloc.h +87 -0
  24. data/lib/data/tcc/include/math.h +438 -0
  25. data/lib/data/tcc/include/mem.h +8 -0
  26. data/lib/data/tcc/include/memory.h +9 -0
  27. data/lib/data/tcc/include/process.h +158 -0
  28. data/lib/data/tcc/include/setjmp.h +72 -0
  29. data/lib/data/tcc/include/share.h +44 -0
  30. data/lib/data/tcc/include/signal.h +111 -0
  31. data/lib/data/tcc/include/stdarg.h +16 -0
  32. data/lib/data/tcc/include/stdbool.h +10 -0
  33. data/lib/data/tcc/include/stddef.h +26 -0
  34. data/lib/data/tcc/include/stdint.h +184 -0
  35. data/lib/data/tcc/include/stdio.h +413 -0
  36. data/lib/data/tcc/include/stdlib.h +482 -0
  37. data/lib/data/tcc/include/string.h +206 -0
  38. data/lib/data/tcc/include/sys/fcntl.h +8 -0
  39. data/lib/data/tcc/include/sys/file.h +9 -0
  40. data/lib/data/tcc/include/sys/locking.h +52 -0
  41. data/lib/data/tcc/include/sys/stat.h +190 -0
  42. data/lib/data/tcc/include/sys/time.h +3 -0
  43. data/lib/data/tcc/include/sys/timeb.h +82 -0
  44. data/lib/data/tcc/include/sys/types.h +118 -0
  45. data/lib/data/tcc/include/sys/unistd.h +9 -0
  46. data/lib/data/tcc/include/sys/utime.h +89 -0
  47. data/lib/data/tcc/include/tchar.h +367 -0
  48. data/lib/data/tcc/include/time.h +219 -0
  49. data/lib/data/tcc/include/unistd.h +10 -0
  50. data/lib/data/tcc/include/values.h +4 -0
  51. data/lib/data/tcc/include/varargs.h +11 -0
  52. data/lib/data/tcc/include/wchar.h +318 -0
  53. data/lib/data/tcc/include/wctype.h +127 -0
  54. data/lib/data/tcc/include/winapi/basetsd.h +119 -0
  55. data/lib/data/tcc/include/winapi/basetyps.h +144 -0
  56. data/lib/data/tcc/include/winapi/winbase.h +1852 -0
  57. data/lib/data/tcc/include/winapi/wincon.h +207 -0
  58. data/lib/data/tcc/include/winapi/windef.h +240 -0
  59. data/lib/data/tcc/include/winapi/windows.h +176 -0
  60. data/lib/data/tcc/include/winapi/winerror.h +1054 -0
  61. data/lib/data/tcc/include/winapi/wingdi.h +2843 -0
  62. data/lib/data/tcc/include/winapi/winnetwk.h +346 -0
  63. data/lib/data/tcc/include/winapi/winnls.h +651 -0
  64. data/lib/data/tcc/include/winapi/winnt.h +2667 -0
  65. data/lib/data/tcc/include/winapi/winreg.h +159 -0
  66. data/lib/data/tcc/include/winapi/winsvc.h +309 -0
  67. data/lib/data/tcc/include/winapi/winuser.h +3472 -0
  68. data/lib/data/tcc/include/winapi/winver.h +133 -0
  69. data/lib/data/tcc/lib/gdi32.def +337 -0
  70. data/lib/data/tcc/lib/kernel32.def +763 -0
  71. data/lib/data/tcc/lib/libtcc1.a +0 -0
  72. data/lib/data/tcc/lib/msvcrt.def +782 -0
  73. data/lib/data/tcc/lib/user32.def +654 -0
  74. data/lib/data/tcc/tcc.exe +0 -0
  75. data/lib/data/tcc/tiny_impdef.exe +0 -0
  76. data/lib/data/tcc/tiny_libmaker.exe +0 -0
  77. data/lib/data/vbs/default_vbs.txt +1 -1
  78. data/lib/data/vbs/vbs_gui.txt +1 -1
  79. data/lib/standalone_ruby.rb +6 -6
  80. data/lib/utils/config_generator.rb +5 -0
  81. data/lib/utils/displayer.rb +61 -56
  82. data/lib/utils/exe_packer.rb +68 -0
  83. data/lib/utils/launcher.rb +55 -14
  84. data/lib/utils/launcher_handler.rb +27 -4
  85. data/lib/utils/logger_helper.rb +24 -22
  86. data/lib/utils/parameter_parser.rb +206 -189
  87. data/lib/utils/ruby_copy.rb +26 -20
  88. metadata +77 -3
  89. data/lib/data/bat/default_bat.txt +0 -9
@@ -0,0 +1,318 @@
1
+ /*
2
+ * wchar.h
3
+ *
4
+ * Defines of all functions for supporting wide characters. Actually it
5
+ * just includes all those headers, which is not a good thing to do from a
6
+ * processing time point of view, but it does mean that everything will be
7
+ * in sync.
8
+ *
9
+ * This file is part of the Mingw32 package.
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 _WCHAR_H_
28
+ #define _WCHAR_H_
29
+
30
+ /* All the headers include this file. */
31
+ #include <_mingw.h>
32
+
33
+ #include <ctype.h>
34
+ #include <stdio.h>
35
+ #include <stdlib.h>
36
+ #include <string.h>
37
+ #include <time.h>
38
+ #include <sys/types.h>
39
+
40
+ #define __need_size_t
41
+ #define __need_wint_t
42
+ #define __need_wchar_t
43
+ #ifndef RC_INVOKED
44
+ #include <stddef.h>
45
+ #endif /* Not RC_INVOKED */
46
+
47
+ #define WCHAR_MIN 0
48
+ #define WCHAR_MAX ((wchar_t)-1)
49
+
50
+ #ifndef RC_INVOKED
51
+
52
+ #ifdef __cplusplus
53
+ extern "C" {
54
+ #endif
55
+
56
+ #ifndef __STRICT_ANSI__
57
+
58
+ #ifndef _FSIZE_T_DEFINED
59
+ typedef unsigned long _fsize_t;
60
+ #define _FSIZE_T_DEFINED
61
+ #endif
62
+
63
+ #ifndef _WFINDDATA_T_DEFINED
64
+ struct _wfinddata_t {
65
+ unsigned attrib;
66
+ time_t time_create; /* -1 for FAT file systems */
67
+ time_t time_access; /* -1 for FAT file systems */
68
+ time_t time_write;
69
+ _fsize_t size;
70
+ wchar_t name[FILENAME_MAX]; /* may include spaces. */
71
+ };
72
+ struct _wfinddatai64_t {
73
+ unsigned attrib;
74
+ time_t time_create;
75
+ time_t time_access;
76
+ time_t time_write;
77
+ __int64 size;
78
+ wchar_t name[FILENAME_MAX];
79
+ };
80
+ #define _WFINDDATA_T_DEFINED
81
+ #endif
82
+
83
+ /* Wide character versions. Also defined in io.h. */
84
+ /* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
85
+ applies to other wide character versions? */
86
+ #if !defined (_WIO_DEFINED)
87
+ #if defined (__MSVCRT__)
88
+ int _waccess (const wchar_t*, int);
89
+ int _wchmod (const wchar_t*, int);
90
+ int _wcreat (const wchar_t*, int);
91
+ long _wfindfirst (wchar_t*, struct _wfinddata_t *);
92
+ int _wfindnext (long, struct _wfinddata_t *);
93
+ int _wunlink (const wchar_t*);
94
+ int _wopen (const wchar_t*, int, ...);
95
+ int _wsopen (const wchar_t*, int, int, ...);
96
+ wchar_t* _wmktemp (wchar_t*);
97
+ long _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
98
+ int _wfindnexti64 (long, struct _wfinddatai64_t*);
99
+ #endif /* defined (__MSVCRT__) */
100
+ #define _WIO_DEFINED
101
+ #endif /* _WIO_DEFINED */
102
+
103
+ #ifndef _WSTDIO_DEFINED
104
+ /* also in stdio.h - keep in sync */
105
+ int fwprintf (FILE*, const wchar_t*, ...);
106
+ int wprintf (const wchar_t*, ...);
107
+ int swprintf (wchar_t*, const wchar_t*, ...);
108
+ int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
109
+ int vfwprintf (FILE*, const wchar_t*, va_list);
110
+ int vwprintf (const wchar_t*, va_list);
111
+ int vswprintf (wchar_t*, const wchar_t*, va_list);
112
+ int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
113
+ int fwscanf (FILE*, const wchar_t*, ...);
114
+ int wscanf (const wchar_t*, ...);
115
+ int swscanf (const wchar_t*, const wchar_t*, ...);
116
+ wint_t fgetwc (FILE*);
117
+ wint_t fputwc (wchar_t, FILE*);
118
+ wint_t ungetwc (wchar_t, FILE*);
119
+
120
+ #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
121
+ int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
122
+ extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format,
123
+ va_list arg)
124
+ { return _vsnwprintf ( s, n, format, arg); }
125
+ #endif
126
+
127
+ #ifdef __MSVCRT__
128
+ wchar_t* fgetws (wchar_t*, int, FILE*);
129
+ int fputws (const wchar_t*, FILE*);
130
+ wint_t getwc (FILE*);
131
+ wint_t getwchar (void);
132
+ wchar_t* _getws (wchar_t*);
133
+ wint_t putwc (wint_t, FILE*);
134
+ int _putws (const wchar_t*);
135
+ wint_t putwchar (wint_t);
136
+
137
+ FILE* _wfopen (const wchar_t*, const wchar_t*);
138
+ FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
139
+ FILE* _wfsopen (const wchar_t*, const wchar_t*, int);
140
+ wchar_t* _wtmpnam (wchar_t*);
141
+ wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
142
+ int _wrename (const wchar_t*, const wchar_t*);
143
+ int _wremove (const wchar_t*)
144
+
145
+ FILE* _wpopen (const wchar_t*, const wchar_t*)
146
+ void _wperror (const wchar_t*);
147
+ #endif /* __MSVCRT__ */
148
+ #define _WSTDIO_DEFINED
149
+ #endif /* _WSTDIO_DEFINED */
150
+
151
+ #ifndef _WDIRECT_DEFINED
152
+ /* Also in direct.h */
153
+ #ifdef __MSVCRT__
154
+ int _wchdir (const wchar_t*);
155
+ wchar_t* _wgetcwd (wchar_t*, int);
156
+ wchar_t* _wgetdcwd (int, wchar_t*, int);
157
+ int _wmkdir (const wchar_t*);
158
+ int _wrmdir (const wchar_t*);
159
+ #endif /* __MSVCRT__ */
160
+ #define _WDIRECT_DEFINED
161
+ #endif /* _WDIRECT_DEFINED */
162
+
163
+ #ifndef _STAT_DEFINED
164
+ /*
165
+ * The structure manipulated and returned by stat and fstat.
166
+ *
167
+ * NOTE: If called on a directory the values in the time fields are not only
168
+ * invalid, they will cause localtime et. al. to return NULL. And calling
169
+ * asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
170
+ */
171
+ struct _stat
172
+ {
173
+ _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
174
+ _ino_t st_ino; /* Always zero ? */
175
+ _mode_t st_mode; /* See above constants */
176
+ short st_nlink; /* Number of links. */
177
+ short st_uid; /* User: Maybe significant on NT ? */
178
+ short st_gid; /* Group: Ditto */
179
+ _dev_t st_rdev; /* Seems useless (not even filled in) */
180
+ _off_t st_size; /* File size in bytes */
181
+ time_t st_atime; /* Accessed date (always 00:00 hrs local
182
+ * on FAT) */
183
+ time_t st_mtime; /* Modified time */
184
+ time_t st_ctime; /* Creation time */
185
+ };
186
+
187
+ struct stat
188
+ {
189
+ _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
190
+ _ino_t st_ino; /* Always zero ? */
191
+ _mode_t st_mode; /* See above constants */
192
+ short st_nlink; /* Number of links. */
193
+ short st_uid; /* User: Maybe significant on NT ? */
194
+ short st_gid; /* Group: Ditto */
195
+ _dev_t st_rdev; /* Seems useless (not even filled in) */
196
+ _off_t st_size; /* File size in bytes */
197
+ time_t st_atime; /* Accessed date (always 00:00 hrs local
198
+ * on FAT) */
199
+ time_t st_mtime; /* Modified time */
200
+ time_t st_ctime; /* Creation time */
201
+ };
202
+ #if defined (__MSVCRT__)
203
+ struct _stati64 {
204
+ _dev_t st_dev;
205
+ _ino_t st_ino;
206
+ unsigned short st_mode;
207
+ short st_nlink;
208
+ short st_uid;
209
+ short st_gid;
210
+ _dev_t st_rdev;
211
+ __int64 st_size;
212
+ time_t st_atime;
213
+ time_t st_mtime;
214
+ time_t st_ctime;
215
+ };
216
+ #endif /* __MSVCRT__ */
217
+ #define _STAT_DEFINED
218
+ #endif /* _STAT_DEFINED */
219
+
220
+ #if !defined ( _WSTAT_DEFINED)
221
+ /* also declared in sys/stat.h */
222
+ #if defined __MSVCRT__
223
+ int _wstat (const wchar_t*, struct _stat*);
224
+ int _wstati64 (const wchar_t*, struct _stati64*);
225
+ #endif /* __MSVCRT__ */
226
+ #define _WSTAT_DEFINED
227
+ #endif /* ! _WSTAT_DEFIND */
228
+
229
+ #ifndef _WTIME_DEFINED
230
+ #ifdef __MSVCRT__
231
+ /* wide function prototypes, also declared in time.h */
232
+ wchar_t* _wasctime (const struct tm*);
233
+ wchar_t* _wctime (const time_t*);
234
+ wchar_t* _wstrdate (wchar_t*);
235
+ wchar_t* _wstrtime (wchar_t*);
236
+ #endif /* __MSVCRT__ */
237
+ size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
238
+ #define _WTIME_DEFINED
239
+ #endif /* _WTIME_DEFINED */
240
+
241
+ #ifndef _WLOCALE_DEFINED /* also declared in locale.h */
242
+ wchar_t* _wsetlocale (int, const wchar_t*);
243
+ #define _WLOCALE_DEFINED
244
+ #endif
245
+
246
+ #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
247
+ long wcstol (const wchar_t*, wchar_t**, int);
248
+ unsigned long wcstoul (const wchar_t*, wchar_t**, int);
249
+ double wcstod (const wchar_t*, wchar_t**);
250
+ #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
251
+ extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
252
+ { return (wcstod(nptr, endptr)); }
253
+ #endif /* __NO_ISOCEXT */
254
+ #define _WSTDLIB_DEFINED
255
+ #endif
256
+
257
+
258
+ #ifndef _NO_OLDNAMES
259
+
260
+ /* Wide character versions. Also declared in io.h. */
261
+ /* CHECK: Are these in the oldnames??? NO! */
262
+ #if (0)
263
+ int waccess (const wchar_t *, int);
264
+ int wchmod (const wchar_t *, int);
265
+ int wcreat (const wchar_t *, int);
266
+ long wfindfirst (wchar_t *, struct _wfinddata_t *);
267
+ int wfindnext (long, struct _wfinddata_t *);
268
+ int wunlink (const wchar_t *);
269
+ int wrename (const wchar_t *, const wchar_t *);
270
+ int wremove (const wchar_t *);
271
+ int wopen (const wchar_t *, int, ...);
272
+ int wsopen (const wchar_t *, int, int, ...);
273
+ wchar_t* wmktemp (wchar_t *);
274
+ #endif
275
+ #endif /* _NO_OLDNAMES */
276
+
277
+ #endif /* not __STRICT_ANSI__ */
278
+
279
+ /* These are resolved by -lmsvcp60 */
280
+ /* If you don't have msvcp60.dll in your windows system directory, you can
281
+ easily obtain it with a search from your favorite search engine. */
282
+ typedef int mbstate_t;
283
+ typedef wchar_t _Wint_t;
284
+
285
+ wint_t btowc(int);
286
+ size_t mbrlen(const char *, size_t, mbstate_t *);
287
+ size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
288
+ size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
289
+
290
+ size_t wcrtomb(char *, wchar_t, mbstate_t *);
291
+ size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
292
+ int wctob(wint_t);
293
+
294
+ #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
295
+ extern inline int fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */
296
+ extern inline int mbsinit(const mbstate_t* ps) {return 1;}
297
+ wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
298
+ wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
299
+ int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n);
300
+ wchar_t* wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2,
301
+ size_t n);
302
+ wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
303
+ long long wcstoll(const wchar_t* __restrict__ nptr,
304
+ wchar_t** __restrict__ endptr, int base);
305
+ unsigned long long wcstoull(const wchar_t* __restrict__ nptr,
306
+ wchar_t ** __restrict__ endptr, int base);
307
+
308
+ #endif /* __NO_ISOCEXT */
309
+
310
+
311
+ #ifdef __cplusplus
312
+ } /* end of extern "C" */
313
+ #endif
314
+
315
+ #endif /* Not RC_INVOKED */
316
+
317
+ #endif /* not _WCHAR_H_ */
318
+
@@ -0,0 +1,127 @@
1
+ /*
2
+ * wctype.h
3
+ *
4
+ * Functions for testing wide character types and converting characters.
5
+ *
6
+ * This file is part of the Mingw32 package.
7
+ *
8
+ * Contributors:
9
+ * Created by Mumit Khan <khan@xraylith.wisc.edu>
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
+ */
22
+
23
+ #ifndef _WCTYPE_H_
24
+ #define _WCTYPE_H_
25
+
26
+ /* All the headers include this file. */
27
+ #include <_mingw.h>
28
+
29
+ #define __need_wchar_t
30
+ #define __need_wint_t
31
+ #ifndef RC_INVOKED
32
+ #include <stddef.h>
33
+ #endif /* Not RC_INVOKED */
34
+
35
+ /*
36
+ * The following flags are used to tell iswctype and _isctype what character
37
+ * types you are looking for.
38
+ */
39
+ #define _UPPER 0x0001
40
+ #define _LOWER 0x0002
41
+ #define _DIGIT 0x0004
42
+ #define _SPACE 0x0008
43
+ #define _PUNCT 0x0010
44
+ #define _CONTROL 0x0020
45
+ #define _BLANK 0x0040
46
+ #define _HEX 0x0080
47
+ #define _LEADBYTE 0x8000
48
+
49
+ #define _ALPHA 0x0103
50
+
51
+ #ifndef RC_INVOKED
52
+
53
+ #ifdef __cplusplus
54
+ extern "C" {
55
+ #endif
56
+
57
+ #ifndef WEOF
58
+ #define WEOF (wchar_t)(0xFFFF)
59
+ #endif
60
+
61
+ #ifndef _WCTYPE_T_DEFINED
62
+ typedef wchar_t wctype_t;
63
+ #define _WCTYPE_T_DEFINED
64
+ #endif
65
+
66
+ /* Wide character equivalents - also in ctype.h */
67
+ int iswalnum(wint_t);
68
+ int iswalpha(wint_t);
69
+ int iswascii(wint_t);
70
+ int iswcntrl(wint_t);
71
+ int iswctype(wint_t, wctype_t);
72
+ int is_wctype(wint_t, wctype_t); /* Obsolete! */
73
+ int iswdigit(wint_t);
74
+ int iswgraph(wint_t);
75
+ int iswlower(wint_t);
76
+ int iswprint(wint_t);
77
+ int iswpunct(wint_t);
78
+ int iswspace(wint_t);
79
+ int iswupper(wint_t);
80
+ int iswxdigit(wint_t);
81
+
82
+ wchar_t towlower(wchar_t);
83
+ wchar_t towupper(wchar_t);
84
+
85
+ int isleadbyte (int);
86
+
87
+ /* Also in ctype.h */
88
+
89
+ __MINGW_IMPORT unsigned short _ctype[];
90
+ #ifdef __MSVCRT__
91
+ __MINGW_IMPORT unsigned short* _pctype;
92
+ #else
93
+ __MINGW_IMPORT unsigned short* _pctype_dll;
94
+ #define _pctype _pctype_dll
95
+ #endif
96
+
97
+ #if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
98
+ #define __WCTYPE_INLINES_DEFINED
99
+ extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
100
+ extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
101
+ extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
102
+ extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
103
+ extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
104
+ extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
105
+ extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
106
+ extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
107
+ extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
108
+ extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
109
+ extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
110
+ extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
111
+ extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
112
+ #endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
113
+
114
+
115
+ typedef wchar_t wctrans_t;
116
+ wint_t towctrans(wint_t, wctrans_t);
117
+ wctrans_t wctrans(const char*);
118
+ wctype_t wctype(const char*);
119
+
120
+ #ifdef __cplusplus
121
+ }
122
+ #endif
123
+
124
+ #endif /* Not RC_INVOKED */
125
+
126
+ #endif /* Not _WCTYPE_H_ */
127
+
@@ -0,0 +1,119 @@
1
+ #ifndef _BASETSD_H
2
+ #define _BASETSD_H
3
+ #if __GNUC__ >=3
4
+ #pragma GCC system_header
5
+ #endif
6
+
7
+ #ifdef __GNUC__
8
+ #ifndef __int64
9
+ #define __int64 long long
10
+ #endif
11
+ #endif
12
+
13
+ #if defined(_WIN64)
14
+ #define __int3264 __int64
15
+ #define ADDRESS_TAG_BIT 0x40000000000UI64
16
+ #else /* !_WIN64 */
17
+ #define __int3264 __int32
18
+ #define ADDRESS_TAG_BIT 0x80000000UL
19
+ #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
20
+ #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
21
+ #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
22
+ #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
23
+ #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
24
+ #define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
25
+ #define PtrToInt( p ) ((INT)(INT_PTR) (p) )
26
+ #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
27
+ #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
28
+ #define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
29
+ #define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
30
+ #define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
31
+ #define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
32
+ #endif /* !_WIN64 */
33
+
34
+ #define UlongToPtr(ul) ULongToPtr(ul)
35
+ #define UintToPtr(ui) UIntToPtr(ui)
36
+ #define MAXUINT_PTR (~((UINT_PTR)0))
37
+ #define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
38
+ #define MININT_PTR (~MAXINT_PTR)
39
+ #define MAXULONG_PTR (~((ULONG_PTR)0))
40
+ #define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
41
+ #define MINLONG_PTR (~MAXLONG_PTR)
42
+ #define MAXUHALF_PTR ((UHALF_PTR)~0)
43
+ #define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
44
+ #define MINHALF_PTR (~MAXHALF_PTR)
45
+
46
+ #ifndef RC_INVOKED
47
+ #ifdef __cplusplus
48
+ extern "C" {
49
+ #endif
50
+ typedef int LONG32, *PLONG32;
51
+ #ifndef XFree86Server
52
+ typedef int INT32, *PINT32;
53
+ #endif /* ndef XFree86Server */
54
+ typedef unsigned int ULONG32, *PULONG32;
55
+ typedef unsigned int DWORD32, *PDWORD32;
56
+ typedef unsigned int UINT32, *PUINT32;
57
+
58
+ #if defined(_WIN64)
59
+ typedef __int64 INT_PTR, *PINT_PTR;
60
+ typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
61
+ typedef __int64 LONG_PTR, *PLONG_PTR;
62
+ typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
63
+ typedef unsigned __int64 HANDLE_PTR;
64
+ typedef unsigned int UHALF_PTR, *PUHALF_PTR;
65
+ typedef int HALF_PTR, *PHALF_PTR;
66
+
67
+ #if 0 /* TODO when WIN64 is here */
68
+ inline unsigned long HandleToUlong(const void* h )
69
+ { return((unsigned long) h ); }
70
+ inline long HandleToLong( const void* h )
71
+ { return((long) h ); }
72
+ inline void* LongToHandle( const long h )
73
+ { return((void*) (INT_PTR) h ); }
74
+ inline unsigned long PtrToUlong( const void* p)
75
+ { return((unsigned long) p ); }
76
+ inline unsigned int PtrToUint( const void* p )
77
+ { return((unsigned int) p ); }
78
+ inline unsigned short PtrToUshort( const void* p )
79
+ { return((unsigned short) p ); }
80
+ inline long PtrToLong( const void* p )
81
+ { return((long) p ); }
82
+ inline int PtrToInt( const void* p )
83
+ { return((int) p ); }
84
+ inline short PtrToShort( const void* p )
85
+ { return((short) p ); }
86
+ inline void* IntToPtr( const int i )
87
+ { return( (void*)(INT_PTR)i ); }
88
+ inline void* UIntToPtr(const unsigned int ui)
89
+ { return( (void*)(UINT_PTR)ui ); }
90
+ inline void* LongToPtr( const long l )
91
+ { return( (void*)(LONG_PTR)l ); }
92
+ inline void* ULongToPtr( const unsigned long ul )
93
+ { return( (void*)(ULONG_PTR)ul ); }
94
+ #endif /* 0_ */
95
+
96
+ #else /* !_WIN64 */
97
+ typedef int INT_PTR, *PINT_PTR;
98
+ typedef unsigned int UINT_PTR, *PUINT_PTR;
99
+ typedef long LONG_PTR, *PLONG_PTR;
100
+ typedef unsigned long ULONG_PTR, *PULONG_PTR;
101
+ typedef unsigned short UHALF_PTR, *PUHALF_PTR;
102
+ typedef short HALF_PTR, *PHALF_PTR;
103
+ typedef unsigned long HANDLE_PTR;
104
+ #endif /* !_WIN64 */
105
+
106
+ typedef ULONG_PTR SIZE_T, *PSIZE_T;
107
+ typedef LONG_PTR SSIZE_T, *PSSIZE_T;
108
+ typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
109
+ typedef __int64 LONG64, *PLONG64;
110
+ typedef __int64 INT64, *PINT64;
111
+ typedef unsigned __int64 ULONG64, *PULONG64;
112
+ typedef unsigned __int64 DWORD64, *PDWORD64;
113
+ typedef unsigned __int64 UINT64, *PUINT64;
114
+ #ifdef __cplusplus
115
+ }
116
+ #endif
117
+ #endif /* !RC_INVOKED */
118
+
119
+ #endif /* _BASETSD_H */
@@ -0,0 +1,144 @@
1
+ #ifndef _BASETYPS_H
2
+ #define _BASETYPS_H
3
+ #if __GNUC__ >=3
4
+ #pragma GCC system_header
5
+ #endif
6
+
7
+ #ifndef __OBJC__
8
+ #ifdef __cplusplus
9
+ #define EXTERN_C extern "C"
10
+ #else
11
+ #define EXTERN_C extern
12
+ #endif /* __cplusplus */
13
+ #define STDMETHODCALLTYPE __stdcall
14
+ #define STDMETHODVCALLTYPE __cdecl
15
+ #define STDAPICALLTYPE __stdcall
16
+ #define STDAPIVCALLTYPE __cdecl
17
+ #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
18
+ #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
19
+ #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
20
+ #define STDMETHODIMP_(t) t STDMETHODCALLTYPE
21
+ #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
22
+ #define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
23
+ #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
24
+ #define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
25
+ #define interface struct
26
+ #if defined(__cplusplus) && !defined(CINTERFACE)
27
+ #define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
28
+ #define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
29
+ #define PURE =0
30
+ #define THIS_
31
+ #define THIS void
32
+ /*
33
+ __attribute__((com_interface)) is obsolete in __GNUC__ >= 3
34
+ g++ vtables are now COM-compatible by default
35
+ */
36
+ #if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
37
+ #define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i
38
+ #define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b
39
+ #else
40
+ #define DECLARE_INTERFACE(i) interface i
41
+ #define DECLARE_INTERFACE_(i,b) interface i : public b
42
+ #endif
43
+ #else
44
+ #define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
45
+ #define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
46
+ #define PURE
47
+ #define THIS_ INTERFACE *,
48
+ #define THIS INTERFACE *
49
+ #ifndef CONST_VTABLE
50
+ #define CONST_VTABLE
51
+ #endif
52
+ #define DECLARE_INTERFACE(i) \
53
+ typedef interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
54
+ typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
55
+ CONST_VTABLE struct i##Vtbl
56
+ #define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
57
+ #endif
58
+ #define BEGIN_INTERFACE
59
+ #define END_INTERFACE
60
+
61
+ #define FWD_DECL(i) typedef interface i i
62
+ #if defined(__cplusplus) && !defined(CINTERFACE)
63
+ #define IENUM_THIS(T)
64
+ #define IENUM_THIS_(T)
65
+ #else
66
+ #define IENUM_THIS(T) T*
67
+ #define IENUM_THIS_(T) T*,
68
+ #endif
69
+ #define DECLARE_ENUMERATOR_(I,T) \
70
+ DECLARE_INTERFACE_(I,IUnknown) \
71
+ { \
72
+ STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
73
+ STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
74
+ STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
75
+ STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
76
+ STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
77
+ STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
78
+ STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
79
+ }
80
+ #define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
81
+
82
+ #endif /* __OBJC__ */
83
+
84
+ #ifndef _GUID_DEFINED /* also defined in winnt.h */
85
+ #define _GUID_DEFINED
86
+ typedef struct _GUID
87
+ {
88
+ unsigned long Data1;
89
+ unsigned short Data2;
90
+ unsigned short Data3;
91
+ unsigned char Data4[8];
92
+ } GUID,*REFGUID,*LPGUID;
93
+ #endif /* _GUID_DEFINED */
94
+ #ifndef UUID_DEFINED
95
+ #define UUID_DEFINED
96
+ typedef GUID UUID;
97
+ #endif /* UUID_DEFINED */
98
+ typedef GUID IID;
99
+ typedef GUID CLSID;
100
+ typedef CLSID *LPCLSID;
101
+ typedef IID *LPIID;
102
+ typedef IID *REFIID;
103
+ typedef CLSID *REFCLSID;
104
+ typedef GUID FMTID;
105
+ typedef FMTID *REFFMTID;
106
+ typedef unsigned long error_status_t;
107
+ #define uuid_t UUID
108
+ typedef unsigned long PROPID;
109
+
110
+ #ifndef _REFGUID_DEFINED
111
+ #if defined (__cplusplus) && !defined (CINTERFACE)
112
+ #define REFGUID const GUID&
113
+ #define REFIID const IID&
114
+ #define REFCLSID const CLSID&
115
+ #else
116
+ #define REFGUID const GUID* const
117
+ #define REFIID const IID* const
118
+ #define REFCLSID const CLSID* const
119
+ #endif
120
+ #define _REFGUID_DEFINED
121
+ #define _REFGIID_DEFINED
122
+ #define _REFCLSID_DEFINED
123
+ #endif
124
+ #ifndef GUID_SECTION
125
+ #define GUID_SECTION ".text"
126
+ #endif
127
+ #ifdef __GNUC__
128
+ #define GUID_SECT __attribute__ ((section (GUID_SECTION)))
129
+ #else
130
+ #define GUID_SECT
131
+ #endif
132
+ #if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
133
+ #define GUID_EXT EXTERN_C
134
+ #else
135
+ #define GUID_EXT
136
+ #endif
137
+ #ifdef INITGUID
138
+ #define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
139
+ #define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
140
+ #else
141
+ #define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
142
+ #define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
143
+ #endif
144
+ #endif