1 // ----------------------------------------------------------------------------
2 // Copyright (C) 2014
3 //              David Freese, W1HKJ
4 //
5 // This file is part of flmsg
6 //
7 // flrig is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // flrig is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 // ----------------------------------------------------------------------------
20 
21 #ifndef FLMSG_H
22 #define FLMSG_H
23 
24 #include <string>
25 #include <FL/Fl.H>
26 #include <FL/Enumerations.H>
27 #include <FL/Fl_Window.H>
28 #include <FL/Fl_Double_Window.H>
29 
30 #include "arl_msgs.h"
31 #include "hx_msgs.h"
32 #include "crc16.h"
33 #include "threads.h"
34 
35 #define DEBUG 0
36 
37 using namespace std;
38 
39 enum MSGTYPE { NONE,
40 ICS203, ICS205, ICS205A, ICS206, ICS213, ICS214, ICS216, ICS309, NETLOG,
41 HICS203, HICS206, HICS213, HICS214, IARU,
42 RADIOGRAM, PLAINTEXT, BLANK, CSV, CUSTOM,
43 MARSDAILY, MARSINEEI, MARSNET, MARSARMY, MARSNAVY,
44 WXHC, SEVEREWX, STORMREP, CAP105, CAP110, TRANSFER, CUSTOM_TRANSFER };
45 
46 struct FIELD { string f_type; string f_data; void **w; char w_type; };
47 extern FIELD fields[];
48 extern FIELD ptfields[];
49 extern FIELD rgfields[];
50 
51 extern int selected_form;
52 
53 extern void checkdirectories(void);
54 extern int parse_args(int argc, char **argv, int& idx);
55 extern void showoptions();
56 
57 extern Fl_Double_Window *mainwindow;
58 extern Fl_Double_Window *expert_dialog;
59 extern Fl_Double_Window *tyro_dialog;
60 
61 extern Fl_Double_Window *optionswindow;
62 extern Fl_Double_Window *arlwindow;
63 extern Fl_Double_Window *config_files_window;
64 extern Fl_Double_Window *hxwindow;
65 extern Fl_Double_Window *header_window;
66 extern Fl_Double_Window *time_estimate_window;
67 extern Fl_Double_Window *socket_window;
68 extern string flmsgHomeDir;
69 extern string IcsHomeDir;
70 
71 extern bool printme;
72 extern bool update_custom;
73 //extern bool flmsg_editor;
74 
75 extern int arl_nbr;
76 
77 extern string FLMSG_dir;
78 extern string ARQ_dir;
79 extern string ARQ_files_dir;
80 extern string ARQ_recv_dir;
81 extern string ARQ_send_dir;
82 extern string WRAP_dir;
83 extern string WRAP_recv_dir;
84 extern string WRAP_send_dir;
85 extern string WRAP_auto_dir;
86 extern string ICS_dir;
87 extern string ICS_msg_dir;
88 extern string ICS_tmp_dir;
89 extern string CSV_dir;
90 extern string CUSTOM_dir;
91 extern string FLMSG_custom_dir;
92 extern string XFR_dir;
93 extern string FLMSG_temp_dir;
94 extern string FLMSG_log_dir;
95 
96 extern string title;
97 extern string buffer;
98 
99 extern string evalstr;
100 
101 extern char *named_file();
102 
103 extern pthread_t *xmlrpc_thread;
104 extern pthread_mutex_t mutex_xmlrpc;
105 
106 //menu callbacks
107 extern void cb_new();
108 extern void cb_open();
109 extern void cb_save();
110 extern void cb_save_as();
111 extern void cb_text();
112 extern void cb_import();
113 extern void cb_export();
114 extern void cb_wrap_import();
115 extern void wrap_import(const char *fname);
116 extern void cb_wrap_export();
117 extern void cb_wrap_autosend();
118 extern void cb_exit();
119 extern void cb_load_template();
120 extern void cb_save_template();
121 extern void cb_save_as_template();
122 extern void cb_config_files();
123 extern void cb_config_date_time();
124 extern void cb_config_personal();
125 extern void cb_config_radiogram();
126 extern void cb_config_socket();
127 extern void cb_config_arq();
128 extern void cb_config_UI();
129 extern void showoptions();
130 extern void show_help();
131 extern void custom_download();
132 extern void cb_About();
133 extern void cb_html();
134 extern void cb_html_fcopy();
135 extern void cb_folders();
136 
137 extern void open_url(const char* url, int folder = 0);
138 
139 extern void cb_arl();
140 extern void cb_arl_cancel();
141 extern void cb_arl_add();
142 
143 extern void cb_hx();
144 extern void cb_hx_select();
145 extern void cb_hx_select_add();
146 extern void cb_hx_select_cancel();
147 extern void cb_hx_select_ok();
148 
149 extern void closeoptions();
150 
151 extern void remove_spaces_from_filename(string &fname);
152 extern char *szTime(int typ = 0);
153 extern char *szDate(int df = -1);
154 extern char *szAbbrevDate();
155 extern char *szDateTime();
156 extern char *szMarsDateTime();
157 extern char *szCAPDateTime();
158 
159 extern void set_main_label();
160 extern void show_filename(string);
161 extern void clear_fields();
162 extern void update_fields();
163 
164 extern void to_html(string &s);
165 extern void fm_html(string &html);
166 
167 extern void drop_box_changed();
168 
169 extern int eval_transfer_size();
170 
171 extern void extract_text(string &buffer, const char *fname);
172 
173 // used by all form management
174 
175 extern string lineout( string &, string & );
176 extern string binout( string &, bool & );
177 
178 extern string hdr_from;
179 extern string hdr_edit;
180 
181 extern void clear_header();
182 extern string header(const char *);
183 extern void read_header(string &str);
184 enum hdr_reason {NEW, CHANGED, FROM};
185 extern void update_header(hdr_reason sender = NEW);
186 
187 extern string findstr(string &, string &);
188 extern bool   findbin(string &, string &);
189 extern void   replacestr(string &form, string &where, string &what);
190 extern void   replacelf(string &form, int n = 0);
191 extern void   striplf(string &);
192 
193 extern void   update_sernbr();
194 
195 extern void print_and_exit();
196 
197 // ham_form
198 extern void hamform_changed(Fl_Widget *, void*);
199 
200 // ics
201 extern void ics_changed(Fl_Widget *, void *);
202 
203 // ics205
204 extern string base_205_filename;
205 extern string def_205_filename;
206 extern string def_205_TemplateName;
207 extern bool using_ics205_template;
208 
209 extern void cb_205_SetDateTime1();
210 extern void cb_205_SetDateTime2();
211 extern void cb_205_SetDateTime3();
212 extern void clear_205fields();
213 extern void update_205fields();
214 extern void clear_205_form();
215 extern string find(string haystack, string needle);
216 extern void read_205_buffer(string data);
217 extern void cb_205_new();
218 extern void cb_205_import();
219 extern void cb_205_export();
220 extern void cb_205_wrap_import(string wrapfilename, string inpbuffer);
221 extern void cb_205_wrap_export();
222 extern void cb_205_wrap_autosend();
223 extern void cb_205_load_template();
224 extern void cb_205_save_template();
225 extern void cb_205_save_as_template();
226 extern void cb_205_open();
227 extern void write_205(string s);
228 extern bool cb_205_save_as();
229 extern void cb_205_save();
230 extern void cb_205_html();
231 extern void cb_205_msg_type();
232 extern void cb_205_textout();
233 extern int  eval_205_fsize();
234 
235 // ics205a
236 extern string base_205a_filename;
237 extern string def_205a_filename;
238 extern string def_205a_TemplateName;
239 extern bool using_ics205a_template;
240 
241 extern void cb_205a_set_date_fm();
242 extern void cb_205a_set_time_fm();
243 extern void cb_205a_set_date_to();
244 extern void cb_205a_set_time_to();
245 extern void clear_205afields();
246 extern void update_205afields();
247 extern void update_205aform();
248 extern void clear_205a_form();
249 extern void read_205a_buffer(string data);
250 extern void cb_205a_new();
251 extern void cb_205a_import();
252 extern void cb_205a_export();
253 extern void cb_205a_wrap_import(string wrapfilename, string inpbuffer);
254 extern void cb_205a_wrap_export();
255 extern void cb_205a_wrap_autosend();
256 extern void cb_205a_load_template();
257 extern void cb_205a_save_template();
258 extern void cb_205a_save_as_template();
259 extern void cb_205a_open();
260 extern void write_205a(string s);
261 extern bool cb_205a_save_as();
262 extern void cb_205a_save();
263 extern void cb_205a_html();
264 extern void cb_205a_msg_type();
265 extern void cb_205a_textout();
266 extern int  eval_205a_fsize();
267 
268 // ics203
269 extern string yes;
270 extern string no;
271 
272 extern string buff203;
273 extern string def_203_filename;
274 extern string base_203_filename;
275 extern string def_203_TemplateName;
276 extern bool  using_203_template;
277 
278 extern void cb_203_set_date();
279 extern void cb_203_set_time();
280 extern void clear_203fields();
281 extern void update_203fields();
282 extern void clear_203_form();
283 extern void read_203_buffer(string data);
284 extern void cb_203_new();
285 extern void cb_203_import();
286 extern void cb_203_export();
287 extern void cb_203_wrap_import(string wrapfilename, string inpbuffer);
288 extern void cb_203_wrap_export();
289 extern void cb_203_wrap_autosend();
290 extern void cb_203_load_template();
291 extern void cb_203_save_template();
292 extern void cb_203_save_as_template();
293 extern void cb_203_open();
294 extern void write_203(string s);
295 extern bool cb_203_save_as();
296 extern void cb_203_save();
297 extern void cb_203_html();
298 extern void cb_203_msg_type();
299 extern void cb_203_textout();
300 extern int  eval_203_fsize();
301 
302 // ics206
303 extern string yes;
304 extern string no;
305 
306 extern string buff206;
307 extern string def_206_filename;
308 extern string base_206_filename;
309 extern string def_206_TemplateName;
310 extern bool using_ics206_template;
311 
312 extern void cb_206_setdate();
313 extern void cb_206_settime();
314 extern void clear_206fields();
315 extern void update_206fields();
316 extern void clear_206_form();
317 extern void read_206_buffer(string data);
318 extern void cb_206_new();
319 extern void cb_206_import();
320 extern void cb_206_export();
321 extern void cb_206_wrap_import(string wrapfilename, string inpbuffer);
322 extern void cb_206_wrap_export();
323 extern void cb_206_wrap_autosend();
324 extern void cb_206_load_template();
325 extern void cb_206_save_template();
326 extern void cb_206_save_as_template();
327 extern void cb_206_open();
328 extern void write_206(string s);
329 extern bool cb_206_save_as();
330 extern void cb_206_save();
331 extern void cb_206_html();
332 extern void cb_206_msg_type();
333 extern void cb_206_textout();
334 extern int  eval_206_fsize();
335 
336 // ics213
337 extern bool using_213Template;
338 extern string base_213_filename;
339 extern string def_213_filename;
340 extern string def_213_TemplateName;
341 
342 extern void clear_213_form();
343 extern void read_213(string);
344 extern void write_213(string);
345 extern void read_213_buffer(string);
346 
347 extern void cb_213_new();
348 extern void cb_213_open();
349 extern void cb_213_save();
350 extern bool cb_213_save_as();
351 extern void cb_213_write();
352 extern void cb_213_html();
353 extern void cb_213_textout();
354 extern void cb_213_import();
355 extern void cb_213_export();
356 extern void cb_213_wrap_import(string, string);
357 extern void cb_213_wrap_export();
358 extern void cb_213_wrap_autosend();
359 extern void cb_213_load_template();
360 extern void cb_213_save_template();
361 extern void cb_213_save_as_template();
362 extern void cb_SetDate1();
363 extern void cb_SetDate2();
364 extern void cb_SetTime1();
365 extern void cb_SetTime2();
366 extern int  eval_213_fsize();
367 
368 // ics214
369 
370 extern string buff214;
371 extern string def_214_filename;
372 extern string base_214_filename;
373 extern string def_214_TemplateName;
374 extern bool using_ics214_template;
375 
376 extern void cb_214_set_date();
377 extern void cb_214_set_time();
378 extern void clear_214fields();
379 extern void update_214fields();
380 extern void clear_214_form();
381 extern void read_214_buffer(string data);
382 extern void cb_214_new();
383 extern void cb_214_import();
384 extern void cb_214_export();
385 extern void cb_214_wrap_import(string wrapfilename, string inpbuffer);
386 extern void cb_214_wrap_export();
387 extern void cb_214_wrap_autosend();
388 extern void cb_214_load_template();
389 extern void cb_214_save_template();
390 extern void cb_214_save_as_template();
391 extern void cb_214_open();
392 extern void write_214(string s);
393 extern bool cb_214_save_as();
394 extern void cb_214_save();
395 extern void cb_214_html();
396 extern void cb_214_msg_type();
397 extern void cb_214_textout();
398 extern int  eval_214_fsize();
399 
400 // ics216
401 
402 extern string buff216;
403 extern string def_216_filename;
404 extern string base_216_filename;
405 extern string def_216_TemplateName;
406 extern bool using_ics216_template;
407 
408 extern void cb_216_set_date();
409 extern void cb_216_set_time();
410 extern void clear_216fields();
411 extern void update_216fields();
412 extern void clear_216_form();
413 extern void read_216_buffer(string data);
414 extern void cb_216_new();
415 extern void cb_216_import();
416 extern void cb_216_export();
417 extern void cb_216_wrap_import(string wrapfilename, string inpbuffer);
418 extern void cb_216_wrap_export();
419 extern void cb_216_wrap_autosend();
420 extern void cb_216_load_template();
421 extern void cb_216_save_template();
422 extern void cb_216_save_as_template();
423 extern void cb_216_open();
424 extern void write_216(string s);
425 extern bool cb_216_save_as();
426 extern void cb_216_save();
427 extern void cb_216_html();
428 extern void cb_216_msg_type();
429 extern void cb_216_textout();
430 extern int  eval_216_fsize();
431 
432 // ics309
433 
434 extern string buff309;
435 extern string def_309_filename;
436 extern string base_309_filename;
437 extern string def_309_TemplateName;
438 extern bool using_ics309_template;
439 
440 extern void cb_309_set_date_fm();
441 extern void cb_309_set_time_fm();
442 extern void cb_309_set_date_to();
443 extern void cb_309_set_time_to();
444 extern void cb_309_set_date_time();
445 extern void clear_309fields();
446 extern void update_309fields();
447 extern void clear_309_form();
448 extern void read_309_buffer(string data);
449 extern void cb_309_new();
450 extern void cb_309_import();
451 extern void cb_309_export();
452 extern void cb_309_wrap_import(string wrapfilename, string inpbuffer);
453 extern void cb_309_wrap_export();
454 extern void cb_309_wrap_autosend();
455 extern void cb_309_load_template();
456 extern void cb_309_save_template();
457 extern void cb_309_save_as_template();
458 extern void cb_309_open();
459 extern void write_309(string s);
460 extern bool cb_309_save_as();
461 extern void cb_309_save();
462 extern void cb_309_html();
463 extern void cb_309_msg_type();
464 extern void cb_309_textout();
465 extern int  eval_309_fsize();
466 extern void ics309_csv(Fl_Widget *w, void *d);
467 
468 // netlog
469 
470 extern string buffnetlog;
471 extern string def_netlog_filename;
472 extern string base_netlog_filename;
473 extern string def_netlog_TemplateName;
474 extern bool using_netlog_template;
475 
476 extern void cb_netlog_set_date_fm();
477 extern void cb_netlog_set_time_fm();
478 extern void cb_netlog_set_date_to();
479 extern void cb_netlog_set_time_to();
480 extern void cb_netlog_set_date_time();
481 extern void clear_netlogfields();
482 extern void update_netlogfields();
483 extern void clear_netlog_form();
484 extern void read_netlog_buffer(string data);
485 extern void cb_netlog_new();
486 extern void cb_netlog_import();
487 extern void cb_netlog_export();
488 extern void cb_netlog_wrap_import(string wrapfilename, string inpbuffer);
489 extern void cb_netlog_wrap_export();
490 extern void cb_netlog_wrap_autosend();
491 extern void cb_netlog_load_template();
492 extern void cb_netlog_save_template();
493 extern void cb_netlog_save_as_template();
494 extern void cb_netlog_open();
495 extern void write_netlog(string s);
496 extern bool cb_netlog_save_as();
497 extern void cb_netlog_save();
498 extern void cb_netlog_html();
499 extern void cb_netlog_msg_type();
500 extern void cb_netlog_textout();
501 extern int  eval_netlog_fsize();
502 extern void netlog_csv(Fl_Widget *w, void *d);
503 
504 // radiogram
505 extern bool using_rg_template;
506 extern string base_rg_filename;
507 extern string def_rg_filename;
508 extern string def_rg_TemplateName;
509 
510 extern const char hxitems[];
511 extern const char precitems[];
512 extern const char *s_prec[];
513 extern const char *s_hx[];
514 
515 extern void cb_rgSetDate1();
516 extern void cb_rgSetTime1();
517 extern void cb_rgSetDateTime2();
518 extern void cb_rgSetDateTime3();
519 extern void cb_rgSetDateTime4();
520 extern void cb_rgSetDateTime5();
521 extern void clear_rgfields();
522 extern void update_rgfields();
523 extern void clear_rg_form();
524 extern void read_rg_buffer(string data);
525 extern void cb_rg_new();
526 extern void cb_rg_import();
527 extern void cb_rg_export();
528 extern void cb_rg_wrap_import(string, string);
529 extern void cb_rg_wrap_export();
530 extern void cb_rg_wrap_autosend();
531 extern void cb_rg_load_template();
532 extern void cb_rg_save_template();
533 extern void cb_rg_save_as_template();
534 extern void read_rg(string s);
535 extern void cb_rg_open();
536 extern void write_rg(string s);
537 extern bool cb_rg_save_as();
538 extern void cb_rg_save();
539 extern void cb_rg_html();
540 extern void cb_rg_html_fcopy();
541 extern void cb_rg_rtf();
542 extern void cb_rg_textout();
543 extern void set_rg_choices();
544 extern void cb_rg_check();
545 extern void cb_rg_nbr(Fl_Widget *);
546 extern void cb_rg_filter_input(Fl_Widget *);
547 extern int  eval_rg_fsize();
548 
549 extern void read_data_file(string);
550 
551 // plaintext
552 extern bool using_pt_template;
553 extern string base_pt_filename;
554 extern string def_pt_filename;
555 extern string def_pt_TemplateName;
556 
557 extern void cb_set_pt_date();
558 extern void cb_set_pt_time();
559 extern void clear_ptfields();
560 extern void update_ptfields();
561 extern void clear_pt_form();
562 extern void read_ptbuffer(string data);
563 extern void cb_pt_new();
564 extern void cb_pt_import();
565 extern void cb_pt_export();
566 extern void cb_pt_wrap_import(string wrapfilename, string inpbuffer);
567 extern void cb_pt_wrap_export();
568 extern void cb_pt_wrap_autosend();
569 extern void cb_pt_load_template();
570 extern void cb_pt_save_template();
571 extern void cb_pt_save_as_template();
572 extern void read_pt_data_file(string s);
573 extern void cb_pt_open();
574 extern void write_pt(string s);
575 extern bool cb_pt_save_as();
576 extern void cb_pt_save();
577 extern void cb_pt_html();
578 extern void cb_pt_msg_type();
579 extern void cb_pt_textout();
580 extern int  eval_pt_fsize();
581 
582 // blank form
583 extern bool using_blank_template;
584 extern string base_blank_filename;
585 extern string def_blank_filename;
586 extern string def_blank_TemplateName;
587 
588 extern string TITLE;
589 extern string errtext;
590 
591 extern void clear_blankfields();
592 extern void update_blankfields();
593 extern void clear_blank_form();
594 extern void read_blankbuffer(string data);
595 extern void cb_blank_new();
596 extern void cb_blank_import();
597 extern void cb_blank_export();
598 extern void cb_blank_wrap_import(string wrapfilename, string inpbuffer);
599 extern void cb_blank_wrap_export();
600 extern void cb_blank_wrap_autosend();
601 extern void cb_blank_load_template();
602 extern void cb_blank_save_template();
603 extern void cb_blank_save_as_template();
604 extern void read_blank_data_file(string s);
605 extern void cb_blank_open();
606 extern void write_blank(string s);
607 extern bool cb_blank_save_as();
608 extern void cb_blank_save();
609 extern void cb_blank_html();
610 extern void cb_blank_msg_type();
611 extern void cb_blank_textout();
612 extern int  eval_blank_fsize();
613 
614 // csv form
615 extern bool using_csv_template;
616 extern string base_csv_filename;
617 extern string def_csv_filename;
618 extern string def_csv_TemplateName;
619 
620 extern void clear_csvfields();
621 extern void update_csvfields();
622 extern void clear_csv_form();
623 extern void read_csvbuffer(string data);
624 extern void cb_csv_new();
625 extern void cb_csv_import();
626 extern void cb_csv_export();
627 extern void cb_csv_wrap_import(string wrapfilename, string inpbuffer);
628 extern void cb_csv_wrap_export();
629 extern void cb_csv_wrap_autosend();
630 extern void cb_csv_load_template();
631 extern void cb_csv_save_template();
632 extern void cb_csv_save_as_template();
633 extern void read_csv_data_file(string s);
634 extern void cb_csv_open();
635 extern void write_csv(string s);
636 extern bool cb_csv_save_as();
637 extern void cb_csv_save();
638 extern void cb_csv_html();
639 extern void cb_csv_msg_type();
640 extern void cb_csv_textout();
641 extern void cb_csv_export_data(bool);
642 extern void cb_csv_import_data();
643 extern void csv_set_fname(const char *);
644 extern int  eval_csv_fsize();
645 
646 // custom form
647 
648 enum HANDLE_TYPE {HANDLE_NONE, HANDLE_EDIT, HANDLE_VIEW, HANDLE_WAITING};
649 
650 extern int custom_select;
651 extern int handle_type;
652 
653 extern int flmsg_webserver_portnbr;
654 extern char sz_srvr_portnbr[];
655 
656 extern pthread_t *web_server_thread;
657 extern pthread_mutex_t mutex_web_server;
658 
659 struct CUSTOM_PAIRS {
660 	char *mnu_name;
661 	char *file_name;
662 };
663 
664 extern CUSTOM_PAIRS custom_pairs[];
665 
666 extern bool using_custom_template;
667 extern string base_custom_filename;
668 extern string def_custom_filename;
669 extern string def_custom_TemplateName;
670 
671 extern void clear_customfields();
672 extern void update_customfields();
673 extern void clear_custom_form();
674 extern void read_custombuffer(string data);
675 extern void cb_custom_new();
676 extern void cb_custom_import();
677 extern void cb_custom_export();
678 extern void cb_custom_wrap_import(string wrapfilename, string inpbuffer);
679 extern void cb_custom_wrap_export();
680 extern void cb_custom_wrap_autosend();
681 extern void cb_custom_load_template();
682 extern void cb_custom_save_template();
683 extern void cb_custom_save_as_template();
684 extern void read_custom_data_file(string s);
685 extern void cb_custom_open();
686 extern void write_custom(string s);
687 extern bool cb_custom_save_as();
688 extern void cb_custom_save();
689 extern void cb_custom_html(bool);
690 extern void cb_custom_msg_type();
691 extern void cb_custom_textout();
692 extern void cb_custom_export_data(bool);
693 extern void cb_custom_import_data();
694 extern void custom_set_fname(const char *);
695 extern int  eval_custom_fsize();
696 
697 // mars daily
698 extern string	def_mars_daily_filename;
699 extern string	def_mars_daily_TemplateName;
700 extern string	base_mars_daily_filename;
701 
702 extern void mars_changed(Fl_Widget *, void *);
703 
704 extern void clear_mars_dailyfields();
705 extern void update_mars_dailyfields();
706 extern void clear_mars_daily_form();
707 extern void read_mars_daily_buffer(string data);
708 extern void cb_mars_daily_new();
709 extern void cb_mars_daily_import();
710 extern void cb_mars_daily_export();
711 extern void cb_mars_daily_wrap_import(string wrapfilename, string inpbuffer);
712 extern void cb_mars_daily_wrap_export();
713 extern void cb_mars_daily_wrap_autosend();
714 extern void cb_mars_daily_load_template();
715 extern void cb_mars_daily_save_template();
716 extern void cb_mars_daily_save_as_template();
717 extern void read_mars_daily__data_file(string s);
718 extern void cb_mars_daily_open();
719 extern void write_mars_daily(string s);
720 extern bool cb_mars_daily_save_as();
721 extern void cb_mars_daily_save();
722 extern void cb_mars_daily_html();
723 extern void cb_mars_daily_msg_type();
724 extern void cb_mars_daily_textout();
725 extern int  eval_mars_daily_fsize();
726 
727 // mars ineei
728 extern string	def_mars_ineei_filename;
729 extern string	def_mars_ineei_TemplateName;
730 extern string	base_mars_ineei_filename;
731 
732 extern void cb_mars_ineei_SetDTG();
733 extern void clear_mars_ineei_fields();
734 extern void update_mars_ineei_fields();
735 extern void update_mars_ineeiform();
736 extern void clear_mars_ineei_form();
737 extern void read_mars_ineei_buffer(string data);
738 extern void cb_mars_ineei_new();
739 extern void cb_mars_ineei_import();
740 extern void cb_mars_ineei_export();
741 extern void cb_mars_ineei_wrap_import(string wrapfilename, string inpbuffer);
742 extern void cb_mars_ineei_wrap_export();
743 extern void cb_mars_ineei_wrap_autosend();
744 extern void cb_mars_ineei_load_template();
745 extern void cb_mars_ineei_save_template();
746 extern void cb_mars_ineei_save_as_template();
747 extern void cb_mars_ineei_open();
748 extern void write_mars_ineei(string s);
749 extern bool cb_mars_ineei_save_as();
750 extern void cb_mars_ineei_save();
751 extern void cb_mars_ineei_html();
752 extern void cb_mars_ineei_textout();
753 extern void cb_mars_ineei_html();
754 extern void cb_mars_ineei_textout();
755 extern int  eval_mars_ineei_fsize();
756 
757 // mars net
758 extern string	def_mars_net_filename;
759 extern string	def_mars_net_TemplateName;
760 extern string	base_mars_net_filename;
761 
762 extern void cb_mars_net_SetDTG();
763 extern void cb_mars_net_SetDTGSTART();
764 extern void cb_mars_net_SetDTGEND();
765 extern void clear_mars_net_fields();
766 extern void update_mars_net_fields();
767 extern void update_mars_netform();
768 extern void clear_mars_net_form();
769 extern void read_mars_net_buffer(string data);
770 extern void cb_mars_net_new();
771 extern void cb_mars_net_import();
772 extern void cb_mars_net_export();
773 extern void cb_mars_net_wrap_import(string wrapfilename, string inpbuffer);
774 extern void cb_mars_net_wrap_export();
775 extern void cb_mars_net_wrap_autosend();
776 extern void cb_mars_net_load_template();
777 extern void cb_mars_net_save_template();
778 extern void cb_mars_net_save_as_template();
779 extern void cb_mars_net_open();
780 extern void write_mars_net(string s);
781 extern bool cb_mars_net_save_as();
782 extern void cb_mars_net_save();
783 extern void cb_mars_net_html();
784 extern void cb_mars_net_textout();
785 extern int  eval_mars_net_fsize();
786 
787 // mars army
788 extern bool using_mars_army_template;
789 extern string base_mars_army_filename;
790 extern string def_mars_army_filename;
791 extern string def_mars_army_TemplateName;
792 
793 extern void clear_mars_armyfields();
794 extern void update_mars_armyfields();
795 extern void update_mars_armyform();
796 extern void clear_mars_army_form();
797 extern void read_mars_army_buffer(string data);
798 extern void cb_mars_army_new();
799 extern void cb_mars_army_import();
800 extern void cb_mars_army_export();
801 extern void cb_mars_army_wrap_import(string wrapfilename, string inpbuffer);
802 extern void cb_mars_army_wrap_export();
803 extern void cb_mars_army_wrap_autosend();
804 extern void cb_mars_army_load_template();
805 extern void cb_mars_army_save_template();
806 extern void cb_mars_army_save_as_template();
807 extern void cb_mars_army_open();
808 extern void write_mars_army(string s);
809 extern bool cb_mars_army_save_as();
810 extern void cb_mars_army_save();
811 extern void cb_mars_army_html();
812 extern void cb_mars_army_msg_type();
813 extern void cb_mars_army_textout();
814 extern int  eval_mars_army_fsize();
815 
816 // mars navy
817 extern bool using_mars_navy_template;
818 extern string base_mars_navy_filename;
819 extern string def_mars_navy_filename;
820 extern string def_mars_navy_TemplateName;
821 
822 extern void clear_mars_navyfields();
823 extern void update_mars_navyfields();
824 extern void update_mars_navyform();
825 extern void clear_mars_navy_form();
826 extern void read_mars_navy_buffer(string data);
827 extern void cb_mars_navy_new();
828 extern void cb_mars_navy_import();
829 extern void cb_mars_navy_export();
830 extern void cb_mars_navy_wrap_import(string wrapfilename, string inpbuffer);
831 extern void cb_mars_navy_wrap_export();
832 extern void cb_mars_navy_wrap_autosend();
833 extern void cb_mars_navy_load_template();
834 extern void cb_mars_navy_save_template();
835 extern void cb_mars_navy_save_as_template();
836 extern void cb_mars_navy_open();
837 extern void write_mars_navy(string s);
838 extern bool cb_mars_navy_save_as();
839 extern void cb_mars_navy_save();
840 extern void cb_mars_navy_html();
841 extern void cb_mars_navy_msg_type();
842 extern void cb_mars_navy_textout();
843 extern int  eval_mars_navy_fsize();
844 
845 // hics203
846 extern string hics_buff203;
847 extern string def_hics203_filename;
848 extern string base_hics203_filename;
849 extern string def_hics203_TemplateName;
850 extern bool   using_hics203_template;
851 extern void   hics_changed(Fl_Widget *, void *);
852 
853 extern void cb_hics203_set_date();
854 extern void cb_hics203_set_time();
855 extern void clear_hics203fields();
856 extern void update_hics203fields();
857 extern void clear_hics203_form();
858 extern void read_hics203_buffer(string data);
859 extern void cb_hics203_new();
860 extern void cb_hics203_import();
861 extern void cb_hics203_export();
862 extern void cb_hics203_wrap_import(string wrapfilename, string inpbuffer);
863 extern void cb_hics203_wrap_export();
864 extern void cb_hics203_wrap_autosend();
865 extern void cb_hics203_load_template();
866 extern void cb_hics203_save_template();
867 extern void cb_hics203_save_as_template();
868 extern void cb_hics203_open();
869 extern void write_hics203(string s);
870 extern bool cb_hics203_save_as();
871 extern void cb_hics203_save();
872 extern void cb_hics203_html();
873 extern void cb_hics203_msg_type();
874 extern void cb_hics203_textout();
875 extern int  eval_hics203_fsize();
876 
877 // ics_h206
878 extern string h206_buff;
879 extern string h206_def_filename;
880 extern string h206_base_filename;
881 extern string h206_def_template_name;
882 extern bool   h206_using_template;
883 
884 extern void h206_cb_setdate();
885 extern void h206_cb_settime();
886 extern void h206_clear_fields();
887 extern void h206_update_fields();
888 extern void h206_clear__form();
889 extern void h206_read_buffer(string data);
890 extern void h206_cb_new();
891 extern void h206_cb_import();
892 extern void h206_cb_export();
893 extern void h206_cb_wrap_import(string wrapfilename, string inpbuffer);
894 extern void h206_cb_wrap_export();
895 extern void h206_cb_wrap_autosend();
896 extern void h206_cb_load_template();
897 extern void h206_cb_save_template();
898 extern void h206_cb_save_as_template();
899 extern void h206_cb_open();
900 extern void h206_write(string s);
901 extern bool h206_cb_save_as();
902 extern void h206_cb_save();
903 extern void h206_cb_html();
904 extern void h206_cb_textout();
905 extern int  eval_h206_fsize();
906 
907 // ics_h213
908 
909 extern string h213_buffer;
910 extern string h213_def_filename;
911 extern string h213_base_filename;
912 extern string h213_def_template_name;
913 extern bool   h213_using_template;
914 
915 extern void h213_cb_set_date();
916 extern void h213_cb_set_time0();
917 extern void h213_cb_set_time1();
918 extern void h213_cb_set_time2();
919 extern void h213_clear_fields();
920 extern void h213_update_fields();
921 extern void h213_clear_form();
922 extern void h213_update_form();
923 extern void h213_read_buffer(string data);
924 extern void h213_cb_new();
925 extern void h213_cb_import();
926 extern void h213_cb_export();
927 extern void h213_cb_wrap_import(string wrapfilename, string inpbuffer);
928 extern void h213_cb_wrap_export();
929 extern void h213_cb_wrap_autosend();
930 extern void h213_cb_load_template();
931 extern void h213_cb_save_template();
932 extern void h213_cb_save_as_template();
933 extern void h213_cb_open();
934 extern void h213_write(string s);
935 extern bool h213_cb_save_as();
936 extern void h213_cb_save();
937 extern void h213_cb_html();
938 extern void h213_cb_textout();
939 extern int  eval_h213_fsize();
940 
941 // hics 214 variables and functions
942 
943 extern string hics214_incident;
944 extern string hics214_date;
945 extern string hics214_time;
946 extern string hics214_op_period;
947 extern string hics214_sec_brch;
948 extern string hics214_position;
949 extern string hics214_activity_time[30];
950 extern string hics214_activity_event[30];
951 extern string hics214_prepared_by;
952 extern string hics214_facility;
953 
954 extern string hics214_buff;
955 extern string hics214_def_filename;
956 extern string hics214_base_filename;
957 extern string hics214_template_name;
958 extern bool   hics214_using_template;
959 
960 extern void hics214_cb_set_date();
961 extern void hics214_cb_set_time();
962 extern void hics214_clear_fields();
963 extern void hics214_update_fields();
964 extern void hics214_update_form();
965 extern void hics214_clear_form();
966 extern void hics214_read_buffer(string data);
967 extern void hics214_cb_new();
968 extern void hics214_cb_import();
969 extern void hics214_cb_export();
970 extern void hics214_cb_wrap_import(string wrapfilename, string inpbuffer);
971 extern void hics214_cb_wrap_export();
972 extern void hics214_cb_wrap_autosend();
973 extern void hics214_cb_load_template();
974 extern void hics214_cb_save_template();
975 extern void hics214_cb_save_as_template();
976 extern void hics214_cb_open();
977 extern void hics214_write(string s);
978 extern bool hics214_cb_save_as();
979 extern void hics214_cb_save();
980 extern void hics214_cb_html();
981 extern void hics214_cb_textout();
982 extern int  eval_hics214_fsize();
983 
984 // IARU form
985 
986 extern bool iaru_using_template;
987 extern int iaru_num_fields;
988 
989 extern void iaru_cb_set_d1();
990 extern void iaru_cb_set_t1();
991 extern void iaru_cb_set_d2();
992 extern void iaru_cb_set_t2();
993 extern void iaru_cb_set_d3();
994 extern void iaru_cb_set_t3();
995 extern void iaru_cb_nbr(Fl_Widget *wdg);
996 extern void iaru_cb_filter_input(Fl_Widget *wdg);
997 extern void iaru_clear_fields();
998 extern void iaru_set_choices();
999 extern void iaru_update_fields();
1000 extern void iaru_clear_form();
1001 extern void iaru_update_form();
1002 extern void iaru_read_buffer(string data);
1003 extern void iaru_cb_new();
1004 extern void iaru_cb_import();
1005 extern void iaru_cb_export();
1006 extern void iaru_cb_wrap_import(string wrapfilename, string inpbuffer);
1007 extern void iaru_cb_wrap_export();
1008 extern void iaru_cb_wrap_autosend();
1009 extern void iaru_cb_load_template();
1010 extern void iaru_cb_save_template();
1011 extern void iaru_cb_save_as_template();
1012 extern void iaru_cb_open();
1013 extern void iaru_write(string s);
1014 extern bool iaru_cb_save_as();
1015 extern void iaru_cb_save();
1016 extern void iaru_cb_check();
1017 extern void iaru_cb_html();
1018 extern void iaru_cb_textout();
1019 extern int  eval_iaru_fsize();
1020 
1021 extern string iaru_base_filename;
1022 extern string iaru_def_filename;
1023 extern string iaru_def_template_name;
1024 
1025 //======================================================================
1026 // National Hurricane Center, Hurricane Weather Report Form
1027 //======================================================================
1028 
1029 extern string buffwxhc;
1030 extern string def_wxhc_filename;
1031 extern string base_wxhc_filename;
1032 extern string def_wxhc_TemplateName;
1033 
1034 extern void clear_wxhcfields();
1035 extern bool check_wxhcfields();
1036 extern void update_wxhcfields();
1037 extern void set_nhc_wx_combos();
1038 extern void update_wxhcform();
1039 extern void clear_wxhc_form();
1040 extern void read_wxhc_buffer(string data);
1041 extern void cb_wxhc_new();
1042 extern void cb_wxhc_import();
1043 extern void cb_wxhc_export();
1044 extern void cb_wxhc_wrap_import(string wrapfilename, string inpbuffer);
1045 extern void cb_wxhc_wrap_export();
1046 extern void cb_wxhc_wrap_autosend();
1047 extern void cb_wxhc_load_template();
1048 extern void cb_wxhc_save_template();
1049 extern void cb_wxhc_save_as_template();
1050 extern void cb_wxhc_open();
1051 extern void write_wxhc(string s);
1052 extern bool cb_wxhc_save_as();
1053 extern void cb_wxhc_save();
1054 extern void cb_wxhc_html();
1055 extern void cb_wxhc_textout();
1056 extern int  eval_wxhc_fsize();
1057 
1058 //======================================================================
1059 // Severe Weather Report Form
1060 //======================================================================
1061 
1062 extern string buffsevere_wx;
1063 extern string def_severe_wx_filename;
1064 extern string base_severe_wx_filename;
1065 extern string def_severe_wx_TemplateName;
1066 
1067 extern void clear_severe_wxfields();
1068 extern bool check_severe_wxfields();
1069 extern void update_severe_wxfields();
1070 extern void update_severe_wxform();
1071 extern void clear_severe_wx_form();
1072 extern void read_severe_wx_buffer(string data);
1073 extern void cb_severe_wx_new();
1074 extern void cb_severe_wx_import();
1075 extern void cb_severe_wx_export();
1076 extern void cb_severe_wx_wrap_import(string wrapfilename, string inpbuffer);
1077 extern int  eval_severe_wx_fsize();
1078 extern void cb_severe_wx_wrap_export();
1079 extern void cb_severe_wx_wrap_autosend();
1080 extern void cb_severe_wx_load_template();
1081 extern void cb_severe_wx_save_template();
1082 extern void cb_severe_wx_save_as_template();
1083 extern void cb_severe_wx_open();
1084 extern void write_severe_wx(string s);
1085 extern bool cb_severe_wx_save_as();
1086 extern void cb_severe_wx_save();
1087 extern void cb_severe_wx_html();
1088 extern void cb_severe_wx_textout();
1089 extern void set_severe_wx_combos();
1090 extern void set_severe_wx_counties(int);
1091 
1092 //======================================================================
1093 // Storm Report Form
1094 //======================================================================
1095 
1096 extern string buffstorm;
1097 extern string def_storm_filename;
1098 extern string base_storm_filename;
1099 extern string def_storm_TemplateName;
1100 
1101 extern void clear_stormfields();
1102 extern bool check_stormfields();
1103 extern void update_stormfields();
1104 extern void update_stormform();
1105 extern void clear_storm_form();
1106 extern void read_storm_buffer(string data);
1107 extern void cb_storm_new();
1108 extern void cb_storm_import();
1109 extern void cb_storm_export();
1110 extern void cb_storm_wrap_import(string wrapfilename, string inpbuffer);
1111 extern int  eval_storm_fsize();
1112 extern void cb_storm_wrap_export();
1113 extern void cb_storm_wrap_autosend();
1114 extern void cb_storm_load_template();
1115 extern void cb_storm_save_template();
1116 extern void cb_storm_save_as_template();
1117 extern void cb_storm_open();
1118 extern void write_storm(string s);
1119 extern bool cb_storm_save_as();
1120 extern void cb_storm_save();
1121 extern void cb_storm_html();
1122 extern void cb_storm_textout();
1123 
1124 //======================================================================
1125 // generic file transfer
1126 //======================================================================
1127 
1128 extern string transfer_buffer;
1129 extern string def_transfer_filename;
1130 extern string base_transfer_filename;
1131 
1132 extern void clear_transfer_form();
1133 extern void read_transfer_buffer(string data);
1134 extern void cb_transfer_new();
1135 extern void cb_transfer_import();
1136 extern void cb_transfer_export();
1137 extern void cb_transfer_wrap_import(string wrapfilename, string inpbuffer);
1138 extern int eval_transfer_fsize();
1139 extern void cb_transfer_wrap_export();
1140 extern void cb_transfer_wrap_autosend();
1141 extern void cb_transfer_load_template();
1142 extern void cb_transfer_save_template();
1143 extern void cb_transfer_save_as_template();
1144 extern void cb_transfer_open();
1145 extern void write_transfer(string s);
1146 extern void cb_transfer_open_as();
1147 extern void cb_transfer_msg_type();
1148 extern void cb_transfer_html();
1149 extern void cb_transfer_textout();
1150 extern void cb_transfer_import_data();
1151 extern void cb_transfer_export_data();
1152 
1153 extern string def_custom_transfer_filename;
1154 extern void load_custom_html_file();
1155 extern void load_custom_transfer();
1156 extern void update_custom_transfer();
1157 
1158 extern void cb_custom_form_wrap_import(string s1, string s2);
1159 extern int  eval_transfer_custom_form_fsize();
1160 extern void cb_transfer_custom_html();
1161 extern void cb_save_custom_html(Fl_Widget *w, void *d);
1162 extern void cb_btn_select_custom_html(Fl_Widget *w, void *d);
1163 
1164 //=====================================================================
1165 // CAP 105
1166 //=====================================================================
1167 
1168 extern string cap105_base_filename;
1169 extern string cap105_def_filename;
1170 extern string cap105_def_template_name;
1171 
1172 extern void cap105_cb_set_dtm();
1173 extern void cap105_cb_set_rcvd_dtm();
1174 extern void cap105_cb_set_sent_dtm();
1175 extern void cap105_cb_nbr(Fl_Widget *wdg);
1176 extern void cap105_cb_filter_input(Fl_Widget *wdg);
1177 extern void cap105_clear_fields();
1178 extern void cap105_set_choices();
1179 extern bool cap105_check_fields();
1180 extern void cap105_update_fields();
1181 extern void cap105_clear_form();
1182 extern void cap105_update_form();
1183 extern void cap105_make_buffer(bool compress = false);
1184 extern void cap105_read_buffer(string data);
1185 extern void cap105_cb_new();
1186 extern void cap105_cb_import();
1187 extern void cap105_cb_export();
1188 extern void cap105_cb_wrap_import(string wrapfilename, string inpbuffer);
1189 extern int  eval_cap105_fsize();
1190 extern void cap105_cb_wrap_export();
1191 extern void cap105_cb_wrap_autosend();
1192 extern void cap105_cb_load_template();
1193 extern void cap105_cb_save_template();
1194 extern void cap105_cb_save_as_template();
1195 extern void cap105_cb_open();
1196 extern void cap105_write(string s);
1197 extern bool cap105_cb_save_as();
1198 extern void cap105_cb_save();
1199 extern void cap105_cb_check();
1200 extern void cap105_cb_html();
1201 extern void cap105_cb_textout();
1202 
1203 //=====================================================================
1204 // CAP 105
1205 //=====================================================================
1206 
1207 extern string	cap110_def_filename;
1208 extern string	cap110_base_filename;
1209 extern string	cap110_def_template_name;
1210 
1211 extern void cap110_set_date();
1212 extern void clear_110fields();
1213 extern bool check_110fields();
1214 extern void update_110fields();
1215 extern void update_110form();
1216 extern void clear_110_form();
1217 extern string &cap110_nn(string & subst, int n);
1218 extern void read_c110_buffer(string data);
1219 extern void cap110_cb_load_template(string data);
1220 extern void cap110_cb_new();
1221 extern void cap110_cb_import();
1222 extern void cap110_cb_export();
1223 extern void cap110_cb_wrap_import(string wrapfilename, string inpbuffer);
1224 extern int eval_cap110_fsize();
1225 extern void cap110_cb_wrap_export();
1226 extern void cap110_cb_wrap_autosend();
1227 extern void cap110_cb_load_template();
1228 extern void cap110_cb_save_template();
1229 extern void cap110_cb_save_as_template();
1230 extern void cap110_cb_open();
1231 extern void write_110(string s);
1232 extern bool cap110_cb_save_as();
1233 extern void cap110_cb_save();
1234 extern void cap110_cb_html();
1235 extern void cap110_cb_msg_type();
1236 extern void cap110_cb_textout();
1237 
1238 #endif
1239