-
Notifications
You must be signed in to change notification settings - Fork 1
/
core.yml
120 lines (119 loc) · 4.38 KB
/
core.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
GENERATOR:
PackageName: core
PackageDescription: "Package libdivecomputer-go provides Go bindings for libdivecomputer, by Jef Driesen"
PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
SysIncludes: [
stddef.h
]
Includes: [
"libdivecomputer/parser.h",
"libdivecomputer/device.h",
"libdivecomputer/version.h",
"libdivecomputer/context.h",
"libdivecomputer/descriptor.h"
]
PkgConfigOpts: [libdivecomputer]
Options:
SafeStrings: false
PARSER:
IncludePaths: [
"/usr/include",
"/usr/local/include",
]
SourcesPaths: [
"libdivecomputer/parser.h",
"libdivecomputer/device.h",
"libdivecomputer/iterator.h",
"libdivecomputer/units.h",
"libdivecomputer/version.h",
"libdivecomputer/buffer.h",
"libdivecomputer/context.h",
"libdivecomputer/descriptor.h",
"libdivecomputer/atomics_cobalt.h",
"libdivecomputer/oceanic_veo250.h",
"libdivecomputer/hw_ostc.h",
"libdivecomputer/hw_frog.h",
"libdivecomputer/hw_ostc3.h",
"libdivecomputer/oceanic_atom2.h",
"libdivecomputer/oceanic_vtpro.h",
"libdivecomputer/reefnet_sensus.h",
"libdivecomputer/reefnet_sensuspro.h",
"libdivecomputer/reefnet_sensusultra.h",
"libdivecomputer/suunto_d9.h",
"libdivecomputer/suunto_vyper2.h",
"libdivecomputer/suunto_eon.h"]
TRANSLATOR:
ConstRules:
decl: expand
enum: expand
defines: expand
PtrTips:
function:
- {target: ^dc_version$, tips: [ref]}
# device
- {target: ^dc_device_open$, tips: [sref,ref,ref, 0]}
- {target: ^dc_device_set_cancel$, tips: [ref, 0, sref]}
- {target: ^dc_device_set_events$, tips: [ ref, 0, 0, sref]}
- {target: ^dc_device_set_fingerprint$, tips: [ref, 0, 0]}
- {target: ^dc_device_version$, tips: [ref, 0, 0]}
- {target: ^dc_device_(read|write)$, tips: [ref, 0, 0, 0]}
- {target: ^dc_device_dump$, tips: [ref, ref]}
- {target: ^dc_device_foreach$, tips: [ref, 0, ref]}
- {target: ^dc_device_close$, tips: [ref]}
- {target: ^dc_device_get_type$, tips: [ref]}
# parser
- {target: ^dc_parser_new$, tips: [sref, ref]}
- {target: ^dc_parser_new2$, tips: [sref, ref, ref, 0, 0]}
- {target: ^dc_parser_get_type$, tips: [ref]}
- {target: ^dc_parser_set_data$, tips: [ref, 0, 0]}
- {target: ^dc_parser_get_datetime$, tips: [ref, ref]}
- {target: ^dc_parser_get_field$, tips: [ref, 0, 0, ref]}
- {target: ^dc_parser_samples_foreach$, tips: [ref, 0, ref]}
- {target: ^dc_parser_destroy$, tips: [ref]}
# context
- {target: ^dc_context_new$, tips: [sref]}
- {target: ^dc_context_free$, tips: [ref]}
- {target: ^dc_context_set_loglevel$, tips: [ref, 0]}
- {target: ^dc_context_set_logfunc$, tips: [ref, 0, ref]}
# descriptor
- {target: ^dc_descriptor_iterator$, tips: [sref]}
- {target: ^dc_descriptor_free$, tips: [ref]}
- {target: ^dc_descriptor_get, tips: [ref]}
# iterator
- {target: ^dc_iterator_next$, tips: [ref, ref]}
- {target: ^dc_iterator_free$, tips: [ref]}
# datetime
- {target: ^dc_datetime_localtime$, tips: [ref, 0]}
- {target: ^dc_datetime_gmtime$, tips: [ref, 0]}
- {target: ^dc_datetime_mktime$, tips: [ref]}
# buffer
- {target: ^dc_buffer_(free|clear)$, tips: [ref]}
- {target: ^dc_buffer_(reserve|resize)$, tips: [ref, size]}
- {target: ^dc_buffer_(append|prepend)$, tips: [ref, arr, size]}
- {target: ^dc_buffer_slice$, tips: [ref, size, size]}
- {target: ^dc_buffer_get_, tips: [ref]}
any:
- {target: ^dc_logfunc_t$, tips: [ref, 0, 0, 0, 0, 0, 0]}
- {target: ^dc_event_callback_t$, tips: [ref, 0, 0, 0]}
Rules:
global:
- {action: accept, from: "^dc_"}
function:
- {action: ignore, from: "^dc_device_version"}
- {action: replace, from: "dc_version", to: version_get}
- {action: replace, from: "^dc_", to: _}
type:
- {action: replace, from: "_t$"}
- {action: replace, from: "^dc_", to: _}
const:
- {action: accept, from: "^DC_"}
#- {action: replace, from: "^DC_EVENT", to: DEV_EVENT}
- {action: replace, from: "^DC_VERSION", to: PKG_VERSION}
- {action: replace, from: "^dc_", to: _}
- {transform: lower}
private:
- {transform: unexport}
post-global:
- {transform: export}
- {load: snakecase}