typenative 0.0.8 → 0.0.10

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 (111) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +42 -9
  3. package/bin/index.js +11 -5
  4. package/bin/transpiler.js +89 -13
  5. package/package.json +11 -8
  6. package/types/typenative.d.ts +1 -3
  7. package/bin/tcc/doc/tcc-doc.html +0 -2418
  8. package/bin/tcc/doc/tcc-win32.txt +0 -156
  9. package/bin/tcc/examples/dll.c +0 -12
  10. package/bin/tcc/examples/fib.c +0 -23
  11. package/bin/tcc/examples/hello_dll.c +0 -19
  12. package/bin/tcc/examples/hello_win.c +0 -163
  13. package/bin/tcc/examples/libtcc_test.c +0 -76
  14. package/bin/tcc/include/_mingw.h +0 -139
  15. package/bin/tcc/include/assert.h +0 -54
  16. package/bin/tcc/include/conio.h +0 -409
  17. package/bin/tcc/include/ctype.h +0 -281
  18. package/bin/tcc/include/dir.h +0 -31
  19. package/bin/tcc/include/direct.h +0 -68
  20. package/bin/tcc/include/dirent.h +0 -135
  21. package/bin/tcc/include/dos.h +0 -55
  22. package/bin/tcc/include/errno.h +0 -75
  23. package/bin/tcc/include/excpt.h +0 -123
  24. package/bin/tcc/include/fcntl.h +0 -52
  25. package/bin/tcc/include/fenv.h +0 -108
  26. package/bin/tcc/include/float.h +0 -57
  27. package/bin/tcc/include/inttypes.h +0 -297
  28. package/bin/tcc/include/io.h +0 -418
  29. package/bin/tcc/include/limits.h +0 -111
  30. package/bin/tcc/include/locale.h +0 -91
  31. package/bin/tcc/include/malloc.h +0 -175
  32. package/bin/tcc/include/math.h +0 -777
  33. package/bin/tcc/include/mem.h +0 -13
  34. package/bin/tcc/include/memory.h +0 -40
  35. package/bin/tcc/include/process.h +0 -176
  36. package/bin/tcc/include/sec_api/conio_s.h +0 -42
  37. package/bin/tcc/include/sec_api/crtdbg_s.h +0 -19
  38. package/bin/tcc/include/sec_api/io_s.h +0 -33
  39. package/bin/tcc/include/sec_api/mbstring_s.h +0 -52
  40. package/bin/tcc/include/sec_api/search_s.h +0 -25
  41. package/bin/tcc/include/sec_api/stdio_s.h +0 -145
  42. package/bin/tcc/include/sec_api/stdlib_s.h +0 -67
  43. package/bin/tcc/include/sec_api/stralign_s.h +0 -30
  44. package/bin/tcc/include/sec_api/string_s.h +0 -41
  45. package/bin/tcc/include/sec_api/sys/timeb_s.h +0 -34
  46. package/bin/tcc/include/sec_api/tchar_s.h +0 -266
  47. package/bin/tcc/include/sec_api/time_s.h +0 -61
  48. package/bin/tcc/include/sec_api/wchar_s.h +0 -128
  49. package/bin/tcc/include/setjmp.h +0 -160
  50. package/bin/tcc/include/share.h +0 -28
  51. package/bin/tcc/include/signal.h +0 -63
  52. package/bin/tcc/include/stdarg.h +0 -41
  53. package/bin/tcc/include/stdbool.h +0 -10
  54. package/bin/tcc/include/stddef.h +0 -28
  55. package/bin/tcc/include/stdint.h +0 -209
  56. package/bin/tcc/include/stdio.h +0 -429
  57. package/bin/tcc/include/stdlib.h +0 -580
  58. package/bin/tcc/include/string.h +0 -164
  59. package/bin/tcc/include/sys/fcntl.h +0 -13
  60. package/bin/tcc/include/sys/file.h +0 -14
  61. package/bin/tcc/include/sys/locking.h +0 -30
  62. package/bin/tcc/include/sys/stat.h +0 -290
  63. package/bin/tcc/include/sys/time.h +0 -69
  64. package/bin/tcc/include/sys/timeb.h +0 -133
  65. package/bin/tcc/include/sys/types.h +0 -118
  66. package/bin/tcc/include/sys/unistd.h +0 -14
  67. package/bin/tcc/include/sys/utime.h +0 -146
  68. package/bin/tcc/include/tcclib.h +0 -78
  69. package/bin/tcc/include/tchar.h +0 -1102
  70. package/bin/tcc/include/time.h +0 -287
  71. package/bin/tcc/include/vadefs.h +0 -11
  72. package/bin/tcc/include/values.h +0 -4
  73. package/bin/tcc/include/varargs.h +0 -12
  74. package/bin/tcc/include/wchar.h +0 -871
  75. package/bin/tcc/include/wctype.h +0 -172
  76. package/bin/tcc/include/winapi/basetsd.h +0 -149
  77. package/bin/tcc/include/winapi/basetyps.h +0 -85
  78. package/bin/tcc/include/winapi/guiddef.h +0 -151
  79. package/bin/tcc/include/winapi/intrin.h +0 -11
  80. package/bin/tcc/include/winapi/poppack.h +0 -8
  81. package/bin/tcc/include/winapi/pshpack1.h +0 -8
  82. package/bin/tcc/include/winapi/pshpack2.h +0 -8
  83. package/bin/tcc/include/winapi/pshpack4.h +0 -8
  84. package/bin/tcc/include/winapi/pshpack8.h +0 -8
  85. package/bin/tcc/include/winapi/reason.h +0 -80
  86. package/bin/tcc/include/winapi/specstrings.h +0 -7
  87. package/bin/tcc/include/winapi/stralign.h +0 -154
  88. package/bin/tcc/include/winapi/tvout.h +0 -79
  89. package/bin/tcc/include/winapi/winbase.h +0 -2951
  90. package/bin/tcc/include/winapi/wincon.h +0 -301
  91. package/bin/tcc/include/winapi/windef.h +0 -293
  92. package/bin/tcc/include/winapi/windows.h +0 -123
  93. package/bin/tcc/include/winapi/winerror.h +0 -3166
  94. package/bin/tcc/include/winapi/wingdi.h +0 -4080
  95. package/bin/tcc/include/winapi/winnetwk.h +0 -476
  96. package/bin/tcc/include/winapi/winnls.h +0 -765
  97. package/bin/tcc/include/winapi/winnt.h +0 -5770
  98. package/bin/tcc/include/winapi/winreg.h +0 -272
  99. package/bin/tcc/include/winapi/winuser.h +0 -5651
  100. package/bin/tcc/include/winapi/winver.h +0 -160
  101. package/bin/tcc/lib/gdi32.def +0 -337
  102. package/bin/tcc/lib/kernel32.def +0 -765
  103. package/bin/tcc/lib/libtcc1.a +0 -0
  104. package/bin/tcc/lib/msvcrt.def +0 -1399
  105. package/bin/tcc/lib/user32.def +0 -654
  106. package/bin/tcc/libtcc/libtcc.def +0 -38
  107. package/bin/tcc/libtcc/libtcc.h +0 -100
  108. package/bin/tcc/libtcc.dll +0 -0
  109. package/bin/tcc/tcc.exe +0 -0
  110. package/bin/tcc/tiny_impdef.exe +0 -0
  111. package/bin/tcc/tiny_libmaker.exe +0 -0
