New upstream version 4.0.11
Christoph Berg
4 years ago
0 | 2019-01-19 David Freese <w1hkj@bellsouth.net> | |
1 | ||
2 | cbe2960: alpha | |
3 | a01346b: flmsg-dir | |
4 | 3f15f0c: 64 bit compiler warnings | |
5 | c8ed0a2: Double click | |
6 | cdfdadc: checked attribute | |
0 | ||
1 | ||
2 | =Version 4.0.11= | |
3 | ||
4 | 2019-07-17 David Freese <w1hkj@bellsouth.net> | |
5 | ||
6 | 7f8eb19b: Time table | |
7 | db871d5c: fltk-params | |
8 | 1d5cdd2e: fldigi online | |
9 | ce1058d2: Documentation | |
10 | ||
11 | ||
12 | =Version 4.0.10= | |
13 | ||
14 | fe9ec31f: ARC forms | |
15 | ||
16 | ||
17 | =Version 4.0.9= | |
18 | ||
19 | ||
20 | 2019-06-16 Davide Gerhard <w1hkj@bellsouth.net> | |
21 | ||
22 | c313e6ac: timeops | |
23 | ||
24 | 2019-06-16 David Freese <w1hkj@bellsouth.net> | |
25 | ||
26 | 9dec5a97: MacOS high-DPI | |
27 | bb4a0187: ICS 309 | |
28 | 864eef37: xmlrpc/arq | |
29 | 74720d1d: Correct gcc 9 pedantic warnings | |
30 | ||
31 | ||
32 | =Version 4.0.8= | |
33 | ||
34 | 34f46d48: OS X STRINGS_H | |
35 | d09fbd25: flmsg-dir | |
36 | 3f15f0c7: 64 bit compiler warnings | |
37 | c8ed0a28: Double click | |
38 | cdfdadce: checked attribute | |
7 | 39 | |
8 | 40 | |
9 | 41 | =Version 4.0.7= |
10 | 42 | |
11 | 3020807: custom fields | |
12 | a956837: RRI radiogram | |
13 | f67c531: CSV view seg fault | |
14 | 6a08ced: Autosend seg fault | |
15 | 90b2751: Thumb drive | |
43 | 30208078: custom fields | |
44 | a9568377: RRI radiogram | |
45 | f67c531e: CSV view seg fault | |
46 | 6a08ced2: Autosend seg fault | |
47 | 90b27518: Thumb drive | |
16 | 48 | |
17 | 49 | |
18 | 50 | =Version 4.0.6= |
19 | 51 | |
20 | 7b59b50: Qforms | |
21 | 92b7676: documentation | |
22 | a59e640: ARQ event log | |
23 | b91fbe6: Internationalization | |
24 | a6b3e53: mode list | |
25 | 23111e9: OS X build script | |
26 | 028b0ca: CLANG compile failure | |
52 | 7b59b500: Qforms | |
53 | 92b76765: documentation | |
54 | a59e6406: ARQ event log | |
55 | b91fbe6e: Internationalization | |
56 | a6b3e533: mode list | |
57 | 23111e97: OS X build script | |
58 | 028b0ca1: CLANG compile failure | |
27 | 59 | |
28 | 60 | |
29 | 61 | =Version 4.0.5= |
30 | 62 | |
31 | da5ff9d: dnd text string | |
32 | ecb638d: Filename | |
63 | da5ff9d2: dnd text string | |
64 | ecb638d4: Filename | |
33 | 65 | |
34 | 66 | |
35 | 67 | =Version 4.0.4= |
36 | 68 | |
37 | e5ab5c7: Documentation update | |
38 | 5723f2e: File Transfer | |
39 | 3350d35: unlikely define for OS X G4 build | |
40 | 1a5b433: Calendar widget | |
41 | 99633fe: Min Mode List | |
42 | 7cf0f84: win mingw | |
69 | e5ab5c7f: Documentation update | |
70 | 5723f2ee: File Transfer | |
71 | 3350d355: unlikely define for OS X G4 build | |
72 | 1a5b433b: Calendar widget | |
73 | 99633feb: Min Mode List | |
74 | 7cf0f849: win mingw | |
43 | 75 | |
44 | 76 | |
45 | 77 | =Version 4.0.3= |
46 | 78 | |
47 | 92b097b: Radiogram | |
48 | 130c387: flxmlrpc config | |
49 | 2923c8b: INSTALL | |
50 | e22841b: Custom Form - Serial Number | |
79 | 92b097bf: Radiogram | |
80 | 130c387e: flxmlrpc config | |
81 | 2923c8bb: INSTALL | |
82 | e22841bf: Custom Form - Serial Number | |
51 | 83 | |
52 | 84 | |
53 | 85 | =Version 4.0.2= |
54 | 86 | |
55 | baab035: Documentation Update | |
56 | 428e84c: Filename | |
57 | 064b23b: csv import | |
58 | 2601db7: Corrections | |
59 | 2b3d1f5: buildmxe | |
60 | 24d18cc: 64 bit warnings | |
87 | baab0355: Documentation Update | |
88 | 428e84c3: Filename | |
89 | 064b23b1: csv import | |
90 | 2601db7a: Corrections | |
91 | 2b3d1f52: buildmxe | |
92 | 24d18cca: 64 bit warnings | |
61 | 93 | |
62 | 94 | |
63 | 95 | =Version 4.0.1= |
64 | 96 | |
65 | c7dbdaa: Alternate Tyro Dialog | |
66 | 635f985: UI mod for Red Cross usage | |
67 | d954bf4: UI mod documentation | |
97 | c7dbdaa4: Alternate Tyro Dialog | |
98 | 635f9857: UI mod for Red Cross usage | |
99 | d954bf4d: UI mod documentation | |
68 | 100 | |
69 | 101 | |
70 | 102 | =Version 4.0.0= |
71 | 103 | |
72 | fef539e: Xcode8 | |
73 | 2eddb78: CUSTOM autosend | |
104 | fef539e8: Xcode8 | |
105 | 2eddb780: CUSTOM autosend | |
74 | 106 | |
75 | 107 | |
76 | 108 | =Version 3.00.02= |
77 | 109 | |
78 | ad48044: custom form | |
79 | 247b371: ARQ URCALL error | |
110 | ad480446: custom form | |
111 | 247b3715: ARQ URCALL error | |
80 | 112 | |
81 | 113 | 2016-07-10 Kamal Mostafa <kamal@whence.com> |
82 | 114 | |
83 | aa8c9ae: fix XmlRpc tm_mday comparison typo | |
115 | aa8c9aea: fix XmlRpc tm_mday comparison typo | |
84 | 116 | |
85 | 117 | 2016-07-04 Robert Cunnings <nw8l@whitemesa.com> |
86 | 118 | |
87 | c125c9e: MXE build | |
119 | c125c9e7: MXE build | |
88 | 120 | |
89 | 121 | 2016-06-26 David Freese <iam_w1hkj@w1hkj.com> |
90 | 122 | |
91 | 5e3db4e: Navy Mars | |
92 | 2308b77: xmlrpc socket address | |
123 | 5e3db4e3: Navy Mars | |
124 | 2308b77f: xmlrpc socket address | |
93 | 125 | |
94 | 126 | |
95 | 127 | =Version 3.00.01= |
96 | 128 | |
97 | 22cf67b: text.add_tx | |
98 | b4edb15: Repeat CONREQ | |
99 | 2ffa8c7: Timeout action | |
100 | 19e188e: Documentation update | |
129 | 22cf67b4: text.add_tx | |
130 | b4edb15d: Repeat CONREQ | |
131 | 2ffa8c76: Timeout action | |
132 | 19e188e9: Documentation update | |
101 | 133 | |
102 | 134 | |
103 | 135 | =Version 3.00.00= |
104 | 136 | |
105 | fe045e2: License update in COPYING | |
106 | d644540: ARQ direct | |
137 | fe045e2e: License update in COPYING | |
138 | d6445404: ARQ direct | |
107 | 139 | |
108 | 140 | |
109 | 141 | =Version 2.0.17= |
110 | 142 | |
111 | ad09446: Pi 3 EOF | |
143 | ad094462: Pi 3 EOF | |
112 | 144 | |
113 | 145 | |
114 | 146 | =Version 2.0.16= |
115 | 147 | |
116 | 8cfaa24: Date Time Formats | |
117 | 0e24e5c: flxmlrpc m4 | |
118 | f120234: Remove Navy Mars | |
119 | ba4be73: hamlog | |
120 | df8d52b: ics-206 | |
148 | 8cfaa240: Date Time Formats | |
149 | 0e24e5c3: flxmlrpc m4 | |
150 | f120234b: Remove Navy Mars | |
151 | ba4be738: hamlog | |
152 | df8d52b0: ics-206 | |
121 | 153 | |
122 | 154 | |
123 | 155 | =Version 2.0.15= |
124 | 156 | |
125 | 766a402: FLMSG_dir | |
157 | 766a4024: FLMSG_dir | |
126 | 158 | |
127 | 159 | |
128 | 160 | =Version 2.0.14= |
129 | 161 | |
130 | 5c959a0: flmsg-dir | |
162 | 5c959a03: flmsg-dir | |
131 | 163 | |
132 | 164 | |
133 | 165 | =Version 2.0.13= |
134 | 166 | |
135 | c7f6086: ICS 213 update for NTS | |
136 | e9114e2: FLMSG_BROWSER | |
137 | 9c0c16b: MINGW update | |
138 | 9f682eb: mg var length | |
139 | 827ed35: custom image field | |
140 | 61ea398: Custom parse bug fix | |
141 | 8dfa5d4: CUSTOM auto open | |
167 | c7f6086a: ICS 213 update for NTS | |
168 | e9114e22: FLMSG_BROWSER | |
169 | 9c0c16bb: MINGW update | |
170 | 9f682eb9: mg var length | |
171 | 827ed358: custom image field | |
172 | 61ea398a: Custom parse bug fix | |
173 | 8dfa5d45: CUSTOM auto open | |
142 | 174 | |
143 | 175 | |
144 | 176 | =Version 2.0.12= |
145 | 177 | |
146 | 5d632d5: html5 fix | |
178 | 5d632d52: html5 fix | |
147 | 179 | |
148 | 180 | |
149 | 181 | =Version 2.0.11= |
150 | 182 | |
151 | a47c6a5: OS X timeout | |
152 | 998033e: ICS213 template | |
153 | aa274ad: html5 custom controls | |
183 | a47c6a5b: OS X timeout | |
184 | 998033ef: ICS213 template | |
185 | aa274ad1: html5 custom controls | |
154 | 186 | |
155 | 187 | 2015-06-08 Kamal Mostafa <kamal@whence.com> |
156 | 188 | |
157 | 82e849d: BUILD_{DATE,USER,HOST} | |
189 | 82e849d4: BUILD_{DATE,USER,HOST} | |
158 | 190 | |
159 | 191 | 2015-06-07 David Freese <iam_w1hkj@w1hkj.com> |
160 | 192 | |
161 | 9eeac40: ARRL Radiogram update | |
193 | 9eeac40a: ARRL Radiogram update | |
162 | 194 | |
163 | 195 | |
164 | 196 | =Version 2.0.10= |
165 | 197 | |
166 | 67088e1: mongoose warnings | |
167 | 0faad47: flxmlrpc | |
168 | b7108b6: FSF address | |
198 | 67088e19: mongoose warnings | |
199 | 0faad47a: flxmlrpc | |
200 | b7108b65: FSF address | |
169 | 201 | |
170 | 202 | |
171 | 203 | =Version 2.0.9= |
172 | 204 | |
173 | 1c105a4: ICS 213 | |
205 | 1c105a45: ICS 213 | |
174 | 206 | |
175 | 207 | |
176 | 208 | =Version 2.0.8= |
177 | 209 | |
178 | ba29425: Web Server Port | |
210 | ba29425f: Web Server Port | |
179 | 211 | |
180 | 212 | |
181 | 213 | =Version 2.0.7= |
182 | 214 | |
183 | 8ac241b: build scripts | |
184 | 8673835: fileselect | |
215 | 8ac241b8: build scripts | |
216 | 8673835c: fileselect | |
185 | 217 | |
186 | 218 | |
187 | 219 | =Version 2.0.6= |
188 | 220 | |
189 | 1b24463: fltk 1.3.3 | |
190 | bc38fd2: custom form | |
191 | 774c731: FLDIGI IO Mode Check | |
221 | 1b244632: fltk 1.3.3 | |
222 | bc38fd2d: custom form | |
223 | 774c7314: FLDIGI IO Mode Check | |
192 | 224 | |
193 | 225 | |
194 | 226 | =Version 2.0.5= |
196 | 228 | |
197 | 229 | 2014-09-07 w1hkj.mint <w1hkj.mint@bellsouth.net> |
198 | 230 | |
199 | 40d6d2d: build fix | |
231 | 40d6d2d0: build fix | |
200 | 232 | |
201 | 233 | 2014-07-11 David Freese <w1hkj@w1hkj.com> |
202 | 234 | |
203 | a2e6406: User manual update | |
235 | a2e64060: User manual update | |
204 | 236 | |
205 | 237 | |
206 | 238 | =Version 2.0.4= |
208 | 240 | |
209 | 241 | 2014-06-26 Robert Stiles <kk5vd@yahoo.com> |
210 | 242 | |
211 | 17da998: Doxygen Inclusion | |
243 | 17da9986: Doxygen Inclusion | |
212 | 244 | |
213 | 245 | 2014-04-25 David Freese <w1hkj@w1hkj.com> |
214 | 246 | |
215 | cea378f: eol-double-quote-escape | |
216 | 7555118: TextArea bug fix | |
217 | ba9d924: NBEMS app dir | |
247 | cea378f6: eol-double-quote-escape | |
248 | 75551185: TextArea bug fix | |
249 | ba9d924b: NBEMS app dir | |
218 | 250 | |
219 | 251 | |
220 | 252 | =Version 2.0.3= |
221 | 253 | |
222 | 2aafd27: Custom select | |
254 | 2aafd272: Custom select | |
223 | 255 | |
224 | 256 | |
225 | 257 | =Version 2.0.2= |
226 | 258 | |
227 | 71c8a20: ICS205 template | |
228 | f03328d: Config/Ports | |
229 | f20592c: Max size of textarea | |
230 | a5db8fe: Case independent tags | |
231 | 3772616: Custom html transfer | |
259 | 71c8a20e: ICS205 template | |
260 | f03328d6: Config/Ports | |
261 | f20592c2: Max size of textarea | |
262 | a5db8fe7: Case independent tags | |
263 | 37726168: Custom html transfer | |
232 | 264 | |
233 | 265 | |
234 | 266 | =Version 2.0.1= |
235 | 267 | |
236 | 16671f6: Radiogram/IARU choices | |
237 | 76bbf35: Custom Forms | |
268 | 16671f65: Radiogram/IARU choices | |
269 | 76bbf350: Custom Forms | |
238 | 270 | |
239 | 271 | |
240 | 272 | =Version 2.0= |
241 | 273 | |
242 | c1c2ca3: Radiogram | |
243 | 0c420d1: CUSTOM Editable | |
244 | 5501f7e: Mongoose | |
274 | c1c2ca34: Radiogram | |
275 | 0c420d18: CUSTOM Editable | |
276 | 5501f7eb: Mongoose | |
245 | 277 | |
246 | 278 | |
247 | 279 | =Version 1.1.34= |
248 | 280 | |
249 | 670249f: HICS203 | |
250 | 54b5c0b: Custom forms | |
251 | bb1a85a: CAP cosmetics | |
252 | 5f1046a: Deprecate Fl_Choice | |
253 | c6af6bd: Main menu | |
254 | 9e76837: UI modification | |
255 | 05474ef: ComboBox/ListBox | |
256 | 57dcb9a: Force compression | |
257 | b525348: Transfer time | |
258 | 37cebca: License Declaration | |
259 | 3dfa12a: CAP | |
260 | 48525f7: MARS ineei report | |
281 | 670249f5: HICS203 | |
282 | 54b5c0ba: Custom forms | |
283 | bb1a85a1: CAP cosmetics | |
284 | 5f1046a3: Deprecate Fl_Choice | |
285 | c6af6bdc: Main menu | |
286 | 9e768371: UI modification | |
287 | 05474ef0: ComboBox/ListBox | |
288 | 57dcb9ad: Force compression | |
289 | b525348e: Transfer time | |
290 | 37cebcaa: License Declaration | |
291 | 3dfa12ab: CAP | |
292 | 48525f7a: MARS ineei report | |
261 | 293 | |
262 | 294 | 2014-01-28 Robert Stiles <kk5vd@yahoo.com> |
263 | 295 | |
264 | 813b0ee: xml_io bug fix | |
296 | 813b0ee5: xml_io bug fix | |
265 | 297 | |
266 | 298 | 2014-01-28 David Freese <w1hkj@w1hkj.com> |
267 | 299 | |
268 | 8201deb: ICS 309 csv export | |
269 | ca7a764: UTC date retrofit | |
270 | ca6048b: ICS-309 bug fix | |
271 | 7b76cbd: Mars Navy format | |
272 | bd0c89a: wx reports | |
273 | 0a7d2e9: Thumb drive | |
274 | 9a390bf: MFSK 64L, 128L | |
300 | 8201deb8: ICS 309 csv export | |
301 | ca7a7644: UTC date retrofit | |
302 | ca6048bd: ICS-309 bug fix | |
303 | 7b76cbde: Mars Navy format | |
304 | bd0c89a8: wx reports | |
305 | 0a7d2e98: Thumb drive | |
306 | 9a390bf9: MFSK 64L, 128L | |
275 | 307 | |
276 | 308 | |
277 | 309 | =Version 1.1.33= |
278 | 310 | |
279 | 9c7e92f: ICS309 template | |
280 | 004c9ee: UTF-8 | |
281 | 3a1c304: MXE build | |
311 | 9c7e92f7: ICS309 template | |
312 | 004c9eee: UTF-8 | |
313 | 3a1c3042: MXE build | |
282 | 314 | |
283 | 315 | |
284 | 316 | =Version 1.1.32= |
285 | 317 | |
286 | 48b0a14: ICS 205 update | |
318 | 48b0a14d: ICS 205 update | |
287 | 319 | |
288 | 320 | |
289 | 321 | =Version 1.1.31= |
290 | 322 | |
291 | c0d8584: Plaintext title | |
292 | 26de24c: Binary build | |
293 | 817f111: String_c | |
294 | e524e39: MT63 Mode changes | |
295 | a23e09c: XML status queries | |
296 | ce83233: Args testing | |
297 | 96e3925: CRLF boogy man | |
298 | 89ff39a: ICS205 update | |
323 | c0d85840: Plaintext title | |
324 | 26de24c5: Binary build | |
325 | 817f1119: String_c | |
326 | e524e39b: MT63 Mode changes | |
327 | a23e09cc: XML status queries | |
328 | ce832333: Args testing | |
329 | 96e39255: CRLF boogy man | |
330 | 89ff39ad: ICS205 update | |
299 | 331 | |
300 | 332 | |
301 | 333 | =Version 1.1.30= |
302 | 334 | |
303 | 2338416: Argument parsing | |
304 | 2a21108: ICS 309 | |
305 | 021df66: Control cursor | |
306 | 67f79b2: THOR mode update | |
307 | 800415a: MODES | |
335 | 23384165: Argument parsing | |
336 | 2a211086: ICS 309 | |
337 | 021df668: Control cursor | |
338 | 67f79b28: THOR mode update | |
339 | 800415a0: MODES | |
308 | 340 | |
309 | 341 | |
310 | 342 | =Version 1.1.29= |
312 | 344 | |
313 | 345 | 2012-11-10 Dave Freese (none) <dave@compaq> |
314 | 346 | |
315 | 971b968: Socket interface | |
347 | 971b9686: Socket interface | |
316 | 348 | |
317 | 349 | 2012-11-03 David Freese <w1hkj@w1hkj.com> |
318 | 350 | |
319 | 1f04a18: HICS-213 | |
320 | db9b2ab: IN/EEI report | |
351 | 1f04a18e: HICS-213 | |
352 | db9b2ab9: IN/EEI report | |
321 | 353 | |
322 | 354 | |
323 | 355 | =Version 1.1.28= |
324 | 356 | |
325 | 0299cbd: MS thumbdrive | |
326 | 7ac87a6: Mars IN/IEE | |
357 | 0299cbdd: MS thumbdrive | |
358 | 7ac87a67: Mars IN/IEE | |
327 | 359 | |
328 | 360 | |
329 | 361 | =Version 1.1.27= |
330 | 362 | |
331 | 7863b9b: CSV Import | |
332 | 67877bd: Modes Combo Init | |
333 | c2d47fb: IARU bug fix | |
334 | 400f9ef: Templates | |
335 | 4dfe37f: OS X Lion bug fix | |
336 | 3004815: Modes table | |
337 | 99c90f6: LZMA compression | |
338 | 82320e2: Estimate button | |
363 | 7863b9b0: CSV Import | |
364 | 67877bde: Modes Combo Init | |
365 | c2d47fb3: IARU bug fix | |
366 | 400f9ef1: Templates | |
367 | 4dfe37f4: OS X Lion bug fix | |
368 | 3004815c: Modes table | |
369 | 99c90f62: LZMA compression | |
370 | 82320e28: Estimate button | |
339 | 371 | |
340 | 372 | |
341 | 373 | =Version 1.1.26= |
342 | 374 | |
343 | eb563ba: MT63 size estimate | |
344 | 9d09a9e: EXP Mode Table | |
375 | eb563ba0: MT63 size estimate | |
376 | 9d09a9ec: EXP Mode Table | |
345 | 377 | |
346 | 378 | |
347 | 379 | =Version 1.1.25= |
348 | 380 | |
349 | 855bc4e: Linked Modes Table | |
350 | a8f8056: Wrap corrections | |
381 | 855bc4e2: Linked Modes Table | |
382 | a8f80565: Wrap corrections | |
351 | 383 | |
352 | 384 | |
353 | 385 | =Version 1.1.24= |
354 | 386 | |
355 | 059f3ea: Base 128/256 | |
356 | d0cd678: File transfer | |
357 | c44002c: waiting for check | |
358 | 0c6a1b1: Xmlrpc interface | |
359 | c9d4204: Combo box update | |
360 | ae494f2: Socket address/port | |
361 | c9fe25b: MARS edit cursor | |
387 | 059f3ea0: Base 128/256 | |
388 | d0cd678b: File transfer | |
389 | c44002c5: waiting for check | |
390 | 0c6a1b13: Xmlrpc interface | |
391 | c9d4204e: Combo box update | |
392 | ae494f27: Socket address/port | |
393 | c9fe25b5: MARS edit cursor | |
362 | 394 | |
363 | 395 | |
364 | 396 | =Version 1.1.23= |
365 | 397 | |
366 | 4d366b3: CSV table view | |
367 | cc47029: Compression | |
368 | 652ff62: Hurricane report | |
398 | 4d366b30: CSV table view | |
399 | cc470290: Compression | |
400 | 652ff624: Hurricane report | |
369 | 401 | |
370 | 402 | |
371 | 403 | =Version 1.1.22= |
372 | 404 | |
373 | 05e6c32: Socket interface | |
374 | 213fdee: Autosave menu | |
375 | 07a1e5a: Non Standard Radiogram | |
376 | ccecd3e: Autosend test | |
377 | aad7d27: CSV templates | |
378 | a75eba1: Tango pixmaps | |
405 | 05e6c321: Socket interface | |
406 | 213fdeef: Autosave menu | |
407 | 07a1e5a7: Non Standard Radiogram | |
408 | ccecd3eb: Autosend test | |
409 | aad7d274: CSV templates | |
410 | a75eba1b: Tango pixmaps | |
379 | 411 | |
380 | 412 | |
381 | 413 | =Version 1.1.21= |
383 | 415 | |
384 | 416 | 2012-06-30 Kamal Mostafa <kamal@whence.com> |
385 | 417 | |
386 | 6f601bb: Tango icon pixmaps update to version 0.8.90 (public domain) | |
418 | 6f601bb3: Tango icon pixmaps update to version 0.8.90 (public domain) | |
387 | 419 | |
388 | 420 | |
389 | 421 | =Version 1.1.20= |
391 | 423 | |
392 | 424 | 2012-06-16 David Freese <w1hkj@w1hkj.com> |
393 | 425 | |
394 | e12c7b9: Corrupt correction | |
426 | e12c7b95: Corrupt correction | |
395 | 427 | |
396 | 428 | |
397 | 429 | =Version 1.1.19= |
398 | 430 | |
399 | e59025f: Fork header reference | |
400 | f4a3c8c: Corrupt filenames | |
431 | e59025f3: Fork header reference | |
432 | f4a3c8c7: Corrupt filenames | |
401 | 433 | |
402 | 434 | |
403 | 435 | =Version 1.1.18= |
404 | 436 | |
405 | 1771972: OS X --p failure | |
437 | 17719723: OS X --p failure | |
406 | 438 | |
407 | 439 | |
408 | 440 | =Version 1.1.17= |
409 | 441 | |
410 | f5f31d8: Unwrapfile | |
411 | 4c792b6: CRC16 | |
412 | 38dfa8d: Apple file drop | |
413 | cef4a2f: OS X fileselect | |
442 | f5f31d87: Unwrapfile | |
443 | 4c792b6b: CRC16 | |
444 | 38dfa8da: Apple file drop | |
445 | cef4a2fb: OS X fileselect | |
414 | 446 | |
415 | 447 | |
416 | 448 | =Version 1.1.16= |
417 | 449 | |
418 | 66498a8: Command line processing | |
419 | 3f9a0cc: UNCLAS | |
450 | 66498a84: Command line processing | |
451 | 3f9a0ccf: UNCLAS | |
420 | 452 | |
421 | 453 | |
422 | 454 | =Version 1.1.15= |
423 | 455 | |
424 | a3a8ea9: IARU header | |
425 | 21b8eb7: Auto open | |
426 | d6cc867: MARS | |
427 | e365061: Radiogram edits | |
428 | a20e8f9: Text Edit | |
429 | 7e3aeed: Check my_call | |
456 | a3a8ea96: IARU header | |
457 | 21b8eb7f: Auto open | |
458 | d6cc867a: MARS | |
459 | e365061f: Radiogram edits | |
460 | a20e8f97: Text Edit | |
461 | 7e3aeed6: Check my_call | |
430 | 462 | |
431 | 463 | |
432 | 464 | =Version 1.1.14= |
433 | 465 | |
434 | 1a843f5: Widget size corrections | |
435 | ab2e120: FTextView | |
436 | 4eac069: Cast fix | |
437 | ee8f62a: Personal data | |
438 | 69a6934: Control fields | |
439 | 85b18f0: MARS Army msg | |
440 | deaffce: REDX 5739A-B | |
441 | edc03fe: Default folders | |
442 | 3649e03: Red Cross 5739 | |
443 | 997f148: Menu Paradigm | |
444 | 7d592d0: Desktop | |
445 | 709bbb4: Event Log | |
466 | 1a843f56: Widget size corrections | |
467 | ab2e120e: FTextView | |
468 | 4eac069b: Cast fix | |
469 | ee8f62a6: Personal data | |
470 | 69a6934d: Control fields | |
471 | 85b18f0d: MARS Army msg | |
472 | deaffceb: REDX 5739A-B | |
473 | edc03fe8: Default folders | |
474 | 3649e031: Red Cross 5739 | |
475 | 997f1485: Menu Paradigm | |
476 | 7d592d05: Desktop | |
477 | 709bbb46: Event Log | |
446 | 478 | |
447 | 479 | |
448 | 480 | =Version 1.1.13= |
449 | 481 | |
450 | 50865cd: Event log | |
451 | 02230e6: Fl::lock | |
452 | 6482b49: Text Edit revision | |
453 | 6cf85c1: FLTK version | |
454 | 66185d9: Debug revision | |
455 | cd790b5: fltk-1.3 mods | |
482 | 50865cd3: Event log | |
483 | 02230e62: Fl::lock | |
484 | 6482b49c: Text Edit revision | |
485 | 6cf85c16: FLTK version | |
486 | 66185d94: Debug revision | |
487 | cd790b5f: fltk-1.3 mods | |
456 | 488 | |
457 | 489 | |
458 | 490 | =Version 1.1.12= |
459 | 491 | |
460 | 5796660: Escape sequence | |
492 | 5796660c: Escape sequence | |
461 | 493 | |
462 | 494 | |
463 | 495 | =Version 1.1.11= |
464 | 496 | |
465 | b966442: Word wrap | |
466 | 32a9465: flnfc_common location | |
467 | 4f8e907: HICS-213 fix | |
497 | b9664420: Word wrap | |
498 | 32a94650: flnfc_common location | |
499 | 4f8e907a: HICS-213 fix | |
468 | 500 | |
469 | 501 | |
470 | 502 | =Version 1.1.10= |
471 | 503 | |
472 | 76301d5: Html fonts | |
473 | 57c7a40: ARRL radiogram | |
474 | 44d5253: IARU | |
475 | 19f48d1: ICS-213 template | |
476 | 1638f75: ICS206 correction | |
477 | d556b4b: Auto-dir | |
478 | 4ce46ca: HICS | |
479 | 7839a4f: Reorg | |
480 | 3415e1b: Preformatted text | |
481 | ffcd62e: FLMSG default folder | |
504 | 76301d5c: Html fonts | |
505 | 57c7a404: ARRL radiogram | |
506 | 44d52536: IARU | |
507 | 19f48d14: ICS-213 template | |
508 | 1638f750: ICS206 correction | |
509 | d556b4b2: Auto-dir | |
510 | 4ce46ca9: HICS | |
511 | 7839a4f0: Reorg | |
512 | 3415e1b2: Preformatted text | |
513 | ffcd62e1: FLMSG default folder | |
482 | 514 | |
483 | 515 | |
484 | 516 | =Version 1.1.9= |
485 | 517 | |
486 | a137449: Radio text output | |
487 | a018b5b: Save and well | |
518 | a1374499: Radio text output | |
519 | a018b5b1: Save and well | |
488 | 520 | |
489 | 521 | |
490 | 522 | =Version 1.1.8= |
491 | 523 | |
492 | bd5cc51: Unwrap failure | |
493 | 0c93153: Cosmetics | |
524 | bd5cc513: Unwrap failure | |
525 | 0c931532: Cosmetics | |
494 | 526 | |
495 | 527 | |
496 | 528 | =Version 1.1.7= |
497 | 529 | |
498 | 039b59a: MARS TO-FM fields | |
499 | a71886c: Red Cross | |
500 | b758293: Army MARS std msg | |
501 | baa51ca: MARS precedence | |
502 | 23ed763: NAVY MARS msg | |
503 | 1c9a27d: RedCross SnW form | |
504 | f6df72d: ARRL html format | |
505 | e97c134: Date-Time | |
506 | e1d88ff: ARL message | |
507 | 2055167: navy mars | |
508 | 363e9c2: MARS messages | |
530 | 039b59aa: MARS TO-FM fields | |
531 | a71886ca: Red Cross | |
532 | b7582938: Army MARS std msg | |
533 | baa51cae: MARS precedence | |
534 | 23ed7635: NAVY MARS msg | |
535 | 1c9a27d5: RedCross SnW form | |
536 | f6df72d3: ARRL html format | |
537 | e97c134b: Date-Time | |
538 | e1d88ff7: ARL message | |
539 | 2055167b: navy mars | |
540 | 363e9c2d: MARS messages | |
509 | 541 | |
510 | 542 | |
511 | 543 | =Version 1.1.6= |
512 | 544 | |
513 | 8c2abe9: Escaped chars | |
545 | 8c2abe98: Escaped chars | |
514 | 546 | |
515 | 547 | |
516 | 548 | =Version 1.1.5= |
517 | 549 | |
518 | ed019ec: Template mods for IE | |
550 | ed019ec1: Template mods for IE | |
519 | 551 | |
520 | 552 | |
521 | 553 | =Version 1.1.4= |
522 | 554 | |
523 | 86a1a70: Template corrections | |
524 | debae23: Open flmsg with browser | |
525 | cddab92: Fix LDFLAGS | |
526 | 50b9852: Template simplfication | |
555 | 86a1a70a: Template corrections | |
556 | debae23f: Open flmsg with browser | |
557 | cddab924: Fix LDFLAGS | |
558 | 50b98527: Template simplfication | |
527 | 559 | |
528 | 560 | |
529 | 561 | =Version 1.1.3= |
530 | 562 | |
531 | bc1502f: ICS205A update | |
532 | f7269e9: Print exit | |
533 | b270dd9: Command line import filename | |
534 | e652355: Missing files in repository | |
563 | bc1502fd: ICS205A update | |
564 | f7269e96: Print exit | |
565 | b270dd96: Command line import filename | |
566 | e652355b: Missing files in repository | |
535 | 567 | |
536 | 568 | |
537 | 569 | =Version 1.1.2= |
538 | 570 | |
539 | 8426e70: ICS205a | |
540 | ac93d65: OS X dnd | |
571 | 8426e707: ICS205a | |
572 | ac93d651: OS X dnd | |
541 | 573 | |
542 | 574 | |
543 | 575 | =Version 1.1.1= |
544 | 576 | |
545 | 9648b9a: Files-folders | |
546 | 531905d: Open on wrap export | |
547 | fc882fd: Drop Box | |
548 | 01efd8e: ICS214 clear form | |
549 | 3f95181: File Select-Naming | |
550 | 25d52b3: ICS 216 | |
551 | f18370e: ICS214 | |
552 | d9b0cfd: ICS forms update | |
577 | 9648b9aa: Files-folders | |
578 | 531905dc: Open on wrap export | |
579 | fc882fdf: Drop Box | |
580 | 01efd8e4: ICS214 clear form | |
581 | 3f95181d: File Select-Naming | |
582 | 25d52b38: ICS 216 | |
583 | f18370e1: ICS214 | |
584 | d9b0cfd7: ICS forms update | |
553 | 585 | |
554 | 586 | |
555 | 587 | =Version 1.1.0= |
556 | 588 | |
557 | ad8f280: Type depunned pointer | |
558 | aaae41e: Ignore UNWRAP errors | |
559 | 38b1a12: Radiogram Autoincrement | |
560 | 4490346: ICS 203 | |
561 | 48f5c2b: Default tab | |
562 | 52a4fcd: Common code | |
563 | 6695d2b: ICS-206 | |
564 | 7c5eb23: ICS 205 | |
565 | e4839af: Plain text etal | |
589 | ad8f2800: Type depunned pointer | |
590 | aaae41e9: Ignore UNWRAP errors | |
591 | 38b1a124: Radiogram Autoincrement | |
592 | 44903463: ICS 203 | |
593 | 48f5c2b5: Default tab | |
594 | 52a4fcd0: Common code | |
595 | 6695d2b8: ICS-206 | |
596 | 7c5eb233: ICS 205 | |
597 | e4839afb: Plain text etal | |
566 | 598 | |
567 | 599 | |
568 | 600 | =Version 1.0.6= |
569 | 601 | |
570 | 692a5a1: ARL Field Separator | |
602 | 692a5a10: ARL Field Separator | |
571 | 603 | |
572 | 604 | |
573 | 605 | =Version 1.0.5= |
574 | 606 | |
575 | 610e4c0: Radiogram Autosave | |
607 | 610e4c0e: Radiogram Autosave | |
576 | 608 | |
577 | 609 | |
578 | 610 | =Version 1.0.4= |
579 | 611 | |
580 | d80946b: Create filename fix | |
581 | c1d7016: Wrap extract | |
612 | d80946b8: Create filename fix | |
613 | c1d70166: Wrap extract | |
582 | 614 | |
583 | 615 | |
584 | 616 | =Version 1.0.3= |
585 | 617 | |
586 | e0eecf4: Wrap Import Failure | |
587 | c8ef359: Filename Auto Create | |
588 | 2a0784a: Open Files | |
618 | e0eecf48: Wrap Import Failure | |
619 | c8ef359a: Filename Auto Create | |
620 | 2a0784a0: Open Files | |
589 | 621 | |
590 | 622 | |
591 | 623 | =Version 1.0.2= |
592 | 624 | |
593 | 673d7f0: Bug fixes | |
594 | 8f30b53: Documentation update | |
625 | 673d7f03: Bug fixes | |
626 | 8f30b53c: Documentation update | |
595 | 627 | |
596 | 628 | |
597 | 629 | =Version 1.0.1= |
598 | 630 | |
599 | 329d437: Write Empty Radiogram | |
631 | 329d4375: Write Empty Radiogram | |
600 | 632 | |
601 | 633 | |
602 | 634 | =Version 1.0.0= |
603 | 635 | |
604 | 4173931: ICON update | |
636 | 41739319: ICON update | |
605 | 637 | |
606 | 638 | |
607 | 639 | =Version 0.9.12= |
608 | 640 | |
609 | 47e1b4a: Radiogram CK | |
641 | 47e1b4a3: Radiogram CK | |
610 | 642 | |
611 | 643 | |
612 | 644 | =Version 0.9.11= |
613 | 645 | |
614 | e0f4cd4: Data File | |
646 | e0f4cd48: Data File | |
615 | 647 | |
616 | 648 | |
617 | 649 | =Version 0.9.10= |
618 | 650 | |
619 | c57ec98: Radiogram | |
620 | 008e5ac: Combo widget | |
651 | c57ec985: Radiogram | |
652 | 008e5ac1: Combo widget | |
621 | 653 | |
622 | 654 | |
623 | 655 | =Version 0.9.09= |
624 | 656 | |
625 | 83420c8: ICS-213 Text Output | |
626 | 3e3aeca: Wrap Auto Extract | |
627 | 00567d7: Radiogram formating | |
657 | 83420c8d: ICS-213 Text Output | |
658 | 3e3aeca5: Wrap Auto Extract | |
659 | 00567d7f: Radiogram formating | |
628 | 660 | |
629 | 661 | |
630 | 662 | =Version 0.9.08= |
631 | 663 | |
632 | 7b517a1: RTF output | |
633 | f6388c4: Radiogram | |
664 | 7b517a16: RTF output | |
665 | f6388c46: Radiogram | |
634 | 666 | |
635 | 667 | |
636 | 668 | =Version 0.9.07= |
639 | 671 | |
640 | 672 | =Version 0.9.06= |
641 | 673 | |
642 | 269f8d1: ARRL Radiogram | |
674 | 269f8d14: ARRL Radiogram | |
643 | 675 | |
644 | 676 | |
645 | 677 | =Version 0.9.05= |
646 | 678 | |
647 | 2f8997b: Radiogram update | |
648 | 11ce565: FLMSG | |
679 | 2f8997b5: Radiogram update | |
680 | 11ce5658: FLMSG | |
649 | 681 | |
650 | 682 | |
651 | 683 | =Version 1.0.21= |
652 | 684 | |
653 | ba5af37: MSDOS file format | |
685 | ba5af373: MSDOS file format | |
654 | 686 | |
655 | 687 | |
656 | 688 | =Version 1.0.2= |
657 | 689 | |
658 | 8d22545: QForm import | |
690 | 8d225451: QForm import | |
659 | 691 | |
660 | 692 | |
661 | 693 | =Version 1.0.1= |
662 | 694 | |
663 | 53f9b23: Date format | |
664 | cdd1107: NBEMS default directory | |
665 | 61e3062: Missing files | |
695 | 53f9b231: Date format | |
696 | cdd1107b: NBEMS default directory | |
697 | 61e30621: Missing files | |
666 | 698 | |
667 | 699 | |
668 | 700 | =Version 0.3.4= |
669 | 701 | |
670 | cfc5deb: Program configuration | |
702 | cfc5deb0: Program configuration | |
671 | 703 | |
672 | 704 | |
673 | 705 | =Version 0.3.3= |
674 | 706 | |
675 | 0a2652b: Build Failure on Ubuntu 9.10 | |
707 | 0a2652bb: Build Failure on Ubuntu 9.10 | |
676 | 708 | |
677 | 709 | |
678 | 710 | =Version 0.3.2= |
679 | 711 | |
680 | f0a6d83: Wrapped file extension | |
712 | f0a6d83c: Wrapped file extension | |
681 | 713 | |
682 | 714 | |
683 | 715 | =Version 0.3.1= |
684 | 716 | |
685 | 38269a5: Auto Send Extension | |
686 | 40f5c13: OS X mods | |
717 | 38269a5b: Auto Send Extension | |
718 | 40f5c13f: OS X mods | |
687 | 719 | |
688 | 720 | |
689 | 721 | =Version 0.3.0= |
0 | # Makefile.in generated by automake 1.15 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.15.1 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
558 | 558 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ |
559 | 559 | || chmod -R a+r "$(distdir)" |
560 | 560 | dist-gzip: distdir |
561 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | |
561 | tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz | |
562 | 562 | $(am__post_remove_distdir) |
563 | 563 | |
564 | 564 | dist-bzip2: distdir |
584 | 584 | @echo WARNING: "Support for shar distribution archives is" \ |
585 | 585 | "deprecated." >&2 |
586 | 586 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 |
587 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | |
587 | shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz | |
588 | 588 | $(am__post_remove_distdir) |
589 | 589 | |
590 | 590 | dist-zip: distdir |
602 | 602 | distcheck: dist |
603 | 603 | case '$(DIST_ARCHIVES)' in \ |
604 | 604 | *.tar.gz*) \ |
605 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
605 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
606 | 606 | *.tar.bz2*) \ |
607 | 607 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ |
608 | 608 | *.tar.lz*) \ |
612 | 612 | *.tar.Z*) \ |
613 | 613 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ |
614 | 614 | *.shar.gz*) \ |
615 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ | |
615 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ | |
616 | 616 | *.zip*) \ |
617 | 617 | unzip $(distdir).zip ;;\ |
618 | 618 | esac |
0 | # generated automatically by aclocal 1.15 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
0 | # generated automatically by aclocal 1.15.1 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
3 | 3 | |
4 | 4 | # This file is free software; the Free Software Foundation |
5 | 5 | # gives unlimited permission to copy and/or distribute it, |
295 | 295 | AS_VAR_IF([$1], [""], [$5], [$4])dnl |
296 | 296 | ])dnl PKG_CHECK_VAR |
297 | 297 | |
298 | # Copyright (C) 2002-2014 Free Software Foundation, Inc. | |
298 | # Copyright (C) 2002-2017 Free Software Foundation, Inc. | |
299 | 299 | # |
300 | 300 | # This file is free software; the Free Software Foundation |
301 | 301 | # gives unlimited permission to copy and/or distribute it, |
310 | 310 | [am__api_version='1.15' |
311 | 311 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
312 | 312 | dnl require some minimum version. Point them to the right macro. |
313 | m4_if([$1], [1.15], [], | |
313 | m4_if([$1], [1.15.1], [], | |
314 | 314 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
315 | 315 | ]) |
316 | 316 | |
326 | 326 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
327 | 327 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
328 | 328 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
329 | [AM_AUTOMAKE_VERSION([1.15])dnl | |
329 | [AM_AUTOMAKE_VERSION([1.15.1])dnl | |
330 | 330 | m4_ifndef([AC_AUTOCONF_VERSION], |
331 | 331 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
332 | 332 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
333 | 333 | |
334 | 334 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
335 | 335 | |
336 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
336 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
337 | 337 | # |
338 | 338 | # This file is free software; the Free Software Foundation |
339 | 339 | # gives unlimited permission to copy and/or distribute it, |
385 | 385 | |
386 | 386 | # AM_CONDITIONAL -*- Autoconf -*- |
387 | 387 | |
388 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
388 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. | |
389 | 389 | # |
390 | 390 | # This file is free software; the Free Software Foundation |
391 | 391 | # gives unlimited permission to copy and/or distribute it, |
416 | 416 | Usually this means the macro was only invoked conditionally.]]) |
417 | 417 | fi])]) |
418 | 418 | |
419 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
419 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | |
420 | 420 | # |
421 | 421 | # This file is free software; the Free Software Foundation |
422 | 422 | # gives unlimited permission to copy and/or distribute it, |
607 | 607 | |
608 | 608 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
609 | 609 | |
610 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
610 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | |
611 | 611 | # |
612 | 612 | # This file is free software; the Free Software Foundation |
613 | 613 | # gives unlimited permission to copy and/or distribute it, |
683 | 683 | |
684 | 684 | # Do all the work for Automake. -*- Autoconf -*- |
685 | 685 | |
686 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
686 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
687 | 687 | # |
688 | 688 | # This file is free software; the Free Software Foundation |
689 | 689 | # gives unlimited permission to copy and/or distribute it, |
880 | 880 | done |
881 | 881 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
882 | 882 | |
883 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
883 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
884 | 884 | # |
885 | 885 | # This file is free software; the Free Software Foundation |
886 | 886 | # gives unlimited permission to copy and/or distribute it, |
901 | 901 | fi |
902 | 902 | AC_SUBST([install_sh])]) |
903 | 903 | |
904 | # Copyright (C) 2003-2014 Free Software Foundation, Inc. | |
904 | # Copyright (C) 2003-2017 Free Software Foundation, Inc. | |
905 | 905 | # |
906 | 906 | # This file is free software; the Free Software Foundation |
907 | 907 | # gives unlimited permission to copy and/or distribute it, |
922 | 922 | |
923 | 923 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
924 | 924 | |
925 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
925 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
926 | 926 | # |
927 | 927 | # This file is free software; the Free Software Foundation |
928 | 928 | # gives unlimited permission to copy and/or distribute it, |
972 | 972 | |
973 | 973 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
974 | 974 | |
975 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
975 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. | |
976 | 976 | # |
977 | 977 | # This file is free software; the Free Software Foundation |
978 | 978 | # gives unlimited permission to copy and/or distribute it, |
1011 | 1011 | |
1012 | 1012 | # Helper functions for option handling. -*- Autoconf -*- |
1013 | 1013 | |
1014 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1014 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
1015 | 1015 | # |
1016 | 1016 | # This file is free software; the Free Software Foundation |
1017 | 1017 | # gives unlimited permission to copy and/or distribute it, |
1040 | 1040 | AC_DEFUN([_AM_IF_OPTION], |
1041 | 1041 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
1042 | 1042 | |
1043 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
1043 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. | |
1044 | 1044 | # |
1045 | 1045 | # This file is free software; the Free Software Foundation |
1046 | 1046 | # gives unlimited permission to copy and/or distribute it, |
1087 | 1087 | # For backward compatibility. |
1088 | 1088 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
1089 | 1089 | |
1090 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1090 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
1091 | 1091 | # |
1092 | 1092 | # This file is free software; the Free Software Foundation |
1093 | 1093 | # gives unlimited permission to copy and/or distribute it, |
1106 | 1106 | |
1107 | 1107 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
1108 | 1108 | |
1109 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
1109 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
1110 | 1110 | # |
1111 | 1111 | # This file is free software; the Free Software Foundation |
1112 | 1112 | # gives unlimited permission to copy and/or distribute it, |
1187 | 1187 | rm -f conftest.file |
1188 | 1188 | ]) |
1189 | 1189 | |
1190 | # Copyright (C) 2009-2014 Free Software Foundation, Inc. | |
1190 | # Copyright (C) 2009-2017 Free Software Foundation, Inc. | |
1191 | 1191 | # |
1192 | 1192 | # This file is free software; the Free Software Foundation |
1193 | 1193 | # gives unlimited permission to copy and/or distribute it, |
1247 | 1247 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
1248 | 1248 | ]) |
1249 | 1249 | |
1250 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1250 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
1251 | 1251 | # |
1252 | 1252 | # This file is free software; the Free Software Foundation |
1253 | 1253 | # gives unlimited permission to copy and/or distribute it, |
1275 | 1275 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1276 | 1276 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1277 | 1277 | |
1278 | # Copyright (C) 2006-2014 Free Software Foundation, Inc. | |
1278 | # Copyright (C) 2006-2017 Free Software Foundation, Inc. | |
1279 | 1279 | # |
1280 | 1280 | # This file is free software; the Free Software Foundation |
1281 | 1281 | # gives unlimited permission to copy and/or distribute it, |
1294 | 1294 | |
1295 | 1295 | # Check how to create a tarball. -*- Autoconf -*- |
1296 | 1296 | |
1297 | # Copyright (C) 2004-2014 Free Software Foundation, Inc. | |
1297 | # Copyright (C) 2004-2017 Free Software Foundation, Inc. | |
1298 | 1298 | # |
1299 | 1299 | # This file is free software; the Free Software Foundation |
1300 | 1300 | # gives unlimited permission to copy and/or distribute it, |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for FLMSG 4.0.8.04. | |
2 | # Generated by GNU Autoconf 2.69 for FLMSG 4.0.11. | |
3 | 3 | # |
4 | 4 | # Report bugs to <w1hkj AT w1hkj DOT com>. |
5 | 5 | # |
581 | 581 | # Identity of this package. |
582 | 582 | PACKAGE_NAME='FLMSG' |
583 | 583 | PACKAGE_TARNAME='flmsg' |
584 | PACKAGE_VERSION='4.0.8.04' | |
585 | PACKAGE_STRING='FLMSG 4.0.8.04' | |
584 | PACKAGE_VERSION='4.0.11' | |
585 | PACKAGE_STRING='FLMSG 4.0.11' | |
586 | 586 | PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com' |
587 | 587 | PACKAGE_URL='' |
588 | 588 | |
1376 | 1376 | # Omit some internal or obsolete options to make the list less imposing. |
1377 | 1377 | # This message is too long to be a string in the A/UX 3.1 sh. |
1378 | 1378 | cat <<_ACEOF |
1379 | \`configure' configures FLMSG 4.0.8.04 to adapt to many kinds of systems. | |
1379 | \`configure' configures FLMSG 4.0.11 to adapt to many kinds of systems. | |
1380 | 1380 | |
1381 | 1381 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1382 | 1382 | |
1448 | 1448 | |
1449 | 1449 | if test -n "$ac_init_help"; then |
1450 | 1450 | case $ac_init_help in |
1451 | short | recursive ) echo "Configuration of FLMSG 4.0.8.04:";; | |
1451 | short | recursive ) echo "Configuration of FLMSG 4.0.11:";; | |
1452 | 1452 | esac |
1453 | 1453 | cat <<\_ACEOF |
1454 | 1454 | |
1576 | 1576 | test -n "$ac_init_help" && exit $ac_status |
1577 | 1577 | if $ac_init_version; then |
1578 | 1578 | cat <<\_ACEOF |
1579 | FLMSG configure 4.0.8.04 | |
1579 | FLMSG configure 4.0.11 | |
1580 | 1580 | generated by GNU Autoconf 2.69 |
1581 | 1581 | |
1582 | 1582 | Copyright (C) 2012 Free Software Foundation, Inc. |
2085 | 2085 | This file contains any messages produced by compilers while |
2086 | 2086 | running configure, to aid debugging if configure makes a mistake. |
2087 | 2087 | |
2088 | It was created by FLMSG $as_me 4.0.8.04, which was | |
2088 | It was created by FLMSG $as_me 4.0.11, which was | |
2089 | 2089 | generated by GNU Autoconf 2.69. Invocation command line was |
2090 | 2090 | |
2091 | 2091 | $ $0 $@ |
2438 | 2438 | |
2439 | 2439 | FLMSG_VERSION_MINOR=0 |
2440 | 2440 | |
2441 | FLMSG_VERSION_PATCH=.8.04 | |
2442 | ||
2443 | FLMSG_VERSION=4.0.8.04 | |
2441 | FLMSG_VERSION_PATCH=.11 | |
2442 | ||
2443 | FLMSG_VERSION=4.0.11 | |
2444 | 2444 | |
2445 | 2445 | |
2446 | 2446 | |
2450 | 2450 | $as_echo "#define FLMSG_VERSION_MINOR 0" >>confdefs.h |
2451 | 2451 | |
2452 | 2452 | |
2453 | $as_echo "#define FLMSG_VERSION_PATCH \".8.04\"" >>confdefs.h | |
2454 | ||
2455 | ||
2456 | $as_echo "#define FLMSG_VERSION \"4.0.8.04\"" >>confdefs.h | |
2453 | $as_echo "#define FLMSG_VERSION_PATCH \".11\"" >>confdefs.h | |
2454 | ||
2455 | ||
2456 | $as_echo "#define FLMSG_VERSION \"4.0.11\"" >>confdefs.h | |
2457 | 2457 | |
2458 | 2458 | |
2459 | 2459 | AC_CONFIG_ARGS=$ac_configure_args |
3088 | 3088 | |
3089 | 3089 | # Define the identity of the package. |
3090 | 3090 | PACKAGE='flmsg' |
3091 | VERSION='4.0.8.04' | |
3091 | VERSION='4.0.11' | |
3092 | 3092 | |
3093 | 3093 | |
3094 | 3094 | cat >>confdefs.h <<_ACEOF |
7543 | 7543 | # report actual input values of CONFIG_FILES etc. instead of their |
7544 | 7544 | # values after options handling. |
7545 | 7545 | ac_log=" |
7546 | This file was extended by FLMSG $as_me 4.0.8.04, which was | |
7546 | This file was extended by FLMSG $as_me 4.0.11, which was | |
7547 | 7547 | generated by GNU Autoconf 2.69. Invocation command line was |
7548 | 7548 | |
7549 | 7549 | CONFIG_FILES = $CONFIG_FILES |
7609 | 7609 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
7610 | 7610 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
7611 | 7611 | ac_cs_version="\\ |
7612 | FLMSG config.status 4.0.8.04 | |
7612 | FLMSG config.status 4.0.11 | |
7613 | 7613 | configured by $0, generated by GNU Autoconf 2.69, |
7614 | 7614 | with options \\"\$ac_cs_config\\" |
7615 | 7615 |
11 | 11 | dnl contain other characters or be empty |
12 | 12 | m4_define(FLMSG_MAJOR, [4]) |
13 | 13 | m4_define(FLMSG_MINOR, [0]) |
14 | m4_define(FLMSG_PATCH, [.8.04]) | |
14 | m4_define(FLMSG_PATCH, [.11]) | |
15 | 15 | |
16 | 16 | AC_INIT([FLMSG], FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH, [w1hkj AT w1hkj DOT com]) |
17 | 17 |
26 | 26 | <string>%%VERSION%%</string> |
27 | 27 | |
28 | 28 | <key>CFBundleShortVersionString</key> |
29 | <string>%%VERSION%%</string> | |
29 | <string>%%VERSION%%</string> | |
30 | 30 | |
31 | 31 | <key>CFBundleLongVersionString</key> |
32 | 32 | <string>%%VERSION%%</string> |
37 | 37 | <key>NSAppleScriptEnabled</key> |
38 | 38 | <string>No</string> |
39 | 39 | |
40 | <key>NSPrincipalClass</key> | |
41 | <string>NSApplication</string> | |
42 | ||
40 | 43 | <key>NSHumanReadableCopyright</key> |
41 | 44 | <string>Copyright (c) 2009 Dave Freese W1HKJ</string> |
42 | 45 | </dict> |
229 | 229 | radiogram/radiogram.cxx \ |
230 | 230 | radiogram/radiogram_tab.cxx \ |
231 | 231 | radiogram/radiogram_templates.cxx \ |
232 | redx/redx_tab.cxx \ | |
233 | redx/redx_snw.cxx \ | |
234 | redx/redx_snw_tab.cxx \ | |
235 | redx/redx_snw_template.cxx \ | |
236 | redx/redx_5739.cxx \ | |
237 | redx/redx_5739_tab.cxx \ | |
238 | redx/redx_5739A.cxx \ | |
239 | redx/redx_5739A_tab.cxx \ | |
240 | redx/redx_5739B.cxx \ | |
241 | redx/redx_5739B_tab.cxx \ | |
242 | redx/redx_5739_template.cxx \ | |
243 | 232 | transfer/transfer.cxx \ |
244 | 233 | transfer/transfer_tab.cxx \ |
245 | 234 | custom/custom_transfer_tab.cxx \ |
0 | # Makefile.in generated by automake 1.15 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.15.1 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
164 | 164 | plaintext/plaintext_templates.cxx radiogram/arl_msgs.cxx \ |
165 | 165 | radiogram/hx_msgs.cxx radiogram/radiogram.cxx \ |
166 | 166 | radiogram/radiogram_tab.cxx radiogram/radiogram_templates.cxx \ |
167 | redx/redx_tab.cxx redx/redx_snw.cxx redx/redx_snw_tab.cxx \ | |
168 | redx/redx_snw_template.cxx redx/redx_5739.cxx \ | |
169 | redx/redx_5739_tab.cxx redx/redx_5739A.cxx \ | |
170 | redx/redx_5739A_tab.cxx redx/redx_5739B.cxx \ | |
171 | redx/redx_5739B_tab.cxx redx/redx_5739_template.cxx \ | |
172 | 167 | transfer/transfer.cxx transfer/transfer_tab.cxx \ |
173 | 168 | custom/custom_transfer_tab.cxx utils/base64.cxx \ |
174 | 169 | utils/base128.cxx utils/base256.cxx utils/debug.cxx \ |
267 | 262 | radiogram/flmsg-radiogram.$(OBJEXT) \ |
268 | 263 | radiogram/flmsg-radiogram_tab.$(OBJEXT) \ |
269 | 264 | radiogram/flmsg-radiogram_templates.$(OBJEXT) \ |
270 | redx/flmsg-redx_tab.$(OBJEXT) redx/flmsg-redx_snw.$(OBJEXT) \ | |
271 | redx/flmsg-redx_snw_tab.$(OBJEXT) \ | |
272 | redx/flmsg-redx_snw_template.$(OBJEXT) \ | |
273 | redx/flmsg-redx_5739.$(OBJEXT) \ | |
274 | redx/flmsg-redx_5739_tab.$(OBJEXT) \ | |
275 | redx/flmsg-redx_5739A.$(OBJEXT) \ | |
276 | redx/flmsg-redx_5739A_tab.$(OBJEXT) \ | |
277 | redx/flmsg-redx_5739B.$(OBJEXT) \ | |
278 | redx/flmsg-redx_5739B_tab.$(OBJEXT) \ | |
279 | redx/flmsg-redx_5739_template.$(OBJEXT) \ | |
280 | 265 | transfer/flmsg-transfer.$(OBJEXT) \ |
281 | 266 | transfer/flmsg-transfer_tab.$(OBJEXT) \ |
282 | 267 | custom/flmsg-custom_transfer_tab.$(OBJEXT) \ |
601 | 586 | plaintext/plaintext_templates.cxx radiogram/arl_msgs.cxx \ |
602 | 587 | radiogram/hx_msgs.cxx radiogram/radiogram.cxx \ |
603 | 588 | radiogram/radiogram_tab.cxx radiogram/radiogram_templates.cxx \ |
604 | redx/redx_tab.cxx redx/redx_snw.cxx redx/redx_snw_tab.cxx \ | |
605 | redx/redx_snw_template.cxx redx/redx_5739.cxx \ | |
606 | redx/redx_5739_tab.cxx redx/redx_5739A.cxx \ | |
607 | redx/redx_5739A_tab.cxx redx/redx_5739B.cxx \ | |
608 | redx/redx_5739B_tab.cxx redx/redx_5739_template.cxx \ | |
609 | 589 | transfer/transfer.cxx transfer/transfer_tab.cxx \ |
610 | 590 | custom/custom_transfer_tab.cxx utils/base64.cxx \ |
611 | 591 | utils/base128.cxx utils/base256.cxx utils/debug.cxx \ |
1105 | 1085 | radiogram/$(DEPDIR)/$(am__dirstamp) |
1106 | 1086 | radiogram/flmsg-radiogram_templates.$(OBJEXT): \ |
1107 | 1087 | radiogram/$(am__dirstamp) radiogram/$(DEPDIR)/$(am__dirstamp) |
1108 | redx/$(am__dirstamp): | |
1109 | @$(MKDIR_P) redx | |
1110 | @: > redx/$(am__dirstamp) | |
1111 | redx/$(DEPDIR)/$(am__dirstamp): | |
1112 | @$(MKDIR_P) redx/$(DEPDIR) | |
1113 | @: > redx/$(DEPDIR)/$(am__dirstamp) | |
1114 | redx/flmsg-redx_tab.$(OBJEXT): redx/$(am__dirstamp) \ | |
1115 | redx/$(DEPDIR)/$(am__dirstamp) | |
1116 | redx/flmsg-redx_snw.$(OBJEXT): redx/$(am__dirstamp) \ | |
1117 | redx/$(DEPDIR)/$(am__dirstamp) | |
1118 | redx/flmsg-redx_snw_tab.$(OBJEXT): redx/$(am__dirstamp) \ | |
1119 | redx/$(DEPDIR)/$(am__dirstamp) | |
1120 | redx/flmsg-redx_snw_template.$(OBJEXT): redx/$(am__dirstamp) \ | |
1121 | redx/$(DEPDIR)/$(am__dirstamp) | |
1122 | redx/flmsg-redx_5739.$(OBJEXT): redx/$(am__dirstamp) \ | |
1123 | redx/$(DEPDIR)/$(am__dirstamp) | |
1124 | redx/flmsg-redx_5739_tab.$(OBJEXT): redx/$(am__dirstamp) \ | |
1125 | redx/$(DEPDIR)/$(am__dirstamp) | |
1126 | redx/flmsg-redx_5739A.$(OBJEXT): redx/$(am__dirstamp) \ | |
1127 | redx/$(DEPDIR)/$(am__dirstamp) | |
1128 | redx/flmsg-redx_5739A_tab.$(OBJEXT): redx/$(am__dirstamp) \ | |
1129 | redx/$(DEPDIR)/$(am__dirstamp) | |
1130 | redx/flmsg-redx_5739B.$(OBJEXT): redx/$(am__dirstamp) \ | |
1131 | redx/$(DEPDIR)/$(am__dirstamp) | |
1132 | redx/flmsg-redx_5739B_tab.$(OBJEXT): redx/$(am__dirstamp) \ | |
1133 | redx/$(DEPDIR)/$(am__dirstamp) | |
1134 | redx/flmsg-redx_5739_template.$(OBJEXT): redx/$(am__dirstamp) \ | |
1135 | redx/$(DEPDIR)/$(am__dirstamp) | |
1136 | 1088 | transfer/$(am__dirstamp): |
1137 | 1089 | @$(MKDIR_P) transfer |
1138 | 1090 | @: > transfer/$(am__dirstamp) |
1257 | 1209 | -rm -f mars/*.$(OBJEXT) |
1258 | 1210 | -rm -f plaintext/*.$(OBJEXT) |
1259 | 1211 | -rm -f radiogram/*.$(OBJEXT) |
1260 | -rm -f redx/*.$(OBJEXT) | |
1261 | 1212 | -rm -f transfer/*.$(OBJEXT) |
1262 | 1213 | -rm -f utils/*.$(OBJEXT) |
1263 | 1214 | -rm -f widgets/*.$(OBJEXT) |
1357 | 1308 | @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-radiogram.Po@am__quote@ |
1358 | 1309 | @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-radiogram_tab.Po@am__quote@ |
1359 | 1310 | @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-radiogram_templates.Po@am__quote@ |
1360 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739.Po@am__quote@ | |
1361 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739A.Po@am__quote@ | |
1362 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739A_tab.Po@am__quote@ | |
1363 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739B.Po@am__quote@ | |
1364 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739B_tab.Po@am__quote@ | |
1365 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739_tab.Po@am__quote@ | |
1366 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739_template.Po@am__quote@ | |
1367 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_snw.Po@am__quote@ | |
1368 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_snw_tab.Po@am__quote@ | |
1369 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_snw_template.Po@am__quote@ | |
1370 | @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_tab.Po@am__quote@ | |
1371 | 1311 | @AMDEP_TRUE@@am__include@ @am__quote@transfer/$(DEPDIR)/flmsg-transfer.Po@am__quote@ |
1372 | 1312 | @AMDEP_TRUE@@am__include@ @am__quote@transfer/$(DEPDIR)/flmsg-transfer_tab.Po@am__quote@ |
1373 | 1313 | @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-base128.Po@am__quote@ |
2883 | 2823 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
2884 | 2824 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram_templates.obj `if test -f 'radiogram/radiogram_templates.cxx'; then $(CYGPATH_W) 'radiogram/radiogram_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram_templates.cxx'; fi` |
2885 | 2825 | |
2886 | redx/flmsg-redx_tab.o: redx/redx_tab.cxx | |
2887 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_tab.Tpo -c -o redx/flmsg-redx_tab.o `test -f 'redx/redx_tab.cxx' || echo '$(srcdir)/'`redx/redx_tab.cxx | |
2888 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_tab.Tpo redx/$(DEPDIR)/flmsg-redx_tab.Po | |
2889 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_tab.cxx' object='redx/flmsg-redx_tab.o' libtool=no @AMDEPBACKSLASH@ | |
2890 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2891 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_tab.o `test -f 'redx/redx_tab.cxx' || echo '$(srcdir)/'`redx/redx_tab.cxx | |
2892 | ||
2893 | redx/flmsg-redx_tab.obj: redx/redx_tab.cxx | |
2894 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_tab.Tpo -c -o redx/flmsg-redx_tab.obj `if test -f 'redx/redx_tab.cxx'; then $(CYGPATH_W) 'redx/redx_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_tab.cxx'; fi` | |
2895 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_tab.Tpo redx/$(DEPDIR)/flmsg-redx_tab.Po | |
2896 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_tab.cxx' object='redx/flmsg-redx_tab.obj' libtool=no @AMDEPBACKSLASH@ | |
2897 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2898 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_tab.obj `if test -f 'redx/redx_tab.cxx'; then $(CYGPATH_W) 'redx/redx_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_tab.cxx'; fi` | |
2899 | ||
2900 | redx/flmsg-redx_snw.o: redx/redx_snw.cxx | |
2901 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw.Tpo -c -o redx/flmsg-redx_snw.o `test -f 'redx/redx_snw.cxx' || echo '$(srcdir)/'`redx/redx_snw.cxx | |
2902 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_snw.Tpo redx/$(DEPDIR)/flmsg-redx_snw.Po | |
2903 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_snw.cxx' object='redx/flmsg-redx_snw.o' libtool=no @AMDEPBACKSLASH@ | |
2904 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2905 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw.o `test -f 'redx/redx_snw.cxx' || echo '$(srcdir)/'`redx/redx_snw.cxx | |
2906 | ||
2907 | redx/flmsg-redx_snw.obj: redx/redx_snw.cxx | |
2908 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw.Tpo -c -o redx/flmsg-redx_snw.obj `if test -f 'redx/redx_snw.cxx'; then $(CYGPATH_W) 'redx/redx_snw.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw.cxx'; fi` | |
2909 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_snw.Tpo redx/$(DEPDIR)/flmsg-redx_snw.Po | |
2910 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_snw.cxx' object='redx/flmsg-redx_snw.obj' libtool=no @AMDEPBACKSLASH@ | |
2911 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2912 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw.obj `if test -f 'redx/redx_snw.cxx'; then $(CYGPATH_W) 'redx/redx_snw.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw.cxx'; fi` | |
2913 | ||
2914 | redx/flmsg-redx_snw_tab.o: redx/redx_snw_tab.cxx | |
2915 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo -c -o redx/flmsg-redx_snw_tab.o `test -f 'redx/redx_snw_tab.cxx' || echo '$(srcdir)/'`redx/redx_snw_tab.cxx | |
2916 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo redx/$(DEPDIR)/flmsg-redx_snw_tab.Po | |
2917 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_snw_tab.cxx' object='redx/flmsg-redx_snw_tab.o' libtool=no @AMDEPBACKSLASH@ | |
2918 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2919 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_tab.o `test -f 'redx/redx_snw_tab.cxx' || echo '$(srcdir)/'`redx/redx_snw_tab.cxx | |
2920 | ||
2921 | redx/flmsg-redx_snw_tab.obj: redx/redx_snw_tab.cxx | |
2922 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo -c -o redx/flmsg-redx_snw_tab.obj `if test -f 'redx/redx_snw_tab.cxx'; then $(CYGPATH_W) 'redx/redx_snw_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_tab.cxx'; fi` | |
2923 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo redx/$(DEPDIR)/flmsg-redx_snw_tab.Po | |
2924 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_snw_tab.cxx' object='redx/flmsg-redx_snw_tab.obj' libtool=no @AMDEPBACKSLASH@ | |
2925 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2926 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_tab.obj `if test -f 'redx/redx_snw_tab.cxx'; then $(CYGPATH_W) 'redx/redx_snw_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_tab.cxx'; fi` | |
2927 | ||
2928 | redx/flmsg-redx_snw_template.o: redx/redx_snw_template.cxx | |
2929 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_template.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo -c -o redx/flmsg-redx_snw_template.o `test -f 'redx/redx_snw_template.cxx' || echo '$(srcdir)/'`redx/redx_snw_template.cxx | |
2930 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo redx/$(DEPDIR)/flmsg-redx_snw_template.Po | |
2931 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_snw_template.cxx' object='redx/flmsg-redx_snw_template.o' libtool=no @AMDEPBACKSLASH@ | |
2932 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2933 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_template.o `test -f 'redx/redx_snw_template.cxx' || echo '$(srcdir)/'`redx/redx_snw_template.cxx | |
2934 | ||
2935 | redx/flmsg-redx_snw_template.obj: redx/redx_snw_template.cxx | |
2936 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_template.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo -c -o redx/flmsg-redx_snw_template.obj `if test -f 'redx/redx_snw_template.cxx'; then $(CYGPATH_W) 'redx/redx_snw_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_template.cxx'; fi` | |
2937 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo redx/$(DEPDIR)/flmsg-redx_snw_template.Po | |
2938 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_snw_template.cxx' object='redx/flmsg-redx_snw_template.obj' libtool=no @AMDEPBACKSLASH@ | |
2939 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2940 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_template.obj `if test -f 'redx/redx_snw_template.cxx'; then $(CYGPATH_W) 'redx/redx_snw_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_template.cxx'; fi` | |
2941 | ||
2942 | redx/flmsg-redx_5739.o: redx/redx_5739.cxx | |
2943 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739.Tpo -c -o redx/flmsg-redx_5739.o `test -f 'redx/redx_5739.cxx' || echo '$(srcdir)/'`redx/redx_5739.cxx | |
2944 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739.Tpo redx/$(DEPDIR)/flmsg-redx_5739.Po | |
2945 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739.cxx' object='redx/flmsg-redx_5739.o' libtool=no @AMDEPBACKSLASH@ | |
2946 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2947 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739.o `test -f 'redx/redx_5739.cxx' || echo '$(srcdir)/'`redx/redx_5739.cxx | |
2948 | ||
2949 | redx/flmsg-redx_5739.obj: redx/redx_5739.cxx | |
2950 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739.Tpo -c -o redx/flmsg-redx_5739.obj `if test -f 'redx/redx_5739.cxx'; then $(CYGPATH_W) 'redx/redx_5739.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739.cxx'; fi` | |
2951 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739.Tpo redx/$(DEPDIR)/flmsg-redx_5739.Po | |
2952 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739.cxx' object='redx/flmsg-redx_5739.obj' libtool=no @AMDEPBACKSLASH@ | |
2953 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2954 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739.obj `if test -f 'redx/redx_5739.cxx'; then $(CYGPATH_W) 'redx/redx_5739.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739.cxx'; fi` | |
2955 | ||
2956 | redx/flmsg-redx_5739_tab.o: redx/redx_5739_tab.cxx | |
2957 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo -c -o redx/flmsg-redx_5739_tab.o `test -f 'redx/redx_5739_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739_tab.cxx | |
2958 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739_tab.Po | |
2959 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739_tab.cxx' object='redx/flmsg-redx_5739_tab.o' libtool=no @AMDEPBACKSLASH@ | |
2960 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2961 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_tab.o `test -f 'redx/redx_5739_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739_tab.cxx | |
2962 | ||
2963 | redx/flmsg-redx_5739_tab.obj: redx/redx_5739_tab.cxx | |
2964 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo -c -o redx/flmsg-redx_5739_tab.obj `if test -f 'redx/redx_5739_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_tab.cxx'; fi` | |
2965 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739_tab.Po | |
2966 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739_tab.cxx' object='redx/flmsg-redx_5739_tab.obj' libtool=no @AMDEPBACKSLASH@ | |
2967 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2968 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_tab.obj `if test -f 'redx/redx_5739_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_tab.cxx'; fi` | |
2969 | ||
2970 | redx/flmsg-redx_5739A.o: redx/redx_5739A.cxx | |
2971 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A.Tpo -c -o redx/flmsg-redx_5739A.o `test -f 'redx/redx_5739A.cxx' || echo '$(srcdir)/'`redx/redx_5739A.cxx | |
2972 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A.Tpo redx/$(DEPDIR)/flmsg-redx_5739A.Po | |
2973 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739A.cxx' object='redx/flmsg-redx_5739A.o' libtool=no @AMDEPBACKSLASH@ | |
2974 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2975 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A.o `test -f 'redx/redx_5739A.cxx' || echo '$(srcdir)/'`redx/redx_5739A.cxx | |
2976 | ||
2977 | redx/flmsg-redx_5739A.obj: redx/redx_5739A.cxx | |
2978 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A.Tpo -c -o redx/flmsg-redx_5739A.obj `if test -f 'redx/redx_5739A.cxx'; then $(CYGPATH_W) 'redx/redx_5739A.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A.cxx'; fi` | |
2979 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A.Tpo redx/$(DEPDIR)/flmsg-redx_5739A.Po | |
2980 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739A.cxx' object='redx/flmsg-redx_5739A.obj' libtool=no @AMDEPBACKSLASH@ | |
2981 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2982 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A.obj `if test -f 'redx/redx_5739A.cxx'; then $(CYGPATH_W) 'redx/redx_5739A.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A.cxx'; fi` | |
2983 | ||
2984 | redx/flmsg-redx_5739A_tab.o: redx/redx_5739A_tab.cxx | |
2985 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo -c -o redx/flmsg-redx_5739A_tab.o `test -f 'redx/redx_5739A_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739A_tab.cxx | |
2986 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739A_tab.Po | |
2987 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739A_tab.cxx' object='redx/flmsg-redx_5739A_tab.o' libtool=no @AMDEPBACKSLASH@ | |
2988 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2989 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A_tab.o `test -f 'redx/redx_5739A_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739A_tab.cxx | |
2990 | ||
2991 | redx/flmsg-redx_5739A_tab.obj: redx/redx_5739A_tab.cxx | |
2992 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo -c -o redx/flmsg-redx_5739A_tab.obj `if test -f 'redx/redx_5739A_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739A_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A_tab.cxx'; fi` | |
2993 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739A_tab.Po | |
2994 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739A_tab.cxx' object='redx/flmsg-redx_5739A_tab.obj' libtool=no @AMDEPBACKSLASH@ | |
2995 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
2996 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A_tab.obj `if test -f 'redx/redx_5739A_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739A_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A_tab.cxx'; fi` | |
2997 | ||
2998 | redx/flmsg-redx_5739B.o: redx/redx_5739B.cxx | |
2999 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B.Tpo -c -o redx/flmsg-redx_5739B.o `test -f 'redx/redx_5739B.cxx' || echo '$(srcdir)/'`redx/redx_5739B.cxx | |
3000 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B.Tpo redx/$(DEPDIR)/flmsg-redx_5739B.Po | |
3001 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739B.cxx' object='redx/flmsg-redx_5739B.o' libtool=no @AMDEPBACKSLASH@ | |
3002 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
3003 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B.o `test -f 'redx/redx_5739B.cxx' || echo '$(srcdir)/'`redx/redx_5739B.cxx | |
3004 | ||
3005 | redx/flmsg-redx_5739B.obj: redx/redx_5739B.cxx | |
3006 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B.Tpo -c -o redx/flmsg-redx_5739B.obj `if test -f 'redx/redx_5739B.cxx'; then $(CYGPATH_W) 'redx/redx_5739B.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B.cxx'; fi` | |
3007 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B.Tpo redx/$(DEPDIR)/flmsg-redx_5739B.Po | |
3008 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739B.cxx' object='redx/flmsg-redx_5739B.obj' libtool=no @AMDEPBACKSLASH@ | |
3009 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
3010 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B.obj `if test -f 'redx/redx_5739B.cxx'; then $(CYGPATH_W) 'redx/redx_5739B.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B.cxx'; fi` | |
3011 | ||
3012 | redx/flmsg-redx_5739B_tab.o: redx/redx_5739B_tab.cxx | |
3013 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo -c -o redx/flmsg-redx_5739B_tab.o `test -f 'redx/redx_5739B_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739B_tab.cxx | |
3014 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739B_tab.Po | |
3015 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739B_tab.cxx' object='redx/flmsg-redx_5739B_tab.o' libtool=no @AMDEPBACKSLASH@ | |
3016 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
3017 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B_tab.o `test -f 'redx/redx_5739B_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739B_tab.cxx | |
3018 | ||
3019 | redx/flmsg-redx_5739B_tab.obj: redx/redx_5739B_tab.cxx | |
3020 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo -c -o redx/flmsg-redx_5739B_tab.obj `if test -f 'redx/redx_5739B_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739B_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B_tab.cxx'; fi` | |
3021 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739B_tab.Po | |
3022 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739B_tab.cxx' object='redx/flmsg-redx_5739B_tab.obj' libtool=no @AMDEPBACKSLASH@ | |
3023 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
3024 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B_tab.obj `if test -f 'redx/redx_5739B_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739B_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B_tab.cxx'; fi` | |
3025 | ||
3026 | redx/flmsg-redx_5739_template.o: redx/redx_5739_template.cxx | |
3027 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_template.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo -c -o redx/flmsg-redx_5739_template.o `test -f 'redx/redx_5739_template.cxx' || echo '$(srcdir)/'`redx/redx_5739_template.cxx | |
3028 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo redx/$(DEPDIR)/flmsg-redx_5739_template.Po | |
3029 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739_template.cxx' object='redx/flmsg-redx_5739_template.o' libtool=no @AMDEPBACKSLASH@ | |
3030 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
3031 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_template.o `test -f 'redx/redx_5739_template.cxx' || echo '$(srcdir)/'`redx/redx_5739_template.cxx | |
3032 | ||
3033 | redx/flmsg-redx_5739_template.obj: redx/redx_5739_template.cxx | |
3034 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_template.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo -c -o redx/flmsg-redx_5739_template.obj `if test -f 'redx/redx_5739_template.cxx'; then $(CYGPATH_W) 'redx/redx_5739_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_template.cxx'; fi` | |
3035 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo redx/$(DEPDIR)/flmsg-redx_5739_template.Po | |
3036 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='redx/redx_5739_template.cxx' object='redx/flmsg-redx_5739_template.obj' libtool=no @AMDEPBACKSLASH@ | |
3037 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
3038 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_template.obj `if test -f 'redx/redx_5739_template.cxx'; then $(CYGPATH_W) 'redx/redx_5739_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_template.cxx'; fi` | |
3039 | ||
3040 | 2826 | transfer/flmsg-transfer.o: transfer/transfer.cxx |
3041 | 2827 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT transfer/flmsg-transfer.o -MD -MP -MF transfer/$(DEPDIR)/flmsg-transfer.Tpo -c -o transfer/flmsg-transfer.o `test -f 'transfer/transfer.cxx' || echo '$(srcdir)/'`transfer/transfer.cxx |
3042 | 2828 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) transfer/$(DEPDIR)/flmsg-transfer.Tpo transfer/$(DEPDIR)/flmsg-transfer.Po |
3785 | 3571 | -rm -f plaintext/$(am__dirstamp) |
3786 | 3572 | -rm -f radiogram/$(DEPDIR)/$(am__dirstamp) |
3787 | 3573 | -rm -f radiogram/$(am__dirstamp) |
3788 | -rm -f redx/$(DEPDIR)/$(am__dirstamp) | |
3789 | -rm -f redx/$(am__dirstamp) | |
3790 | 3574 | -rm -f transfer/$(DEPDIR)/$(am__dirstamp) |
3791 | 3575 | -rm -f transfer/$(am__dirstamp) |
3792 | 3576 | -rm -f utils/$(DEPDIR)/$(am__dirstamp) |
3807 | 3591 | clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am |
3808 | 3592 | |
3809 | 3593 | distclean: distclean-am |
3810 | -rm -rf ./$(DEPDIR) arq/$(DEPDIR) blank-dnd/$(DEPDIR) cap/$(DEPDIR) csv/$(DEPDIR) custom/$(DEPDIR) ham_forms/$(DEPDIR) hics/$(DEPDIR) iaru/$(DEPDIR) ics/$(DEPDIR) lzma/$(DEPDIR) mars/$(DEPDIR) plaintext/$(DEPDIR) radiogram/$(DEPDIR) redx/$(DEPDIR) transfer/$(DEPDIR) utils/$(DEPDIR) widgets/$(DEPDIR) wx/$(DEPDIR) xmlrpcpp/$(DEPDIR) | |
3594 | -rm -rf ./$(DEPDIR) arq/$(DEPDIR) blank-dnd/$(DEPDIR) cap/$(DEPDIR) csv/$(DEPDIR) custom/$(DEPDIR) ham_forms/$(DEPDIR) hics/$(DEPDIR) iaru/$(DEPDIR) ics/$(DEPDIR) lzma/$(DEPDIR) mars/$(DEPDIR) plaintext/$(DEPDIR) radiogram/$(DEPDIR) transfer/$(DEPDIR) utils/$(DEPDIR) widgets/$(DEPDIR) wx/$(DEPDIR) xmlrpcpp/$(DEPDIR) | |
3811 | 3595 | -rm -f Makefile |
3812 | 3596 | distclean-am: clean-am distclean-compile distclean-generic \ |
3813 | 3597 | distclean-hdr distclean-tags |
3853 | 3637 | installcheck-am: installcheck-binPROGRAMS |
3854 | 3638 | |
3855 | 3639 | maintainer-clean: maintainer-clean-am |
3856 | -rm -rf ./$(DEPDIR) arq/$(DEPDIR) blank-dnd/$(DEPDIR) cap/$(DEPDIR) csv/$(DEPDIR) custom/$(DEPDIR) ham_forms/$(DEPDIR) hics/$(DEPDIR) iaru/$(DEPDIR) ics/$(DEPDIR) lzma/$(DEPDIR) mars/$(DEPDIR) plaintext/$(DEPDIR) radiogram/$(DEPDIR) redx/$(DEPDIR) transfer/$(DEPDIR) utils/$(DEPDIR) widgets/$(DEPDIR) wx/$(DEPDIR) xmlrpcpp/$(DEPDIR) | |
3640 | -rm -rf ./$(DEPDIR) arq/$(DEPDIR) blank-dnd/$(DEPDIR) cap/$(DEPDIR) csv/$(DEPDIR) custom/$(DEPDIR) ham_forms/$(DEPDIR) hics/$(DEPDIR) iaru/$(DEPDIR) ics/$(DEPDIR) lzma/$(DEPDIR) mars/$(DEPDIR) plaintext/$(DEPDIR) radiogram/$(DEPDIR) transfer/$(DEPDIR) utils/$(DEPDIR) widgets/$(DEPDIR) wx/$(DEPDIR) xmlrpcpp/$(DEPDIR) | |
3857 | 3641 | -rm -f Makefile |
3858 | 3642 | maintainer-clean-am: distclean-am maintainer-clean-generic |
3859 | 3643 |
298 | 298 | { |
299 | 299 | char msg[200] = "send DATA"; |
300 | 300 | string Frame; |
301 | static char szbknbr[10]; | |
301 | static char szbknbr[12]; | |
302 | 302 | payload = xmttext.substr(0, buffer_length); |
303 | 303 | last_buffer_length = buffer_length; |
304 | 304 | |
907 | 907 | if (arq_running) return; // ONLY ONE instance allowed |
908 | 908 | inst = this; |
909 | 909 | |
910 | get_fldigi_rxid(); | |
911 | get_fldigi_txid(); | |
912 | ||
913 | 910 | if (pthread_create(&arq_thread, NULL, arqloop, NULL) < 0) { |
914 | 911 | LOG_ERROR("arq init: pthread_create failed"); |
915 | 912 | arq_running = false; |
642 | 642 | static string rxurcall_s; |
643 | 643 | static void rxurcall(void *) |
644 | 644 | { |
645 | if (!arq_group->visible()) | |
646 | ARQdropdown(true); | |
647 | ||
648 | 645 | txtSENDTO->value(rxurcall_s.c_str()); |
649 | 646 | rxurcall_s.clear(); |
650 | 647 | } |
37 | 37 | tab_blank = new Fl_Group(0, tab_top, 570, 380); |
38 | 38 | tab_blank->align(FL_ALIGN_TOP); |
39 | 39 | |
40 | txt_blank_msg = new FTextEdit(4, 50, 562, 370); | |
40 | // txt_blank_msg = new FTextEdit(4, 50, 562, 370); | |
41 | txt_blank_msg = new FTextEdit(2, tab_blank->y() + 4, tab_blank->w() - 4, tab_blank->h() - 6); | |
41 | 42 | txt_blank_msg->box(FL_DOWN_FRAME); |
42 | 43 | txt_blank_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); |
43 | 44 | txt_blank_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); |
170 | 170 | |
171 | 171 | static string numeric(int n) |
172 | 172 | { |
173 | static char snum[10]; | |
173 | static char snum[12]; | |
174 | 174 | snprintf(snum, sizeof(snum), "%d", n); |
175 | 175 | return snum; |
176 | 176 | } |
509 | 509 | if (progStatus.rgnbr_fname) { |
510 | 510 | int n = atoi(progStatus.rgnbr.c_str()); |
511 | 511 | n++; |
512 | char szn[10]; | |
512 | char szn[12]; | |
513 | 513 | snprintf(szn, sizeof(szn), "%d", n); |
514 | 514 | progStatus.rgnbr = szn; |
515 | 515 | txt_rgnbr->value(szn); |
136 | 136 | void create_cap105_tab() |
137 | 137 | { |
138 | 138 | int Y = tab_top; |
139 | tab_cap105 = new Fl_Group(0, Y, 570, 404); | |
139 | tab_cap105 = new Fl_Group(0, Y, 570, 380); | |
140 | 140 | tab_cap105->align(FL_ALIGN_TOP); |
141 | 141 | |
142 | 142 | Y += 4; |
84 | 84 | void create_cap110_tab() |
85 | 85 | { |
86 | 86 | int Y = tab_top; |
87 | tab_cap110 = new Fl_Group(0, Y, 570, 404); | |
87 | tab_cap110 = new Fl_Group(0, Y, 570, 380); | |
88 | 88 | tab_cap110->align(FL_ALIGN_TOP); |
89 | 89 | |
90 | 90 | Y += 24; |
231 | 231 | } |
232 | 232 | |
233 | 233 | Y += 36; |
234 | { | |
235 | Fl_Box* o = new Fl_Box(2, Y, 85, 20, _("TIME")); | |
236 | o->box(FL_BORDER_FRAME); | |
237 | o->labelsize(13); | |
238 | o->color((Fl_Color)215); | |
239 | } // Fl_Box* o | |
240 | { | |
241 | Fl_Box* o = new Fl_Box(87, Y, 75, 20, _("CALL")); | |
242 | o->box(FL_BORDER_FRAME); | |
243 | o->labelsize(13); | |
244 | o->color((Fl_Color)215); | |
245 | } // Fl_Box* o | |
246 | { | |
247 | Fl_Box* o = new Fl_Box(162, Y, 50, 20, _("CH REF")); | |
248 | o->box(FL_BORDER_FRAME); | |
249 | o->labelsize(13); | |
250 | o->color((Fl_Color)215); | |
251 | } // Fl_Box* o | |
252 | { | |
253 | Fl_Box* o = new Fl_Box(212, Y, 340, 20, _("REMARKS")); | |
254 | o->box(FL_BORDER_FRAME); | |
255 | o->labelsize(13); | |
256 | o->color((Fl_Color)215); | |
257 | } // Fl_Box* o | |
258 | { | |
234 | Fl_Group *g1a = new Fl_Group(2, Y, 566, 260); | |
235 | ||
236 | Fl_Box* bx1 = new Fl_Box(2, Y, 85, 20, _("TIME")); | |
237 | bx1->box(FL_DOWN_BOX); | |
238 | bx1->labelsize(13); | |
239 | bx1->color((Fl_Color)215); | |
240 | ||
241 | Fl_Box* bx2 = new Fl_Box(bx1->x() + bx1->w(), Y, 75, 20, _("CALL")); | |
242 | bx2->box(FL_DOWN_BOX); | |
243 | bx2->labelsize(13); | |
244 | bx2->color((Fl_Color)215); | |
245 | ||
246 | Fl_Box* bx3 = new Fl_Box(bx2->x() + bx2->w(), Y, 50, 20, _("CH REF")); | |
247 | bx3->box(FL_DOWN_BOX); | |
248 | bx3->labelsize(13); | |
249 | bx3->color((Fl_Color)215); | |
250 | ||
251 | Fl_Box* bx4 = new Fl_Box(bx3->x() + bx3->w(), Y, 340, 20, _("REMARKS")); | |
252 | bx4->box(FL_DOWN_BOX); | |
253 | bx4->labelsize(13); | |
254 | bx4->color((Fl_Color)215); | |
255 | ||
259 | 256 | Y += 22; |
260 | Fl_Scroll* o = new Fl_Scroll(2, Y, 566, 240); | |
261 | o->type(2); | |
262 | o->box(FL_DOWN_BOX); | |
263 | o->color((Fl_Color)215); | |
257 | Fl_Scroll* scrl = new Fl_Scroll(2, Y, 566, 240); | |
258 | scrl->type(Fl_Scroll::VERTICAL_ALWAYS); | |
259 | scrl->box(FL_DOWN_BOX); | |
260 | // scrl->color((Fl_Color)215); | |
264 | 261 | for (int i = 0; i < 23; i++) { |
265 | 262 | txt_110_comm_time[i] = new Fl_Input2(2, Y + i*22, 65, 22); |
266 | 263 | txt_110_comm_time[i]->tooltip(_("")); |
267 | txt_110_comm_time[i]->box(FL_DOWN_BOX); | |
268 | txt_110_comm_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
269 | txt_110_comm_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
270 | txt_110_comm_time[i]->labeltype(FL_NORMAL_LABEL); | |
271 | txt_110_comm_time[i]->labelfont(0); | |
272 | txt_110_comm_time[i]->labelsize(13); | |
273 | txt_110_comm_time[i]->textsize(11); | |
274 | txt_110_comm_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
275 | txt_110_comm_time[i]->align(FL_ALIGN_CENTER); | |
276 | 264 | txt_110_comm_time[i]->callback(cap110_changed); |
277 | 265 | txt_110_comm_time[i]->when(FL_WHEN_CHANGED); |
278 | 266 | |
279 | btn_110_comm_time[i] = new Fl_Button(67, Y + i*22, 20, 20, _("..")); | |
267 | btn_110_comm_time[i] = new Fl_Button( | |
268 | txt_110_comm_time[i]->x() + txt_110_comm_time[i]->w(), Y + i*22, | |
269 | 20, 22, _("..")); | |
280 | 270 | btn_110_comm_time[i]->tooltip(_("Set time now")); |
281 | 271 | btn_110_comm_time[i]->callback( |
282 | 272 | cb_110_comm_time_changed, (void *)&cap_bptr[i]); |
283 | 273 | |
284 | 274 | |
285 | txt_110_comm_call[i] = new Fl_Input2(87, Y + i*22, 75, 22, ""); | |
275 | txt_110_comm_call[i] = new Fl_Input2( | |
276 | btn_110_comm_time[i]->x() + btn_110_comm_time[i]->w(), Y + i*22, | |
277 | 75, 22, ""); | |
286 | 278 | txt_110_comm_call[i]->tooltip(_("")); |
287 | txt_110_comm_call[i]->box(FL_DOWN_BOX); | |
288 | txt_110_comm_call[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
289 | txt_110_comm_call[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
290 | txt_110_comm_call[i]->labeltype(FL_NORMAL_LABEL); | |
291 | txt_110_comm_call[i]->labelfont(0); | |
292 | txt_110_comm_call[i]->labelsize(13); | |
293 | txt_110_comm_call[i]->textsize(11); | |
294 | txt_110_comm_call[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
295 | txt_110_comm_call[i]->align(FL_ALIGN_CENTER); | |
296 | 279 | txt_110_comm_call[i]->callback(cap110_changed); |
297 | 280 | txt_110_comm_call[i]->when(FL_WHEN_CHANGED); |
298 | 281 | |
299 | txt_110_comm_chref[i] = new Fl_Input2(162, Y + i*22, 50, 22); | |
282 | txt_110_comm_chref[i] = new Fl_Input2( | |
283 | txt_110_comm_call[i]->x() + txt_110_comm_call[i]->w(), Y + i*22, | |
284 | 50, 22); | |
300 | 285 | txt_110_comm_chref[i]->tooltip(_("")); |
301 | txt_110_comm_chref[i]->box(FL_DOWN_BOX); | |
302 | txt_110_comm_chref[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
303 | txt_110_comm_chref[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
304 | txt_110_comm_chref[i]->labeltype(FL_NORMAL_LABEL); | |
305 | txt_110_comm_chref[i]->labelfont(0); | |
306 | txt_110_comm_chref[i]->labelsize(13); | |
307 | txt_110_comm_chref[i]->textsize(11); | |
308 | txt_110_comm_chref[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
309 | txt_110_comm_chref[i]->align(FL_ALIGN_CENTER); | |
310 | 286 | txt_110_comm_chref[i]->callback(cap110_changed); |
311 | 287 | txt_110_comm_chref[i]->when(FL_WHEN_CHANGED); |
312 | 288 | |
313 | txt_110_comm_rem[i] = new Fl_Input2(212, Y + i*22, 340, 22); | |
289 | txt_110_comm_rem[i] = new Fl_Input2( | |
290 | txt_110_comm_chref[i]->x() + txt_110_comm_chref[i]->w(), Y + i*22, | |
291 | 340, 22); | |
314 | 292 | txt_110_comm_rem[i]->tooltip(_("")); |
315 | txt_110_comm_rem[i]->box(FL_DOWN_BOX); | |
316 | txt_110_comm_rem[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
317 | txt_110_comm_rem[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
318 | txt_110_comm_rem[i]->labeltype(FL_NORMAL_LABEL); | |
319 | txt_110_comm_rem[i]->labelfont(0); | |
320 | txt_110_comm_rem[i]->labelsize(13); | |
321 | txt_110_comm_rem[i]->textsize(11); | |
322 | txt_110_comm_rem[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
323 | txt_110_comm_rem[i]->align(FL_ALIGN_CENTER); | |
324 | 293 | txt_110_comm_rem[i]->callback(cap110_changed); |
325 | 294 | txt_110_comm_rem[i]->when(FL_WHEN_CHANGED); |
326 | 295 | } |
327 | o->end(); | |
328 | } // Fl_Scroll* o | |
296 | scrl->end(); | |
297 | g1a->end(); | |
298 | ||
299 | Fl_Group *g1b = new Fl_Group(569, Y, 2, 260); | |
300 | g1b->box(FL_FLAT_BOX); | |
301 | g1b->end(); | |
329 | 302 | |
330 | 303 | tab_cap110->end(); |
304 | tab_cap110->resizable(g1b); | |
305 | ||
331 | 306 | tab_cap110->hide(); |
332 | 307 | } |
333 | 308 |
1 | 1 | /* src/config.h.in. Generated from configure.ac by autoheader. */ |
2 | 2 | |
3 | 3 | /* Build platform */ |
4 | #define BUILD_BUILD_PLATFORM "i686-pc-linux-gnu" | |
4 | #define BUILD_BUILD_PLATFORM "x86_64-pc-linux-gnu" | |
5 | 5 | |
6 | 6 | /* Compiler */ |
7 | #define BUILD_COMPILER "gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11) " | |
7 | #define BUILD_COMPILER "gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) " | |
8 | 8 | |
9 | 9 | /* Configure arguments */ |
10 | #define BUILD_CONFIGURE_ARGS "" | |
10 | #define BUILD_CONFIGURE_ARGS "'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/local/lib64/pkgconfig/'" | |
11 | 11 | |
12 | 12 | /* Build date */ |
13 | #define BUILD_DATE "Sat Jan 19 09:16:20 CST 2019" | |
13 | #define BUILD_DATE "Tue Jul 23 09:04:13 CDT 2019" | |
14 | 14 | |
15 | 15 | /* Build host */ |
16 | #define BUILD_HOST "dc7600" | |
16 | #define BUILD_HOST "m90p" | |
17 | 17 | |
18 | 18 | /* Host platform */ |
19 | #define BUILD_HOST_PLATFORM "i686-pc-linux-gnu" | |
19 | #define BUILD_HOST_PLATFORM "x86_64-pc-linux-gnu" | |
20 | 20 | |
21 | 21 | /* Target platform */ |
22 | #define BUILD_TARGET_PLATFORM "i686-pc-linux-gnu" | |
22 | #define BUILD_TARGET_PLATFORM "x86_64-pc-linux-gnu" | |
23 | 23 | |
24 | 24 | /* Build user */ |
25 | 25 | #define BUILD_USER "dave" |
26 | 26 | |
27 | 27 | /* FLMSG compiler flags */ |
28 | #define FLMSG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG" | |
28 | #define FLMSG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG" | |
29 | 29 | |
30 | 30 | /* FLMSG linker flags */ |
31 | 31 | #define FLMSG_BUILD_LDFLAGS "-L/usr/local/lib -lfltk_images -lpng -lz -lfltk_jpeg -lfltk -lXrender -lXft -lfontconfig -lpthread -ldl -lm -lX11 -lX11 -ldl -lpthread" |
40 | 40 | #define FLMSG_FLTK_API_PATCH 4 |
41 | 41 | |
42 | 42 | /* version string */ |
43 | #define FLMSG_VERSION "4.0.8.04" | |
43 | #define FLMSG_VERSION "4.0.11" | |
44 | 44 | |
45 | 45 | /* major version number */ |
46 | 46 | #define FLMSG_VERSION_MAJOR 4 |
49 | 49 | #define FLMSG_VERSION_MINOR 0 |
50 | 50 | |
51 | 51 | /* patch/alpha version string */ |
52 | #define FLMSG_VERSION_PATCH ".8.04" | |
52 | #define FLMSG_VERSION_PATCH ".11" | |
53 | 53 | |
54 | 54 | /* FLTK version */ |
55 | 55 | #define FLTK_BUILD_VERSION "1.3.4" |
193 | 193 | #define PACKAGE_NAME "FLMSG" |
194 | 194 | |
195 | 195 | /* Define to the full name and version of this package. */ |
196 | #define PACKAGE_STRING "FLMSG 4.0.8.04" | |
196 | #define PACKAGE_STRING "FLMSG 4.0.11" | |
197 | 197 | |
198 | 198 | /* Define to the one symbol short name of this package. */ |
199 | 199 | #define PACKAGE_TARNAME "flmsg" |
202 | 202 | #define PACKAGE_URL "" |
203 | 203 | |
204 | 204 | /* Define to the version of this package. */ |
205 | #define PACKAGE_VERSION "4.0.8.04" | |
205 | #define PACKAGE_VERSION "4.0.11" | |
206 | 206 | |
207 | 207 | /* Define to 1 if you have the ANSI C header files. */ |
208 | 208 | #define STDC_HEADERS 1 |
236 | 236 | #define USE_X 1 |
237 | 237 | |
238 | 238 | /* Version number of package */ |
239 | #define VERSION "4.0.8.04" | |
239 | #define VERSION "4.0.11" | |
240 | 240 | |
241 | 241 | /* x version */ |
242 | #define X_BUILD_VERSION "1.6.3" | |
242 | #define X_BUILD_VERSION "1.6.4" | |
243 | 243 | |
244 | 244 | /* Define to 1 if on MINIX. */ |
245 | 245 | /* #undef _MINIX */ |
61 | 61 | |
62 | 62 | void create_csv_tab() |
63 | 63 | { |
64 | tab_csv = new Fl_Group(0, tab_top, 570, 430 - tab_top); | |
64 | tab_csv = new Fl_Group(0, tab_top, 570, 380); | |
65 | 65 | tab_csv->align(FL_ALIGN_TOP); |
66 | 66 | |
67 | 67 | btn_csv_import = new Fl_Button(570/2 - 220, tab_top + 5, 100, 24, _("Import CSV")); |
1303 | 1303 | |
1304 | 1304 | void load_custom_html_file() |
1305 | 1305 | { |
1306 | if (def_custom_filename.empty()) return; | |
1306 | 1307 | string fname = CUSTOM_dir; |
1307 | 1308 | fname.append(def_custom_transfer_filename); |
1308 | 1309 | transfer_custom_buffer.clear(); |
59 | 59 | void create_custom_tab() |
60 | 60 | { |
61 | 61 | int width = 570; |
62 | tab_custom = new Fl_Group(0, tab_top, width, 430 - tab_top); | |
62 | tab_custom = new Fl_Group(0, tab_top, 570, 380); | |
63 | 63 | tab_custom->align(FL_ALIGN_TOP); |
64 | 64 | |
65 | 65 | btn_custom_edit = new Fl_Button(width/2 - 120, tab_top + 5, 100, 24, _("Edit Form")); |
33 | 33 | |
34 | 34 | void create_custom_transfer_tab() |
35 | 35 | { |
36 | tab_custom_transfer = new Fl_Group(0, tab_top, 570, 430 - tab_top); | |
36 | tab_custom_transfer = new Fl_Group(0, tab_top, 570, 380); | |
37 | 37 | tab_custom_transfer->align(FL_ALIGN_TOP); |
38 | 38 | |
39 | Fl_Group *TransmitGroup = new Fl_Group(2, tab_top + 30, 566, 80, _("Transmit Custom FORM")); | |
39 | Fl_Group *TransmitGroup = new Fl_Group(2, tab_top + 30, 566, 80, _("Transmit Custom FORM for transfer")); | |
40 | 40 | TransmitGroup->box(FL_ENGRAVED_BOX); |
41 | 41 | TransmitGroup->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE); |
42 | 42 | |
43 | custom_selector = new Fl_ListBox( 10, tab_top + 65, 300, 24, _("Select custom form")); | |
43 | custom_selector = new Fl_ListBox( 10, tab_top + 65, 480, 24, _("Select custom form")); | |
44 | custom_selector->align(FL_ALIGN_TOP_LEFT); | |
44 | 45 | load_custom_transfer(); |
45 | 46 | custom_selector->callback((Fl_Callback*)cb_btn_select_custom_html); |
46 | 47 | |
50 | 51 | ReceiveGroup->box(FL_ENGRAVED_BOX); |
51 | 52 | ReceiveGroup->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE); |
52 | 53 | |
53 | txt_rcvd_custom_html_filename = new Fl_Output(10, tab_top + 150, 480, 24, _("Received file:")); | |
54 | txt_rcvd_custom_html_filename = new Fl_Output(10, tab_top + 150, 480, 24, _("Received custom form")); | |
54 | 55 | txt_rcvd_custom_html_filename->align(FL_ALIGN_TOP_LEFT); |
55 | 56 | txt_rcvd_custom_html_filename->tooltip(""); |
56 | 57 |
106 | 106 | "flmsg unique options", |
107 | 107 | "--help", |
108 | 108 | "--version", |
109 | "--viewer\topen as custom viewer - no main dialog", | |
110 | "--editor\topen as custom editor - no main dialog", | |
111 | 109 | "--server-port\tstarting port number for forms web server [8080]", |
112 | 110 | "--flmsg-dir\tfull-path-name-of-folder for all FLMSG folders", |
113 | 111 | "--auto-dir\tfull-path-name-of-folder for autosend files", |
126 | 124 | "-k\t-kbd : enable keyboard focus:", |
127 | 125 | "-nok\t-nokbd : en/disable keyboard focus", |
128 | 126 | "-na\t-name [CLASSNAME]", |
129 | "-s\t-scheme [none | gtk+ | plastic]", | |
130 | " default = gtk+", | |
131 | "-ti\t-title [WINDOWTITLE]", | |
127 | "-s\t-scheme [none | base | gtk+ | plastic | gleam], default = gtk+", | |
128 | "-ti\t[WINDOWTITLE]", | |
132 | 129 | "-to\t-tooltips : enable tooltips", |
133 | 130 | "-not\t-notooltips : disable tooltips\n", |
134 | 131 | 0 |
618 | 615 | FILE *debug_file = fl_fopen(dfname.c_str(), "a"); |
619 | 616 | int n = atoi(progStatus.sernbr.c_str()); |
620 | 617 | n++; |
621 | char szn[10]; | |
618 | char szn[12]; | |
622 | 619 | snprintf(szn, sizeof(szn), "%d", n); |
623 | 620 | progStatus.sernbr = szn; |
624 | 621 | txt_sernbr->value(szn); |
685 | 682 | selected_form = STORMREP; |
686 | 683 | read_storm_buffer(buffer); |
687 | 684 | if (fname) def_storm_filename = fname; |
688 | select_form(selected_form); | |
689 | } else if (buffer.find("<redx_snw>") != string::npos) { | |
690 | selected_form = REDXSNW; | |
691 | read_redx_snw_buffer(buffer); | |
692 | if (fname) def_redx_snw_filename = fname; | |
693 | select_form(selected_form); | |
694 | } else if (buffer.find("<redx_5739>") != string::npos) { | |
695 | selected_form = REDX5739; | |
696 | read_redx_5739_buffer(buffer); | |
697 | if (fname) def_redx_5739_filename = fname; | |
698 | select_form(selected_form); | |
699 | } else if (buffer.find("<redx_5739A>") != string::npos) { | |
700 | selected_form = REDX5739A; | |
701 | read_redx_5739A_buffer(buffer); | |
702 | if (fname) def_redx_5739A_filename = fname; | |
703 | select_form(selected_form); | |
704 | } else if (buffer.find("<redx_5739B>") != string::npos) { | |
705 | selected_form = REDX5739B; | |
706 | read_redx_5739B_buffer(buffer); | |
707 | if (fname) def_redx_5739B_filename = fname; | |
708 | 685 | select_form(selected_form); |
709 | 686 | } else if (buffer.find("<hics203>") != string::npos) { |
710 | 687 | selected_form = HICS203; |
870 | 847 | case WXHC: return eval_wxhc_fsize(); |
871 | 848 | case SEVEREWX: return eval_severe_wx_fsize(); |
872 | 849 | case STORMREP: return eval_storm_fsize(); |
873 | case REDXSNW: return eval_redx_snw_fsize(); | |
874 | case REDX5739: return eval_redx_5739_fsize(); | |
875 | case REDX5739A: return eval_redx_5739A_fsize(); | |
876 | case REDX5739B: return eval_redx_5739B_fsize(); | |
877 | 850 | default : ; |
878 | 851 | } |
879 | 852 | return 0; |
911 | 884 | case WXHC: cb_wxhc_new(); break; |
912 | 885 | case SEVEREWX: cb_severe_wx_new(); break; |
913 | 886 | case STORMREP: cb_storm_new(); break; |
914 | case REDXSNW: cb_redx_snw_new(); break; | |
915 | case REDX5739: cb_redx_5739_new(); break; | |
916 | case REDX5739A: cb_redx_5739A_new(); break; | |
917 | case REDX5739B: cb_redx_5739B_new(); break; | |
918 | 887 | default : return; |
919 | 888 | } |
920 | 889 | clear_estimate(); |
944 | 913 | case BLANK: |
945 | 914 | case CSV: |
946 | 915 | case CUSTOM: |
947 | case REDXSNW: | |
948 | case REDX5739: | |
949 | case REDX5739A: | |
950 | case REDX5739B: | |
951 | 916 | case MARSDAILY: |
952 | 917 | case MARSINEEI: |
953 | 918 | case MARSNET: |
985 | 950 | case BLANK: |
986 | 951 | case CSV: |
987 | 952 | case CUSTOM: |
988 | case REDXSNW: | |
989 | case REDX5739: | |
990 | case REDX5739A: | |
991 | case REDX5739B: | |
992 | 953 | case MARSDAILY: |
993 | 954 | case MARSINEEI: |
994 | 955 | case MARSNET: |
1107 | 1068 | } else if (inpbuffer.find("<storm_wx>") != string::npos) { |
1108 | 1069 | selected_form = STORMREP; |
1109 | 1070 | cb_storm_wrap_import(filename, inpbuffer);; |
1110 | } else if (inpbuffer.find("<redx_snw>") != string::npos) { | |
1111 | selected_form = REDXSNW; | |
1112 | cb_redx_snw_wrap_import(filename, inpbuffer); | |
1113 | } else if (inpbuffer.find("<redx_5739>") != string::npos) { | |
1114 | selected_form = REDX5739; | |
1115 | cb_redx_5739_wrap_import(filename, inpbuffer); | |
1116 | } else if (inpbuffer.find("<redx_5739A>") != string::npos) { | |
1117 | selected_form = REDX5739A; | |
1118 | cb_redx_5739A_wrap_import(filename, inpbuffer); | |
1119 | } else if (inpbuffer.find("<redx_5739B>") != string::npos) { | |
1120 | selected_form = REDX5739B; | |
1121 | cb_redx_5739B_wrap_import(filename, inpbuffer); | |
1122 | 1071 | } else if (inpbuffer.find("<transfer>") != string::npos) { |
1123 | 1072 | selected_form = TRANSFER; |
1124 | 1073 | cb_transfer_wrap_import(filename, inpbuffer); |
1228 | 1177 | case WXHC: cb_wxhc_wrap_export(); break; |
1229 | 1178 | case SEVEREWX: cb_severe_wx_wrap_export(); break; |
1230 | 1179 | case STORMREP: cb_storm_wrap_export(); break; |
1231 | case REDXSNW: cb_redx_snw_wrap_export(); break; | |
1232 | case REDX5739: cb_redx_5739_wrap_export(); break; | |
1233 | case REDX5739A: cb_redx_5739A_wrap_export(); break; | |
1234 | case REDX5739B: cb_redx_5739B_wrap_export(); break; | |
1235 | 1180 | default: return; |
1236 | 1181 | } |
1237 | 1182 | |
1280 | 1225 | case WXHC: cb_wxhc_wrap_autosend(); break; |
1281 | 1226 | case SEVEREWX: cb_severe_wx_wrap_autosend(); break; |
1282 | 1227 | case STORMREP: cb_storm_wrap_autosend(); break; |
1283 | case REDXSNW: cb_redx_snw_wrap_autosend(); break; | |
1284 | case REDX5739: cb_redx_5739_wrap_autosend(); break; | |
1285 | case REDX5739A: cb_redx_5739A_wrap_autosend(); break; | |
1286 | case REDX5739B: cb_redx_5739B_wrap_autosend(); break; | |
1287 | 1228 | default: return; |
1288 | 1229 | } |
1289 | 1230 | } |
1319 | 1260 | case WXHC: cb_wxhc_load_template(); break; |
1320 | 1261 | case SEVEREWX: cb_severe_wx_load_template(); break; |
1321 | 1262 | case STORMREP: cb_storm_load_template(); break; |
1322 | case REDXSNW: cb_redx_snw_load_template(); break; | |
1323 | case REDX5739: cb_redx_5739_load_template(); break; | |
1324 | case REDX5739A: cb_redx_5739A_load_template(); break; | |
1325 | case REDX5739B: cb_redx_5739B_load_template(); break; | |
1326 | 1263 | default: return; |
1327 | 1264 | } |
1328 | 1265 | estimate(); |
1359 | 1296 | case WXHC: cb_wxhc_save_template(); break; |
1360 | 1297 | case SEVEREWX: cb_severe_wx_save_template(); break; |
1361 | 1298 | case STORMREP: cb_storm_save_template(); break; |
1362 | case REDXSNW: cb_redx_snw_save_template(); break; | |
1363 | case REDX5739: cb_redx_5739_save_template(); break; | |
1364 | case REDX5739A: cb_redx_5739A_save_template(); break; | |
1365 | case REDX5739B: cb_redx_5739B_save_template(); break; | |
1366 | 1299 | default: return; |
1367 | 1300 | } |
1368 | 1301 | } |
1398 | 1331 | case WXHC: cb_wxhc_save_as_template(); break; |
1399 | 1332 | case SEVEREWX: cb_severe_wx_save_as_template(); break; |
1400 | 1333 | case STORMREP: cb_storm_save_as_template(); break; |
1401 | case REDXSNW: cb_redx_snw_save_as_template(); break; | |
1402 | case REDX5739: cb_redx_5739_save_as_template(); break; | |
1403 | case REDX5739A: cb_redx_5739A_save_as_template(); break; | |
1404 | case REDX5739B: cb_redx_5739B_save_as_template(); break; | |
1405 | 1334 | default: return; |
1406 | 1335 | } |
1407 | 1336 | } |
1437 | 1366 | case WXHC: cb_wxhc_open(); break; |
1438 | 1367 | case SEVEREWX: cb_severe_wx_open(); break; |
1439 | 1368 | case STORMREP: cb_storm_open(); break; |
1440 | case REDXSNW: cb_redx_snw_open(); break; | |
1441 | case REDX5739: cb_redx_5739_open(); break; | |
1442 | case REDX5739A: cb_redx_5739A_open(); break; | |
1443 | case REDX5739B: cb_redx_5739B_open(); break; | |
1444 | 1369 | default : return; |
1445 | 1370 | } |
1446 | 1371 | estimate(); |
1456 | 1381 | case ICS213: cb_213_save_as(); break; |
1457 | 1382 | case ICS214: cb_214_save_as(); break; |
1458 | 1383 | case ICS216: cb_216_save_as(); break; |
1384 | case ICS309: cb_309_save_as(); break; | |
1459 | 1385 | case NETLOG: cb_netlog_save_as(); break; |
1460 | 1386 | case HICS203: cb_hics203_save_as(); break; |
1461 | 1387 | case HICS206: h206_cb_save_as(); break; |
1473 | 1399 | case WXHC: cb_wxhc_save_as(); break; |
1474 | 1400 | case SEVEREWX: cb_severe_wx_save_as(); break; |
1475 | 1401 | case STORMREP: cb_storm_save_as(); break; |
1476 | case REDXSNW: cb_redx_snw_save_as(); break; | |
1477 | case REDX5739: cb_redx_5739_save_as(); break; | |
1478 | case REDX5739A: cb_redx_5739A_save_as(); break; | |
1479 | case REDX5739B: cb_redx_5739B_save_as(); break; | |
1480 | 1402 | case BLANK: cb_blank_save_as(); break; |
1481 | 1403 | case CSV: cb_csv_save_as(); break; |
1482 | 1404 | case CUSTOM: cb_custom_save_as(); break; |
1512 | 1434 | case WXHC: cb_wxhc_save(); break; |
1513 | 1435 | case SEVEREWX: cb_severe_wx_save(); break; |
1514 | 1436 | case STORMREP: cb_storm_save(); break; |
1515 | case REDXSNW: cb_redx_snw_save(); break; | |
1516 | case REDX5739: cb_redx_5739_save(); break; | |
1517 | case REDX5739A: cb_redx_5739A_save(); break; | |
1518 | case REDX5739B: cb_redx_5739B_save(); break; | |
1519 | 1437 | case BLANK: cb_blank_save(); break; |
1520 | 1438 | case CSV: cb_csv_save(); break; |
1521 | 1439 | case CUSTOM: cb_custom_save(); break; |
1551 | 1469 | case WXHC: cb_wxhc_html(); break; |
1552 | 1470 | case SEVEREWX: cb_severe_wx_html(); break; |
1553 | 1471 | case STORMREP: cb_storm_html(); break; |
1554 | case REDXSNW: cb_redx_snw_html(); break; | |
1555 | case REDX5739: cb_redx_5739_html(); break; | |
1556 | case REDX5739A: cb_redx_5739A_html(); break; | |
1557 | case REDX5739B: cb_redx_5739B_html(); break; | |
1558 | 1472 | case BLANK: cb_blank_html(); break; |
1559 | 1473 | case CSV: cb_csv_html(); break; |
1560 | 1474 | case CUSTOM: cb_custom_html(false); break; |
1612 | 1526 | case WXHC: cb_wxhc_textout(); break; |
1613 | 1527 | case SEVEREWX: cb_severe_wx_textout(); break; |
1614 | 1528 | case STORMREP: cb_storm_textout(); break; |
1615 | case REDXSNW: cb_redx_snw_textout(); break; | |
1616 | case REDX5739: cb_redx_5739_textout(); break; | |
1617 | case REDX5739A: cb_redx_5739A_textout(); break; | |
1618 | case REDX5739B: cb_redx_5739B_textout(); break; | |
1619 | 1529 | case CSV: cb_csv_textout(); break; |
1620 | 1530 | case CUSTOM: cb_custom_textout(); break; |
1621 | 1531 | case BLANK: cb_blank_textout(); break; |
1741 | 1651 | break; |
1742 | 1652 | case STORMREP: |
1743 | 1653 | base_storm_filename = fl_filename_name(p.c_str()); |
1744 | break; | |
1745 | case REDXSNW: | |
1746 | base_redx_snw_filename = fl_filename_name(p.c_str()); | |
1747 | break; | |
1748 | case REDX5739: | |
1749 | base_redx_5739_filename = fl_filename_name(p.c_str()); | |
1750 | break; | |
1751 | case REDX5739A: | |
1752 | base_redx_5739A_filename = fl_filename_name(p.c_str()); | |
1753 | break; | |
1754 | case REDX5739B: | |
1755 | base_redx_5739B_filename = fl_filename_name(p.c_str()); | |
1756 | 1654 | break; |
1757 | 1655 | case BLANK: |
1758 | 1656 | base_blank_filename = fl_filename_name(p.c_str()); |
1979 | 1877 | def_storm_filename.append("default").append(FSTRM_EXT); |
1980 | 1878 | def_storm_TemplateName = ICS_tmp_dir; |
1981 | 1879 | def_storm_TemplateName.append("default").append(TSTRM_EXT); |
1982 | ||
1983 | def_redx_snw_filename = ICS_msg_dir; | |
1984 | def_redx_snw_filename.append("default").append(FREDXSNW_EXT); | |
1985 | def_redx_snw_TemplateName = ICS_tmp_dir; | |
1986 | def_redx_snw_TemplateName.append("default").append(TREDXSNW_EXT); | |
1987 | ||
1988 | def_redx_5739_filename = ICS_msg_dir; | |
1989 | def_redx_5739_filename.append("default").append(FREDX5739_EXT); | |
1990 | def_redx_5739_TemplateName = ICS_tmp_dir; | |
1991 | def_redx_5739_TemplateName.append("default").append(TREDX5739_EXT); | |
1992 | ||
1993 | def_redx_5739A_filename = ICS_msg_dir; | |
1994 | def_redx_5739A_filename.append("default").append(FREDX5739A_EXT); | |
1995 | def_redx_5739A_TemplateName = ICS_tmp_dir; | |
1996 | def_redx_5739A_TemplateName.append("default").append(TREDX5739A_EXT); | |
1997 | ||
1998 | def_redx_5739B_filename = ICS_msg_dir; | |
1999 | def_redx_5739B_filename.append("default").append(FREDX5739B_EXT); | |
2000 | def_redx_5739B_TemplateName = ICS_tmp_dir; | |
2001 | def_redx_5739B_TemplateName.append("default").append(TREDX5739B_EXT); | |
2002 | 1880 | |
2003 | 1881 | { |
2004 | 1882 | if (!cmd_fname.empty()) { |
2035 | 1913 | |
2036 | 1914 | int main(int argc, char *argv[]) |
2037 | 1915 | { |
1916 | bool have_title = false; | |
2038 | 1917 | if (argc > 1) { |
2039 | 1918 | if (strcasecmp("--help", argv[1]) == 0) { |
2040 | 1919 | int i = 0; |
2048 | 1927 | printf("Version: %s\n", VERSION); |
2049 | 1928 | return 0; |
2050 | 1929 | } |
1930 | for (int i = 0; i < argc; i++) | |
1931 | if (strcasecmp("-ti", argv[i]) == 0) have_title = true; | |
2051 | 1932 | } |
2052 | 1933 | |
2053 | 1934 | Fl::lock(); |
2204 | 2085 | exit(EXIT_FAILURE); |
2205 | 2086 | } |
2206 | 2087 | |
2207 | expert_dialog->resize( progStatus.mainX, progStatus.mainY, expert_dialog->w(), expert_dialog->h()); | |
2088 | expert_dialog->size_range(570, 492); | |
2089 | expert_dialog->resize( | |
2090 | progStatus.mainX, progStatus.mainY, | |
2091 | progStatus.expertW, progStatus.expertH); | |
2208 | 2092 | |
2209 | 2093 | tyro_dialog->resize( progStatus.mainX, progStatus.mainY, tyro_dialog->w(), tyro_dialog->h()); |
2210 | 2094 | |
2222 | 2106 | mainwindow->show(argc, argv); |
2223 | 2107 | #endif |
2224 | 2108 | |
2225 | ARQdropdown(progStatus.arq_shown); | |
2226 | ||
2227 | string main_label = PACKAGE_NAME; | |
2228 | main_label.append(": ").append(PACKAGE_VERSION); | |
2229 | expert_dialog->label(main_label.c_str()); | |
2230 | tyro_dialog->label(main_label.c_str()); | |
2109 | if (!have_title) { | |
2110 | string main_label; | |
2111 | main_label = PACKAGE_NAME; | |
2112 | main_label.append(": ").append(PACKAGE_VERSION); | |
2113 | expert_dialog->label(main_label.c_str()); | |
2114 | tyro_dialog->label(main_label.c_str()); | |
2115 | } | |
2231 | 2116 | |
2232 | 2117 | Fl::add_timeout(0.10, after_start); |
2233 | 2118 | |
2347 | 2232 | case STORMREP : |
2348 | 2233 | cb_storm_save(); |
2349 | 2234 | cb_storm_html(); |
2350 | break; | |
2351 | case REDXSNW : | |
2352 | cb_redx_snw_save(); | |
2353 | cb_redx_snw_html(); | |
2354 | break; | |
2355 | case REDX5739 : | |
2356 | cb_redx_5739_save(); | |
2357 | cb_redx_5739_html(); | |
2358 | break; | |
2359 | case REDX5739A : | |
2360 | cb_redx_5739A_save(); | |
2361 | cb_redx_5739A_html(); | |
2362 | break; | |
2363 | case REDX5739B : | |
2364 | cb_redx_5739B_save(); | |
2365 | cb_redx_5739B_html(); | |
2366 | 2235 | break; |
2367 | 2236 | } |
2368 | 2237 | } |
2571 | 2440 | |
2572 | 2441 | int parse_args(int argc, char **argv, int& idx) |
2573 | 2442 | { |
2574 | // if (strstr(argv[idx], "--editor")) { | |
2575 | // flmsg_editor = true; | |
2576 | // idx++; | |
2577 | // parse_info.append("parsed --viewer\n"); | |
2578 | // return 1; | |
2579 | // } | |
2580 | ||
2581 | 2443 | if (strstr(argv[idx], "--p")) { |
2582 | 2444 | printme = true; |
2583 | 2445 | exit_after_print = true; |
2631 | 2493 | return 2; |
2632 | 2494 | } |
2633 | 2495 | */ |
2496 | ||
2634 | 2497 | if ( argv[idx][0] == '-' ) { |
2635 | 2498 | return 0; |
2636 | 2499 | } |
2712 | 2575 | |
2713 | 2576 | fname.find(FSWX_EXT) != string::npos || |
2714 | 2577 | fname.find(TSWX_EXT) != string::npos || |
2715 | ||
2716 | fname.find(FREDXSNW_EXT) != string::npos || | |
2717 | fname.find(TREDXSNW_EXT) != string::npos || | |
2718 | ||
2719 | fname.find(FREDX5739_EXT) != string::npos || | |
2720 | fname.find(TREDX5739_EXT) != string::npos || | |
2721 | ||
2722 | fname.find(FREDX5739A_EXT) != string::npos || | |
2723 | fname.find(TREDX5739A_EXT) != string::npos || | |
2724 | ||
2725 | fname.find(FREDX5739B_EXT) != string::npos || | |
2726 | fname.find(TREDX5739B_EXT) != string::npos || | |
2727 | 2578 | |
2728 | 2579 | fname.find(IARU_FILE_EXT) != string::npos || |
2729 | 2580 | fname.find(IARU_TEMP_EXT) != string::npos || |
60 | 60 | Fl_Output *txt_filename = (Fl_Output *)0; |
61 | 61 | Fl_Input *drop_file = (Fl_Input *)0; |
62 | 62 | |
63 | Fl_Group *all_tabs = (Fl_Group *)0; | |
63 | 64 | Fl_Group *controls = (Fl_Group *)0; |
64 | 65 | |
65 | 66 | int tab_top; |
343 | 344 | |
344 | 345 | static void cb_mnuAbout(Fl_Menu_*, void*) { |
345 | 346 | cb_About(); |
347 | } | |
348 | ||
349 | static void cb_ARC_SF_download(Fl_Menu_*, void *) { | |
350 | open_url("https://sourceforge.net/projects/fldigi/files/flmsg/templates/"); | |
351 | } | |
352 | ||
353 | static void cb_ARC_HKJ_download(Fl_Menu_*, void*) { | |
354 | open_url("http://www.w1hkj.com/files/flmsg/templates/"); | |
346 | 355 | } |
347 | 356 | |
348 | 357 | int mICS203 = ICS203; |
368 | 377 | int mMARSINEEI = MARSINEEI; |
369 | 378 | int mMARSNET = MARSNET; |
370 | 379 | int mMARSARMY = MARSARMY; |
371 | int mREDXSNW = REDXSNW; | |
372 | int mREDX5739 = REDX5739; | |
373 | int mREDX5739A = REDX5739A; | |
374 | int mREDX5739B = REDX5739B; | |
375 | 380 | int mWXHC = WXHC; |
376 | 381 | int mSEVEREWX = SEVEREWX; |
377 | 382 | int mSTORMREP = STORMREP; |
525 | 530 | show_filename(def_storm_filename); |
526 | 531 | } |
527 | 532 | |
528 | static void select_redxsnw() | |
529 | { | |
530 | oldtab = tab_redx_snw; | |
531 | tab_redx_snw->show(); | |
532 | txt_formname->value(_("Red Cross Safety & Welfare")); | |
533 | show_filename(def_redx_snw_filename); | |
534 | } | |
535 | ||
536 | static void select_redx5739() | |
537 | { | |
538 | oldtab = tab_redx_5739; | |
539 | tab_redx_5739->show(); | |
540 | txt_formname->value(_("On-Site Detailed Damage Assessment")); | |
541 | show_filename(def_redx_5739_filename); | |
542 | } | |
543 | ||
544 | static void select_redx5739A() | |
545 | { | |
546 | oldtab = tab_redx_5739A; | |
547 | tab_redx_5739A->show(); | |
548 | txt_formname->value(_("Detailed Damage Assessment Supplemental Worksheet")); | |
549 | show_filename(def_redx_5739A_filename); | |
550 | } | |
551 | ||
552 | static void select_redx5739B() | |
553 | { | |
554 | oldtab = tab_redx_5739B; | |
555 | tab_redx_5739B->show(); | |
556 | txt_formname->value(_("Area Assessment Worksheet")); | |
557 | show_filename(def_redx_5739B_filename); | |
558 | } | |
559 | ||
560 | 533 | static void select_hics203() |
561 | 534 | { |
562 | 535 | oldtab = tab_hics203; |
653 | 626 | tab_custom_transfer->show(); |
654 | 627 | txt_formname->value(_("FORM transfer")); |
655 | 628 | show_filename(def_custom_transfer_filename); |
656 | load_custom_html_file(); | |
629 | if (!def_custom_transfer_filename.empty()) | |
630 | load_custom_html_file(); | |
657 | 631 | } |
658 | 632 | |
659 | 633 | void select_form(int form) |
711 | 685 | break; |
712 | 686 | case STORMREP: |
713 | 687 | select_stormrep(); |
714 | break; | |
715 | case REDXSNW: | |
716 | select_redxsnw(); | |
717 | break; | |
718 | case REDX5739: | |
719 | select_redx5739(); | |
720 | break; | |
721 | case REDX5739A: | |
722 | select_redx5739A(); | |
723 | break; | |
724 | case REDX5739B: | |
725 | select_redx5739B(); | |
726 | 688 | break; |
727 | 689 | case HICS203: |
728 | 690 | select_hics203(); |
789 | 751 | oldtab->hide(); |
790 | 752 | tab_dnd->show(); |
791 | 753 | } |
792 | } | |
793 | ||
794 | void ARQdropdown(bool on) | |
795 | { | |
796 | if (on) { | |
797 | if (!arq_group->visible()) { | |
798 | int w = arq_group->parent()->w(); | |
799 | int h = arq_group->parent()->h(); | |
800 | arq_group->parent()->size(w, h + 30); | |
801 | arq_group->show(); | |
802 | } | |
803 | } else { | |
804 | if (arq_group->visible()) { | |
805 | int w = arq_group->parent()->w(); | |
806 | int h = arq_group->parent()->h(); | |
807 | arq_group->parent()->size(w, h - 30); | |
808 | arq_group->hide(); | |
809 | } | |
810 | } | |
811 | } | |
812 | ||
813 | static void cb_mnuARQdialog(Fl_Menu_*, void *d) | |
814 | { | |
815 | ARQdropdown(!arq_group->visible()); | |
816 | 754 | } |
817 | 755 | |
818 | 756 | static void cb_mnuARQrcvdmsgs(Fl_Menu_*, void *d) |
909 | 847 | {_("Radiogram"), 0, (Fl_Callback*)cb_mnuFormSelect, &mRADIOGRAM, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
910 | 848 | |
911 | 849 | {_("Red Cross"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, |
912 | {_("Welfare"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDXSNW, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
913 | {_("5739"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDX5739, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
914 | {_("5739A"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDX5739A, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
915 | {_("5739B"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDX5739B, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
850 | {_("Download from Source Forge"), 0, (Fl_Callback*)cb_ARC_SF_download, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
851 | {_("Download from W1HKJ web site"), 0, (Fl_Callback*)cb_ARC_HKJ_download, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
916 | 852 | {0,0,0,0,0,0,0,0,0}, |
917 | 853 | |
918 | 854 | {_("Transfer"), 0, (Fl_Callback*)cb_mnuFormSelect, &mTRANSFER, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
941 | 877 | |
942 | 878 | {_("AutoSend"), 0, (Fl_Callback*)cb_mnuAutoSend, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, |
943 | 879 | |
944 | {_("ARQ"), 0, 0, 0, 64 | FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, | |
945 | {_("Open/Close"), 0, (Fl_Callback*)cb_mnuARQdialog, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, | |
880 | {_("Utilities"), 0, 0, 0, 64 | FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, | |
946 | 881 | {_("Received Msgs"), 0, (Fl_Callback*)cb_mnuARQrcvdmsgs, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
947 | 882 | {_("Events"), 0, (Fl_Callback*)cb_events, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
948 | 883 | {0,0,0,0,0,0,0,0,0}, |
1167 | 1102 | |
1168 | 1103 | |
1169 | 1104 | Fl_Double_Window* flmsg_dialog() { |
1170 | int W = 570, H = 465;//495;//465; | |
1171 | Fl_Double_Window* w = new Fl_Double_Window(W, H, ""); | |
1172 | w->begin(); | |
1173 | w->align(FL_ALIGN_INSIDE); | |
1105 | int W = 570, H = 492; | |
1106 | Fl_Double_Window* win = new Fl_Double_Window(W, H, ""); | |
1107 | win->begin(); | |
1108 | win->align(FL_ALIGN_INSIDE); | |
1174 | 1109 | |
1175 | 1110 | mb = new Fl_Menu_Bar(0, 0, W - 60, 22); |
1176 | 1111 | |
1205 | 1140 | |
1206 | 1141 | tab_top = 46; |
1207 | 1142 | |
1208 | create_ics_tab(); | |
1209 | create_hics_tab(); | |
1210 | create_netlog_tab(); | |
1211 | create_mars_tab(); | |
1212 | create_cap105_tab(); | |
1213 | create_cap110_tab(); | |
1214 | create_iaru_tab(); | |
1215 | create_radiogram_tab(); | |
1216 | create_redx_tab(); | |
1217 | create_plaintext_tab(); | |
1218 | create_blank_tab(); | |
1219 | create_csv_tab(); | |
1220 | create_custom_tab(); | |
1221 | create_dnd_tab(); | |
1222 | create_wxhc_tab(); | |
1223 | create_severe_wx_tab(); | |
1224 | create_storm_tab(); | |
1225 | create_transfer_tab(); | |
1226 | create_custom_transfer_tab(); | |
1227 | ||
1228 | controls = new Fl_Group(0, 465 - 28, W, 28, "controls"); | |
1143 | all_tabs = new Fl_Group(0, tab_top, 570, 390); | |
1144 | create_ics_tab(); | |
1145 | create_hics_tab(); | |
1146 | create_netlog_tab(); | |
1147 | create_mars_tab(); | |
1148 | create_cap105_tab(); | |
1149 | create_cap110_tab(); | |
1150 | create_iaru_tab(); | |
1151 | create_radiogram_tab(); | |
1152 | create_plaintext_tab(); | |
1153 | create_blank_tab(); | |
1154 | create_csv_tab(); | |
1155 | create_custom_tab(); | |
1156 | create_dnd_tab(); | |
1157 | create_wxhc_tab(); | |
1158 | create_severe_wx_tab(); | |
1159 | create_storm_tab(); | |
1160 | create_transfer_tab(); | |
1161 | create_custom_transfer_tab(); | |
1162 | all_tabs->end(); | |
1163 | ||
1164 | controls = new Fl_Group(0, 465 - 30, W, 28, "controls"); | |
1229 | 1165 | controls->begin(); |
1230 | 1166 | controls->box(FL_ENGRAVED_BOX); |
1231 | 1167 | controls->align(FL_ALIGN_INSIDE); |
1271 | 1207 | |
1272 | 1208 | controls->end(); |
1273 | 1209 | |
1274 | arq_group = new Fl_Group(0, H, W, 28); | |
1210 | arq_group = new Fl_Group(0, H - 28, W, 26); | |
1275 | 1211 | arq_group->box(FL_ENGRAVED_FRAME); |
1276 | 1212 | |
1277 | Fl_Group *arq_title = new Fl_Group(2, H+3, 40, 22, "ARQ"); | |
1213 | Fl_Group *arq_title = new Fl_Group(2, arq_group->y()+2, 40, 22, "ARQ"); | |
1278 | 1214 | arq_title->box(FL_FLAT_BOX); |
1279 | 1215 | arq_title->labeltype(FL_NORMAL_LABEL); |
1280 | 1216 | arq_title->labelfont(0); |
1283 | 1219 | arq_title->align(Fl_Align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE)); |
1284 | 1220 | arq_title->end(); |
1285 | 1221 | |
1286 | btnSEND = new Fl_Button(42, H+3, 60, 22, _("Send")); | |
1222 | btnSEND = new Fl_Button(42, arq_group->y()+2, 60, 22, _("Send")); | |
1287 | 1223 | btnSEND->tooltip(_("Send data file to this station")); |
1288 | 1224 | btnSEND->callback((Fl_Callback*)cb_btnSEND); |
1289 | 1225 | |
1290 | txtSENDTO = new Fl_Input2(108, H+3, 100, 22); | |
1226 | txtSENDTO = new Fl_Input2(108, arq_group->y()+2, 100, 22); | |
1291 | 1227 | txtSENDTO->tooltip(_("Send to this station")); |
1292 | 1228 | txtSENDTO->box(FL_DOWN_BOX); |
1293 | 1229 | txtSENDTO->color(FL_BACKGROUND2_COLOR); |
1299 | 1235 | txtSENDTO->align(Fl_Align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE)); |
1300 | 1236 | txtSENDTO->when(FL_WHEN_RELEASE); |
1301 | 1237 | |
1302 | txtSTATE = new Fl_Input2(210, H+3, 200, 22, ""); | |
1238 | txtSTATE = new Fl_Input2(210, arq_group->y()+2, 200, 22, ""); | |
1303 | 1239 | txtSTATE->box(FL_FLAT_BOX); |
1304 | 1240 | txtSTATE->color(FL_BACKGROUND_COLOR); |
1305 | 1241 | txtSTATE->selection_color(FL_SELECTION_COLOR); |
1311 | 1247 | txtSTATE->when(FL_WHEN_RELEASE); |
1312 | 1248 | txtSTATE->type(FL_NORMAL_OUTPUT); |
1313 | 1249 | |
1314 | prgSTATE = new Fl_Progress(W - 74, H+4, 70, 20); | |
1250 | prgSTATE = new Fl_Progress(W - 74, arq_group->y()+3, 70, 20); | |
1315 | 1251 | prgSTATE->tooltip(_("ARQ transfer progress")); |
1316 | 1252 | prgSTATE->selection_color((Fl_Color)70); |
1317 | 1253 | prgSTATE->labelfont(1); |
1319 | 1255 | prgSTATE->maximum(1.0); |
1320 | 1256 | |
1321 | 1257 | arq_group->end(); |
1322 | arq_group->hide(); | |
1323 | ||
1324 | w->end(); | |
1258 | ||
1259 | win->end(); | |
1260 | ||
1261 | win->resizable(all_tabs); | |
1325 | 1262 | |
1326 | 1263 | init_cbo_modes(); |
1327 | 1264 | |
1328 | return w; | |
1265 | return win; | |
1329 | 1266 | } |
1330 | 1267 | |
1331 | 1268 | static void cb_btnCloseOptions(Fl_Return_Button*, void*) { |
70 | 70 | |
71 | 71 | void create_netlog_tab() |
72 | 72 | { |
73 | int Y = tab_top; | |
74 | ||
75 | tab_netlog = new Fl_Group(0, Y, 570, 390); | |
73 | tab_netlog = new Fl_Group(0, tab_top, 570, 380); | |
76 | 74 | tab_netlog->align(FL_ALIGN_TOP); |
77 | 75 | |
78 | tab_netlog_type = new Fl_Tabs(0, Y+2, 570, 387); | |
76 | tab_netlog_type = new Fl_Tabs(0, tab_top, 570, 380); | |
79 | 77 | tab_netlog_type->selection_color((Fl_Color)246); |
80 | 78 | |
81 | tab_netlog_1 = new Fl_Group(0, Y+25, 570, 360, _("Event")); | |
79 | tab_netlog_1 = new Fl_Group(0, tab_top+25, 570, 360, _("Event")); | |
82 | 80 | { |
83 | Fl_Group* o = new Fl_Group(2, Y+34, 566, 146); | |
81 | Fl_Group* o = new Fl_Group(2, tab_top+34, 566, 146); | |
84 | 82 | o->box(FL_ENGRAVED_FRAME); |
85 | 83 | o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); |
86 | 84 | |
87 | txt_netlog_event = new Fl_Input2(135, Y+40, 425, 24, _("Event Name")); | |
85 | txt_netlog_event = new Fl_Input2(135, tab_top+40, 425, 24, _("Event Name")); | |
88 | 86 | txt_netlog_event->tooltip(_("Event name")); |
89 | 87 | txt_netlog_event->box(FL_DOWN_BOX); |
90 | 88 | txt_netlog_event->color((Fl_Color)FL_BACKGROUND2_COLOR); |
97 | 95 | txt_netlog_event->callback(hamform_changed); |
98 | 96 | txt_netlog_event->when(FL_WHEN_CHANGED); |
99 | 97 | |
100 | txt_netlog_radio_operator = new Fl_Input2(135, Y+67, 425, 24, _("Radio Operator")); | |
98 | txt_netlog_radio_operator = new Fl_Input2(135, tab_top+67, 425, 24, _("Radio Operator")); | |
101 | 99 | txt_netlog_radio_operator->tooltip(_("Radio Operator, Name / Callsign")); |
102 | 100 | txt_netlog_radio_operator->box(FL_DOWN_BOX); |
103 | 101 | txt_netlog_radio_operator->color((Fl_Color)FL_BACKGROUND2_COLOR); |
110 | 108 | txt_netlog_radio_operator->callback(hamform_changed); |
111 | 109 | txt_netlog_radio_operator->when(FL_WHEN_CHANGED); |
112 | 110 | |
113 | txt_netlog_date_fm = new Fl_Input2(135, Y+93, 155, 24, _("From: date")); | |
111 | txt_netlog_date_fm = new Fl_Input2(135, tab_top+93, 155, 24, _("From: date")); | |
114 | 112 | txt_netlog_date_fm->tooltip(_("Starting date")); |
115 | 113 | txt_netlog_date_fm->box(FL_DOWN_BOX); |
116 | 114 | txt_netlog_date_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); |
123 | 121 | txt_netlog_date_fm->callback(hamform_changed); |
124 | 122 | txt_netlog_date_fm->when(FL_WHEN_CHANGED); |
125 | 123 | |
126 | btn_netlog_date_fm = new Fl_Button(292, Y+95, 20, 20, _("...")); | |
124 | btn_netlog_date_fm = new Fl_Button(292, tab_top+95, 20, 20, _("...")); | |
127 | 125 | btn_netlog_date_fm->tooltip(_("Set today")); |
128 | 126 | btn_netlog_date_fm->callback((Fl_Callback*)cb_netlog_set_date_fm); |
129 | 127 | |
130 | txt_netlog_time_fm = new Fl_Input2(358, Y+93, 80, 24, _("time")); | |
128 | txt_netlog_time_fm = new Fl_Input2(358, tab_top+93, 80, 24, _("time")); | |
131 | 129 | txt_netlog_time_fm->tooltip(_("Starting time")); |
132 | 130 | txt_netlog_time_fm->box(FL_DOWN_BOX); |
133 | 131 | txt_netlog_time_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); |
140 | 138 | txt_netlog_time_fm->callback(hamform_changed); |
141 | 139 | txt_netlog_time_fm->when(FL_WHEN_CHANGED); |
142 | 140 | |
143 | btn_netlog_time_fm = new Fl_Button(444, Y+95, 20, 20, _("...")); | |
141 | btn_netlog_time_fm = new Fl_Button(444, tab_top+95, 20, 20, _("...")); | |
144 | 142 | btn_netlog_time_fm->tooltip(_("Set time now")); |
145 | 143 | btn_netlog_time_fm->callback((Fl_Callback*)cb_netlog_set_time_fm); |
146 | 144 | |
147 | txt_netlog_date_to = new Fl_Input2(135, Y+119, 155, 24, _("To: date")); | |
145 | txt_netlog_date_to = new Fl_Input2(135, tab_top+119, 155, 24, _("To: date")); | |
148 | 146 | txt_netlog_date_to->tooltip(_("Ending date")); |
149 | 147 | txt_netlog_date_to->box(FL_DOWN_BOX); |
150 | 148 | txt_netlog_date_to->color((Fl_Color)FL_BACKGROUND2_COLOR); |
157 | 155 | txt_netlog_date_to->callback(hamform_changed); |
158 | 156 | txt_netlog_date_to->when(FL_WHEN_CHANGED); |
159 | 157 | |
160 | btn_netlog_date_to = new Fl_Button(292, Y+121, 20, 20, _("...")); | |
158 | btn_netlog_date_to = new Fl_Button(292, tab_top+121, 20, 20, _("...")); | |
161 | 159 | btn_netlog_date_to->tooltip(_("Set today")); |
162 | 160 | btn_netlog_date_to->callback((Fl_Callback*)cb_netlog_set_date_to); |
163 | 161 | |
164 | txt_netlog_time_to = new Fl_Input2(358, Y+119, 80, 24, _("time")); | |
162 | txt_netlog_time_to = new Fl_Input2(358, tab_top+119, 80, 24, _("time")); | |
165 | 163 | txt_netlog_time_to->tooltip(_("Ending time")); |
166 | 164 | txt_netlog_time_to->box(FL_DOWN_BOX); |
167 | 165 | txt_netlog_time_to->color((Fl_Color)FL_BACKGROUND2_COLOR); |
174 | 172 | txt_netlog_time_to->callback(hamform_changed); |
175 | 173 | txt_netlog_time_to->when(FL_WHEN_CHANGED); |
176 | 174 | |
177 | btn_netlog_time_to = new Fl_Button(444, Y+121, 20, 20, _("...")); | |
175 | btn_netlog_time_to = new Fl_Button(444, tab_top+121, 20, 20, _("...")); | |
178 | 176 | btn_netlog_time_to->tooltip(_("Set time now")); |
179 | 177 | btn_netlog_time_to->callback((Fl_Callback*)cb_netlog_set_time_to); |
180 | 178 | |
181 | txt_netlog_radio_net = new Fl_Input2(135, Y+145, 425, 24, _("Net")); | |
179 | txt_netlog_radio_net = new Fl_Input2(135, tab_top+145, 425, 24, _("Net")); | |
182 | 180 | txt_netlog_radio_net->tooltip(_("Radio Net Name or Position/Tactical Call")); |
183 | 181 | txt_netlog_radio_net->box(FL_DOWN_BOX); |
184 | 182 | txt_netlog_radio_net->color((Fl_Color)FL_BACKGROUND2_COLOR); |
195 | 193 | } // Fl_Group* o |
196 | 194 | |
197 | 195 | { |
198 | Fl_Group* o = new Fl_Group(2, Y+220, 566, 62); | |
196 | Fl_Group* o = new Fl_Group(2, tab_top+220, 566, 62); | |
199 | 197 | o->box(FL_ENGRAVED_FRAME); |
200 | 198 | |
201 | txt_netlog_prepared_by = new Fl_Input2(135, Y+226, 425, 24, _("Prepared by")); | |
199 | txt_netlog_prepared_by = new Fl_Input2(135, tab_top+226, 425, 24, _("Prepared by")); | |
202 | 200 | txt_netlog_prepared_by->tooltip(_("Name of preparer")); |
203 | 201 | txt_netlog_prepared_by->box(FL_DOWN_BOX); |
204 | 202 | txt_netlog_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); |
211 | 209 | txt_netlog_prepared_by->callback(hamform_changed); |
212 | 210 | txt_netlog_prepared_by->when(FL_WHEN_CHANGED); |
213 | 211 | |
214 | txt_netlog_preparer_date_time = new Fl_Input2(135, Y+252, 250, 24, _("Date/Time")); | |
212 | txt_netlog_preparer_date_time = new Fl_Input2(135, tab_top+252, 250, 24, _("Date/Time")); | |
215 | 213 | txt_netlog_preparer_date_time->tooltip(_("Date / Time")); |
216 | 214 | txt_netlog_preparer_date_time->box(FL_DOWN_BOX); |
217 | 215 | txt_netlog_preparer_date_time->color((Fl_Color)FL_BACKGROUND2_COLOR); |
224 | 222 | txt_netlog_preparer_date_time->callback(hamform_changed); |
225 | 223 | txt_netlog_preparer_date_time->when(FL_WHEN_CHANGED); |
226 | 224 | |
227 | btn_netlog_date_time = new Fl_Button(390, Y+254, 20, 20, _("...")); | |
225 | btn_netlog_date_time = new Fl_Button(390, tab_top+254, 20, 20, _("...")); | |
228 | 226 | btn_netlog_date_time->tooltip(_("Set today / now")); |
229 | 227 | btn_netlog_date_time->callback((Fl_Callback*)cb_netlog_set_date_time); |
230 | 228 | |
231 | 229 | o->end(); |
232 | 230 | |
233 | btn_netlog_export_csv = new Fl_Button(450, Y+340, 100, 24, _("Export CSV")); | |
231 | btn_netlog_export_csv = new Fl_Button(450, tab_top+340, 100, 24, _("Export CSV")); | |
234 | 232 | btn_netlog_export_csv->tooltip(_("Export Event data to a CSV file")); |
235 | 233 | btn_netlog_export_csv->callback((Fl_Callback*)netlog_csv); |
236 | 234 | |
239 | 237 | |
240 | 238 | tab_netlog_1->end(); |
241 | 239 | |
242 | tab_netlog_2 = new Fl_Group(0, Y+25, 570, 360, _("Communications Log")); | |
240 | tab_netlog_2 = new Fl_Group(0, tab_top+25, 570, 360, _("Communications Log")); | |
243 | 241 | tab_netlog_2->hide(); |
244 | 242 | |
245 | { | |
246 | Fl_Box* o = new Fl_Box(5, Y+30, 70, 20, _("Time")); | |
247 | o->box(FL_DOWN_BOX); | |
248 | o->color((Fl_Color)215); | |
249 | } // Fl_Box* o | |
250 | ||
251 | { | |
252 | Fl_Box* o = new Fl_Box(75, Y+30, 95, 20, _("From")); | |
253 | o->box(FL_DOWN_BOX); | |
254 | o->color((Fl_Color)215); | |
255 | } // Fl_Box* o | |
256 | ||
257 | { | |
258 | Fl_Box* o = new Fl_Box(170, Y+30, 95, 20, _("To")); | |
259 | o->box(FL_DOWN_BOX); | |
260 | o->color((Fl_Color)215); | |
261 | } // Fl_Box* o | |
262 | ||
263 | { | |
264 | Fl_Box* o = new Fl_Box(265, Y+30, 284, 20, _("Message")); | |
265 | o->box(FL_DOWN_BOX); | |
266 | o->color((Fl_Color)215); | |
267 | } // Fl_Box* o | |
268 | ||
269 | { | |
270 | Fl_Scroll* o = new Fl_Scroll(2, Y+52, 566, 334); | |
271 | o->type(3); | |
272 | o->box(FL_DOWN_BOX); | |
273 | o->color((Fl_Color)215); | |
243 | Fl_Group *g2a = new Fl_Group(0, tab_top+30, 569, 355); | |
244 | ||
245 | Fl_Box* bx1 = new Fl_Box(7, tab_top+30, 70, 20, _("Time")); | |
246 | bx1->box(FL_DOWN_BOX); | |
247 | bx1->color((Fl_Color)215); | |
248 | ||
249 | Fl_Box* bx2 = new Fl_Box(bx1->x()+bx1->w(), tab_top+30, 95, 20, _("From")); | |
250 | bx2->box(FL_DOWN_BOX); | |
251 | bx2->color((Fl_Color)215); | |
252 | ||
253 | Fl_Box* bx3 = new Fl_Box(bx2->x()+bx2->w(), tab_top+30, 95, 20, _("To")); | |
254 | bx3->box(FL_DOWN_BOX); | |
255 | bx3->color((Fl_Color)215); | |
256 | ||
257 | Fl_Box* bx4 = new Fl_Box(bx3->x()+bx3->w(), tab_top+30, 280, 20, _("Message")); | |
258 | bx4->box(FL_DOWN_BOX); | |
259 | bx4->color((Fl_Color)215); | |
260 | ||
261 | Fl_Scroll* scrl = new Fl_Scroll(5, tab_top+52, 560, 320); | |
262 | scrl->type(Fl_Scroll::VERTICAL_ALWAYS); | |
263 | scrl->box(FL_DOWN_BOX); | |
274 | 264 | for (int i = 0; i < 60; i++) { |
275 | 265 | |
276 | txt_netlog_comm_time[i] = new Fl_Input2(5, Y+52 + i*22, 50, 22); | |
266 | txt_netlog_comm_time[i] = new Fl_Input2(7, tab_top+52 + i*22, 50, 22); | |
277 | 267 | txt_netlog_comm_time[i]->tooltip(_("")); |
278 | txt_netlog_comm_time[i]->box(FL_DOWN_BOX); | |
279 | txt_netlog_comm_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
280 | txt_netlog_comm_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
281 | txt_netlog_comm_time[i]->labeltype(FL_NORMAL_LABEL); | |
282 | txt_netlog_comm_time[i]->labelfont(0); | |
283 | txt_netlog_comm_time[i]->labelsize(14); | |
284 | txt_netlog_comm_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
285 | txt_netlog_comm_time[i]->align(FL_ALIGN_CENTER); | |
286 | 268 | txt_netlog_comm_time[i]->callback(hamform_changed); |
287 | 269 | txt_netlog_comm_time[i]->when(FL_WHEN_CHANGED); |
288 | 270 | |
289 | btn_netlog_comm_time[i] = new Fl_Button(55, Y+52 + i*22, 20, 20, _("..")); | |
271 | btn_netlog_comm_time[i] = new Fl_Button( | |
272 | txt_netlog_comm_time[i]->x() + txt_netlog_comm_time[i]->w(), tab_top+52 + i*22, 20, 22, _("..")); | |
290 | 273 | btn_netlog_comm_time[i]->tooltip(_("Set time now")); |
291 | 274 | btn_netlog_comm_time[i]->callback(cb_netlog_comm_time_changed, (void *)&net_bptr[i]); |
292 | 275 | |
293 | txt_netlog_comm_from[i] = new Fl_Input2(75, Y+52 + i*22, 95, 22, ""); | |
276 | txt_netlog_comm_from[i] = new Fl_Input2( | |
277 | btn_netlog_comm_time[i]->x() + btn_netlog_comm_time[i]->w(), tab_top+52 + i*22, 95, 22, ""); | |
294 | 278 | txt_netlog_comm_from[i]->tooltip(_("")); |
295 | txt_netlog_comm_from[i]->box(FL_DOWN_BOX); | |
296 | txt_netlog_comm_from[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
297 | txt_netlog_comm_from[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
298 | txt_netlog_comm_from[i]->labeltype(FL_NORMAL_LABEL); | |
299 | txt_netlog_comm_from[i]->labelfont(0); | |
300 | txt_netlog_comm_from[i]->labelsize(14); | |
301 | txt_netlog_comm_from[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
302 | txt_netlog_comm_from[i]->align(FL_ALIGN_CENTER); | |
303 | 279 | txt_netlog_comm_from[i]->callback(hamform_changed); |
304 | 280 | txt_netlog_comm_from[i]->when(FL_WHEN_CHANGED); |
305 | 281 | |
306 | txt_netlog_comm_to[i] = new Fl_Input2(170, Y+52 + i*22, 95, 22); | |
282 | txt_netlog_comm_to[i] = new Fl_Input2( | |
283 | txt_netlog_comm_from[i]->x() + txt_netlog_comm_from[i]->w(), tab_top+52 + i*22, 95, 22); | |
307 | 284 | txt_netlog_comm_to[i]->tooltip(_("")); |
308 | txt_netlog_comm_to[i]->box(FL_DOWN_BOX); | |
309 | txt_netlog_comm_to[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
310 | txt_netlog_comm_to[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
311 | txt_netlog_comm_to[i]->labeltype(FL_NORMAL_LABEL); | |
312 | txt_netlog_comm_to[i]->labelfont(0); | |
313 | txt_netlog_comm_to[i]->labelsize(14); | |
314 | txt_netlog_comm_to[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
315 | txt_netlog_comm_to[i]->align(FL_ALIGN_CENTER); | |
316 | 285 | txt_netlog_comm_to[i]->callback(hamform_changed); |
317 | 286 | txt_netlog_comm_to[i]->when(FL_WHEN_CHANGED); |
318 | 287 | |
319 | txt_netlog_comm_msg[i] = new Fl_Input2(265, Y+52 + i*22, 285, 22); | |
288 | txt_netlog_comm_msg[i] = new Fl_Input2( | |
289 | txt_netlog_comm_to[i]->x() + txt_netlog_comm_to[i]->w(), tab_top+52 + i*22, 280, 22); | |
320 | 290 | txt_netlog_comm_msg[i]->tooltip(_("")); |
321 | txt_netlog_comm_msg[i]->box(FL_DOWN_BOX); | |
322 | txt_netlog_comm_msg[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
323 | txt_netlog_comm_msg[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
324 | txt_netlog_comm_msg[i]->labeltype(FL_NORMAL_LABEL); | |
325 | txt_netlog_comm_msg[i]->labelfont(0); | |
326 | txt_netlog_comm_msg[i]->labelsize(14); | |
327 | txt_netlog_comm_msg[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
328 | txt_netlog_comm_msg[i]->align(FL_ALIGN_CENTER); | |
329 | 291 | txt_netlog_comm_msg[i]->callback(hamform_changed); |
330 | 292 | txt_netlog_comm_msg[i]->when(FL_WHEN_CHANGED); |
331 | 293 | } |
332 | o->end(); | |
333 | } // Fl_Scroll* o | |
294 | scrl->end(); | |
295 | g2a->end(); | |
296 | Fl_Group *g2b = new Fl_Group(569, tab_top+30, 1, 355); | |
297 | g2b->end(); | |
334 | 298 | tab_netlog_2->end(); |
299 | tab_netlog_2->resizable(g2b); | |
335 | 300 | |
336 | 301 | tab_netlog_type->end(); |
337 | 302 | Fl_Group::current()->resizable(tab_netlog_type); |
194 | 194 | hics214_tab_2->hide(); |
195 | 195 | hics214_tab_2->hide(); |
196 | 196 | |
197 | { | |
198 | Fl_Box* o = new Fl_Box(5, Y+32, 100, 20, _("Time")); | |
199 | o->box(FL_THIN_DOWN_BOX); | |
200 | o->color((Fl_Color)215); | |
201 | } | |
202 | ||
203 | { | |
204 | Fl_Box* o = new Fl_Box(106, Y+32, 440, 20, _("Major Events")); | |
205 | o->box(FL_THIN_DOWN_BOX); | |
206 | o->color((Fl_Color)215); | |
207 | } | |
208 | ||
209 | { | |
210 | Fl_Scroll* o = new Fl_Scroll(4, Y+54, 560, 320); | |
211 | o->type(2); | |
212 | o->box(FL_THIN_DOWN_BOX); | |
213 | o->color((Fl_Color)215); | |
197 | Fl_Group *sg1 = new Fl_Group(5, Y+32, 560, 350); | |
198 | sg1->box(FL_FLAT_BOX); | |
199 | ||
200 | Fl_Box* bx1 = new Fl_Box(5, Y+32, 100, 20, _("Time")); | |
201 | bx1->box(FL_THIN_DOWN_BOX); | |
202 | bx1->color((Fl_Color)215); | |
203 | ||
204 | Fl_Box* bx2 = new Fl_Box(bx1->x() + bx1->w(), Y+32, 440, 20, _("Major Events")); | |
205 | bx2->box(FL_THIN_DOWN_BOX); | |
206 | bx2->color((Fl_Color)215); | |
207 | ||
208 | Fl_Scroll* sc1 = new Fl_Scroll(4, Y+54, 560, 320); | |
209 | sc1->type(2); | |
210 | sc1->box(FL_THIN_DOWN_BOX); | |
211 | ||
214 | 212 | for (int i = 0; i < 30; i++) { |
215 | 213 | hics214_txt_activity_time[i] = new Fl_Input2(5, Y+54 + i*24, 100, 24); |
216 | 214 | hics214_txt_activity_time[i]->tooltip(_("")); |
236 | 234 | hics214_txt_activity_event[i]->callback(hics_changed); |
237 | 235 | hics214_txt_activity_event[i]->when(FL_WHEN_CHANGED); |
238 | 236 | } |
239 | o->end(); | |
240 | } // Fl_Scroll* o | |
237 | sc1->end(); | |
238 | sg1->end(); | |
239 | Fl_Group *sg2 = new Fl_Group(565, Y+32, 1, 350); | |
240 | sg2->box(FL_FLAT_BOX); | |
241 | sg2->end(); | |
241 | 242 | |
242 | 243 | hics214_tab_2->end(); |
244 | hics214_tab_2->resizable(sg2); | |
243 | 245 | |
244 | 246 | hics214_tab_type->end(); |
245 | 247 | Fl_Group::current()->resizable(hics214_tab_type); |
192 | 192 | |
193 | 193 | static string numeric(int n) |
194 | 194 | { |
195 | static char snum[10]; | |
195 | static char snum[12]; | |
196 | 196 | snprintf(snum, sizeof(snum), "%d", n); |
197 | 197 | return snum; |
198 | 198 | } |
530 | 530 | if (progStatus.rgnbr_fname) { |
531 | 531 | int n = atoi(progStatus.rgnbr.c_str()); |
532 | 532 | n++; |
533 | char szn[10]; | |
533 | char szn[12]; | |
534 | 534 | snprintf(szn, sizeof(szn), "%d", n); |
535 | 535 | progStatus.rgnbr = szn; |
536 | 536 | txt_rgnbr->value(szn); |
198 | 198 | tab_205a_2 = new Fl_Group(0, Y+25, 570, 360, _("Basic Info")); |
199 | 199 | tab_205a_2->hide(); |
200 | 200 | |
201 | { | |
202 | Fl_Box* o = new Fl_Box(5, Y+28, 120, 20, _("Assignment")); | |
203 | o->box(FL_DOWN_BOX); | |
204 | o->color((Fl_Color)215); | |
205 | } // Fl_Box* o | |
206 | ||
207 | { | |
208 | Fl_Box* o = new Fl_Box(126, Y+28, 150, 20, _("Name")); | |
209 | o->box(FL_DOWN_BOX); | |
210 | o->color((Fl_Color)215); | |
211 | } // Fl_Box* o | |
212 | ||
213 | { | |
214 | Fl_Box* o = new Fl_Box(277, Y+28, 270, 20, _("Method of Contact")); | |
215 | o->box(FL_DOWN_BOX); | |
216 | o->color((Fl_Color)215); | |
217 | } // Fl_Box* o | |
218 | ||
219 | { | |
220 | Fl_Scroll* o = new Fl_Scroll(4, Y+48, 560, 320); | |
221 | o->type(2); | |
222 | o->box(FL_DOWN_BOX); | |
223 | o->color((Fl_Color)215); | |
201 | Fl_Group *g1 = new Fl_Group(5, Y+28, 560, 340); | |
202 | g1->box(FL_FLAT_BOX); | |
203 | ||
204 | Fl_Box* bx1 = new Fl_Box(5, Y+28, 120, 20, _("Assignment")); | |
205 | bx1->box(FL_DOWN_BOX); | |
206 | bx1->color((Fl_Color)215); | |
207 | ||
208 | Fl_Box* bx2 = new Fl_Box(bx1->x() + bx1->w(), Y+28, 150, 20, _("Name")); | |
209 | bx2->box(FL_DOWN_BOX); | |
210 | bx2->color((Fl_Color)215); | |
211 | ||
212 | Fl_Box* bx3 = new Fl_Box(bx2->x() + bx2->w(), Y+28, 270, 20, _("Method of Contact")); | |
213 | bx3->box(FL_DOWN_BOX); | |
214 | bx3->color((Fl_Color)215); | |
215 | ||
216 | Fl_Scroll* sc = new Fl_Scroll(4, Y+48, 560, 320); | |
217 | sc->type(2); | |
218 | sc->box(FL_DOWN_BOX); | |
219 | sc->color((Fl_Color)215); | |
224 | 220 | for (int i = 0; i < 32; i++) { |
225 | 221 | |
226 | 222 | txt_205a_comm_position[i] = new Fl_Input2(5, Y+50 + i*24, 120, 24); |
262 | 258 | txt_205a_comm_info[i]->callback(ics_changed); |
263 | 259 | txt_205a_comm_info[i]->when(FL_WHEN_CHANGED); |
264 | 260 | } |
265 | o->end(); | |
266 | } // Fl_Scroll* o | |
261 | sc->end(); | |
262 | g1->end(); | |
263 | Fl_Group *g2 = new Fl_Group(565, Y+32, 1, 350); | |
264 | g2->box(FL_FLAT_BOX); | |
265 | g2->end(); | |
266 | ||
267 | 267 | tab_205a_2->end(); |
268 | tab_205a_2->resizable(g2); | |
268 | 269 | |
269 | 270 | tab_ics205a_type->end(); |
270 | 271 | Fl_Group::current()->resizable(tab_ics205a_type); |
183 | 183 | tab_214_2 = new Fl_Group(0, Y+25, 570, 360, _("Roster")); |
184 | 184 | tab_214_2->hide(); |
185 | 185 | |
186 | { | |
187 | Fl_Box* o = new Fl_Box(5, Y+32, 180, 20, _("Name")); | |
188 | o->box(FL_THIN_DOWN_BOX); | |
189 | o->color((Fl_Color)215); | |
190 | } | |
191 | { | |
192 | Fl_Box* o = new Fl_Box(186, Y+32, 180, 20, _("ICS Position")); | |
193 | o->box(FL_THIN_DOWN_BOX); | |
194 | o->color((Fl_Color)215); | |
195 | } | |
196 | { | |
197 | Fl_Box* o = new Fl_Box(367, Y+32, 180, 20, _("Home Base")); | |
198 | o->box(FL_THIN_DOWN_BOX); | |
199 | o->color((Fl_Color)215); | |
200 | } | |
201 | ||
202 | { | |
203 | Fl_Scroll* o = new Fl_Scroll(4, Y+54, 560, 320); | |
204 | o->type(2); | |
205 | o->box(FL_THIN_DOWN_BOX); | |
206 | o->color((Fl_Color)215); | |
186 | Fl_Group *g1a = new Fl_Group(0, Y+32, 568, 353); | |
187 | g1a->box(FL_FLAT_BOX); | |
188 | ||
189 | Fl_Box* bx1a = new Fl_Box( | |
190 | 5, Y+32, | |
191 | 180, 20, _("Name")); | |
192 | bx1a->box(FL_THIN_DOWN_BOX); | |
193 | bx1a->color((Fl_Color)215); | |
194 | ||
195 | Fl_Box* bx2a = new Fl_Box( | |
196 | bx1a->x() + bx1a->w(), Y+32, | |
197 | 180, 20, _("ICS Position")); | |
198 | bx2a->box(FL_THIN_DOWN_BOX); | |
199 | bx2a->color((Fl_Color)215); | |
200 | ||
201 | Fl_Box* bx3a = new Fl_Box( | |
202 | bx2a->x() + bx2a->w(), Y+32, | |
203 | 180, 20, _("Home Base")); | |
204 | bx3a->box(FL_THIN_DOWN_BOX); | |
205 | bx3a->color((Fl_Color)215); | |
206 | ||
207 | Fl_Scroll* sc1 = new Fl_Scroll(5, Y+54, 560, 320); | |
208 | sc1->type(Fl_Scroll::VERTICAL_ALWAYS); | |
209 | sc1->box(FL_THIN_DOWN_BOX); | |
207 | 210 | for (int i = 0; i < 16; i++) { |
208 | txt_214_roster_name[i] = new Fl_Input2(5, Y+50 + i*24, 180, 24); | |
211 | txt_214_roster_name[i] = new Fl_Input2(5, Y+54 + i*24, 180, 24); | |
209 | 212 | txt_214_roster_name[i]->tooltip(_("")); |
210 | txt_214_roster_name[i]->box(FL_DOWN_BOX); | |
211 | txt_214_roster_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
212 | txt_214_roster_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
213 | txt_214_roster_name[i]->labeltype(FL_NORMAL_LABEL); | |
214 | txt_214_roster_name[i]->labelfont(0); | |
215 | txt_214_roster_name[i]->labelsize(14); | |
216 | txt_214_roster_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
217 | txt_214_roster_name[i]->align(FL_ALIGN_CENTER); | |
218 | 213 | txt_214_roster_name[i]->callback(ics_changed); |
219 | 214 | txt_214_roster_name[i]->when(FL_WHEN_CHANGED); |
220 | 215 | |
221 | txt_214_roster_position[i] = new Fl_Input2(186, Y+50 + i*24, 180, 24); | |
216 | txt_214_roster_position[i] = new Fl_Input2(186, Y+54 + i*24, 180, 24); | |
222 | 217 | txt_214_roster_position[i]->tooltip(_("")); |
223 | txt_214_roster_position[i]->box(FL_DOWN_BOX); | |
224 | txt_214_roster_position[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
225 | txt_214_roster_position[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
226 | txt_214_roster_position[i]->labeltype(FL_NORMAL_LABEL); | |
227 | txt_214_roster_position[i]->labelfont(0); | |
228 | txt_214_roster_position[i]->labelsize(14); | |
229 | txt_214_roster_position[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
230 | txt_214_roster_position[i]->align(FL_ALIGN_CENTER); | |
231 | 218 | txt_214_roster_position[i]->callback(ics_changed); |
232 | 219 | txt_214_roster_position[i]->when(FL_WHEN_CHANGED); |
233 | 220 | |
234 | txt_214_roster_home_base[i] = new Fl_Input2(367, Y+50 + i*24, 180, 24); | |
221 | txt_214_roster_home_base[i] = new Fl_Input2(367, Y+54 + i*24, 180, 24); | |
235 | 222 | txt_214_roster_home_base[i]->tooltip(_("")); |
236 | txt_214_roster_home_base[i]->box(FL_DOWN_BOX); | |
237 | txt_214_roster_home_base[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
238 | txt_214_roster_home_base[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
239 | txt_214_roster_home_base[i]->labeltype(FL_NORMAL_LABEL); | |
240 | txt_214_roster_home_base[i]->labelfont(0); | |
241 | txt_214_roster_home_base[i]->labelsize(14); | |
242 | txt_214_roster_home_base[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
243 | txt_214_roster_home_base[i]->align(FL_ALIGN_CENTER); | |
244 | 223 | txt_214_roster_home_base[i]->callback(ics_changed); |
245 | 224 | txt_214_roster_home_base[i]->when(FL_WHEN_CHANGED); |
246 | 225 | } |
247 | o->end(); | |
248 | } | |
226 | sc1->end(); | |
227 | g1a->end(); | |
228 | ||
229 | Fl_Group *g2a = new Fl_Group(568, Y+32, 1, 353); | |
230 | g2a->box(FL_FLAT_BOX); | |
231 | g2a->end(); | |
249 | 232 | |
250 | 233 | tab_214_2->end(); |
234 | tab_214_2->resizable(g2a); | |
251 | 235 | |
252 | 236 | tab_214_3 = new Fl_Group(0, Y+25, 570, 360, _("Activity Log")); |
253 | 237 | tab_214_3->hide(); |
254 | tab_214_2->hide(); | |
255 | ||
256 | { | |
257 | Fl_Box* o = new Fl_Box(5, Y+32, 100, 20, _("Time")); | |
258 | o->box(FL_THIN_DOWN_BOX); | |
259 | o->color((Fl_Color)215); | |
260 | } | |
261 | ||
262 | { | |
263 | Fl_Box* o = new Fl_Box(106, Y+32, 440, 20, _("Major Events")); | |
264 | o->box(FL_THIN_DOWN_BOX); | |
265 | o->color((Fl_Color)215); | |
266 | } | |
267 | ||
268 | { | |
269 | Fl_Scroll* o = new Fl_Scroll(4, Y+54, 560, 320); | |
270 | o->type(2); | |
271 | o->box(FL_THIN_DOWN_BOX); | |
272 | o->color((Fl_Color)215); | |
238 | ||
239 | Fl_Group *g1b = new Fl_Group(5, Y+32, 564, 353); | |
240 | g1b->box(FL_FLAT_BOX); | |
241 | ||
242 | Fl_Box* bx1b = new Fl_Box(5, Y+32, 100, 20, _("Time")); | |
243 | bx1b->box(FL_THIN_DOWN_BOX); | |
244 | bx1b->color((Fl_Color)215); | |
245 | ||
246 | Fl_Box* bx2b = new Fl_Box(bx1b->x() + bx1b->w(), Y+32, 440, 20, _("Major Events")); | |
247 | bx2b->box(FL_THIN_DOWN_BOX); | |
248 | bx2b->color((Fl_Color)215); | |
249 | ||
250 | Fl_Scroll* sc2 = new Fl_Scroll(4, Y+54, 560, 320); | |
251 | sc2->type(Fl_Scroll::VERTICAL_ALWAYS); | |
252 | sc2->box(FL_THIN_DOWN_BOX); | |
273 | 253 | for (int i = 0; i < 16; i++) { |
274 | txt_214_activity_time[i] = new Fl_Input2(5, Y+50 + i*24, 100, 24); | |
254 | txt_214_activity_time[i] = new Fl_Input2(5, Y+54 + i*24, 100, 24); | |
275 | 255 | txt_214_activity_time[i]->tooltip(_("")); |
276 | txt_214_activity_time[i]->box(FL_DOWN_BOX); | |
277 | txt_214_activity_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
278 | txt_214_activity_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
279 | txt_214_activity_time[i]->labeltype(FL_NORMAL_LABEL); | |
280 | txt_214_activity_time[i]->labelfont(0); | |
281 | txt_214_activity_time[i]->labelsize(14); | |
282 | txt_214_activity_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
283 | txt_214_activity_time[i]->align(FL_ALIGN_CENTER); | |
284 | 256 | txt_214_activity_time[i]->callback(ics_changed); |
285 | 257 | txt_214_activity_time[i]->when(FL_WHEN_CHANGED); |
286 | 258 | |
287 | txt_214_activity_event[i] = new Fl_Input2(106, Y+50 + i*24, 442, 24); | |
259 | txt_214_activity_event[i] = new Fl_Input2(106, Y+54 + i*24, 442, 24); | |
288 | 260 | txt_214_activity_event[i]->tooltip(_("")); |
289 | txt_214_activity_event[i]->box(FL_DOWN_BOX); | |
290 | txt_214_activity_event[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
291 | txt_214_activity_event[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
292 | txt_214_activity_event[i]->labeltype(FL_NORMAL_LABEL); | |
293 | txt_214_activity_event[i]->labelfont(0); | |
294 | txt_214_activity_event[i]->labelsize(14); | |
295 | txt_214_activity_event[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
296 | txt_214_activity_event[i]->align(FL_ALIGN_CENTER); | |
297 | 261 | txt_214_activity_event[i]->callback(ics_changed); |
298 | 262 | txt_214_activity_event[i]->when(FL_WHEN_CHANGED); |
299 | 263 | } |
300 | o->end(); | |
301 | } // Fl_Scroll* o | |
264 | sc2->end(); | |
265 | g1b->end(); | |
266 | ||
267 | Fl_Group *g2b = new Fl_Group(569, Y+32, 1, 353); | |
268 | g2b->box(FL_FLAT_BOX); | |
269 | g2b->end(); | |
302 | 270 | |
303 | 271 | tab_214_3->end(); |
272 | tab_214_3->resizable(g2b); | |
304 | 273 | |
305 | 274 | tab_ics214_type->end(); |
306 | 275 | Fl_Group::current()->resizable(tab_ics214_type); |
239 | 239 | tab_309_2 = new Fl_Group(0, Y+25, 570, 360, _("Communications Log")); |
240 | 240 | tab_309_2->hide(); |
241 | 241 | |
242 | { | |
243 | Fl_Box* o = new Fl_Box(5, Y+30, 70, 20, _("Time")); | |
244 | o->box(FL_DOWN_BOX); | |
245 | o->color((Fl_Color)215); | |
246 | } // Fl_Box* o | |
247 | ||
248 | { | |
249 | Fl_Box* o = new Fl_Box(75, Y+30, 95, 20, _("From")); | |
250 | o->box(FL_DOWN_BOX); | |
251 | o->color((Fl_Color)215); | |
252 | } // Fl_Box* o | |
253 | ||
254 | { | |
255 | Fl_Box* o = new Fl_Box(170, Y+30, 95, 20, _("To")); | |
256 | o->box(FL_DOWN_BOX); | |
257 | o->color((Fl_Color)215); | |
258 | } // Fl_Box* o | |
259 | ||
260 | { | |
261 | Fl_Box* o = new Fl_Box(265, Y+30, 284, 20, _("Message")); | |
262 | o->box(FL_DOWN_BOX); | |
263 | o->color((Fl_Color)215); | |
264 | } // Fl_Box* o | |
265 | ||
266 | { | |
267 | Fl_Scroll* o = new Fl_Scroll(2, Y+52, 566, 334); | |
268 | o->type(3); | |
269 | o->box(FL_DOWN_BOX); | |
270 | o->color((Fl_Color)215); | |
242 | Fl_Group *g1 = new Fl_Group( 0, Y+30, 569, 355); | |
243 | g1->box(FL_FLAT_BOX); | |
244 | ||
245 | Fl_Box* bx1 = new Fl_Box(5, Y+30, 70, 20, _("Time")); | |
246 | bx1->box(FL_DOWN_BOX); | |
247 | bx1->color((Fl_Color)215); | |
248 | ||
249 | Fl_Box* bx2 = new Fl_Box(bx1->x() + bx1->w(), Y+30, 95, 20, _("From")); | |
250 | bx2->box(FL_DOWN_BOX); | |
251 | bx2->color((Fl_Color)215); | |
252 | ||
253 | Fl_Box* bx3 = new Fl_Box(bx2->x() + bx2->w(), Y+30, 95, 20, _("To")); | |
254 | bx3->box(FL_DOWN_BOX); | |
255 | bx3->color((Fl_Color)215); | |
256 | ||
257 | Fl_Box* bx4 = new Fl_Box(bx3->x() + bx3->w(), Y+30, 284, 20, _("Message")); | |
258 | bx4->box(FL_DOWN_BOX); | |
259 | bx4->color((Fl_Color)215); | |
260 | ||
261 | Fl_Scroll* scrl = new Fl_Scroll(3, Y+52, 566, 334); | |
262 | scrl->type(Fl_Scroll::BOTH_ALWAYS); | |
263 | scrl->box(FL_DOWN_BOX); | |
264 | ||
271 | 265 | for (int i = 0; i < 34; i++) { |
272 | 266 | |
273 | 267 | txt_309_comm_time[i] = new Fl_Input2(5, Y+52 + i*22, 50, 22); |
274 | 268 | txt_309_comm_time[i]->tooltip(_("")); |
275 | txt_309_comm_time[i]->box(FL_DOWN_BOX); | |
276 | txt_309_comm_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
277 | txt_309_comm_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
278 | txt_309_comm_time[i]->labeltype(FL_NORMAL_LABEL); | |
279 | txt_309_comm_time[i]->labelfont(0); | |
280 | txt_309_comm_time[i]->labelsize(14); | |
281 | txt_309_comm_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
282 | txt_309_comm_time[i]->align(FL_ALIGN_CENTER); | |
283 | 269 | txt_309_comm_time[i]->callback(ics_changed); |
284 | 270 | txt_309_comm_time[i]->when(FL_WHEN_CHANGED); |
285 | 271 | |
286 | btn_309_comm_time[i] = new Fl_Button(55, Y+52 + i*22, 20, 20, _("..")); | |
272 | btn_309_comm_time[i] = new Fl_Button( | |
273 | txt_309_comm_time[i]->x() + txt_309_comm_time[i]->w(),Y+52 + i*22, | |
274 | 20, 20, _("..")); | |
287 | 275 | btn_309_comm_time[i]->tooltip(_("Set time now")); |
288 | 276 | btn_309_comm_time[i]->callback(cb_309_comm_time_changed, (void *)&bptr[i]); |
289 | 277 | |
290 | txt_309_comm_from[i] = new Fl_Input2(75, Y+52 + i*22, 95, 22, ""); | |
278 | txt_309_comm_from[i] = new Fl_Input2( | |
279 | btn_309_comm_time[i]->x() + btn_309_comm_time[i]->w(),Y+52 + i*22, | |
280 | 95, 22, ""); | |
291 | 281 | txt_309_comm_from[i]->tooltip(_("")); |
292 | txt_309_comm_from[i]->box(FL_DOWN_BOX); | |
293 | txt_309_comm_from[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
294 | txt_309_comm_from[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
295 | txt_309_comm_from[i]->labeltype(FL_NORMAL_LABEL); | |
296 | txt_309_comm_from[i]->labelfont(0); | |
297 | txt_309_comm_from[i]->labelsize(14); | |
298 | txt_309_comm_from[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
299 | txt_309_comm_from[i]->align(FL_ALIGN_CENTER); | |
300 | 282 | txt_309_comm_from[i]->callback(ics_changed); |
301 | 283 | txt_309_comm_from[i]->when(FL_WHEN_CHANGED); |
302 | 284 | |
303 | txt_309_comm_to[i] = new Fl_Input2(170, Y+52 + i*22, 95, 22); | |
285 | txt_309_comm_to[i] = new Fl_Input2( | |
286 | txt_309_comm_from[i]->x() + txt_309_comm_from[i]->w(),Y+52 + i*22, | |
287 | 95, 22); | |
304 | 288 | txt_309_comm_to[i]->tooltip(_("")); |
305 | txt_309_comm_to[i]->box(FL_DOWN_BOX); | |
306 | txt_309_comm_to[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
307 | txt_309_comm_to[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
308 | txt_309_comm_to[i]->labeltype(FL_NORMAL_LABEL); | |
309 | txt_309_comm_to[i]->labelfont(0); | |
310 | txt_309_comm_to[i]->labelsize(14); | |
311 | txt_309_comm_to[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
312 | txt_309_comm_to[i]->align(FL_ALIGN_CENTER); | |
313 | 289 | txt_309_comm_to[i]->callback(ics_changed); |
314 | 290 | txt_309_comm_to[i]->when(FL_WHEN_CHANGED); |
315 | 291 | |
316 | txt_309_comm_msg[i] = new Fl_Input2(265, Y+52 + i*22, 285, 22); | |
292 | txt_309_comm_msg[i] = new Fl_Input2( | |
293 | txt_309_comm_to[i]->x() + txt_309_comm_to[i]->w(),Y+52 + i*22, | |
294 | 285, 22); | |
317 | 295 | txt_309_comm_msg[i]->tooltip(_("")); |
318 | txt_309_comm_msg[i]->box(FL_DOWN_BOX); | |
319 | txt_309_comm_msg[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
320 | txt_309_comm_msg[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
321 | txt_309_comm_msg[i]->labeltype(FL_NORMAL_LABEL); | |
322 | txt_309_comm_msg[i]->labelfont(0); | |
323 | txt_309_comm_msg[i]->labelsize(14); | |
324 | txt_309_comm_msg[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
325 | txt_309_comm_msg[i]->align(FL_ALIGN_CENTER); | |
326 | 296 | txt_309_comm_msg[i]->callback(ics_changed); |
327 | 297 | txt_309_comm_msg[i]->when(FL_WHEN_CHANGED); |
328 | 298 | } |
329 | o->end(); | |
330 | } // Fl_Scroll* o | |
299 | scrl->end(); | |
300 | ||
301 | g1->end(); | |
302 | ||
303 | Fl_Group *g2 = new Fl_Group( 569, Y+30, 1, 355); | |
304 | g2->box(FL_FLAT_BOX); | |
305 | ||
331 | 306 | tab_309_2->end(); |
307 | tab_309_2->resizable(g2); | |
332 | 308 | |
333 | 309 | tab_ics309_type->end(); |
334 | 310 | Fl_Group::current()->resizable(tab_ics309_type); |
29 | 29 | estimate(); |
30 | 30 | } |
31 | 31 | |
32 | Fl_Group *ics_tabs = (Fl_Group *) 0; | |
33 | ||
32 | 34 | void create_ics_tab() |
33 | 35 | { |
34 | 36 | create_ics203_tab(); |
40 | 40 | HICS203, HICS206, HICS213, HICS214, IARU, |
41 | 41 | RADIOGRAM, PLAINTEXT, BLANK, CSV, CUSTOM, |
42 | 42 | MARSDAILY, MARSINEEI, MARSNET, MARSARMY, MARSNAVY, |
43 | REDXSNW, REDX5739, REDX5739A, REDX5739B, | |
44 | 43 | WXHC, SEVEREWX, STORMREP, CAP105, CAP110, TRANSFER, CUSTOM_TRANSFER }; |
45 | 44 | |
46 | 45 | struct FIELD { string f_type; string f_data; void **w; char w_type; }; |
1022 | 1021 | extern string iaru_def_filename; |
1023 | 1022 | extern string iaru_def_template_name; |
1024 | 1023 | |
1025 | // Red Cross | |
1026 | ||
1027 | extern void redx_changed(Fl_Widget *, void *); | |
1028 | ||
1029 | // Safety & Welfare | |
1030 | ||
1031 | extern bool using_redx_snw_template; | |
1032 | extern string base_redx_snw_filename; | |
1033 | extern string def_redx_snw_filename; | |
1034 | extern string def_redx_snw_TemplateName; | |
1035 | ||
1036 | extern void clear_redx_snwfields(); | |
1037 | extern void update_redx_snwfields(); | |
1038 | extern void update_redx_snwform(); | |
1039 | extern void clear_redx_snw_form(); | |
1040 | extern void read_redx_snw_buffer(string data); | |
1041 | extern void cb_redx_snw_new(); | |
1042 | extern void cb_redx_snw_import(); | |
1043 | extern void cb_redx_snw_export(); | |
1044 | extern void cb_redx_snw_wrap_import(string wrapfilename, string inpbuffer); | |
1045 | extern void cb_redx_snw_wrap_export(); | |
1046 | extern void cb_redx_snw_wrap_autosend(); | |
1047 | extern void cb_redx_snw_load_template(); | |
1048 | extern void cb_redx_snw_save_template(); | |
1049 | extern void cb_redx_snw_save_as_template(); | |
1050 | extern void cb_redx_snw_open(); | |
1051 | extern void write_redx_snw(string s); | |
1052 | extern bool cb_redx_snw_save_as(); | |
1053 | extern void cb_redx_snw_save(); | |
1054 | extern void cb_redx_snw_html(); | |
1055 | extern void cb_snw_msg_type(); | |
1056 | extern void cb_redx_snw_textout(); | |
1057 | extern int eval_redx_snw_fsize(); | |
1058 | ||
1059 | // Form 5739 | |
1060 | ||
1061 | extern string base_redx_5739_filename; | |
1062 | extern string def_redx_5739_filename; | |
1063 | extern string def_redx_5739_TemplateName; | |
1064 | ||
1065 | extern void clear_redx_5739fields(); | |
1066 | extern void update_redx_5739fields(); | |
1067 | extern void update_redx_5739form(); | |
1068 | extern void clear_redx_5739_form(); | |
1069 | extern void read_redx_5739_buffer(string data); | |
1070 | extern void cb_redx_5739_new(); | |
1071 | extern void cb_redx_5739_import(); | |
1072 | extern void cb_redx_5739_export(); | |
1073 | extern void cb_redx_5739_wrap_import(string wrapfilename, string inpbuffer); | |
1074 | extern void cb_redx_5739_wrap_export(); | |
1075 | extern void cb_redx_5739_wrap_autosend(); | |
1076 | extern void cb_redx_5739_load_template(); | |
1077 | extern void cb_redx_5739_save_template(); | |
1078 | extern void cb_redx_5739_save_as_template(); | |
1079 | extern void cb_redx_5739_open(); | |
1080 | extern void write_redx_5739(string s); | |
1081 | extern bool cb_redx_5739_save_as(); | |
1082 | extern void cb_redx_5739_save(); | |
1083 | extern void cb_redx_5739_html(); | |
1084 | extern void cb_5739_msg_type(); | |
1085 | extern void cb_redx_5739_textout(); | |
1086 | extern int eval_redx_5739_fsize(); | |
1087 | ||
1088 | // Form 5739A | |
1089 | ||
1090 | extern string def_redx_5739A_filename; | |
1091 | extern string base_redx_5739A_filename; | |
1092 | extern string def_redx_5739A_TemplateName; | |
1093 | ||
1094 | extern void clear_redx_5739Afields(); | |
1095 | extern void update_redx_5739Afields(); | |
1096 | extern void update_redx_5739Aform(); | |
1097 | extern void clear_redx_5739A_form(); | |
1098 | extern void read_redx_5739A_buffer(string data); | |
1099 | extern void cb_redx_5739A_new(); | |
1100 | extern void cb_redx_5739A_import(); | |
1101 | extern void cb_redx_5739A_export(); | |
1102 | extern void cb_redx_5739A_wrap_import(string wrapfilename, string inpbuffer); | |
1103 | extern void cb_redx_5739A_wrap_export(); | |
1104 | extern void cb_redx_5739A_wrap_autosend(); | |
1105 | extern void cb_redx_5739A_load_template(); | |
1106 | extern void cb_redx_5739A_save_template(); | |
1107 | extern void cb_redx_5739A_save_as_template(); | |
1108 | extern void cb_redx_5739A_open(); | |
1109 | extern void write_redx_5739A(string s); | |
1110 | extern bool cb_redx_5739A_save_as(); | |
1111 | extern void cb_redx_5739A_save(); | |
1112 | extern void cb_redx_5739A_html(); | |
1113 | extern void cb_5739A_msg_type(); | |
1114 | extern void cb_redx_5739A_textout(); | |
1115 | extern int eval_redx_5739A_fsize(); | |
1116 | ||
1117 | // Form 5739B | |
1118 | ||
1119 | extern string def_redx_5739B_filename; | |
1120 | extern string base_redx_5739B_filename; | |
1121 | extern string def_redx_5739B_TemplateName; | |
1122 | ||
1123 | extern void clear_redx_5739Bfields(); | |
1124 | extern void update_redx_5739Bfields(); | |
1125 | extern void update_redx_5739Bform(); | |
1126 | extern void clear_redx_5739B_form(); | |
1127 | extern void read_redx_5739B_buffer(string data); | |
1128 | extern void cb_redx_5739B_new(); | |
1129 | extern void cb_redx_5739B_import(); | |
1130 | extern void cb_redx_5739B_export(); | |
1131 | extern void cb_redx_5739B_wrap_import(string wrapfilename, string inpbuffer); | |
1132 | extern void cb_redx_5739B_wrap_export(); | |
1133 | extern void cb_redx_5739B_wrap_autosend(); | |
1134 | extern void cb_redx_5739B_load_template(); | |
1135 | extern void cb_redx_5739B_save_template(); | |
1136 | extern void cb_redx_5739B_save_as_template(); | |
1137 | extern void cb_redx_5739B_open(); | |
1138 | extern void write_redx_5739B(string s); | |
1139 | extern bool cb_redx_5739B_save_as(); | |
1140 | extern void cb_redx_5739B_save(); | |
1141 | extern void cb_redx_5739B_html(); | |
1142 | extern void cb_5739B_msg_type(); | |
1143 | extern void cb_redx_5739B_textout(); | |
1144 | extern int eval_redx_5739B_fsize(); | |
1145 | ||
1146 | 1024 | //====================================================================== |
1147 | 1025 | // National Hurricane Center, Hurricane Weather Report Form |
1148 | 1026 | //====================================================================== |
66 | 66 | extern Fl_Menu_Item menu_[]; |
67 | 67 | extern void load_custom_menu(); |
68 | 68 | |
69 | extern void ARQdropdown(bool on); | |
70 | ||
71 | 69 | extern Fl_Browser *brwsOptions; |
72 | 70 | |
73 | 71 | extern Fl_Double_Window* create_config_dialog(); |
192 | 190 | extern void update_cbo_modes(string &fldigi_modes); |
193 | 191 | |
194 | 192 | //====================================================================== |
193 | // all form tabs | |
194 | //====================================================================== | |
195 | extern Fl_Group *all_tabs; | |
196 | ||
197 | //====================================================================== | |
195 | 198 | // ICS |
196 | 199 | //====================================================================== |
197 | extern Fl_Group *tab_ics; | |
198 | 200 | extern Fl_Tabs *tab_ics_type; |
199 | 201 | |
200 | 202 | extern void create_ics_tab(); |
1230 | 1232 | extern void set_storm_counties(int); |
1231 | 1233 | |
1232 | 1234 | //====================================================================== |
1233 | // Red Cross | |
1234 | //====================================================================== | |
1235 | ||
1236 | extern void create_redx_tab(); | |
1237 | ||
1238 | //---------------------------------------------------------------------- | |
1239 | // Safety and Welfare | |
1240 | //---------------------------------------------------------------------- | |
1241 | ||
1242 | extern void create_redx_snw(); | |
1243 | ||
1244 | extern Fl_Group *tab_redx; | |
1245 | extern Fl_Tabs *tab_redx_type; | |
1246 | ||
1247 | extern Fl_Group *tab_redx_snw; | |
1248 | extern Fl_Tabs *tab_redx_snw_type; | |
1249 | ||
1250 | //---------------------------------------------------------------------- | |
1251 | ||
1252 | extern Fl_Group *tab_redx_snw_1; | |
1253 | ||
1254 | extern Fl_Input2 *snw_lname; | |
1255 | extern Fl_Input2 *snw_fname; | |
1256 | extern Fl_Input2 *snw_area1; | |
1257 | ||
1258 | extern Fl_Check_Button *snw_nophone; | |
1259 | extern Fl_Input2 *snw_xchg1; | |
1260 | extern Fl_Input2 *snw_suffix1; | |
1261 | extern Fl_Input2 *snw_area2; | |
1262 | extern Fl_Input2 *snw_xchg2; | |
1263 | extern Fl_Input2 *snw_suffix2; | |
1264 | extern Fl_Input2 *snw_area3; | |
1265 | extern Fl_Input2 *snw_xchg3; | |
1266 | extern Fl_Input2 *snw_suffix3; | |
1267 | ||
1268 | extern Fl_Input2 *snw_pdline1; | |
1269 | extern Fl_Input2 *snw_pdline2; | |
1270 | extern Fl_Input2 *snw_pdcity; | |
1271 | extern Fl_Input2 *snw_pdst; | |
1272 | extern Fl_Input2 *snw_pdzip; | |
1273 | extern Fl_Input2 *snw_haline1; | |
1274 | extern Fl_Input2 *snw_haline2; | |
1275 | extern Fl_Input2 *snw_hacity; | |
1276 | extern Fl_Input2 *snw_hast; | |
1277 | extern Fl_Input2 *snw_hazip; | |
1278 | ||
1279 | //---------------------------------------------------------------------- | |
1280 | ||
1281 | extern Fl_Group *tab_redx_snw_2; | |
1282 | ||
1283 | extern Fl_Check_Button *snw_m1; | |
1284 | extern Fl_Check_Button *snw_m2; | |
1285 | extern Fl_Check_Button *snw_m3; | |
1286 | extern Fl_Check_Button *snw_m4; | |
1287 | extern Fl_Check_Button *snw_m5; | |
1288 | extern Fl_Check_Button *snw_m6; | |
1289 | extern Fl_Check_Button *snw_m7; | |
1290 | ||
1291 | //---------------------------------------------------------------------- | |
1292 | ||
1293 | extern Fl_Group *tab_redx_snw_3; | |
1294 | extern Fl_Check_Button *snw_m8; | |
1295 | extern Fl_Check_Button *snw_m9; | |
1296 | extern Fl_Check_Button *snw_m10; | |
1297 | extern Fl_Check_Button *snw_m11; | |
1298 | extern Fl_Check_Button *snw_m12; | |
1299 | extern Fl_Check_Button *snw_m13; | |
1300 | extern Fl_Check_Button *snw_m14; | |
1301 | ||
1302 | //---------------------------------------------------------------------- | |
1303 | ||
1304 | extern Fl_Group *tab_redx_snw_4; | |
1305 | extern Fl_Check_Button *snw_m15; | |
1306 | extern FTextEdit *snw_cmsg; | |
1307 | ||
1308 | //====================================================================== | |
1309 | // Red Cross 5739 | |
1310 | //====================================================================== | |
1311 | ||
1312 | extern void create_redx_5739(); | |
1313 | ||
1314 | extern void redx_5739_compute(Fl_Widget * w, void *); | |
1315 | ||
1316 | extern Fl_Group *tab_redx_5739; | |
1317 | extern Fl_Tabs *tab_redx_5739_type; | |
1318 | ||
1319 | extern Fl_Input2 *rdx_5739_nbr; | |
1320 | extern Fl_Input2 *rdx_5739_name; | |
1321 | extern Fl_Input2 *rdx_5739_state; | |
1322 | extern Fl_Input2 *rdx_5739_cnty; | |
1323 | extern Fl_Input2 *rdx_5739_city; | |
1324 | extern Fl_Input2 *rdx_5739_date; | |
1325 | extern Fl_Input2 *rdx_5739_street; | |
1326 | extern Fl_Input2 *rdx_5739_georef; | |
1327 | extern FTextEdit *rdx_5739_add_info; | |
1328 | extern Fl_Input2 *rdx_5739_worker; | |
1329 | extern Fl_Input2 *rdx_5739_supervisor; | |
1330 | ||
1331 | //---------------------------------------------------------------------- | |
1332 | ||
1333 | extern Fl_Input2 *rdx_sf_destroyed; | |
1334 | extern Fl_Input2 *rdx_sf_major; | |
1335 | extern Fl_Input2 *rdx_sf_minor; | |
1336 | extern Fl_Input2 *rdx_sf_affected; | |
1337 | extern Fl_Input2 *rdx_sf_inaccessible; | |
1338 | ||
1339 | //---------------------------------------------------------------------- | |
1340 | ||
1341 | extern Fl_Input2 *rdx_mh_destroyed; | |
1342 | extern Fl_Input2 *rdx_mh_major; | |
1343 | extern Fl_Input2 *rdx_mh_minor; | |
1344 | extern Fl_Input2 *rdx_mh_affected; | |
1345 | extern Fl_Input2 *rdx_mh_inaccessible; | |
1346 | ||
1347 | //---------------------------------------------------------------------- | |
1348 | ||
1349 | extern Fl_Input2 *rdx_ap_destroyed; | |
1350 | extern Fl_Input2 *rdx_ap_major; | |
1351 | extern Fl_Input2 *rdx_ap_minor; | |
1352 | extern Fl_Input2 *rdx_ap_affected; | |
1353 | extern Fl_Input2 *rdx_ap_inaccessible; | |
1354 | ||
1355 | //---------------------------------------------------------------------- | |
1356 | ||
1357 | extern Fl_Input2 *redx_5739_house_nbr[]; | |
1358 | extern Fl_Input2 *redx_5739_apt_nbr[]; | |
1359 | extern Fl_Input2 *redx_5739_desc[]; | |
1360 | extern Fl_Input2 *redx_5739_nam[]; | |
1361 | extern Fl_Input2 *redx_5739_destroyed[]; | |
1362 | extern Fl_Input2 *redx_5739_major[]; | |
1363 | extern Fl_Input2 *redx_5739_minor[]; | |
1364 | extern Fl_Input2 *redx_5739_affected[]; | |
1365 | extern Fl_Input2 *redx_5739_inaccessible[]; | |
1366 | extern Fl_Input2 *redx_5739_floors[]; | |
1367 | extern Fl_Input2 *redx_5739_basement[]; | |
1368 | extern Fl_Input2 *redx_5739_waterlevel[]; | |
1369 | extern Fl_Input2 *redx_5739_basement_water[]; | |
1370 | extern Fl_Input2 *redx_5739_electricity[]; | |
1371 | extern Fl_Input2 *redx_5739_occupancy[]; | |
1372 | extern Fl_Input2 *redx_5739_OR[]; | |
1373 | extern Fl_Input2 *redx_5739_901[]; | |
1374 | ||
1375 | //====================================================================== | |
1376 | // Red Cross 5739A | |
1377 | //====================================================================== | |
1378 | ||
1379 | extern void create_redx_5739A(); | |
1380 | ||
1381 | extern Fl_Group *tab_redx_5739A; | |
1382 | extern Fl_Tabs *tab_redx_5739A_type; | |
1383 | ||
1384 | extern Fl_Group *tab_redx_5739A_1; | |
1385 | ||
1386 | extern Fl_Input2 *rdx_5739A_nbr; | |
1387 | extern Fl_Input2 *rdx_5739A_name; | |
1388 | extern Fl_Input2 *rdx_5739A_state; | |
1389 | extern Fl_Input2 *rdx_5739A_cnty; | |
1390 | extern Fl_Input2 *rdx_5739A_city; | |
1391 | extern Fl_Input2 *rdx_5739A_date; | |
1392 | extern Fl_Input2 *rdx_5739A_street; | |
1393 | extern Fl_Input2 *rdx_5739A_georef; | |
1394 | ||
1395 | extern Fl_Group *tab_redx_5739A_2; | |
1396 | ||
1397 | extern Fl_Input2 *rdx_5739A_adrs0; | |
1398 | extern Fl_Input2 *rdx_5739A_dwell0; | |
1399 | extern Fl_Input2 *rdx_5739A_base0; | |
1400 | extern Fl_Input2 *rdx_5739A_ds0; | |
1401 | extern Fl_Input2 *rdx_5739A_mj0; | |
1402 | extern Fl_Input2 *rdx_5739A_mn0; | |
1403 | extern Fl_Input2 *rdx_5739A_af0; | |
1404 | extern Fl_Input2 *rdx_5739A_in0; | |
1405 | extern Fl_Input2 *rdx_5739A_un0; | |
1406 | extern Fl_Input2 *rdx_5739A_gd0; | |
1407 | ||
1408 | extern Fl_Group *tab_redx_5739A_3; | |
1409 | ||
1410 | extern Fl_Input2 *rdx_5739A_adrs1; | |
1411 | extern Fl_Input2 *rdx_5739A_dwell1; | |
1412 | extern Fl_Input2 *rdx_5739A_base1; | |
1413 | extern Fl_Input2 *rdx_5739A_ds1; | |
1414 | extern Fl_Input2 *rdx_5739A_mj1; | |
1415 | extern Fl_Input2 *rdx_5739A_mn1; | |
1416 | extern Fl_Input2 *rdx_5739A_af1; | |
1417 | extern Fl_Input2 *rdx_5739A_in1; | |
1418 | extern Fl_Input2 *rdx_5739A_un1; | |
1419 | extern Fl_Input2 *rdx_5739A_gd1; | |
1420 | ||
1421 | //====================================================================== | |
1422 | // Red Cross 5739A | |
1423 | //====================================================================== | |
1424 | ||
1425 | extern void create_redx_5739B(); | |
1426 | ||
1427 | extern Fl_Group *tab_redx_5739B; | |
1428 | extern Fl_Tabs *tab_redx_5739B_type; | |
1429 | ||
1430 | extern Fl_Group *tab_redx_5739B_1; | |
1431 | ||
1432 | extern Fl_Input2 *rdx_5739B_nbr; | |
1433 | extern Fl_Input2 *rdx_5739B_name; | |
1434 | extern Fl_Input2 *rdx_5739B_state; | |
1435 | extern Fl_Input2 *rdx_5739B_cnty; | |
1436 | extern Fl_Input2 *rdx_5739B_city; | |
1437 | extern Fl_Input2 *rdx_5739B_date; | |
1438 | extern Fl_Input2 *rdx_5739B_street; | |
1439 | extern Fl_Input2 *rdx_5739B_georef; | |
1440 | ||
1441 | extern Fl_Input2 *rdx_5739B_north; | |
1442 | extern Fl_Input2 *rdx_5739B_east; | |
1443 | extern Fl_Input2 *rdx_5739B_south; | |
1444 | extern Fl_Input2 *rdx_5739B_west; | |
1445 | ||
1446 | extern Fl_Group *tab_redx_5739B_2; | |
1447 | ||
1448 | extern Fl_Input2 *rdx_5739B_dwell; | |
1449 | extern Fl_Input2 *rdx_5739B_ds; | |
1450 | extern Fl_Input2 *rdx_5739B_mj; | |
1451 | extern Fl_Input2 *rdx_5739B_mn; | |
1452 | extern Fl_Input2 *rdx_5739B_af; | |
1453 | extern Fl_Input2 *rdx_5739B_in; | |
1454 | extern Fl_Input2 *rdx_5739B_un; | |
1455 | extern Fl_Input2 *rdx_5739B_bs; | |
1456 | extern Fl_Input2 *rdx_5739B_gi; | |
1457 | ||
1458 | //====================================================================== | |
1459 | 1235 | // Civil Air Patrol (CAP) forms |
1460 | 1236 | //====================================================================== |
1461 | 1237 | // CAP-105, Radio Message |
27 | 27 | struct status { |
28 | 28 | int mainX; |
29 | 29 | int mainY; |
30 | int expertW; | |
31 | int expertH; | |
30 | 32 | |
31 | 33 | int wpl; // words per line in radiogram |
32 | 34 | bool open_on_export; |
92 | 92 | extern const char mars_navy_html_template[]; |
93 | 93 | extern const char mars_navy_text_template[]; |
94 | 94 | |
95 | extern const char redx_snw_html_template[]; | |
96 | extern const char redx_snw_text_template[]; | |
97 | ||
98 | extern const char redx_5739_html_template[]; | |
99 | extern const char redx_5739_text_template[]; | |
100 | ||
101 | extern const char redx_5739A_html_template[]; | |
102 | extern const char redx_5739A_text_template[]; | |
103 | ||
104 | extern const char redx_5739B_html_template[]; | |
105 | extern const char redx_5739B_text_template[]; | |
106 | ||
107 | 95 | extern const char wxhc_html_template[]; |
108 | 96 | extern const char wxhc_text_template[]; |
109 | 97 |
25 | 25 | #include <pthread.h> |
26 | 26 | #include <stdint.h> |
27 | 27 | |
28 | #include <semaphore.h> | |
29 | #if !HAVE_SEM_TIMEDWAIT | |
30 | # include <time.h> | |
31 | int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout); | |
32 | #endif | |
33 | ||
34 | int sem_timedwait_rel(sem_t* sem, double rel_timeout); | |
35 | int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout); | |
36 | ||
37 | enum { | |
38 | INVALID_TID = -1, | |
39 | TRX_TID, QRZ_TID, RIGCTL_TID, NORIGCTL_TID, | |
40 | #if USE_XMLRPC | |
41 | XMLRPC_TID, | |
42 | #endif | |
43 | ARQ_TID, ARQSOCKET_TID, | |
44 | FLMAIN_TID, | |
45 | NUM_THREADS, NUM_QRUNNER_THREADS = NUM_THREADS - 1 | |
46 | }; | |
47 | ||
48 | #ifdef __linux__ | |
49 | void linux_log_tid(void); | |
50 | # define LOG_THREAD_ID() linux_log_tid() | |
51 | #else | |
52 | # define LOG_THREAD_ID() /* nothing */ | |
53 | #endif | |
54 | ||
55 | #if USE_TLS | |
56 | # define THREAD_ID_TYPE __thread intptr_t | |
57 | # define CREATE_THREAD_ID() thread_id_ = INVALID_TID | |
58 | # define SET_THREAD_ID(x) do { thread_id_ = (x); LOG_THREAD_ID(); } while (0) | |
59 | # define GET_THREAD_ID() thread_id_ | |
60 | #else | |
61 | # define THREAD_ID_TYPE pthread_key_t | |
62 | # define CREATE_THREAD_ID() pthread_key_create(&thread_id_, NULL) | |
63 | # define SET_THREAD_ID(x) do { pthread_setspecific(thread_id_, (const void *)(x + 1)); LOG_THREAD_ID(); } while (0) | |
64 | # define GET_THREAD_ID() ((intptr_t)pthread_getspecific(thread_id_) - 1) | |
65 | #endif // USE_TLS | |
66 | extern THREAD_ID_TYPE thread_id_; | |
67 | ||
68 | ||
69 | #ifndef NDEBUG | |
70 | # include "debug.h" | |
71 | bool thread_in_list(int id, const int* list); | |
72 | # define ENSURE_THREAD(...) \ | |
73 | do { \ | |
74 | int id_ = GET_THREAD_ID(); \ | |
75 | int t_[] = { __VA_ARGS__, INVALID_TID }; \ | |
76 | if (!thread_in_list(id_, t_)) \ | |
77 | LOG_ERROR("bad thread context: %d", id_); \ | |
78 | } while (0) | |
79 | # define ENSURE_NOT_THREAD(...) \ | |
80 | do { \ | |
81 | int id_ = GET_THREAD_ID(); \ | |
82 | int t_[] = { __VA_ARGS__, INVALID_TID }; \ | |
83 | if (thread_in_list(id_, t_)) \ | |
84 | LOG_ERROR("bad thread context: %d", id_); \ | |
85 | } while (0) | |
86 | #else | |
87 | # define ENSURE_THREAD(...) ((void)0) | |
88 | # define ENSURE_NOT_THREAD(...) ((void)0) | |
89 | #endif // ! NDEBUG | |
90 | ||
91 | ||
92 | // On POSIX systems we cancel threads by sending them SIGUSR2, | |
93 | // which will also interrupt blocking calls. On woe32 we use | |
94 | // pthread_cancel and there is no good/sane way to interrupt. | |
95 | #ifndef __WOE32__ | |
96 | # define SET_THREAD_CANCEL() \ | |
97 | do { \ | |
98 | sigset_t usr2; \ | |
99 | sigemptyset(&usr2); \ | |
100 | sigaddset(&usr2, SIGUSR2); \ | |
101 | pthread_sigmask(SIG_UNBLOCK, &usr2, NULL); \ | |
102 | } while (0) | |
103 | # define TEST_THREAD_CANCEL() /* nothing */ | |
104 | # define CANCEL_THREAD(t__) pthread_kill(t__, SIGUSR2) | |
105 | #else | |
106 | // threads have PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DEFERRED when created | |
107 | # define SET_THREAD_CANCEL() /* nothing */ | |
108 | # define TEST_THREAD_CANCEL() pthread_testcancel() | |
109 | # define CANCEL_THREAD(t__) pthread_cancel(t__); | |
110 | #endif | |
111 | ||
112 | #include "fl_lock.h" | |
28 | //#include "fl_lock.h" | |
113 | 29 | |
114 | 30 | /// This ensures that a mutex is always unlocked when leaving a function or block. |
115 | 31 | class guard_lock |
121 | 37 | pthread_mutex_t* mutex; |
122 | 38 | }; |
123 | 39 | |
124 | /// This wraps together a mutex and a condition variable which are used | |
125 | /// together very often for queues etc... | |
126 | class syncobj | |
127 | { | |
128 | pthread_mutex_t m_mutex ; | |
129 | pthread_cond_t m_cond ; | |
130 | public: | |
131 | syncobj(); | |
132 | ~syncobj(); | |
133 | pthread_mutex_t * mtxp(void) { return & m_mutex; } | |
134 | void signal(); | |
135 | bool wait( double seconds ); | |
136 | }; | |
137 | ||
138 | 40 | #endif // !THREADS_H_ |
293 | 293 | |
294 | 294 | string numeric(int n) |
295 | 295 | { |
296 | static char snum[10]; | |
296 | static char snum[12]; | |
297 | 297 | snprintf(snum, sizeof(snum), "%d", n); |
298 | 298 | return snum; |
299 | 299 | } |
675 | 675 | if (progStatus.rgnbr_fname) { |
676 | 676 | int n = atoi(progStatus.rgnbr.c_str()); |
677 | 677 | n++; |
678 | char szn[10]; | |
678 | char szn[12]; | |
679 | 679 | snprintf(szn, sizeof(szn), "%d", n); |
680 | 680 | progStatus.rgnbr = szn; |
681 | 681 | txt_rgnbr->value(szn); |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <stdlib.h> | |
21 | #include <iostream> | |
22 | #include <fstream> | |
23 | #include <cstring> | |
24 | #include <ctime> | |
25 | #include <sys/types.h> | |
26 | #include <sys/stat.h> | |
27 | #include <stdio.h> | |
28 | #include <errno.h> | |
29 | ||
30 | #include <FL/Fl.H> | |
31 | #include <FL/Enumerations.H> | |
32 | #include <FL/Fl_Window.H> | |
33 | #include <FL/Fl_Button.H> | |
34 | #include <FL/Fl_Group.H> | |
35 | #include <FL/Fl_Sys_Menu_Bar.H> | |
36 | #include <FL/x.H> | |
37 | #include <FL/Fl_Help_Dialog.H> | |
38 | #include <FL/Fl_Menu_Item.H> | |
39 | #include <FL/Fl_File_Icon.H> | |
40 | ||
41 | #include "config.h" | |
42 | #include "flmsg_config.h" | |
43 | ||
44 | #include "flmsg.h" | |
45 | #include "templates.h" | |
46 | #include "debug.h" | |
47 | #include "util.h" | |
48 | #include "gettext.h" | |
49 | #include "flmsg_dialog.h" | |
50 | #include "flinput2.h" | |
51 | #include "date.h" | |
52 | #include "calendar.h" | |
53 | #include "icons.h" | |
54 | #include "fileselect.h" | |
55 | #include "wrap.h" | |
56 | #include "status.h" | |
57 | #include "parse_xml.h" | |
58 | ||
59 | #ifdef WIN32 | |
60 | # include "flmsgrc.h" | |
61 | # include "compat.h" | |
62 | # define dirent fl_dirent_no_thanks | |
63 | #endif | |
64 | ||
65 | #include <FL/filename.H> | |
66 | #include "dirent-check.h" | |
67 | ||
68 | #include <FL/x.H> | |
69 | #include <FL/Fl_Pixmap.H> | |
70 | #include <FL/Fl_Image.H> | |
71 | ||
72 | using namespace std; | |
73 | ||
74 | string s_redx_5739_nbr; | |
75 | string s_redx_5739_name; | |
76 | string s_redx_5739_state; | |
77 | string s_redx_5739_cnty; | |
78 | string s_redx_5739_city; | |
79 | string s_redx_5739_date; | |
80 | string s_redx_5739_street; | |
81 | string s_redx_5739_georef; | |
82 | string s_redx_5739_add_info; | |
83 | string s_redx_5739_worker; | |
84 | string s_redx_5739_supervisor; | |
85 | ||
86 | int sf_destroyed; | |
87 | int sf_major; | |
88 | int sf_minor; | |
89 | int sf_affected; | |
90 | int sf_inaccessible; | |
91 | int mh_destroyed; | |
92 | int mh_major; | |
93 | int mh_minor; | |
94 | int mh_affected; | |
95 | int mh_inaccessible; | |
96 | int ap_destroyed; | |
97 | int ap_major; | |
98 | int ap_minor; | |
99 | int ap_affected; | |
100 | int ap_inaccessible; | |
101 | ||
102 | string s_redx_5739_house_nbr[10]; | |
103 | string s_redx_5739_apt_nbr[10]; | |
104 | char c_redx_5739_destroyed[10]; | |
105 | char c_redx_5739_major[10]; | |
106 | char c_redx_5739_minor[10]; | |
107 | char c_redx_5739_affected[10]; | |
108 | char c_redx_5739_inaccessible[10]; | |
109 | int i_redx_5739_floors[10]; | |
110 | bool b_redx_5739_basement[10]; | |
111 | int i_redx_5739_waterlevel[10]; | |
112 | int i_redx_5739_basement_water[10]; | |
113 | bool b_redx_5739_electricity[10]; | |
114 | char c_redx_5739_occupancy[10]; | |
115 | bool b_redx_5739_OR[10]; | |
116 | bool b_redx_5739_901[10]; | |
117 | string s_redx_5739_desc[10]; | |
118 | string s_redx_5739_nam[10]; | |
119 | ||
120 | // could not use real names ... WIN32 barfs | |
121 | enum QTYPE { B, S, T, I, F, C, E }; | |
122 | // bool, string, text, int, float, character, empty | |
123 | ||
124 | struct QUAD { | |
125 | QTYPE qtype; // type of field | |
126 | string htmnbr; | |
127 | void *ptr; | |
128 | Fl_Widget *widget; }; | |
129 | ||
130 | // singular entries in form | |
131 | QUAD redx_QUAD[] = { | |
132 | { S, ":nbr:", &s_redx_5739_nbr, rdx_5739_nbr }, // 0 | |
133 | { S, ":name:", &s_redx_5739_name, rdx_5739_name }, // 1 | |
134 | { S, ":state:", &s_redx_5739_state, rdx_5739_state }, // 2 | |
135 | { S, ":cnty:", &s_redx_5739_cnty, rdx_5739_cnty }, // 3 | |
136 | { S, ":city:", &s_redx_5739_city, rdx_5739_city }, // 4 | |
137 | { S, ":date:", &s_redx_5739_date, rdx_5739_date }, // 5 | |
138 | { S, ":street:", &s_redx_5739_street, rdx_5739_street }, // 6 | |
139 | { S, ":georef:", &s_redx_5739_georef, rdx_5739_georef }, // 7 | |
140 | ||
141 | { I, ":sf_des:", &sf_destroyed, rdx_sf_destroyed }, // 8 | |
142 | { I, ":sf_maj:", &sf_major, rdx_sf_major }, // 9 | |
143 | { I, ":sf_min:", &sf_minor, rdx_sf_minor }, // 10 | |
144 | { I, ":sf_aff:", &sf_affected, rdx_sf_affected }, // 11 | |
145 | { I, ":sf_ina:", &sf_inaccessible, rdx_sf_inaccessible }, // 12 | |
146 | ||
147 | { I, ":mh_des:", &mh_destroyed, rdx_mh_destroyed }, // 13 | |
148 | { I, ":mh_maj:", &mh_major, rdx_mh_major }, // 14 | |
149 | { I, ":mh_min:", &mh_minor, rdx_mh_minor }, // 15 | |
150 | { I, ":mh_aff:", &mh_affected, rdx_mh_affected }, // 16 | |
151 | { I, ":mh_ina:", &mh_inaccessible, rdx_mh_inaccessible }, // 17 | |
152 | ||
153 | { I, ":ap_des:", &ap_destroyed, rdx_ap_destroyed }, // 18 | |
154 | { I, ":ap_maj:", &ap_major, rdx_ap_major }, // 19 | |
155 | { I, ":ap_min:", &ap_minor, rdx_ap_minor }, // 20 | |
156 | { I, ":ap_aff:", &ap_affected, rdx_ap_affected }, // 21 | |
157 | { I, ":ap_ina:", &ap_inaccessible, rdx_ap_inaccessible }, // 22 | |
158 | ||
159 | { T, ":addinf:", &s_redx_5739_add_info, rdx_5739_add_info }, // 23 | |
160 | { S, ":worker:", &s_redx_5739_worker, rdx_5739_worker }, // 24 | |
161 | { S, ":supervisor:", &s_redx_5739_supervisor, rdx_5739_supervisor }, // 25 | |
162 | ||
163 | { E, "", NULL, NULL } | |
164 | }; | |
165 | ||
166 | // array entries in form | |
167 | QUAD redx_QUAD1[] = { | |
168 | { S, ":hb[0]:", &s_redx_5739_house_nbr[0], redx_5739_house_nbr[0] }, // 0 | |
169 | { S, ":ap[0]:", &s_redx_5739_apt_nbr[0], redx_5739_apt_nbr[0] }, // 1 | |
170 | { C, ":des[0]:", &c_redx_5739_destroyed[0], redx_5739_destroyed[0] }, // 2 | |
171 | { C, ":maj[0]:", &c_redx_5739_major[0], redx_5739_major[0] }, // 3 | |
172 | { C, ":min[0]:", &c_redx_5739_minor[0], redx_5739_minor[0] }, // 4 | |
173 | { C, ":aff[0]:", &c_redx_5739_affected[0], redx_5739_affected[0] }, // 5 | |
174 | { C, ":acc[0]:", &c_redx_5739_inaccessible[0], redx_5739_inaccessible[0] }, // 6 | |
175 | { I, ":flr[0]:", &i_redx_5739_floors[0], redx_5739_floors[0] }, // 7 | |
176 | { C, ":bas[0]:", &b_redx_5739_basement[0], redx_5739_basement[0] }, // 8 | |
177 | { I, ":wtr[0]:", &i_redx_5739_waterlevel[0], redx_5739_waterlevel[0] }, // 9 | |
178 | { I, ":bwl[0]:", &i_redx_5739_basement_water[0], redx_5739_basement_water[0] }, // 10 | |
179 | { C, ":ele[0]:", &b_redx_5739_electricity[0], redx_5739_electricity[0] }, // 11 | |
180 | { C, ":occ[0]:", &c_redx_5739_occupancy[0], redx_5739_occupancy[0] }, // 12 | |
181 | { C, ":or[0]:", &b_redx_5739_OR[0], redx_5739_OR[0] }, // 13 | |
182 | { C, ":901[0]:", &b_redx_5739_901[0], redx_5739_901[0] }, // 14 | |
183 | { S, ":desc[0]:", &s_redx_5739_desc[0], redx_5739_desc[0] }, // 15 | |
184 | { S, ":nam[0]:", &s_redx_5739_nam[0], redx_5739_nam[0] }, // 16 | |
185 | ||
186 | { S, ":hb[1]:", &s_redx_5739_house_nbr[1], redx_5739_house_nbr[1] }, | |
187 | { S, ":ap[1]:", &s_redx_5739_apt_nbr[1], redx_5739_apt_nbr[1] }, | |
188 | { C, ":des[1]:", &c_redx_5739_destroyed[1], redx_5739_destroyed[1] }, | |
189 | { C, ":maj[1]:", &c_redx_5739_major[1], redx_5739_major[1] }, | |
190 | { C, ":min[1]:", &c_redx_5739_minor[1], redx_5739_minor[1] }, | |
191 | { C, ":aff[1]:", &c_redx_5739_affected[1], redx_5739_affected[1] }, | |
192 | { C, ":acc[1]:", &c_redx_5739_inaccessible[1], redx_5739_inaccessible[1] }, | |
193 | { I, ":flr[1]:", &i_redx_5739_floors[1], redx_5739_floors[1] }, | |
194 | { C, ":bas[1]:", &b_redx_5739_basement[1], redx_5739_basement[1] }, | |
195 | { I, ":wtr[1]:", &i_redx_5739_waterlevel[1], redx_5739_waterlevel[1] }, | |
196 | { I, ":bwl[1]:", &i_redx_5739_basement_water[1], redx_5739_basement_water[1] }, | |
197 | { C, ":ele[1]:", &b_redx_5739_electricity[1], redx_5739_electricity[1] }, | |
198 | { C, ":occ[1]:", &c_redx_5739_occupancy[1], redx_5739_occupancy[1] }, | |
199 | { C, ":or[1]:", &b_redx_5739_OR[1], redx_5739_OR[1] }, | |
200 | { C, ":901[1]:", &b_redx_5739_901[1], redx_5739_901[1] }, | |
201 | { S, ":desc[1]:", &s_redx_5739_desc[1], redx_5739_desc[1] }, | |
202 | { S, ":nam[1]:", &s_redx_5739_nam[1], redx_5739_nam[1] }, | |
203 | ||
204 | { S, ":hb[2]:", &s_redx_5739_house_nbr[2], redx_5739_house_nbr[2] }, | |
205 | { S, ":ap[2]:", &s_redx_5739_apt_nbr[2], redx_5739_apt_nbr[2] }, | |
206 | { C, ":des[2]:", &c_redx_5739_destroyed[2], redx_5739_destroyed[2] }, | |
207 | { C, ":maj[2]:", &c_redx_5739_major[2], redx_5739_major[2] }, | |
208 | { C, ":min[2]:", &c_redx_5739_minor[2], redx_5739_minor[2] }, | |
209 | { C, ":aff[2]:", &c_redx_5739_affected[2], redx_5739_affected[2] }, | |
210 | { C, ":acc[2]:", &c_redx_5739_inaccessible[2], redx_5739_inaccessible[2] }, | |
211 | { I, ":flr[2]:", &i_redx_5739_floors[2], redx_5739_floors[2] }, | |
212 | { C, ":bas[2]:", &b_redx_5739_basement[2], redx_5739_basement[2] }, | |
213 | { I, ":wtr[2]:", &i_redx_5739_waterlevel[2], redx_5739_waterlevel[2] }, | |
214 | { I, ":bwl[2]:", &i_redx_5739_basement_water[2], redx_5739_basement_water[2] }, | |
215 | { C, ":ele[2]:", &b_redx_5739_electricity[2], redx_5739_electricity[2] }, | |
216 | { C, ":occ[2]:", &c_redx_5739_occupancy[2], redx_5739_occupancy[2] }, | |
217 | { C, ":or[2]:", &b_redx_5739_OR[2], redx_5739_OR[2] }, | |
218 | { C, ":901[2]:", &b_redx_5739_901[2], redx_5739_901[2] }, | |
219 | { S, ":desc[2]:", &s_redx_5739_desc[2], redx_5739_desc[2] }, | |
220 | { S, ":nam[2]:", &s_redx_5739_nam[2], redx_5739_nam[2] }, | |
221 | ||
222 | { S, ":hb[3]:", &s_redx_5739_house_nbr[3], redx_5739_house_nbr[3] }, | |
223 | { S, ":ap[3]:", &s_redx_5739_apt_nbr[3], redx_5739_apt_nbr[3] }, | |
224 | { C, ":des[3]:", &c_redx_5739_destroyed[3], redx_5739_destroyed[3] }, | |
225 | { C, ":maj[3]:", &c_redx_5739_major[3], redx_5739_major[3] }, | |
226 | { C, ":min[3]:", &c_redx_5739_minor[3], redx_5739_minor[3] }, | |
227 | { C, ":aff[3]:", &c_redx_5739_affected[3], redx_5739_affected[3] }, | |
228 | { C, ":acc[3]:", &c_redx_5739_inaccessible[3], redx_5739_inaccessible[3] }, | |
229 | { I, ":flr[3]:", &i_redx_5739_floors[3], redx_5739_floors[3] }, | |
230 | { C, ":bas[3]:", &b_redx_5739_basement[3], redx_5739_basement[3] }, | |
231 | { I, ":wtr[3]:", &i_redx_5739_waterlevel[3], redx_5739_waterlevel[3] }, | |
232 | { I, ":bwl[3]:", &i_redx_5739_basement_water[3], redx_5739_basement_water[3] }, | |
233 | { C, ":ele[3]:", &b_redx_5739_electricity[3], redx_5739_electricity[3] }, | |
234 | { C, ":occ[3]:", &c_redx_5739_occupancy[3], redx_5739_occupancy[3] }, | |
235 | { C, ":or[3]:", &b_redx_5739_OR[3], redx_5739_OR[3] }, | |
236 | { C, ":901[3]:", &b_redx_5739_901[3], redx_5739_901[3] }, | |
237 | { S, ":desc[3]:", &s_redx_5739_desc[3], redx_5739_desc[3] }, | |
238 | { S, ":nam[3]:", &s_redx_5739_nam[3], redx_5739_nam[3] }, | |
239 | ||
240 | { S, ":hb[4]:", &s_redx_5739_house_nbr[4], redx_5739_house_nbr[4] }, | |
241 | { S, ":ap[4]:", &s_redx_5739_apt_nbr[4], redx_5739_apt_nbr[4] }, | |
242 | { C, ":des[4]:", &c_redx_5739_destroyed[4], redx_5739_destroyed[4] }, | |
243 | { C, ":maj[4]:", &c_redx_5739_major[4], redx_5739_major[4] }, | |
244 | { C, ":min[4]:", &c_redx_5739_minor[4], redx_5739_minor[4] }, | |
245 | { C, ":aff[4]:", &c_redx_5739_affected[4], redx_5739_affected[4] }, | |
246 | { C, ":acc[4]:", &c_redx_5739_inaccessible[4], redx_5739_inaccessible[4] }, | |
247 | { I, ":flr[4]:", &i_redx_5739_floors[4], redx_5739_floors[4] }, | |
248 | { C, ":bas[4]:", &b_redx_5739_basement[4], redx_5739_basement[4] }, | |
249 | { I, ":wtr[4]:", &i_redx_5739_waterlevel[4], redx_5739_waterlevel[4] }, | |
250 | { I, ":bwl[4]:", &i_redx_5739_basement_water[4], redx_5739_basement_water[4] }, | |
251 | { C, ":ele[4]:", &b_redx_5739_electricity[4], redx_5739_electricity[4] }, | |
252 | { C, ":occ[4]:", &c_redx_5739_occupancy[4], redx_5739_occupancy[4] }, | |
253 | { C, ":or[4]:", &b_redx_5739_OR[4], redx_5739_OR[4] }, | |
254 | { C, ":901[4]:", &b_redx_5739_901[4], redx_5739_901[4] }, | |
255 | { S, ":desc[4]:", &s_redx_5739_desc[4], redx_5739_desc[4] }, | |
256 | { S, ":nam[4]:", &s_redx_5739_nam[4], redx_5739_nam[4] }, | |
257 | ||
258 | { S, ":hb[5]:", &s_redx_5739_house_nbr[5], redx_5739_house_nbr[5] }, | |
259 | { S, ":ap[5]:", &s_redx_5739_apt_nbr[5], redx_5739_apt_nbr[5] }, | |
260 | { C, ":des[5]:", &c_redx_5739_destroyed[5], redx_5739_destroyed[5] }, | |
261 | { C, ":maj[5]:", &c_redx_5739_major[5], redx_5739_major[5] }, | |
262 | { C, ":min[5]:", &c_redx_5739_minor[5], redx_5739_minor[5] }, | |
263 | { C, ":aff[5]:", &c_redx_5739_affected[5], redx_5739_affected[5] }, | |
264 | { C, ":acc[5]:", &c_redx_5739_inaccessible[5], redx_5739_inaccessible[5] }, | |
265 | { I, ":flr[5]:", &i_redx_5739_floors[5], redx_5739_floors[5] }, | |
266 | { C, ":bas[5]:", &b_redx_5739_basement[5], redx_5739_basement[5] }, | |
267 | { I, ":wtr[5]:", &i_redx_5739_waterlevel[5], redx_5739_waterlevel[5] }, | |
268 | { I, ":bwl[5]:", &i_redx_5739_basement_water[5], redx_5739_basement_water[5] }, | |
269 | { C, ":ele[5]:", &b_redx_5739_electricity[5], redx_5739_electricity[5] }, | |
270 | { C, ":occ[5]:", &c_redx_5739_occupancy[5], redx_5739_occupancy[5] }, | |
271 | { C, ":or[5]:", &b_redx_5739_OR[5], redx_5739_OR[5] }, | |
272 | { C, ":901[5]:", &b_redx_5739_901[5], redx_5739_901[5] }, | |
273 | { S, ":desc[5]:", &s_redx_5739_desc[5], redx_5739_desc[5] }, | |
274 | { S, ":nam[5]:", &s_redx_5739_nam[5], redx_5739_nam[5] }, | |
275 | ||
276 | { S, ":hb[6]:", &s_redx_5739_house_nbr[6], redx_5739_house_nbr[6] }, | |
277 | { S, ":ap[6]:", &s_redx_5739_apt_nbr[6], redx_5739_apt_nbr[6] }, | |
278 | { C, ":des[6]:", &c_redx_5739_destroyed[6], redx_5739_destroyed[6] }, | |
279 | { C, ":maj[6]:", &c_redx_5739_major[6], redx_5739_major[6] }, | |
280 | { C, ":min[6]:", &c_redx_5739_minor[6], redx_5739_minor[6] }, | |
281 | { C, ":aff[6]:", &c_redx_5739_affected[6], redx_5739_affected[6] }, | |
282 | { C, ":acc[6]:", &c_redx_5739_inaccessible[6], redx_5739_inaccessible[6] }, | |
283 | { I, ":flr[6]:", &i_redx_5739_floors[6], redx_5739_floors[6] }, | |
284 | { C, ":bas[6]:", &b_redx_5739_basement[6], redx_5739_basement[6] }, | |
285 | { I, ":wtr[6]:", &i_redx_5739_waterlevel[6], redx_5739_waterlevel[6] }, | |
286 | { I, ":bwl[6]:", &i_redx_5739_basement_water[6], redx_5739_basement_water[6] }, | |
287 | { C, ":ele[6]:", &b_redx_5739_electricity[6], redx_5739_electricity[6] }, | |
288 | { C, ":occ[6]:", &c_redx_5739_occupancy[6], redx_5739_occupancy[6] }, | |
289 | { C, ":or[6]:", &b_redx_5739_OR[6], redx_5739_OR[6] }, | |
290 | { C, ":901[6]:", &b_redx_5739_901[6], redx_5739_901[6] }, | |
291 | { S, ":desc[6]:", &s_redx_5739_desc[6], redx_5739_desc[6] }, | |
292 | { S, ":nam[6]:", &s_redx_5739_nam[6], redx_5739_nam[6] }, | |
293 | ||
294 | { S, ":hb[7]:", &s_redx_5739_house_nbr[7], redx_5739_house_nbr[7] }, | |
295 | { S, ":ap[7]:", &s_redx_5739_apt_nbr[7], redx_5739_apt_nbr[7] }, | |
296 | { C, ":des[7]:", &c_redx_5739_destroyed[7], redx_5739_destroyed[7] }, | |
297 | { C, ":maj[7]:", &c_redx_5739_major[7], redx_5739_major[7] }, | |
298 | { C, ":min[7]:", &c_redx_5739_minor[7], redx_5739_minor[7] }, | |
299 | { C, ":aff[7]:", &c_redx_5739_affected[7], redx_5739_affected[7] }, | |
300 | { C, ":acc[7]:", &c_redx_5739_inaccessible[7], redx_5739_inaccessible[7] }, | |
301 | { I, ":flr[7]:", &i_redx_5739_floors[7], redx_5739_floors[7] }, | |
302 | { C, ":bas[7]:", &b_redx_5739_basement[7], redx_5739_basement[7] }, | |
303 | { I, ":wtr[7]:", &i_redx_5739_waterlevel[7], redx_5739_waterlevel[7] }, | |
304 | { I, ":bwl[7]:", &i_redx_5739_basement_water[7], redx_5739_basement_water[7] }, | |
305 | { C, ":ele[7]:", &b_redx_5739_electricity[7], redx_5739_electricity[7] }, | |
306 | { C, ":occ[7]:", &c_redx_5739_occupancy[7], redx_5739_occupancy[7] }, | |
307 | { C, ":or[7]:", &b_redx_5739_OR[7], redx_5739_OR[7] }, | |
308 | { C, ":901[7]:", &b_redx_5739_901[7], redx_5739_901[7] }, | |
309 | { S, ":desc[7]:", &s_redx_5739_desc[7], redx_5739_desc[7] }, | |
310 | { S, ":nam[7]:", &s_redx_5739_nam[7], redx_5739_nam[7] }, | |
311 | ||
312 | { S, ":hb[8]:", &s_redx_5739_house_nbr[8], redx_5739_house_nbr[8] }, | |
313 | { S, ":ap[8]:", &s_redx_5739_apt_nbr[8], redx_5739_apt_nbr[8] }, | |
314 | { C, ":des[8]:", &c_redx_5739_destroyed[8], redx_5739_destroyed[8] }, | |
315 | { C, ":maj[8]:", &c_redx_5739_major[8], redx_5739_major[8] }, | |
316 | { C, ":min[8]:", &c_redx_5739_minor[8], redx_5739_minor[8] }, | |
317 | { C, ":aff[8]:", &c_redx_5739_affected[8], redx_5739_affected[8] }, | |
318 | { C, ":acc[8]:", &c_redx_5739_inaccessible[8], redx_5739_inaccessible[8] }, | |
319 | { I, ":flr[8]:", &i_redx_5739_floors[8], redx_5739_floors[8] }, | |
320 | { C, ":bas[8]:", &b_redx_5739_basement[8], redx_5739_basement[8] }, | |
321 | { I, ":wtr[8]:", &i_redx_5739_waterlevel[8], redx_5739_waterlevel[8] }, | |
322 | { I, ":bwl[8]:", &i_redx_5739_basement_water[8], redx_5739_basement_water[8] }, | |
323 | { C, ":ele[8]:", &b_redx_5739_electricity[8], redx_5739_electricity[8] }, | |
324 | { C, ":occ[8]:", &c_redx_5739_occupancy[8], redx_5739_occupancy[8] }, | |
325 | { C, ":or[8]:", &b_redx_5739_OR[8], redx_5739_OR[8] }, | |
326 | { C, ":901[8]:", &b_redx_5739_901[8], redx_5739_901[8] }, | |
327 | { S, ":desc[8]:", &s_redx_5739_desc[8], redx_5739_desc[8] }, | |
328 | { S, ":nam[8]:", &s_redx_5739_nam[8], redx_5739_nam[8] }, | |
329 | ||
330 | { S, ":hb[9]:", &s_redx_5739_house_nbr[9], redx_5739_house_nbr[9] }, | |
331 | { S, ":ap[9]:", &s_redx_5739_apt_nbr[9], redx_5739_apt_nbr[9] }, | |
332 | { C, ":des[9]:", &c_redx_5739_destroyed[9], redx_5739_destroyed[9] }, | |
333 | { C, ":maj[9]:", &c_redx_5739_major[9], redx_5739_major[9] }, | |
334 | { C, ":min[9]:", &c_redx_5739_minor[9], redx_5739_minor[9] }, | |
335 | { C, ":aff[9]:", &c_redx_5739_affected[9], redx_5739_affected[9] }, | |
336 | { C, ":acc[9]:", &c_redx_5739_inaccessible[9], redx_5739_inaccessible[9] }, | |
337 | { I, ":flr[9]:", &i_redx_5739_floors[9], redx_5739_floors[9] }, | |
338 | { C, ":bas[9]:", &b_redx_5739_basement[9], redx_5739_basement[9] }, | |
339 | { I, ":wtr[9]:", &i_redx_5739_waterlevel[9], redx_5739_waterlevel[9] }, | |
340 | { I, ":bwl[9]:", &i_redx_5739_basement_water[9], redx_5739_basement_water[9] }, | |
341 | { C, ":ele[9]:", &b_redx_5739_electricity[9], redx_5739_electricity[9] }, | |
342 | { C, ":occ[9]:", &c_redx_5739_occupancy[9], redx_5739_occupancy[9] }, | |
343 | { C, ":or[9]:", &b_redx_5739_OR[9], redx_5739_OR[9] }, | |
344 | { C, ":901[9]:", &b_redx_5739_901[9], redx_5739_901[9] }, | |
345 | { S, ":desc[9]:", &s_redx_5739_desc[9], redx_5739_desc[9] }, | |
346 | { S, ":nam[9]:", &s_redx_5739_nam[9], redx_5739_nam[9] }, | |
347 | ||
348 | { E, "", NULL, NULL } | |
349 | }; | |
350 | ||
351 | string buffredx_5739; | |
352 | string def_redx_5739_filename = ""; | |
353 | string base_redx_5739_filename = ""; | |
354 | string def_redx_5739_TemplateName = ""; | |
355 | ||
356 | bool using_redx_5739_template = false; | |
357 | static bool fields_initialized = false; | |
358 | ||
359 | // required to initialize the control pointers in the QUAD arrays | |
360 | ||
361 | static void init_widgets() | |
362 | { | |
363 | for (int i = 0; i < 10; i++ ) { | |
364 | redx_QUAD1[i*17 + 0].widget = redx_5739_house_nbr[i]; | |
365 | redx_QUAD1[i*17 + 1].widget = redx_5739_apt_nbr[i]; | |
366 | redx_QUAD1[i*17 + 2].widget = redx_5739_destroyed[i]; | |
367 | redx_QUAD1[i*17 + 3].widget = redx_5739_major[i]; | |
368 | redx_QUAD1[i*17 + 4].widget = redx_5739_minor[i]; | |
369 | redx_QUAD1[i*17 + 5].widget = redx_5739_affected[i]; | |
370 | redx_QUAD1[i*17 + 6].widget = redx_5739_inaccessible[i]; | |
371 | redx_QUAD1[i*17 + 7].widget = redx_5739_floors[i]; | |
372 | redx_QUAD1[i*17 + 8].widget = redx_5739_basement[i]; | |
373 | redx_QUAD1[i*17 + 9].widget = redx_5739_waterlevel[i]; | |
374 | redx_QUAD1[i*17 + 10].widget = redx_5739_basement_water[i]; | |
375 | redx_QUAD1[i*17 + 11].widget = redx_5739_electricity[i]; | |
376 | redx_QUAD1[i*17 + 12].widget = redx_5739_occupancy[i]; | |
377 | redx_QUAD1[i*17 + 13].widget = redx_5739_OR[i]; | |
378 | redx_QUAD1[i*17 + 14].widget = redx_5739_901[i]; | |
379 | redx_QUAD1[i*17 + 15].widget = redx_5739_desc[i]; | |
380 | redx_QUAD1[i*17 + 16].widget = redx_5739_nam[i]; | |
381 | } | |
382 | ||
383 | redx_QUAD[0].widget = rdx_5739_nbr; | |
384 | redx_QUAD[1].widget = rdx_5739_name; | |
385 | redx_QUAD[2].widget = rdx_5739_state; | |
386 | redx_QUAD[3].widget = rdx_5739_cnty; | |
387 | redx_QUAD[4].widget = rdx_5739_city; | |
388 | redx_QUAD[5].widget = rdx_5739_date; | |
389 | redx_QUAD[6].widget = rdx_5739_street; | |
390 | redx_QUAD[7].widget = rdx_5739_georef; | |
391 | ||
392 | redx_QUAD[8].widget = rdx_sf_destroyed; | |
393 | redx_QUAD[9].widget = rdx_sf_major; | |
394 | redx_QUAD[10].widget = rdx_sf_minor; | |
395 | redx_QUAD[11].widget = rdx_sf_affected; | |
396 | redx_QUAD[12].widget = rdx_sf_inaccessible; | |
397 | ||
398 | redx_QUAD[13].widget = rdx_mh_destroyed; | |
399 | redx_QUAD[14].widget = rdx_mh_major; | |
400 | redx_QUAD[15].widget = rdx_mh_minor; | |
401 | redx_QUAD[16].widget = rdx_mh_affected; | |
402 | redx_QUAD[17].widget = rdx_mh_inaccessible; | |
403 | ||
404 | redx_QUAD[18].widget = rdx_ap_destroyed; | |
405 | redx_QUAD[19].widget = rdx_ap_major; | |
406 | redx_QUAD[20].widget = rdx_ap_minor; | |
407 | redx_QUAD[21].widget = rdx_ap_affected; | |
408 | redx_QUAD[22].widget = rdx_ap_inaccessible; | |
409 | ||
410 | redx_QUAD[23].widget = rdx_5739_add_info; | |
411 | redx_QUAD[24].widget = rdx_5739_worker; | |
412 | redx_QUAD[25].widget = rdx_5739_supervisor; | |
413 | ||
414 | fields_initialized = true; | |
415 | } | |
416 | ||
417 | //enum QTYPE { B, S, T, I, F, C, E }; | |
418 | // bool, string, text, int, float, character, empty | |
419 | ||
420 | void clearQUAD(QUAD *p) | |
421 | { | |
422 | QTYPE qt = E; | |
423 | while ((qt = p->qtype) != E) { | |
424 | switch (qt) { | |
425 | case B : (*(bool *)(p->ptr)) = false; break; | |
426 | case S : ((string *)(p->ptr))->clear(); break; | |
427 | case T : ((string *)(p->ptr))->clear(); break; | |
428 | case C : (*(char *)(p->ptr)) = ' '; break; | |
429 | case I : (*(int *)(p->ptr)) = 0; break; | |
430 | case F : (*(float *)(p->ptr)) = 0.0; break; | |
431 | case E : return; | |
432 | } | |
433 | p++; | |
434 | } | |
435 | } | |
436 | ||
437 | void clear_redx_5739fields() | |
438 | { | |
439 | if (!fields_initialized) init_widgets(); | |
440 | clearQUAD(redx_QUAD); | |
441 | clearQUAD(redx_QUAD1); | |
442 | } | |
443 | ||
444 | bool checkQUAD(QUAD *p) | |
445 | { | |
446 | int i = 0; | |
447 | float f = 0; | |
448 | char c = ' '; | |
449 | QTYPE qt = E; | |
450 | while ((qt = p->qtype) != E) { | |
451 | if (p->widget == NULL) return false; | |
452 | switch (qt) { | |
453 | case B: | |
454 | if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) return true; | |
455 | break; | |
456 | case S: | |
457 | if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) return true; | |
458 | break; | |
459 | case T: | |
460 | if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) return true; | |
461 | break; | |
462 | case C: | |
463 | c = ' '; | |
464 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
465 | c = ((Fl_Input2 *)p->widget)->value()[0]; | |
466 | if (*((char *)(p->ptr)) != c) return true; | |
467 | break; | |
468 | case I: | |
469 | i = 0; | |
470 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
471 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); | |
472 | if (*((int *)(p->ptr)) != i) return true; | |
473 | break; | |
474 | case F: | |
475 | f = 0; | |
476 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
477 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); | |
478 | if (*((float *)(p->ptr)) != f) return true;; | |
479 | break; | |
480 | case E: | |
481 | default: return false; | |
482 | } | |
483 | p++; | |
484 | } | |
485 | return false; | |
486 | } | |
487 | ||
488 | bool check_redx_5739fields() | |
489 | { | |
490 | if (checkQUAD(redx_QUAD)) return true; | |
491 | return checkQUAD(redx_QUAD1); | |
492 | } | |
493 | ||
494 | void updateQUAD(QUAD *p) | |
495 | { | |
496 | int i = 0; | |
497 | float f = 0; | |
498 | char c = ' '; | |
499 | QTYPE qt = E; | |
500 | while ((qt = p->qtype) != E) { | |
501 | switch (qt) { | |
502 | case B: | |
503 | *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); | |
504 | break; | |
505 | case S: | |
506 | *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); | |
507 | break; | |
508 | case T: | |
509 | *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); | |
510 | break; | |
511 | case C: | |
512 | c = ' '; | |
513 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
514 | c = ((Fl_Input2 *)p->widget)->value()[0]; | |
515 | *((char *)(p->ptr)) = c; | |
516 | break; | |
517 | case I: | |
518 | i = 0; | |
519 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
520 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); | |
521 | *((int *)(p->ptr)) = i; | |
522 | break; | |
523 | case F: | |
524 | f = 0; | |
525 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
526 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); | |
527 | *((float *)(p->ptr)) = f; | |
528 | break; | |
529 | case E: | |
530 | default: return; | |
531 | } | |
532 | p++; | |
533 | } | |
534 | } | |
535 | ||
536 | void update_redx_5739fields() | |
537 | { | |
538 | if (!fields_initialized) init_widgets(); | |
539 | updateQUAD(redx_QUAD); | |
540 | updateQUAD(redx_QUAD1); | |
541 | } | |
542 | ||
543 | void updateFORM(QUAD *p) | |
544 | { | |
545 | char val[20]; | |
546 | QTYPE qt = E; | |
547 | while ((qt = p->qtype) != E) { | |
548 | switch (qt) { | |
549 | case B: | |
550 | ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); | |
551 | break; | |
552 | case S: | |
553 | ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); | |
554 | break; | |
555 | case T: | |
556 | ((FTextEdit *)p->widget)->clear(); | |
557 | ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); | |
558 | break; | |
559 | case C: | |
560 | val[0] = *((char *)(p->ptr)); | |
561 | val[1] = 0; | |
562 | ((Fl_Input2 *)p->widget)->value(val); | |
563 | break; | |
564 | case I: | |
565 | if (*((int *)(p->ptr)) == 0) | |
566 | ((Fl_Input2 *)p->widget)->value(""); | |
567 | else { | |
568 | snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); | |
569 | ((Fl_Input2 *)p->widget)->value(val); | |
570 | } | |
571 | break; | |
572 | case F: | |
573 | snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); | |
574 | ((Fl_Input2 *)p->widget)->value(val); | |
575 | break; | |
576 | case E: | |
577 | default: return; | |
578 | } | |
579 | p++; | |
580 | } | |
581 | } | |
582 | ||
583 | void update_redx_5739form() | |
584 | { | |
585 | if (!fields_initialized) init_widgets(); | |
586 | updateFORM(redx_QUAD); | |
587 | updateFORM(redx_QUAD1); | |
588 | redx_5739_compute(NULL, NULL); | |
589 | } | |
590 | ||
591 | void clear_redx_5739_form() | |
592 | { | |
593 | clear_redx_5739fields(); | |
594 | update_redx_5739form(); | |
595 | } | |
596 | ||
597 | static string mbuff; | |
598 | ||
599 | void make_buffQUAD(QUAD *p) | |
600 | { | |
601 | string one = "1"; string zero = "0"; | |
602 | string sval = " "; | |
603 | char szval[20]; | |
604 | QTYPE qt = E; | |
605 | while ((qt = p->qtype) != E) { | |
606 | switch (qt) { | |
607 | case B: | |
608 | if (*((bool *)(p->ptr)) == true) | |
609 | mbuff.append( lineout( p->htmnbr, *((bool *)(p->ptr)) ? one : zero)); | |
610 | break; | |
611 | case S: | |
612 | if (((string *)(p->ptr))->length()) | |
613 | mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); | |
614 | break; | |
615 | case T: | |
616 | mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); | |
617 | break; | |
618 | case C: | |
619 | if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { | |
620 | sval = " "; | |
621 | sval[0] = *((char *)(p->ptr)); | |
622 | mbuff.append( lineout( p->htmnbr, sval)); | |
623 | } | |
624 | break; | |
625 | case I: | |
626 | if (*((int*)(p->ptr)) > 0) { | |
627 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
628 | sval = szval; | |
629 | mbuff.append( lineout( p->htmnbr, sval) ); | |
630 | } | |
631 | break; | |
632 | case F: | |
633 | if (*((float *)(p->ptr)) > 0) { | |
634 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
635 | sval = szval; | |
636 | mbuff.append( lineout( p->htmnbr, sval) ); | |
637 | } | |
638 | break; | |
639 | case E: | |
640 | default: return; | |
641 | } | |
642 | p++; | |
643 | } | |
644 | } | |
645 | ||
646 | void make_buffredx_5739(bool compress = false) | |
647 | { | |
648 | mbuff.clear(); | |
649 | make_buffQUAD(redx_QUAD); | |
650 | make_buffQUAD(redx_QUAD1); | |
651 | if (compress) compress_maybe(mbuff); | |
652 | buffredx_5739.append(mbuff); | |
653 | } | |
654 | ||
655 | void readQUAD(string data, QUAD *p) | |
656 | { | |
657 | int i = 0; | |
658 | float f; | |
659 | QTYPE qt = E; | |
660 | while ((qt = p->qtype) != E) { | |
661 | switch (qt) { | |
662 | case B: | |
663 | *((bool *)(p->ptr)) = (findstr( data, p->htmnbr ) == "1"); | |
664 | break; | |
665 | case S: | |
666 | *((string *)(p->ptr)) = findstr( data, p->htmnbr ); | |
667 | break; | |
668 | case T: | |
669 | *((string *)(p->ptr)) = findstr( data, p->htmnbr ); | |
670 | break; | |
671 | case C: | |
672 | *((char *)(p->ptr)) = findstr( data, p->htmnbr )[0]; | |
673 | break; | |
674 | case I: | |
675 | i = 0; | |
676 | sscanf( findstr( data, p->htmnbr ).c_str(), "%d", &i); | |
677 | *((int *)(p->ptr)) = i; | |
678 | break; | |
679 | case F: | |
680 | f = 0; | |
681 | sscanf( findstr( data, p->htmnbr ).c_str(), "%f", &f); | |
682 | *((float *)(p->ptr)) = f; | |
683 | break; | |
684 | case E: | |
685 | default: return; | |
686 | } | |
687 | p++; | |
688 | } | |
689 | } | |
690 | ||
691 | void read_redx_5739_buffer(string data) | |
692 | { | |
693 | clear_redx_5739fields(); | |
694 | read_header(data); | |
695 | ||
696 | // search the file buffer for each of the redx_5739 fields | |
697 | readQUAD (data, redx_QUAD); | |
698 | readQUAD (data, redx_QUAD1); | |
699 | update_redx_5739form(); | |
700 | } | |
701 | ||
702 | void cb_redx_5739_new() | |
703 | { | |
704 | if (check_redx_5739fields()) { | |
705 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { | |
706 | update_header(CHANGED); | |
707 | cb_redx_5739_save(); | |
708 | } | |
709 | } | |
710 | clear_redx_5739_form(); | |
711 | clear_header(); | |
712 | def_redx_5739_filename = ICS_msg_dir; | |
713 | def_redx_5739_filename.append("new").append(FREDX5739_EXT); | |
714 | show_filename(def_redx_5739_filename); | |
715 | using_redx_5739_template = false; | |
716 | } | |
717 | ||
718 | void cb_redx_5739_import() | |
719 | { | |
720 | fl_alert2("Not implemented"); | |
721 | } | |
722 | ||
723 | void cb_redx_5739_export() | |
724 | { | |
725 | fl_alert2("Not implemented"); | |
726 | } | |
727 | ||
728 | void cb_redx_5739_wrap_import(string wrapfilename, string inpbuffer) | |
729 | { | |
730 | clear_redx_5739_form(); | |
731 | read_redx_5739_buffer(inpbuffer); | |
732 | def_redx_5739_filename = ICS_msg_dir; | |
733 | def_redx_5739_filename.append(wrapfilename); | |
734 | show_filename(def_redx_5739_filename); | |
735 | using_redx_5739_template = false; | |
736 | } | |
737 | ||
738 | int eval_redx_5739_fsize() | |
739 | { | |
740 | Ccrc16 chksum; | |
741 | evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); | |
742 | evalstr.append(base_redx_5739_filename).append("]"); | |
743 | update_redx_5739fields(); | |
744 | update_header(FROM); | |
745 | evalstr.append(header("<redx_5739>")); | |
746 | buffredx_5739.clear(); | |
747 | make_buffredx_5739(true); | |
748 | if (buffredx_5739.empty()) return 0; | |
749 | compress_maybe( buffredx_5739 ); | |
750 | evalstr.append( buffredx_5739 ); | |
751 | evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); | |
752 | return evalstr.length(); | |
753 | } | |
754 | ||
755 | void cb_redx_5739_wrap_export() | |
756 | { | |
757 | if (check_redx_5739fields()) { | |
758 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
759 | return; | |
760 | update_header(CHANGED); | |
761 | } | |
762 | update_redx_5739fields(); | |
763 | ||
764 | if (base_redx_5739_filename == string("new").append(FREDX5739_EXT) || | |
765 | base_redx_5739_filename == string("default").append(FREDX5739_EXT) ) | |
766 | if (!cb_redx_5739_save_as()) return; | |
767 | ||
768 | string wrapfilename = WRAP_send_dir; | |
769 | wrapfilename.append(base_redx_5739_filename); | |
770 | wrapfilename.append(".wrap"); | |
771 | const char *p = FSEL::saveas( | |
772 | "Save as wrap file", | |
773 | "Wrap file\t*.{wrap,WRAP}", | |
774 | wrapfilename.c_str()); | |
775 | if (p) { | |
776 | string pext = fl_filename_ext(p); | |
777 | wrapfilename = p; | |
778 | ||
779 | update_header(FROM); | |
780 | buffredx_5739.assign(header("<redx_5739>")); | |
781 | make_buffredx_5739(true); | |
782 | export_wrapfile(base_redx_5739_filename, wrapfilename, buffredx_5739, pext != ".wrap"); | |
783 | ||
784 | buffredx_5739.assign(header("<redx_5739>")); | |
785 | make_buffredx_5739(false); | |
786 | write_redx_5739(def_redx_5739_filename); | |
787 | } | |
788 | } | |
789 | ||
790 | void cb_redx_5739_wrap_autosend() | |
791 | { | |
792 | if (check_redx_5739fields()) { | |
793 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
794 | return; | |
795 | update_header(CHANGED); | |
796 | } | |
797 | update_redx_5739fields(); | |
798 | ||
799 | if (base_redx_5739_filename == string("new").append(FREDX5739_EXT) || | |
800 | base_redx_5739_filename == string("default").append(FREDX5739_EXT) ) | |
801 | if (!cb_redx_5739_save_as()) return; | |
802 | ||
803 | update_header(FROM); | |
804 | buffredx_5739.assign(header("<redx_5739>")); | |
805 | make_buffredx_5739(true); | |
806 | xfr_via_socket(base_redx_5739_filename, buffredx_5739); | |
807 | ||
808 | buffredx_5739.assign(header("<redx_5739>")); | |
809 | make_buffredx_5739(false); | |
810 | write_redx_5739(def_redx_5739_filename); | |
811 | } | |
812 | ||
813 | void cb_redx_5739_load_template() | |
814 | { | |
815 | string def_redx_5739_filename = def_redx_5739_TemplateName; | |
816 | const char *p = FSEL::select( | |
817 | "Open template file", | |
818 | string("Template file\t*").append(TREDX5739_EXT).c_str(), | |
819 | def_redx_5739_filename.c_str()); | |
820 | if (p) { | |
821 | clear_redx_5739_form(); | |
822 | read_data_file(p); | |
823 | def_redx_5739_TemplateName = p; | |
824 | show_filename(def_redx_5739_TemplateName); | |
825 | using_redx_5739_template = true; | |
826 | } | |
827 | } | |
828 | ||
829 | void cb_redx_5739_save_template() | |
830 | { | |
831 | if (!using_redx_5739_template) { | |
832 | cb_redx_5739_save_as_template(); | |
833 | return; | |
834 | } | |
835 | string def_redx_5739_filename = def_redx_5739_TemplateName; | |
836 | const char *p = FSEL::saveas( | |
837 | "Save template file", | |
838 | string("Template file\t*").append(TREDX5739_EXT).c_str(), | |
839 | def_redx_5739_filename.c_str()); | |
840 | if (p) { | |
841 | update_header(CHANGED); | |
842 | update_redx_5739fields(); | |
843 | buffredx_5739.assign(header("<redx_5739>")); | |
844 | make_buffredx_5739(); | |
845 | write_redx_5739(p); | |
846 | } | |
847 | } | |
848 | ||
849 | void cb_redx_5739_save_as_template() | |
850 | { | |
851 | string def_redx_5739_filename = def_redx_5739_TemplateName; | |
852 | const char *p = FSEL::saveas( | |
853 | "Save as template file", | |
854 | string("Template file\t*").append(TREDX5739_EXT).c_str(), | |
855 | def_redx_5739_filename.c_str()); | |
856 | if (p) { | |
857 | const char *pext = fl_filename_ext(p); | |
858 | def_redx_5739_TemplateName = p; | |
859 | if (strlen(pext) == 0) def_redx_5739_TemplateName.append(TREDX5739_EXT); | |
860 | remove_spaces_from_filename(def_redx_5739_TemplateName); | |
861 | ||
862 | clear_header(); | |
863 | update_header(CHANGED); | |
864 | update_redx_5739fields(); | |
865 | buffredx_5739.assign(header("<redx_5739>")); | |
866 | make_buffredx_5739(); | |
867 | write_redx_5739(def_redx_5739_TemplateName); | |
868 | ||
869 | show_filename(def_redx_5739_TemplateName); | |
870 | using_redx_5739_template = true; | |
871 | } | |
872 | } | |
873 | ||
874 | void cb_redx_5739_open() | |
875 | { | |
876 | const char *p = FSEL::select( | |
877 | _("Open data file"), | |
878 | string("ICS-redx_5739\t*").append(FREDX5739_EXT).c_str(), | |
879 | def_redx_5739_filename.c_str()); | |
880 | if (!p) return; | |
881 | if (strlen(p) == 0) return; | |
882 | clear_redx_5739_form(); | |
883 | read_data_file(p); | |
884 | using_redx_5739_template = false; | |
885 | def_redx_5739_filename = p; | |
886 | show_filename(def_redx_5739_filename); | |
887 | } | |
888 | ||
889 | void write_redx_5739(string s) | |
890 | { | |
891 | FILE *fileredx_5739 = fopen(s.c_str(), "w"); | |
892 | if (!fileredx_5739) return; | |
893 | ||
894 | fwrite(buffredx_5739.c_str(), buffredx_5739.length(), 1, fileredx_5739); | |
895 | fclose(fileredx_5739); | |
896 | } | |
897 | ||
898 | bool cb_redx_5739_save_as() | |
899 | { | |
900 | const char *p; | |
901 | string newfilename; | |
902 | ||
903 | string name = named_file(); | |
904 | if (!name.empty()) { | |
905 | name.append(FREDX5739_EXT); | |
906 | newfilename = ICS_msg_dir; | |
907 | newfilename.append(name); | |
908 | } else | |
909 | newfilename = def_redx_5739_filename; | |
910 | ||
911 | p = FSEL::saveas( | |
912 | _("Save data file"), | |
913 | string("ICS-redx_5739\t*").append(FREDX5739_EXT).c_str(), | |
914 | newfilename.c_str()); | |
915 | ||
916 | if (!p) return false; | |
917 | if (strlen(p) == 0) return false; | |
918 | ||
919 | if (progStatus.sernbr_fname) update_sernbr(); | |
920 | ||
921 | const char *pext = fl_filename_ext(p); | |
922 | def_redx_5739_filename = p; | |
923 | if (strlen(pext) == 0) def_redx_5739_filename.append(FREDX5739_EXT); | |
924 | ||
925 | remove_spaces_from_filename(def_redx_5739_filename); | |
926 | ||
927 | update_header(NEW); | |
928 | update_redx_5739fields(); | |
929 | buffredx_5739.assign(header("<redx_5739>")); | |
930 | make_buffredx_5739(); | |
931 | write_redx_5739(def_redx_5739_filename); | |
932 | ||
933 | using_redx_5739_template = false; | |
934 | show_filename(def_redx_5739_filename); | |
935 | return true; | |
936 | } | |
937 | ||
938 | void cb_redx_5739_save() | |
939 | { | |
940 | if (base_redx_5739_filename == string("new").append(FREDX5739_EXT) || | |
941 | base_redx_5739_filename == string("default").append(FREDX5739_EXT) || | |
942 | using_redx_5739_template == true) { | |
943 | cb_redx_5739_save_as(); | |
944 | return; | |
945 | } | |
946 | ||
947 | if (check_redx_5739fields()) update_header(CHANGED); | |
948 | update_redx_5739fields(); | |
949 | buffredx_5739.assign(header("<redx_5739>")); | |
950 | make_buffredx_5739(); | |
951 | write_redx_5739(def_redx_5739_filename); | |
952 | ||
953 | using_redx_5739_template = false; | |
954 | } | |
955 | ||
956 | void quad_to_html( string &target, QUAD *p) | |
957 | { | |
958 | string X = "X"; string SP = " "; | |
959 | string sval = " "; | |
960 | char szval[20]; | |
961 | while (p->qtype != E) { | |
962 | if (p->qtype == B) | |
963 | replacestr(target, p->htmnbr, *((bool *)(p->ptr)) ? X : SP); | |
964 | else if (p->qtype == S) | |
965 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
966 | else if (p->qtype == T) | |
967 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
968 | else if (p->qtype == C) { | |
969 | sval = " "; | |
970 | sval[0] = *((char *)(p->ptr)); | |
971 | replacestr(target, p->htmnbr, sval); | |
972 | } | |
973 | else if (p->qtype == I) { | |
974 | if (*((int *)(p->ptr)) > 0) { | |
975 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
976 | sval = szval; | |
977 | } else sval.clear(); | |
978 | replacestr(target, p->htmnbr, sval); | |
979 | } | |
980 | else if (p->qtype == F) { | |
981 | if (*((float *)(p->ptr)) != 0) { | |
982 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
983 | sval = szval; | |
984 | } else sval.clear(); | |
985 | replacestr(target, p->htmnbr, sval); | |
986 | } | |
987 | p++; | |
988 | } | |
989 | } | |
990 | ||
991 | void cb_redx_5739_html() | |
992 | { | |
993 | string name_name = fl_filename_name(def_redx_5739_filename.c_str()); | |
994 | size_t p = name_name.rfind('.'); | |
995 | if (p != string::npos) name_name.erase(p); | |
996 | ||
997 | string redx_5739_name = ICS_dir; | |
998 | redx_5739_name.append(name_name); | |
999 | redx_5739_name.append(".html"); | |
1000 | ||
1001 | update_redx_5739fields(); | |
1002 | string formredx_5739 = redx_5739_html_template; | |
1003 | ||
1004 | replacestr(formredx_5739, TITLE, name_name); | |
1005 | ||
1006 | quad_to_html (formredx_5739, redx_QUAD); | |
1007 | quad_to_html (formredx_5739, redx_QUAD1); | |
1008 | ||
1009 | FILE *fileredx_5739 = fopen(redx_5739_name.c_str(), "w"); | |
1010 | fprintf(fileredx_5739,"%s", formredx_5739.c_str()); | |
1011 | fclose(fileredx_5739); | |
1012 | ||
1013 | open_url(redx_5739_name.c_str()); | |
1014 | } | |
1015 | ||
1016 | void cb_5739_msg_type() | |
1017 | { | |
1018 | if (selected_form == REDX5739 ) { | |
1019 | show_filename(def_redx_5739_filename); | |
1020 | } else { | |
1021 | show_filename(def_rg_filename); | |
1022 | } | |
1023 | } | |
1024 | ||
1025 | void quad_to_text( string &target, QUAD *p) | |
1026 | { | |
1027 | string X = "X"; string SP = " "; | |
1028 | string sval = " "; | |
1029 | string del = "DELETE"; | |
1030 | char szval[20]; | |
1031 | while (p->qtype != E) { | |
1032 | if (p->qtype == B) { | |
1033 | bool b = *((bool *)(p->ptr)); | |
1034 | if (b) replacestr(target, p->htmnbr, X); | |
1035 | else replacestr(target, p->htmnbr, del); | |
1036 | } else if (p->qtype == S) { | |
1037 | if (((string *)(p->ptr))->length()) | |
1038 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
1039 | else replacestr(target, p->htmnbr, del); | |
1040 | } else if (p->qtype == T) { | |
1041 | if (((string *)(p->ptr))->length()) | |
1042 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
1043 | else replacestr(target, p->htmnbr, del); | |
1044 | } else if (p->qtype == C) { | |
1045 | sval = " "; | |
1046 | sval[0] = *((char *)(p->ptr)); | |
1047 | if (sval[0] != 0 && sval[0] != ' ') | |
1048 | replacestr(target, p->htmnbr, sval); | |
1049 | else replacestr(target, p->htmnbr, del); | |
1050 | } | |
1051 | else if (p->qtype == I) { | |
1052 | if (*((int *)(p->ptr)) > 0) { | |
1053 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
1054 | sval = szval; | |
1055 | replacestr(target, p->htmnbr, sval); | |
1056 | } else replacestr(target, p->htmnbr, del); | |
1057 | } | |
1058 | else if (p->qtype == F) { | |
1059 | if (*((float *)(p->ptr)) != 0) { | |
1060 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
1061 | sval = szval; | |
1062 | replacestr(target, p->htmnbr, sval); | |
1063 | } else replacestr(target, p->htmnbr, del); | |
1064 | } | |
1065 | p++; | |
1066 | } | |
1067 | } | |
1068 | ||
1069 | void strip_text( string &target ) | |
1070 | { | |
1071 | size_t p = 0, p1, p2; | |
1072 | while ((p = target.find ("DELETE"), p) != string::npos) { | |
1073 | p1 = target.rfind ("\n", p); | |
1074 | p2 = target.find ("\n", p); | |
1075 | if (p1 != string::npos && p2 != string::npos) | |
1076 | target.erase( p1, p2 - p1 ); | |
1077 | p++; | |
1078 | } | |
1079 | } | |
1080 | ||
1081 | void cb_redx_5739_textout() | |
1082 | { | |
1083 | string redx_5739_name = ICS_dir; | |
1084 | redx_5739_name.append("redx_5739.txt"); | |
1085 | ||
1086 | update_redx_5739fields(); | |
1087 | string formredx_5739 = redx_5739_text_template; | |
1088 | ||
1089 | quad_to_text (formredx_5739, redx_QUAD); | |
1090 | quad_to_text (formredx_5739, redx_QUAD1); | |
1091 | ||
1092 | strip_text (formredx_5739); | |
1093 | ||
1094 | FILE *fileredx_5739 = fopen(redx_5739_name.c_str(), "w"); | |
1095 | fprintf(fileredx_5739,"%s", formredx_5739.c_str()); | |
1096 | fclose(fileredx_5739); | |
1097 | ||
1098 | open_url(redx_5739_name.c_str()); | |
1099 | } | |
1100 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <stdlib.h> | |
21 | #include <iostream> | |
22 | #include <fstream> | |
23 | #include <cstring> | |
24 | #include <ctime> | |
25 | #include <sys/types.h> | |
26 | #include <sys/stat.h> | |
27 | #include <stdio.h> | |
28 | #include <errno.h> | |
29 | ||
30 | #include <FL/Fl.H> | |
31 | #include <FL/Enumerations.H> | |
32 | #include <FL/Fl_Window.H> | |
33 | #include <FL/Fl_Button.H> | |
34 | #include <FL/Fl_Group.H> | |
35 | #include <FL/Fl_Sys_Menu_Bar.H> | |
36 | #include <FL/x.H> | |
37 | #include <FL/Fl_Help_Dialog.H> | |
38 | #include <FL/Fl_Menu_Item.H> | |
39 | #include <FL/Fl_File_Icon.H> | |
40 | ||
41 | #include "config.h" | |
42 | #include "flmsg_config.h" | |
43 | ||
44 | #include "flmsg.h" | |
45 | #include "templates.h" | |
46 | #include "debug.h" | |
47 | #include "util.h" | |
48 | #include "gettext.h" | |
49 | #include "flmsg_dialog.h" | |
50 | #include "flinput2.h" | |
51 | #include "date.h" | |
52 | #include "calendar.h" | |
53 | #include "icons.h" | |
54 | #include "fileselect.h" | |
55 | #include "wrap.h" | |
56 | #include "status.h" | |
57 | #include "parse_xml.h" | |
58 | ||
59 | #ifdef WIN32 | |
60 | # include "flmsgrc.h" | |
61 | # include "compat.h" | |
62 | # define dirent fl_dirent_no_thanks | |
63 | #endif | |
64 | ||
65 | #include <FL/filename.H> | |
66 | #include "dirent-check.h" | |
67 | ||
68 | #include <FL/x.H> | |
69 | #include <FL/Fl_Pixmap.H> | |
70 | #include <FL/Fl_Image.H> | |
71 | ||
72 | using namespace std; | |
73 | ||
74 | string s_redx_5739A_nbr; | |
75 | string s_redx_5739A_name; | |
76 | string s_redx_5739A_state; | |
77 | string s_redx_5739A_cnty; | |
78 | string s_redx_5739A_city; | |
79 | string s_redx_5739A_date; | |
80 | string s_redx_5739A_street; | |
81 | string s_redx_5739A_georef; | |
82 | ||
83 | string s_redx_5739A_adrs0; | |
84 | string s_redx_5739A_dwell0; | |
85 | string s_redx_5739A_base0; | |
86 | string s_redx_5739A_ds0; | |
87 | string s_redx_5739A_mj0; | |
88 | string s_redx_5739A_mn0; | |
89 | string s_redx_5739A_af0; | |
90 | string s_redx_5739A_in0; | |
91 | string s_redx_5739A_un0; | |
92 | string s_redx_5739A_gd0; | |
93 | ||
94 | string s_redx_5739A_adrs1; | |
95 | string s_redx_5739A_dwell1; | |
96 | string s_redx_5739A_base1; | |
97 | string s_redx_5739A_ds1; | |
98 | string s_redx_5739A_mj1; | |
99 | string s_redx_5739A_mn1; | |
100 | string s_redx_5739A_af1; | |
101 | string s_redx_5739A_in1; | |
102 | string s_redx_5739A_un1; | |
103 | string s_redx_5739A_gd1; | |
104 | ||
105 | // could not use real names ... WIN32 barfs | |
106 | enum QTYPE_5739A { B, S, T, I, F, C, E }; | |
107 | // bool, string, text, int, float, character, empty | |
108 | ||
109 | struct QUAD_5739A { | |
110 | QTYPE_5739A qtype; // type of field | |
111 | string htmnbr; | |
112 | void *ptr; | |
113 | Fl_Widget *widget; }; | |
114 | ||
115 | // singular entries in form | |
116 | QUAD_5739A redx_QUAD_5739A[] = { | |
117 | { S, ":drnbr:", &s_redx_5739A_nbr, rdx_5739A_nbr }, // 0 | |
118 | { S, ":drnam:", &s_redx_5739A_name, rdx_5739A_name }, // 1 | |
119 | { S, ":state:", &s_redx_5739A_state, rdx_5739A_state }, // 2 | |
120 | { S, ":cnty:", &s_redx_5739A_cnty, rdx_5739A_cnty }, // 3 | |
121 | { S, ":city:", &s_redx_5739A_city, rdx_5739A_city }, // 4 | |
122 | { S, ":date:", &s_redx_5739A_date, rdx_5739A_date }, // 5 | |
123 | { S, ":street:", &s_redx_5739A_street, rdx_5739A_street }, // 6 | |
124 | { S, ":georef:", &s_redx_5739A_georef, rdx_5739A_georef }, // 7 | |
125 | { S, ":adrs0:", &s_redx_5739A_adrs0, rdx_5739A_adrs0 }, // 8 | |
126 | { S, ":dwell0:", &s_redx_5739A_dwell0, rdx_5739A_dwell0 }, // 9 | |
127 | { S, ":base0:", &s_redx_5739A_base0, rdx_5739A_base0 }, // 10 | |
128 | { S, ":ds0:", &s_redx_5739A_ds0, rdx_5739A_ds0 }, // 11 | |
129 | { S, ":mj0:", &s_redx_5739A_mj0, rdx_5739A_mj0 }, // 12 | |
130 | { S, ":mn0:", &s_redx_5739A_mn0, rdx_5739A_mn0 }, // 13 | |
131 | { S, ":af0:", &s_redx_5739A_af0, rdx_5739A_af0 }, // 14 | |
132 | { S, ":in0:", &s_redx_5739A_in0, rdx_5739A_in0 }, // 15 | |
133 | { S, ":un0:", &s_redx_5739A_un0, rdx_5739A_un0 }, // 16 | |
134 | { S, ":gd0:", &s_redx_5739A_gd0, rdx_5739A_gd0 }, // 17 | |
135 | { S, ":adrs1:", &s_redx_5739A_adrs1, rdx_5739A_adrs1 }, // 18 | |
136 | { S, ":dwell1:", &s_redx_5739A_dwell1, rdx_5739A_dwell1 }, // 19 | |
137 | { S, ":base1:", &s_redx_5739A_base1, rdx_5739A_base1 }, // 20 | |
138 | { S, ":ds1:", &s_redx_5739A_ds1, rdx_5739A_ds1 }, // 21 | |
139 | { S, ":mj1:", &s_redx_5739A_mj1, rdx_5739A_mj1 }, // 22 | |
140 | { S, ":mn1:", &s_redx_5739A_mn1, rdx_5739A_mn1 }, // 23 | |
141 | { S, ":af1:", &s_redx_5739A_af1, rdx_5739A_af1 }, // 24 | |
142 | { S, ":in1:", &s_redx_5739A_in1, rdx_5739A_in1 }, // 25 | |
143 | { S, ":un1:", &s_redx_5739A_un1, rdx_5739A_un1 }, // 26 | |
144 | { S, ":gd1:", &s_redx_5739A_gd1, rdx_5739A_gd1 }, // 27 | |
145 | { E, "", NULL, NULL } | |
146 | }; | |
147 | ||
148 | string buffredx_5739A; | |
149 | string def_redx_5739A_filename = ""; | |
150 | string base_redx_5739A_filename = ""; | |
151 | string def_redx_5739A_TemplateName = ""; | |
152 | ||
153 | bool using_redx_5739A_template = false; | |
154 | static bool fields_initialized = false; | |
155 | ||
156 | // required to initialize the control pointers in the QUAD_5739A array | |
157 | ||
158 | static void init_widgets_5739A() | |
159 | { | |
160 | redx_QUAD_5739A[0].widget = rdx_5739A_nbr; | |
161 | redx_QUAD_5739A[1].widget = rdx_5739A_name; | |
162 | redx_QUAD_5739A[2].widget = rdx_5739A_state; | |
163 | redx_QUAD_5739A[3].widget = rdx_5739A_cnty; | |
164 | redx_QUAD_5739A[4].widget = rdx_5739A_city; | |
165 | redx_QUAD_5739A[5].widget = rdx_5739A_date; | |
166 | redx_QUAD_5739A[6].widget = rdx_5739A_street; | |
167 | redx_QUAD_5739A[7].widget = rdx_5739A_georef; | |
168 | ||
169 | redx_QUAD_5739A[8].widget = rdx_5739A_adrs0; | |
170 | redx_QUAD_5739A[9].widget = rdx_5739A_dwell0; | |
171 | redx_QUAD_5739A[10].widget = rdx_5739A_base0; | |
172 | redx_QUAD_5739A[11].widget = rdx_5739A_ds0; | |
173 | redx_QUAD_5739A[12].widget = rdx_5739A_mj0; | |
174 | redx_QUAD_5739A[13].widget = rdx_5739A_mn0; | |
175 | redx_QUAD_5739A[14].widget = rdx_5739A_af0; | |
176 | redx_QUAD_5739A[15].widget = rdx_5739A_in0; | |
177 | redx_QUAD_5739A[16].widget = rdx_5739A_un0; | |
178 | redx_QUAD_5739A[17].widget = rdx_5739A_gd0; | |
179 | ||
180 | redx_QUAD_5739A[18].widget = rdx_5739A_adrs1; | |
181 | redx_QUAD_5739A[19].widget = rdx_5739A_dwell1; | |
182 | redx_QUAD_5739A[20].widget = rdx_5739A_base1; | |
183 | redx_QUAD_5739A[21].widget = rdx_5739A_ds1; | |
184 | redx_QUAD_5739A[22].widget = rdx_5739A_mj1; | |
185 | redx_QUAD_5739A[23].widget = rdx_5739A_mn1; | |
186 | redx_QUAD_5739A[24].widget = rdx_5739A_af1; | |
187 | redx_QUAD_5739A[25].widget = rdx_5739A_in1; | |
188 | redx_QUAD_5739A[26].widget = rdx_5739A_un1; | |
189 | redx_QUAD_5739A[27].widget = rdx_5739A_gd1; | |
190 | ||
191 | fields_initialized = true; | |
192 | } | |
193 | ||
194 | //enum QTYPE_5739A { B, S, T, I, F, C, E }; | |
195 | // bool, string, text, int, float, character, empty | |
196 | ||
197 | void clearQUAD_5739A(QUAD_5739A *p) | |
198 | { | |
199 | QTYPE_5739A qt = E; | |
200 | while ((qt = p->qtype) != E) { | |
201 | switch (qt) { | |
202 | case B : (*(bool *)(p->ptr)) = false; break; | |
203 | case S : ((string *)(p->ptr))->clear(); break; | |
204 | case T : ((string *)(p->ptr))->clear(); break; | |
205 | case C : (*(char *)(p->ptr)) = ' '; break; | |
206 | case I : (*(int *)(p->ptr)) = 0; break; | |
207 | case F : (*(float *)(p->ptr)) = 0.0; break; | |
208 | case E : return; | |
209 | } | |
210 | p++; | |
211 | } | |
212 | } | |
213 | ||
214 | void clear_redx_5739Afields() | |
215 | { | |
216 | if (!fields_initialized) init_widgets_5739A(); | |
217 | clearQUAD_5739A(redx_QUAD_5739A); | |
218 | } | |
219 | ||
220 | bool checkQUAD_5739A(QUAD_5739A *p) | |
221 | { | |
222 | int i = 0; | |
223 | float f = 0; | |
224 | char c = ' '; | |
225 | QTYPE_5739A qt = E; | |
226 | while ((qt = p->qtype) != E) { | |
227 | if (p->widget == NULL) return false; | |
228 | switch (qt) { | |
229 | case B: | |
230 | if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) | |
231 | return true;; | |
232 | break; | |
233 | case S: | |
234 | if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) | |
235 | return true; | |
236 | break; | |
237 | case T: | |
238 | if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) | |
239 | return true; | |
240 | break; | |
241 | case C: | |
242 | c = ' '; | |
243 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
244 | c = ((Fl_Input2 *)p->widget)->value()[0]; | |
245 | if (*((char *)(p->ptr)) != c) | |
246 | return true; | |
247 | break; | |
248 | case I: | |
249 | i = 0; | |
250 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
251 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); | |
252 | if (*((int *)(p->ptr)) != i) | |
253 | return true; | |
254 | break; | |
255 | case F: | |
256 | f = 0; | |
257 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
258 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); | |
259 | if (*((float *)(p->ptr)) != f) | |
260 | return true; | |
261 | break; | |
262 | case E: | |
263 | default: return false; | |
264 | } | |
265 | p++; | |
266 | } | |
267 | return false; | |
268 | } | |
269 | ||
270 | bool check_redx_5739Afields() | |
271 | { | |
272 | return checkQUAD_5739A(redx_QUAD_5739A); | |
273 | } | |
274 | ||
275 | void updateQUAD_5739A(QUAD_5739A *p) | |
276 | { | |
277 | int i = 0; | |
278 | float f = 0; | |
279 | char c = ' '; | |
280 | QTYPE_5739A qt = E; | |
281 | while ((qt = p->qtype) != E) { | |
282 | switch (qt) { | |
283 | case B: | |
284 | *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); | |
285 | break; | |
286 | case S: | |
287 | *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); | |
288 | break; | |
289 | case T: | |
290 | *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); | |
291 | break; | |
292 | case C: | |
293 | c = ' '; | |
294 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
295 | c = ((Fl_Input2 *)p->widget)->value()[0]; | |
296 | *((char *)(p->ptr)) = c; | |
297 | break; | |
298 | case I: | |
299 | i = 0; | |
300 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
301 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); | |
302 | *((int *)(p->ptr)) = i; | |
303 | break; | |
304 | case F: | |
305 | f = 0; | |
306 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
307 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); | |
308 | *((float *)(p->ptr)) = f; | |
309 | break; | |
310 | case E: | |
311 | default: return; | |
312 | } | |
313 | p++; | |
314 | } | |
315 | } | |
316 | ||
317 | void update_redx_5739Afields() | |
318 | { | |
319 | if (!fields_initialized) init_widgets_5739A(); | |
320 | updateQUAD_5739A(redx_QUAD_5739A); | |
321 | } | |
322 | ||
323 | void updateFORM_5739A(QUAD_5739A *p) | |
324 | { | |
325 | char val[20]; | |
326 | QTYPE_5739A qt = E; | |
327 | while ((qt = p->qtype) != E) { | |
328 | switch (qt) { | |
329 | case B: | |
330 | ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); | |
331 | break; | |
332 | case S: | |
333 | ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); | |
334 | break; | |
335 | case T: | |
336 | ((FTextEdit *)p->widget)->clear(); | |
337 | ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); | |
338 | break; | |
339 | case C: | |
340 | val[0] = *((char *)(p->ptr)); | |
341 | val[1] = 0; | |
342 | ((Fl_Input2 *)p->widget)->value(val); | |
343 | break; | |
344 | case I: | |
345 | if (*((int *)(p->ptr)) == 0) | |
346 | ((Fl_Input2 *)p->widget)->value(""); | |
347 | else { | |
348 | snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); | |
349 | ((Fl_Input2 *)p->widget)->value(val); | |
350 | } | |
351 | break; | |
352 | case F: | |
353 | snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); | |
354 | ((Fl_Input2 *)p->widget)->value(val); | |
355 | break; | |
356 | case E: | |
357 | default: return; | |
358 | } | |
359 | p++; | |
360 | } | |
361 | } | |
362 | ||
363 | void update_redx_5739Aform() | |
364 | { | |
365 | if (!fields_initialized) init_widgets_5739A(); | |
366 | updateFORM_5739A(redx_QUAD_5739A); | |
367 | } | |
368 | ||
369 | void clear_redx_5739A_form() | |
370 | { | |
371 | clear_redx_5739Afields(); | |
372 | update_redx_5739Aform(); | |
373 | } | |
374 | ||
375 | static string mbuff; | |
376 | ||
377 | void make_buffQUAD_5739A(QUAD_5739A *p) | |
378 | { | |
379 | string one = "1"; string zero = "0"; | |
380 | string sval = " "; | |
381 | char szval[20]; | |
382 | QTYPE_5739A qt = E; | |
383 | while ((qt = p->qtype) != E) { | |
384 | switch (qt) { | |
385 | case B: | |
386 | if (*((bool *)(p->ptr)) == true) | |
387 | mbuff.append( lineout( p->htmnbr, *((bool *)(p->ptr)) ? one : zero)); | |
388 | break; | |
389 | case S: | |
390 | if (((string *)(p->ptr))->length()) | |
391 | mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); | |
392 | break; | |
393 | case T: | |
394 | mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); | |
395 | break; | |
396 | case C: | |
397 | if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { | |
398 | sval = " "; | |
399 | sval[0] = *((char *)(p->ptr)); | |
400 | mbuff.append( lineout( p->htmnbr, sval)); | |
401 | } | |
402 | break; | |
403 | case I: | |
404 | if (*((int*)(p->ptr)) > 0) { | |
405 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
406 | sval = szval; | |
407 | mbuff.append( lineout( p->htmnbr, sval) ); | |
408 | } | |
409 | break; | |
410 | case F: | |
411 | if (*((float *)(p->ptr)) > 0) { | |
412 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
413 | sval = szval; | |
414 | mbuff.append( lineout( p->htmnbr, sval) ); | |
415 | } | |
416 | break; | |
417 | case E: | |
418 | default: return; | |
419 | } | |
420 | p++; | |
421 | } | |
422 | } | |
423 | ||
424 | void make_buffredx_5739A(bool compress = false) | |
425 | { | |
426 | mbuff.clear(); | |
427 | make_buffQUAD_5739A(redx_QUAD_5739A); | |
428 | if (compress) compress_maybe(mbuff); | |
429 | buffredx_5739A.append(mbuff); | |
430 | } | |
431 | ||
432 | void readQUAD_5739A(string data, QUAD_5739A *p) | |
433 | { | |
434 | int i = 0; | |
435 | float f; | |
436 | QTYPE_5739A qt = E; | |
437 | while ((qt = p->qtype) != E) { | |
438 | switch (qt) { | |
439 | case B: | |
440 | *((bool *)(p->ptr)) = (findstr( data, p->htmnbr ) == "1"); | |
441 | break; | |
442 | case S: | |
443 | *((string *)(p->ptr)) = findstr( data, p->htmnbr ); | |
444 | break; | |
445 | case T: | |
446 | *((string *)(p->ptr)) = findstr( data, p->htmnbr ); | |
447 | break; | |
448 | case C: | |
449 | *((char *)(p->ptr)) = findstr( data, p->htmnbr )[0]; | |
450 | break; | |
451 | case I: | |
452 | i = 0; | |
453 | sscanf( findstr( data, p->htmnbr ).c_str(), "%d", &i); | |
454 | *((int *)(p->ptr)) = i; | |
455 | break; | |
456 | case F: | |
457 | f = 0; | |
458 | sscanf( findstr( data, p->htmnbr ).c_str(), "%f", &f); | |
459 | *((float *)(p->ptr)) = f; | |
460 | break; | |
461 | case E: | |
462 | default: return; | |
463 | } | |
464 | p++; | |
465 | } | |
466 | } | |
467 | ||
468 | void read_redx_5739A_buffer(string data) | |
469 | { | |
470 | clear_redx_5739Afields(); | |
471 | read_header(data); | |
472 | ||
473 | readQUAD_5739A (data, redx_QUAD_5739A); | |
474 | update_redx_5739Aform(); | |
475 | } | |
476 | ||
477 | void cb_redx_5739A_new() | |
478 | { | |
479 | if (check_redx_5739Afields()) { | |
480 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { | |
481 | update_header(CHANGED); | |
482 | cb_redx_5739A_save(); | |
483 | } | |
484 | } | |
485 | clear_redx_5739A_form(); | |
486 | clear_header(); | |
487 | def_redx_5739A_filename = ICS_msg_dir; | |
488 | def_redx_5739A_filename.append("new").append(FREDX5739A_EXT); | |
489 | show_filename(def_redx_5739A_filename); | |
490 | using_redx_5739A_template = false; | |
491 | } | |
492 | ||
493 | void cb_redx_5739A_import() | |
494 | { | |
495 | fl_alert2("Not implemented"); | |
496 | } | |
497 | ||
498 | void cb_redx_5739A_export() | |
499 | { | |
500 | fl_alert2("Not implemented"); | |
501 | } | |
502 | ||
503 | void cb_redx_5739A_wrap_import(string wrapfilename, string inpbuffer) | |
504 | { | |
505 | clear_redx_5739A_form(); | |
506 | read_redx_5739A_buffer(inpbuffer); | |
507 | def_redx_5739A_filename = ICS_msg_dir; | |
508 | def_redx_5739A_filename.append(wrapfilename); | |
509 | show_filename(def_redx_5739A_filename); | |
510 | using_redx_5739A_template = false; | |
511 | } | |
512 | ||
513 | int eval_redx_5739A_fsize() | |
514 | { | |
515 | Ccrc16 chksum; | |
516 | evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); | |
517 | evalstr.append(base_redx_5739A_filename).append("]"); | |
518 | update_redx_5739Afields(); | |
519 | update_header(FROM); | |
520 | evalstr.append(header("<redx_5739A>")); | |
521 | buffredx_5739A.clear(); | |
522 | make_buffredx_5739A(true); | |
523 | if (buffredx_5739A.empty()) return 0; | |
524 | compress_maybe( buffredx_5739A ); | |
525 | evalstr.append( buffredx_5739A ); | |
526 | evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); | |
527 | return evalstr.length(); | |
528 | } | |
529 | ||
530 | void cb_redx_5739A_wrap_export() | |
531 | { | |
532 | if (check_redx_5739Afields()) { | |
533 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
534 | return; | |
535 | update_header(CHANGED); | |
536 | } | |
537 | update_redx_5739Afields(); | |
538 | ||
539 | if (base_redx_5739A_filename == string("new").append(FREDX5739A_EXT) || | |
540 | base_redx_5739A_filename == string("default").append(FREDX5739A_EXT) ) | |
541 | if (!cb_redx_5739A_save_as()) return; | |
542 | ||
543 | string wrapfilename = WRAP_send_dir; | |
544 | wrapfilename.append(base_redx_5739A_filename); | |
545 | wrapfilename.append(".wrap"); | |
546 | const char *p = FSEL::saveas( | |
547 | "Save as wrap file", | |
548 | "Wrap file\t*.{wrap,WRAP}", | |
549 | wrapfilename.c_str()); | |
550 | if (p) { | |
551 | string pext = fl_filename_ext(p); | |
552 | wrapfilename = p; | |
553 | ||
554 | update_header(FROM); | |
555 | buffredx_5739A.assign(header("<redx_5739A>")); | |
556 | make_buffredx_5739A(true); | |
557 | export_wrapfile(base_redx_5739A_filename, wrapfilename, buffredx_5739A, pext != ".wrap"); | |
558 | ||
559 | buffredx_5739A.assign(header("<redx_5739A>")); | |
560 | make_buffredx_5739A(false); | |
561 | write_redx_5739A(def_redx_5739A_filename); | |
562 | } | |
563 | } | |
564 | ||
565 | void cb_redx_5739A_wrap_autosend() | |
566 | { | |
567 | if (check_redx_5739Afields()) { | |
568 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
569 | return; | |
570 | update_header(CHANGED); | |
571 | } | |
572 | update_redx_5739Afields(); | |
573 | ||
574 | if (base_redx_5739A_filename == string("new").append(FREDX5739A_EXT) || | |
575 | base_redx_5739A_filename == string("default").append(FREDX5739A_EXT) ) | |
576 | if (!cb_redx_5739A_save_as()) return; | |
577 | ||
578 | update_header(FROM); | |
579 | buffredx_5739A.assign(header("<redx_5739A>")); | |
580 | make_buffredx_5739A(true); | |
581 | xfr_via_socket(base_redx_5739A_filename, buffredx_5739A); | |
582 | ||
583 | buffredx_5739A.assign(header("<redx_5739A>")); | |
584 | make_buffredx_5739A(false); | |
585 | write_redx_5739A(def_redx_5739A_filename); | |
586 | } | |
587 | ||
588 | void cb_redx_5739A_load_template() | |
589 | { | |
590 | string def_redx_5739A_filename = def_redx_5739A_TemplateName; | |
591 | const char *p = FSEL::select( | |
592 | "Open template file", | |
593 | string("Template file\t*").append(TREDX5739A_EXT).c_str(), | |
594 | def_redx_5739A_filename.c_str()); | |
595 | if (p) { | |
596 | clear_redx_5739A_form(); | |
597 | read_data_file(p); | |
598 | def_redx_5739A_TemplateName = p; | |
599 | show_filename(def_redx_5739A_TemplateName); | |
600 | using_redx_5739A_template = true; | |
601 | } | |
602 | } | |
603 | ||
604 | void cb_redx_5739A_save_template() | |
605 | { | |
606 | if (!using_redx_5739A_template) { | |
607 | cb_redx_5739A_save_as_template(); | |
608 | return; | |
609 | } | |
610 | string def_redx_5739A_filename = def_redx_5739A_TemplateName; | |
611 | const char *p = FSEL::saveas( | |
612 | "Save template file", | |
613 | string("Template file\t*").append(TREDX5739A_EXT).c_str(), | |
614 | def_redx_5739A_filename.c_str()); | |
615 | if (p) { | |
616 | update_header(CHANGED); | |
617 | update_redx_5739Afields(); | |
618 | buffredx_5739A.assign(header("<redx_5739A>")); | |
619 | make_buffredx_5739A(); | |
620 | write_redx_5739A(p); | |
621 | } | |
622 | } | |
623 | ||
624 | void cb_redx_5739A_save_as_template() | |
625 | { | |
626 | string def_redx_5739A_filename = def_redx_5739A_TemplateName; | |
627 | const char *p = FSEL::saveas( | |
628 | "Save as template file", | |
629 | string("Template file\t*").append(TREDX5739A_EXT).c_str(), | |
630 | def_redx_5739A_filename.c_str()); | |
631 | if (p) { | |
632 | const char *pext = fl_filename_ext(p); | |
633 | def_redx_5739A_TemplateName = p; | |
634 | if (strlen(pext) == 0) def_redx_5739A_TemplateName.append(TREDX5739A_EXT); | |
635 | remove_spaces_from_filename(def_redx_5739A_TemplateName); | |
636 | ||
637 | clear_header(); | |
638 | update_header(CHANGED); | |
639 | update_redx_5739Afields(); | |
640 | buffredx_5739A.assign(header("<redx_5739A>")); | |
641 | make_buffredx_5739A(); | |
642 | write_redx_5739A(def_redx_5739A_TemplateName); | |
643 | ||
644 | show_filename(def_redx_5739A_TemplateName); | |
645 | using_redx_5739A_template = true; | |
646 | } | |
647 | } | |
648 | ||
649 | void cb_redx_5739A_open() | |
650 | { | |
651 | const char *p = FSEL::select( | |
652 | _("Open data file"), | |
653 | string("ICS-redx_5739A\t*").append(FREDX5739A_EXT).c_str(), | |
654 | def_redx_5739A_filename.c_str()); | |
655 | if (!p) return; | |
656 | if (strlen(p) == 0) return; | |
657 | clear_redx_5739A_form(); | |
658 | read_data_file(p); | |
659 | using_redx_5739A_template = false; | |
660 | def_redx_5739A_filename = p; | |
661 | show_filename(def_redx_5739A_filename); | |
662 | } | |
663 | ||
664 | void write_redx_5739A(string s) | |
665 | { | |
666 | FILE *fileredx_5739A = fopen(s.c_str(), "w"); | |
667 | if (!fileredx_5739A) return; | |
668 | ||
669 | fwrite(buffredx_5739A.c_str(), buffredx_5739A.length(), 1, fileredx_5739A); | |
670 | fclose(fileredx_5739A); | |
671 | } | |
672 | ||
673 | bool cb_redx_5739A_save_as() | |
674 | { | |
675 | const char *p; | |
676 | string newfilename; | |
677 | ||
678 | string name = named_file(); | |
679 | if (!name.empty()) { | |
680 | name.append(FREDX5739A_EXT); | |
681 | newfilename = ICS_msg_dir; | |
682 | newfilename.append(name); | |
683 | } else | |
684 | newfilename = def_redx_5739A_filename; | |
685 | ||
686 | p = FSEL::saveas( | |
687 | _("Save data file"), | |
688 | string("ICS-redx_5739A\t*").append(FREDX5739A_EXT).c_str(), | |
689 | newfilename.c_str()); | |
690 | ||
691 | if (!p) return false; | |
692 | if (strlen(p) == 0) return false; | |
693 | ||
694 | if (progStatus.sernbr_fname) update_sernbr(); | |
695 | ||
696 | const char *pext = fl_filename_ext(p); | |
697 | def_redx_5739A_filename = p; | |
698 | if (strlen(pext) == 0) def_redx_5739A_filename.append(FREDX5739A_EXT); | |
699 | ||
700 | remove_spaces_from_filename(def_redx_5739A_filename); | |
701 | ||
702 | update_header(NEW); | |
703 | update_redx_5739Afields(); | |
704 | buffredx_5739A.assign(header("<redx_5739A>")); | |
705 | make_buffredx_5739A(); | |
706 | write_redx_5739A(def_redx_5739A_filename); | |
707 | ||
708 | using_redx_5739A_template = false; | |
709 | show_filename(def_redx_5739A_filename); | |
710 | return true; | |
711 | } | |
712 | ||
713 | void cb_redx_5739A_save() | |
714 | { | |
715 | if (base_redx_5739A_filename == string("new").append(FREDX5739A_EXT) || | |
716 | base_redx_5739A_filename == string("default").append(FREDX5739A_EXT) || | |
717 | using_redx_5739A_template == true) { | |
718 | cb_redx_5739A_save_as(); | |
719 | return; | |
720 | } | |
721 | ||
722 | if (check_redx_5739Afields()) update_header(CHANGED); | |
723 | update_redx_5739Afields(); | |
724 | buffredx_5739A.assign(header("<redx_5739A>")); | |
725 | make_buffredx_5739A(); | |
726 | write_redx_5739A(def_redx_5739A_filename); | |
727 | ||
728 | using_redx_5739A_template = false; | |
729 | } | |
730 | ||
731 | void quad_to_html_5739A( string &target, QUAD_5739A *p) | |
732 | { | |
733 | string X = "X"; string SP = " "; | |
734 | string sval = " "; | |
735 | char szval[20]; | |
736 | while (p->qtype != E) { | |
737 | if (p->qtype == B) | |
738 | replacestr(target, p->htmnbr, *((bool *)(p->ptr)) ? X : SP); | |
739 | else if (p->qtype == S) | |
740 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
741 | else if (p->qtype == T) | |
742 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
743 | else if (p->qtype == C) { | |
744 | sval = " "; | |
745 | sval[0] = *((char *)(p->ptr)); | |
746 | replacestr(target, p->htmnbr, sval); | |
747 | } | |
748 | else if (p->qtype == I) { | |
749 | if (*((int *)(p->ptr)) > 0) { | |
750 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
751 | sval = szval; | |
752 | } else sval.clear(); | |
753 | replacestr(target, p->htmnbr, sval); | |
754 | } | |
755 | else if (p->qtype == F) { | |
756 | if (*((float *)(p->ptr)) != 0) { | |
757 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
758 | sval = szval; | |
759 | } else sval.clear(); | |
760 | replacestr(target, p->htmnbr, sval); | |
761 | } | |
762 | p++; | |
763 | } | |
764 | } | |
765 | ||
766 | void cb_redx_5739A_html() | |
767 | { | |
768 | string name_name = fl_filename_name(def_redx_5739A_filename.c_str()); | |
769 | size_t p = name_name.rfind('.'); | |
770 | if (p != string::npos) name_name.erase(p); | |
771 | ||
772 | string redx_5739A_name = ICS_dir; | |
773 | redx_5739A_name.append(name_name); | |
774 | redx_5739A_name.append(".html"); | |
775 | ||
776 | update_redx_5739Afields(); | |
777 | string formredx_5739A = redx_5739A_html_template; | |
778 | ||
779 | replacestr(formredx_5739A, TITLE, name_name); | |
780 | ||
781 | quad_to_html_5739A (formredx_5739A, redx_QUAD_5739A); | |
782 | ||
783 | FILE *fileredx_5739A = fopen(redx_5739A_name.c_str(), "w"); | |
784 | fprintf(fileredx_5739A,"%s", formredx_5739A.c_str()); | |
785 | fclose(fileredx_5739A); | |
786 | ||
787 | open_url(redx_5739A_name.c_str()); | |
788 | } | |
789 | ||
790 | void cb_5739A_msg_type() | |
791 | { | |
792 | if (selected_form == REDX5739A ) { | |
793 | show_filename(def_redx_5739A_filename); | |
794 | } else { | |
795 | show_filename(def_rg_filename); | |
796 | } | |
797 | } | |
798 | ||
799 | void quad_to_text( string &target, QUAD_5739A *p) | |
800 | { | |
801 | string X = "X"; string SP = " "; | |
802 | string sval = " "; | |
803 | string del = "DELETE"; | |
804 | char szval[20]; | |
805 | while (p->qtype != E) { | |
806 | if (p->qtype == B) { | |
807 | bool b = *((bool *)(p->ptr)); | |
808 | if (b) replacestr(target, p->htmnbr, X); | |
809 | else replacestr(target, p->htmnbr, del); | |
810 | } else if (p->qtype == S) { | |
811 | if (((string *)(p->ptr))->length()) | |
812 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
813 | else replacestr(target, p->htmnbr, del); | |
814 | } else if (p->qtype == T) { | |
815 | if (((string *)(p->ptr))->length()) | |
816 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
817 | else replacestr(target, p->htmnbr, del); | |
818 | } else if (p->qtype == C) { | |
819 | sval = " "; | |
820 | sval[0] = *((char *)(p->ptr)); | |
821 | if (sval[0] != 0 && sval[0] != ' ') | |
822 | replacestr(target, p->htmnbr, sval); | |
823 | else replacestr(target, p->htmnbr, del); | |
824 | } | |
825 | else if (p->qtype == I) { | |
826 | if (*((int *)(p->ptr)) > 0) { | |
827 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
828 | sval = szval; | |
829 | replacestr(target, p->htmnbr, sval); | |
830 | } else replacestr(target, p->htmnbr, del); | |
831 | } | |
832 | else if (p->qtype == F) { | |
833 | if (*((float *)(p->ptr)) != 0) { | |
834 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
835 | sval = szval; | |
836 | replacestr(target, p->htmnbr, sval); | |
837 | } else replacestr(target, p->htmnbr, del); | |
838 | } | |
839 | p++; | |
840 | } | |
841 | } | |
842 | ||
843 | void strip_text_5739A( string &target ) | |
844 | { | |
845 | size_t p = 0, p1, p2; | |
846 | while ((p = target.find ("DELETE"), p) != string::npos) { | |
847 | p1 = target.rfind ("\n", p); | |
848 | p2 = target.find ("\n", p); | |
849 | if (p1 != string::npos && p2 != string::npos) | |
850 | target.erase( p1, p2 - p1 ); | |
851 | p++; | |
852 | } | |
853 | } | |
854 | ||
855 | void cb_redx_5739A_textout() | |
856 | { | |
857 | string redx_5739A_name = ICS_dir; | |
858 | redx_5739A_name.append("redx_5739A.txt"); | |
859 | ||
860 | update_redx_5739Afields(); | |
861 | string formredx_5739A = redx_5739A_text_template; | |
862 | ||
863 | quad_to_text (formredx_5739A, redx_QUAD_5739A); | |
864 | ||
865 | strip_text_5739A (formredx_5739A); | |
866 | ||
867 | FILE *fileredx_5739A = fopen(redx_5739A_name.c_str(), "w"); | |
868 | fprintf(fileredx_5739A,"%s", formredx_5739A.c_str()); | |
869 | fclose(fileredx_5739A); | |
870 | ||
871 | open_url(redx_5739A_name.c_str()); | |
872 | } | |
873 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <FL/Fl_Hold_Browser.H> | |
21 | ||
22 | #include "gettext.h" | |
23 | #include "status.h" | |
24 | #include "util.h" | |
25 | ||
26 | #include "flmsg_dialog.h" | |
27 | #include "flmsg.h" | |
28 | #include "fileselect.h" | |
29 | ||
30 | Fl_Group *tab_redx_5739A = (Fl_Group *)0; | |
31 | Fl_Tabs *tab_redx_5739A_type = (Fl_Tabs *)0; | |
32 | ||
33 | Fl_Group *tab_redx_5739A_1 = (Fl_Group *)0; | |
34 | ||
35 | Fl_Input2 *rdx_5739A_nbr = (Fl_Input2 *)0; | |
36 | Fl_Input2 *rdx_5739A_name = (Fl_Input2 *)0; | |
37 | Fl_Input2 *rdx_5739A_state = (Fl_Input2 *)0; | |
38 | Fl_Input2 *rdx_5739A_cnty = (Fl_Input2 *)0; | |
39 | Fl_Input2 *rdx_5739A_city = (Fl_Input2 *)0; | |
40 | Fl_Input2 *rdx_5739A_date = (Fl_Input2 *)0; | |
41 | Fl_Input2 *rdx_5739A_street = (Fl_Input2 *)0; | |
42 | Fl_Input2 *rdx_5739A_georef = (Fl_Input2 *)0; | |
43 | ||
44 | Fl_Group *tab_redx_5739A_2 = (Fl_Group *)0; | |
45 | ||
46 | Fl_Input2 *rdx_5739A_adrs0 = (Fl_Input2 *)0; | |
47 | Fl_Input2 *rdx_5739A_dwell0 = (Fl_Input2 *)0; | |
48 | Fl_Input2 *rdx_5739A_base0 = (Fl_Input2 *)0; | |
49 | Fl_Input2 *rdx_5739A_ds0 = (Fl_Input2 *)0; | |
50 | Fl_Input2 *rdx_5739A_mj0 = (Fl_Input2 *)0; | |
51 | Fl_Input2 *rdx_5739A_mn0 = (Fl_Input2 *)0; | |
52 | Fl_Input2 *rdx_5739A_af0 = (Fl_Input2 *)0; | |
53 | Fl_Input2 *rdx_5739A_in0 = (Fl_Input2 *)0; | |
54 | Fl_Input2 *rdx_5739A_un0 = (Fl_Input2 *)0; | |
55 | Fl_Input2 *rdx_5739A_gd0 = (Fl_Input2 *)0; | |
56 | ||
57 | Fl_Group *tab_redx_5739A_3 = (Fl_Group *)0; | |
58 | ||
59 | Fl_Input2 *rdx_5739A_adrs1 = (Fl_Input2 *)0; | |
60 | Fl_Input2 *rdx_5739A_dwell1 = (Fl_Input2 *)0; | |
61 | Fl_Input2 *rdx_5739A_base1 = (Fl_Input2 *)0; | |
62 | Fl_Input2 *rdx_5739A_ds1 = (Fl_Input2 *)0; | |
63 | Fl_Input2 *rdx_5739A_mj1 = (Fl_Input2 *)0; | |
64 | Fl_Input2 *rdx_5739A_mn1 = (Fl_Input2 *)0; | |
65 | Fl_Input2 *rdx_5739A_af1 = (Fl_Input2 *)0; | |
66 | Fl_Input2 *rdx_5739A_in1 = (Fl_Input2 *)0; | |
67 | Fl_Input2 *rdx_5739A_un1 = (Fl_Input2 *)0; | |
68 | Fl_Input2 *rdx_5739A_gd1 = (Fl_Input2 *)0; | |
69 | ||
70 | //---------------------------------------------------------------------- | |
71 | ||
72 | // widget callbacks & support | |
73 | ||
74 | //---------------------------------------------------------------------- | |
75 | static void cb_btn_5739A_date(Fl_Button*, void*) { | |
76 | rdx_5739A_date->value(szDate(progStatus.dtformat)); | |
77 | estimate(); | |
78 | } | |
79 | ||
80 | void create_redx_5739A() | |
81 | { | |
82 | int Y = tab_top; | |
83 | tab_redx_5739A = new Fl_Group(0, Y, 570, 390); | |
84 | tab_redx_5739A->align(FL_ALIGN_TOP); | |
85 | ||
86 | tab_redx_5739A_type = new Fl_Tabs(0, Y+2, 570, 387); | |
87 | tab_redx_5739A_type->selection_color((Fl_Color)246); | |
88 | ||
89 | tab_redx_5739A_1 = new Fl_Group(0, Y+25, 570, 360, _("DR data")); | |
90 | ||
91 | Y += 35; | |
92 | Fl_Box *bx = new Fl_Box(50, Y, 200, 24, _("Red Cross Form 5739A")); | |
93 | bx->box(FL_FLAT_BOX); | |
94 | bx->align(FL_ALIGN_INSIDE | FL_ALIGN_CENTER); | |
95 | Y += 30; | |
96 | rdx_5739A_nbr = new Fl_Input2(100, Y, 150, 24, _("DR #")); | |
97 | rdx_5739A_nbr->tooltip(_("")); | |
98 | rdx_5739A_nbr->callback(redx_changed); | |
99 | rdx_5739A_nbr->when(FL_WHEN_CHANGED); | |
100 | ||
101 | Y += 30; | |
102 | rdx_5739A_name = new Fl_Input2(100, Y, 250, 24, _("DR Name")); | |
103 | rdx_5739A_name->tooltip(_("")); | |
104 | rdx_5739A_name->callback(redx_changed); | |
105 | rdx_5739A_name->when(FL_WHEN_CHANGED); | |
106 | ||
107 | Y += 30; | |
108 | rdx_5739A_state = new Fl_Input2(100, Y, 50, 24, _("State")); | |
109 | rdx_5739A_state->tooltip(_("")); | |
110 | rdx_5739A_state->callback(redx_changed); | |
111 | rdx_5739A_state->when(FL_WHEN_CHANGED); | |
112 | ||
113 | Y += 30; | |
114 | rdx_5739A_cnty = new Fl_Input2(100, Y, 250, 24, _("County")); | |
115 | rdx_5739A_cnty->tooltip(_("")); | |
116 | rdx_5739A_cnty->callback(redx_changed); | |
117 | rdx_5739A_cnty->when(FL_WHEN_CHANGED); | |
118 | ||
119 | Y += 30; | |
120 | rdx_5739A_city = new Fl_Input2(100, Y, 450, 24, _("City")); | |
121 | rdx_5739A_city->tooltip(_("")); | |
122 | rdx_5739A_city->callback(redx_changed); | |
123 | rdx_5739A_city->when(FL_WHEN_CHANGED); | |
124 | ||
125 | Y += 30; | |
126 | rdx_5739A_date = new Fl_Input2(100, Y, 150, 24, _("Date")); | |
127 | rdx_5739A_date->tooltip(_("")); | |
128 | rdx_5739A_date->callback(redx_changed); | |
129 | rdx_5739A_date->when(FL_WHEN_CHANGED); | |
130 | ||
131 | Fl_Button *btn_5739A_date = new Fl_Button(260, Y+2, 20, 20, _("...")); | |
132 | btn_5739A_date->tooltip(_("Set today")); | |
133 | btn_5739A_date->callback((Fl_Callback*)cb_btn_5739A_date); | |
134 | ||
135 | Y += 30; | |
136 | rdx_5739A_street = new Fl_Input2(100, Y, 450, 24, _("Street")); | |
137 | rdx_5739A_street->tooltip(_("")); | |
138 | rdx_5739A_street->callback(redx_changed); | |
139 | rdx_5739A_street->when(FL_WHEN_CHANGED); | |
140 | ||
141 | Y += 30; | |
142 | rdx_5739A_georef = new Fl_Input2(100, Y, 450, 24, _("Geo. Ref.")); | |
143 | rdx_5739A_georef->tooltip(_("")); | |
144 | rdx_5739A_georef->callback(redx_changed); | |
145 | rdx_5739A_georef->when(FL_WHEN_CHANGED); | |
146 | ||
147 | tab_redx_5739A_1->end(); | |
148 | ||
149 | Y = tab_top; | |
150 | tab_redx_5739A_2 = new Fl_Group(0, Y+25, 570, 360, _("Area-1")); | |
151 | Y += 35; | |
152 | rdx_5739A_adrs0 = new Fl_Input2(160, Y, 300, 24, _("range of address #'s")); | |
153 | rdx_5739A_adrs0->tooltip(_("")); | |
154 | rdx_5739A_adrs0->callback(redx_changed); | |
155 | rdx_5739A_adrs0->when(FL_WHEN_CHANGED); | |
156 | ||
157 | Y += 25; | |
158 | rdx_5739A_dwell0 = new Fl_Input2(160, Y, 50, 24, _("# affected dwellings")); | |
159 | rdx_5739A_dwell0->tooltip(_("")); | |
160 | rdx_5739A_dwell0->callback(redx_changed); | |
161 | rdx_5739A_dwell0->when(FL_WHEN_CHANGED); | |
162 | ||
163 | Y += 25; | |
164 | rdx_5739A_base0 = new Fl_Input2(160, Y, 50, 24, _("Basements y/n?")); | |
165 | rdx_5739A_base0->tooltip(_("")); | |
166 | rdx_5739A_base0->callback(redx_changed); | |
167 | rdx_5739A_base0->when(FL_WHEN_CHANGED); | |
168 | ||
169 | Y += 25; | |
170 | rdx_5739A_ds0 = new Fl_Input2(160, Y, 50, 24, _("Destroyed %")); | |
171 | rdx_5739A_ds0->tooltip(_("")); | |
172 | rdx_5739A_ds0->callback(redx_changed); | |
173 | rdx_5739A_ds0->when(FL_WHEN_CHANGED); | |
174 | ||
175 | Y += 25; | |
176 | rdx_5739A_mj0 = new Fl_Input2(160, Y, 50, 24, _("Major damage %")); | |
177 | rdx_5739A_mj0->tooltip(_("")); | |
178 | rdx_5739A_mj0->callback(redx_changed); | |
179 | rdx_5739A_mj0->when(FL_WHEN_CHANGED); | |
180 | ||
181 | Y += 25; | |
182 | rdx_5739A_mn0 = new Fl_Input2(160, Y, 50, 24, _("Minor damage %")); | |
183 | rdx_5739A_mn0->tooltip(_("")); | |
184 | rdx_5739A_mn0->callback(redx_changed); | |
185 | rdx_5739A_mn0->when(FL_WHEN_CHANGED); | |
186 | ||
187 | Y += 25; | |
188 | rdx_5739A_af0 = new Fl_Input2(160, Y, 50, 24, _("Affected %")); | |
189 | rdx_5739A_af0->tooltip(_("")); | |
190 | rdx_5739A_af0->callback(redx_changed); | |
191 | rdx_5739A_af0->when(FL_WHEN_CHANGED); | |
192 | ||
193 | Y += 25; | |
194 | rdx_5739A_in0 = new Fl_Input2(160, Y, 50, 24, _("Inaccessible %")); | |
195 | rdx_5739A_in0->tooltip(_("")); | |
196 | rdx_5739A_in0->callback(redx_changed); | |
197 | rdx_5739A_in0->when(FL_WHEN_CHANGED); | |
198 | ||
199 | Y += 25; | |
200 | rdx_5739A_un0 = new Fl_Input2(160, Y, 50, 24, _("Unknown/None %")); | |
201 | rdx_5739A_un0->tooltip(_("")); | |
202 | rdx_5739A_un0->callback(redx_changed); | |
203 | rdx_5739A_un0->when(FL_WHEN_CHANGED); | |
204 | ||
205 | Y += 25; | |
206 | rdx_5739A_gd0 = new Fl_Input2(160, Y, 400, 76, _("General desc.")); | |
207 | rdx_5739A_gd0->align(FL_ALIGN_LEFT_TOP); | |
208 | rdx_5739A_gd0->type(4); | |
209 | rdx_5739A_gd0->tooltip(_("")); | |
210 | rdx_5739A_gd0->callback(redx_changed); | |
211 | rdx_5739A_gd0->when(FL_WHEN_CHANGED); | |
212 | ||
213 | tab_redx_5739A_2->end(); | |
214 | ||
215 | Y = tab_top; | |
216 | tab_redx_5739A_3 = new Fl_Group(0, Y+25, 570, 360, _("Area-2")); | |
217 | Y += 35; | |
218 | rdx_5739A_adrs1 = new Fl_Input2(160, Y, 300, 24, _("range of address #'s")); | |
219 | rdx_5739A_adrs1->tooltip(_("")); | |
220 | rdx_5739A_adrs1->callback(redx_changed); | |
221 | rdx_5739A_adrs1->when(FL_WHEN_CHANGED); | |
222 | ||
223 | Y += 25; | |
224 | rdx_5739A_dwell1 = new Fl_Input2(160, Y, 50, 24, _("# affected dwellings")); | |
225 | rdx_5739A_dwell1->tooltip(_("")); | |
226 | rdx_5739A_dwell1->callback(redx_changed); | |
227 | rdx_5739A_dwell1->when(FL_WHEN_CHANGED); | |
228 | ||
229 | Y += 25; | |
230 | rdx_5739A_base1 = new Fl_Input2(160, Y, 50, 24, _("Basements y/n?")); | |
231 | rdx_5739A_base1->tooltip(_("")); | |
232 | rdx_5739A_base1->callback(redx_changed); | |
233 | rdx_5739A_base1->when(FL_WHEN_CHANGED); | |
234 | ||
235 | Y += 25; | |
236 | rdx_5739A_ds1 = new Fl_Input2(160, Y, 50, 24, _("Destroyed %")); | |
237 | rdx_5739A_ds1->tooltip(_("")); | |
238 | rdx_5739A_ds1->callback(redx_changed); | |
239 | rdx_5739A_ds1->when(FL_WHEN_CHANGED); | |
240 | ||
241 | Y += 25; | |
242 | rdx_5739A_mj1 = new Fl_Input2(160, Y, 50, 24, _("Major damage %")); | |
243 | rdx_5739A_mj1->tooltip(_("")); | |
244 | rdx_5739A_mj1->callback(redx_changed); | |
245 | rdx_5739A_mj1->when(FL_WHEN_CHANGED); | |
246 | ||
247 | Y += 25; | |
248 | rdx_5739A_mn1 = new Fl_Input2(160, Y, 50, 24, _("Minor damage %")); | |
249 | rdx_5739A_mn1->tooltip(_("")); | |
250 | rdx_5739A_mn1->callback(redx_changed); | |
251 | rdx_5739A_mn1->when(FL_WHEN_CHANGED); | |
252 | ||
253 | Y += 25; | |
254 | rdx_5739A_af1 = new Fl_Input2(160, Y, 50, 24, _("Affected %")); | |
255 | rdx_5739A_af1->tooltip(_("")); | |
256 | rdx_5739A_af1->callback(redx_changed); | |
257 | rdx_5739A_af1->when(FL_WHEN_CHANGED); | |
258 | ||
259 | Y += 25; | |
260 | rdx_5739A_in1 = new Fl_Input2(160, Y, 50, 24, _("Inaccessible %")); | |
261 | rdx_5739A_in1->tooltip(_("")); | |
262 | rdx_5739A_in1->callback(redx_changed); | |
263 | rdx_5739A_in1->when(FL_WHEN_CHANGED); | |
264 | ||
265 | Y += 25; | |
266 | rdx_5739A_un1 = new Fl_Input2(160, Y, 50, 24, _("Unknown/None %")); | |
267 | rdx_5739A_un1->tooltip(_("")); | |
268 | rdx_5739A_un1->callback(redx_changed); | |
269 | rdx_5739A_un1->when(FL_WHEN_CHANGED); | |
270 | ||
271 | Y += 25; | |
272 | rdx_5739A_gd1 = new Fl_Input2(160, Y, 400, 76, _("General desc.")); | |
273 | rdx_5739A_gd1->align(FL_ALIGN_LEFT_TOP); | |
274 | rdx_5739A_gd1->type(4); | |
275 | rdx_5739A_gd1->tooltip(_("")); | |
276 | rdx_5739A_gd1->callback(redx_changed); | |
277 | rdx_5739A_gd1->when(FL_WHEN_CHANGED); | |
278 | ||
279 | tab_redx_5739A_3->end(); | |
280 | ||
281 | tab_redx_5739A->end(); | |
282 | ||
283 | tab_redx_5739A->hide(); | |
284 | ||
285 | }; | |
286 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <stdlib.h> | |
21 | #include <iostream> | |
22 | #include <fstream> | |
23 | #include <cstring> | |
24 | #include <ctime> | |
25 | #include <sys/types.h> | |
26 | #include <sys/stat.h> | |
27 | #include <stdio.h> | |
28 | #include <errno.h> | |
29 | ||
30 | #include <FL/Fl.H> | |
31 | #include <FL/Enumerations.H> | |
32 | #include <FL/Fl_Window.H> | |
33 | #include <FL/Fl_Button.H> | |
34 | #include <FL/Fl_Group.H> | |
35 | #include <FL/Fl_Sys_Menu_Bar.H> | |
36 | #include <FL/x.H> | |
37 | #include <FL/Fl_Help_Dialog.H> | |
38 | #include <FL/Fl_Menu_Item.H> | |
39 | #include <FL/Fl_File_Icon.H> | |
40 | ||
41 | #include "config.h" | |
42 | #include "flmsg_config.h" | |
43 | ||
44 | #include "flmsg.h" | |
45 | #include "templates.h" | |
46 | #include "debug.h" | |
47 | #include "util.h" | |
48 | #include "gettext.h" | |
49 | #include "flmsg_dialog.h" | |
50 | #include "flinput2.h" | |
51 | #include "date.h" | |
52 | #include "calendar.h" | |
53 | #include "icons.h" | |
54 | #include "fileselect.h" | |
55 | #include "wrap.h" | |
56 | #include "status.h" | |
57 | #include "parse_xml.h" | |
58 | ||
59 | #ifdef WIN32 | |
60 | # include "flmsgrc.h" | |
61 | # include "compat.h" | |
62 | # define dirent fl_dirent_no_thanks | |
63 | #endif | |
64 | ||
65 | #include <FL/filename.H> | |
66 | #include "dirent-check.h" | |
67 | ||
68 | #include <FL/x.H> | |
69 | #include <FL/Fl_Pixmap.H> | |
70 | #include <FL/Fl_Image.H> | |
71 | ||
72 | using namespace std; | |
73 | ||
74 | string s_redx_5739B_nbr; | |
75 | string s_redx_5739B_name; | |
76 | string s_redx_5739B_state; | |
77 | string s_redx_5739B_cnty; | |
78 | string s_redx_5739B_city; | |
79 | string s_redx_5739B_date; | |
80 | string s_redx_5739B_georef; | |
81 | string s_redx_5739B_north; | |
82 | string s_redx_5739B_east; | |
83 | string s_redx_5739B_south; | |
84 | string s_redx_5739B_west; | |
85 | ||
86 | string s_redx_5739B_dwell; | |
87 | string s_redx_5739B_ds; | |
88 | string s_redx_5739B_mj; | |
89 | string s_redx_5739B_mn; | |
90 | string s_redx_5739B_af; | |
91 | string s_redx_5739B_in; | |
92 | string s_redx_5739B_un; | |
93 | string s_redx_5739B_bs; | |
94 | string s_redx_5739B_gi; | |
95 | ||
96 | // could not use real names ... WIN32 barfs | |
97 | enum QTYPE_5739B { B, S, M, T, I, F, C, E }; | |
98 | // bool, string, multi-line string, text, int, float, character, empty | |
99 | ||
100 | struct QUAD_5739B { | |
101 | QTYPE_5739B qtype; // type of field | |
102 | string htmnbr; | |
103 | void *ptr; | |
104 | Fl_Widget *widget; }; | |
105 | ||
106 | // singular entries in form | |
107 | QUAD_5739B redx_QUAD_5739B[] = { | |
108 | { S, ":drnbr:", &s_redx_5739B_nbr, rdx_5739B_nbr }, // 0 | |
109 | { S, ":drnam:", &s_redx_5739B_name, rdx_5739B_name }, // 1 | |
110 | { S, ":state:", &s_redx_5739B_state, rdx_5739B_state }, // 2 | |
111 | { S, ":cnty:", &s_redx_5739B_cnty, rdx_5739B_cnty }, // 3 | |
112 | { S, ":city:", &s_redx_5739B_city, rdx_5739B_city }, // 4 | |
113 | { S, ":date:", &s_redx_5739B_date, rdx_5739B_date }, // 5 | |
114 | { S, ":georef:", &s_redx_5739B_georef, rdx_5739B_georef }, // 6 | |
115 | { S, ":nbr:", &s_redx_5739B_dwell, rdx_5739B_dwell }, // 7 | |
116 | { S, ":d:", &s_redx_5739B_ds, rdx_5739B_ds }, // 8 | |
117 | { S, ":j:", &s_redx_5739B_mj, rdx_5739B_mj }, // 9 | |
118 | { S, ":n:", &s_redx_5739B_mn, rdx_5739B_mn }, // 10 | |
119 | { S, ":a:", &s_redx_5739B_af, rdx_5739B_af }, // 11 | |
120 | { S, ":i:", &s_redx_5739B_in, rdx_5739B_in }, // 12 | |
121 | { S, ":u:", &s_redx_5739B_un, rdx_5739B_un }, // 13 | |
122 | { S, ":b:", &s_redx_5739B_bs, rdx_5739B_bs }, // 14 | |
123 | { S, ":nb:", &s_redx_5739B_north, rdx_5739B_north }, // 15 | |
124 | { S, ":eb:", &s_redx_5739B_east, rdx_5739B_east }, // 16 | |
125 | { S, ":sb:", &s_redx_5739B_south, rdx_5739B_south }, // 17 | |
126 | { S, ":wb:", &s_redx_5739B_west, rdx_5739B_west }, // 18 | |
127 | { M, ":gi:", &s_redx_5739B_gi, rdx_5739B_gi }, // 19 | |
128 | { E, "", NULL, NULL } | |
129 | }; | |
130 | ||
131 | string buffredx_5739B; | |
132 | string def_redx_5739B_filename = ""; | |
133 | string base_redx_5739B_filename = ""; | |
134 | string def_redx_5739B_TemplateName = ""; | |
135 | ||
136 | bool using_redx_5739B_template = false; | |
137 | static bool fields_initialized = false; | |
138 | ||
139 | // required to initialize the control pointers in the QUAD_5739B array | |
140 | ||
141 | static void init_widgets_5739B() | |
142 | { | |
143 | redx_QUAD_5739B[0].widget = rdx_5739B_nbr; | |
144 | redx_QUAD_5739B[1].widget = rdx_5739B_name; | |
145 | redx_QUAD_5739B[2].widget = rdx_5739B_state; | |
146 | redx_QUAD_5739B[3].widget = rdx_5739B_cnty; | |
147 | redx_QUAD_5739B[4].widget = rdx_5739B_city; | |
148 | redx_QUAD_5739B[5].widget = rdx_5739B_date; | |
149 | redx_QUAD_5739B[6].widget = rdx_5739B_georef; | |
150 | ||
151 | redx_QUAD_5739B[7].widget = rdx_5739B_dwell; | |
152 | redx_QUAD_5739B[8].widget = rdx_5739B_ds; | |
153 | redx_QUAD_5739B[9].widget = rdx_5739B_mj; | |
154 | redx_QUAD_5739B[10].widget = rdx_5739B_mn; | |
155 | redx_QUAD_5739B[11].widget = rdx_5739B_af; | |
156 | redx_QUAD_5739B[12].widget = rdx_5739B_in; | |
157 | redx_QUAD_5739B[13].widget = rdx_5739B_un; | |
158 | redx_QUAD_5739B[14].widget = rdx_5739B_bs; | |
159 | ||
160 | redx_QUAD_5739B[15].widget = rdx_5739B_north; | |
161 | redx_QUAD_5739B[16].widget = rdx_5739B_east; | |
162 | redx_QUAD_5739B[17].widget = rdx_5739B_south; | |
163 | redx_QUAD_5739B[18].widget = rdx_5739B_west; | |
164 | ||
165 | redx_QUAD_5739B[19].widget = rdx_5739B_gi; | |
166 | ||
167 | fields_initialized = true; | |
168 | } | |
169 | ||
170 | //enum QTYPE_5739B { B, S, T, I, F, C, E }; | |
171 | // bool, string, text, int, float, character, empty | |
172 | ||
173 | void clearQUAD_5739B(QUAD_5739B *p) | |
174 | { | |
175 | QTYPE_5739B qt = E; | |
176 | while ((qt = p->qtype) != E) { | |
177 | switch (qt) { | |
178 | case B : (*(bool *)(p->ptr)) = false; break; | |
179 | case S : | |
180 | case M : ((string *)(p->ptr))->clear(); break; | |
181 | case T : ((string *)(p->ptr))->clear(); break; | |
182 | case C : (*(char *)(p->ptr)) = ' '; break; | |
183 | case I : (*(int *)(p->ptr)) = 0; break; | |
184 | case F : (*(float *)(p->ptr)) = 0.0; break; | |
185 | case E : return; | |
186 | } | |
187 | p++; | |
188 | } | |
189 | } | |
190 | ||
191 | void clear_redx_5739Bfields() | |
192 | { | |
193 | if (!fields_initialized) init_widgets_5739B(); | |
194 | clearQUAD_5739B(redx_QUAD_5739B); | |
195 | } | |
196 | ||
197 | bool checkQUAD_5739B(QUAD_5739B *p) | |
198 | { | |
199 | int i = 0; | |
200 | float f = 0; | |
201 | char c = ' '; | |
202 | QTYPE_5739B qt = E; | |
203 | while ((qt = p->qtype) != E) { | |
204 | if (p->widget == NULL) return false; | |
205 | switch (qt) { | |
206 | case B: | |
207 | if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) | |
208 | return true; | |
209 | break; | |
210 | case S: | |
211 | case M: | |
212 | if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) | |
213 | return true; | |
214 | break; | |
215 | case T: | |
216 | if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) | |
217 | return true; | |
218 | break; | |
219 | case C: | |
220 | c = ' '; | |
221 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
222 | c = ((Fl_Input2 *)p->widget)->value()[0]; | |
223 | if (*((char *)(p->ptr)) != c) | |
224 | return true; | |
225 | break; | |
226 | case I: | |
227 | i = 0; | |
228 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
229 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); | |
230 | if (*((int *)(p->ptr)) != i) | |
231 | return true; | |
232 | break; | |
233 | case F: | |
234 | f = 0; | |
235 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
236 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); | |
237 | if (*((float *)(p->ptr)) != f) | |
238 | return true; | |
239 | break; | |
240 | case E: | |
241 | default: return false; | |
242 | } | |
243 | p++; | |
244 | } | |
245 | return false; | |
246 | } | |
247 | ||
248 | bool check_redx_5739Bfields() | |
249 | { | |
250 | return checkQUAD_5739B(redx_QUAD_5739B); | |
251 | } | |
252 | ||
253 | void updateQUAD_5739B(QUAD_5739B *p) | |
254 | { | |
255 | int i = 0; | |
256 | float f = 0; | |
257 | char c = ' '; | |
258 | QTYPE_5739B qt = E; | |
259 | while ((qt = p->qtype) != E) { | |
260 | switch (qt) { | |
261 | case B: | |
262 | *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); | |
263 | break; | |
264 | case S: | |
265 | case M: | |
266 | *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); | |
267 | break; | |
268 | case T: | |
269 | *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); | |
270 | break; | |
271 | case C: | |
272 | c = ' '; | |
273 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
274 | c = ((Fl_Input2 *)p->widget)->value()[0]; | |
275 | *((char *)(p->ptr)) = c; | |
276 | break; | |
277 | case I: | |
278 | i = 0; | |
279 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
280 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); | |
281 | *((int *)(p->ptr)) = i; | |
282 | break; | |
283 | case F: | |
284 | f = 0; | |
285 | if (((Fl_Input2 *)p->widget)->value()[0]) | |
286 | sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); | |
287 | *((float *)(p->ptr)) = f; | |
288 | break; | |
289 | case E: | |
290 | default: return; | |
291 | } | |
292 | p++; | |
293 | } | |
294 | } | |
295 | ||
296 | void update_redx_5739Bfields() | |
297 | { | |
298 | if (!fields_initialized) init_widgets_5739B(); | |
299 | updateQUAD_5739B(redx_QUAD_5739B); | |
300 | } | |
301 | ||
302 | void updateFORM_5739B(QUAD_5739B *p) | |
303 | { | |
304 | char val[20]; | |
305 | QTYPE_5739B qt = E; | |
306 | while ((qt = p->qtype) != E) { | |
307 | switch (qt) { | |
308 | case B: | |
309 | ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); | |
310 | break; | |
311 | case S: | |
312 | case M: | |
313 | ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); | |
314 | break; | |
315 | case T: | |
316 | ((FTextEdit *)p->widget)->clear(); | |
317 | ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); | |
318 | break; | |
319 | case C: | |
320 | val[0] = *((char *)(p->ptr)); | |
321 | val[1] = 0; | |
322 | ((Fl_Input2 *)p->widget)->value(val); | |
323 | break; | |
324 | case I: | |
325 | if (*((int *)(p->ptr)) == 0) | |
326 | ((Fl_Input2 *)p->widget)->value(""); | |
327 | else { | |
328 | snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); | |
329 | ((Fl_Input2 *)p->widget)->value(val); | |
330 | } | |
331 | break; | |
332 | case F: | |
333 | snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); | |
334 | ((Fl_Input2 *)p->widget)->value(val); | |
335 | break; | |
336 | case E: | |
337 | default: return; | |
338 | } | |
339 | p++; | |
340 | } | |
341 | } | |
342 | ||
343 | void update_redx_5739Bform() | |
344 | { | |
345 | if (!fields_initialized) init_widgets_5739B(); | |
346 | updateFORM_5739B(redx_QUAD_5739B); | |
347 | } | |
348 | ||
349 | void clear_redx_5739B_form() | |
350 | { | |
351 | clear_redx_5739Bfields(); | |
352 | update_redx_5739Bform(); | |
353 | } | |
354 | ||
355 | static string mbuff; | |
356 | ||
357 | void make_buffQUAD_5739B(QUAD_5739B *p) | |
358 | { | |
359 | string one = "1"; string zero = "0"; | |
360 | string sval = " "; | |
361 | char szval[20]; | |
362 | QTYPE_5739B qt = E; | |
363 | while ((qt = p->qtype) != E) { | |
364 | switch (qt) { | |
365 | case B: | |
366 | if (*((bool *)(p->ptr)) == true) | |
367 | mbuff.append( lineout( p->htmnbr, *((bool *)(p->ptr)) ? one : zero)); | |
368 | break; | |
369 | case S: | |
370 | case M: | |
371 | if (((string *)(p->ptr))->length()) | |
372 | mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); | |
373 | break; | |
374 | case T: | |
375 | mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); | |
376 | break; | |
377 | case C: | |
378 | if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { | |
379 | sval = " "; | |
380 | sval[0] = *((char *)(p->ptr)); | |
381 | mbuff.append( lineout( p->htmnbr, sval)); | |
382 | } | |
383 | break; | |
384 | case I: | |
385 | if (*((int*)(p->ptr)) > 0) { | |
386 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
387 | sval = szval; | |
388 | mbuff.append( lineout( p->htmnbr, sval) ); | |
389 | } | |
390 | break; | |
391 | case F: | |
392 | if (*((float *)(p->ptr)) > 0) { | |
393 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
394 | sval = szval; | |
395 | mbuff.append( lineout( p->htmnbr, sval) ); | |
396 | } | |
397 | break; | |
398 | case E: | |
399 | default: return; | |
400 | } | |
401 | p++; | |
402 | } | |
403 | } | |
404 | ||
405 | void make_buffredx_5739B(bool compress = false) | |
406 | { | |
407 | mbuff.clear(); | |
408 | make_buffQUAD_5739B(redx_QUAD_5739B); | |
409 | if (compress) compress_maybe(mbuff); | |
410 | buffredx_5739B.append(mbuff); | |
411 | } | |
412 | ||
413 | void readQUAD_5739B(string data, QUAD_5739B *p) | |
414 | { | |
415 | int i = 0; | |
416 | float f; | |
417 | QTYPE_5739B qt = E; | |
418 | while ((qt = p->qtype) != E) { | |
419 | switch (qt) { | |
420 | case B: | |
421 | *((bool *)(p->ptr)) = (findstr( data, p->htmnbr ) == "1"); | |
422 | break; | |
423 | case S: | |
424 | case M: | |
425 | *((string *)(p->ptr)) = findstr( data, p->htmnbr ); | |
426 | break; | |
427 | case T: | |
428 | *((string *)(p->ptr)) = findstr( data, p->htmnbr ); | |
429 | break; | |
430 | case C: | |
431 | *((char *)(p->ptr)) = findstr( data, p->htmnbr )[0]; | |
432 | break; | |
433 | case I: | |
434 | i = 0; | |
435 | sscanf( findstr( data, p->htmnbr ).c_str(), "%d", &i); | |
436 | *((int *)(p->ptr)) = i; | |
437 | break; | |
438 | case F: | |
439 | f = 0; | |
440 | sscanf( findstr( data, p->htmnbr ).c_str(), "%f", &f); | |
441 | *((float *)(p->ptr)) = f; | |
442 | break; | |
443 | case E: | |
444 | default: return; | |
445 | } | |
446 | p++; | |
447 | } | |
448 | } | |
449 | ||
450 | void read_redx_5739B_buffer(string data) | |
451 | { | |
452 | clear_redx_5739Bfields(); | |
453 | read_header(data); | |
454 | ||
455 | readQUAD_5739B (data, redx_QUAD_5739B); | |
456 | update_redx_5739Bform(); | |
457 | } | |
458 | ||
459 | void cb_redx_5739B_new() | |
460 | { | |
461 | if (check_redx_5739Bfields()) { | |
462 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { | |
463 | update_header(CHANGED); | |
464 | cb_redx_5739B_save(); | |
465 | } | |
466 | } | |
467 | clear_redx_5739B_form(); | |
468 | clear_header(); | |
469 | def_redx_5739B_filename = ICS_msg_dir; | |
470 | def_redx_5739B_filename.append("new").append(FREDX5739B_EXT); | |
471 | show_filename(def_redx_5739B_filename); | |
472 | using_redx_5739B_template = false; | |
473 | } | |
474 | ||
475 | void cb_redx_5739B_import() | |
476 | { | |
477 | fl_alert2("Not implemented"); | |
478 | } | |
479 | ||
480 | void cb_redx_5739B_export() | |
481 | { | |
482 | fl_alert2("Not implemented"); | |
483 | } | |
484 | ||
485 | void cb_redx_5739B_wrap_import(string wrapfilename, string inpbuffer) | |
486 | { | |
487 | clear_redx_5739B_form(); | |
488 | read_redx_5739B_buffer(inpbuffer); | |
489 | def_redx_5739B_filename = ICS_msg_dir; | |
490 | def_redx_5739B_filename.append(wrapfilename); | |
491 | show_filename(def_redx_5739B_filename); | |
492 | using_redx_5739B_template = false; | |
493 | } | |
494 | ||
495 | int eval_redx_5739B_fsize() | |
496 | { | |
497 | Ccrc16 chksum; | |
498 | evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); | |
499 | evalstr.append(base_redx_5739B_filename).append("]"); | |
500 | update_redx_5739Bfields(); | |
501 | update_header(FROM); | |
502 | evalstr.append(header("<redx_5739B>")); | |
503 | buffredx_5739B.clear(); | |
504 | make_buffredx_5739B(true); | |
505 | if (buffredx_5739B.empty()) return 0; | |
506 | compress_maybe( buffredx_5739B ); | |
507 | evalstr.append( buffredx_5739B ); | |
508 | evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); | |
509 | return evalstr.length(); | |
510 | } | |
511 | ||
512 | void cb_redx_5739B_wrap_export() | |
513 | { | |
514 | if (check_redx_5739Bfields()) { | |
515 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
516 | return; | |
517 | update_header(CHANGED); | |
518 | } | |
519 | update_redx_5739Bfields(); | |
520 | ||
521 | if (base_redx_5739B_filename == string("new").append(FREDX5739B_EXT) || | |
522 | base_redx_5739B_filename == string("default").append(FREDX5739B_EXT) ) | |
523 | if (!cb_redx_5739B_save_as()) return; | |
524 | ||
525 | string wrapfilename = WRAP_send_dir; | |
526 | wrapfilename.append(base_redx_5739B_filename); | |
527 | wrapfilename.append(".wrap"); | |
528 | const char *p = FSEL::saveas( | |
529 | "Save as wrap file", | |
530 | "Wrap file\t*.{wrap,WRAP}", | |
531 | wrapfilename.c_str()); | |
532 | if (p) { | |
533 | string pext = fl_filename_ext(p); | |
534 | wrapfilename = p; | |
535 | ||
536 | update_header(FROM); | |
537 | buffredx_5739B.assign(header("<redx_5739B>")); | |
538 | make_buffredx_5739B(true); | |
539 | export_wrapfile(base_redx_5739B_filename, wrapfilename, buffredx_5739B, pext != ".wrap"); | |
540 | ||
541 | buffredx_5739B.assign(header("<redx_5739B>")); | |
542 | make_buffredx_5739B(false); | |
543 | write_redx_5739B(def_redx_5739B_filename); | |
544 | } | |
545 | } | |
546 | ||
547 | void cb_redx_5739B_wrap_autosend() | |
548 | { | |
549 | if (check_redx_5739Bfields()) { | |
550 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
551 | return; | |
552 | update_header(CHANGED); | |
553 | } | |
554 | update_redx_5739Bfields(); | |
555 | ||
556 | if (base_redx_5739B_filename == string("new").append(FREDX5739B_EXT) || | |
557 | base_redx_5739B_filename == string("default").append(FREDX5739B_EXT) ) | |
558 | if (!cb_redx_5739B_save_as()) return; | |
559 | ||
560 | update_header(FROM); | |
561 | buffredx_5739B.assign(header("<redx_5739B>")); | |
562 | make_buffredx_5739B(true); | |
563 | xfr_via_socket(base_redx_5739B_filename, buffredx_5739B); | |
564 | ||
565 | buffredx_5739B.assign(header("<redx_5739B>")); | |
566 | make_buffredx_5739B(false); | |
567 | write_redx_5739B(def_redx_5739B_filename); | |
568 | } | |
569 | ||
570 | void cb_redx_5739B_load_template() | |
571 | { | |
572 | string def_redx_5739B_filename = def_redx_5739B_TemplateName; | |
573 | const char *p = FSEL::select( | |
574 | "Open template file", | |
575 | string("Template file\t*").append(TREDX5739B_EXT).c_str(), | |
576 | def_redx_5739B_filename.c_str()); | |
577 | if (p) { | |
578 | clear_redx_5739B_form(); | |
579 | read_data_file(p); | |
580 | def_redx_5739B_TemplateName = p; | |
581 | show_filename(def_redx_5739B_TemplateName); | |
582 | using_redx_5739B_template = true; | |
583 | } | |
584 | } | |
585 | ||
586 | void cb_redx_5739B_save_template() | |
587 | { | |
588 | if (!using_redx_5739B_template) { | |
589 | cb_redx_5739B_save_as_template(); | |
590 | return; | |
591 | } | |
592 | string def_redx_5739B_filename = def_redx_5739B_TemplateName; | |
593 | const char *p = FSEL::saveas( | |
594 | "Save template file", | |
595 | string("Template file\t*").append(TREDX5739B_EXT).c_str(), | |
596 | def_redx_5739B_filename.c_str()); | |
597 | if (p) { | |
598 | update_header(CHANGED); | |
599 | update_redx_5739Bfields(); | |
600 | buffredx_5739B.assign(header("<redx_5739B>")); | |
601 | make_buffredx_5739B(); | |
602 | write_redx_5739B(p); | |
603 | } | |
604 | } | |
605 | ||
606 | void cb_redx_5739B_save_as_template() | |
607 | { | |
608 | string def_redx_5739B_filename = def_redx_5739B_TemplateName; | |
609 | const char *p = FSEL::saveas( | |
610 | "Save as template file", | |
611 | string("Template file\t*").append(TREDX5739B_EXT).c_str(), | |
612 | def_redx_5739B_filename.c_str()); | |
613 | if (p) { | |
614 | const char *pext = fl_filename_ext(p); | |
615 | def_redx_5739B_TemplateName = p; | |
616 | if (strlen(pext) == 0) def_redx_5739B_TemplateName.append(TREDX5739B_EXT); | |
617 | remove_spaces_from_filename(def_redx_5739B_TemplateName); | |
618 | ||
619 | clear_header(); | |
620 | update_header(CHANGED); | |
621 | update_redx_5739Bfields(); | |
622 | buffredx_5739B.assign(header("<redx_5739B>")); | |
623 | make_buffredx_5739B(); | |
624 | write_redx_5739B(def_redx_5739B_TemplateName); | |
625 | ||
626 | show_filename(def_redx_5739B_TemplateName); | |
627 | using_redx_5739B_template = true; | |
628 | } | |
629 | } | |
630 | ||
631 | void cb_redx_5739B_open() | |
632 | { | |
633 | const char *p = FSEL::select( | |
634 | _("Open data file"), | |
635 | string("ICS-redx_5739B\t*").append(FREDX5739B_EXT).c_str(), | |
636 | def_redx_5739B_filename.c_str()); | |
637 | if (!p) return; | |
638 | if (strlen(p) == 0) return; | |
639 | clear_redx_5739B_form(); | |
640 | read_data_file(p); | |
641 | using_redx_5739B_template = false; | |
642 | def_redx_5739B_filename = p; | |
643 | show_filename(def_redx_5739B_filename); | |
644 | } | |
645 | ||
646 | void write_redx_5739B(string s) | |
647 | { | |
648 | FILE *fileredx_5739B = fopen(s.c_str(), "w"); | |
649 | if (!fileredx_5739B) return; | |
650 | ||
651 | fwrite(buffredx_5739B.c_str(), buffredx_5739B.length(), 1, fileredx_5739B); | |
652 | fclose(fileredx_5739B); | |
653 | } | |
654 | ||
655 | ||
656 | bool cb_redx_5739B_save_as() | |
657 | { | |
658 | const char *p; | |
659 | string newfilename; | |
660 | ||
661 | string name = named_file(); | |
662 | if (!name.empty()) { | |
663 | name.append(FREDX5739B_EXT); | |
664 | newfilename = ICS_msg_dir; | |
665 | newfilename.append(name); | |
666 | } else | |
667 | newfilename = def_redx_5739B_filename; | |
668 | ||
669 | p = FSEL::saveas( | |
670 | _("Save data file"), | |
671 | string("ICS-redx_5739B\t*").append(FREDX5739B_EXT).c_str(), | |
672 | newfilename.c_str()); | |
673 | ||
674 | if (!p) return false; | |
675 | if (strlen(p) == 0) return false; | |
676 | ||
677 | if (progStatus.sernbr_fname) update_sernbr(); | |
678 | ||
679 | const char *pext = fl_filename_ext(p); | |
680 | def_redx_5739B_filename = p; | |
681 | if (strlen(pext) == 0) def_redx_5739B_filename.append(FREDX5739B_EXT); | |
682 | ||
683 | remove_spaces_from_filename(def_redx_5739B_filename); | |
684 | ||
685 | update_header(NEW); | |
686 | update_redx_5739Bfields(); | |
687 | buffredx_5739B.assign(header("<redx_5739B>")); | |
688 | make_buffredx_5739B(); | |
689 | write_redx_5739B(def_redx_5739B_filename); | |
690 | ||
691 | using_redx_5739B_template = false; | |
692 | show_filename(def_redx_5739B_filename); | |
693 | return true; | |
694 | } | |
695 | ||
696 | void cb_redx_5739B_save() | |
697 | { | |
698 | if (base_redx_5739B_filename == string("new").append(FREDX5739B_EXT) || | |
699 | base_redx_5739B_filename == string("default").append(FREDX5739B_EXT) || | |
700 | using_redx_5739B_template == true) { | |
701 | cb_redx_5739B_save_as(); | |
702 | return; | |
703 | } | |
704 | ||
705 | if (check_redx_5739Bfields()) update_header(CHANGED); | |
706 | update_redx_5739Bfields(); | |
707 | buffredx_5739B.assign(header("<redx_5739B>")); | |
708 | make_buffredx_5739B(); | |
709 | write_redx_5739B(def_redx_5739B_filename); | |
710 | ||
711 | using_redx_5739B_template = false; | |
712 | } | |
713 | ||
714 | void quad_to_html_5739B( string &target, QUAD_5739B *p) | |
715 | { | |
716 | string X = "X"; string SP = " "; | |
717 | string sval = " "; | |
718 | char szval[20]; | |
719 | while (p->qtype != E) { | |
720 | if (p->qtype == B) | |
721 | replacestr(target, p->htmnbr, *((bool *)(p->ptr)) ? X : SP); | |
722 | else if (p->qtype == S) | |
723 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
724 | else if (p->qtype == M) { | |
725 | sval = *((string *)(p->ptr)); | |
726 | size_t np = string::npos; | |
727 | while ( (np = sval.find("\n")) != string::npos) | |
728 | sval.replace(np, 1, "<br>"); | |
729 | replacestr(target, p->htmnbr, sval); | |
730 | } else if (p->qtype == T) | |
731 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
732 | else if (p->qtype == C) { | |
733 | sval = " "; | |
734 | sval[0] = *((char *)(p->ptr)); | |
735 | replacestr(target, p->htmnbr, sval); | |
736 | } | |
737 | else if (p->qtype == I) { | |
738 | if (*((int *)(p->ptr)) > 0) { | |
739 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
740 | sval = szval; | |
741 | } else sval.clear(); | |
742 | replacestr(target, p->htmnbr, sval); | |
743 | } | |
744 | else if (p->qtype == F) { | |
745 | if (*((float *)(p->ptr)) != 0) { | |
746 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
747 | sval = szval; | |
748 | } else sval.clear(); | |
749 | replacestr(target, p->htmnbr, sval); | |
750 | } | |
751 | p++; | |
752 | } | |
753 | } | |
754 | ||
755 | void cb_redx_5739B_html() | |
756 | { | |
757 | string name_name = fl_filename_name(def_redx_5739B_filename.c_str()); | |
758 | size_t p = name_name.rfind('.'); | |
759 | if (p != string::npos) name_name.erase(p); | |
760 | ||
761 | string redx_5739B_name = ICS_dir; | |
762 | redx_5739B_name.append(name_name); | |
763 | redx_5739B_name.append(".html"); | |
764 | ||
765 | update_redx_5739Bfields(); | |
766 | string formredx_5739B = redx_5739B_html_template; | |
767 | ||
768 | replacestr(formredx_5739B, TITLE, name_name); | |
769 | ||
770 | quad_to_html_5739B (formredx_5739B, redx_QUAD_5739B); | |
771 | ||
772 | FILE *fileredx_5739B = fopen(redx_5739B_name.c_str(), "w"); | |
773 | fprintf(fileredx_5739B,"%s", formredx_5739B.c_str()); | |
774 | fclose(fileredx_5739B); | |
775 | ||
776 | open_url(redx_5739B_name.c_str()); | |
777 | } | |
778 | ||
779 | void cb_5739B_msg_type() | |
780 | { | |
781 | if (selected_form == REDX5739B ) { | |
782 | show_filename(def_redx_5739B_filename); | |
783 | } else { | |
784 | show_filename(def_rg_filename); | |
785 | } | |
786 | } | |
787 | ||
788 | void quad_to_text( string &target, QUAD_5739B *p) | |
789 | { | |
790 | string X = "X"; string SP = " "; | |
791 | string sval = " "; | |
792 | string del = "DELETE"; | |
793 | char szval[20]; | |
794 | while (p->qtype != E) { | |
795 | if (p->qtype == B) { | |
796 | bool b = *((bool *)(p->ptr)); | |
797 | if (b) replacestr(target, p->htmnbr, X); | |
798 | else replacestr(target, p->htmnbr, del); | |
799 | } else if (p->qtype == S || p->qtype == M) { | |
800 | if (((string *)(p->ptr))->length()) | |
801 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
802 | else replacestr(target, p->htmnbr, del); | |
803 | } else if (p->qtype == T) { | |
804 | if (((string *)(p->ptr))->length()) | |
805 | replacestr(target, p->htmnbr, *((string *)(p->ptr))); | |
806 | else replacestr(target, p->htmnbr, del); | |
807 | } else if (p->qtype == C) { | |
808 | sval = " "; | |
809 | sval[0] = *((char *)(p->ptr)); | |
810 | if (sval[0] != 0 && sval[0] != ' ') | |
811 | replacestr(target, p->htmnbr, sval); | |
812 | else replacestr(target, p->htmnbr, del); | |
813 | } | |
814 | else if (p->qtype == I) { | |
815 | if (*((int *)(p->ptr)) > 0) { | |
816 | snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); | |
817 | sval = szval; | |
818 | replacestr(target, p->htmnbr, sval); | |
819 | } else replacestr(target, p->htmnbr, del); | |
820 | } | |
821 | else if (p->qtype == F) { | |
822 | if (*((float *)(p->ptr)) != 0) { | |
823 | snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); | |
824 | sval = szval; | |
825 | replacestr(target, p->htmnbr, sval); | |
826 | } else replacestr(target, p->htmnbr, del); | |
827 | } | |
828 | p++; | |
829 | } | |
830 | } | |
831 | ||
832 | void strip_text_5739B( string &target ) | |
833 | { | |
834 | size_t p = 0, p1, p2; | |
835 | while ((p = target.find ("DELETE"), p) != string::npos) { | |
836 | p1 = target.rfind ("\n", p); | |
837 | p2 = target.find ("\n", p); | |
838 | if (p1 != string::npos && p2 != string::npos) | |
839 | target.erase( p1, p2 - p1 ); | |
840 | p++; | |
841 | } | |
842 | } | |
843 | ||
844 | void cb_redx_5739B_textout() | |
845 | { | |
846 | string redx_5739B_name = ICS_dir; | |
847 | redx_5739B_name.append("redx_5739B.txt"); | |
848 | ||
849 | update_redx_5739Bfields(); | |
850 | string formredx_5739B = redx_5739B_text_template; | |
851 | ||
852 | quad_to_text (formredx_5739B, redx_QUAD_5739B); | |
853 | ||
854 | strip_text_5739B (formredx_5739B); | |
855 | ||
856 | FILE *fileredx_5739B = fopen(redx_5739B_name.c_str(), "w"); | |
857 | fprintf(fileredx_5739B,"%s", formredx_5739B.c_str()); | |
858 | fclose(fileredx_5739B); | |
859 | ||
860 | open_url(redx_5739B_name.c_str()); | |
861 | } | |
862 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <FL/Fl_Hold_Browser.H> | |
21 | ||
22 | #include "gettext.h" | |
23 | #include "status.h" | |
24 | #include "util.h" | |
25 | ||
26 | #include "flmsg_dialog.h" | |
27 | #include "flmsg.h" | |
28 | #include "fileselect.h" | |
29 | ||
30 | Fl_Group *tab_redx_5739B = (Fl_Group *)0; | |
31 | Fl_Tabs *tab_redx_5739B_type = (Fl_Tabs *)0; | |
32 | ||
33 | Fl_Group *tab_redx_5739B_1 = (Fl_Group *)0; | |
34 | ||
35 | Fl_Input2 *rdx_5739B_nbr = (Fl_Input2 *)0; | |
36 | Fl_Input2 *rdx_5739B_name = (Fl_Input2 *)0; | |
37 | Fl_Input2 *rdx_5739B_state = (Fl_Input2 *)0; | |
38 | Fl_Input2 *rdx_5739B_cnty = (Fl_Input2 *)0; | |
39 | Fl_Input2 *rdx_5739B_city = (Fl_Input2 *)0; | |
40 | Fl_Input2 *rdx_5739B_date = (Fl_Input2 *)0; | |
41 | Fl_Input2 *rdx_5739B_street = (Fl_Input2 *)0; | |
42 | Fl_Input2 *rdx_5739B_georef = (Fl_Input2 *)0; | |
43 | ||
44 | Fl_Input2 *rdx_5739B_north = (Fl_Input2 *)0; | |
45 | Fl_Input2 *rdx_5739B_east = (Fl_Input2 *)0; | |
46 | Fl_Input2 *rdx_5739B_south = (Fl_Input2 *)0; | |
47 | Fl_Input2 *rdx_5739B_west = (Fl_Input2 *)0; | |
48 | ||
49 | Fl_Group *tab_redx_5739B_2 = (Fl_Group *)0; | |
50 | ||
51 | Fl_Input2 *rdx_5739B_dwell = (Fl_Input2 *)0; | |
52 | Fl_Input2 *rdx_5739B_ds = (Fl_Input2 *)0; | |
53 | Fl_Input2 *rdx_5739B_mj = (Fl_Input2 *)0; | |
54 | Fl_Input2 *rdx_5739B_mn = (Fl_Input2 *)0; | |
55 | Fl_Input2 *rdx_5739B_af = (Fl_Input2 *)0; | |
56 | Fl_Input2 *rdx_5739B_in = (Fl_Input2 *)0; | |
57 | Fl_Input2 *rdx_5739B_un = (Fl_Input2 *)0; | |
58 | Fl_Input2 *rdx_5739B_bs = (Fl_Input2 *)0; | |
59 | Fl_Input2 *rdx_5739B_gi = (Fl_Input2 *)0; | |
60 | ||
61 | //---------------------------------------------------------------------- | |
62 | ||
63 | // widget callbacks & support | |
64 | ||
65 | //---------------------------------------------------------------------- | |
66 | static void cb_btn_5739B_date(Fl_Button*, void*) { | |
67 | rdx_5739B_date->value(szDate(progStatus.dtformat)); | |
68 | estimate(); | |
69 | } | |
70 | ||
71 | void create_redx_5739B() | |
72 | { | |
73 | int Y = tab_top; | |
74 | tab_redx_5739B = new Fl_Group(0, Y, 570, 390); | |
75 | tab_redx_5739B->align(FL_ALIGN_TOP); | |
76 | ||
77 | tab_redx_5739B_type = new Fl_Tabs(0, Y+2, 570, 387); | |
78 | tab_redx_5739B_type->selection_color((Fl_Color)246); | |
79 | ||
80 | tab_redx_5739B_1 = new Fl_Group(0, Y+25, 570, 360, _("DR data")); | |
81 | ||
82 | Y += 35; | |
83 | Fl_Box *bx = new Fl_Box(50, Y, 200, 24, _("Red Cross Form 5739B")); | |
84 | bx->box(FL_FLAT_BOX); | |
85 | bx->align(FL_ALIGN_INSIDE | FL_ALIGN_CENTER); | |
86 | Y += 30; | |
87 | rdx_5739B_nbr = new Fl_Input2(100, Y, 150, 24, _("DR #")); | |
88 | rdx_5739B_nbr->tooltip(_("")); | |
89 | rdx_5739B_nbr->callback(redx_changed); | |
90 | rdx_5739B_nbr->when(FL_WHEN_CHANGED); | |
91 | ||
92 | Y += 30; | |
93 | rdx_5739B_name = new Fl_Input2(100, Y, 250, 24, _("DR Name")); | |
94 | rdx_5739B_name->tooltip(_("")); | |
95 | rdx_5739B_name->callback(redx_changed); | |
96 | rdx_5739B_name->when(FL_WHEN_CHANGED); | |
97 | ||
98 | Y += 30; | |
99 | rdx_5739B_state = new Fl_Input2(100, Y, 50, 24, _("State")); | |
100 | rdx_5739B_state->tooltip(_("")); | |
101 | rdx_5739B_state->callback(redx_changed); | |
102 | rdx_5739B_state->when(FL_WHEN_CHANGED); | |
103 | ||
104 | Y += 30; | |
105 | rdx_5739B_cnty = new Fl_Input2(100, Y, 250, 24, _("County")); | |
106 | rdx_5739B_cnty->tooltip(_("")); | |
107 | rdx_5739B_cnty->callback(redx_changed); | |
108 | rdx_5739B_cnty->when(FL_WHEN_CHANGED); | |
109 | ||
110 | Y += 30; | |
111 | rdx_5739B_city = new Fl_Input2(100, Y, 450, 24, _("City")); | |
112 | rdx_5739B_city->tooltip(_("")); | |
113 | rdx_5739B_city->callback(redx_changed); | |
114 | rdx_5739B_city->when(FL_WHEN_CHANGED); | |
115 | ||
116 | Y += 30; | |
117 | rdx_5739B_date = new Fl_Input2(100, Y, 150, 24, _("Date")); | |
118 | rdx_5739B_date->tooltip(_("")); | |
119 | rdx_5739B_date->callback(redx_changed); | |
120 | rdx_5739B_date->when(FL_WHEN_CHANGED); | |
121 | ||
122 | Fl_Button *btn_5739B_date = new Fl_Button(260, Y+2, 20, 20, _("...")); | |
123 | btn_5739B_date->tooltip(_("Set today")); | |
124 | btn_5739B_date->callback((Fl_Callback*)cb_btn_5739B_date); | |
125 | ||
126 | Y += 30; | |
127 | rdx_5739B_georef = new Fl_Input2(100, Y, 450, 24, _("Geo. Ref.")); | |
128 | rdx_5739B_georef->tooltip(_("")); | |
129 | rdx_5739B_georef->callback(redx_changed); | |
130 | rdx_5739B_georef->when(FL_WHEN_CHANGED); | |
131 | ||
132 | Y += 30; | |
133 | rdx_5739B_north = new Fl_Input2(175, Y, 225, 24, _("Boundaries, North:")); | |
134 | rdx_5739B_north->tooltip(_("")); | |
135 | rdx_5739B_north->callback(redx_changed); | |
136 | rdx_5739B_north->when(FL_WHEN_CHANGED); | |
137 | ||
138 | Y += 30; | |
139 | rdx_5739B_west = new Fl_Input2(50, Y, 225, 24, _("West:")); | |
140 | rdx_5739B_west->tooltip(_("")); | |
141 | rdx_5739B_west->callback(redx_changed); | |
142 | rdx_5739B_west->when(FL_WHEN_CHANGED); | |
143 | ||
144 | rdx_5739B_east = new Fl_Input2(325, Y, 225, 24, _("East:")); | |
145 | rdx_5739B_east->tooltip(_("")); | |
146 | rdx_5739B_east->callback(redx_changed); | |
147 | rdx_5739B_east->when(FL_WHEN_CHANGED); | |
148 | ||
149 | Y += 30; | |
150 | rdx_5739B_south = new Fl_Input2(175, Y, 225, 24, _("South:")); | |
151 | rdx_5739B_south->tooltip(_("")); | |
152 | rdx_5739B_south->callback(redx_changed); | |
153 | rdx_5739B_south->when(FL_WHEN_CHANGED); | |
154 | ||
155 | tab_redx_5739B_1->end(); | |
156 | ||
157 | Y = tab_top; | |
158 | tab_redx_5739B_2 = new Fl_Group(0, Y+25, 570, 360, _("Area")); | |
159 | Y += 35; | |
160 | rdx_5739B_dwell = new Fl_Input2(160, Y, 50, 24, _("# affected dwellings")); | |
161 | rdx_5739B_dwell->tooltip(_("")); | |
162 | rdx_5739B_dwell->callback(redx_changed); | |
163 | rdx_5739B_dwell->when(FL_WHEN_CHANGED); | |
164 | ||
165 | Y += 25; | |
166 | rdx_5739B_ds = new Fl_Input2(160, Y, 50, 24, _("Destroyed %")); | |
167 | rdx_5739B_ds->tooltip(_("")); | |
168 | rdx_5739B_ds->callback(redx_changed); | |
169 | rdx_5739B_ds->when(FL_WHEN_CHANGED); | |
170 | ||
171 | Y += 25; | |
172 | rdx_5739B_mj = new Fl_Input2(160, Y, 50, 24, _("Major damage %")); | |
173 | rdx_5739B_mj->tooltip(_("")); | |
174 | rdx_5739B_mj->callback(redx_changed); | |
175 | rdx_5739B_mj->when(FL_WHEN_CHANGED); | |
176 | ||
177 | Y += 25; | |
178 | rdx_5739B_mn = new Fl_Input2(160, Y, 50, 24, _("Minor damage %")); | |
179 | rdx_5739B_mn->tooltip(_("")); | |
180 | rdx_5739B_mn->callback(redx_changed); | |
181 | rdx_5739B_mn->when(FL_WHEN_CHANGED); | |
182 | ||
183 | Y += 25; | |
184 | rdx_5739B_af = new Fl_Input2(160, Y, 50, 24, _("Affected %")); | |
185 | rdx_5739B_af->tooltip(_("")); | |
186 | rdx_5739B_af->callback(redx_changed); | |
187 | rdx_5739B_af->when(FL_WHEN_CHANGED); | |
188 | ||
189 | Y += 25; | |
190 | rdx_5739B_in = new Fl_Input2(160, Y, 50, 24, _("Inaccessible %")); | |
191 | rdx_5739B_in->tooltip(_("")); | |
192 | rdx_5739B_in->callback(redx_changed); | |
193 | rdx_5739B_in->when(FL_WHEN_CHANGED); | |
194 | ||
195 | Y += 25; | |
196 | rdx_5739B_un = new Fl_Input2(160, Y, 50, 24, _("Unknown/None %")); | |
197 | rdx_5739B_un->tooltip(_("")); | |
198 | rdx_5739B_un->callback(redx_changed); | |
199 | rdx_5739B_un->when(FL_WHEN_CHANGED); | |
200 | ||
201 | Y += 25; | |
202 | rdx_5739B_bs = new Fl_Input2(160, Y, 50, 24, _("Basements?")); | |
203 | rdx_5739B_bs->tooltip(_("Yes/No")); | |
204 | rdx_5739B_bs->callback(redx_changed); | |
205 | rdx_5739B_bs->when(FL_WHEN_CHANGED); | |
206 | ||
207 | Y += 25; | |
208 | rdx_5739B_gi = new Fl_Input2(160, Y, 400, 96, _("General info:")); | |
209 | rdx_5739B_gi->align(FL_ALIGN_LEFT_TOP); | |
210 | rdx_5739B_gi->type(4); | |
211 | rdx_5739B_gi->tooltip(_("")); | |
212 | rdx_5739B_gi->callback(redx_changed); | |
213 | rdx_5739B_gi->when(FL_WHEN_CHANGED); | |
214 | ||
215 | ||
216 | tab_redx_5739B_2->end(); | |
217 | ||
218 | tab_redx_5739B->end(); | |
219 | ||
220 | tab_redx_5739B->hide(); | |
221 | ||
222 | }; | |
223 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <FL/Fl_Hold_Browser.H> | |
21 | ||
22 | #include "gettext.h" | |
23 | #include "status.h" | |
24 | #include "util.h" | |
25 | ||
26 | #include "flmsg_dialog.h" | |
27 | #include "flmsg.h" | |
28 | #include "fileselect.h" | |
29 | ||
30 | Fl_Group *tab_redx_5739 = (Fl_Group *)0; | |
31 | Fl_Tabs *tab_redx_5739_type = (Fl_Tabs *)0; | |
32 | ||
33 | //---------------------------------------------------------------------- | |
34 | ||
35 | Fl_Group *tab_redx_5739_1 = (Fl_Group *)0; | |
36 | Fl_Group *tab_redx_5739_2 = (Fl_Group *)0; | |
37 | ||
38 | Fl_Input2 *rdx_5739_nbr = (Fl_Input2 *)0; | |
39 | Fl_Input2 *rdx_5739_name = (Fl_Input2 *)0; | |
40 | Fl_Input2 *rdx_5739_state = (Fl_Input2 *)0; | |
41 | Fl_Input2 *rdx_5739_cnty = (Fl_Input2 *)0; | |
42 | Fl_Input2 *rdx_5739_city = (Fl_Input2 *)0; | |
43 | Fl_Input2 *rdx_5739_date = (Fl_Input2 *)0; | |
44 | Fl_Button *btn_5739_date = (Fl_Button *)0; | |
45 | Fl_Input2 *rdx_5739_street = (Fl_Input2 *)0; | |
46 | Fl_Input2 *rdx_5739_georef = (Fl_Input2 *)0; | |
47 | FTextEdit *rdx_5739_add_info = (FTextEdit *)0; | |
48 | Fl_Input2 *rdx_5739_worker = (Fl_Input2 *)0; | |
49 | Fl_Input2 *rdx_5739_supervisor = (Fl_Input2 *)0; | |
50 | ||
51 | Fl_Input2 *rdx_sf_destroyed = (Fl_Input2 *)0; | |
52 | Fl_Input2 *rdx_sf_major = (Fl_Input2 *)0; | |
53 | Fl_Input2 *rdx_sf_minor = (Fl_Input2 *)0; | |
54 | Fl_Input2 *rdx_sf_affected = (Fl_Input2 *)0; | |
55 | Fl_Input2 *rdx_sf_inaccessible = (Fl_Input2 *)0; | |
56 | ||
57 | Fl_Input2 *rdx_mh_destroyed = (Fl_Input2 *)0; | |
58 | Fl_Input2 *rdx_mh_major = (Fl_Input2 *)0; | |
59 | Fl_Input2 *rdx_mh_minor = (Fl_Input2 *)0; | |
60 | Fl_Input2 *rdx_mh_affected = (Fl_Input2 *)0; | |
61 | Fl_Input2 *rdx_mh_inaccessible = (Fl_Input2 *)0; | |
62 | ||
63 | Fl_Input2 *rdx_ap_destroyed = (Fl_Input2 *)0; | |
64 | Fl_Input2 *rdx_ap_major = (Fl_Input2 *)0; | |
65 | Fl_Input2 *rdx_ap_minor = (Fl_Input2 *)0; | |
66 | Fl_Input2 *rdx_ap_affected = (Fl_Input2 *)0; | |
67 | Fl_Input2 *rdx_ap_inaccessible = (Fl_Input2 *)0; | |
68 | ||
69 | Fl_Input2 *redx_5739_house_nbr[10]; | |
70 | Fl_Input2 *redx_5739_apt_nbr[10]; | |
71 | Fl_Input2 *redx_5739_desc[10]; | |
72 | Fl_Input2 *redx_5739_nam[10]; | |
73 | Fl_Input2 *redx_5739_destroyed[10]; | |
74 | Fl_Input2 *redx_5739_major[10]; | |
75 | Fl_Input2 *redx_5739_minor[10]; | |
76 | Fl_Input2 *redx_5739_affected[10]; | |
77 | Fl_Input2 *redx_5739_inaccessible[10]; | |
78 | Fl_Input2 *redx_5739_floors[10]; | |
79 | Fl_Input2 *redx_5739_basement[10]; | |
80 | Fl_Input2 *redx_5739_waterlevel[10]; | |
81 | Fl_Input2 *redx_5739_basement_water[10]; | |
82 | Fl_Input2 *redx_5739_electricity[10]; | |
83 | Fl_Input2 *redx_5739_occupancy[10]; | |
84 | Fl_Input2 *redx_5739_OR[10]; | |
85 | Fl_Input2 *redx_5739_901[10]; | |
86 | ||
87 | static void cb_btn_5739_date(Fl_Button*, void*) { | |
88 | rdx_5739_date->value(szDate(progStatus.dtformat)); | |
89 | } | |
90 | ||
91 | void redx_5739_compute(Fl_Widget * w, void *) | |
92 | { | |
93 | int stotal, mtotal, atotal; | |
94 | static char strtotal[5]; | |
95 | ||
96 | stotal = mtotal = atotal = 0; | |
97 | strtotal[0] = 0; | |
98 | for (int i = 0; i < 10; i++) { | |
99 | if (redx_5739_destroyed[i]->value()[0] == 'S') stotal++; | |
100 | if (redx_5739_destroyed[i]->value()[0] == 'M') mtotal++; | |
101 | if (redx_5739_destroyed[i]->value()[0] == 'A') atotal++; | |
102 | } | |
103 | if (stotal) { | |
104 | snprintf(strtotal, sizeof(strtotal), "%d", stotal); | |
105 | rdx_sf_destroyed->value(strtotal); | |
106 | } else rdx_sf_destroyed->value(""); | |
107 | if (mtotal) { | |
108 | snprintf(strtotal, sizeof(strtotal), "%d", mtotal); | |
109 | rdx_mh_destroyed->value(strtotal); | |
110 | } else rdx_mh_destroyed->value(""); | |
111 | if (atotal) { | |
112 | snprintf(strtotal, sizeof(strtotal), "%d", atotal); | |
113 | rdx_ap_destroyed->value(strtotal); | |
114 | } else rdx_ap_destroyed->value(""); | |
115 | ||
116 | stotal = mtotal = atotal = 0; | |
117 | strtotal[0] = 0; | |
118 | for (int i = 0; i < 10; i++) { | |
119 | if (redx_5739_major[i]->value()[0] == 'S') stotal++; | |
120 | if (redx_5739_major[i]->value()[0] == 'M') mtotal++; | |
121 | if (redx_5739_major[i]->value()[0] == 'A') atotal++; | |
122 | } | |
123 | if (stotal) { | |
124 | snprintf(strtotal, sizeof(strtotal), "%d", stotal); | |
125 | rdx_sf_major->value(strtotal); | |
126 | } else rdx_sf_major->value(""); | |
127 | if (mtotal) { | |
128 | snprintf(strtotal, sizeof(strtotal), "%d", mtotal); | |
129 | rdx_mh_major->value(strtotal); | |
130 | } else rdx_mh_major->value(""); | |
131 | if (atotal) { | |
132 | snprintf(strtotal, sizeof(strtotal), "%d", atotal); | |
133 | rdx_ap_major->value(strtotal); | |
134 | } else rdx_ap_major->value(""); | |
135 | ||
136 | stotal = mtotal = atotal = 0; | |
137 | strtotal[0] = 0; | |
138 | for (int i = 0; i < 10; i++) { | |
139 | if (redx_5739_minor[i]->value()[0] == 'S') stotal++; | |
140 | if (redx_5739_minor[i]->value()[0] == 'M') mtotal++; | |
141 | if (redx_5739_minor[i]->value()[0] == 'A') atotal++; | |
142 | } | |
143 | if (stotal) { | |
144 | snprintf(strtotal, sizeof(strtotal), "%d", stotal); | |
145 | rdx_sf_minor->value(strtotal); | |
146 | } else rdx_sf_minor->value(""); | |
147 | if (mtotal) { | |
148 | snprintf(strtotal, sizeof(strtotal), "%d", mtotal); | |
149 | rdx_mh_minor->value(strtotal); | |
150 | } else rdx_mh_minor->value(""); | |
151 | if (atotal) { | |
152 | snprintf(strtotal, sizeof(strtotal), "%d", atotal); | |
153 | rdx_ap_minor->value(strtotal); | |
154 | } else rdx_ap_minor->value(""); | |
155 | ||
156 | stotal = mtotal = atotal = 0; | |
157 | strtotal[0] = 0; | |
158 | for (int i = 0; i < 10; i++) { | |
159 | if (redx_5739_affected[i]->value()[0] == 'S') stotal++; | |
160 | if (redx_5739_affected[i]->value()[0] == 'M') mtotal++; | |
161 | if (redx_5739_affected[i]->value()[0] == 'A') atotal++; | |
162 | } | |
163 | if (stotal) { | |
164 | snprintf(strtotal, sizeof(strtotal), "%d", stotal); | |
165 | rdx_sf_affected->value(strtotal); | |
166 | } else rdx_sf_affected->value(""); | |
167 | if (mtotal) { | |
168 | snprintf(strtotal, sizeof(strtotal), "%d", mtotal); | |
169 | rdx_mh_affected->value(strtotal); | |
170 | } else rdx_mh_affected->value(""); | |
171 | if (atotal) { | |
172 | snprintf(strtotal, sizeof(strtotal), "%d", atotal); | |
173 | rdx_ap_affected->value(strtotal); | |
174 | } else rdx_ap_affected->value(""); | |
175 | ||
176 | stotal = mtotal = atotal = 0; | |
177 | strtotal[0] = 0; | |
178 | for (int i = 0; i < 10; i++) { | |
179 | if (redx_5739_inaccessible[i]->value()[0] == 'S') stotal++; | |
180 | if (redx_5739_inaccessible[i]->value()[0] == 'M') mtotal++; | |
181 | if (redx_5739_inaccessible[i]->value()[0] == 'A') atotal++; | |
182 | } | |
183 | if (stotal) { | |
184 | snprintf(strtotal, sizeof(strtotal), "%d", stotal); | |
185 | rdx_sf_inaccessible->value(strtotal); | |
186 | } else rdx_sf_inaccessible->value(""); | |
187 | if (mtotal) { | |
188 | snprintf(strtotal, sizeof(strtotal), "%d", mtotal); | |
189 | rdx_mh_inaccessible->value(strtotal); | |
190 | } else rdx_mh_inaccessible->value(""); | |
191 | if (atotal) { | |
192 | snprintf(strtotal, sizeof(strtotal), "%d", atotal); | |
193 | rdx_ap_inaccessible->value(strtotal); | |
194 | } else rdx_ap_inaccessible->value(""); | |
195 | ||
196 | } | |
197 | ||
198 | static void redx_5739_dmgtype(Fl_Widget * w, void * n) | |
199 | { | |
200 | Fl_Input2 * me = (Fl_Input2 *)w; | |
201 | int tnbr = (int)reinterpret_cast<long>(n); | |
202 | char cdmg = me->value()[0]; | |
203 | redx_5739_destroyed[tnbr]->value(""); | |
204 | redx_5739_major[tnbr]->value(""); | |
205 | redx_5739_minor[tnbr]->value(""); | |
206 | redx_5739_affected[tnbr]->value(""); | |
207 | redx_5739_inaccessible[tnbr]->value(""); | |
208 | switch (cdmg) { | |
209 | case 's': case 'S': me->value("S"); break; | |
210 | case 'm': case 'M': me->value("M"); break; | |
211 | case 'a': case 'A': me->value("A"); break; | |
212 | default: break; | |
213 | } | |
214 | redx_5739_compute(w, NULL); | |
215 | } | |
216 | ||
217 | static void redx_5739_yn(Fl_Widget *w, void *) | |
218 | { | |
219 | Fl_Input2 *me = (Fl_Input2 *)w; | |
220 | if (me->value()[0]) { | |
221 | switch (me->value()[0]) { | |
222 | case 'y': case 'Y': me->value("Y"); break; | |
223 | case 'n': case 'N': | |
224 | default: | |
225 | me->value("N"); | |
226 | } | |
227 | } else me->value(""); | |
228 | } | |
229 | ||
230 | static void redx_5739_or(Fl_Widget *w, void *) | |
231 | { | |
232 | Fl_Input2 *me = (Fl_Input2 *)w; | |
233 | if (me->value()[0]) { | |
234 | switch (me->value()[0]) { | |
235 | case 'o': case 'O': me->value("O"); break; | |
236 | default: | |
237 | me->value(""); | |
238 | } | |
239 | } else me->value(""); | |
240 | } | |
241 | ||
242 | static void redx_5739_inches(Fl_Widget *w, void *) | |
243 | { | |
244 | Fl_Input2 *me = (Fl_Input2 *)w; | |
245 | int val = 0; | |
246 | if (me->value()[0] != 0) | |
247 | sscanf(me->value(), "%d", &val); | |
248 | if (val) { | |
249 | static char sval[5]; | |
250 | sval[0] = 0; | |
251 | snprintf(sval, sizeof(sval), "%d", val); | |
252 | me->value(sval); | |
253 | } else me->value(""); | |
254 | } | |
255 | ||
256 | static void redx_5739_occ_check(Fl_Widget *w, void *) | |
257 | { | |
258 | Fl_Input2 *me = (Fl_Input2 *)w; | |
259 | if (me->value()[0]) { | |
260 | switch (me->value()[0]) { | |
261 | case 'o': case 'O': me->value("O"); break; | |
262 | case 'r': case 'R': me->value("R"); break; | |
263 | case 's': case 'S': me->value("S"); break; | |
264 | default: | |
265 | me->value(""); | |
266 | } | |
267 | } else me->value(""); | |
268 | } | |
269 | ||
270 | void create_redx_5739() | |
271 | { | |
272 | int Y = tab_top; | |
273 | tab_redx_5739 = new Fl_Group(0, Y, 570, 390); | |
274 | tab_redx_5739->align(FL_ALIGN_TOP); | |
275 | ||
276 | tab_redx_5739_type = new Fl_Tabs(0, Y, 570, 387); | |
277 | tab_redx_5739_type->selection_color((Fl_Color)246); | |
278 | ||
279 | tab_redx_5739_1 = new Fl_Group(0, Y+=25, 570, 360, _("5739-1")); | |
280 | ||
281 | rdx_5739_nbr = new Fl_Input2(100, Y+=8, 100, 24, "DR #"); | |
282 | rdx_5739_nbr->tooltip(_("Damage report record number")); | |
283 | rdx_5739_name = new Fl_Input2(100, Y+=26, 300, 24, "DR Name"); | |
284 | rdx_5739_name->tooltip(""); | |
285 | rdx_5739_state = new Fl_Input2(100, Y+=26, 300, 24, "State"); | |
286 | rdx_5739_state->tooltip(""); | |
287 | rdx_5739_cnty = new Fl_Input2(100, Y+=26, 300, 24, "County"); | |
288 | rdx_5739_cnty->tooltip(""); | |
289 | rdx_5739_city = new Fl_Input2(100, Y+=26, 300, 24, "City"); | |
290 | rdx_5739_city->tooltip(""); | |
291 | rdx_5739_street = new Fl_Input2(100, Y+=26, 300, 24, "Street"); | |
292 | rdx_5739_street->tooltip(""); | |
293 | rdx_5739_georef = new Fl_Input2(100, Y+=26, 400, 24, "Geo' Ref'"); | |
294 | rdx_5739_georef->tooltip(_("geographic reference, GPS lat/lon etc.")); | |
295 | ||
296 | rdx_5739_date = new Fl_Input2(100, Y+=26, 200, 24, "Date"); | |
297 | rdx_5739_date->tooltip(""); | |
298 | ||
299 | btn_5739_date = new Fl_Button(302, Y, 24, 24, _("...")); | |
300 | btn_5739_date->tooltip(_("Set today")); | |
301 | btn_5739_date->callback((Fl_Callback*)cb_btn_5739_date); | |
302 | ||
303 | rdx_5739_add_info = new FTextEdit(4, Y+=40, 560, 60, "Add' Info"); | |
304 | rdx_5739_add_info->type(FL_MULTILINE_INPUT); | |
305 | rdx_5739_add_info->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
306 | rdx_5739_add_info->tooltip(""); | |
307 | rdx_5739_worker = new Fl_Input2(100, Y+=62, 300, 24, "Worker"); | |
308 | rdx_5739_worker->tooltip(""); | |
309 | rdx_5739_supervisor = new Fl_Input2(100, Y+=26, 300, 24, "Supervisor"); | |
310 | rdx_5739_supervisor->tooltip(""); | |
311 | ||
312 | tab_redx_5739_1->end(); | |
313 | ||
314 | tab_redx_5739_2 = new Fl_Group(0, tab_top + 25, 570, 360, _("5739-2")); | |
315 | ||
316 | Y = tab_top; | |
317 | Fl_Box *title = new Fl_Box(0,Y+30, 200, 24, _("Damage totals")); | |
318 | title->box(FL_FLAT_BOX); | |
319 | title->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); | |
320 | ||
321 | rdx_sf_destroyed = new Fl_Input2(54, Y+=80, 100, 24, "SF destroyed"); | |
322 | rdx_sf_destroyed->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
323 | rdx_sf_destroyed->tooltip(_("computed value")); | |
324 | rdx_sf_destroyed->callback(redx_5739_compute, NULL); | |
325 | rdx_sf_major = new Fl_Input2(54, Y+=50, 100, 24, "SF major"); | |
326 | rdx_sf_major->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
327 | rdx_sf_major->tooltip(_("computed value")); | |
328 | rdx_sf_major->callback(redx_5739_compute, NULL); | |
329 | rdx_sf_minor = new Fl_Input2(54, Y+=50, 100, 24, "SF minor"); | |
330 | rdx_sf_minor->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
331 | rdx_sf_minor->tooltip(_("computed value")); | |
332 | rdx_sf_minor->callback(redx_5739_compute, NULL); | |
333 | rdx_sf_affected = new Fl_Input2(54, Y+=50, 100, 24, "SF affected"); | |
334 | rdx_sf_affected->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
335 | rdx_sf_affected->tooltip(_("computed value")); | |
336 | rdx_sf_affected->callback(redx_5739_compute, NULL); | |
337 | rdx_sf_inaccessible = new Fl_Input2(54, Y+=50, 100, 24, "SF inacc'"); | |
338 | rdx_sf_inaccessible->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
339 | rdx_sf_inaccessible->tooltip(_("computed value")); | |
340 | rdx_sf_inaccessible->callback(redx_5739_compute, NULL); | |
341 | ||
342 | Y = tab_top; | |
343 | rdx_mh_destroyed = new Fl_Input2(235, Y+=80, 100, 24, "MH destroyed"); | |
344 | rdx_mh_destroyed->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
345 | rdx_mh_destroyed->tooltip(_("computed value")); | |
346 | rdx_mh_destroyed->callback(redx_5739_compute, NULL); | |
347 | rdx_mh_major = new Fl_Input2(235, Y+=50, 100, 24, "MH major"); | |
348 | rdx_mh_major->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
349 | rdx_mh_major->tooltip(_("computed value")); | |
350 | rdx_mh_major->callback(redx_5739_compute, NULL); | |
351 | rdx_mh_minor = new Fl_Input2(235, Y+=50, 100, 24, "MH minor"); | |
352 | rdx_mh_minor->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
353 | rdx_mh_minor->tooltip(_("computed value")); | |
354 | rdx_mh_minor->callback(redx_5739_compute, NULL); | |
355 | rdx_mh_affected = new Fl_Input2(235, Y+=50, 100, 24, "MH affected"); | |
356 | rdx_mh_affected->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
357 | rdx_mh_affected->tooltip(_("computed value")); | |
358 | rdx_mh_affected->callback(redx_5739_compute, NULL); | |
359 | rdx_mh_inaccessible = new Fl_Input2(235, Y+=50, 100, 24, "MH inacc'"); | |
360 | rdx_mh_inaccessible->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
361 | rdx_mh_inaccessible->tooltip(_("computed value")); | |
362 | rdx_mh_inaccessible->callback(redx_5739_compute, NULL); | |
363 | ||
364 | Y = tab_top; | |
365 | rdx_ap_destroyed = new Fl_Input2(416, Y+=80, 100, 24, "Apt destroyed"); | |
366 | rdx_ap_destroyed->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
367 | rdx_ap_destroyed->tooltip(_("computed value")); | |
368 | rdx_ap_destroyed->callback(redx_5739_compute, NULL); | |
369 | rdx_ap_major = new Fl_Input2(416, Y+=50, 100, 24, "Apt major"); | |
370 | rdx_ap_major->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
371 | rdx_ap_major->tooltip(_("computed value")); | |
372 | rdx_ap_major->callback(redx_5739_compute, NULL); | |
373 | rdx_ap_minor = new Fl_Input2(416, Y+=50, 100, 24, "Apt minor"); | |
374 | rdx_ap_minor->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
375 | rdx_ap_major->tooltip(_("computed value")); | |
376 | rdx_ap_minor->callback(redx_5739_compute, NULL); | |
377 | rdx_ap_affected = new Fl_Input2(416, Y+=50, 100, 24, "Apt affected"); | |
378 | rdx_ap_affected->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
379 | rdx_ap_affected->tooltip(_("computed value")); | |
380 | rdx_ap_affected->callback(redx_5739_compute, NULL); | |
381 | rdx_ap_inaccessible = new Fl_Input2(416, Y+=50, 100, 24, "Apt inacc'"); | |
382 | rdx_ap_inaccessible->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
383 | rdx_ap_inaccessible->tooltip(_("computed value")); | |
384 | rdx_ap_inaccessible->callback(redx_5739_compute, NULL); | |
385 | ||
386 | ||
387 | tab_redx_5739_2->end(); | |
388 | ||
389 | for (int i = 0; i < 10; i++) { | |
390 | static char tabnbr[10][10]; | |
391 | snprintf(tabnbr[i], sizeof(tabnbr[i]), "# %d", i+1); | |
392 | Fl_Group *o = new Fl_Group(0, tab_top + 25, 570, 360, tabnbr[i]); | |
393 | ||
394 | Fl_Box *title = new Fl_Box(0, tab_top+30, 200, 24, _("Damage Classification")); | |
395 | title->box(FL_FLAT_BOX); | |
396 | title->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); | |
397 | ||
398 | redx_5739_house_nbr[i] = new Fl_Input2(14, Y = tab_top + 70, 150, 24, _("House nbr")); | |
399 | redx_5739_house_nbr[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
400 | redx_5739_house_nbr[i]->tooltip(""); | |
401 | redx_5739_apt_nbr[i] = new Fl_Input2(220, Y, 150, 24, _("Apt nbr")); | |
402 | redx_5739_apt_nbr[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
403 | redx_5739_apt_nbr[i]->tooltip(""); | |
404 | ||
405 | int X = 95; | |
406 | redx_5739_destroyed[i] = new Fl_Input2(X-=12, Y+=45, 24, 24, _("Destroyed")); | |
407 | redx_5739_destroyed[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
408 | redx_5739_destroyed[i]->tooltip("S/M/A"); | |
409 | redx_5739_destroyed[i]->callback(redx_5739_dmgtype, reinterpret_cast<void *>(i)); | |
410 | redx_5739_major[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Major")); | |
411 | redx_5739_major[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
412 | redx_5739_major[i]->tooltip("S/M/A"); | |
413 | redx_5739_major[i]->callback(redx_5739_dmgtype, reinterpret_cast<void *>(i)); | |
414 | redx_5739_minor[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Minor")); | |
415 | redx_5739_minor[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
416 | redx_5739_minor[i]->tooltip("S/M/A"); | |
417 | redx_5739_minor[i]->callback(redx_5739_dmgtype, reinterpret_cast<void *>(i)); | |
418 | redx_5739_affected[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Affected")); | |
419 | redx_5739_affected[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
420 | redx_5739_affected[i]->tooltip("S/M/A"); | |
421 | redx_5739_affected[i]->callback(redx_5739_dmgtype, reinterpret_cast<void *>(i)); | |
422 | redx_5739_inaccessible[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Inacc'")); | |
423 | redx_5739_inaccessible[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
424 | redx_5739_inaccessible[i]->tooltip("S/M/A"); | |
425 | redx_5739_inaccessible[i]->callback(redx_5739_dmgtype, reinterpret_cast<void *>(i)); | |
426 | ||
427 | X = 95; | |
428 | redx_5739_floors[i] = new Fl_Input2(X-=40, Y+=45, 80, 24, _("# Floors")); | |
429 | redx_5739_floors[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
430 | redx_5739_floors[i]->tooltip(""); | |
431 | redx_5739_basement[i] = new Fl_Input2(X+=(95+40-12), Y, 24, 24, _("Basement ?")); | |
432 | redx_5739_basement[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
433 | redx_5739_basement[i]->tooltip(_("Y/N")); | |
434 | redx_5739_basement[i]->callback(redx_5739_yn, NULL); | |
435 | ||
436 | X = 95; | |
437 | redx_5739_waterlevel[i] = new Fl_Input2(X-=40, Y+=45, 80, 24, _("Water level")); | |
438 | redx_5739_waterlevel[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
439 | redx_5739_waterlevel[i]->tooltip(_("in inches")); | |
440 | redx_5739_waterlevel[i]->callback(redx_5739_inches, NULL); | |
441 | redx_5739_basement_water[i] = new Fl_Input2(X+=(95), Y, 80, 24, _("W.L. in base'")); | |
442 | redx_5739_basement_water[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
443 | redx_5739_basement_water[i]->tooltip(_("in inches")); | |
444 | redx_5739_basement_water[i]->callback(redx_5739_inches, NULL); | |
445 | ||
446 | X = 95; | |
447 | redx_5739_electricity[i] = new Fl_Input2(X-=12, Y+=45, 24, 24, _("Elect'?")); | |
448 | redx_5739_electricity[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
449 | redx_5739_electricity[i]->tooltip(("Y/N")); | |
450 | redx_5739_electricity[i]->callback(redx_5739_yn, NULL); | |
451 | redx_5739_occupancy[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Occ. Type")); | |
452 | redx_5739_occupancy[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
453 | redx_5739_occupancy[i]->tooltip(_("O/R/S")); | |
454 | redx_5739_occupancy[i]->callback(redx_5739_occ_check, NULL); | |
455 | redx_5739_OR[i] = new Fl_Input2(X+=95, Y, 24, 24, _("OR")); | |
456 | redx_5739_OR[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
457 | redx_5739_OR[i]->tooltip(_("O-outreach assigned")); | |
458 | redx_5739_OR[i]->callback(redx_5739_or, NULL); | |
459 | redx_5739_901[i] = new Fl_Input2(X+=95, Y, 24, 24, _("901")); | |
460 | redx_5739_901[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); | |
461 | redx_5739_901[i]->tooltip(_("case record assigned?")); | |
462 | redx_5739_901[i]->callback(redx_5739_yn, NULL); | |
463 | ||
464 | redx_5739_desc[i] = new Fl_Input2(4, Y+=45, 562, 24, _("Description:")); | |
465 | redx_5739_desc[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
466 | redx_5739_desc[i]->tooltip(_("Useful info for assistance providers")); | |
467 | ||
468 | redx_5739_nam[i] = new Fl_Input2(4, Y+=45, 562, 24, _("Name:")); | |
469 | redx_5739_nam[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); | |
470 | redx_5739_nam[i]->tooltip(_("last name of resident family (if known)")); | |
471 | ||
472 | o->end(); | |
473 | } | |
474 | ||
475 | tab_redx_5739_type->end(); | |
476 | ||
477 | tab_redx_5739->end(); | |
478 | ||
479 | tab_redx_5739->hide(); | |
480 | ||
481 | } | |
482 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include "templates.h" | |
21 | ||
22 | const char redx_5739_html_template[] = | |
23 | "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ | |
24 | <html><head>\n\ | |
25 | <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>RedCross-5739</title></head><body>\n\ | |
26 | <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
27 | <tbody>\n\ | |
28 | <tr>\n\ | |
29 | <td style=\"vertical-align: top; width: 9%;\"></td>\n\ | |
30 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
31 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
32 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
33 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
34 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
35 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
36 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
37 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
38 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
39 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
40 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
41 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
42 | <td style=\"vertical-align: top; width: 7%;\"></td>\n\ | |
43 | </tr>\n\ | |
44 | <tr>\n\ | |
45 | <td colspan=\"7\" style=\"vertical-align: top;\">American Red Cross Form 5739</td>\n\ | |
46 | <td colspan=\"7\" style=\"vertical-align: top; text-align: right;\">On-Site Detailed Damage Assessment Worksheet (Street Sheet)</td>\n\ | |
47 | </tr>\n\ | |
48 | <tr>\n\ | |
49 | <td colspan=\"2\" style=\"vertical-align: top;\">DR #:<br>:nbr:</td>\n\ | |
50 | \n\ | |
51 | <td colspan=\"3\" style=\"vertical-align: top;\">DR Name:<br>:name:</td>\n\ | |
52 | <td colspan=\"2\" style=\"vertical-align: top;\">State:<br>:state:</td>\n\ | |
53 | <td colspan=\"2\" style=\"vertical-align: top;\">County:<br>:cnty:</td>\n\ | |
54 | <td colspan=\"3\" style=\"vertical-align: top;\">City/Community:<br>:city:</td>\n\ | |
55 | <td colspan=\"2\" style=\"vertical-align: top;\">Date:<br>:date:</td>\n\ | |
56 | </tr>\n\ | |
57 | <tr>\n\ | |
58 | <td colspan=\"5\" style=\"vertical-align: top;\">Street name: :street:</td>\n\ | |
59 | <td colspan=\"9\" style=\"vertical-align: top;\">Geographical Reference: :georef:</td>\n\ | |
60 | \n\ | |
61 | </tr>\n\ | |
62 | <tr>\n\ | |
63 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
64 | </tr>\n\ | |
65 | <tr>\n\ | |
66 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">House #</td>\n\ | |
67 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Apt<br>/ Unit #</td>\n\ | |
68 | <td colspan=\"5\" style=\"vertical-align: top; text-align: center; background-color: rgb(207, 207, 207);\">Damage Classification</td>\n\ | |
69 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\"># floors in<br>dwelling</td>\n\ | |
70 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Basement<br>Y/N</td>\n\ | |
71 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Water Level<br>inches</td>\n\ | |
72 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Water Level<br>in basement</td>\n\ | |
73 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Electric<br>Y/N</td>\n\ | |
74 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Own/Rent/<br>Seasonal</td>\n\ | |
75 | <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">OR<br>/ 901</td>\n\ | |
76 | </tr>\n\ | |
77 | <tr>\n\ | |
78 | <td style=\"vertical-align: top; text-align: center;\">Destroyed</td>\n\ | |
79 | <td style=\"vertical-align: top; text-align: center;\">Major</td>\n\ | |
80 | <td style=\"vertical-align: top; text-align: center;\">Minor</td>\n\ | |
81 | <td style=\"vertical-align: top; text-align: center;\">Affected</td>\n\ | |
82 | <td style=\"vertical-align: top; text-align: center;\"><small>Inaccessible</small></td>\n\ | |
83 | </tr>\n\ | |
84 | <tr>\n\ | |
85 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
86 | </tr>\n\ | |
87 | <tr>\n\ | |
88 | <td style=\"vertical-align: top;\">:hb[0]:</td>\n\ | |
89 | <td style=\"vertical-align: top;\">:ap[0]:</td>\n\ | |
90 | <td style=\"vertical-align: top; text-align: center;\">:des[0]:</td>\n\ | |
91 | <td style=\"vertical-align: top; text-align: center;\">:maj[0]:</td>\n\ | |
92 | <td style=\"vertical-align: top; text-align: center;\">:min[0]:</td>\n\ | |
93 | <td style=\"vertical-align: top; text-align: center;\">:aff[0]:</td>\n\ | |
94 | <td style=\"vertical-align: top; text-align: center;\">:acc[0]:</td>\n\ | |
95 | <td style=\"vertical-align: top; text-align: center;\">:flr[0]:</td>\n\ | |
96 | <td style=\"vertical-align: top; text-align: center;\">:bas[0]:</td>\n\ | |
97 | <td style=\"vertical-align: top; text-align: center;\">:wtr[0]:</td>\n\ | |
98 | <td style=\"vertical-align: top; text-align: center;\">:bwl[0]:</td>\n\ | |
99 | <td style=\"vertical-align: top; text-align: center;\">:ele[0]:</td>\n\ | |
100 | <td style=\"vertical-align: top; text-align: center;\">:occ[0]:</td>\n\ | |
101 | <td style=\"vertical-align: top;\">:or[0]:/:901[0]:</td>\n\ | |
102 | </tr>\n\ | |
103 | <tr>\n\ | |
104 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[0]:</td>\n\ | |
105 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[0]:</td>\n\ | |
106 | </tr>\n\ | |
107 | <tr>\n\ | |
108 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
109 | </tr>\n\ | |
110 | <tr>\n\ | |
111 | <td style=\"vertical-align: top;\">:hb[1]:</td>\n\ | |
112 | <td style=\"vertical-align: top;\">:ap[1]:</td>\n\ | |
113 | <td style=\"vertical-align: top; text-align: center;\">:des[1]:</td>\n\ | |
114 | <td style=\"vertical-align: top; text-align: center;\">:maj[1]:</td>\n\ | |
115 | <td style=\"vertical-align: top; text-align: center;\">:min[1]:</td>\n\ | |
116 | <td style=\"vertical-align: top; text-align: center;\">:aff[1]:</td>\n\ | |
117 | <td style=\"vertical-align: top; text-align: center;\">:acc[1]:</td>\n\ | |
118 | <td style=\"vertical-align: top; text-align: center;\">:flr[1]:</td>\n\ | |
119 | <td style=\"vertical-align: top; text-align: center;\">:bas[1]:</td>\n\ | |
120 | <td style=\"vertical-align: top; text-align: center;\">:wtr[1]:</td>\n\ | |
121 | <td style=\"vertical-align: top; text-align: center;\">:bwl[1]:</td>\n\ | |
122 | <td style=\"vertical-align: top; text-align: center;\">:ele[1]:</td>\n\ | |
123 | <td style=\"vertical-align: top; text-align: center;\">:occ[1]:</td>\n\ | |
124 | <td style=\"vertical-align: top;\">:or[1]:/:901[1]:</td>\n\ | |
125 | </tr>\n\ | |
126 | <tr>\n\ | |
127 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[1]:</td>\n\ | |
128 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[1]:</td>\n\ | |
129 | </tr>\n\ | |
130 | <tr>\n\ | |
131 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
132 | </tr>\n\ | |
133 | <tr>\n\ | |
134 | <td style=\"vertical-align: top;\">:hb[2]:</td>\n\ | |
135 | <td style=\"vertical-align: top;\">:ap[2]:</td>\n\ | |
136 | <td style=\"vertical-align: top; text-align: center;\">:des[2]:</td>\n\ | |
137 | <td style=\"vertical-align: top; text-align: center;\">:maj[2]:</td>\n\ | |
138 | <td style=\"vertical-align: top; text-align: center;\">:min[2]:</td>\n\ | |
139 | <td style=\"vertical-align: top; text-align: center;\">:aff[2]:</td>\n\ | |
140 | <td style=\"vertical-align: top; text-align: center;\">:acc[2]:</td>\n\ | |
141 | <td style=\"vertical-align: top; text-align: center;\">:flr[2]:</td>\n\ | |
142 | <td style=\"vertical-align: top; text-align: center;\">:bas[2]:</td>\n\ | |
143 | <td style=\"vertical-align: top; text-align: center;\">:wtr[2]:</td>\n\ | |
144 | <td style=\"vertical-align: top; text-align: center;\">:bwl[2]:</td>\n\ | |
145 | <td style=\"vertical-align: top; text-align: center;\">:ele[2]:</td>\n\ | |
146 | <td style=\"vertical-align: top; text-align: center;\">:occ[2]:</td>\n\ | |
147 | <td style=\"vertical-align: top;\">:or[2]:/:901[2]:</td>\n\ | |
148 | </tr>\n\ | |
149 | <tr>\n\ | |
150 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[2]:</td>\n\ | |
151 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[2]:</td>\n\ | |
152 | </tr>\n\ | |
153 | <tr>\n\ | |
154 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
155 | </tr>\n\ | |
156 | <tr>\n\ | |
157 | <td style=\"vertical-align: top;\">:hb[3]:</td>\n\ | |
158 | <td style=\"vertical-align: top;\">:ap[3]:</td>\n\ | |
159 | <td style=\"vertical-align: top; text-align: center;\">:des[3]:</td>\n\ | |
160 | <td style=\"vertical-align: top; text-align: center;\">:maj[3]:</td>\n\ | |
161 | <td style=\"vertical-align: top; text-align: center;\">:min[3]:</td>\n\ | |
162 | <td style=\"vertical-align: top; text-align: center;\">:aff[3]:</td>\n\ | |
163 | <td style=\"vertical-align: top; text-align: center;\">:acc[3]:</td>\n\ | |
164 | <td style=\"vertical-align: top; text-align: center;\">:flr[3]:</td>\n\ | |
165 | <td style=\"vertical-align: top; text-align: center;\">:bas[3]:</td>\n\ | |
166 | <td style=\"vertical-align: top; text-align: center;\">:wtr[3]:</td>\n\ | |
167 | <td style=\"vertical-align: top; text-align: center;\">:bwl[3]:</td>\n\ | |
168 | <td style=\"vertical-align: top; text-align: center;\">:ele[3]:</td>\n\ | |
169 | <td style=\"vertical-align: top; text-align: center;\">:occ[3]:</td>\n\ | |
170 | <td style=\"vertical-align: top;\">:or[3]:/:901[3]:</td>\n\ | |
171 | </tr>\n\ | |
172 | <tr>\n\ | |
173 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[3]:</td>\n\ | |
174 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[3]:</td>\n\ | |
175 | </tr>\n\ | |
176 | <tr>\n\ | |
177 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
178 | </tr>\n\ | |
179 | <tr>\n\ | |
180 | <td style=\"vertical-align: top;\">:hb[4]:</td>\n\ | |
181 | <td style=\"vertical-align: top;\">:ap[4]:</td>\n\ | |
182 | <td style=\"vertical-align: top; text-align: center;\">:des[4]:</td>\n\ | |
183 | <td style=\"vertical-align: top; text-align: center;\">:maj[4]:</td>\n\ | |
184 | <td style=\"vertical-align: top; text-align: center;\">:min[4]:</td>\n\ | |
185 | <td style=\"vertical-align: top; text-align: center;\">:aff[4]:</td>\n\ | |
186 | <td style=\"vertical-align: top; text-align: center;\">:acc[4]:</td>\n\ | |
187 | <td style=\"vertical-align: top; text-align: center;\">:flr[4]:</td>\n\ | |
188 | <td style=\"vertical-align: top; text-align: center;\">:bas[4]:</td>\n\ | |
189 | <td style=\"vertical-align: top; text-align: center;\">:wtr[4]:</td>\n\ | |
190 | <td style=\"vertical-align: top; text-align: center;\">:bwl[4]:</td>\n\ | |
191 | <td style=\"vertical-align: top; text-align: center;\">:ele[4]:</td>\n\ | |
192 | <td style=\"vertical-align: top; text-align: center;\">:occ[4]:</td>\n\ | |
193 | <td style=\"vertical-align: top;\">:or[4]:/:901[4]:</td>\n\ | |
194 | </tr>\n\ | |
195 | <tr>\n\ | |
196 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[4]:</td>\n\ | |
197 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[4]:</td>\n\ | |
198 | </tr>\n\ | |
199 | <tr>\n\ | |
200 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
201 | </tr>\n\ | |
202 | <tr>\n\ | |
203 | <td style=\"vertical-align: top;\">:hb[5]:</td>\n\ | |
204 | <td style=\"vertical-align: top;\">:ap[5]:</td>\n\ | |
205 | <td style=\"vertical-align: top; text-align: center;\">:des[5]:</td>\n\ | |
206 | <td style=\"vertical-align: top; text-align: center;\">:maj[5]:</td>\n\ | |
207 | <td style=\"vertical-align: top; text-align: center;\">:min[5]:</td>\n\ | |
208 | <td style=\"vertical-align: top; text-align: center;\">:aff[5]:</td>\n\ | |
209 | <td style=\"vertical-align: top; text-align: center;\">:acc[5]:</td>\n\ | |
210 | <td style=\"vertical-align: top; text-align: center;\">:flr[5]:</td>\n\ | |
211 | <td style=\"vertical-align: top; text-align: center;\">:bas[5]:</td>\n\ | |
212 | <td style=\"vertical-align: top; text-align: center;\">:wtr[5]:</td>\n\ | |
213 | <td style=\"vertical-align: top; text-align: center;\">:bwl[5]:</td>\n\ | |
214 | <td style=\"vertical-align: top; text-align: center;\">:ele[5]:</td>\n\ | |
215 | <td style=\"vertical-align: top; text-align: center;\">:occ[5]:</td>\n\ | |
216 | <td style=\"vertical-align: top;\">:or[5]:/:901[5]:</td>\n\ | |
217 | </tr>\n\ | |
218 | <tr>\n\ | |
219 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[5]:</td>\n\ | |
220 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[5]:</td>\n\ | |
221 | </tr>\n\ | |
222 | <tr>\n\ | |
223 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
224 | </tr>\n\ | |
225 | <tr>\n\ | |
226 | <td style=\"vertical-align: top;\">:hb[6]:</td>\n\ | |
227 | <td style=\"vertical-align: top;\">:ap[6]:</td>\n\ | |
228 | <td style=\"vertical-align: top; text-align: center;\">:des[6]:</td>\n\ | |
229 | <td style=\"vertical-align: top; text-align: center;\">:maj[6]:</td>\n\ | |
230 | <td style=\"vertical-align: top; text-align: center;\">:min[6]:</td>\n\ | |
231 | <td style=\"vertical-align: top; text-align: center;\">:aff[6]:</td>\n\ | |
232 | <td style=\"vertical-align: top; text-align: center;\">:acc[6]:</td>\n\ | |
233 | <td style=\"vertical-align: top; text-align: center;\">:flr[6]:</td>\n\ | |
234 | <td style=\"vertical-align: top; text-align: center;\">:bas[6]:</td>\n\ | |
235 | <td style=\"vertical-align: top; text-align: center;\">:wtr[6]:</td>\n\ | |
236 | <td style=\"vertical-align: top; text-align: center;\">:bwl[6]:</td>\n\ | |
237 | <td style=\"vertical-align: top; text-align: center;\">:ele[6]:</td>\n\ | |
238 | <td style=\"vertical-align: top; text-align: center;\">:occ[6]:</td>\n\ | |
239 | <td style=\"vertical-align: top;\">:or[6]:/:901[6]:</td>\n\ | |
240 | </tr>\n\ | |
241 | <tr>\n\ | |
242 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[6]:</td>\n\ | |
243 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[6]:</td>\n\ | |
244 | </tr>\n\ | |
245 | <tr>\n\ | |
246 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
247 | </tr>\n\ | |
248 | <tr>\n\ | |
249 | <td style=\"vertical-align: top;\">:hb[7]:</td>\n\ | |
250 | <td style=\"vertical-align: top;\">:ap[7]:</td>\n\ | |
251 | <td style=\"vertical-align: top; text-align: center;\">:des[7]:</td>\n\ | |
252 | <td style=\"vertical-align: top; text-align: center;\">:maj[7]:</td>\n\ | |
253 | <td style=\"vertical-align: top; text-align: center;\">:min[7]:</td>\n\ | |
254 | <td style=\"vertical-align: top; text-align: center;\">:aff[7]:</td>\n\ | |
255 | <td style=\"vertical-align: top; text-align: center;\">:acc[7]:</td>\n\ | |
256 | <td style=\"vertical-align: top; text-align: center;\">:flr[7]:</td>\n\ | |
257 | <td style=\"vertical-align: top; text-align: center;\">:bas[7]:</td>\n\ | |
258 | <td style=\"vertical-align: top; text-align: center;\">:wtr[7]:</td>\n\ | |
259 | <td style=\"vertical-align: top; text-align: center;\">:bwl[7]:</td>\n\ | |
260 | <td style=\"vertical-align: top; text-align: center;\">:ele[7]:</td>\n\ | |
261 | <td style=\"vertical-align: top; text-align: center;\">:occ[7]:</td>\n\ | |
262 | <td style=\"vertical-align: top;\">:or[7]:/:901[7]:</td>\n\ | |
263 | </tr>\n\ | |
264 | <tr>\n\ | |
265 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[7]:</td>\n\ | |
266 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[7]:</td>\n\ | |
267 | </tr>\n\ | |
268 | <tr>\n\ | |
269 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
270 | </tr>\n\ | |
271 | <tr>\n\ | |
272 | <td style=\"vertical-align: top;\">:hb[8]:</td>\n\ | |
273 | <td style=\"vertical-align: top;\">:ap[8]:</td>\n\ | |
274 | <td style=\"vertical-align: top; text-align: center;\">:des[8]:</td>\n\ | |
275 | <td style=\"vertical-align: top; text-align: center;\">:maj[8]:</td>\n\ | |
276 | <td style=\"vertical-align: top; text-align: center;\">:min[8]:</td>\n\ | |
277 | <td style=\"vertical-align: top; text-align: center;\">:aff[8]:</td>\n\ | |
278 | <td style=\"vertical-align: top; text-align: center;\">:acc[8]:</td>\n\ | |
279 | <td style=\"vertical-align: top; text-align: center;\">:flr[8]:</td>\n\ | |
280 | <td style=\"vertical-align: top; text-align: center;\">:bas[8]:</td>\n\ | |
281 | <td style=\"vertical-align: top; text-align: center;\">:wtr[8]:</td>\n\ | |
282 | <td style=\"vertical-align: top; text-align: center;\">:bwl[8]:</td>\n\ | |
283 | <td style=\"vertical-align: top; text-align: center;\">:ele[8]:</td>\n\ | |
284 | <td style=\"vertical-align: top; text-align: center;\">:occ[8]:</td>\n\ | |
285 | <td style=\"vertical-align: top;\">:or[8]:/:901[8]:</td>\n\ | |
286 | </tr>\n\ | |
287 | <tr>\n\ | |
288 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[8]:</td>\n\ | |
289 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[8]:</td>\n\ | |
290 | </tr>\n\ | |
291 | <tr>\n\ | |
292 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
293 | </tr>\n\ | |
294 | <tr>\n\ | |
295 | <td style=\"vertical-align: top;\">:hb[9]:</td>\n\ | |
296 | <td style=\"vertical-align: top;\">:ap[9]:</td>\n\ | |
297 | <td style=\"vertical-align: top; text-align: center;\">:des[9]:</td>\n\ | |
298 | <td style=\"vertical-align: top; text-align: center;\">:maj[9]:</td>\n\ | |
299 | <td style=\"vertical-align: top; text-align: center;\">:min[9]:</td>\n\ | |
300 | <td style=\"vertical-align: top; text-align: center;\">:aff[9]:</td>\n\ | |
301 | <td style=\"vertical-align: top; text-align: center;\">:acc[9]:</td>\n\ | |
302 | <td style=\"vertical-align: top; text-align: center;\">:flr[9]:</td>\n\ | |
303 | <td style=\"vertical-align: top; text-align: center;\">:bas[9]:</td>\n\ | |
304 | <td style=\"vertical-align: top; text-align: center;\">:wtr[9]:</td>\n\ | |
305 | <td style=\"vertical-align: top; text-align: center;\">:bwl[9]:</td>\n\ | |
306 | <td style=\"vertical-align: top; text-align: center;\">:ele[9]:</td>\n\ | |
307 | <td style=\"vertical-align: top; text-align: center;\">:occ[9]:</td>\n\ | |
308 | <td style=\"vertical-align: top;\">:or[9]:/:901[9]:</td>\n\ | |
309 | </tr>\n\ | |
310 | <tr>\n\ | |
311 | <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[9]:</td>\n\ | |
312 | <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[9]:</td>\n\ | |
313 | </tr>\n\ | |
314 | <tr>\n\ | |
315 | <td colspan=\"14\" style=\"vertical-align: top;\">\n\ | |
316 | <hr style=\"width: 90%; height: 2px;\"></td>\n\ | |
317 | </tr>\n\ | |
318 | <tr>\n\ | |
319 | <td colspan=\"2\" style=\"vertical-align: top;\">Total single family:</td>\n\ | |
320 | <td style=\"vertical-align: top; text-align: center;\">:sf_des:</td>\n\ | |
321 | <td style=\"vertical-align: top; text-align: center;\">:sf_maj:</td>\n\ | |
322 | <td style=\"vertical-align: top; text-align: center;\">:sf_min:</td>\n\ | |
323 | <td style=\"vertical-align: top; text-align: center;\">:sf_aff:</td>\n\ | |
324 | <td style=\"vertical-align: top; text-align: center;\">:sf_ina:</td>\n\ | |
325 | <td colspan=\"7\" rowspan=\"2\" style=\"vertical-align: top;\">Additional information: :addinf:</td>\n\ | |
326 | </tr>\n\ | |
327 | <tr>\n\ | |
328 | <td colspan=\"2\" style=\"vertical-align: top;\">Total mobile home:</td>\n\ | |
329 | <td style=\"vertical-align: top; text-align: center;\">:mh_des:</td>\n\ | |
330 | <td style=\"vertical-align: top; text-align: center;\">:mh_maj:</td>\n\ | |
331 | <td style=\"vertical-align: top; text-align: center;\">:mh_min:</td>\n\ | |
332 | <td style=\"vertical-align: top; text-align: center;\">:mh_aff:</td>\n\ | |
333 | <td style=\"vertical-align: top; text-align: center;\">:mh_ina:</td>\n\ | |
334 | </tr>\n\ | |
335 | <tr>\n\ | |
336 | <td colspan=\"2\" style=\"vertical-align: top;\">Total apartment:</td>\n\ | |
337 | <td style=\"vertical-align: top; text-align: center;\">:ap_des:</td>\n\ | |
338 | <td style=\"vertical-align: top; text-align: center;\">:ap_maj:</td>\n\ | |
339 | <td style=\"vertical-align: top; text-align: center;\">:ap_min:</td>\n\ | |
340 | <td style=\"vertical-align: top; text-align: center;\">:ap_aff:</td>\n\ | |
341 | <td style=\"vertical-align: top; text-align: center;\">:ap_ina:</td>\n\ | |
342 | <td colspan=\"5\" style=\"vertical-align: top;\">Worker completing form: :worker:</td>\n\ | |
343 | <td colspan=\"2\" style=\"vertical-align: top;\">Supervisor: :supervisor:</td>\n\ | |
344 | </tr>\n\ | |
345 | </tbody>\n\ | |
346 | </table>\n\ | |
347 | <br>\n\ | |
348 | <br>\n\ | |
349 | </body></html>"; | |
350 | ||
351 | ||
352 | const char redx_5739_text_template[] = | |
353 | " On-Site Detailed Damage Assessment Worksheet\n\ | |
354 | DR #: :nbr:\n\ | |
355 | DR Name: :name:\n\ | |
356 | State: :state:\n\ | |
357 | County: :cnty:\n\ | |
358 | City: :city:\n\ | |
359 | Date: :date:\n\ | |
360 | Street: :street:\n\ | |
361 | Geo ref: :georef:\n\ | |
362 | \n\ | |
363 | House #: :hb[0]:\n\ | |
364 | Apt/Unit #: :ap[0]:\n\ | |
365 | Destroyed: :des[0]:\n\ | |
366 | Major: :maj[0]:\n\ | |
367 | Minor: :min[0]:\n\ | |
368 | Affected: :aff[0]:\n\ | |
369 | Inaccessible: :acc[0]:\n\ | |
370 | # floors: :flr[0]:\n\ | |
371 | Basement: :bas[0]:\n\ | |
372 | Water level: :wtr[0]:\n\ | |
373 | Bsmnt water: :bwl[0]:\n\ | |
374 | Electric: :ele[0]:\n\ | |
375 | Occupancy type: :occ[0]:\n\ | |
376 | OR: :or[0]:\n\ | |
377 | 901: :901[0]:\n\ | |
378 | Description: :desc[0]:\n\ | |
379 | Name: :nam[0]:\n\ | |
380 | House #: :hb[1]:\n\ | |
381 | Apt/Unit #: :ap[1]:\n\ | |
382 | Destroyed: :des[1]:\n\ | |
383 | Major: :maj[1]:\n\ | |
384 | Minor: :min[1]:\n\ | |
385 | Affected: :aff[1]:\n\ | |
386 | Inaccessible: :acc[1]:\n\ | |
387 | # floors: :flr[1]:\n\ | |
388 | Basement: :bas[1]:\n\ | |
389 | Water level: :wtr[1]:\n\ | |
390 | Bsmnt water: :bwl[1]:\n\ | |
391 | Electric: :ele[1]:\n\ | |
392 | Occupancy type: :occ[1]:\n\ | |
393 | OR: :or[1]:\n\ | |
394 | 901: :901[1]:\n\ | |
395 | Description: :desc[1]:\n\ | |
396 | Name: :nam[1]:\n\ | |
397 | House #: :hb[2]:\n\ | |
398 | Apt/Unit #: :ap[2]:\n\ | |
399 | Destroyed: :des[2]:\n\ | |
400 | Major: :maj[2]:\n\ | |
401 | Minor: :min[2]:\n\ | |
402 | Affected: :aff[2]:\n\ | |
403 | Inaccessible: :acc[2]:\n\ | |
404 | # floors: :flr[2]:\n\ | |
405 | Basement: :bas[2]:\n\ | |
406 | Water level: :wtr[2]:\n\ | |
407 | Bsmnt water: :bwl[2]:\n\ | |
408 | Electric: :ele[2]:\n\ | |
409 | Occupancy type: :occ[2]:\n\ | |
410 | OR: :or[2]:\n\ | |
411 | 901: :901[2]:\n\ | |
412 | Description: :desc[2]:\n\ | |
413 | Name: :nam[2]:\n\ | |
414 | House #: :hb[3]:\n\ | |
415 | Apt/Unit #: :ap[3]:\n\ | |
416 | Destroyed: :des[3]:\n\ | |
417 | Major: :maj[3]:\n\ | |
418 | Minor: :min[3]:\n\ | |
419 | Affected: :aff[3]:\n\ | |
420 | Inaccessible: :acc[3]:\n\ | |
421 | # floors: :flr[3]:\n\ | |
422 | Basement: :bas[3]:\n\ | |
423 | Water level: :wtr[3]:\n\ | |
424 | Bsmnt water: :bwl[3]:\n\ | |
425 | Electric: :ele[3]:\n\ | |
426 | Occupancy type: :occ[3]:\n\ | |
427 | OR: :or[3]:\n\ | |
428 | 901: :901[3]:\n\ | |
429 | Description: :desc[3]:\n\ | |
430 | Name: :nam[3]:\n\ | |
431 | House #: :hb[4]:\n\ | |
432 | Apt/Unit #: :ap[4]:\n\ | |
433 | Destroyed: :des[4]:\n\ | |
434 | Major: :maj[4]:\n\ | |
435 | Minor: :min[4]:\n\ | |
436 | Affected: :aff[4]:\n\ | |
437 | Inaccessible: :acc[4]:\n\ | |
438 | # floors: :flr[4]:\n\ | |
439 | Basement: :bas[4]:\n\ | |
440 | Water level: :wtr[4]:\n\ | |
441 | Bsmnt water: :bwl[4]:\n\ | |
442 | Electric: :ele[4]:\n\ | |
443 | Occupancy type: :occ[4]:\n\ | |
444 | OR: :or[4]:\n\ | |
445 | 901: :901[4]:\n\ | |
446 | Description: :desc[4]:\n\ | |
447 | Name: :nam[4]:\n\ | |
448 | House #: :hb[5]:\n\ | |
449 | Apt/Unit #: :ap[5]:\n\ | |
450 | Destroyed: :des[5]:\n\ | |
451 | Major: :maj[5]:\n\ | |
452 | Minor: :min[5]:\n\ | |
453 | Affected: :aff[5]:\n\ | |
454 | Inaccessible: :acc[5]:\n\ | |
455 | # floors: :flr[5]:\n\ | |
456 | Basement: :bas[5]:\n\ | |
457 | Water level: :wtr[5]:\n\ | |
458 | Bsmnt water: :bwl[5]:\n\ | |
459 | Electric: :ele[5]:\n\ | |
460 | Occupancy type: :occ[5]:\n\ | |
461 | OR: :or[5]:\n\ | |
462 | 901: :901[5]:\n\ | |
463 | Description: :desc[5]:\n\ | |
464 | Name: :nam[5]:\n\ | |
465 | House #: :hb[6]:\n\ | |
466 | Apt/Unit #: :ap[6]:\n\ | |
467 | Destroyed: :des[6]:\n\ | |
468 | Major: :maj[6]:\n\ | |
469 | Minor: :min[6]:\n\ | |
470 | Affected: :aff[6]:\n\ | |
471 | Inaccessible: :acc[6]:\n\ | |
472 | # floors: :flr[6]:\n\ | |
473 | Basement: :bas[6]:\n\ | |
474 | Water level: :wtr[6]:\n\ | |
475 | Bsmnt water: :bwl[6]:\n\ | |
476 | Electric: :ele[6]:\n\ | |
477 | Occupancy type: :occ[6]:\n\ | |
478 | OR: :or[6]:\n\ | |
479 | 901: :901[6]:\n\ | |
480 | Description: :desc[6]:\n\ | |
481 | Name: :nam[6]:\n\ | |
482 | House #: :hb[7]:\n\ | |
483 | Apt/Unit #: :ap[7]:\n\ | |
484 | Destroyed: :des[7]:\n\ | |
485 | Major: :maj[7]:\n\ | |
486 | Minor: :min[7]:\n\ | |
487 | Affected: :aff[7]:\n\ | |
488 | Inaccessible: :acc[7]:\n\ | |
489 | # floors: :flr[7]:\n\ | |
490 | Basement: :bas[7]:\n\ | |
491 | Water level: :wtr[7]:\n\ | |
492 | Bsmnt water: :bwl[7]:\n\ | |
493 | Electric: :ele[7]:\n\ | |
494 | Occupancy type: :occ[7]:\n\ | |
495 | OR: :or[7]:\n\ | |
496 | 901: :901[7]:\n\ | |
497 | Description: :desc[7]:\n\ | |
498 | Name: :nam[7]:\n\ | |
499 | House #: :hb[8]:\n\ | |
500 | Apt/Unit #: :ap[8]:\n\ | |
501 | Destroyed: :des[8]:\n\ | |
502 | Major: :maj[8]:\n\ | |
503 | Minor: :min[8]:\n\ | |
504 | Affected: :aff[8]:\n\ | |
505 | Inaccessible: :acc[8]:\n\ | |
506 | # floors: :flr[8]:\n\ | |
507 | Basement: :bas[8]:\n\ | |
508 | Water level: :wtr[8]:\n\ | |
509 | Bsmnt water: :bwl[8]:\n\ | |
510 | Electric: :ele[8]:\n\ | |
511 | Occupancy type: :occ[8]:\n\ | |
512 | OR: :or[8]:\n\ | |
513 | 901: :901[8]:\n\ | |
514 | Description: :desc[8]:\n\ | |
515 | Name: :nam[8]:\n\ | |
516 | House #: :hb[9]:\n\ | |
517 | Apt/Unit #: :ap[9]:\n\ | |
518 | Destroyed: :des[9]:\n\ | |
519 | Major: :maj[9]:\n\ | |
520 | Minor: :min[9]:\n\ | |
521 | Affected: :aff[9]:\n\ | |
522 | Inaccessible: :acc[9]:\n\ | |
523 | # floors: :flr[9]:\n\ | |
524 | Basement: :bas[9]:\n\ | |
525 | Water level: :wtr[9]:\n\ | |
526 | Bsmnt water: :bwl[9]:\n\ | |
527 | Electric: :ele[9]:\n\ | |
528 | Occupancy type: :occ[9]:\n\ | |
529 | OR: :or[9]:\n\ | |
530 | 901: :901[9]:\n\ | |
531 | Description: :desc[9]:\n\ | |
532 | Name: :nam[9]:\n\ | |
533 | \n\ | |
534 | Total Single Family:\n\ | |
535 | destroyed: :sf_des:\n\ | |
536 | major: :sf_maj:\n\ | |
537 | minor: :sf_min:\n\ | |
538 | affected: :sf_aff:\n\ | |
539 | inaccessible: :sf_ina:\n\ | |
540 | Total Mobile Home:\n\ | |
541 | destroyed: :mh_des:\n\ | |
542 | major: :mh_maj:\n\ | |
543 | minor: :mh_min:\n\ | |
544 | affected: :mh_aff:\n\ | |
545 | inaccessible: :mh_ina:\n\ | |
546 | Total Apartment:\n\ | |
547 | destroyed: :ap_des:\n\ | |
548 | major: :ap_maj:\n\ | |
549 | minor: :ap_min:\n\ | |
550 | affected: :ap_aff:\n\ | |
551 | inaccessible: :ap_ina:\n\ | |
552 | \n\ | |
553 | Additional info: :add_info:\n\ | |
554 | Worker: :worker:\n\ | |
555 | Supervisor: :supervisor:\n\ | |
556 | \n"; | |
557 | ||
558 | //====================================================================== | |
559 | // 5739A form | |
560 | //====================================================================== | |
561 | ||
562 | const char redx_5739A_html_template[] = | |
563 | "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ | |
564 | <html><head>\n\ | |
565 | <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>RedCross-5739A</title></head><body>\n\ | |
566 | <table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
567 | <tbody>\n\ | |
568 | <tr>\n\ | |
569 | <td style=\"vertical-align: top; width: 50%; text-align: left;\">American Red Cross 5739A</td>\n\ | |
570 | <td style=\"vertical-align: top; width: 50%; text-align: right;\">Detailed Damage Assessment Supplemental Worksheet</td>\n\ | |
571 | </tr>\n\ | |
572 | </tbody>\n\ | |
573 | </table>\n\ | |
574 | <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
575 | <tr>\n\ | |
576 | <td>\n\ | |
577 | <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ | |
578 | <tr>\n\ | |
579 | <td style=\"vertical-align: top; width: 8%;\">DR #:<br>:drnbr:</td>\n\ | |
580 | <td style=\"vertical-align: top; width: 22%;\">DR Name:<br>:drnam:</td>\n\ | |
581 | <td style=\"vertical-align: top; width: 8%;\">State:<br>:state:</td>\n\ | |
582 | <td style=\"vertical-align: top; width: 22%;\">County:<br>:cnty:</td>\n\ | |
583 | <td style=\"vertical-align: top; width: 30%;\">City/Community:<br>:city:</td>\n\ | |
584 | <td style=\"vertical-align: top; width: 10%;\">Date:<br>:date:</td>\n\ | |
585 | </tr>\n\ | |
586 | <tr>\n\ | |
587 | <td colspan=\"2\" style=\"vertical-align: top\">Street Name: :street:</td>\n\ | |
588 | <td colspan=\"4\" style=\"vertical-align: top\">Geographic Reference: :georef:</td> \n\ | |
589 | </tr>\n\ | |
590 | </table>\n\ | |
591 | </td>\n\ | |
592 | </tr>\n\ | |
593 | <tr>\n\ | |
594 | <td>\n\ | |
595 | <table style = \"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
596 | <tr>\n\ | |
597 | <td style=\"vertical-align: top; text-align: left; width: 30%;\">\n\ | |
598 | <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\ | |
599 | <tr>\n\ | |
600 | <td style=\"vertical-align: top; text-align: center; width: 100%;\">\n\ | |
601 | Address Range:<br>:adrs0:<br><br><br><br></td>\n\ | |
602 | </tr>\n\ | |
603 | <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Primary Dwelling Type: :dwell0:</td></tr>\n\ | |
604 | <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Basements Prevalent?: :base0:</td></tr>\n\ | |
605 | </table>\n\ | |
606 | </td>\n\ | |
607 | <td style=\"vertical-align: top; text-align: center; width: 15%;\">\n\ | |
608 | Approximate<br>number of<br>dwellings/units in<br>this range of<br>addresses:\n\ | |
609 | </td>\n\ | |
610 | <td style=\"vertical-align: top; text-align: center; width: 55%\">\n\ | |
611 | <table style=\"width: 100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ | |
612 | <tr>\n\ | |
613 | <td colspan=\"2\" style=\"vertical-align: top; text-align: center;\">\n\ | |
614 | Description of Damage\n\ | |
615 | </td>\n\ | |
616 | </tr>\n\ | |
617 | <tr>\n\ | |
618 | <td style=\"vertical-align: top; text-align: left; width: 35%\">\n\ | |
619 | <table style=\"width: 100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
620 | <tr>\n\ | |
621 | <td style=\"vertical-align: top; text-align:left; width: 70%\">\n\ | |
622 | Destroyed:<br>\n\ | |
623 | Major:<br>\n\ | |
624 | Minor:<br>\n\ | |
625 | Affected:<br>\n\ | |
626 | Inaccessible:<br>\n\ | |
627 | Unknown/None:<br>\n\ | |
628 | </td>\n\ | |
629 | <td style=\"vertical-align: top; text-align:right; width: 30%\">\n\ | |
630 | :ds0: %<br>\n\ | |
631 | :mj0: %<br>\n\ | |
632 | :mn0: %<br>\n\ | |
633 | :af0: %<br>\n\ | |
634 | :in0: %<br>\n\ | |
635 | :un0: %<br>\n\ | |
636 | </td>\n\ | |
637 | </tr>\n\ | |
638 | </table>\n\ | |
639 | </td>\n\ | |
640 | <td style=\"vertical-align: top; text-align: left; width: 65%\">\n\ | |
641 | or general description:<br>\n\ | |
642 | :gd0:\n\ | |
643 | </td>\n\ | |
644 | </tr>\n\ | |
645 | </table>\n\ | |
646 | </td>\n\ | |
647 | </tr>\n\ | |
648 | </table>\n\ | |
649 | </td>\n\ | |
650 | </tr>\n\ | |
651 | <tr>\n\ | |
652 | <td>\n\ | |
653 | <table style = \"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
654 | <tr>\n\ | |
655 | <td style=\"vertical-align: top; text-align: left; width: 30%;\">\n\ | |
656 | <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\ | |
657 | <tr>\n\ | |
658 | <td style=\"vertical-align: top; text-align: center; width: 100%;\">\n\ | |
659 | Address Range:<br>:adrs1:<br><br><br><br></td>\n\ | |
660 | </tr>\n\ | |
661 | <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Primary Dwelling Type: :dwell1:</td></tr>\n\ | |
662 | <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Basements Prevalent?: :base1:</td></tr>\n\ | |
663 | </table>\n\ | |
664 | </td>\n\ | |
665 | <td style=\"vertical-align: top; text-align: center; width: 15%;\">\n\ | |
666 | Approximate<br>\n\ | |
667 | number of<br>\n\ | |
668 | dwellings/units in<br>\n\ | |
669 | this range of<br>\n\ | |
670 | addresses:\n\ | |
671 | </td>\n\ | |
672 | <td style=\"vertical-align: top; text-align: center; width: 55%\">\n\ | |
673 | <table style=\"width: 100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ | |
674 | <tr>\n\ | |
675 | <td colspan=\"2\" style=\"vertical-align: top; text-align: center;\">\n\ | |
676 | Description of Damage\n\ | |
677 | </td>\n\ | |
678 | </tr>\n\ | |
679 | <tr>\n\ | |
680 | <td style=\"vertical-align: top; text-align: left; width: 35%\">\n\ | |
681 | <table style=\"width: 100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
682 | <tr>\n\ | |
683 | <td style=\"vertical-align: top; text-align:left; width: 70%\">\n\ | |
684 | Destroyed:<br>\n\ | |
685 | Major:<br>\n\ | |
686 | Minor:<br>\n\ | |
687 | Affected:<br>\n\ | |
688 | Inaccessible:<br>\n\ | |
689 | Unknown/None:<br>\n\ | |
690 | </td>\n\ | |
691 | <td style=\"vertical-align: top; text-align:left; width: 30%\">\n\ | |
692 | :ds1: %<br>\n\ | |
693 | :mj1: %<br>\n\ | |
694 | :mn1: %<br>\n\ | |
695 | :af1: %<br>\n\ | |
696 | :in1: %<br>\n\ | |
697 | :un1: %<br>\n\ | |
698 | </td>\n\ | |
699 | </tr>\n\ | |
700 | </table>\n\ | |
701 | </td>\n\ | |
702 | <td style=\"vertical-align: top; text-align: left; width: 65%\">\n\ | |
703 | or general description:<br>\n\ | |
704 | :gd1:\n\ | |
705 | </td>\n\ | |
706 | </tr>\n\ | |
707 | </table>\n\ | |
708 | </td>\n\ | |
709 | </tr>\n\ | |
710 | </table>\n\ | |
711 | </td>\n\ | |
712 | </tr>\n\ | |
713 | </table>\n\ | |
714 | </body>\n\ | |
715 | </html>\n\ | |
716 | "; | |
717 | ||
718 | const char redx_5739A_text_template[] = | |
719 | " Detailed Damage Assessment Supplemental Worksheet\n\ | |
720 | DR #: :drnbr:\n\ | |
721 | DR Name: :drnam:</td>\n\ | |
722 | State: :state:</td>\n\ | |
723 | County: :cnty:</td>\n\ | |
724 | City/Community: :city:</td>\n\ | |
725 | Date: :date:</td>\n\ | |
726 | Street Name: :street:</td>\n\ | |
727 | Geographic Reference: :georef:</td> \n\ | |
728 | Address range: :adrs0:\n\ | |
729 | Primary Dwelling Type: :dwell0:\n\ | |
730 | Basements Prevalent?: :base0:\n\ | |
731 | Destroyed: :ds0:\n\ | |
732 | Major: :mj0:\n\ | |
733 | Minor: :mn0:\n\ | |
734 | Affected: :af0:\n\ | |
735 | Inaccessible: :in0:\n\ | |
736 | Unknown/None: :un0:\n\ | |
737 | general description: :gd0:\n\ | |
738 | Address range: :adrs1:\n\ | |
739 | Primary Dwelling Type: :dwell1:\n\ | |
740 | Basements Prevalent?: :base1:\n\ | |
741 | Destroyed: :ds1:\n\ | |
742 | Major: :mj1:\n\ | |
743 | Minor: :mn1:\n\ | |
744 | Affected: :af1:\n\ | |
745 | Inaccessible: :in1:\n\ | |
746 | Unknown/None: :un1:\n\ | |
747 | general description: :gd1:\n\ | |
748 | "; | |
749 | ||
750 | //====================================================================== | |
751 | // 5739B form | |
752 | //====================================================================== | |
753 | ||
754 | const char redx_5739B_html_template[] = | |
755 | "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ | |
756 | <html><head>\n\ | |
757 | <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>RedCross-5739B</title></head><body>\n\ | |
758 | <table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ | |
759 | <tbody>\n\ | |
760 | <tr>\n\ | |
761 | <td style=\"vertical-align: top; width: 50%; text-align: left;\">American Red Cross 5739B</td>\n\ | |
762 | <td style=\"vertical-align: top; width: 50%; text-align: right;\">Area Assessment Worksheet</td>\n\ | |
763 | </tr>\n\ | |
764 | </tbody>\n\ | |
765 | </table>\n\ | |
766 | <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ | |
767 | <tr>\n\ | |
768 | <td style=\"vertical-align: top; width: 10%;\">DR #:<br>:drnbr:</td>\n\ | |
769 | <td style=\"vertical-align: top; width: 25%;\">DR Name:<br>:drnam:</td>\n\ | |
770 | <td style=\"vertical-align: top; width: 5%;\">State:<br>:state:</td>\n\ | |
771 | <td style=\"vertical-align: top; width: 25%;\">County:<br>:cnty:</td>\n\ | |
772 | <td style=\"vertical-align: top; width: 25%;\">City/Community:<br>:city:</td>\n\ | |
773 | <td style=\"vertical-align: top; width: 10%;\">Date:<br>:date:</td>\n\ | |
774 | </tr>\n\ | |
775 | <tr><td colspan=\"6\" style=\"vertical-align: top; text-align: left\">Geographic reference: :georef:</td></tr>\n\ | |
776 | <tr><td colspan=\"6\" style=\"vertical-align: top; text-align: center\">BOUNDARIES</td></tr>\n\ | |
777 | <tr>\n\ | |
778 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ | |
779 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">North: :nb:</td>\n\ | |
780 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ | |
781 | </tr>\n\ | |
782 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">West: :wb:</td>\n\ | |
783 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ | |
784 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">East: :eb:</td>\n\ | |
785 | </tr>\n\ | |
786 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ | |
787 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">South: :sb:</td>\n\ | |
788 | <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ | |
789 | </tr>\n\ | |
790 | <tr>\n\ | |
791 | <td rowspan=\"3\"></td>\n\ | |
792 | <td colspan=\"2\">Approximate # dwellings/units impacted: :nbr:</td>\n\ | |
793 | <td colspan=\"2\">General information:</td>\n\ | |
794 | <td rowspan=\"3\"></td>\n\ | |
795 | </tr>\n\ | |
796 | <tr>\n\ | |
797 | <td rowspan=\"2\" style=\"vertical-align: top; text-align:left;\">\n\ | |
798 | Destroyed:<br>\n\ | |
799 | Major:<br>\n\ | |
800 | Minor:<br>\n\ | |
801 | Affected:<br>\n\ | |
802 | Inaccessible:<br>\n\ | |
803 | Unknown/None:<br>\n\ | |
804 | </td>\n\ | |
805 | <td rowspan=\"2\" style=\"vertical-align: top; text-align:right;\">\n\ | |
806 | :d: %<br>\n\ | |
807 | :j: %<br>\n\ | |
808 | :n: %<br>\n\ | |
809 | :a: %<br>\n\ | |
810 | :i: %<br>\n\ | |
811 | :u: %<br>\n\ | |
812 | </td>\n\ | |
813 | <td colspan=\"2\">:gi:</td>\n\ | |
814 | </tr>\n\ | |
815 | <tr><td colspan=\"2\">Basements prevalent? :b:</td></tr>\n\ | |
816 | </table>\n\ | |
817 | </body>\n\ | |
818 | </html>\n\ | |
819 | "; | |
820 | ||
821 | const char redx_5739B_text_template[] = | |
822 | " Area Assessment Worksheet\n\ | |
823 | DR #:<br>:drnbr:\n\ | |
824 | DR Name:<br>:drnam:\n\ | |
825 | State:<br>:state:\n\ | |
826 | County:<br>:cnty:\n\ | |
827 | City/Community:<br>:city:\n\ | |
828 | Date:<br>:date:\n\ | |
829 | Geographic reference: :georef:</tr>\n\ | |
830 | BOUNDARIES\n\ | |
831 | North: :nb:\n\ | |
832 | West: :wb:\n\ | |
833 | East: :eb:\n\ | |
834 | South: :sb:\n\ | |
835 | Approximate # dwellings/units impacted: :nbr:\n\ | |
836 | Destroyed: :d: %\n\ | |
837 | Major: :j: %\n\ | |
838 | Minor: :n: %\n\ | |
839 | Affected: :a: %\n\ | |
840 | Inaccessible: :i: %\n\ | |
841 | Unknown/None: :u: %\n\ | |
842 | General info: :gi:\n\ | |
843 | Basements prevalent? :b:\n\ | |
844 | "; |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <stdlib.h> | |
21 | #include <iostream> | |
22 | #include <fstream> | |
23 | #include <cstring> | |
24 | #include <ctime> | |
25 | #include <sys/types.h> | |
26 | #include <sys/stat.h> | |
27 | #include <stdio.h> | |
28 | #include <errno.h> | |
29 | ||
30 | #include <FL/Fl.H> | |
31 | #include <FL/Enumerations.H> | |
32 | #include <FL/Fl_Window.H> | |
33 | #include <FL/Fl_Button.H> | |
34 | #include <FL/Fl_Group.H> | |
35 | #include <FL/Fl_Sys_Menu_Bar.H> | |
36 | #include <FL/x.H> | |
37 | #include <FL/Fl_Help_Dialog.H> | |
38 | #include <FL/Fl_Menu_Item.H> | |
39 | #include <FL/Fl_File_Icon.H> | |
40 | ||
41 | #include "config.h" | |
42 | #include "flmsg_config.h" | |
43 | ||
44 | #include "flmsg.h" | |
45 | #include "templates.h" | |
46 | #include "debug.h" | |
47 | #include "util.h" | |
48 | #include "gettext.h" | |
49 | #include "flmsg_dialog.h" | |
50 | #include "flinput2.h" | |
51 | #include "date.h" | |
52 | #include "calendar.h" | |
53 | #include "icons.h" | |
54 | #include "fileselect.h" | |
55 | #include "wrap.h" | |
56 | #include "status.h" | |
57 | #include "parse_xml.h" | |
58 | ||
59 | #ifdef WIN32 | |
60 | # include "flmsgrc.h" | |
61 | # include "compat.h" | |
62 | # define dirent fl_dirent_no_thanks | |
63 | #endif | |
64 | ||
65 | #include <FL/filename.H> | |
66 | #include "dirent-check.h" | |
67 | ||
68 | #include <FL/x.H> | |
69 | #include <FL/Fl_Pixmap.H> | |
70 | #include <FL/Fl_Image.H> | |
71 | ||
72 | using namespace std; | |
73 | ||
74 | string s_redx_snw_lname; | |
75 | string s_redx_snw_fname; | |
76 | string s_redx_snw_area1; | |
77 | string s_redx_snw_xchg1; | |
78 | string s_redx_snw_suffix1; | |
79 | string s_redx_snw_area2; | |
80 | string s_redx_snw_xchg2; | |
81 | string s_redx_snw_suffix2; | |
82 | string s_redx_snw_area3; | |
83 | string s_redx_snw_xchg3; | |
84 | string s_redx_snw_suffix3; | |
85 | string s_redx_snw_pdline1; | |
86 | string s_redx_snw_pdline2; | |
87 | string s_redx_snw_pdcity; | |
88 | string s_redx_snw_pdst; | |
89 | string s_redx_snw_pdzip; | |
90 | string s_redx_snw_haline1; | |
91 | string s_redx_snw_haline2; | |
92 | string s_redx_snw_hacity; | |
93 | string s_redx_snw_hast; | |
94 | string s_redx_snw_hazip; | |
95 | string s_redx_snw_cmsg; | |
96 | ||
97 | bool b_redx_snw_nophone; | |
98 | bool b_snw_m1; | |
99 | bool b_snw_m2; | |
100 | bool b_snw_m3; | |
101 | bool b_snw_m4; | |
102 | bool b_snw_m5; | |
103 | bool b_snw_m6; | |
104 | bool b_snw_m7; | |
105 | bool b_snw_m8; | |
106 | bool b_snw_m9; | |
107 | bool b_snw_m10; | |
108 | bool b_snw_m11; | |
109 | bool b_snw_m12; | |
110 | bool b_snw_m13; | |
111 | bool b_snw_m14; | |
112 | bool b_snw_m15; | |
113 | ||
114 | // could not use real names ... WIN32 barfs | |
115 | enum FTYPE { B, S, T, E }; // bool, string, text, empty | |
116 | ||
117 | struct TRIAD { | |
118 | FTYPE ftype; | |
119 | string htmlname; | |
120 | string *ps; | |
121 | bool *pb; | |
122 | Fl_Widget *control; }; | |
123 | ||
124 | TRIAD redx_triad[] = { | |
125 | { S, ":lname:", &s_redx_snw_lname, NULL, snw_lname }, | |
126 | { S, ":fname:", &s_redx_snw_fname, NULL, snw_fname }, | |
127 | { B, ":nophone:", NULL, &b_redx_snw_nophone, snw_nophone }, | |
128 | { S, ":area1:", &s_redx_snw_area1, NULL, snw_area1 }, | |
129 | { S, ":xchg1:", &s_redx_snw_xchg1, NULL, snw_xchg1 }, | |
130 | { S, ":suffix1:", &s_redx_snw_suffix1, NULL, snw_suffix1 }, | |
131 | { S, ":area2:", &s_redx_snw_area2, NULL, snw_area2 }, | |
132 | { S, ":xchg2:", &s_redx_snw_xchg2, NULL, snw_xchg2 }, | |
133 | { S, ":suffix2:", &s_redx_snw_suffix2, NULL, snw_suffix2 }, | |
134 | { S, ":area3:", &s_redx_snw_area3, NULL, snw_area3 }, | |
135 | { S, ":xchg3:", &s_redx_snw_xchg3, NULL, snw_xchg3 }, | |
136 | { S, ":suffix3:", &s_redx_snw_suffix3, NULL, snw_suffix3 }, | |
137 | { S, ":pdline1:", &s_redx_snw_pdline1, NULL, snw_pdline1 }, | |
138 | { S, ":pdline2:", &s_redx_snw_pdline2, NULL, snw_pdline2 }, | |
139 | { S, ":pdcity:", &s_redx_snw_pdcity, NULL, snw_pdcity }, | |
140 | { S, ":pdst:", &s_redx_snw_pdst, NULL, snw_pdst }, | |
141 | { S, ":pdzip:", &s_redx_snw_pdzip, NULL, snw_pdzip }, | |
142 | { S, ":haline1:", &s_redx_snw_haline1, NULL, snw_haline1 }, | |
143 | { S, ":haline2:", &s_redx_snw_haline2, NULL, snw_haline2 }, | |
144 | { S, ":hacity:", &s_redx_snw_hacity, NULL, snw_hacity }, | |
145 | { S, ":hast:", &s_redx_snw_hast, NULL, snw_hast }, | |
146 | { S, ":hazip:", &s_redx_snw_hazip, NULL, snw_hazip }, | |
147 | { B, ":m1:", NULL, &b_snw_m1, snw_m1 }, | |
148 | { B, ":m2:", NULL, &b_snw_m2, snw_m2 }, | |
149 | { B, ":m3:", NULL, &b_snw_m3, snw_m3 }, | |
150 | { B, ":m4:", NULL, &b_snw_m4, snw_m4 }, | |
151 | { B, ":m5:", NULL, &b_snw_m5, snw_m5 }, | |
152 | { B, ":m6:", NULL, &b_snw_m6, snw_m6 }, | |
153 | { B, ":m7:", NULL, &b_snw_m7, snw_m7 }, | |
154 | { B, ":m8:", NULL, &b_snw_m8, snw_m8 }, | |
155 | { B, ":m9:", NULL, &b_snw_m9, snw_m9 }, | |
156 | { B, ":m10:", NULL, &b_snw_m10, snw_m10 }, | |
157 | { B, ":m11:", NULL, &b_snw_m11, snw_m11 }, | |
158 | { B, ":m12:", NULL, &b_snw_m12, snw_m12 }, | |
159 | { B, ":m13:", NULL, &b_snw_m13, snw_m13 }, | |
160 | { B, ":m14:", NULL, &b_snw_m14, snw_m14 }, | |
161 | { B, ":m15:", NULL, &b_snw_m15, snw_m15 }, | |
162 | { T, ":cmsg:", &s_redx_snw_cmsg, NULL, snw_cmsg }, | |
163 | { E, "", NULL, NULL, NULL } | |
164 | }; | |
165 | ||
166 | string buffredx_snw; | |
167 | string def_redx_snw_filename = ""; | |
168 | string base_redx_snw_filename = ""; | |
169 | string def_redx_snw_TemplateName = ""; | |
170 | ||
171 | bool using_redx_snw_template = false; | |
172 | ||
173 | static bool fields_initialized = false; | |
174 | ||
175 | static void init_fields() | |
176 | { | |
177 | redx_triad[0].control = snw_lname; | |
178 | redx_triad[1].control = snw_fname; | |
179 | redx_triad[2].control = snw_nophone; | |
180 | redx_triad[3].control = snw_area1; | |
181 | redx_triad[4].control = snw_xchg1; | |
182 | redx_triad[5].control = snw_suffix1; | |
183 | redx_triad[6].control = snw_area2; | |
184 | redx_triad[7].control = snw_xchg2; | |
185 | redx_triad[8].control = snw_suffix2; | |
186 | redx_triad[9].control = snw_area3; | |
187 | redx_triad[10].control = snw_xchg3; | |
188 | redx_triad[11].control = snw_suffix3; | |
189 | redx_triad[12].control = snw_pdline1; | |
190 | redx_triad[13].control = snw_pdline2; | |
191 | redx_triad[14].control = snw_pdcity; | |
192 | redx_triad[15].control = snw_pdst; | |
193 | redx_triad[16].control = snw_pdzip; | |
194 | redx_triad[17].control = snw_haline1; | |
195 | redx_triad[18].control = snw_haline2; | |
196 | redx_triad[19].control = snw_hacity; | |
197 | redx_triad[20].control = snw_hast; | |
198 | redx_triad[21].control = snw_hazip; | |
199 | redx_triad[22].control = snw_m1; | |
200 | redx_triad[23].control = snw_m2; | |
201 | redx_triad[24].control = snw_m3; | |
202 | redx_triad[25].control = snw_m4; | |
203 | redx_triad[26].control = snw_m5; | |
204 | redx_triad[27].control = snw_m6; | |
205 | redx_triad[28].control = snw_m7; | |
206 | redx_triad[29].control = snw_m8; | |
207 | redx_triad[30].control = snw_m9; | |
208 | redx_triad[31].control = snw_m10; | |
209 | redx_triad[32].control = snw_m11; | |
210 | redx_triad[33].control = snw_m12; | |
211 | redx_triad[34].control = snw_m13; | |
212 | redx_triad[35].control = snw_m14; | |
213 | redx_triad[36].control = snw_m15; | |
214 | redx_triad[37].control = snw_cmsg; | |
215 | ||
216 | fields_initialized = true; | |
217 | } | |
218 | ||
219 | void clear_redx_snwfields() | |
220 | { | |
221 | if (!fields_initialized) init_fields(); | |
222 | TRIAD *ptriad = redx_triad; | |
223 | while (ptriad->ftype != E) { | |
224 | if (ptriad->ftype == B) *(ptriad->pb) = false; | |
225 | else if (ptriad->ftype == S) (ptriad->ps)->clear(); | |
226 | else if (ptriad->ftype == T) (ptriad->ps)->clear(); | |
227 | ptriad++; | |
228 | } | |
229 | } | |
230 | ||
231 | bool check_redx_snwfields() | |
232 | { | |
233 | TRIAD *ptriad = redx_triad; | |
234 | while (ptriad->ftype != E) { | |
235 | if (ptriad->control == NULL) return false; | |
236 | if (ptriad->ftype == B) { | |
237 | if (*(ptriad->pb) != ((Fl_Check_Button *)ptriad->control)->value()) | |
238 | return true; | |
239 | } else if (ptriad->ftype == S) { | |
240 | if (*(ptriad->ps) != ((Fl_Input2 *)ptriad->control)->value()) | |
241 | return true; | |
242 | } else if (ptriad->ftype == T){ | |
243 | if (*(ptriad->ps) != ((FTextEdit *)ptriad->control)->buffer()->text()) | |
244 | return true; | |
245 | } | |
246 | ptriad++; | |
247 | } | |
248 | return false; | |
249 | } | |
250 | ||
251 | void update_redx_snwfields() | |
252 | { | |
253 | if (!fields_initialized) init_fields(); | |
254 | TRIAD *ptriad = redx_triad; | |
255 | while (ptriad->ftype != E) { | |
256 | if (ptriad->ftype == B) | |
257 | *(ptriad->pb) = ((Fl_Check_Button *)ptriad->control)->value(); | |
258 | else if (ptriad->ftype == S) | |
259 | *(ptriad->ps) = ((Fl_Input2 *)ptriad->control)->value(); | |
260 | else if (ptriad->ftype == T) | |
261 | *(ptriad->ps) = ((FTextEdit *)ptriad->control)->buffer()->text(); | |
262 | ptriad++; | |
263 | } | |
264 | } | |
265 | ||
266 | void update_redx_snwform() | |
267 | { | |
268 | if (!fields_initialized) init_fields(); | |
269 | TRIAD *ptriad = redx_triad; | |
270 | while (ptriad->ftype != E) { | |
271 | if (ptriad->ftype == B) | |
272 | ((Fl_Check_Button *)ptriad->control)->value(*(ptriad->pb)); | |
273 | else if (ptriad->ftype == S) | |
274 | ((Fl_Input2 *)ptriad->control)->value((ptriad->ps)->c_str()); | |
275 | else if (ptriad->ftype == T) { | |
276 | ((FTextEdit *)ptriad->control)->clear(); | |
277 | ((FTextEdit *)ptriad->control)->add((ptriad->ps)->c_str()); | |
278 | } | |
279 | ptriad++; | |
280 | } | |
281 | } | |
282 | ||
283 | void clear_redx_snw_form() | |
284 | { | |
285 | clear_redx_snwfields(); | |
286 | update_redx_snwform(); | |
287 | } | |
288 | ||
289 | void make_buffredx_snw(bool compress = false) | |
290 | { | |
291 | string one = "1"; string zero = "0"; | |
292 | TRIAD *ptriad = redx_triad; | |
293 | while (ptriad->ftype != E) { | |
294 | if (ptriad->ftype == B) | |
295 | buffredx_snw.append( lineout( ptriad->htmlname, (*(ptriad->pb) ? one : zero))); | |
296 | else if (ptriad->ftype == S) | |
297 | buffredx_snw.append( lineout( ptriad->htmlname, *(ptriad->ps))); | |
298 | else if (ptriad->ftype == T) | |
299 | buffredx_snw.append( lineout( ptriad->htmlname, *(ptriad->ps))); | |
300 | ptriad++; | |
301 | } | |
302 | if (compress) compress_maybe(buffredx_snw); | |
303 | } | |
304 | ||
305 | void read_redx_snw_buffer(string data) | |
306 | { | |
307 | clear_redx_snwfields(); | |
308 | read_header(data); | |
309 | ||
310 | TRIAD *ptriad = redx_triad; | |
311 | while (ptriad->ftype != E) { | |
312 | if (ptriad->ftype == B) | |
313 | *(ptriad->pb) = (findstr( data, ptriad->htmlname ) == "1"); | |
314 | else if (ptriad->ftype == S) | |
315 | *(ptriad->ps) = findstr( data, ptriad->htmlname ); | |
316 | else if (ptriad->ftype == T) | |
317 | *(ptriad->ps) = findstr( data, ptriad->htmlname ); | |
318 | ptriad++; | |
319 | } | |
320 | update_redx_snwform(); | |
321 | } | |
322 | ||
323 | void cb_redx_snw_new() | |
324 | { | |
325 | if (check_redx_snwfields()) { | |
326 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { | |
327 | update_header(CHANGED); | |
328 | cb_redx_snw_save(); | |
329 | } | |
330 | } | |
331 | clear_redx_snw_form(); | |
332 | clear_header(); | |
333 | def_redx_snw_filename = ICS_msg_dir; | |
334 | def_redx_snw_filename.append("new").append(FREDXSNW_EXT); | |
335 | show_filename(def_redx_snw_filename); | |
336 | using_redx_snw_template = false; | |
337 | } | |
338 | ||
339 | void cb_redx_snw_import() | |
340 | { | |
341 | fl_alert2("Not implemented"); | |
342 | } | |
343 | ||
344 | void cb_redx_snw_export() | |
345 | { | |
346 | fl_alert2("Not implemented"); | |
347 | } | |
348 | ||
349 | void cb_redx_snw_wrap_import(string wrapfilename, string inpbuffer) | |
350 | { | |
351 | clear_redx_snw_form(); | |
352 | read_redx_snw_buffer(inpbuffer); | |
353 | def_redx_snw_filename = ICS_msg_dir; | |
354 | def_redx_snw_filename.append(wrapfilename); | |
355 | show_filename(def_redx_snw_filename); | |
356 | using_redx_snw_template = false; | |
357 | } | |
358 | ||
359 | int eval_redx_snw_fsize() | |
360 | { | |
361 | Ccrc16 chksum; | |
362 | evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); | |
363 | evalstr.append(base_redx_snw_filename).append("]"); | |
364 | update_redx_snwfields(); | |
365 | update_header(FROM); | |
366 | evalstr.append(header("<redx_snw>")); | |
367 | buffredx_snw.clear(); | |
368 | make_buffredx_snw(true); | |
369 | if (buffredx_snw.empty()) return 0; | |
370 | compress_maybe( buffredx_snw ); | |
371 | evalstr.append( buffredx_snw ); | |
372 | evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); | |
373 | return evalstr.length(); | |
374 | } | |
375 | ||
376 | void cb_redx_snw_wrap_export() | |
377 | { | |
378 | if (check_redx_snwfields()) { | |
379 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
380 | return; | |
381 | update_header(CHANGED); | |
382 | } | |
383 | update_redx_snwfields(); | |
384 | ||
385 | if (base_redx_snw_filename == string("new").append(FREDXSNW_EXT) || | |
386 | base_redx_snw_filename == string("default").append(FREDXSNW_EXT) ) | |
387 | if (!cb_redx_snw_save_as()) return; | |
388 | ||
389 | string wrapfilename = WRAP_send_dir; | |
390 | wrapfilename.append(base_redx_snw_filename); | |
391 | wrapfilename.append(".wrap"); | |
392 | const char *p = FSEL::saveas( | |
393 | "Save as wrap file", | |
394 | "Wrap file\t*.{wrap,WRAP}", | |
395 | wrapfilename.c_str()); | |
396 | if (p) { | |
397 | string pext = fl_filename_ext(p); | |
398 | wrapfilename = p; | |
399 | ||
400 | update_header(FROM); | |
401 | buffredx_snw.assign(header("<redx_snw>")); | |
402 | make_buffredx_snw(true); | |
403 | export_wrapfile(base_redx_snw_filename, wrapfilename, buffredx_snw, pext != ".wrap"); | |
404 | ||
405 | buffredx_snw.assign(header("<redx_snw>")); | |
406 | make_buffredx_snw(false); | |
407 | write_redx_snw(def_redx_snw_filename); | |
408 | } | |
409 | } | |
410 | ||
411 | void cb_redx_snw_wrap_autosend() | |
412 | { | |
413 | if (check_redx_snwfields()) { | |
414 | if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) | |
415 | return; | |
416 | update_header(CHANGED); | |
417 | } | |
418 | update_redx_snwfields(); | |
419 | ||
420 | if (base_redx_snw_filename == string("new").append(FREDXSNW_EXT) || | |
421 | base_redx_snw_filename == string("default").append(FREDXSNW_EXT) ) | |
422 | if (!cb_redx_snw_save_as()) return; | |
423 | ||
424 | update_header(FROM); | |
425 | buffredx_snw.assign(header("<redx_snw>")); | |
426 | make_buffredx_snw(true); | |
427 | xfr_via_socket(base_redx_snw_filename, buffredx_snw); | |
428 | ||
429 | buffredx_snw.assign(header("<redx_snw>")); | |
430 | make_buffredx_snw(false); | |
431 | write_redx_snw(def_redx_snw_filename); | |
432 | } | |
433 | ||
434 | void cb_redx_snw_load_template() | |
435 | { | |
436 | string def_redx_snw_filename = def_redx_snw_TemplateName; | |
437 | const char *p = FSEL::select( | |
438 | "Open template file", | |
439 | string("Template file\t*").append(TREDXSNW_EXT).c_str(), | |
440 | def_redx_snw_filename.c_str()); | |
441 | if (p) { | |
442 | clear_redx_snw_form(); | |
443 | read_data_file(p); | |
444 | def_redx_snw_TemplateName = p; | |
445 | show_filename(def_redx_snw_TemplateName); | |
446 | using_redx_snw_template = true; | |
447 | } | |
448 | } | |
449 | ||
450 | void cb_redx_snw_save_template() | |
451 | { | |
452 | if (!using_redx_snw_template) { | |
453 | cb_redx_snw_save_as_template(); | |
454 | return; | |
455 | } | |
456 | string def_redx_snw_filename = def_redx_snw_TemplateName; | |
457 | const char *p = FSEL::saveas( | |
458 | "Save template file", | |
459 | string("Template file\t*").append(TREDXSNW_EXT).c_str(), | |
460 | def_redx_snw_filename.c_str()); | |
461 | if (p) { | |
462 | update_header(CHANGED); | |
463 | update_redx_snwfields(); | |
464 | buffredx_snw.assign(header("<redx_snw>")); | |
465 | make_buffredx_snw(); | |
466 | write_redx_snw(p); | |
467 | } | |
468 | } | |
469 | ||
470 | void cb_redx_snw_save_as_template() | |
471 | { | |
472 | string def_redx_snw_filename = def_redx_snw_TemplateName; | |
473 | const char *p = FSEL::saveas( | |
474 | "Save as template file", | |
475 | string("Template file\t*").append(TREDXSNW_EXT).c_str(), | |
476 | def_redx_snw_filename.c_str()); | |
477 | if (p) { | |
478 | const char *pext = fl_filename_ext(p); | |
479 | def_redx_snw_TemplateName = p; | |
480 | if (strlen(pext) == 0) def_redx_snw_TemplateName.append(TREDXSNW_EXT); | |
481 | remove_spaces_from_filename(def_redx_snw_TemplateName); | |
482 | ||
483 | clear_header(); | |
484 | update_header(CHANGED); | |
485 | update_redx_snwfields(); | |
486 | buffredx_snw.assign(header("<redx_snw>")); | |
487 | make_buffredx_snw(); | |
488 | write_redx_snw(def_redx_snw_TemplateName); | |
489 | ||
490 | show_filename(def_redx_snw_TemplateName); | |
491 | using_redx_snw_template = true; | |
492 | } | |
493 | } | |
494 | ||
495 | void cb_redx_snw_open() | |
496 | { | |
497 | const char *p = FSEL::select( | |
498 | _("Open data file"), | |
499 | string("ICS-redx_snw\t*").append(FREDXSNW_EXT).c_str(), | |
500 | def_redx_snw_filename.c_str()); | |
501 | if (!p) return; | |
502 | if (strlen(p) == 0) return; | |
503 | clear_redx_snw_form(); | |
504 | read_data_file(p); | |
505 | using_redx_snw_template = false; | |
506 | def_redx_snw_filename = p; | |
507 | show_filename(def_redx_snw_filename); | |
508 | } | |
509 | ||
510 | void write_redx_snw(string s) | |
511 | { | |
512 | FILE *fileredx_snw = fopen(s.c_str(), "w"); | |
513 | if (!fileredx_snw) return; | |
514 | ||
515 | fwrite(buffredx_snw.c_str(), buffredx_snw.length(), 1, fileredx_snw); | |
516 | fclose(fileredx_snw); | |
517 | } | |
518 | ||
519 | bool cb_redx_snw_save_as() | |
520 | { | |
521 | const char *p; | |
522 | string newfilename; | |
523 | ||
524 | string name = named_file(); | |
525 | if (!name.empty()) { | |
526 | name.append(FREDXSNW_EXT); | |
527 | newfilename = ICS_msg_dir; | |
528 | newfilename.append(name); | |
529 | } else | |
530 | newfilename = def_redx_snw_filename; | |
531 | ||
532 | p = FSEL::saveas( | |
533 | _("Save data file"), | |
534 | string("ICS-redx_snw\t*").append(FREDXSNW_EXT).c_str(), | |
535 | newfilename.c_str()); | |
536 | ||
537 | if (!p) return false; | |
538 | if (strlen(p) == 0) return false; | |
539 | ||
540 | if (progStatus.sernbr_fname) update_sernbr(); | |
541 | ||
542 | const char *pext = fl_filename_ext(p); | |
543 | def_redx_snw_filename = p; | |
544 | if (strlen(pext) == 0) def_redx_snw_filename.append(FREDXSNW_EXT); | |
545 | ||
546 | remove_spaces_from_filename(def_redx_snw_filename); | |
547 | ||
548 | update_header(NEW); | |
549 | update_redx_snwfields(); | |
550 | buffredx_snw.assign(header("<redx_snw>")); | |
551 | make_buffredx_snw(); | |
552 | write_redx_snw(def_redx_snw_filename); | |
553 | ||
554 | using_redx_snw_template = false; | |
555 | show_filename(def_redx_snw_filename); | |
556 | return true; | |
557 | } | |
558 | ||
559 | void cb_redx_snw_save() | |
560 | { | |
561 | if (base_redx_snw_filename == string("new").append(FREDXSNW_EXT) || | |
562 | base_redx_snw_filename == string("default").append(FREDXSNW_EXT) || | |
563 | using_redx_snw_template == true) { | |
564 | cb_redx_snw_save_as(); | |
565 | return; | |
566 | } | |
567 | ||
568 | if (check_redx_snwfields()) update_header(CHANGED); | |
569 | update_redx_snwfields(); | |
570 | buffredx_snw.assign(header("<redx_snw>")); | |
571 | make_buffredx_snw(); | |
572 | write_redx_snw(def_redx_snw_filename); | |
573 | ||
574 | using_redx_snw_template = false; | |
575 | } | |
576 | ||
577 | void cb_redx_snw_html() | |
578 | { | |
579 | string fname_name = fl_filename_name(def_redx_snw_filename.c_str()); | |
580 | size_t p = fname_name.rfind('.'); | |
581 | if (p != string::npos) fname_name.erase(p); | |
582 | ||
583 | string redx_snw_fname = ICS_dir; | |
584 | redx_snw_fname.append(fname_name); | |
585 | redx_snw_fname.append(".html"); | |
586 | ||
587 | update_redx_snwfields(); | |
588 | string formredx_snw = redx_snw_html_template; | |
589 | ||
590 | replacestr(formredx_snw, TITLE, fname_name); | |
591 | ||
592 | string X = "X"; string SP = " "; | |
593 | TRIAD *ptriad = redx_triad; | |
594 | while (ptriad->ftype != E) { | |
595 | if (ptriad->ftype == S) | |
596 | replacestr(formredx_snw, ptriad->htmlname, *(ptriad->ps) ); | |
597 | else if (ptriad->ftype == T) { | |
598 | // change if <pre> ... </pre> is ever used for this field | |
599 | // string temp = *(ptriad->ps); | |
600 | // if (progStatus.autowordwrap) | |
601 | // temp = wordwrap(temp, progStatus.charcount); | |
602 | // replacestr(formredx_snw, ptriad->htmlname, temp); | |
603 | replacestr(formredx_snw, ptriad->htmlname, *(ptriad->ps) ); | |
604 | } else if (ptriad->ftype == B) | |
605 | replacestr(formredx_snw, ptriad->htmlname, (*(ptriad->pb) ? X : SP)); | |
606 | ptriad++; | |
607 | } | |
608 | ||
609 | FILE *fileredx_snw = fopen(redx_snw_fname.c_str(), "w"); | |
610 | fprintf(fileredx_snw,"%s", formredx_snw.c_str()); | |
611 | fclose(fileredx_snw); | |
612 | ||
613 | open_url(redx_snw_fname.c_str()); | |
614 | } | |
615 | ||
616 | void cb_snw_msg_type() | |
617 | { | |
618 | if (tabs_msg_type->value() == tab_redx_snw ) { | |
619 | show_filename(def_redx_snw_filename); | |
620 | } else { | |
621 | show_filename(def_rg_filename); | |
622 | } | |
623 | } | |
624 | ||
625 | void cb_redx_snw_textout() | |
626 | { | |
627 | string redx_snw_fname = ICS_dir; | |
628 | redx_snw_fname.append("redx_snw.txt"); | |
629 | ||
630 | update_redx_snwfields(); | |
631 | string formredx_snw = redx_snw_text_template; | |
632 | ||
633 | string X = "X"; string SP = " "; | |
634 | TRIAD *ptriad = redx_triad; | |
635 | while (ptriad->ftype != E) { | |
636 | if (ptriad->ftype == S || ptriad->ftype == T) | |
637 | replacestr(formredx_snw, ptriad->htmlname, *(ptriad->ps) ); | |
638 | else if (ptriad->ftype == B) | |
639 | replacestr(formredx_snw, ptriad->htmlname, (*(ptriad->pb) ? X : SP)); | |
640 | ptriad++; | |
641 | } | |
642 | ||
643 | FILE *fileredx_snw = fopen(redx_snw_fname.c_str(), "w"); | |
644 | fprintf(fileredx_snw,"%s", formredx_snw.c_str()); | |
645 | fclose(fileredx_snw); | |
646 | ||
647 | open_url(redx_snw_fname.c_str()); | |
648 | } | |
649 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <FL/Fl_Hold_Browser.H> | |
21 | ||
22 | #include "gettext.h" | |
23 | #include "status.h" | |
24 | #include "util.h" | |
25 | ||
26 | #include "flmsg_dialog.h" | |
27 | #include "flmsg.h" | |
28 | #include "fileselect.h" | |
29 | ||
30 | Fl_Group *tab_redx_snw = (Fl_Group *)0; | |
31 | Fl_Tabs *tab_redx_snw_type = (Fl_Tabs *)0; | |
32 | ||
33 | //---------------------------------------------------------------------- | |
34 | ||
35 | Fl_Group *tab_redx_snw_1 = (Fl_Group *)0; | |
36 | ||
37 | Fl_Input2 *snw_lname = (Fl_Input2 *)0; | |
38 | Fl_Input2 *snw_fname = (Fl_Input2 *)0; | |
39 | Fl_Input2 *snw_area1 = (Fl_Input2 *)0; | |
40 | ||
41 | Fl_Check_Button *snw_nophone = (Fl_Check_Button *)0; | |
42 | Fl_Input2 *snw_xchg1 = (Fl_Input2 *)0; | |
43 | Fl_Input2 *snw_suffix1 = (Fl_Input2 *)0; | |
44 | Fl_Input2 *snw_area2 = (Fl_Input2 *)0; | |
45 | Fl_Input2 *snw_xchg2 = (Fl_Input2 *)0; | |
46 | Fl_Input2 *snw_suffix2 = (Fl_Input2 *)0; | |
47 | Fl_Input2 *snw_area3 = (Fl_Input2 *)0; | |
48 | Fl_Input2 *snw_xchg3 = (Fl_Input2 *)0; | |
49 | Fl_Input2 *snw_suffix3 = (Fl_Input2 *)0; | |
50 | ||
51 | Fl_Input2 *snw_pdline1 = (Fl_Input2 *)0; | |
52 | Fl_Input2 *snw_pdline2 = (Fl_Input2 *)0; | |
53 | Fl_Input2 *snw_pdcity = (Fl_Input2 *)0; | |
54 | Fl_Input2 *snw_pdst = (Fl_Input2 *)0; | |
55 | Fl_Input2 *snw_pdzip = (Fl_Input2 *)0; | |
56 | Fl_Input2 *snw_haline1 = (Fl_Input2 *)0; | |
57 | Fl_Input2 *snw_haline2 = (Fl_Input2 *)0; | |
58 | Fl_Input2 *snw_hacity = (Fl_Input2 *)0; | |
59 | Fl_Input2 *snw_hast = (Fl_Input2 *)0; | |
60 | Fl_Input2 *snw_hazip = (Fl_Input2 *)0; | |
61 | ||
62 | //---------------------------------------------------------------------- | |
63 | ||
64 | Fl_Group *tab_redx_snw_2 = (Fl_Group *)0; | |
65 | ||
66 | Fl_Check_Button *snw_m1 = (Fl_Check_Button *)0; | |
67 | Fl_Check_Button *snw_m2 = (Fl_Check_Button *)0; | |
68 | Fl_Check_Button *snw_m3 = (Fl_Check_Button *)0; | |
69 | Fl_Check_Button *snw_m4 = (Fl_Check_Button *)0; | |
70 | Fl_Check_Button *snw_m5 = (Fl_Check_Button *)0; | |
71 | Fl_Check_Button *snw_m6 = (Fl_Check_Button *)0; | |
72 | Fl_Check_Button *snw_m7 = (Fl_Check_Button *)0; | |
73 | ||
74 | //---------------------------------------------------------------------- | |
75 | ||
76 | Fl_Group *tab_redx_snw_3 = (Fl_Group *)0; | |
77 | Fl_Check_Button *snw_m8 = (Fl_Check_Button *)0; | |
78 | Fl_Check_Button *snw_m9 = (Fl_Check_Button *)0; | |
79 | Fl_Check_Button *snw_m10 = (Fl_Check_Button *)0; | |
80 | Fl_Check_Button *snw_m11 = (Fl_Check_Button *)0; | |
81 | Fl_Check_Button *snw_m12 = (Fl_Check_Button *)0; | |
82 | Fl_Check_Button *snw_m13 = (Fl_Check_Button *)0; | |
83 | Fl_Check_Button *snw_m14 = (Fl_Check_Button *)0; | |
84 | ||
85 | //---------------------------------------------------------------------- | |
86 | ||
87 | Fl_Group *tab_redx_snw_4 = (Fl_Group *)0; | |
88 | Fl_Check_Button *snw_m15 = (Fl_Check_Button *)0; | |
89 | FTextEdit *snw_cmsg = (FTextEdit *)0; | |
90 | ||
91 | //---------------------------------------------------------------------- | |
92 | ||
93 | // widget callbacks & support | |
94 | ||
95 | void snw_changed() | |
96 | { | |
97 | estimate(); | |
98 | } | |
99 | ||
100 | //---------------------------------------------------------------------- | |
101 | ||
102 | void create_redx_snw() | |
103 | { | |
104 | int Y = tab_top; | |
105 | tab_redx_snw = new Fl_Group(0, Y, 570, 390); | |
106 | tab_redx_snw->align(FL_ALIGN_TOP); | |
107 | ||
108 | tab_redx_snw_type = new Fl_Tabs(0, Y, 570, 387); | |
109 | tab_redx_snw_type->selection_color((Fl_Color)246); | |
110 | ||
111 | tab_redx_snw_1 = new Fl_Group(0, Y+25, 570, 360, _("Respondee")); | |
112 | ||
113 | Y += 30; | |
114 | ||
115 | snw_lname = new Fl_Input2(100, Y, 150, 24, _("Lname")); | |
116 | snw_lname->tooltip(_("")); | |
117 | snw_lname->callback(redx_changed); | |
118 | snw_lname->when(FL_WHEN_CHANGED); | |
119 | ||
120 | snw_fname = new Fl_Input2(320, Y, 150, 24, _("Fname")); | |
121 | snw_fname->tooltip(_("")); | |
122 | snw_fname->callback(redx_changed); | |
123 | snw_fname->when(FL_WHEN_CHANGED); | |
124 | ||
125 | Y += 25; | |
126 | snw_nophone = new Fl_Check_Button(10, Y, 24, 24, _("No phone #")); | |
127 | Y += 50; | |
128 | int X = 10; | |
129 | snw_area1 = new Fl_Input2( X, Y, 50, 24, _("Phone #1")); | |
130 | snw_area1->align(FL_ALIGN_TOP_LEFT); | |
131 | snw_area1->callback(redx_changed); | |
132 | snw_area1->when(FL_WHEN_CHANGED); | |
133 | snw_area1->tooltip(_("Area code")); | |
134 | ||
135 | snw_xchg1 = new Fl_Input2( X = X+54, Y, 50, 24, ""); | |
136 | snw_xchg1->tooltip(_("exchange")); | |
137 | snw_xchg1->callback(redx_changed); | |
138 | snw_xchg1->when(FL_WHEN_CHANGED); | |
139 | ||
140 | snw_suffix1 = new Fl_Input2( X = X+54, Y, 50, 24, ""); | |
141 | snw_suffix1->tooltip(_("suffix")); | |
142 | snw_suffix1->callback(redx_changed); | |
143 | snw_suffix1->when(FL_WHEN_CHANGED); | |
144 | ||
145 | snw_area2 = new Fl_Input2( X=X+86, Y, 50, 24, _("Phone #2")); | |
146 | snw_area2->align(FL_ALIGN_TOP_LEFT); | |
147 | snw_area2->tooltip(_("Area code")); | |
148 | snw_area2->callback(redx_changed); | |
149 | snw_area2->when(FL_WHEN_CHANGED); | |
150 | ||
151 | snw_xchg2 = new Fl_Input2( X=X+54, Y, 50, 24, ""); | |
152 | snw_xchg2->tooltip(_("exchange")); | |
153 | snw_xchg2->callback(redx_changed); | |
154 | snw_xchg2->when(FL_WHEN_CHANGED); | |
155 | ||
156 | snw_suffix2 = new Fl_Input2( X=X+54, Y, 50, 24, ""); | |
157 | snw_suffix2->tooltip(_("suffix")); | |
158 | snw_suffix2->callback(redx_changed); | |
159 | snw_suffix2->when(FL_WHEN_CHANGED); | |
160 | ||
161 | snw_area3 = new Fl_Input2( X=X+86, Y, 50, 24, _("Phone #3")); | |
162 | snw_area3->align(FL_ALIGN_TOP_LEFT); | |
163 | snw_area3->tooltip(_("Area code")); | |
164 | snw_area3->callback(redx_changed); | |
165 | snw_area3->when(FL_WHEN_CHANGED); | |
166 | ||
167 | snw_xchg3 = new Fl_Input2( X=X+54, Y, 50, 24, ""); | |
168 | snw_xchg3->tooltip(_("exchange")); | |
169 | snw_xchg3->callback(redx_changed); | |
170 | snw_xchg3->when(FL_WHEN_CHANGED); | |
171 | ||
172 | snw_suffix3 = new Fl_Input2( X+54, Y, 50, 24, ""); | |
173 | snw_suffix3->tooltip(_("suffix")); | |
174 | snw_suffix3->callback(redx_changed); | |
175 | snw_suffix3->when(FL_WHEN_CHANGED); | |
176 | ||
177 | Y += 25; | |
178 | Fl_Box *bx = new Fl_Box(100, Y, 200, 24, _("Pre disaster address:")); | |
179 | bx->box(FL_FLAT_BOX); | |
180 | bx->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); | |
181 | ||
182 | Y += 25; | |
183 | snw_pdline1 = new Fl_Input2(100, Y, 400, 24, _("Addr line 1")); | |
184 | snw_pdline1->tooltip(""); | |
185 | snw_pdline1->callback(redx_changed); | |
186 | snw_pdline1->when(FL_WHEN_CHANGED); | |
187 | ||
188 | Y += 25; | |
189 | snw_pdline2 = new Fl_Input2(100, Y, 400, 24, _("Addr line 2")); | |
190 | snw_pdline2->tooltip(""); | |
191 | snw_pdline2->callback(redx_changed); | |
192 | snw_pdline2->when(FL_WHEN_CHANGED); | |
193 | ||
194 | Y += 25; | |
195 | snw_pdcity = new Fl_Input2(100, Y, 246, 24, _("City")); | |
196 | snw_pdcity->tooltip(""); | |
197 | snw_pdcity->callback(redx_changed); | |
198 | snw_pdcity->when(FL_WHEN_CHANGED); | |
199 | ||
200 | snw_pdst = new Fl_Input2(348, Y, 50, 24, ""); | |
201 | snw_pdst->tooltip(_("State")); | |
202 | snw_pdst->callback(redx_changed); | |
203 | snw_pdst->when(FL_WHEN_CHANGED); | |
204 | ||
205 | snw_pdzip = new Fl_Input2(400, Y, 100, 24, ""); | |
206 | snw_pdzip->tooltip(_("Zip")); | |
207 | snw_pdzip->callback(redx_changed); | |
208 | snw_pdzip->when(FL_WHEN_CHANGED); | |
209 | ||
210 | Y += 25; | |
211 | bx = new Fl_Box(100, Y, 200, 24, _("Current home address:")); | |
212 | bx->box(FL_FLAT_BOX); | |
213 | bx->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); | |
214 | ||
215 | Y += 25; | |
216 | snw_haline1 = new Fl_Input2(100, Y, 400, 24, _("Addr line 1")); | |
217 | snw_haline1->tooltip(""); | |
218 | snw_haline1->callback(redx_changed); | |
219 | snw_haline1->when(FL_WHEN_CHANGED); | |
220 | ||
221 | Y += 25; | |
222 | snw_haline2 = new Fl_Input2(100, Y, 400, 24, _("Addr line 2")); | |
223 | snw_haline2->tooltip(""); | |
224 | snw_haline2->callback(redx_changed); | |
225 | snw_haline2->when(FL_WHEN_CHANGED); | |
226 | ||
227 | Y += 25; | |
228 | snw_hacity = new Fl_Input2(100, Y, 246, 24, _("City")); | |
229 | snw_hacity->tooltip(""); | |
230 | snw_hacity->callback(redx_changed); | |
231 | snw_hacity->when(FL_WHEN_CHANGED); | |
232 | ||
233 | snw_hast = new Fl_Input2(348, Y, 50, 24, ""); | |
234 | snw_hast->tooltip(_("State")); | |
235 | snw_hast->callback(redx_changed); | |
236 | snw_hast->when(FL_WHEN_CHANGED); | |
237 | ||
238 | snw_hazip = new Fl_Input2(400, Y, 100, 24, ""); | |
239 | snw_hazip->tooltip(_("Zip")); | |
240 | snw_hazip->callback(redx_changed); | |
241 | snw_hazip->when(FL_WHEN_CHANGED); | |
242 | ||
243 | tab_redx_snw_1->end(); | |
244 | ||
245 | tab_redx_snw_2 = new Fl_Group(0, 95, 570, 360, _("Msgs-1")); | |
246 | Y = 140; | |
247 | snw_m1 = new Fl_Check_Button(100, Y, 24, 24, _("I am safe and well.")); | |
248 | snw_m1->callback(redx_changed); | |
249 | snw_m1->when(FL_WHEN_CHANGED); | |
250 | Y += 25; | |
251 | snw_m2 = new Fl_Check_Button(100, Y, 24, 24, _("Family and I are safe and well.")); | |
252 | snw_m2->callback(redx_changed); | |
253 | snw_m2->when(FL_WHEN_CHANGED); | |
254 | Y += 25; | |
255 | snw_m3 = new Fl_Check_Button(100, Y, 24, 24, _("Currently at shelter.")); | |
256 | snw_m3->callback(redx_changed); | |
257 | snw_m3->when(FL_WHEN_CHANGED); | |
258 | Y += 25; | |
259 | snw_m4 = new Fl_Check_Button(100, Y, 24, 24, _("Currently at home.")); | |
260 | snw_m4->callback(redx_changed); | |
261 | snw_m4->when(FL_WHEN_CHANGED); | |
262 | Y += 25; | |
263 | snw_m5 = new Fl_Check_Button(100, Y, 24, 24, _("Currently at friend / family / neighbor's.")); | |
264 | snw_m5->callback(redx_changed); | |
265 | snw_m5->when(FL_WHEN_CHANGED); | |
266 | Y += 25; | |
267 | snw_m6 = new Fl_Check_Button(100, Y, 24, 24, _("I am evacuating to the house of a family member / friend.")); | |
268 | snw_m6->callback(redx_changed); | |
269 | snw_m6->when(FL_WHEN_CHANGED); | |
270 | Y += 25; | |
271 | snw_m7 = new Fl_Check_Button(100, Y, 24, 24, _("Will make phone call when able.")); | |
272 | snw_m7->callback(redx_changed); | |
273 | snw_m7->when(FL_WHEN_CHANGED); | |
274 | ||
275 | tab_redx_snw_2->end(); | |
276 | ||
277 | tab_redx_snw_3 = new Fl_Group(0, 95, 570, 360, _("Msgs-2")); | |
278 | Y = 140; | |
279 | snw_m8 = new Fl_Check_Button(100, Y, 24, 24, _("Will email when able.")); | |
280 | snw_m8->callback(redx_changed); | |
281 | snw_m8->when(FL_WHEN_CHANGED); | |
282 | Y += 25; | |
283 | snw_m9 = new Fl_Check_Button(100, Y, 24, 24, _("Will mail letter / postcard when able.")); | |
284 | snw_m9->callback(redx_changed); | |
285 | snw_m9->when(FL_WHEN_CHANGED); | |
286 | Y += 25; | |
287 | snw_m10 = new Fl_Check_Button(100, Y, 24, 24, _("I am safe and in the process of evacuating.")); | |
288 | snw_m10->callback(redx_changed); | |
289 | snw_m10->when(FL_WHEN_CHANGED); | |
290 | Y += 25; | |
291 | snw_m11 = new Fl_Check_Button(100, Y, 24, 24, _("I have evacuated and I am safe.")); | |
292 | snw_m11->callback(redx_changed); | |
293 | snw_m11->when(FL_WHEN_CHANGED); | |
294 | Y += 25; | |
295 | snw_m12 = new Fl_Check_Button(100, Y, 24, 24, _("I am evacuating to a shelter.")); | |
296 | snw_m12->callback(redx_changed); | |
297 | snw_m12->when(FL_WHEN_CHANGED); | |
298 | Y += 25; | |
299 | snw_m13 = new Fl_Check_Button(100, Y, 24, 24, _("I am currently at a hotel.")); | |
300 | snw_m13->callback(redx_changed); | |
301 | snw_m13->when(FL_WHEN_CHANGED); | |
302 | Y += 25; | |
303 | snw_m14 = new Fl_Check_Button(100, Y, 24, 24, _("I am currently remaining at home.")); | |
304 | snw_m14->callback(redx_changed); | |
305 | snw_m14->when(FL_WHEN_CHANGED); | |
306 | ||
307 | tab_redx_snw_3->end(); | |
308 | ||
309 | Y = tab_top; | |
310 | tab_redx_snw_4 = new Fl_Group(0, Y+25, 570, 360, _("Msgs-3")); | |
311 | Y += 30; | |
312 | snw_m15 = new Fl_Check_Button(10, Y, 24, 24, _("Custom message:")); | |
313 | snw_m15->callback(redx_changed); | |
314 | snw_m15->when(FL_WHEN_CHANGED); | |
315 | Y += 25; | |
316 | snw_cmsg = new FTextEdit(10, Y, 550, 320, _("")); | |
317 | snw_cmsg->tooltip(_("Enter custom message")); | |
318 | snw_cmsg->box(FL_DOWN_FRAME); | |
319 | snw_cmsg->color((Fl_Color)FL_BACKGROUND2_COLOR); | |
320 | snw_cmsg->selection_color((Fl_Color)FL_SELECTION_COLOR); | |
321 | snw_cmsg->labeltype(FL_NORMAL_LABEL); | |
322 | snw_cmsg->labelfont(0); | |
323 | snw_cmsg->labelsize(14); | |
324 | snw_cmsg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); | |
325 | snw_cmsg->align(FL_ALIGN_TOP_LEFT); | |
326 | snw_cmsg->callback(redx_changed); | |
327 | snw_cmsg->when(FL_WHEN_CHANGED); | |
328 | ||
329 | tab_redx_snw_4->end(); | |
330 | ||
331 | tab_redx_snw->end(); | |
332 | ||
333 | tab_redx_snw->hide(); | |
334 | ||
335 | }; | |
336 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include "templates.h" | |
21 | ||
22 | const char redx_snw_html_template[] = | |
23 | "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\ | |
24 | <html><head>\ | |
25 | <meta http-equiv=\"CONTENT-TYPE\" content=\"text/html; charset=UTF-8\"><title>Red Cross Safe & Well Registry Information Sheet</title>\n\ | |
26 | <meta name=\"GENERATOR\" content=\"OpenOffice.org 3.2(Linux)\">\ | |
27 | <meta name=\"AUTHOR\" content=\"DCC\">\ | |
28 | <meta name=\"CREATED\" content=\"20110906;5060000\">\ | |
29 | <meta name=\"CHANGEDBY\" content=\"DCC\">\ | |
30 | <meta name=\"CHANGED\" content=\"20110906;5070000\">\ | |
31 | <meta name=\"Info 1\" content=\"\">\ | |
32 | <meta name=\"Info 2\" content=\"\">\ | |
33 | <meta name=\"Info 3\" content=\"\">\ | |
34 | <meta name=\"Info 4\" content=\"\">\ | |
35 | <style type=\"text/css\">\ | |
36 | <!--\ | |
37 | @page { margin-right: 0.2in; margin-top: 0.1in; margin-bottom: 0.1in }\ | |
38 | P { margin-bottom: 0.08in; direction: ltr; color: #000000; widows: 2; orphans: 2 }\ | |
39 | P.western { font-family: \"Times New Roman\", \"Serif\"; font-size: 12pt; so-language: en-US }\ | |
40 | P.cjk { font-family: \"Times New Roman\", \"Serif\"; font-size: 12pt }\ | |
41 | P.ctl { font-family: \"Times New Roman\", \"Serif\"; font-size: 12pt; so-language: ar-SA }\ | |
42 | -->\ | |
43 | </style></head><body dir=\"ltr\" lang=\"en-US\" text=\"#000000\">\ | |
44 | <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"4\" cellspacing=\"0\">\ | |
45 | <tbody>\ | |
46 | <tr align=\"center\">\ | |
47 | <td colspan=\"2\" style=\"vertical-align: top;\"><font face=\"ArialMT,Bold, sans-serif\"><font size=\"5\"><b>Red Cross Safe & Well Registry Information Sheet</b></font></font></td>\ | |
48 | </tr>\ | |
49 | <tr>\ | |
50 | <td style=\"vertical-align: top; width: 50%;\">Last Name: <big>:lname:</big><br>\ | |
51 | </td>\ | |
52 | <td style=\"vertical-align: top;\">First Name: <big>:fname:</big><br>\ | |
53 | </td>\ | |
54 | </tr>\ | |
55 | <tr>\ | |
56 | <td style=\"vertical-align: top;\"><font face=\"ArialMT, sans-serif\">Pre-disaster phone #'s; [:nophone:] no phone number recorded<br>\ | |
57 | </font></td>\ | |
58 | <td style=\"vertical-align: top;\"><big>:area1: - :xchg1: - :suffix1:</big><br>\ | |
59 | </td>\ | |
60 | </tr>\ | |
61 | <tr>\ | |
62 | <td style=\"vertical-align: top;\"><big>:area2: - :xchg2: - :suffix2:</big></td>\ | |
63 | <td style=\"vertical-align: top;\"><big>:area3: - :xchg3: - :suffix3:</big></td>\ | |
64 | </tr>\ | |
65 | <tr>\ | |
66 | <td style=\"vertical-align: top;\">Pre-disaster home address<br><big>\ | |
67 | :pdline1:<br>\ | |
68 | :pdline2:<br>\ | |
69 | :pdcity:, :pdst: :pdzip:</big><br>\ | |
70 | </td>\ | |
71 | <td style=\"vertical-align: top;\">Current home address<br><big>\ | |
72 | :haline1:<br>\ | |
73 | :haline2:<br>\ | |
74 | :hacity:, :hast: :hazip:</big><br>\ | |
75 | </td>\ | |
76 | </tr>\ | |
77 | <tr>\ | |
78 | <td colspan=\"2\" style=\"vertical-align: top; text-align: center;\"><big><span style=\"font-weight: bold;\">Safe and Well Messages</span></big><br>\ | |
79 | </td>\ | |
80 | </tr>\ | |
81 | <tr>\ | |
82 | <td style=\"vertical-align: top;\">[:m1:] I am safe and well.<br>\ | |
83 | </td>\ | |
84 | <td style=\"vertical-align: top;\">[:m8:] Will email when able.<br>\ | |
85 | </td>\ | |
86 | </tr>\ | |
87 | <tr>\ | |
88 | <td style=\"vertical-align: top;\">[:m2:] Family and I are safe and well.<br>\ | |
89 | </td>\ | |
90 | <td style=\"vertical-align: top;\">[:m9:] Will mail letter / postcard when able.<br>\ | |
91 | </td>\ | |
92 | </tr>\ | |
93 | <tr>\ | |
94 | <td style=\"vertical-align: top;\">[:m3:] Currently at shelter. <br>\ | |
95 | </td>\ | |
96 | <td style=\"vertical-align: top;\">[:m10:] I am safe and in the process of evacuating.<br>\ | |
97 | </td>\ | |
98 | </tr>\ | |
99 | <tr>\ | |
100 | <td style=\"vertical-align: top;\">[:m4:] Currently at home.<br>\ | |
101 | </td>\ | |
102 | <td style=\"vertical-align: top;\">[:m11:] I have evacuated and I am safe.<br>\ | |
103 | </td>\ | |
104 | </tr>\ | |
105 | <tr>\ | |
106 | <td style=\"vertical-align: top;\">[:m5:] Currently at friend / family / neighbor's.<br>\ | |
107 | </td>\ | |
108 | <td style=\"vertical-align: top;\">[:m12:] I am evacuating to a shelter.<br>\ | |
109 | </td>\ | |
110 | </tr>\ | |
111 | <tr>\ | |
112 | <td style=\"vertical-align: top;\">[:m6:] I am evacuating to the house of a family member / friend.<br>\ | |
113 | </td>\ | |
114 | <td style=\"vertical-align: top;\">[:m13:] I am currently at a hotel<br>\ | |
115 | </td>\ | |
116 | </tr>\ | |
117 | <tr>\ | |
118 | <td style=\"vertical-align: top;\">[:m7:] Will make phone call when able.<br>\ | |
119 | </td>\ | |
120 | <td style=\"vertical-align: top;\">[:m14:] I am currently remaining at home<br>\ | |
121 | </td>\ | |
122 | </tr>\ | |
123 | <tr>\ | |
124 | <td colspan=\"2\" style=\"vertical-align: top;\">[:m15:] Custom message<br>\ | |
125 | :cmsg:<br>\ | |
126 | </td>\ | |
127 | </tr>\ | |
128 | </tbody>\ | |
129 | </table>\ | |
130 | <br>\ | |
131 | </body></html>"; | |
132 | ||
133 | const char redx_snw_text_template[] = | |
134 | " Red Cross Safe & Well Registry Information Sheet\n\ | |
135 | \n\ | |
136 | Last Name: First Name\n\ | |
137 | :lname: :fname:\n\ | |
138 | \n\ | |
139 | Pre-disaster phone #'s\n\ | |
140 | [:nophone:] no phone number recorded\n\ | |
141 | Phone #1: :area1: - :xchg1: - :suffix1:\n\ | |
142 | Phone #2: :area2: - :xchg2: - :suffix2:\n\ | |
143 | Phone #3: :area3: - :xchg3: - :suffix3:\n\ | |
144 | \n\ | |
145 | Pre-disaster home address:\n\ | |
146 | :pdline1:\n\ | |
147 | :pdline2:\n\ | |
148 | :pdcity:, :pdst: :pdzip:\n\ | |
149 | \n\ | |
150 | Current home address:\n\ | |
151 | :haline1:\n\ | |
152 | :haline2:\n\ | |
153 | :hacity:, :hast: :hazip:\n\ | |
154 | \n\ | |
155 | Safe and Well Messages\n\ | |
156 | \n\ | |
157 | [:m1:] I am safe and well.\n\ | |
158 | [:m2:] Family and I are safe and well.\n\ | |
159 | [:m3:] Currently at shelter.\n\ | |
160 | [:m4:] Currently at home.\n\ | |
161 | [:m5:] Currently at friend / family / neighbor's.\n\ | |
162 | [:m6:] I am evacuating to the house of a family member / friend.\n\ | |
163 | [:m7:] Will make phone call when able.\n\ | |
164 | [:m8:] Will email when able.\n\ | |
165 | [:m9:] Will mail letter / postcard when able.\n\ | |
166 | [:m10:] I am safe and in the process of evacuating.\n\ | |
167 | [:m11:] I have evacuated and I am safe.\n\ | |
168 | [:m12:] I am evacuating to a shelter.\n\ | |
169 | [:m13:] I am currently at a hotel.\n\ | |
170 | [:m14:] I am currently remaining at home.\n\ | |
171 | [:m15:] Custom message :\n\ | |
172 | :cmsg:\n"; | |
173 | ||
174 |
0 | // ---------------------------------------------------------------------------- | |
1 | // Copyright (C) 2014 | |
2 | // David Freese, W1HKJ | |
3 | // | |
4 | // This file is part of flmsg | |
5 | // | |
6 | // flrig is free software; you can redistribute it and/or modify | |
7 | // it under the terms of the GNU General Public License as published by | |
8 | // the Free Software Foundation; either version 3 of the License, or | |
9 | // (at your option) any later version. | |
10 | // | |
11 | // flrig is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | // | |
16 | // You should have received a copy of the GNU General Public License | |
17 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #include <FL/Fl_Hold_Browser.H> | |
21 | ||
22 | #include "gettext.h" | |
23 | #include "status.h" | |
24 | #include "util.h" | |
25 | ||
26 | #include "flmsg_dialog.h" | |
27 | #include "flmsg.h" | |
28 | ||
29 | Fl_Group *tab_redx = (Fl_Group *)0; | |
30 | Fl_Tabs *tab_redx_type = (Fl_Tabs *)0; | |
31 | ||
32 | void redx_changed(Fl_Widget *, void *) | |
33 | { | |
34 | estimate(); | |
35 | } | |
36 | ||
37 | void create_redx_tab() | |
38 | { | |
39 | create_redx_snw(); | |
40 | create_redx_5739(); | |
41 | create_redx_5739A(); | |
42 | create_redx_5739B(); | |
43 | } | |
44 |
973 | 973 | #else |
974 | 974 | static pid_t start_process(const char *interp, const char *cmd, const char *env, |
975 | 975 | const char *envp[], const char *dir, sock_t sock) { |
976 | char buf[500]; | |
976 | char buf[8192]; | |
977 | 977 | pid_t pid = fork(); |
978 | 978 | (void) env; |
979 | 979 | |
996 | 996 | } else { |
997 | 997 | execle(interp, interp, cmd, NULL, envp); |
998 | 998 | } |
999 | snprintf(buf, sizeof(buf), "Status: 500\r\n\r\n" | |
1000 | "500 Server Error: %s%s%s: %s", interp == NULL ? "" : interp, | |
1001 | interp == NULL ? "" : " ", cmd, strerror(errno)); | |
999 | memset(buf, 0, sizeof(buf)); | |
1000 | snprintf(buf, sizeof(buf), "Server Error: %s %s: %s", (interp == NULL ? "" : interp), cmd, strerror(errno)); | |
1002 | 1001 | send(1, buf, strlen(buf), 0); |
1003 | 1002 | exit(EXIT_FAILURE); // exec call failed |
1004 | 1003 | } |
32 | 32 | status progStatus = { |
33 | 33 | 50, // int mainX; |
34 | 34 | 50, // int mainY; |
35 | 570, // int mainW; | |
36 | 492, // int mainH; | |
35 | 37 | |
36 | 38 | 5, // int wpl; |
37 | 39 | false, // bool open_on_export; |
97 | 99 | |
98 | 100 | int mX = mainwindow->x(); |
99 | 101 | int mY = mainwindow->y(); |
102 | int mW = expert_dialog->w(); | |
103 | int mH = expert_dialog->h(); | |
104 | ||
100 | 105 | if (mX >= 0 && mX >= 0) { |
101 | 106 | mainX = mX; |
102 | 107 | mainY = mY; |
106 | 111 | flmsgpref.set("version", PACKAGE_VERSION); |
107 | 112 | flmsgpref.set("mainx", mX); |
108 | 113 | flmsgpref.set("mainy", mY); |
114 | flmsgpref.set("expertW", mW); | |
115 | flmsgpref.set("expertH", mH); | |
109 | 116 | |
110 | 117 | flmsgpref.set("wpl", wpl); |
111 | 118 | flmsgpref.set("open_on_export", open_on_export); |
188 | 195 | flmsgpref.get("mainx", mainX, mainX); |
189 | 196 | flmsgpref.get("mainy", mainY, mainY); |
190 | 197 | |
198 | flmsgpref.get("expertW", expertW, expertW); | |
199 | flmsgpref.get("expertH", expertH, expertH); | |
200 | ||
191 | 201 | flmsgpref.get("wpl", wpl, wpl); |
192 | 202 | if (flmsgpref.get("open_on_export", i, i)) open_on_export = i; |
193 | 203 |
30 | 30 | #include <errno.h> |
31 | 31 | #include "threads.h" |
32 | 32 | |
33 | THREAD_ID_TYPE thread_id_; | |
34 | ||
35 | 33 | #include "timeops.h" |
36 | ||
37 | #ifndef __WIN32__ | |
38 | #if !HAVE_SEM_TIMEDWAIT | |
39 | # include <semaphore.h> | |
40 | # include <time.h> | |
41 | # include <errno.h> | |
42 | # include <unistd.h> | |
43 | int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout) | |
44 | { | |
45 | int r; | |
46 | ||
47 | for (;;) { | |
48 | r = sem_trywait(sem); | |
49 | if (r == 0 || (r == -1 && errno != EAGAIN)) | |
50 | return r; | |
51 | ||
52 | if (abs_timeout->tv_nsec < 0 || abs_timeout->tv_nsec >= 1000000000L) { | |
53 | errno = EINVAL; | |
54 | return -1; | |
55 | } | |
56 | ||
57 | struct timespec now; | |
58 | clock_gettime(CLOCK_REALTIME, &now); | |
59 | if (now == *abs_timeout || now > *abs_timeout) { | |
60 | errno = ETIMEDOUT; | |
61 | return -1; | |
62 | } | |
63 | ||
64 | usleep(100); | |
65 | } | |
66 | } | |
67 | #endif // !HAVE_SEM_TIMEDWAIT | |
68 | #endif // __WIN32__ | |
69 | ||
70 | int sem_timedwait_rel(sem_t* sem, double rel_timeout) | |
71 | { | |
72 | struct timespec t; | |
73 | clock_gettime(CLOCK_REALTIME, &t); | |
74 | t = t + rel_timeout; | |
75 | ||
76 | return sem_timedwait(sem, &t); | |
77 | } | |
78 | ||
79 | int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout) | |
80 | { | |
81 | struct timespec t; | |
82 | clock_gettime(CLOCK_REALTIME, &t); | |
83 | t = t + rel_timeout; | |
84 | ||
85 | return pthread_cond_timedwait(cond, mutex, &t); | |
86 | } | |
87 | ||
88 | #ifndef NDEBUG | |
89 | bool thread_in_list(int id, const int* list) | |
90 | { | |
91 | while (*list != INVALID_TID) | |
92 | if (id == *list++) | |
93 | return true; | |
94 | return false; | |
95 | } | |
96 | #endif | |
97 | ||
98 | #ifdef __linux__ | |
99 | # ifndef _GNU_SOURCE | |
100 | # define _GNU_SOURCE | |
101 | # endif | |
102 | # include <unistd.h> | |
103 | # include <sys/syscall.h> | |
104 | # include "debug.h" | |
105 | void linux_log_tid(void) | |
106 | { | |
107 | LOG_DEBUG(PACKAGE_TARNAME " thread %" PRIdPTR " is LWP %ld", GET_THREAD_ID(), syscall(SYS_gettid)); | |
108 | } | |
109 | #endif | |
110 | ||
111 | // Synchronization objects. | |
112 | 34 | |
113 | 35 | guard_lock::guard_lock(pthread_mutex_t* m) : mutex(m) |
114 | 36 | { |
120 | 42 | pthread_mutex_unlock(mutex); |
121 | 43 | } |
122 | 44 | |
123 | syncobj::syncobj() | |
124 | { | |
125 | pthread_mutex_init( & m_mutex, NULL ); | |
126 | pthread_cond_init( & m_cond, NULL ); | |
127 | } | |
128 | ||
129 | syncobj::~syncobj() | |
130 | { | |
131 | pthread_mutex_destroy( & m_mutex ); | |
132 | pthread_cond_destroy( & m_cond ); | |
133 | } | |
134 | ||
135 | void syncobj::signal() | |
136 | { | |
137 | int rc = pthread_cond_signal( &m_cond ); | |
138 | if( rc ) | |
139 | { | |
140 | throw std::runtime_error(strerror(rc)); | |
141 | } | |
142 | } | |
143 | ||
144 | bool syncobj::wait( double seconds ) | |
145 | { | |
146 | int rc = pthread_cond_timedwait_rel( &m_cond, &m_mutex, seconds ); | |
147 | switch( rc ) | |
148 | { | |
149 | case 0 : return true ; | |
150 | default : throw std::runtime_error(strerror(rc)); | |
151 | case ETIMEDOUT: return false ; | |
152 | } | |
153 | } | |
154 | ||
155 | ||
156 |
1375 | 1375 | } |
1376 | 1376 | }, |
1377 | 1377 | { |
1378 | (char *) "Olivia-4-500", 1.0, 2.568000, | |
1378 | (char *) "OLIVIA-4/500", 1.0, 2.568000, | |
1379 | 1379 | { |
1380 | 1380 | 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, |
1381 | 1381 | 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, |
1412 | 1412 | } |
1413 | 1413 | }, |
1414 | 1414 | { |
1415 | (char *) "Olivia-8-250", 1.0, 3.446000, | |
1415 | (char *) "OLIVIA-8/250", 1.0, 3.446000, | |
1416 | 1416 | { |
1417 | 1417 | 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, |
1418 | 1418 | 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, |
1449 | 1449 | } |
1450 | 1450 | }, |
1451 | 1451 | { |
1452 | (char *) "Olivia-8-500", 1.0, 2.748000, | |
1452 | (char *) "OLIVIA-8/500", 1.0, 2.748000, | |
1453 | 1453 | { |
1454 | 1454 | 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, |
1455 | 1455 | 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, |
1486 | 1486 | } |
1487 | 1487 | }, |
1488 | 1488 | { |
1489 | (char *) "Olivia-8-1K", 1.0, 2.398000, | |
1489 | (char *) "OLIVIA-8/1K", 1.0, 2.398000, | |
1490 | 1490 | { |
1491 | 1491 | 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, |
1492 | 1492 | 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, |
1523 | 1523 | } |
1524 | 1524 | }, |
1525 | 1525 | { |
1526 | (char *) "Olivia-16-500", 1.0, 4.128000, | |
1526 | (char *) "OLIVIA-16/500", 1.0, 4.128000, | |
1527 | 1527 | { |
1528 | 1528 | 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, |
1529 | 1529 | 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, |
1560 | 1560 | } |
1561 | 1561 | }, |
1562 | 1562 | { |
1563 | (char *) "Olivia-16-1K", 1.0, 3.088000, | |
1563 | (char *) "OLIVIA-16/1K", 1.0, 3.088000, | |
1564 | 1564 | { |
1565 | 1565 | 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, |
1566 | 1566 | 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, |
1597 | 1597 | } |
1598 | 1598 | }, |
1599 | 1599 | { |
1600 | (char *) "Olivia-32-1K", 1.0, 4.812000, | |
1600 | (char *) "OLIVIA-32/1K", 1.0, 4.812000, | |
1601 | 1601 | { |
1602 | 1602 | 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, |
1603 | 1603 | 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, |
1634 | 1634 | } |
1635 | 1635 | }, |
1636 | 1636 | { |
1637 | (char *) "Olivia-64-2K", 1.0, 4.812000, | |
1637 | (char *) "OLIVIA-64/2K", 1.0, 4.812000, | |
1638 | 1638 | { |
1639 | 1639 | 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, |
1640 | 1640 | 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, |
32 | 32 | #if !HAVE_CLOCK_GETTIME |
33 | 33 | # ifdef __APPLE__ |
34 | 34 | # include <mach/mach_time.h> |
35 | # define CLOCK_REALTIME 0 | |
36 | # define CLOCK_MONOTONIC 6 | |
35 | 37 | # endif |
36 | 38 | # if TIME_WITH_SYS_TIME |
37 | 39 | # include <sys/time.h> |
39 | 41 | # include <errno.h> |
40 | 42 | # include "util.h" |
41 | 43 | |
42 | int clock_gettime(clockid_t clock_id, struct timespec* tp) | |
44 | int clock_gettime(clock_id_t clock_id, struct timespec* tp) | |
43 | 45 | { |
44 | 46 | if (clock_id == CLOCK_REALTIME) { |
45 | 47 | struct timeval t; |
66 | 66 | |
67 | 67 | static const char* main_get_txid = "main.get_txid"; |
68 | 68 | static const char* main_set_txid = "main.set_txid"; // 0 or 1 |
69 | //static const char* main_toggle_txid = "main.toggle_txid"; | |
70 | ||
71 | 69 | static const char* main_get_rsid = "main.get_rsid"; |
72 | 70 | static const char* main_set_rsid = "main.set_rsid"; // 0 or 1 |
73 | //static const char* main_toggle_rsid = "main.toggle_rsid"; | |
71 | ||
72 | static const char* fldigi_version = "fldigi.version"; | |
74 | 73 | |
75 | 74 | static const char* modem_set_by_name = "modem.set_by_name"; |
76 | 75 | |
99 | 98 | |
100 | 99 | void close_xmlrpc() |
101 | 100 | { |
102 | pthread_mutex_lock(&mutex_xmlrpc); | |
101 | guard_lock gl(&mutex_xmlrpc); | |
103 | 102 | delete client; |
104 | 103 | client = NULL; |
105 | 104 | |
106 | 105 | exit_xmlrpc_flag = true; |
107 | 106 | |
108 | 107 | pthread_mutex_unlock(&mutex_xmlrpc); |
109 | pthread_join(*xmlrpc_thread, 0); | |
110 | 108 | } |
111 | 109 | |
112 | 110 | |
121 | 119 | |
122 | 120 | void xfr_via_xmlrpc(string s) |
123 | 121 | { |
122 | if (!fldigi_online) return; | |
123 | ||
124 | 124 | guard_lock xfr_lock(&mutex_xmlrpc); |
125 | 125 | XmlRpcValue res; |
126 | 126 | XmlRpcValue query; |
135 | 135 | |
136 | 136 | void set_fldigi_txid(bool on_off) |
137 | 137 | { |
138 | if (!fldigi_online) return; | |
139 | ||
138 | 140 | guard_lock xfr_lock(&mutex_xmlrpc); |
139 | 141 | XmlRpcValue res; |
140 | 142 | XmlRpcValue val = on_off; |
147 | 149 | |
148 | 150 | void set_fldigi_rxid(bool on_off) |
149 | 151 | { |
152 | if (!fldigi_online) return; | |
153 | ||
150 | 154 | guard_lock xfr_lock(&mutex_xmlrpc); |
151 | 155 | XmlRpcValue res; |
152 | 156 | XmlRpcValue val = on_off; |
162 | 166 | |
163 | 167 | void get_fldigi_txid() |
164 | 168 | { |
169 | if (!fldigi_online) return; | |
170 | ||
165 | 171 | guard_lock xfr_lock(&mutex_xmlrpc); |
166 | 172 | XmlRpcValue res; |
167 | 173 | XmlRpcValue val; |
175 | 181 | |
176 | 182 | void get_fldigi_rxid() |
177 | 183 | { |
184 | if (!fldigi_online) return; | |
185 | ||
178 | 186 | guard_lock xfr_lock(&mutex_xmlrpc); |
179 | 187 | XmlRpcValue res; |
180 | 188 | XmlRpcValue val; |
203 | 211 | |
204 | 212 | void send_new_modem() |
205 | 213 | { |
206 | pthread_mutex_lock(&mutex_xmlrpc); | |
214 | if (!fldigi_online) return; | |
215 | ||
216 | guard_lock gl(&mutex_xmlrpc); | |
207 | 217 | try { |
208 | 218 | XmlRpcValue mode(cbo_modes->value()), res; |
209 | 219 | execute(modem_set_by_name, mode, res); |
210 | 220 | } catch (const XmlRpc::XmlRpcException& e) { |
211 | 221 | LOG_ERROR("%s", e.getMessage().c_str()); |
212 | 222 | } |
213 | pthread_mutex_unlock(&mutex_xmlrpc); | |
214 | 223 | } |
215 | 224 | |
216 | 225 | void enable_arq(void) |
217 | 226 | { |
218 | pthread_mutex_lock(&mutex_xmlrpc); | |
227 | if (!fldigi_online) return; | |
228 | ||
229 | guard_lock gl(&mutex_xmlrpc); | |
219 | 230 | try { |
220 | 231 | XmlRpcValue res; |
221 | 232 | execute(io_enable_arq, 0, res); |
222 | 233 | } catch (const XmlRpc::XmlRpcException& e) { |
223 | 234 | LOG_ERROR("%s", e.getMessage().c_str()); |
224 | 235 | } |
225 | pthread_mutex_unlock(&mutex_xmlrpc); | |
226 | 236 | } |
227 | 237 | |
228 | 238 | static void flmsg_online(void) |
229 | 239 | { |
240 | if (!fldigi_online) return; | |
241 | ||
230 | 242 | try { |
231 | 243 | XmlRpcValue res; |
232 | 244 | execute(main_fldigi_online, 0, res); |
247 | 259 | XmlRpcValue query; |
248 | 260 | static string response; |
249 | 261 | |
250 | pthread_mutex_lock(&mutex_xmlrpc); | |
262 | guard_lock gl(&mutex_xmlrpc); | |
251 | 263 | try { |
252 | 264 | execute(io_in_use, query, status); |
253 | 265 | string resp = status; |
254 | 266 | response = resp; |
255 | 267 | } catch (const XmlRpc::XmlRpcException& e) { |
256 | 268 | } |
257 | pthread_mutex_unlock(&mutex_xmlrpc); | |
258 | 269 | |
259 | 270 | return response; |
260 | 271 | } |
271 | 282 | |
272 | 283 | static void get_fldigi_modem() |
273 | 284 | { |
285 | if (!fldigi_online) return; | |
286 | ||
274 | 287 | XmlRpcValue status; |
275 | 288 | XmlRpcValue query; |
276 | 289 | static string response; |
288 | 301 | |
289 | 302 | std::string xml_get_rx_chars() |
290 | 303 | { |
304 | if (!fldigi_online) return ""; | |
305 | ||
291 | 306 | XmlRpcValue rxdata; |
292 | 307 | XmlRpcValue query; |
293 | 308 | static string buffer; |
309 | 324 | |
310 | 325 | void xml_send_tx_chars(std::string s) |
311 | 326 | { |
327 | if (!fldigi_online) return; | |
328 | ||
312 | 329 | if (s.empty()) return; |
313 | 330 | |
314 | 331 | string sendstr = "\n"; |
328 | 345 | |
329 | 346 | bool fldigi_OK_to_transmit() |
330 | 347 | { |
348 | if (!fldigi_online) return false; | |
349 | ||
331 | 350 | guard_lock xmllock(&mutex_xmlrpc); |
332 | 351 | XmlRpcValue res; |
333 | 352 | XmlRpcValue query; |
365 | 384 | return ""; |
366 | 385 | } |
367 | 386 | |
368 | static void get_fldigi_modems() | |
387 | static void get_fldigi_version() | |
369 | 388 | { |
370 | 389 | XmlRpcValue status, query; |
371 | 390 | try { |
372 | string flmsg_modes(""); | |
373 | execute(modem_get_names, query, status); | |
374 | for (int i = 0; i < status.size(); i++) { | |
375 | flmsg_modes.append((std::string)status[i]).append("|"); | |
376 | } | |
377 | update_cbo_modes(flmsg_modes); | |
378 | fldigi_online = true; | |
391 | execute(fldigi_version, query, status); | |
392 | string version = status; | |
393 | if (!version.empty()) fldigi_online = true; | |
379 | 394 | } catch (...) { |
380 | 395 | LOG_ERROR("%s", xmlcall.c_str()); |
381 | 396 | throw; |
382 | 397 | } |
383 | 398 | } |
384 | 399 | |
400 | static string flmsg_modems = ""; | |
401 | ||
402 | static void get_fldigi_modems() | |
403 | { | |
404 | XmlRpcValue status, query; | |
405 | try { | |
406 | execute(modem_get_names, query, status); | |
407 | for (int i = 0; i < status.size(); i++) { | |
408 | flmsg_modems.append((std::string)status[i]).append("|"); | |
409 | } | |
410 | update_cbo_modes(flmsg_modems); | |
411 | } catch (...) { | |
412 | LOG_ERROR("%s", xmlcall.c_str()); | |
413 | throw; | |
414 | } | |
415 | } | |
416 | ||
385 | 417 | string auto_msg; |
386 | 418 | |
387 | 419 | void process_autosend(void *) |
392 | 424 | |
393 | 425 | static void check_for_autosend() |
394 | 426 | { |
427 | if (!fldigi_online) return; | |
428 | ||
395 | 429 | XmlRpcValue resp; |
396 | 430 | XmlRpcValue query; |
397 | 431 | try { |
411 | 445 | void * xmlrpc_loop(void *d) |
412 | 446 | { |
413 | 447 | fldigi_online = false; |
414 | ||
415 | 448 | exit_xmlrpc_flag = false; |
449 | flmsg_modems.clear(); | |
416 | 450 | |
417 | 451 | while(!exit_xmlrpc_flag) { |
418 | MilliSleep(update_interval); | |
419 | 452 | try { |
420 | guard_lock lock(&mutex_xmlrpc); | |
421 | 453 | if (client) { |
422 | { | |
454 | if (!fldigi_online) get_fldigi_version(); | |
455 | else { | |
456 | if (flmsg_modems.empty()) { | |
457 | get_fldigi_rxid(); | |
458 | get_fldigi_txid(); | |
459 | get_fldigi_modems(); | |
460 | } | |
423 | 461 | flmsg_online(); |
424 | if (!fldigi_online) { | |
425 | get_fldigi_modems(); | |
426 | } else { | |
427 | get_fldigi_modem(); | |
428 | check_for_autosend(); | |
429 | } | |
462 | get_fldigi_modem(); | |
463 | check_for_autosend(); | |
430 | 464 | } |
431 | 465 | } |
432 | 466 | } catch (const XmlRpc::XmlRpcException& e) { |
433 | 467 | LOG_DEBUG("%s", e.getMessage().c_str()); |
434 | 468 | fldigi_online = false; |
435 | 469 | } |
470 | MilliSleep(update_interval); | |
436 | 471 | } |
437 | 472 | return NULL; |
438 | 473 | } |
113 | 113 | |
114 | 114 | for (i=dow; i<(dim+dow); i++) |
115 | 115 | { |
116 | char t[8]; | |
116 | char t[12]; | |
117 | 117 | snprintf (t, sizeof(t), "%d", (i-dow+1)); |
118 | 118 | days[i]->label (strdup(t)); |
119 | 119 | days[i]->color (52); |
267 | 267 | |
268 | 268 | for (i=dow; i<(dim+dow); i++) |
269 | 269 | { |
270 | char t[8]; | |
270 | char t[12]; | |
271 | 271 | snprintf (t, sizeof(t), "%d", (i-dow+1)); |
272 | 272 | days[i]->label (strdup(t)); |
273 | 273 | } |
190 | 190 | void Fl_PopBrowser::pophide () |
191 | 191 | { |
192 | 192 | hide (); |
193 | ||
194 | parentWindow->damage(FL_DAMAGE_ALL); | |
195 | parentWindow->redraw(); | |
196 | ||
197 | 193 | Fl::grab(0); |
198 | 194 | Fl::focus(((Fl_ComboBox*)parent())->btn); |
199 | 195 | } |
25 | 25 | #include <ostream> |
26 | 26 | #include <stdlib.h> |
27 | 27 | #include <stdio.h> |
28 | ||
28 | #include <string.h> | |
29 | 29 | |
30 | 30 | namespace XmlRpc { |
31 | ||
32 | 31 | |
33 | 32 | static const char VALUE_TAG[] = "value"; |
34 | 33 | static const char NIL_TAG[] = "nil"; |
484 | 483 | std::string XmlRpcValue::timeToXml() const |
485 | 484 | { |
486 | 485 | struct tm* t = _value.asTime; |
487 | char buf[20]; | |
486 | char buf[50]; | |
487 | unsigned int yr = 1900 + t->tm_year; | |
488 | unsigned char mon = 1 + t->tm_mon; | |
489 | unsigned char day = t->tm_mday; | |
490 | unsigned char hr = t->tm_hour; | |
491 | unsigned char min = t->tm_min; | |
492 | unsigned char sec = t->tm_sec; | |
493 | memset(buf, 0, sizeof(buf)); | |
488 | 494 | snprintf(buf, sizeof(buf)-1, "%04d%02d%02dT%02d:%02d:%02d", |
489 | 1900+t->tm_year,1+t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); | |
490 | buf[sizeof(buf)-1] = 0; | |
495 | yr, mon, day, hr, min, sec); | |
491 | 496 | |
492 | 497 | return std::string("<value><dateTime.iso8601>") + buf + std::string("</dateTime.iso8601></value>"); |
493 | 498 | } |