standalone-ruby 1.3.1 → 1.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -23
- data/bin/standalone-ruby +3 -3
- data/lib/data/exe_template/launcher_stub.c +30 -0
- data/lib/data/exe_template/launcher_stub.cpp +9 -0
- data/lib/data/tcc/include/_mingw.h +54 -0
- data/lib/data/tcc/include/assert.h +71 -0
- data/lib/data/tcc/include/conio.h +159 -0
- data/lib/data/tcc/include/ctype.h +232 -0
- data/lib/data/tcc/include/dir.h +26 -0
- data/lib/data/tcc/include/direct.h +95 -0
- data/lib/data/tcc/include/dirent.h +96 -0
- data/lib/data/tcc/include/dos.h +110 -0
- data/lib/data/tcc/include/errno.h +117 -0
- data/lib/data/tcc/include/excpt.h +20 -0
- data/lib/data/tcc/include/fcntl.h +135 -0
- data/lib/data/tcc/include/fenv.h +85 -0
- data/lib/data/tcc/include/float.h +224 -0
- data/lib/data/tcc/include/inttypes.h +275 -0
- data/lib/data/tcc/include/io.h +296 -0
- data/lib/data/tcc/include/limits.h +115 -0
- data/lib/data/tcc/include/locale.h +100 -0
- data/lib/data/tcc/include/malloc.h +87 -0
- data/lib/data/tcc/include/math.h +438 -0
- data/lib/data/tcc/include/mem.h +8 -0
- data/lib/data/tcc/include/memory.h +9 -0
- data/lib/data/tcc/include/process.h +158 -0
- data/lib/data/tcc/include/setjmp.h +72 -0
- data/lib/data/tcc/include/share.h +44 -0
- data/lib/data/tcc/include/signal.h +111 -0
- data/lib/data/tcc/include/stdarg.h +16 -0
- data/lib/data/tcc/include/stdbool.h +10 -0
- data/lib/data/tcc/include/stddef.h +26 -0
- data/lib/data/tcc/include/stdint.h +184 -0
- data/lib/data/tcc/include/stdio.h +413 -0
- data/lib/data/tcc/include/stdlib.h +482 -0
- data/lib/data/tcc/include/string.h +206 -0
- data/lib/data/tcc/include/sys/fcntl.h +8 -0
- data/lib/data/tcc/include/sys/file.h +9 -0
- data/lib/data/tcc/include/sys/locking.h +52 -0
- data/lib/data/tcc/include/sys/stat.h +190 -0
- data/lib/data/tcc/include/sys/time.h +3 -0
- data/lib/data/tcc/include/sys/timeb.h +82 -0
- data/lib/data/tcc/include/sys/types.h +118 -0
- data/lib/data/tcc/include/sys/unistd.h +9 -0
- data/lib/data/tcc/include/sys/utime.h +89 -0
- data/lib/data/tcc/include/tchar.h +367 -0
- data/lib/data/tcc/include/time.h +219 -0
- data/lib/data/tcc/include/unistd.h +10 -0
- data/lib/data/tcc/include/values.h +4 -0
- data/lib/data/tcc/include/varargs.h +11 -0
- data/lib/data/tcc/include/wchar.h +318 -0
- data/lib/data/tcc/include/wctype.h +127 -0
- data/lib/data/tcc/include/winapi/basetsd.h +119 -0
- data/lib/data/tcc/include/winapi/basetyps.h +144 -0
- data/lib/data/tcc/include/winapi/winbase.h +1852 -0
- data/lib/data/tcc/include/winapi/wincon.h +207 -0
- data/lib/data/tcc/include/winapi/windef.h +240 -0
- data/lib/data/tcc/include/winapi/windows.h +176 -0
- data/lib/data/tcc/include/winapi/winerror.h +1054 -0
- data/lib/data/tcc/include/winapi/wingdi.h +2843 -0
- data/lib/data/tcc/include/winapi/winnetwk.h +346 -0
- data/lib/data/tcc/include/winapi/winnls.h +651 -0
- data/lib/data/tcc/include/winapi/winnt.h +2667 -0
- data/lib/data/tcc/include/winapi/winreg.h +159 -0
- data/lib/data/tcc/include/winapi/winsvc.h +309 -0
- data/lib/data/tcc/include/winapi/winuser.h +3472 -0
- data/lib/data/tcc/include/winapi/winver.h +133 -0
- data/lib/data/tcc/lib/gdi32.def +337 -0
- data/lib/data/tcc/lib/kernel32.def +763 -0
- data/lib/data/tcc/lib/libtcc1.a +0 -0
- data/lib/data/tcc/lib/msvcrt.def +782 -0
- data/lib/data/tcc/lib/user32.def +654 -0
- data/lib/data/tcc/tcc.exe +0 -0
- data/lib/data/tcc/tiny_impdef.exe +0 -0
- data/lib/data/tcc/tiny_libmaker.exe +0 -0
- data/lib/data/vbs/default_vbs.txt +1 -1
- data/lib/data/vbs/vbs_gui.txt +1 -1
- data/lib/standalone_ruby.rb +6 -6
- data/lib/utils/config_generator.rb +5 -0
- data/lib/utils/displayer.rb +60 -59
- data/lib/utils/exe_packer.rb +68 -0
- data/lib/utils/launcher.rb +15 -16
- data/lib/utils/launcher_handler.rb +2 -0
- data/lib/utils/logger_helper.rb +24 -24
- data/lib/utils/parameter_parser.rb +206 -201
- data/lib/utils/ruby_copy.rb +26 -26
- metadata +77 -3
- data/lib/data/bat/default_bat.txt +0 -9
@@ -0,0 +1,224 @@
|
|
1
|
+
/*
|
2
|
+
* float.h
|
3
|
+
*
|
4
|
+
* Constants related to floating point arithmetic.
|
5
|
+
*
|
6
|
+
* Also included here are some non-ANSI bits for accessing the floating
|
7
|
+
* point controller.
|
8
|
+
*
|
9
|
+
* NOTE: GCC provides float.h, and it is probably more accurate than this,
|
10
|
+
* but it doesn't include the non-standard stuff for accessing the
|
11
|
+
* fp controller. (TODO: Move those bits elsewhere?) Thus it is
|
12
|
+
* probably not a good idea to use the GCC supplied version instead
|
13
|
+
* of this header.
|
14
|
+
*
|
15
|
+
* This file is part of the Mingw32 package.
|
16
|
+
*
|
17
|
+
* Contributors:
|
18
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
19
|
+
*
|
20
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
21
|
+
*
|
22
|
+
* This source code is offered for use in the public domain. You may
|
23
|
+
* use, modify or distribute it freely.
|
24
|
+
*
|
25
|
+
* This code is distributed in the hope that it will be useful but
|
26
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
27
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
28
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
29
|
+
*
|
30
|
+
* $Revision: 1.2 $
|
31
|
+
* $Author: bellard $
|
32
|
+
* $Date: 2005/04/17 13:14:29 $
|
33
|
+
*
|
34
|
+
*/
|
35
|
+
|
36
|
+
#ifndef _FLOAT_H_
|
37
|
+
#define _FLOAT_H_
|
38
|
+
|
39
|
+
/* All the headers include this file. */
|
40
|
+
#include <_mingw.h>
|
41
|
+
|
42
|
+
#define FLT_ROUNDS 1
|
43
|
+
#define FLT_GUARD 1
|
44
|
+
#define FLT_NORMALIZE 1
|
45
|
+
|
46
|
+
/*
|
47
|
+
* The characteristics of float.
|
48
|
+
*/
|
49
|
+
|
50
|
+
/* The radix for floating point representation. */
|
51
|
+
#define FLT_RADIX 2
|
52
|
+
|
53
|
+
/* Decimal digits of precision. */
|
54
|
+
#define FLT_DIG 6
|
55
|
+
|
56
|
+
/* Smallest number such that 1+x != 1 */
|
57
|
+
#define FLT_EPSILON 1.19209290e-07F
|
58
|
+
|
59
|
+
/* The number of base FLT_RADIX digits in the mantissa. */
|
60
|
+
#define FLT_MANT_DIG 24
|
61
|
+
|
62
|
+
/* The maximum floating point number. */
|
63
|
+
#define FLT_MAX 3.40282347e+38F
|
64
|
+
|
65
|
+
/* Maximum n such that FLT_RADIX^n - 1 is representable. */
|
66
|
+
#define FLT_MAX_EXP 128
|
67
|
+
|
68
|
+
/* Maximum n such that 10^n is representable. */
|
69
|
+
#define FLT_MAX_10_EXP 38
|
70
|
+
|
71
|
+
/* Minimum normalized floating-point number. */
|
72
|
+
#define FLT_MIN 1.17549435e-38F
|
73
|
+
|
74
|
+
/* Minimum n such that FLT_RADIX^n is a normalized number. */
|
75
|
+
#define FLT_MIN_EXP (-125)
|
76
|
+
|
77
|
+
/* Minimum n such that 10^n is a normalized number. */
|
78
|
+
#define FLT_MIN_10_EXP (-37)
|
79
|
+
|
80
|
+
|
81
|
+
/*
|
82
|
+
* The characteristics of double.
|
83
|
+
*/
|
84
|
+
#define DBL_DIG 15
|
85
|
+
#define DBL_EPSILON 1.1102230246251568e-16
|
86
|
+
#define DBL_MANT_DIG 53
|
87
|
+
#define DBL_MAX 1.7976931348623157e+308
|
88
|
+
#define DBL_MAX_EXP 1024
|
89
|
+
#define DBL_MAX_10_EXP 308
|
90
|
+
#define DBL_MIN 2.2250738585072014e-308
|
91
|
+
#define DBL_MIN_EXP (-1021)
|
92
|
+
#define DBL_MIN_10_EXP (-307)
|
93
|
+
|
94
|
+
|
95
|
+
/*
|
96
|
+
* The characteristics of long double.
|
97
|
+
* NOTE: long double is the same as double.
|
98
|
+
*/
|
99
|
+
#define LDBL_DIG 15
|
100
|
+
#define LDBL_EPSILON 1.1102230246251568e-16L
|
101
|
+
#define LDBL_MANT_DIG 53
|
102
|
+
#define LDBL_MAX 1.7976931348623157e+308L
|
103
|
+
#define LDBL_MAX_EXP 1024
|
104
|
+
#define LDBL_MAX_10_EXP 308
|
105
|
+
#define LDBL_MIN 2.2250738585072014e-308L
|
106
|
+
#define LDBL_MIN_EXP (-1021)
|
107
|
+
#define LDBL_MIN_10_EXP (-307)
|
108
|
+
|
109
|
+
|
110
|
+
/*
|
111
|
+
* Functions and definitions for controlling the FPU.
|
112
|
+
*/
|
113
|
+
#ifndef __STRICT_ANSI__
|
114
|
+
|
115
|
+
/* TODO: These constants are only valid for x86 machines */
|
116
|
+
|
117
|
+
/* Control word masks for unMask */
|
118
|
+
#define _MCW_EM 0x0008001F /* Error masks */
|
119
|
+
#define _MCW_IC 0x00040000 /* Infinity */
|
120
|
+
#define _MCW_RC 0x00000300 /* Rounding */
|
121
|
+
#define _MCW_PC 0x00030000 /* Precision */
|
122
|
+
|
123
|
+
/* Control word values for unNew (use with related unMask above) */
|
124
|
+
#define _EM_INVALID 0x00000010
|
125
|
+
#define _EM_DENORMAL 0x00080000
|
126
|
+
#define _EM_ZERODIVIDE 0x00000008
|
127
|
+
#define _EM_OVERFLOW 0x00000004
|
128
|
+
#define _EM_UNDERFLOW 0x00000002
|
129
|
+
#define _EM_INEXACT 0x00000001
|
130
|
+
#define _IC_AFFINE 0x00040000
|
131
|
+
#define _IC_PROJECTIVE 0x00000000
|
132
|
+
#define _RC_CHOP 0x00000300
|
133
|
+
#define _RC_UP 0x00000200
|
134
|
+
#define _RC_DOWN 0x00000100
|
135
|
+
#define _RC_NEAR 0x00000000
|
136
|
+
#define _PC_24 0x00020000
|
137
|
+
#define _PC_53 0x00010000
|
138
|
+
#define _PC_64 0x00000000
|
139
|
+
|
140
|
+
/* These are also defined in Mingw math.h, needed to work around
|
141
|
+
GCC build issues. */
|
142
|
+
/* Return values for fpclass. */
|
143
|
+
#ifndef __MINGW_FPCLASS_DEFINED
|
144
|
+
#define __MINGW_FPCLASS_DEFINED 1
|
145
|
+
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
146
|
+
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
147
|
+
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
148
|
+
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
149
|
+
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
150
|
+
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
151
|
+
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
152
|
+
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
153
|
+
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
154
|
+
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
155
|
+
#endif /* __MINGW_FPCLASS_DEFINED */
|
156
|
+
|
157
|
+
/* invalid subconditions (_SW_INVALID also set) */
|
158
|
+
#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
|
159
|
+
#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
|
160
|
+
#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
|
161
|
+
#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
|
162
|
+
|
163
|
+
/* Floating point error signals and return codes */
|
164
|
+
#define _FPE_INVALID 0x81
|
165
|
+
#define _FPE_DENORMAL 0x82
|
166
|
+
#define _FPE_ZERODIVIDE 0x83
|
167
|
+
#define _FPE_OVERFLOW 0x84
|
168
|
+
#define _FPE_UNDERFLOW 0x85
|
169
|
+
#define _FPE_INEXACT 0x86
|
170
|
+
#define _FPE_UNEMULATED 0x87
|
171
|
+
#define _FPE_SQRTNEG 0x88
|
172
|
+
#define _FPE_STACKOVERFLOW 0x8a
|
173
|
+
#define _FPE_STACKUNDERFLOW 0x8b
|
174
|
+
#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
|
175
|
+
|
176
|
+
#ifndef RC_INVOKED
|
177
|
+
|
178
|
+
#ifdef __cplusplus
|
179
|
+
extern "C" {
|
180
|
+
#endif
|
181
|
+
|
182
|
+
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
|
183
|
+
* i.e. change the bits in unMask to have the values they have in unNew,
|
184
|
+
* leaving other bits unchanged. */
|
185
|
+
unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
|
186
|
+
unsigned int _control87 (unsigned int unNew, unsigned int unMask);
|
187
|
+
|
188
|
+
|
189
|
+
unsigned int _clearfp (void); /* Clear the FPU status word */
|
190
|
+
unsigned int _statusfp (void); /* Report the FPU status word */
|
191
|
+
#define _clear87 _clearfp
|
192
|
+
#define _status87 _statusfp
|
193
|
+
|
194
|
+
void _fpreset (void); /* Reset the FPU */
|
195
|
+
void fpreset (void);
|
196
|
+
|
197
|
+
/* Global 'variable' for the current floating point error code. */
|
198
|
+
int * __fpecode(void);
|
199
|
+
#define _fpecode (*(__fpecode()))
|
200
|
+
|
201
|
+
/*
|
202
|
+
* IEEE recommended functions
|
203
|
+
*/
|
204
|
+
|
205
|
+
double _chgsign (double);
|
206
|
+
double _copysign (double, double);
|
207
|
+
double _logb (double);
|
208
|
+
double _nextafter (double, double);
|
209
|
+
double _scalb (double, long);
|
210
|
+
|
211
|
+
int _finite (double);
|
212
|
+
int _fpclass (double);
|
213
|
+
int _isnan (double);
|
214
|
+
|
215
|
+
#ifdef __cplusplus
|
216
|
+
}
|
217
|
+
#endif
|
218
|
+
|
219
|
+
#endif /* Not RC_INVOKED */
|
220
|
+
|
221
|
+
#endif /* Not __STRICT_ANSI__ */
|
222
|
+
|
223
|
+
#endif /* _FLOAT_H_ */
|
224
|
+
|
@@ -0,0 +1,275 @@
|
|
1
|
+
/* 7.8 Format conversion of integer types <inttypes.h> */
|
2
|
+
|
3
|
+
#ifndef _INTTYPES_H
|
4
|
+
#define _INTTYPES_H
|
5
|
+
|
6
|
+
#include <stdint.h>
|
7
|
+
#define __need_wchar_t
|
8
|
+
#include <stddef.h>
|
9
|
+
|
10
|
+
#ifdef __cplusplus
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
typedef struct {
|
15
|
+
intmax_t quot;
|
16
|
+
intmax_t rem;
|
17
|
+
} imaxdiv_t;
|
18
|
+
|
19
|
+
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
20
|
+
|
21
|
+
/* 7.8.1 Macros for format specifiers
|
22
|
+
*
|
23
|
+
* MS runtime does not yet understand C9x standard "ll"
|
24
|
+
* length specifier. It appears to treat "ll" as "l".
|
25
|
+
* The non-standard I64 length specifier causes warning in GCC,
|
26
|
+
* but understood by MS runtime functions.
|
27
|
+
*/
|
28
|
+
|
29
|
+
/* fprintf macros for signed types */
|
30
|
+
#define PRId8 "d"
|
31
|
+
#define PRId16 "d"
|
32
|
+
#define PRId32 "d"
|
33
|
+
#define PRId64 "I64d"
|
34
|
+
|
35
|
+
#define PRIdLEAST8 "d"
|
36
|
+
#define PRIdLEAST16 "d"
|
37
|
+
#define PRIdLEAST32 "d"
|
38
|
+
#define PRIdLEAST64 "I64d"
|
39
|
+
|
40
|
+
#define PRIdFAST8 "d"
|
41
|
+
#define PRIdFAST16 "d"
|
42
|
+
#define PRIdFAST32 "d"
|
43
|
+
#define PRIdFAST64 "I64d"
|
44
|
+
|
45
|
+
#define PRIdMAX "I64d"
|
46
|
+
#define PRIdPTR "d"
|
47
|
+
|
48
|
+
#define PRIi8 "i"
|
49
|
+
#define PRIi16 "i"
|
50
|
+
#define PRIi32 "i"
|
51
|
+
#define PRIi64 "I64i"
|
52
|
+
|
53
|
+
#define PRIiLEAST8 "i"
|
54
|
+
#define PRIiLEAST16 "i"
|
55
|
+
#define PRIiLEAST32 "i"
|
56
|
+
#define PRIiLEAST64 "I64i"
|
57
|
+
|
58
|
+
#define PRIiFAST8 "i"
|
59
|
+
#define PRIiFAST16 "i"
|
60
|
+
#define PRIiFAST32 "i"
|
61
|
+
#define PRIiFAST64 "I64i"
|
62
|
+
|
63
|
+
#define PRIiMAX "I64i"
|
64
|
+
#define PRIiPTR "i"
|
65
|
+
|
66
|
+
#define PRIo8 "o"
|
67
|
+
#define PRIo16 "o"
|
68
|
+
#define PRIo32 "o"
|
69
|
+
#define PRIo64 "I64o"
|
70
|
+
|
71
|
+
#define PRIoLEAST8 "o"
|
72
|
+
#define PRIoLEAST16 "o"
|
73
|
+
#define PRIoLEAST32 "o"
|
74
|
+
#define PRIoLEAST64 "I64o"
|
75
|
+
|
76
|
+
#define PRIoFAST8 "o"
|
77
|
+
#define PRIoFAST16 "o"
|
78
|
+
#define PRIoFAST32 "o"
|
79
|
+
#define PRIoFAST64 "I64o"
|
80
|
+
|
81
|
+
#define PRIoMAX "I64o"
|
82
|
+
|
83
|
+
#define PRIoPTR "o"
|
84
|
+
|
85
|
+
/* fprintf macros for unsigned types */
|
86
|
+
#define PRIu8 "u"
|
87
|
+
#define PRIu16 "u"
|
88
|
+
#define PRIu32 "u"
|
89
|
+
#define PRIu64 "I64u"
|
90
|
+
|
91
|
+
|
92
|
+
#define PRIuLEAST8 "u"
|
93
|
+
#define PRIuLEAST16 "u"
|
94
|
+
#define PRIuLEAST32 "u"
|
95
|
+
#define PRIuLEAST64 "I64u"
|
96
|
+
|
97
|
+
#define PRIuFAST8 "u"
|
98
|
+
#define PRIuFAST16 "u"
|
99
|
+
#define PRIuFAST32 "u"
|
100
|
+
#define PRIuFAST64 "I64u"
|
101
|
+
|
102
|
+
#define PRIuMAX "I64u"
|
103
|
+
#define PRIuPTR "u"
|
104
|
+
|
105
|
+
#define PRIx8 "x"
|
106
|
+
#define PRIx16 "x"
|
107
|
+
#define PRIx32 "x"
|
108
|
+
#define PRIx64 "I64x"
|
109
|
+
|
110
|
+
#define PRIxLEAST8 "x"
|
111
|
+
#define PRIxLEAST16 "x"
|
112
|
+
#define PRIxLEAST32 "x"
|
113
|
+
#define PRIxLEAST64 "I64x"
|
114
|
+
|
115
|
+
#define PRIxFAST8 "x"
|
116
|
+
#define PRIxFAST16 "x"
|
117
|
+
#define PRIxFAST32 "x"
|
118
|
+
#define PRIxFAST64 "I64x"
|
119
|
+
|
120
|
+
#define PRIxMAX "I64x"
|
121
|
+
#define PRIxPTR "x"
|
122
|
+
|
123
|
+
#define PRIX8 "X"
|
124
|
+
#define PRIX16 "X"
|
125
|
+
#define PRIX32 "X"
|
126
|
+
#define PRIX64 "I64X"
|
127
|
+
|
128
|
+
#define PRIXLEAST8 "X"
|
129
|
+
#define PRIXLEAST16 "X"
|
130
|
+
#define PRIXLEAST32 "X"
|
131
|
+
#define PRIXLEAST64 "I64X"
|
132
|
+
|
133
|
+
#define PRIXFAST8 "X"
|
134
|
+
#define PRIXFAST16 "X"
|
135
|
+
#define PRIXFAST32 "X"
|
136
|
+
#define PRIXFAST64 "I64X"
|
137
|
+
|
138
|
+
#define PRIXMAX "I64X"
|
139
|
+
#define PRIXPTR "X"
|
140
|
+
|
141
|
+
/*
|
142
|
+
* fscanf macros for signed int types
|
143
|
+
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
|
144
|
+
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
|
145
|
+
* no length identifiers
|
146
|
+
*/
|
147
|
+
|
148
|
+
#define SCNd16 "hd"
|
149
|
+
#define SCNd32 "d"
|
150
|
+
#define SCNd64 "I64d"
|
151
|
+
|
152
|
+
#define SCNdLEAST16 "hd"
|
153
|
+
#define SCNdLEAST32 "d"
|
154
|
+
#define SCNdLEAST64 "I64d"
|
155
|
+
|
156
|
+
#define SCNdFAST16 "hd"
|
157
|
+
#define SCNdFAST32 "d"
|
158
|
+
#define SCNdFAST64 "I64d"
|
159
|
+
|
160
|
+
#define SCNdMAX "I64d"
|
161
|
+
#define SCNdPTR "d"
|
162
|
+
|
163
|
+
#define SCNi16 "hi"
|
164
|
+
#define SCNi32 "i"
|
165
|
+
#define SCNi64 "I64i"
|
166
|
+
|
167
|
+
#define SCNiLEAST16 "hi"
|
168
|
+
#define SCNiLEAST32 "i"
|
169
|
+
#define SCNiLEAST64 "I64i"
|
170
|
+
|
171
|
+
#define SCNiFAST16 "hi"
|
172
|
+
#define SCNiFAST32 "i"
|
173
|
+
#define SCNiFAST64 "I64i"
|
174
|
+
|
175
|
+
#define SCNiMAX "I64i"
|
176
|
+
#define SCNiPTR "i"
|
177
|
+
|
178
|
+
#define SCNo16 "ho"
|
179
|
+
#define SCNo32 "o"
|
180
|
+
#define SCNo64 "I64o"
|
181
|
+
|
182
|
+
#define SCNoLEAST16 "ho"
|
183
|
+
#define SCNoLEAST32 "o"
|
184
|
+
#define SCNoLEAST64 "I64o"
|
185
|
+
|
186
|
+
#define SCNoFAST16 "ho"
|
187
|
+
#define SCNoFAST32 "o"
|
188
|
+
#define SCNoFAST64 "I64o"
|
189
|
+
|
190
|
+
#define SCNoMAX "I64o"
|
191
|
+
#define SCNoPTR "o"
|
192
|
+
|
193
|
+
#define SCNx16 "hx"
|
194
|
+
#define SCNx32 "x"
|
195
|
+
#define SCNx64 "I64x"
|
196
|
+
|
197
|
+
#define SCNxLEAST16 "hx"
|
198
|
+
#define SCNxLEAST32 "x"
|
199
|
+
#define SCNxLEAST64 "I64x"
|
200
|
+
|
201
|
+
#define SCNxFAST16 "hx"
|
202
|
+
#define SCNxFAST32 "x"
|
203
|
+
#define SCNxFAST64 "I64x"
|
204
|
+
|
205
|
+
#define SCNxMAX "I64x"
|
206
|
+
#define SCNxPTR "x"
|
207
|
+
|
208
|
+
|
209
|
+
/* fscanf macros for unsigned int types */
|
210
|
+
|
211
|
+
#define SCNu16 "hu"
|
212
|
+
#define SCNu32 "u"
|
213
|
+
#define SCNu64 "I64u"
|
214
|
+
|
215
|
+
#define SCNuLEAST16 "hu"
|
216
|
+
#define SCNuLEAST32 "u"
|
217
|
+
#define SCNuLEAST64 "I64u"
|
218
|
+
|
219
|
+
#define SCNuFAST16 "hu"
|
220
|
+
#define SCNuFAST32 "u"
|
221
|
+
#define SCNuFAST64 "I64u"
|
222
|
+
|
223
|
+
#define SCNuMAX "I64u"
|
224
|
+
#define SCNuPTR "u"
|
225
|
+
|
226
|
+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
227
|
+
/*
|
228
|
+
* no length modifier for char types prior to C9x
|
229
|
+
* MS runtime scanf appears to treat "hh" as "h"
|
230
|
+
*/
|
231
|
+
|
232
|
+
/* signed char */
|
233
|
+
#define SCNd8 "hhd"
|
234
|
+
#define SCNdLEAST8 "hhd"
|
235
|
+
#define SCNdFAST8 "hhd"
|
236
|
+
|
237
|
+
#define SCNi8 "hhi"
|
238
|
+
#define SCNiLEAST8 "hhi"
|
239
|
+
#define SCNiFAST8 "hhi"
|
240
|
+
|
241
|
+
#define SCNo8 "hho"
|
242
|
+
#define SCNoLEAST8 "hho"
|
243
|
+
#define SCNoFAST8 "hho"
|
244
|
+
|
245
|
+
#define SCNx8 "hhx"
|
246
|
+
#define SCNxLEAST8 "hhx"
|
247
|
+
#define SCNxFAST8 "hhx"
|
248
|
+
|
249
|
+
/* unsigned char */
|
250
|
+
#define SCNu8 "hhu"
|
251
|
+
#define SCNuLEAST8 "hhu"
|
252
|
+
#define SCNuFAST8 "hhu"
|
253
|
+
#endif /* __STDC_VERSION__ >= 199901 */
|
254
|
+
|
255
|
+
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
|
256
|
+
|
257
|
+
extern inline intmax_t imaxabs (intmax_t j)
|
258
|
+
{return (j >= 0 ? j : -j);}
|
259
|
+
imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom);
|
260
|
+
|
261
|
+
/* 7.8.2 Conversion functions for greatest-width integer types */
|
262
|
+
|
263
|
+
intmax_t strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
264
|
+
uintmax_t strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
265
|
+
|
266
|
+
intmax_t wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
267
|
+
int base);
|
268
|
+
uintmax_t wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
269
|
+
int base);
|
270
|
+
|
271
|
+
#ifdef __cplusplus
|
272
|
+
}
|
273
|
+
#endif
|
274
|
+
|
275
|
+
#endif /* ndef _INTTYPES_H */
|