standalone-ruby 1.4.2 → 1.5.1

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -22
  3. data/lib/data/{tcc → c_compilers/tcc}/include/_mingw.h +54 -54
  4. data/lib/data/{tcc → c_compilers/tcc}/include/assert.h +71 -71
  5. data/lib/data/{tcc → c_compilers/tcc}/include/conio.h +159 -159
  6. data/lib/data/{tcc → c_compilers/tcc}/include/ctype.h +232 -232
  7. data/lib/data/{tcc → c_compilers/tcc}/include/dir.h +26 -26
  8. data/lib/data/{tcc → c_compilers/tcc}/include/direct.h +95 -95
  9. data/lib/data/{tcc → c_compilers/tcc}/include/dirent.h +96 -96
  10. data/lib/data/{tcc → c_compilers/tcc}/include/dos.h +110 -110
  11. data/lib/data/{tcc → c_compilers/tcc}/include/errno.h +117 -117
  12. data/lib/data/{tcc → c_compilers/tcc}/include/excpt.h +20 -20
  13. data/lib/data/{tcc → c_compilers/tcc}/include/fcntl.h +135 -135
  14. data/lib/data/{tcc → c_compilers/tcc}/include/fenv.h +85 -85
  15. data/lib/data/{tcc → c_compilers/tcc}/include/float.h +224 -224
  16. data/lib/data/{tcc → c_compilers/tcc}/include/inttypes.h +275 -275
  17. data/lib/data/{tcc → c_compilers/tcc}/include/io.h +296 -296
  18. data/lib/data/{tcc → c_compilers/tcc}/include/limits.h +115 -115
  19. data/lib/data/{tcc → c_compilers/tcc}/include/locale.h +100 -100
  20. data/lib/data/{tcc → c_compilers/tcc}/include/malloc.h +87 -87
  21. data/lib/data/{tcc → c_compilers/tcc}/include/math.h +438 -438
  22. data/lib/data/{tcc → c_compilers/tcc}/include/mem.h +8 -8
  23. data/lib/data/{tcc → c_compilers/tcc}/include/memory.h +9 -9
  24. data/lib/data/{tcc → c_compilers/tcc}/include/process.h +158 -158
  25. data/lib/data/{tcc → c_compilers/tcc}/include/setjmp.h +72 -72
  26. data/lib/data/{tcc → c_compilers/tcc}/include/share.h +44 -44
  27. data/lib/data/{tcc → c_compilers/tcc}/include/signal.h +111 -111
  28. data/lib/data/{tcc → c_compilers/tcc}/include/stdarg.h +16 -16
  29. data/lib/data/{tcc → c_compilers/tcc}/include/stdbool.h +10 -10
  30. data/lib/data/{tcc → c_compilers/tcc}/include/stddef.h +26 -26
  31. data/lib/data/{tcc → c_compilers/tcc}/include/stdint.h +184 -184
  32. data/lib/data/{tcc → c_compilers/tcc}/include/stdio.h +413 -413
  33. data/lib/data/{tcc → c_compilers/tcc}/include/stdlib.h +482 -482
  34. data/lib/data/{tcc → c_compilers/tcc}/include/string.h +206 -206
  35. data/lib/data/{tcc → c_compilers/tcc}/include/sys/fcntl.h +8 -8
  36. data/lib/data/{tcc → c_compilers/tcc}/include/sys/file.h +9 -9
  37. data/lib/data/{tcc → c_compilers/tcc}/include/sys/locking.h +52 -52
  38. data/lib/data/{tcc → c_compilers/tcc}/include/sys/stat.h +190 -190
  39. data/lib/data/{tcc → c_compilers/tcc}/include/sys/time.h +3 -3
  40. data/lib/data/{tcc → c_compilers/tcc}/include/sys/timeb.h +82 -82
  41. data/lib/data/{tcc → c_compilers/tcc}/include/sys/types.h +118 -118
  42. data/lib/data/{tcc/include → c_compilers/tcc/include/sys}/unistd.h +9 -10
  43. data/lib/data/{tcc → c_compilers/tcc}/include/sys/utime.h +89 -89
  44. data/lib/data/{tcc → c_compilers/tcc}/include/tchar.h +367 -367
  45. data/lib/data/{tcc → c_compilers/tcc}/include/time.h +219 -219
  46. data/lib/data/{tcc/include/sys → c_compilers/tcc/include}/unistd.h +10 -9
  47. data/lib/data/{tcc → c_compilers/tcc}/include/values.h +4 -4
  48. data/lib/data/{tcc → c_compilers/tcc}/include/varargs.h +11 -11
  49. data/lib/data/{tcc → c_compilers/tcc}/include/wchar.h +318 -318
  50. data/lib/data/{tcc → c_compilers/tcc}/include/wctype.h +127 -127
  51. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/basetsd.h +119 -119
  52. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/basetyps.h +144 -144
  53. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winbase.h +1852 -1852
  54. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/wincon.h +207 -207
  55. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/windef.h +240 -240
  56. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/windows.h +176 -176
  57. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winerror.h +1054 -1054
  58. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/wingdi.h +2843 -2843
  59. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winnetwk.h +346 -346
  60. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winnls.h +651 -651
  61. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winnt.h +2667 -2667
  62. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winreg.h +159 -159
  63. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winsvc.h +309 -309
  64. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winuser.h +3472 -3472
  65. data/lib/data/{tcc → c_compilers/tcc}/include/winapi/winver.h +133 -133
  66. data/lib/data/{tcc → c_compilers/tcc}/lib/gdi32.def +337 -337
  67. data/lib/data/{tcc → c_compilers/tcc}/lib/kernel32.def +763 -763
  68. data/lib/data/{tcc → c_compilers/tcc}/lib/msvcrt.def +782 -782
  69. data/lib/data/{tcc → c_compilers/tcc}/lib/user32.def +654 -654
  70. data/lib/data/{exe_template → exe_templates}/launcher_stub.c +2 -2
  71. data/lib/data/exe_templates/launcher_stub.cpp +31 -0
  72. data/lib/data/{vbs → launcher_templates/vbs}/default_vbs.txt +7 -7
  73. data/lib/data/{vbs → launcher_templates/vbs}/vbs_gui.txt +8 -8
  74. data/lib/data/resource_files/default.rc +17 -0
  75. data/lib/{utils/displayer.rb → displayer.rb} +6 -6
  76. data/lib/exe_packer.rb +68 -0
  77. data/lib/{utils/launcher.rb → launcher.rb} +18 -24
  78. data/lib/launcher_handler.rb +41 -0
  79. data/lib/parameter_parser.rb +201 -0
  80. data/lib/{utils/ruby_copy.rb → ruby_copy.rb} +0 -6
  81. data/lib/sfx_generator.rb +9 -0
  82. data/lib/standalone_ruby.rb +1 -1
  83. data/lib/version/version.rb +1 -1
  84. metadata +84 -87
  85. data/lib/data/bat-cmd/default_bat_cmd.txt +0 -9
  86. data/lib/data/exe_template/launcher_stub.cpp +0 -9
  87. data/lib/data/tcc/tiny_impdef.exe +0 -0
  88. data/lib/data/tcc/tiny_libmaker.exe +0 -0
  89. data/lib/utils/config_generator.rb +0 -5
  90. data/lib/utils/exe_packer.rb +0 -72
  91. data/lib/utils/launcher_handler.rb +0 -111
  92. data/lib/utils/logger_helper.rb +0 -24
  93. data/lib/utils/parameter_parser.rb +0 -211
  94. /data/lib/data/{tcc → c_compilers/tcc}/lib/libtcc1.a +0 -0
  95. /data/lib/data/{tcc → c_compilers/tcc}/tcc.exe +0 -0
