-
Notifications
You must be signed in to change notification settings - Fork 38
/
definition_type.go
81 lines (68 loc) · 2.28 KB
/
definition_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package program
// DefinitionType - conversion map from C standard library structures to
// c4go structures
var DefinitionType = map[string]string{
// time.h
"time_t": "github.com/Konstantin8105/c4go/noarch.TimeT",
"github.com/Konstantin8105/c4go/noarch.TimeT": "int32",
"__time_t": "int32",
"__suseconds_t": "int32",
"fpos_t": "int32",
// unistd.h
"ssize_t": "github.com/Konstantin8105/c4go/noarch.SsizeT",
"github.com/Konstantin8105/c4go/noarch.SsizeT": "long int",
// built-in
"bool": "bool",
"char *": "[]byte",
"char": "byte",
"char*": "[]byte",
"double": "float64",
"float": "float32",
"int": "int32",
"long double": "float64",
"long int": "int32",
"long long": "int64",
"long long int": "int64",
"long long unsigned int": "uint64",
"long unsigned int": "uint32",
"long": "int32",
"short": "int16",
"signed char": "int8",
"unsigned char": "uint8",
"unsigned int": "uint32",
"unsigned long long": "uint64",
"unsigned long": "uint32",
"unsigned short": "uint16",
"unsigned short int": "uint16",
"void": "",
"_Bool": "int32",
"size_t": "uint32",
"ptrdiff_t": "github.com/Konstantin8105/c4go/noarch.PtrdiffT",
"github.com/Konstantin8105/c4go/noarch.PtrdiffT": "uint64",
"wchar_t": "github.com/Konstantin8105/c4go/noarch.WcharT",
"github.com/Konstantin8105/c4go/noarch.WcharT": "rune",
// void*
"void*": "interface{}",
"void *": "interface{}",
// null is a special case (it should probably have a less ambiguous name)
// when using the NULL macro.
"null": "null",
// sys/stat.h
"mode_t": "uint16",
"__mode_t": "uint16",
"FILE": "github.com/Konstantin8105/c4go/noarch.File",
// termios.h
"tcflag_t": "uint32",
"cc_t": "uint8",
// sys/resource.h
"__rusage_who": "int",
"__rusage_who_t": "int",
// time.h
"clock_t": "github.com/Konstantin8105/c4go/noarch.ClockT",
"github.com/Konstantin8105/c4go/noarch.ClockT": "int64",
// signal.h
"sig_atomic_t": "int64",
// sys/types.h
"off_t": "int64",
"__off_t": "int64",
}