typenative 0.0.5 → 0.0.6
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.
- package/bin/index.js +2 -2
- package/package.json +1 -1
- package/tcc/doc/tcc-doc.html +2418 -0
- package/tcc/doc/tcc-win32.txt +156 -0
- package/tcc/examples/dll.c +12 -0
- package/tcc/examples/fib.c +23 -0
- package/tcc/examples/hello_dll.c +19 -0
- package/tcc/examples/hello_win.c +163 -0
- package/tcc/examples/libtcc_test.c +76 -0
- package/tcc/include/_mingw.h +139 -0
- package/tcc/include/assert.h +54 -0
- package/tcc/include/conio.h +409 -0
- package/tcc/include/ctype.h +281 -0
- package/tcc/include/dir.h +31 -0
- package/tcc/include/direct.h +68 -0
- package/tcc/include/dirent.h +135 -0
- package/tcc/include/dos.h +55 -0
- package/tcc/include/errno.h +75 -0
- package/tcc/include/excpt.h +123 -0
- package/tcc/include/fcntl.h +52 -0
- package/tcc/include/fenv.h +108 -0
- package/tcc/include/float.h +57 -0
- package/tcc/include/inttypes.h +297 -0
- package/tcc/include/io.h +418 -0
- package/tcc/include/limits.h +111 -0
- package/tcc/include/locale.h +91 -0
- package/tcc/include/malloc.h +175 -0
- package/tcc/include/math.h +777 -0
- package/tcc/include/mem.h +13 -0
- package/tcc/include/memory.h +40 -0
- package/tcc/include/process.h +176 -0
- package/tcc/include/sec_api/conio_s.h +42 -0
- package/tcc/include/sec_api/crtdbg_s.h +19 -0
- package/tcc/include/sec_api/io_s.h +33 -0
- package/tcc/include/sec_api/mbstring_s.h +52 -0
- package/tcc/include/sec_api/search_s.h +25 -0
- package/tcc/include/sec_api/stdio_s.h +145 -0
- package/tcc/include/sec_api/stdlib_s.h +67 -0
- package/tcc/include/sec_api/stralign_s.h +30 -0
- package/tcc/include/sec_api/string_s.h +41 -0
- package/tcc/include/sec_api/sys/timeb_s.h +34 -0
- package/tcc/include/sec_api/tchar_s.h +266 -0
- package/tcc/include/sec_api/time_s.h +61 -0
- package/tcc/include/sec_api/wchar_s.h +128 -0
- package/tcc/include/setjmp.h +160 -0
- package/tcc/include/share.h +28 -0
- package/tcc/include/signal.h +63 -0
- package/tcc/include/stdarg.h +41 -0
- package/tcc/include/stdbool.h +10 -0
- package/tcc/include/stddef.h +28 -0
- package/tcc/include/stdint.h +209 -0
- package/tcc/include/stdio.h +429 -0
- package/tcc/include/stdlib.h +580 -0
- package/tcc/include/string.h +164 -0
- package/tcc/include/sys/fcntl.h +13 -0
- package/tcc/include/sys/file.h +14 -0
- package/tcc/include/sys/locking.h +30 -0
- package/tcc/include/sys/stat.h +290 -0
- package/tcc/include/sys/time.h +69 -0
- package/tcc/include/sys/timeb.h +133 -0
- package/tcc/include/sys/types.h +118 -0
- package/tcc/include/sys/unistd.h +14 -0
- package/tcc/include/sys/utime.h +146 -0
- package/tcc/include/tcclib.h +78 -0
- package/tcc/include/tchar.h +1102 -0
- package/tcc/include/time.h +287 -0
- package/tcc/include/vadefs.h +11 -0
- package/tcc/include/values.h +4 -0
- package/tcc/include/varargs.h +12 -0
- package/tcc/include/wchar.h +871 -0
- package/tcc/include/wctype.h +172 -0
- package/tcc/include/winapi/basetsd.h +149 -0
- package/tcc/include/winapi/basetyps.h +85 -0
- package/tcc/include/winapi/guiddef.h +151 -0
- package/tcc/include/winapi/intrin.h +11 -0
- package/tcc/include/winapi/poppack.h +8 -0
- package/tcc/include/winapi/pshpack1.h +8 -0
- package/tcc/include/winapi/pshpack2.h +8 -0
- package/tcc/include/winapi/pshpack4.h +8 -0
- package/tcc/include/winapi/pshpack8.h +8 -0
- package/tcc/include/winapi/reason.h +80 -0
- package/tcc/include/winapi/specstrings.h +7 -0
- package/tcc/include/winapi/stralign.h +154 -0
- package/tcc/include/winapi/tvout.h +79 -0
- package/tcc/include/winapi/winbase.h +2951 -0
- package/tcc/include/winapi/wincon.h +301 -0
- package/tcc/include/winapi/windef.h +293 -0
- package/tcc/include/winapi/windows.h +123 -0
- package/tcc/include/winapi/winerror.h +3166 -0
- package/tcc/include/winapi/wingdi.h +4080 -0
- package/tcc/include/winapi/winnetwk.h +476 -0
- package/tcc/include/winapi/winnls.h +765 -0
- package/tcc/include/winapi/winnt.h +5770 -0
- package/tcc/include/winapi/winreg.h +272 -0
- package/tcc/include/winapi/winuser.h +5651 -0
- package/tcc/include/winapi/winver.h +160 -0
- package/tcc/lib/gdi32.def +337 -0
- package/tcc/lib/kernel32.def +765 -0
- package/tcc/lib/libtcc1.a +0 -0
- package/tcc/lib/msvcrt.def +1399 -0
- package/tcc/lib/user32.def +654 -0
- package/tcc/libtcc/libtcc.def +38 -0
- package/tcc/libtcc/libtcc.h +100 -0
- package/tcc/libtcc.dll +0 -0
- package/tcc/tcc.exe +0 -0
- package/tcc/tiny_impdef.exe +0 -0
- package/tcc/tiny_libmaker.exe +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
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 __STRALIGN_H_
|
|
7
|
+
#define __STRALIGN_H_
|
|
8
|
+
|
|
9
|
+
#ifndef _STRALIGN_USE_SECURE_CRT
|
|
10
|
+
#define _STRALIGN_USE_SECURE_CRT 0
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
#ifdef __cplusplus
|
|
14
|
+
extern "C" {
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#if defined(I_X86_)
|
|
18
|
+
#define WSTR_ALIGNED(s) TRUE
|
|
19
|
+
#define ua_CharUpperW CharUpperW
|
|
20
|
+
#define ua_lstrcmpiW lstrcmpiW
|
|
21
|
+
#define ua_lstrcmpW lstrcmpW
|
|
22
|
+
#define ua_lstrlenW lstrlenW
|
|
23
|
+
#define ua_wcschr wcschr
|
|
24
|
+
#define ua_wcsicmp wcsicmp
|
|
25
|
+
#define ua_wcslen wcslen
|
|
26
|
+
#define ua_wcsrchr wcsrchr
|
|
27
|
+
static __inline PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) { return wcscpy(Destination,Source); }
|
|
28
|
+
#else
|
|
29
|
+
#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1))==0)
|
|
30
|
+
|
|
31
|
+
LPUWSTR WINAPI uaw_CharUpperW(LPUWSTR String);
|
|
32
|
+
int WINAPI uaw_lstrcmpW(PCUWSTR String1,PCUWSTR String2);
|
|
33
|
+
int WINAPI uaw_lstrcmpiW(PCUWSTR String1,PCUWSTR String2);
|
|
34
|
+
int WINAPI uaw_lstrlenW(LPCUWSTR String);
|
|
35
|
+
PUWSTR __cdecl uaw_wcschr(PCUWSTR String,WCHAR Character);
|
|
36
|
+
PUWSTR __cdecl uaw_wcscpy(PUWSTR Destination,PCUWSTR Source);
|
|
37
|
+
int __cdecl uaw_wcsicmp(PCUWSTR String1,PCUWSTR String2);
|
|
38
|
+
size_t __cdecl uaw_wcslen(PCUWSTR String);
|
|
39
|
+
PUWSTR __cdecl uaw_wcsrchr(PCUWSTR String,WCHAR Character);
|
|
40
|
+
#ifdef CharUpper
|
|
41
|
+
static __inline LPUWSTR ua_CharUpperW(LPUWSTR String) {
|
|
42
|
+
if(WSTR_ALIGNED(String)) return CharUpperW((PWSTR)String);
|
|
43
|
+
return uaw_CharUpperW(String);
|
|
44
|
+
}
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#ifdef lstrcmp
|
|
48
|
+
static __inline int ua_lstrcmpW(LPCUWSTR String1,LPCUWSTR String2) {
|
|
49
|
+
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return lstrcmpW((LPCWSTR)String1,(LPCWSTR)String2);
|
|
50
|
+
return uaw_lstrcmpW(String1,String2);
|
|
51
|
+
}
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
#ifdef lstrcmpi
|
|
55
|
+
static __inline int ua_lstrcmpiW(LPCUWSTR String1,LPCUWSTR String2) {
|
|
56
|
+
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return lstrcmpiW((LPCWSTR)String1,(LPCWSTR)String2);
|
|
57
|
+
return uaw_lstrcmpiW(String1,String2);
|
|
58
|
+
}
|
|
59
|
+
#endif
|
|
60
|
+
|
|
61
|
+
#ifdef lstrlen
|
|
62
|
+
static __inline int ua_lstrlenW(LPCUWSTR String) {
|
|
63
|
+
if(WSTR_ALIGNED(String)) return lstrlenW((PCWSTR)String);
|
|
64
|
+
return uaw_lstrlenW(String);
|
|
65
|
+
}
|
|
66
|
+
#endif
|
|
67
|
+
|
|
68
|
+
#if defined(_WSTRING_DEFINED)
|
|
69
|
+
#ifdef _WConst_return
|
|
70
|
+
typedef _WConst_return WCHAR UNALIGNED *PUWSTR_C;
|
|
71
|
+
#else
|
|
72
|
+
typedef WCHAR UNALIGNED *PUWSTR_C;
|
|
73
|
+
#endif
|
|
74
|
+
static __inline PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) {
|
|
75
|
+
if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character);
|
|
76
|
+
return (PUWSTR_C)uaw_wcschr(String,Character);
|
|
77
|
+
}
|
|
78
|
+
static __inline PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) {
|
|
79
|
+
if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character);
|
|
80
|
+
return (PUWSTR_C)uaw_wcsrchr(String,Character);
|
|
81
|
+
}
|
|
82
|
+
#if defined(__cplusplus) && defined(_WConst_Return)
|
|
83
|
+
static __inline PUWSTR ua_wcschr(PUWSTR String,WCHAR Character) {
|
|
84
|
+
if(WSTR_ALIGNED(String)) return wcscpy((PWSTR)Destination,(PCWSTR)Source);
|
|
85
|
+
return uaw_wcscpy(Destination,Source);
|
|
86
|
+
}
|
|
87
|
+
static __inline PUWSTR ua_wcsrchr(PUWSTR String,WCHAR Character) {
|
|
88
|
+
if(WSTR_ALIGNED(String)) return wcsrchr(String,Character);
|
|
89
|
+
return uaw_wcsrchr((PCUWSTR)String,Character);
|
|
90
|
+
}
|
|
91
|
+
#endif
|
|
92
|
+
|
|
93
|
+
static __inline PUWSTR ua_wcscpy(PUWSTR Destination,PCUWSTR Source) {
|
|
94
|
+
if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return wcscpy((PWSTR)Destination,(PCWSTR)Source);
|
|
95
|
+
return uaw_wcscpy(Destination,Source);
|
|
96
|
+
}
|
|
97
|
+
static __inline size_t ua_wcslen(PCUWSTR String) {
|
|
98
|
+
if(WSTR_ALIGNED(String)) return wcslen((PCWSTR)String);
|
|
99
|
+
return uaw_wcslen(String);
|
|
100
|
+
}
|
|
101
|
+
#endif
|
|
102
|
+
|
|
103
|
+
static __inline int ua_wcsicmp(LPCUWSTR String1,LPCUWSTR String2) {
|
|
104
|
+
if(WSTR_ALIGNED(String1) && WSTR_ALIGNED(String2)) return _wcsicmp((LPCWSTR)String1,(LPCWSTR)String2);
|
|
105
|
+
return uaw_wcsicmp(String1,String2);
|
|
106
|
+
}
|
|
107
|
+
#endif
|
|
108
|
+
|
|
109
|
+
#ifndef __UA_WCSLEN
|
|
110
|
+
#define __UA_WCSLEN ua_wcslen
|
|
111
|
+
#endif
|
|
112
|
+
|
|
113
|
+
#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
|
|
114
|
+
#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s)
|
|
115
|
+
|
|
116
|
+
#ifdef I_X86_
|
|
117
|
+
#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s))
|
|
118
|
+
#else
|
|
119
|
+
#define WSTR_ALIGNED_STACK_COPY(d,s) { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; }
|
|
120
|
+
#endif
|
|
121
|
+
|
|
122
|
+
#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s))
|
|
123
|
+
|
|
124
|
+
#ifndef I_X86_
|
|
125
|
+
#define __UA_STRUC_ALIGNED(t,s) (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)
|
|
126
|
+
#define STRUC_ALIGNED_STACK_COPY(t,s) __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))
|
|
127
|
+
#else
|
|
128
|
+
#define STRUC_ALIGNED_STACK_COPY(t,s) ((CONST t *)(s))
|
|
129
|
+
#endif
|
|
130
|
+
|
|
131
|
+
#ifdef UNICODE
|
|
132
|
+
#define TSTR_ALIGNED_STACK_COPY(d,s) WSTR_ALIGNED_STACK_COPY(d,s)
|
|
133
|
+
#define TSTR_ALIGNED(x) WSTR_ALIGNED(x)
|
|
134
|
+
#define ua_CharUpper ua_CharUpperW
|
|
135
|
+
#define ua_lstrcmp ua_lstrcmpW
|
|
136
|
+
#define ua_lstrcmpi ua_lstrcmpiW
|
|
137
|
+
#define ua_lstrlen ua_lstrlenW
|
|
138
|
+
#define ua_tcscpy ua_wcscpy
|
|
139
|
+
#else
|
|
140
|
+
#define TSTR_ALIGNED_STACK_COPY(d,s) ASTR_ALIGNED_STACK_COPY(d,s)
|
|
141
|
+
#define TSTR_ALIGNED(x) TRUE
|
|
142
|
+
#define ua_CharUpper CharUpperA
|
|
143
|
+
#define ua_lstrcmp lstrcmpA
|
|
144
|
+
#define ua_lstrcmpi lstrcmpiA
|
|
145
|
+
#define ua_lstrlen lstrlenA
|
|
146
|
+
#define ua_tcscpy strcpy
|
|
147
|
+
#endif
|
|
148
|
+
|
|
149
|
+
#ifdef __cplusplus
|
|
150
|
+
}
|
|
151
|
+
#endif
|
|
152
|
+
|
|
153
|
+
#include <sec_api/stralign_s.h>
|
|
154
|
+
#endif
|
|
@@ -0,0 +1,79 @@
|
|
|
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 __TVOUT__
|
|
7
|
+
#define __TVOUT__
|
|
8
|
+
|
|
9
|
+
#include <guiddef.h>
|
|
10
|
+
|
|
11
|
+
typedef struct _VIDEOPARAMETERS {
|
|
12
|
+
GUID Guid;
|
|
13
|
+
ULONG dwOffset;
|
|
14
|
+
ULONG dwCommand;
|
|
15
|
+
ULONG dwFlags;
|
|
16
|
+
ULONG dwMode;
|
|
17
|
+
ULONG dwTVStandard;
|
|
18
|
+
ULONG dwAvailableModes;
|
|
19
|
+
ULONG dwAvailableTVStandard;
|
|
20
|
+
ULONG dwFlickerFilter;
|
|
21
|
+
ULONG dwOverScanX;
|
|
22
|
+
ULONG dwOverScanY;
|
|
23
|
+
ULONG dwMaxUnscaledX;
|
|
24
|
+
ULONG dwMaxUnscaledY;
|
|
25
|
+
ULONG dwPositionX;
|
|
26
|
+
ULONG dwPositionY;
|
|
27
|
+
ULONG dwBrightness;
|
|
28
|
+
ULONG dwContrast;
|
|
29
|
+
ULONG dwCPType;
|
|
30
|
+
ULONG dwCPCommand;
|
|
31
|
+
ULONG dwCPStandard;
|
|
32
|
+
ULONG dwCPKey;
|
|
33
|
+
ULONG bCP_APSTriggerBits;
|
|
34
|
+
UCHAR bOEMCopyProtection[256];
|
|
35
|
+
} VIDEOPARAMETERS,*PVIDEOPARAMETERS,*LPVIDEOPARAMETERS;
|
|
36
|
+
|
|
37
|
+
#define VP_COMMAND_GET 0x0001
|
|
38
|
+
#define VP_COMMAND_SET 0x0002
|
|
39
|
+
|
|
40
|
+
#define VP_FLAGS_TV_MODE 0x0001
|
|
41
|
+
#define VP_FLAGS_TV_STANDARD 0x0002
|
|
42
|
+
#define VP_FLAGS_FLICKER 0x0004
|
|
43
|
+
#define VP_FLAGS_OVERSCAN 0x0008
|
|
44
|
+
#define VP_FLAGS_MAX_UNSCALED 0x0010
|
|
45
|
+
#define VP_FLAGS_POSITION 0x0020
|
|
46
|
+
#define VP_FLAGS_BRIGHTNESS 0x0040
|
|
47
|
+
#define VP_FLAGS_CONTRAST 0x0080
|
|
48
|
+
#define VP_FLAGS_COPYPROTECT 0x0100
|
|
49
|
+
|
|
50
|
+
#define VP_MODE_WIN_GRAPHICS 0x0001
|
|
51
|
+
#define VP_MODE_TV_PLAYBACK 0x0002
|
|
52
|
+
|
|
53
|
+
#define VP_TV_STANDARD_NTSC_M 0x0001
|
|
54
|
+
#define VP_TV_STANDARD_NTSC_M_J 0x0002
|
|
55
|
+
#define VP_TV_STANDARD_PAL_B 0x0004
|
|
56
|
+
#define VP_TV_STANDARD_PAL_D 0x0008
|
|
57
|
+
#define VP_TV_STANDARD_PAL_H 0x0010
|
|
58
|
+
#define VP_TV_STANDARD_PAL_I 0x0020
|
|
59
|
+
#define VP_TV_STANDARD_PAL_M 0x0040
|
|
60
|
+
#define VP_TV_STANDARD_PAL_N 0x0080
|
|
61
|
+
#define VP_TV_STANDARD_SECAM_B 0x0100
|
|
62
|
+
#define VP_TV_STANDARD_SECAM_D 0x0200
|
|
63
|
+
#define VP_TV_STANDARD_SECAM_G 0x0400
|
|
64
|
+
#define VP_TV_STANDARD_SECAM_H 0x0800
|
|
65
|
+
#define VP_TV_STANDARD_SECAM_K 0x1000
|
|
66
|
+
#define VP_TV_STANDARD_SECAM_K1 0x2000
|
|
67
|
+
#define VP_TV_STANDARD_SECAM_L 0x4000
|
|
68
|
+
#define VP_TV_STANDARD_WIN_VGA 0x8000
|
|
69
|
+
#define VP_TV_STANDARD_NTSC_433 0x00010000
|
|
70
|
+
#define VP_TV_STANDARD_PAL_G 0x00020000
|
|
71
|
+
#define VP_TV_STANDARD_PAL_60 0x00040000
|
|
72
|
+
#define VP_TV_STANDARD_SECAM_L1 0x00080000
|
|
73
|
+
|
|
74
|
+
#define VP_CP_TYPE_APS_TRIGGER 0x0001
|
|
75
|
+
#define VP_CP_TYPE_MACROVISION 0x0002
|
|
76
|
+
#define VP_CP_CMD_ACTIVATE 0x0001
|
|
77
|
+
#define VP_CP_CMD_DEACTIVATE 0x0002
|
|
78
|
+
#define VP_CP_CMD_CHANGE 0x0004
|
|
79
|
+
#endif
|