@@ -1,28 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the w64 mingw-runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER within this package.
5
- */
6
- #ifndef _INC_SHARE
7
- #define _INC_SHARE
8
-
9
- #ifndef _WIN32
10
- #error Only Win32 target is supported!
11
- #endif
12
-
13
- #define _SH_COMPAT 0x00
14
- #define _SH_DENYRW 0x10
15
- #define _SH_DENYWR 0x20
16
- #define _SH_DENYRD 0x30
17
- #define _SH_DENYNO 0x40
18
- #define _SH_SECURE 0x80
19
-
20
- #ifndef NO_OLDNAMES
21
- #define SH_COMPAT _SH_COMPAT
22
- #define SH_DENYRW _SH_DENYRW
23
- #define SH_DENYWR _SH_DENYWR
24
- #define SH_DENYRD _SH_DENYRD
25
- #define SH_DENYNO _SH_DENYNO
26
- #endif
27
-
28
- #endif
@@ -1,63 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the w64 mingw-runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER within this package.
5
- */
6
- #ifndef _INC_SIGNAL
7
- #define _INC_SIGNAL
8
-
9
- #include <_mingw.h>
10
-
11
- #ifdef __cplusplus
12
- extern "C" {
13
- #endif
14
-
15
- #ifndef _SIG_ATOMIC_T_DEFINED
16
- #define _SIG_ATOMIC_T_DEFINED
17
- typedef int sig_atomic_t;
18
- #endif
19
-
20
- #define NSIG 23
21
-
22
- #define SIGHUP 1 /* hangup */
23
- #define SIGINT 2
24
- #define SIGQUIT 3 /* quit */
25
- #define SIGILL 4
26
- #define SIGTRAP 5 /* trace trap (not reset when caught) */
27
- #define SIGIOT 6 /* IOT instruction */
28
- #define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
29
- #define SIGEMT 7 /* EMT instruction */
30
- #define SIGFPE 8
31
- #define SIGKILL 9 /* kill (cannot be caught or ignored) */
32
- #define SIGBUS 10 /* bus error */
33
- #define SIGSEGV 11
34
- #define SIGSYS 12 /* bad argument to system call */
35
- #define SIGPIPE 13 /* write on a pipe with no one to read it */
36
- #ifdef __USE_MINGW_ALARM
37
- #define SIGALRM 14 /* alarm clock */
38
- #endif
39
- #define SIGTERM 15
40
- #define SIGBREAK 21
41
- #define SIGABRT2 22
42
-
43
- #define SIGABRT_COMPAT 6
44
-
45
- typedef void (*__p_sig_fn_t)(int);
46
-
47
- #define SIG_DFL (__p_sig_fn_t)0
48
- #define SIG_IGN (__p_sig_fn_t)1
49
- #define SIG_GET (__p_sig_fn_t)2
50
- #define SIG_SGE (__p_sig_fn_t)3
51
- #define SIG_ACK (__p_sig_fn_t)4
52
- #define SIG_ERR (__p_sig_fn_t)-1
53
-
54
- extern void **__cdecl __pxcptinfoptrs(void);
55
- #define _pxcptinfoptrs (*__pxcptinfoptrs())
56
-
57
- __p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
58
- int __cdecl raise(int _SigNum);
59
-
60
- #ifdef __cplusplus
61
- }
62
- #endif
63
- #endif
@@ -1,41 +0,0 @@
1
- #ifndef _STDARG_H
2
- #define _STDARG_H
3
-
4
- #ifdef __x86_64__
5
- #ifndef _WIN64
6
-
7
- typedef void *va_list;
8
-
9
- va_list __va_start(void *fp);
10
- void *__va_arg(va_list ap, int arg_type, int size);
11
- va_list __va_copy(va_list src);
12
- void __va_end(va_list ap);
13
-
14
- #define va_start(ap, last) ((ap) = __va_start(__builtin_frame_address(0)))
15
- #define va_arg(ap, type) \
16
- (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type))))
17
- #define va_copy(dest, src) ((dest) = __va_copy(src))
18
- #define va_end(ap) __va_end(ap)
19
-
20
- #else /* _WIN64 */
21
- typedef char *va_list;
22
- #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+7)&~7)
23
- #define va_arg(ap,type) (ap += (sizeof(type)+7)&~7, *(type *)(ap - ((sizeof(type)+7)&~7)))
24
- #define va_copy(dest, src) (dest) = (src)
25
- #define va_end(ap)
26
- #endif
27
-
28
- #else /* __i386__ */
29
- typedef char *va_list;
30
- /* only correct for i386 */
31
- #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
32
- #define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
33
- #define va_copy(dest, src) (dest) = (src)
34
- #define va_end(ap)
35
- #endif
36
-
37
- /* fix a buggy dependency on GCC in libio.h */
38
- typedef va_list __gnuc_va_list;
39
- #define _VA_LIST_DEFINED
40
-
41
- #endif /* _STDARG_H */
@@ -1,10 +0,0 @@
1
- #ifndef _STDBOOL_H
2
- #define _STDBOOL_H
3
-
4
- /* ISOC99 boolean */
5
-
6
- #define bool _Bool
7
- #define true 1
8
- #define false 0
9
-
10
- #endif /* _STDBOOL_H */
@@ -1,28 +0,0 @@
1
- #ifndef _STDDEF_H
2
- #define _STDDEF_H
3
-
4
- typedef __SIZE_TYPE__ size_t;
5
- typedef __PTRDIFF_TYPE__ ssize_t;
6
- typedef __WCHAR_TYPE__ wchar_t;
7
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
8
- typedef __PTRDIFF_TYPE__ intptr_t;
9
- typedef __SIZE_TYPE__ uintptr_t;
10
-
11
- #ifndef __int8_t_defined
12
- #define __int8_t_defined
13
- typedef signed char int8_t;
14
- typedef signed short int int16_t;
15
- typedef signed int int32_t;
16
- typedef signed long long int int64_t;
17
- typedef unsigned char uint8_t;
18
- typedef unsigned short int uint16_t;
19
- typedef unsigned int uint32_t;
20
- typedef unsigned long long int uint64_t;
21
- #endif
22
-
23
- #define NULL ((void*)0)
24
- #define offsetof(type, field) ((size_t)&((type *)0)->field)
25
-
26
- void *alloca(size_t size);
27
-
28
- #endif
@@ -1,209 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the w64 mingw-runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER within this package.
5
- */
6
- /* ISO C9x 7.18 Integer types <stdint.h>
7
- * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
8
- *
9
- * THIS SOFTWARE IS NOT COPYRIGHTED
10
- *
11
- * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
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
- * Date: 2000-12-02
22
- */
23
-
24
-
25
- #ifndef _STDINT_H
26
- #define _STDINT_H
27
-
28
- #include <_mingw.h>
29
-
30
- #define __need_wint_t
31
- #define __need_wchar_t
32
- #include "stddef.h"
33
-
34
- /* 7.18.1.1 Exact-width integer types */
35
- typedef signed char int8_t;
36
- typedef unsigned char uint8_t;
37
- typedef short int16_t;
38
- typedef unsigned short uint16_t;
39
- typedef int int32_t;
40
- typedef unsigned uint32_t;
41
- typedef long long int64_t;
42
- typedef unsigned long long uint64_t;
43
-
44
- /* 7.18.1.2 Minimum-width integer types */
45
- typedef signed char int_least8_t;
46
- typedef unsigned char uint_least8_t;
47
- typedef short int_least16_t;
48
- typedef unsigned short uint_least16_t;
49
- typedef int int_least32_t;
50
- typedef unsigned uint_least32_t;
51
- typedef long long int_least64_t;
52
- typedef unsigned long long uint_least64_t;
53
-
54
- /* 7.18.1.3 Fastest minimum-width integer types
55
- * Not actually guaranteed to be fastest for all purposes
56
- * Here we use the exact-width types for 8 and 16-bit ints.
57
- */
58
- typedef char int_fast8_t;
59
- typedef unsigned char uint_fast8_t;
60
- typedef short int_fast16_t;
61
- typedef unsigned short uint_fast16_t;
62
- typedef int int_fast32_t;
63
- typedef unsigned int uint_fast32_t;
64
- typedef long long int_fast64_t;
65
- typedef unsigned long long uint_fast64_t;
66
-
67
- /* 7.18.1.5 Greatest-width integer types */
68
- typedef long long intmax_t;
69
- typedef unsigned long long uintmax_t;
70
-
71
- /* 7.18.2 Limits of specified-width integer types */
72
- #if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
73
-
74
- /* 7.18.2.1 Limits of exact-width integer types */
75
- #define INT8_MIN (-128)
76
- #define INT16_MIN (-32768)
77
- #define INT32_MIN (-2147483647 - 1)
78
- #define INT64_MIN (-9223372036854775807LL - 1)
79
-
80
- #define INT8_MAX 127
81
- #define INT16_MAX 32767
82
- #define INT32_MAX 2147483647
83
- #define INT64_MAX 9223372036854775807LL
84
-
85
- #define UINT8_MAX 0xff /* 255U */
86
- #define UINT16_MAX 0xffff /* 65535U */
87
- #define UINT32_MAX 0xffffffff /* 4294967295U */
88
- #define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
89
-
90
- /* 7.18.2.2 Limits of minimum-width integer types */
91
- #define INT_LEAST8_MIN INT8_MIN
92
- #define INT_LEAST16_MIN INT16_MIN
93
- #define INT_LEAST32_MIN INT32_MIN
94
- #define INT_LEAST64_MIN INT64_MIN
95
-
96
- #define INT_LEAST8_MAX INT8_MAX
97
- #define INT_LEAST16_MAX INT16_MAX
98
- #define INT_LEAST32_MAX INT32_MAX
99
- #define INT_LEAST64_MAX INT64_MAX
100
-
101
- #define UINT_LEAST8_MAX UINT8_MAX
102
- #define UINT_LEAST16_MAX UINT16_MAX
103
- #define UINT_LEAST32_MAX UINT32_MAX
104
- #define UINT_LEAST64_MAX UINT64_MAX
105
-
106
- /* 7.18.2.3 Limits of fastest minimum-width integer types */
107
- #define INT_FAST8_MIN INT8_MIN
108
- #define INT_FAST16_MIN INT16_MIN
109
- #define INT_FAST32_MIN INT32_MIN
110
- #define INT_FAST64_MIN INT64_MIN
111
-
112
- #define INT_FAST8_MAX INT8_MAX
113
- #define INT_FAST16_MAX INT16_MAX
114
- #define INT_FAST32_MAX INT32_MAX
115
- #define INT_FAST64_MAX INT64_MAX
116
-
117
- #define UINT_FAST8_MAX UINT8_MAX
118
- #define UINT_FAST16_MAX UINT16_MAX
119
- #define UINT_FAST32_MAX UINT32_MAX
120
- #define UINT_FAST64_MAX UINT64_MAX
121
-
122
- /* 7.18.2.4 Limits of integer types capable of holding
123
- object pointers */
124
- #ifdef _WIN64
125
- #define INTPTR_MIN INT64_MIN
126
- #define INTPTR_MAX INT64_MAX
127
- #define UINTPTR_MAX UINT64_MAX
128
- #else
129
- #define INTPTR_MIN INT32_MIN
130
- #define INTPTR_MAX INT32_MAX
131
- #define UINTPTR_MAX UINT32_MAX
132
- #endif
133
-
134
- /* 7.18.2.5 Limits of greatest-width integer types */
135
- #define INTMAX_MIN INT64_MIN
136
- #define INTMAX_MAX INT64_MAX
137
- #define UINTMAX_MAX UINT64_MAX
138
-
139
- /* 7.18.3 Limits of other integer types */
140
- #ifdef _WIN64
141
- #define PTRDIFF_MIN INT64_MIN
142
- #define PTRDIFF_MAX INT64_MAX
143
- #else
144
- #define PTRDIFF_MIN INT32_MIN
145
- #define PTRDIFF_MAX INT32_MAX
146
- #endif
147
-
148
- #define SIG_ATOMIC_MIN INT32_MIN
149
- #define SIG_ATOMIC_MAX INT32_MAX
150
-
151
- #ifndef SIZE_MAX
152
- #ifdef _WIN64
153
- #define SIZE_MAX UINT64_MAX
154
- #else
155
- #define SIZE_MAX UINT32_MAX
156
- #endif
157
- #endif
158
-
159
- #ifndef WCHAR_MIN /* also in wchar.h */
160
- #define WCHAR_MIN 0
161
- #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
162
- #endif
163
-
164
- /*
165
- * wint_t is unsigned short for compatibility with MS runtime
166
- */
167
- #define WINT_MIN 0
168
- #define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
169
-
170
- #endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
171
-
172
-
173
- /* 7.18.4 Macros for integer constants */
174
- #if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
175
-
176
- /* 7.18.4.1 Macros for minimum-width integer constants
177
-
178
- Accoding to Douglas Gwyn <gwyn@arl.mil>:
179
- "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
180
- 9899:1999 as initially published, the expansion was required
181
- to be an integer constant of precisely matching type, which
182
- is impossible to accomplish for the shorter types on most
183
- platforms, because C99 provides no standard way to designate
184
- an integer constant with width less than that of type int.
185
- TC1 changed this to require just an integer constant
186
- *expression* with *promoted* type."
187
-
188
- The trick used here is from Clive D W Feather.
189
- */
190
-
191
- #define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
192
- #define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
193
- #define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
194
- /* The 'trick' doesn't work in C89 for long long because, without
195
- suffix, (val) will be evaluated as int, not intmax_t */
196
- #define INT64_C(val) val##LL
197
-
198
- #define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
199
- #define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
200
- #define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
201
- #define UINT64_C(val) val##ULL
202
-
203
- /* 7.18.4.2 Macros for greatest-width integer constants */
204
- #define INTMAX_C(val) val##LL
205
- #define UINTMAX_C(val) val##ULL
206
-
207
- #endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
208
-
209
- #endif