-
Notifications
You must be signed in to change notification settings - Fork 3
/
header_map.txt
203 lines (200 loc) · 6.22 KB
/
header_map.txt
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
%{
#include <stdio.h>
#include "sacio.h"
%}
struct hid { char *name; int type; int id; };
%includes
%ignore-case
%language=ANSI-C
%struct-type
%omit-struct-type
%define lookup-function-name sac_keyword_to_header
%define initializer-suffix ,-1,-1
%%
delta, SAC_FLOAT_TYPE, SAC_DELTA
depmin, SAC_FLOAT_TYPE, SAC_DEPMIN
depmax, SAC_FLOAT_TYPE, SAC_DEPMAX
scale, SAC_FLOAT_TYPE, SAC_SCALE
odelta, SAC_FLOAT_TYPE, SAC_ODELTA
b, SAC_FLOAT_TYPE, SAC_B
e, SAC_FLOAT_TYPE, SAC_E
o, SAC_FLOAT_TYPE, SAC_O
a, SAC_FLOAT_TYPE, SAC_A
fmt, SAC_FLOAT_TYPE, SAC_FMT
t0, SAC_FLOAT_TYPE, SAC_T0
t1, SAC_FLOAT_TYPE, SAC_T1
t2, SAC_FLOAT_TYPE, SAC_T2
t3, SAC_FLOAT_TYPE, SAC_T3
t4, SAC_FLOAT_TYPE, SAC_T4
t5, SAC_FLOAT_TYPE, SAC_T5
t6, SAC_FLOAT_TYPE, SAC_T6
t7, SAC_FLOAT_TYPE, SAC_T7
t8, SAC_FLOAT_TYPE, SAC_T8
t9, SAC_FLOAT_TYPE, SAC_T9
f, SAC_FLOAT_TYPE, SAC_F
resp0, SAC_FLOAT_TYPE, SAC_RESP0
resp1, SAC_FLOAT_TYPE, SAC_RESP1
resp2, SAC_FLOAT_TYPE, SAC_RESP2
resp3, SAC_FLOAT_TYPE, SAC_RESP3
resp4, SAC_FLOAT_TYPE, SAC_RESP4
resp5, SAC_FLOAT_TYPE, SAC_RESP5
resp6, SAC_FLOAT_TYPE, SAC_RESP6
resp7, SAC_FLOAT_TYPE, SAC_RESP7
resp8, SAC_FLOAT_TYPE, SAC_RESP8
resp9, SAC_FLOAT_TYPE, SAC_RESP9
stla, SAC_FLOAT_TYPE, SAC_STLA
stlo, SAC_FLOAT_TYPE, SAC_STLO
stel, SAC_FLOAT_TYPE, SAC_STEL
stdp, SAC_FLOAT_TYPE, SAC_STDP
evla, SAC_FLOAT_TYPE, SAC_EVLA
evlo, SAC_FLOAT_TYPE, SAC_EVLO
evel, SAC_FLOAT_TYPE, SAC_EVEL
evdp, SAC_FLOAT_TYPE, SAC_EVDP
mag, SAC_FLOAT_TYPE, SAC_MAG
user0, SAC_FLOAT_TYPE, SAC_USER0
user1, SAC_FLOAT_TYPE, SAC_USER1
user2, SAC_FLOAT_TYPE, SAC_USER2
user3, SAC_FLOAT_TYPE, SAC_USER3
user4, SAC_FLOAT_TYPE, SAC_USER4
user5, SAC_FLOAT_TYPE, SAC_USER5
user6, SAC_FLOAT_TYPE, SAC_USER6
user7, SAC_FLOAT_TYPE, SAC_USER7
user8, SAC_FLOAT_TYPE, SAC_USER8
user9, SAC_FLOAT_TYPE, SAC_USER9
dist, SAC_FLOAT_TYPE, SAC_DIST
az, SAC_FLOAT_TYPE, SAC_AZ
baz, SAC_FLOAT_TYPE, SAC_BAZ
gcarc, SAC_FLOAT_TYPE, SAC_GCARC
sb, SAC_FLOAT_TYPE, SAC_SB
sdelta, SAC_FLOAT_TYPE, SAC_SDELTA
depmen, SAC_FLOAT_TYPE, SAC_DEPMEN
cmpaz, SAC_FLOAT_TYPE, SAC_CMPAZ
cmpinc, SAC_FLOAT_TYPE, SAC_CMPINC
xminimum, SAC_FLOAT_TYPE, SAC_XMIN
xmaximum, SAC_FLOAT_TYPE, SAC_XMAX
yminimum, SAC_FLOAT_TYPE, SAC_YMIN
ymaximum, SAC_FLOAT_TYPE, SAC_YMAX
adjtm, SAC_FLOAT_TYPE, SAC_UN64
fhdr65, SAC_FLOAT_TYPE, SAC_UN65
fhdr66, SAC_FLOAT_TYPE, SAC_UN66
fhdr67, SAC_FLOAT_TYPE, SAC_UN67
fhdr68, SAC_FLOAT_TYPE, SAC_UN68
fhdr69, SAC_FLOAT_TYPE, SAC_UN69
fhdr70, SAC_FLOAT_TYPE, SAC_UN70
unused6, SAC_FLOAT_TYPE, SAC_UN64
unused7, SAC_FLOAT_TYPE, SAC_UN65
unused8, SAC_FLOAT_TYPE, SAC_UN66
unused9, SAC_FLOAT_TYPE, SAC_UN67
unused10, SAC_FLOAT_TYPE, SAC_UN68
unused11, SAC_FLOAT_TYPE, SAC_UN69
unused12, SAC_FLOAT_TYPE, SAC_UN70
nzyear, SAC_INT_TYPE, SAC_YEAR
nzjday, SAC_INT_TYPE, SAC_DAY
nzhour, SAC_INT_TYPE, SAC_HOUR
nzmin, SAC_INT_TYPE, SAC_MIN
nzsec, SAC_INT_TYPE, SAC_SEC
nzmsec, SAC_INT_TYPE, SAC_MSEC
nvhdr, SAC_INT_TYPE, SAC_HDR
norid, SAC_INT_TYPE, SAC_ORID
nevid, SAC_INT_TYPE, SAC_EVID
npts, SAC_INT_TYPE, SAC_NPTS
nsnpts, SAC_INT_TYPE, SAC_NSNPTS
nwfid, SAC_INT_TYPE, SAC_WFID
nxsize, SAC_INT_TYPE, SAC_NX
nysize, SAC_INT_TYPE, SAC_NY
xsize, SAC_INT_TYPE, SAC_NX
ysize, SAC_INT_TYPE, SAC_NY
nhdr15, SAC_INT_TYPE, SAC_UN85
unused15, SAC_INT_TYPE, SAC_UN85
iftype, SAC_ENUM_TYPE, SAC_FILE_TYPE
idep, SAC_ENUM_TYPE, SAC_DEP_TYPE
iztype, SAC_ENUM_TYPE, SAC_ZERO_TIME
ihdr4, SAC_ENUM_TYPE, SAC_UN89
unused16, SAC_ENUM_TYPE, SAC_UN89
iinst, SAC_ENUM_TYPE, SAC_INST_TYPE
istreg, SAC_ENUM_TYPE, SAC_STREG
ievreg, SAC_ENUM_TYPE, SAC_EVREG
ievtyp, SAC_ENUM_TYPE, SAC_EVENT_TYPE
iqual, SAC_ENUM_TYPE, SAC_QUAL
isynth, SAC_ENUM_TYPE, SAC_SYNTH
imagtyp, SAC_ENUM_TYPE, SAC_MAG_TYPE
imagsrc, SAC_ENUM_TYPE, SAC_MAG_SRC
ibody, SAC_ENUM_TYPE, SAC_BODY_TYPE
ihdr14, SAC_ENUM_TYPE, SAC_UN99
ihdr15, SAC_ENUM_TYPE, SAC_UN100
ihdr16, SAC_ENUM_TYPE, SAC_UN101
ihdr17, SAC_ENUM_TYPE, SAC_UN102
ihdr18, SAC_ENUM_TYPE, SAC_UN103
ihdr19, SAC_ENUM_TYPE, SAC_UN104
ihdr20, SAC_ENUM_TYPE, SAC_UN105
unused20, SAC_ENUM_TYPE, SAC_UN99
unused21, SAC_ENUM_TYPE, SAC_UN100
unused22, SAC_ENUM_TYPE, SAC_UN101
unused23, SAC_ENUM_TYPE, SAC_UN102
unused24, SAC_ENUM_TYPE, SAC_UN103
unused25, SAC_ENUM_TYPE, SAC_UN104
unused26, SAC_ENUM_TYPE, SAC_UN105
leven, SAC_BOOL_TYPE, SAC_EVEN
lpspol, SAC_BOOL_TYPE, SAC_POLARITY
lovrok, SAC_BOOL_TYPE, SAC_OVERWRITE
lcalda, SAC_BOOL_TYPE, SAC_CALC_DIST_AZ
lhdr5, SAC_BOOL_TYPE, SAC_UN110
unused27, SAC_BOOL_TYPE, SAC_UN110
kstnm, SAC_STRING_TYPE, SAC_STA
kevnm, SAC_LONG_STRING_TYPE, SAC_EVENT
kevnmc, SAC_LONG_STRING_TYPE, SAC_EVENT
khole, SAC_STRING_TYPE, SAC_HOLE
ko, SAC_STRING_TYPE, SAC_KO
ka, SAC_STRING_TYPE, SAC_KA
kt0, SAC_STRING_TYPE, SAC_KT0
kt1, SAC_STRING_TYPE, SAC_KT1
kt2, SAC_STRING_TYPE, SAC_KT2
kt3, SAC_STRING_TYPE, SAC_KT3
kt4, SAC_STRING_TYPE, SAC_KT4
kt5, SAC_STRING_TYPE, SAC_KT5
kt6, SAC_STRING_TYPE, SAC_KT6
kt7, SAC_STRING_TYPE, SAC_KT7
kt8, SAC_STRING_TYPE, SAC_KT8
kt9, SAC_STRING_TYPE, SAC_KT9
kf, SAC_STRING_TYPE, SAC_KF
kuser0, SAC_STRING_TYPE, SAC_KUSER0
kuser1, SAC_STRING_TYPE, SAC_KUSER1
kuser2, SAC_STRING_TYPE, SAC_KUSER2
kcmpnm, SAC_STRING_TYPE, SAC_CHA
knetwk, SAC_STRING_TYPE, SAC_NET
kdatrd, SAC_STRING_TYPE, SAC_DATRD
kinst, SAC_STRING_TYPE, SAC_INST
kzdate, SAC_AUX_TYPE, SAC_DATE
kztime, SAC_AUX_TYPE, SAC_TIME
kstcmp, SAC_AUX_TYPE, SAC_STCMP
nzmonth, SAC_AUX_TYPE, SAC_MONTH
nzday, SAC_AUX_TYPE, SAC_MONTH_DAY
reftime, SAC_AUX_TYPE, SAC_DATE_TIME
filename, SAC_AUX_TYPE, SAC_FILENAME
amarker, SAC_AUX_TYPE, SAC_AMARKER
omarker, SAC_AUX_TYPE, SAC_OMARKER
fmarker, SAC_AUX_TYPE, SAC_FMARKER
t0marker, SAC_AUX_TYPE, SAC_T0MARKER
t1marker, SAC_AUX_TYPE, SAC_T1MARKER
t2marker, SAC_AUX_TYPE, SAC_T2MARKER
t3marker, SAC_AUX_TYPE, SAC_T3MARKER
t4marker, SAC_AUX_TYPE, SAC_T4MARKER
t5marker, SAC_AUX_TYPE, SAC_T5MARKER
t6marker, SAC_AUX_TYPE, SAC_T6MARKER
t7marker, SAC_AUX_TYPE, SAC_T7MARKER
t8marker, SAC_AUX_TYPE, SAC_T8MARKER
t9marker, SAC_AUX_TYPE, SAC_T9MARKER
%%
#ifdef __TESTING__
//struct hid { char *name; int type; int id; };
int
main() {
struct hid *h = NULL;
h = sac_keyword_to_header("delta", 5);
printf("%s %d %d\n", h->name, h->type, h->id);
h = sac_keyword_to_header("delt", 4);
if(h) {
printf("%s %d %d\n", h->name, h->type, h->id);
}
}
#endif