@@ -1,232 +1,232 @@
1
- /*
2
- * ctype.h
3
- *
4
- * Functions for testing character types and converting characters.
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 _CTYPE_H_
28
- #define _CTYPE_H_
29
-
30
- /* All the headers include this file. */
31
- #include <_mingw.h>
32
-
33
- #define __need_wchar_t
34
- #define __need_wint_t
35
- #ifndef RC_INVOKED
36
- #include <stddef.h>
37
- #endif /* Not RC_INVOKED */
38
-
39
-
40
- /*
41
- * The following flags are used to tell iswctype and _isctype what character
42
- * types you are looking for.
43
- */
44
- #define _UPPER 0x0001
45
- #define _LOWER 0x0002
46
- #define _DIGIT 0x0004
47
- #define _SPACE 0x0008 /* HT LF VT FF CR SP */
48
- #define _PUNCT 0x0010
49
- #define _CONTROL 0x0020
50
- #define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
51
- #define _HEX 0x0080
52
- #define _LEADBYTE 0x8000
53
-
54
- #define _ALPHA 0x0103
55
-
56
- #ifndef RC_INVOKED
57
-
58
- #ifdef __cplusplus
59
- extern "C" {
60
- #endif
61
-
62
- int isalnum(int);
63
- int isalpha(int);
64
- int iscntrl(int);
65
- int isdigit(int);
66
- int isgraph(int);
67
- int islower(int);
68
- int isprint(int);
69
- int ispunct(int);
70
- int isspace(int);
71
- int isupper(int);
72
- int isxdigit(int);
73
-
74
- #ifndef __STRICT_ANSI__
75
- int _isctype (int, int);
76
- #endif
77
-
78
- /* These are the ANSI versions, with correct checking of argument */
79
- int tolower(int);
80
- int toupper(int);
81
-
82
- /*
83
- * NOTE: The above are not old name type wrappers, but functions exported
84
- * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
85
- * exported.
86
- */
87
- #ifndef __STRICT_ANSI__
88
- /*
89
- * These are the cheap non-std versions: The return values are undefined
90
- * if the argument is not ASCII char or is not of appropriate case
91
- */
92
- int _tolower(int);
93
- int _toupper(int);
94
- #endif
95
-
96
- /* Also defined in stdlib.h */
97
- #ifndef MB_CUR_MAX
98
- # ifdef __MSVCRT__
99
- # define MB_CUR_MAX __mb_cur_max
100
- __MINGW_IMPORT int __mb_cur_max;
101
- # else /* not __MSVCRT */
102
- # define MB_CUR_MAX __mb_cur_max_dll
103
- __MINGW_IMPORT int __mb_cur_max_dll;
104
- # endif /* not __MSVCRT */
105
- #endif /* MB_CUR_MAX */
106
-
107
- __MINGW_IMPORT unsigned short _ctype[];
108
- #ifdef __MSVCRT__
109
- __MINGW_IMPORT unsigned short* _pctype;
110
- #else /* CRTDLL */
111
- __MINGW_IMPORT unsigned short* _pctype_dll;
112
- #define _pctype _pctype_dll
113
- #endif
114
-
115
- /*
116
- * Use inlines here rather than macros, because macros will upset
117
- * C++ usage (eg, ::isalnum), and so usually get undefined
118
- *
119
- * According to standard for SB chars, these function are defined only
120
- * for input values representable by unsigned char or EOF.
121
- * Thus, there is no range test.
122
- * This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
123
- *
124
- * If no MB char support is needed, these can be simplified even
125
- * more by command line define -DMB_CUR_MAX=1. The compiler will then
126
- * optimise away the constant condition.
127
- */
128
-
129
-
130
- #if ! (defined (__NO_CTYPE_INLINES) || defined (__STRICT_ANSI__ ))
131
- /* use simple lookup if SB locale, else _isctype() */
132
- #define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
133
- extern __inline__ int isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
134
- extern __inline__ int isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
135
- extern __inline__ int iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
136
- extern __inline__ int isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
137
- extern __inline__ int isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
138
- extern __inline__ int islower(int c) {return __ISCTYPE(c, _LOWER);}
139
- extern __inline__ int isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
140
- extern __inline__ int ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
141
- extern __inline__ int isspace(int c) {return __ISCTYPE(c, _SPACE);}
142
- extern __inline__ int isupper(int c) {return __ISCTYPE(c, _UPPER);}
143
- extern __inline__ int isxdigit(int c) {return __ISCTYPE(c, _HEX);}
144
-
145
- /* these reproduce behaviour of lib underscored versions */
146
- extern __inline__ int _tolower(int c) {return ( c -'A'+'a');}
147
- extern __inline__ int _toupper(int c) {return ( c -'a'+'A');}
148
-
149
- /* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
150
- if we only want C-locale. */
151
-
152
- #endif /* _NO_CTYPE_INLINES */
153
-
154
- /* Wide character equivalents */
155
-
156
- #ifndef WEOF
157
- #define WEOF (wchar_t)(0xFFFF)
158
- #endif
159
-
160
- #ifndef _WCTYPE_T_DEFINED
161
- typedef wchar_t wctype_t;
162
- #define _WCTYPE_T_DEFINED
163
- #endif
164
-
165
- int iswalnum(wint_t);
166
- int iswalpha(wint_t);
167
- int iswascii(wint_t);
168
- int iswcntrl(wint_t);
169
- int iswctype(wint_t, wctype_t);
170
- int is_wctype(wint_t, wctype_t); /* Obsolete! */
171
- int iswdigit(wint_t);
172
- int iswgraph(wint_t);
173
- int iswlower(wint_t);
174
- int iswprint(wint_t);
175
- int iswpunct(wint_t);
176
- int iswspace(wint_t);
177
- int iswupper(wint_t);
178
- int iswxdigit(wint_t);
179
-
180
- wchar_t towlower(wchar_t);
181
- wchar_t towupper(wchar_t);
182
-
183
- int isleadbyte (int);
184
-
185
- /* Also in wctype.h */
186
- #if ! (defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
187
- #define __WCTYPE_INLINES_DEFINED
188
- extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
189
- extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
190
- extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
191
- extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
192
- extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
193
- extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
194
- extern __inline__ int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
195
- extern __inline__ int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
196
- extern __inline__ int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
197
- extern __inline__ int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
198
- extern __inline__ int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
199
- extern __inline__ int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
200
- extern __inline__ int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
201
- #endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
202
-
203
- #ifndef __STRICT_ANSI__
204
- int __isascii (int);
205
- int __toascii (int);
206
- int __iscsymf (int); /* Valid first character in C symbol */
207
- int __iscsym (int); /* Valid character in C symbol (after first) */
208
-
209
- #ifndef __NO_CTYPE_INLINES
210
- extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);}
211
- extern __inline__ int __toascii(int c) {return (c & 0x7F);}
212
- extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
213
- extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));}
214
- #endif /* __NO_CTYPE_INLINES */
215
-
216
- #ifndef _NO_OLDNAMES
217
- int isascii (int);
218
- int toascii (int);
219
- int iscsymf (int);
220
- int iscsym (int);
221
- #endif /* Not _NO_OLDNAMES */
222
-
223
- #endif /* Not __STRICT_ANSI__ */
224
-
225
- #ifdef __cplusplus
226
- }
227
- #endif
228
-
229
- #endif /* Not RC_INVOKED */
230
-
231
- #endif /* Not _CTYPE_H_ */
232
-
1
+ /*
2
+ * ctype.h
3
+ *
4
+ * Functions for testing character types and converting characters.
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 _CTYPE_H_
28
+ #define _CTYPE_H_
29
+
30
+ /* All the headers include this file. */
31
+ #include <_mingw.h>
32
+
33
+ #define __need_wchar_t
34
+ #define __need_wint_t
35
+ #ifndef RC_INVOKED
36
+ #include <stddef.h>
37
+ #endif /* Not RC_INVOKED */
38
+
39
+
40
+ /*
41
+ * The following flags are used to tell iswctype and _isctype what character
42
+ * types you are looking for.
43
+ */
44
+ #define _UPPER 0x0001
45
+ #define _LOWER 0x0002
46
+ #define _DIGIT 0x0004
47
+ #define _SPACE 0x0008 /* HT LF VT FF CR SP */
48
+ #define _PUNCT 0x0010
49
+ #define _CONTROL 0x0020
50
+ #define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
51
+ #define _HEX 0x0080
52
+ #define _LEADBYTE 0x8000
53
+
54
+ #define _ALPHA 0x0103
55
+
56
+ #ifndef RC_INVOKED
57
+
58
+ #ifdef __cplusplus
59
+ extern "C" {
60
+ #endif
61
+
62
+ int isalnum(int);
63
+ int isalpha(int);
64
+ int iscntrl(int);
65
+ int isdigit(int);
66
+ int isgraph(int);
67
+ int islower(int);
68
+ int isprint(int);
69
+ int ispunct(int);
70
+ int isspace(int);
71
+ int isupper(int);
72
+ int isxdigit(int);
73
+
74
+ #ifndef __STRICT_ANSI__
75
+ int _isctype (int, int);
76
+ #endif
77
+
78
+ /* These are the ANSI versions, with correct checking of argument */
79
+ int tolower(int);
80
+ int toupper(int);
81
+
82
+ /*
83
+ * NOTE: The above are not old name type wrappers, but functions exported
84
+ * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
85
+ * exported.
86
+ */
87
+ #ifndef __STRICT_ANSI__
88
+ /*
89
+ * These are the cheap non-std versions: The return values are undefined
90
+ * if the argument is not ASCII char or is not of appropriate case
91
+ */
92
+ int _tolower(int);
93
+ int _toupper(int);
94
+ #endif
95
+
96
+ /* Also defined in stdlib.h */
97
+ #ifndef MB_CUR_MAX
98
+ # ifdef __MSVCRT__
99
+ # define MB_CUR_MAX __mb_cur_max
100
+ __MINGW_IMPORT int __mb_cur_max;
101
+ # else /* not __MSVCRT */
102
+ # define MB_CUR_MAX __mb_cur_max_dll
103
+ __MINGW_IMPORT int __mb_cur_max_dll;
104
+ # endif /* not __MSVCRT */
105
+ #endif /* MB_CUR_MAX */
106
+
107
+ __MINGW_IMPORT unsigned short _ctype[];
108
+ #ifdef __MSVCRT__
109
+ __MINGW_IMPORT unsigned short* _pctype;
110
+ #else /* CRTDLL */
111
+ __MINGW_IMPORT unsigned short* _pctype_dll;
112
+ #define _pctype _pctype_dll
113
+ #endif
114
+
115
+ /*
116
+ * Use inlines here rather than macros, because macros will upset
117
+ * C++ usage (eg, ::isalnum), and so usually get undefined
118
+ *
119
+ * According to standard for SB chars, these function are defined only
120
+ * for input values representable by unsigned char or EOF.
121
+ * Thus, there is no range test.
122
+ * This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
123
+ *
124
+ * If no MB char support is needed, these can be simplified even
125
+ * more by command line define -DMB_CUR_MAX=1. The compiler will then
126
+ * optimise away the constant condition.
127
+ */
128
+
129
+
130
+ #if ! (defined (__NO_CTYPE_INLINES) || defined (__STRICT_ANSI__ ))
131
+ /* use simple lookup if SB locale, else _isctype() */
132
+ #define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
133
+ extern __inline__ int isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
134
+ extern __inline__ int isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
135
+ extern __inline__ int iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
136
+ extern __inline__ int isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
137
+ extern __inline__ int isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
138
+ extern __inline__ int islower(int c) {return __ISCTYPE(c, _LOWER);}
139
+ extern __inline__ int isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
140
+ extern __inline__ int ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
141
+ extern __inline__ int isspace(int c) {return __ISCTYPE(c, _SPACE);}
142
+ extern __inline__ int isupper(int c) {return __ISCTYPE(c, _UPPER);}
143
+ extern __inline__ int isxdigit(int c) {return __ISCTYPE(c, _HEX);}
144
+
145
+ /* these reproduce behaviour of lib underscored versions */
146
+ extern __inline__ int _tolower(int c) {return ( c -'A'+'a');}
147
+ extern __inline__ int _toupper(int c) {return ( c -'a'+'A');}
148
+
149
+ /* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
150
+ if we only want C-locale. */
151
+
152
+ #endif /* _NO_CTYPE_INLINES */
153
+
154
+ /* Wide character equivalents */
155
+
156
+ #ifndef WEOF
157
+ #define WEOF (wchar_t)(0xFFFF)
158
+ #endif
159
+
160
+ #ifndef _WCTYPE_T_DEFINED
161
+ typedef wchar_t wctype_t;
162
+ #define _WCTYPE_T_DEFINED
163
+ #endif
164
+
165
+ int iswalnum(wint_t);
166
+ int iswalpha(wint_t);
167
+ int iswascii(wint_t);
168
+ int iswcntrl(wint_t);
169
+ int iswctype(wint_t, wctype_t);
170
+ int is_wctype(wint_t, wctype_t); /* Obsolete! */
171
+ int iswdigit(wint_t);
172
+ int iswgraph(wint_t);
173
+ int iswlower(wint_t);
174
+ int iswprint(wint_t);
175
+ int iswpunct(wint_t);
176
+ int iswspace(wint_t);
177
+ int iswupper(wint_t);
178
+ int iswxdigit(wint_t);
179
+
180
+ wchar_t towlower(wchar_t);
181
+ wchar_t towupper(wchar_t);
182
+
183
+ int isleadbyte (int);
184
+
185
+ /* Also in wctype.h */
186
+ #if ! (defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
187
+ #define __WCTYPE_INLINES_DEFINED
188
+ extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
189
+ extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
190
+ extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
191
+ extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
192
+ extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
193
+ extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
194
+ extern __inline__ int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
195
+ extern __inline__ int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
196
+ extern __inline__ int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
197
+ extern __inline__ int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
198
+ extern __inline__ int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
199
+ extern __inline__ int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
200
+ extern __inline__ int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
201
+ #endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
202
+
203
+ #ifndef __STRICT_ANSI__
204
+ int __isascii (int);
205
+ int __toascii (int);
206
+ int __iscsymf (int); /* Valid first character in C symbol */
207
+ int __iscsym (int); /* Valid character in C symbol (after first) */
208
+
209
+ #ifndef __NO_CTYPE_INLINES
210
+ extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);}
211
+ extern __inline__ int __toascii(int c) {return (c & 0x7F);}
212
+ extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
213
+ extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));}
214
+ #endif /* __NO_CTYPE_INLINES */
215
+
216
+ #ifndef _NO_OLDNAMES
217
+ int isascii (int);
218
+ int toascii (int);
219
+ int iscsymf (int);
220
+ int iscsym (int);
221
+ #endif /* Not _NO_OLDNAMES */
222
+
223
+ #endif /* Not __STRICT_ANSI__ */
224
+
225
+ #ifdef __cplusplus
226
+ }
227
+ #endif
228
+
229
+ #endif /* Not RC_INVOKED */
230
+
231
+ #endif /* Not _CTYPE_H_ */
232
+
@@ -1,26 +1,26 @@
1
- /*
2
- * dir.h
3
- *
4
- * This file OBSOLESCENT and only provided for backward compatibility.
5
- * Please use io.h instead.
6
- *
7
- * This file is part of the Mingw32 package.
8
- *
9
- * Contributors:
10
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11
- * Mumit Khan <khan@xraylith.wisc.edu>
12
- *
13
- * THIS SOFTWARE IS NOT COPYRIGHTED
14
- *
15
- * This source code is offered for use in the public domain. You may
16
- * use, modify or distribute it freely.
17
- *
18
- * This code is distributed in the hope that it will be useful but
19
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
20
- * DISCLAIMED. This includes but is not limited to warranties of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22
- *
23
- */
24
-
25
- #include <io.h>
26
-
1
+ /*
2
+ * dir.h
3
+ *
4
+ * This file OBSOLESCENT and only provided for backward compatibility.
5
+ * Please use io.h instead.
6
+ *
7
+ * This file is part of the Mingw32 package.
8
+ *
9
+ * Contributors:
10
+ * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11
+ * Mumit Khan <khan@xraylith.wisc.edu>
12
+ *
13
+ * THIS SOFTWARE IS NOT COPYRIGHTED
14
+ *
15
+ * This source code is offered for use in the public domain. You may
16
+ * use, modify or distribute it freely.
17
+ *
18
+ * This code is distributed in the hope that it will be useful but
19
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
20
+ * DISCLAIMED. This includes but is not limited to warranties of
21
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22
+ *
23
+ */
24
+
25
+ #include <io.h>
26
+