mirror of
https://git.code.sf.net/p/fldigi/flmsg
synced 2026-08-13 17:30:58 -04:00
Minimal (but extensive) update to remove namespace std for C++17 compatibility.
This commit is contained in:
parent
ba48b8d9ff
commit
ddb8eb3c7f
66 changed files with 1943 additions and 1963 deletions
|
|
@ -45,7 +45,7 @@ std::string arqstates[] = {
|
|||
|
||||
using namespace std;
|
||||
|
||||
string arq::upcase(string s)
|
||||
std::string arq::upcase(string s)
|
||||
{
|
||||
for (size_t i = 0; i < s.length(); i++)
|
||||
s[i] = toupper(s[i]);
|
||||
|
|
@ -120,7 +120,7 @@ void arq::reset()
|
|||
}
|
||||
|
||||
// Checksum of string s
|
||||
string arq::checksum(string &s)
|
||||
std::string arq::checksum(string &s)
|
||||
{
|
||||
framecrc.reset();
|
||||
return framecrc.scrc16(s);
|
||||
|
|
@ -132,7 +132,7 @@ void arq::addToTxQue(string s)
|
|||
TxTextQueue.assign(s);
|
||||
}
|
||||
|
||||
string arq::calls()
|
||||
std::string arq::calls()
|
||||
{
|
||||
string s;
|
||||
s.assign(MyCall);
|
||||
|
|
|
|||
|
|
@ -82,24 +82,22 @@ bool SHOWDEBUG = true;
|
|||
|
||||
Fl_Double_Window *dlgconfig = (Fl_Double_Window *)0;
|
||||
|
||||
using namespace std;
|
||||
|
||||
arq flmsg_arq;
|
||||
|
||||
bool traffic = false;
|
||||
int arqstate = 0;
|
||||
|
||||
string RX;
|
||||
string TX;
|
||||
std::string RX;
|
||||
std::string TX;
|
||||
|
||||
string MyCall;
|
||||
string UrCall;
|
||||
std::string MyCall;
|
||||
std::string UrCall;
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__WOE32__) && USE_X
|
||||
Pixmap flarq_icon_pixmap;
|
||||
#endif
|
||||
|
||||
string rxbuffer;
|
||||
std::string rxbuffer;
|
||||
|
||||
size_t bufsize = 0;
|
||||
|
||||
|
|
@ -122,21 +120,21 @@ const char *ASCII[32] = {
|
|||
};
|
||||
|
||||
static pthread_mutex_t nocr_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
string noCR(string s)
|
||||
std::string noCR(std::string s)
|
||||
{
|
||||
guard_lock lock(&nocr_mutex);
|
||||
string text = s;
|
||||
std::string text = s;
|
||||
size_t p;
|
||||
while ((p = text.find('\r')) != string::npos)
|
||||
while ((p = text.find('\r')) != std::string::npos)
|
||||
text.erase(p,1);
|
||||
return text;
|
||||
}
|
||||
|
||||
static pthread_mutex_t noctl_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
string noCTL(string s)
|
||||
std::string noCTL(std::string s)
|
||||
{
|
||||
guard_lock lock(&noctl_mutex);
|
||||
string text;
|
||||
std::string text;
|
||||
int c;
|
||||
for (size_t n = 0; n < s.length(); n++) {
|
||||
c = s[n];
|
||||
|
|
@ -148,20 +146,20 @@ string noCTL(string s)
|
|||
return text;
|
||||
}
|
||||
|
||||
string incomingText = "";
|
||||
string txtarqload = "";
|
||||
string rxfname = "";
|
||||
string arqstart = "ARQ::STX\n";
|
||||
string arqend = "ARQ::ETX\n";
|
||||
string arqfile = "ARQ:FILE::";
|
||||
string arqbase64 = "ARQ:ENCODING::BASE64\n";
|
||||
string arqsizespec = "ARQ:SIZE::";
|
||||
size_t startpos = string::npos;
|
||||
size_t endpos = string::npos;
|
||||
size_t fnamepos = string::npos;
|
||||
size_t indx = string::npos;
|
||||
size_t sizepos = string::npos;
|
||||
size_t lfpos = string::npos;
|
||||
std::string incomingText = "";
|
||||
std::string txtarqload = "";
|
||||
std::string rxfname = "";
|
||||
std::string arqstart = "ARQ::STX\n";
|
||||
std::string arqend = "ARQ::ETX\n";
|
||||
std::string arqfile = "ARQ:FILE::";
|
||||
std::string arqbase64 = "ARQ:ENCODING::BASE64\n";
|
||||
std::string arqsizespec = "ARQ:SIZE::";
|
||||
size_t startpos = std::string::npos;
|
||||
size_t endpos = std::string::npos;
|
||||
size_t fnamepos = std::string::npos;
|
||||
size_t indx = std::string::npos;
|
||||
size_t sizepos = std::string::npos;
|
||||
size_t lfpos = std::string::npos;
|
||||
size_t arqPayloadSize = 0;
|
||||
bool rxARQfile = false;
|
||||
bool rxARQhavesize = false;
|
||||
|
|
@ -211,7 +209,7 @@ void dispState()
|
|||
}
|
||||
}
|
||||
|
||||
void client_transmit(const string& s )
|
||||
void client_transmit(const std::string& s )
|
||||
{
|
||||
MilliSleep(50);
|
||||
try {
|
||||
|
|
@ -220,7 +218,7 @@ void client_transmit(const string& s )
|
|||
}
|
||||
}
|
||||
catch (const SocketException& e) {
|
||||
cerr << e.what() << '\n';
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -236,7 +234,7 @@ bool client_receive(char &c)
|
|||
}
|
||||
rxbuffer.clear();
|
||||
rxbuffer_len = rxbuffer_ptr = 0;
|
||||
string rxstr = xml_get_rx_chars();
|
||||
std::string rxstr = xml_get_rx_chars();
|
||||
if (!rxstr.empty()) {
|
||||
rxbuffer = rxstr;
|
||||
rxbuffer_len = rxbuffer.length();
|
||||
|
|
@ -287,23 +285,23 @@ void arqSEND()
|
|||
|
||||
pthread_mutex_t payload_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
void save_this_file_as(string fname, string txt)
|
||||
void save_this_file_as(std::string fname, std::string txt)
|
||||
{
|
||||
if (txt.find("<transfer>") != string::npos) {
|
||||
if (txt.find("<transfer>") != std::string::npos) {
|
||||
cb_transfer_wrap_import(fname, txt);
|
||||
select_form(TRANSFER);
|
||||
return;
|
||||
}
|
||||
|
||||
string fnam = fname;
|
||||
string outfname;
|
||||
string tst_name;
|
||||
string tst_ext = "";
|
||||
std::string fnam = fname;
|
||||
std::string outfname;
|
||||
std::string tst_name;
|
||||
std::string tst_ext = "";
|
||||
|
||||
// write to file with name(s) such as
|
||||
// test.b2s, test-01.txt, test-02.txt etc. up to 999
|
||||
size_t pos = fnam.find(".");
|
||||
if (pos != string::npos) {
|
||||
if (pos != std::string::npos) {
|
||||
tst_name = fnam.substr(0, pos);
|
||||
tst_ext = fnam.substr(pos);
|
||||
} else
|
||||
|
|
@ -313,7 +311,7 @@ void save_this_file_as(string fname, string txt)
|
|||
int num = 0;
|
||||
outfname.assign(ICS_msg_dir).append(tst_name).append(tst_ext);
|
||||
|
||||
ifstream tstfile;
|
||||
std::ifstream tstfile;
|
||||
tstfile.open(outfname.c_str());
|
||||
while (tstfile) {
|
||||
tstfile.close();
|
||||
|
|
@ -325,7 +323,7 @@ void save_this_file_as(string fname, string txt)
|
|||
// decompress_maybe returns 0 on failure
|
||||
decompress_maybe(txt);
|
||||
|
||||
ofstream ofile(outfname.c_str(), ios::binary);
|
||||
std::ofstream ofile(outfname.c_str(), std::ios::binary);
|
||||
if (ofile) ofile << txt;
|
||||
ofile.close();
|
||||
|
||||
|
|
@ -335,27 +333,27 @@ void save_this_file_as(string fname, string txt)
|
|||
|
||||
}
|
||||
|
||||
void display_payloadtext(string fname, string txt)
|
||||
void display_payloadtext(std::string fname, std::string txt)
|
||||
{
|
||||
save_this_file_as(fname, txt);
|
||||
}
|
||||
|
||||
// process an AutoSend data stream
|
||||
|
||||
void direct_payload(string txt)
|
||||
void direct_payload(std::string txt)
|
||||
{
|
||||
LOG_INFO("%s", txt.substr(0, 50).c_str());
|
||||
|
||||
size_t pos = txt.find("WRAP:fn ");
|
||||
if (pos == string::npos) return;
|
||||
if (pos == std::string::npos) return;
|
||||
txt.erase(0, pos + 8);
|
||||
pos = txt.find("]");
|
||||
if (pos == string::npos) return;
|
||||
if (pos == std::string::npos) return;
|
||||
|
||||
string fname = txt.substr(0,pos);
|
||||
std::string fname = txt.substr(0,pos);
|
||||
txt.erase(0,pos + 1);
|
||||
pos = txt.find("[WRAP:chk");
|
||||
if (pos == string::npos) return;
|
||||
if (pos == std::string::npos) return;
|
||||
txt.erase(pos);
|
||||
|
||||
save_this_file_as(fname, txt);
|
||||
|
|
@ -367,40 +365,40 @@ void payloadtext(void *)
|
|||
{
|
||||
guard_lock payload(&payload_mutex);
|
||||
|
||||
if ((startpos = incomingText.find(arqstart)) != string::npos) {
|
||||
if ((startpos = incomingText.find(arqstart)) != std::string::npos) {
|
||||
startpos += arqstart.length();
|
||||
time(&StartTime_t);
|
||||
} else
|
||||
return;
|
||||
|
||||
if ((endpos = incomingText.find(arqend)) != string::npos) {
|
||||
if ((endpos = incomingText.find(arqend)) != std::string::npos) {
|
||||
fnamepos = incomingText.find(arqfile);
|
||||
fnamepos += arqfile.length();
|
||||
indx = incomingText.find('\n', fnamepos);
|
||||
rxfname = incomingText.substr(fnamepos, indx - fnamepos);
|
||||
txtarqload = incomingText.substr(startpos, endpos - startpos);
|
||||
if (incomingText.find(arqbase64) != string::npos) {
|
||||
if (incomingText.find(arqbase64) != std::string::npos) {
|
||||
base64 b64;
|
||||
txtarqload = b64.decode(txtarqload);
|
||||
}
|
||||
startpos = string::npos;
|
||||
endpos = string::npos;
|
||||
fnamepos = string::npos;
|
||||
indx = string::npos;
|
||||
sizepos = string::npos;
|
||||
lfpos = string::npos;
|
||||
startpos = std::string::npos;
|
||||
endpos = std::string::npos;
|
||||
fnamepos = std::string::npos;
|
||||
indx = std::string::npos;
|
||||
sizepos = std::string::npos;
|
||||
lfpos = std::string::npos;
|
||||
arqPayloadSize = 0;
|
||||
rxARQfile = false;
|
||||
rxARQhavesize = false;
|
||||
rxTextReady = true;
|
||||
if (incomingText.find("FLMSG_XFR") != std::string::npos) {
|
||||
string outfname;
|
||||
string arqstr = "[ARQ:fn ";
|
||||
std::string outfname;
|
||||
std::string arqstr = "[ARQ:fn ";
|
||||
size_t p = txtarqload.find(arqstr);
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
txtarqload.erase(0, p + arqstr.length());
|
||||
p = txtarqload.find("]");
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
|
||||
outfname = txtarqload.substr(0, p);
|
||||
txtarqload.erase(0, p + 1);
|
||||
|
|
@ -413,7 +411,7 @@ void payloadtext(void *)
|
|||
}
|
||||
}
|
||||
|
||||
void payloadText(string s)
|
||||
void payloadText(std::string s)
|
||||
{
|
||||
guard_lock payload(&payload_mutex);
|
||||
incomingText.assign (s);
|
||||
|
|
@ -433,7 +431,7 @@ void abortedTransfer()
|
|||
Fl::awake(abted);
|
||||
}
|
||||
|
||||
static string arqascii = "ARQ:ENCODING::ASCII\n";
|
||||
static std::string arqascii = "ARQ:ENCODING::ASCII\n";
|
||||
|
||||
void send_xml_text(std::string txt)
|
||||
{
|
||||
|
|
@ -486,7 +484,7 @@ void mainloop(void *)
|
|||
Fl::repeat_timeout(0.1, mainloop);
|
||||
}
|
||||
|
||||
static string str_status;
|
||||
static std::string str_status;
|
||||
//static double dtime;
|
||||
pthread_mutex_t protect_status = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
|
|
@ -499,7 +497,7 @@ void print_status(void *data)
|
|||
|
||||
size_t pos;
|
||||
pos = str_status.find("\n");
|
||||
while (pos != string::npos) {
|
||||
while (pos != std::string::npos) {
|
||||
btext->add(str_status.substr(0, pos).c_str());
|
||||
str_status.erase(0, pos + 1);
|
||||
pos = str_status.find("\n");
|
||||
|
|
@ -509,7 +507,7 @@ void print_status(void *data)
|
|||
str_status.clear();
|
||||
}
|
||||
|
||||
static string notify_string;
|
||||
static std::string notify_string;
|
||||
|
||||
void notify_(void *)
|
||||
{
|
||||
|
|
@ -525,7 +523,7 @@ std::string sTo = _(" to ");
|
|||
std::string sFm = _(" from ");
|
||||
std::string sColon = _(" : ");
|
||||
|
||||
void STATUSprint(string s)
|
||||
void STATUSprint(std::string s)
|
||||
{
|
||||
size_t p = 0;
|
||||
|
||||
|
|
@ -570,7 +568,7 @@ void STATUSprint(string s)
|
|||
}
|
||||
}
|
||||
|
||||
void arqlog(string nom, string s)
|
||||
void arqlog(std::string nom, std::string s)
|
||||
{
|
||||
char szGMT[80];
|
||||
tm *now;
|
||||
|
|
@ -583,17 +581,17 @@ void arqlog(string nom, string s)
|
|||
memset(szGMT, 0, 80);
|
||||
strftime(szGMT, sizeof(szGMT), "[%X] ", now);
|
||||
|
||||
string txtout;
|
||||
std::string txtout;
|
||||
txtout.assign(szGMT).append(nom).append(" ").append(noCTL(s));
|
||||
|
||||
STATUSprint(txtout);
|
||||
|
||||
string logname = FLMSG_log_dir;
|
||||
std::string logname = FLMSG_log_dir;
|
||||
logname.append("flmsg.log");
|
||||
ofstream logfile(logname.c_str(), ios::app);
|
||||
std::ofstream logfile(logname.c_str(), std::ios::app);
|
||||
if (logfile){
|
||||
logfile << txtout;
|
||||
if (s.length() == 0 || s[s.length()-1] != '\n') logfile << endl;
|
||||
if (s.length() == 0 || s[s.length()-1] != '\n') logfile << std::endl;
|
||||
}
|
||||
logfile.close();
|
||||
|
||||
|
|
@ -625,40 +623,40 @@ void arqlog(string nom, string s)
|
|||
|
||||
}
|
||||
|
||||
static string txecho_s;
|
||||
static std::string txecho_s;
|
||||
static void txecho(void *)
|
||||
{
|
||||
string style;
|
||||
std::string style;
|
||||
blocksSent += txecho_s.length();
|
||||
string text = noCR(txecho_s);
|
||||
std::string text = noCR(txecho_s);
|
||||
txecho_s.clear();
|
||||
}
|
||||
|
||||
void TXecho(string s)
|
||||
void TXecho(std::string s)
|
||||
{
|
||||
txecho_s = s;
|
||||
Fl::awake(txecho);
|
||||
}
|
||||
|
||||
static string rxurcall_s;
|
||||
static std::string rxurcall_s;
|
||||
static void rxurcall(void *)
|
||||
{
|
||||
txtSENDTO->value(rxurcall_s.c_str());
|
||||
rxurcall_s.clear();
|
||||
}
|
||||
|
||||
void rxUrCall(string s)
|
||||
void rxUrCall(std::string s)
|
||||
{
|
||||
rxurcall_s = s;
|
||||
Fl::awake(rxurcall);
|
||||
}
|
||||
|
||||
string flmsg_trx()
|
||||
std::string flmsg_trx()
|
||||
{
|
||||
return xml_fldigi_trx();
|
||||
}
|
||||
|
||||
float flmsg_xmt_time(string s)
|
||||
float flmsg_xmt_time(std::string s)
|
||||
{
|
||||
float xfr_time = 0, overhead;
|
||||
float rsid_time = 3.0;
|
||||
|
|
|
|||
|
|
@ -77,14 +77,14 @@ using namespace std;
|
|||
|
||||
// blankform fields
|
||||
|
||||
string blankbuffer;
|
||||
string def_blank_filename = "";
|
||||
string base_blank_filename = "";
|
||||
string def_blank_TemplateName = "";
|
||||
std::string blankbuffer;
|
||||
std::string def_blank_filename = "";
|
||||
std::string base_blank_filename = "";
|
||||
std::string def_blank_TemplateName = "";
|
||||
|
||||
string blank_msg = ":mg:";
|
||||
string ablank_msg = "<mg:";
|
||||
string blank_field;
|
||||
std::string blank_msg = ":mg:";
|
||||
std::string ablank_msg = "<mg:";
|
||||
std::string blank_field;
|
||||
|
||||
bool using_blank_template = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string cap105_base_filename = "";
|
||||
string cap105_def_filename = "";
|
||||
string cap105_def_template_name = "";
|
||||
std::string cap105_base_filename = "";
|
||||
std::string cap105_def_filename = "";
|
||||
std::string cap105_def_template_name = "";
|
||||
|
||||
static string cap105_buffer;
|
||||
|
||||
|
|
@ -84,21 +84,21 @@ static string cap105_buffer;
|
|||
const char *cap105_s_prec[] = {"ROUTINE","PRIORITY","IMMEDIATE","FLASH"};
|
||||
const char cap105_prec_items[] = "ROUTINE|PRIORITY|IMMEDIATE|FLASH";
|
||||
|
||||
string cap105_nbr = ":msg nbr:";
|
||||
string cap105_prec = ":prec:";
|
||||
string cap105_dtm = ":dtm:";
|
||||
string cap105_from = ":from:";
|
||||
string cap105_to = ":to:";
|
||||
string cap105_info = ":info:";
|
||||
string cap105_subj = ":subj:";
|
||||
string cap105_grpcnt = ":grpcnt:";
|
||||
string cap105_msg = ":msgtxt:";
|
||||
string cap105_rcvd_fm = ":rcvd_fm:";
|
||||
string cap105_sent_to = ":sent_to:";
|
||||
string cap105_rcvd_dtm = ":rcvd_dtm:";
|
||||
string cap105_sent_dtm = ":sent_dtm:";
|
||||
string cap105_rcvop = ":rcvop:";
|
||||
string cap105_sendop = ":sendop:";
|
||||
std::string cap105_nbr = ":msg nbr:";
|
||||
std::string cap105_prec = ":prec:";
|
||||
std::string cap105_dtm = ":dtm:";
|
||||
std::string cap105_from = ":from:";
|
||||
std::string cap105_to = ":to:";
|
||||
std::string cap105_info = ":info:";
|
||||
std::string cap105_subj = ":subj:";
|
||||
std::string cap105_grpcnt = ":grpcnt:";
|
||||
std::string cap105_msg = ":msgtxt:";
|
||||
std::string cap105_rcvd_fm = ":rcvd_fm:";
|
||||
std::string cap105_sent_to = ":sent_to:";
|
||||
std::string cap105_rcvd_dtm = ":rcvd_dtm:";
|
||||
std::string cap105_sent_dtm = ":sent_dtm:";
|
||||
std::string cap105_rcvop = ":rcvop:";
|
||||
std::string cap105_sendop = ":sendop:";
|
||||
|
||||
//struct FIELD { string f_type; string f_data; void **w; char w_type; };
|
||||
FIELD cap105_fields[] = {
|
||||
|
|
@ -639,9 +639,9 @@ void cap105_cb_html()
|
|||
cap105_cb_check();
|
||||
string form = cap105_html_template;
|
||||
|
||||
string pg = ":pg:";
|
||||
string pgnr = ":npgs:";
|
||||
string pgone = "1";
|
||||
std::string pg = ":pg:";
|
||||
std::string pgnr = ":npgs:";
|
||||
std::string pgone = "1";
|
||||
replacestr( form, pg, pgone);
|
||||
replacestr( form, pgnr, pgone);
|
||||
for (int i = 0; i < cap105_num_fields; i++) {
|
||||
|
|
|
|||
|
|
@ -77,42 +77,42 @@ using namespace std;
|
|||
// ics 110 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string cap110_mission_nbr = ":mnbr:";
|
||||
string cap110_station = ":sta:";
|
||||
string cap110_date = ":date:";
|
||||
string cap110_ds_a = ":ds_a:";
|
||||
string cap110_ds_b = ":ds_b:";
|
||||
string cap110_ds_c = ":ds_c:";
|
||||
string cap110_ds_d = ":ds_d:";
|
||||
string cap110_ds_e = ":ds_e:";
|
||||
string cap110_ds_f = ":ds_f:";
|
||||
std::string cap110_mission_nbr = ":mnbr:";
|
||||
std::string cap110_station = ":sta:";
|
||||
std::string cap110_date = ":date:";
|
||||
std::string cap110_ds_a = ":ds_a:";
|
||||
std::string cap110_ds_b = ":ds_b:";
|
||||
std::string cap110_ds_c = ":ds_c:";
|
||||
std::string cap110_ds_d = ":ds_d:";
|
||||
std::string cap110_ds_e = ":ds_e:";
|
||||
std::string cap110_ds_f = ":ds_f:";
|
||||
|
||||
string cap110_comm_time = ":time[n]:"; // 23
|
||||
string cap110_comm_chref = ":chref[n]:"; // 23
|
||||
string cap110_comm_call = ":call[n]:"; // 23
|
||||
string cap110_comm_rem = ":rem[n]:"; // 23
|
||||
std::string cap110_comm_time = ":time[n]:"; // 23
|
||||
std::string cap110_comm_chref = ":chref[n]:"; // 23
|
||||
std::string cap110_comm_call = ":call[n]:"; // 23
|
||||
std::string cap110_comm_rem = ":rem[n]:"; // 23
|
||||
|
||||
string s110_mission_nbr;
|
||||
string s110_station;
|
||||
string s110_date;
|
||||
string s110_ds_a;
|
||||
string s110_ds_b;
|
||||
string s110_ds_c;
|
||||
string s110_ds_d;
|
||||
string s110_ds_e;
|
||||
string s110_ds_f;
|
||||
std::string s110_mission_nbr;
|
||||
std::string s110_station;
|
||||
std::string s110_date;
|
||||
std::string s110_ds_a;
|
||||
std::string s110_ds_b;
|
||||
std::string s110_ds_c;
|
||||
std::string s110_ds_d;
|
||||
std::string s110_ds_e;
|
||||
std::string s110_ds_f;
|
||||
|
||||
string s110_comm_time[23];
|
||||
string s110_comm_call[23];
|
||||
string s110_comm_chref[23];
|
||||
string s110_comm_rem[23];
|
||||
std::string s110_comm_time[23];
|
||||
std::string s110_comm_call[23];
|
||||
std::string s110_comm_chref[23];
|
||||
std::string s110_comm_rem[23];
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buff_c110;
|
||||
string cap110_def_filename= "";
|
||||
string cap110_base_filename = "";
|
||||
string cap110_def_template_name = "";
|
||||
std::string buff_c110;
|
||||
std::string cap110_def_filename= "";
|
||||
std::string cap110_base_filename = "";
|
||||
std::string cap110_def_template_name = "";
|
||||
bool using_cap110_template = false;
|
||||
|
||||
void cap110_set_date()
|
||||
|
|
@ -220,7 +220,7 @@ void clear_110_form()
|
|||
update_110form();
|
||||
}
|
||||
|
||||
string &cap110_nn(string & subst, int n)
|
||||
std::string &cap110_nn(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
static string ics;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ int cap_bptr[23] = {\
|
|||
void cap110_changed(Fl_Widget *w, void *)
|
||||
{
|
||||
Fl_Input2 *inp = (Fl_Input2 *)w;
|
||||
string s = inp->value();
|
||||
std::string s = inp->value();
|
||||
int len = s.length();
|
||||
int maxlen = 1000;
|
||||
if (inp == txt_110_mission_nbr) maxlen = 14;
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@ using namespace std;
|
|||
|
||||
// csvform fields
|
||||
|
||||
string csvbuffer;
|
||||
string def_csv_filename = "";
|
||||
string base_csv_filename = "";
|
||||
string def_csv_TemplateName = "";
|
||||
std::string csvbuffer;
|
||||
std::string def_csv_filename = "";
|
||||
std::string base_csv_filename = "";
|
||||
std::string def_csv_TemplateName = "";
|
||||
|
||||
string csv_title = ":TITLE:";
|
||||
string csv_msg = ":mg:";
|
||||
string csv_field;
|
||||
std::string csv_title = ":TITLE:";
|
||||
std::string csv_msg = ":mg:";
|
||||
std::string csv_field;
|
||||
|
||||
bool using_csv_template = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "flmsg_dialog.h"
|
||||
#include "flmsg.h"
|
||||
|
||||
extern void csv_editor(string);
|
||||
extern void csv_editor(std::string);
|
||||
|
||||
Fl_Group *tab_csv = (Fl_Group *)0;
|
||||
|
||||
|
|
|
|||
|
|
@ -158,19 +158,19 @@ struct NAME_VALUE {
|
|||
|
||||
// customform fields
|
||||
|
||||
string custombuffer;
|
||||
string def_custom_filename = "";
|
||||
string base_custom_filename = "";
|
||||
string def_custom_TemplateName = "";
|
||||
std::string custombuffer;
|
||||
std::string def_custom_filename = "";
|
||||
std::string base_custom_filename = "";
|
||||
std::string def_custom_TemplateName = "";
|
||||
|
||||
string custom_title = ":TITLE:";
|
||||
string custom_msg = ":mg:";
|
||||
string custom_field;
|
||||
std::string custom_title = ":TITLE:";
|
||||
std::string custom_msg = ":mg:";
|
||||
std::string custom_field;
|
||||
|
||||
std::vector<NAME_VALUE> name_values;
|
||||
|
||||
string html_form;
|
||||
string edit_txt;
|
||||
std::string html_form;
|
||||
std::string edit_txt;
|
||||
|
||||
void escape(string &s)
|
||||
{
|
||||
|
|
@ -1263,11 +1263,11 @@ void cb_custom_textout()
|
|||
// Support for transfering / receiving custom FORM, html files
|
||||
//==============================================================================
|
||||
|
||||
string transfer_custom_buffer;
|
||||
string def_custom_transfer_filename;
|
||||
std::string transfer_custom_buffer;
|
||||
std::string def_custom_transfer_filename;
|
||||
|
||||
string def_custom_rx_filename;
|
||||
string receive_custom_buffer;
|
||||
std::string def_custom_rx_filename;
|
||||
std::string receive_custom_buffer;
|
||||
|
||||
void read_custom_transfer_buffer(string data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Fl_Button *btn_custom_view = (Fl_Button *)0;
|
|||
static void cb_btn_custom_edit(Fl_Button*, void*) {
|
||||
if (custom_select < 0) return;
|
||||
handle_type = HANDLE_EDIT;
|
||||
string url = "http://127.0.0.1:";
|
||||
std::string url = "http://127.0.0.1:";
|
||||
url.append(sz_srvr_portnbr);
|
||||
open_url(url.c_str());
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ static void cb_btn_custom_edit(Fl_Button*, void*) {
|
|||
static void cb_btn_custom_view(Fl_Button*, void*) {
|
||||
if (custom_select < 0) return;
|
||||
handle_type = HANDLE_VIEW;
|
||||
string url = "http://127.0.0.1:";
|
||||
std::string url = "http://127.0.0.1:";
|
||||
url.append(sz_srvr_portnbr);
|
||||
open_url(url.c_str());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void *poll_server(void *);
|
|||
int start_web_server();
|
||||
void close_server();
|
||||
char *mongoose_msg;
|
||||
string mongoose_msgs;
|
||||
std::string mongoose_msgs;
|
||||
|
||||
int srvr_portnbr = 8080;
|
||||
char sz_srvr_portnbr[6];
|
||||
|
|
@ -148,9 +148,9 @@ bool printme = false;
|
|||
bool exit_after_print = false;
|
||||
int selected_form = NONE;
|
||||
|
||||
string title;
|
||||
std::string title;
|
||||
|
||||
string errtext;
|
||||
std::string errtext;
|
||||
|
||||
// fldigi, flmsg share a common files directory structure
|
||||
|
||||
|
|
@ -160,32 +160,32 @@ string errtext;
|
|||
string FLMSG_dir_default = "$HOME/.nbems/";
|
||||
#endif
|
||||
|
||||
string FLMSG_dir = "";
|
||||
string ARQ_dir = "";
|
||||
string ARQ_files_dir = "";
|
||||
string ARQ_recv_dir = "";
|
||||
string ARQ_send_dir = "";
|
||||
string WRAP_dir = "";
|
||||
string WRAP_recv_dir = "";
|
||||
string WRAP_send_dir = "";
|
||||
std::string FLMSG_dir = "";
|
||||
std::string ARQ_dir = "";
|
||||
std::string ARQ_files_dir = "";
|
||||
std::string ARQ_recv_dir = "";
|
||||
std::string ARQ_send_dir = "";
|
||||
std::string WRAP_dir = "";
|
||||
std::string WRAP_recv_dir = "";
|
||||
std::string WRAP_send_dir = "";
|
||||
//string WRAP_auto_dir = "";
|
||||
string ICS_dir = "";
|
||||
string ICS_msg_dir = "";
|
||||
string ICS_tmp_dir = "";
|
||||
string CSV_dir = "";
|
||||
string CUSTOM_dir = "";
|
||||
string XFR_dir = "";
|
||||
string FLMSG_temp_dir = "";
|
||||
string FLMSG_log_dir = "";
|
||||
string FLMSG_custom_dir = "";
|
||||
std::string ICS_dir = "";
|
||||
std::string ICS_msg_dir = "";
|
||||
std::string ICS_tmp_dir = "";
|
||||
std::string CSV_dir = "";
|
||||
std::string CUSTOM_dir = "";
|
||||
std::string XFR_dir = "";
|
||||
std::string FLMSG_temp_dir = "";
|
||||
std::string FLMSG_log_dir = "";
|
||||
std::string FLMSG_custom_dir = "";
|
||||
|
||||
string cmd_fname = "";
|
||||
std::string cmd_fname = "";
|
||||
|
||||
string TITLE = ":TITLE:";
|
||||
std::string TITLE = ":TITLE:";
|
||||
|
||||
string evalstr = "";
|
||||
std::string evalstr = "";
|
||||
|
||||
string parse_info = "";
|
||||
std::string parse_info = "";
|
||||
|
||||
//======================================================================
|
||||
// custom edit/view only program use
|
||||
|
|
@ -202,8 +202,8 @@ bool update_custom = false;
|
|||
// header fields
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
string hdr_from = "";
|
||||
string hdr_edit = "";
|
||||
std::string hdr_from = "";
|
||||
std::string hdr_edit = "";
|
||||
static string szFrom = ":hdr_fm:";
|
||||
static string szEdit = ":hdr_ed:";
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ bool check_mycall()
|
|||
}
|
||||
|
||||
// create flmsg line output for string data
|
||||
string lineout(string &field, string &data)
|
||||
std::string lineout(string &field, string &data)
|
||||
{
|
||||
static string sout;
|
||||
static char sznum[80];
|
||||
|
|
@ -233,7 +233,7 @@ string lineout(string &field, string &data)
|
|||
return sout;
|
||||
}
|
||||
// create flmsg line output for binary data
|
||||
string binout( string &field, bool &data)
|
||||
std::string binout( string &field, bool &data)
|
||||
{
|
||||
static string sout;
|
||||
if (!data) return "";
|
||||
|
|
@ -251,7 +251,7 @@ void clear_header()
|
|||
hdr_edit.clear();
|
||||
}
|
||||
|
||||
string header(const char *msgtype )
|
||||
std::string header(const char *msgtype )
|
||||
{
|
||||
string hdr;
|
||||
hdr.assign("<flmsg>").append (PACKAGE_VERSION).append("\n");
|
||||
|
|
@ -328,7 +328,7 @@ void update_header(hdr_reason reason)
|
|||
}
|
||||
|
||||
// find string data associated with a field specifier
|
||||
string findstr(string &haystack, string &needle)
|
||||
std::string findstr(string &haystack, string &needle)
|
||||
{
|
||||
size_t p = haystack.find(needle, 0);
|
||||
if (p == string::npos) return "";
|
||||
|
|
@ -611,7 +611,7 @@ char *named_file()
|
|||
|
||||
void update_sernbr ()
|
||||
{
|
||||
string dfname = FLMSG_dir;
|
||||
std::string dfname = FLMSG_dir;
|
||||
dfname.append("flmsg.sernbrs");
|
||||
FILE *debug_file = fl_fopen(dfname.c_str(), "a");
|
||||
int n = atoi(progStatus.sernbr.c_str());
|
||||
|
|
@ -2336,7 +2336,7 @@ void checkdirectories(void)
|
|||
FLMSG_dirs[i].dir.assign(FLMSG_dir).append(FLMSG_dirs[i].suffix).append(PATH_SEP);
|
||||
|
||||
if ((r = mkdir(FLMSG_dirs[i].dir.c_str(), 0777)) == -1 && errno != EEXIST) {
|
||||
cerr << _("Could not make directory") << ' ' << FLMSG_dirs[i].dir
|
||||
std::cerr << _("Could not make directory") << ' ' << FLMSG_dirs[i].dir
|
||||
<< ": " << strerror(errno) << '\n';
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -2365,7 +2365,7 @@ void checkdirectories(void)
|
|||
|
||||
r = mkdir(MSG_dirs[i].dir.c_str(), 0777);
|
||||
if (r == -1 && errno != EEXIST) {
|
||||
cerr << _("Could not make directory") << ' ' << MSG_dirs[i].dir
|
||||
std::cerr << _("Could not make directory") << ' ' << MSG_dirs[i].dir
|
||||
<< ": " << strerror(errno) << '\n';
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,9 +116,9 @@ void cb_btn_transfer_size(Fl_Button *, void*);
|
|||
#define NO_OF_MODEMS 200
|
||||
char *s_modes[NO_OF_MODEMS];
|
||||
|
||||
string valid_modes;
|
||||
std::string valid_modes;
|
||||
|
||||
void update_cbo_modes(string &fldigi_modes)
|
||||
void update_cbo_modes(std::string &fldigi_modes)
|
||||
{
|
||||
memset(s_modes, 0, sizeof(s_modes));
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ void update_cbo_modes(string &fldigi_modes)
|
|||
|
||||
for (int i = 0; i < num_modes; i++) {
|
||||
m = modem_at_index(i);
|
||||
if (fldigi_modes.find(m) != string::npos) {
|
||||
if (fldigi_modes.find(m) != std::string::npos) {
|
||||
s_modes[j] = (char *) m;
|
||||
cbo_modes->add(s_modes[j]);
|
||||
valid_modes.append(s_modes[j]).append("|");
|
||||
|
|
@ -147,7 +147,7 @@ void update_cbo_modes(string &fldigi_modes)
|
|||
|
||||
void init_cbo_modes()
|
||||
{
|
||||
string min_modes = "";
|
||||
std::string min_modes = "";
|
||||
min_modes.append("8PSK125|8PSK250|8PSK500|8PSK1000|8PSK1333");
|
||||
min_modes.append("|8PSK125F|8PSK125FL|8PSK250F|8PSK500F|8PSK1000F|8PSK1200F|8PSK1333F");
|
||||
min_modes.append("|BPSK31|BPSK63|BPSK63F|BPSK125|BPSK250|BPSK500|BPSK1000");
|
||||
|
|
@ -168,9 +168,9 @@ void init_cbo_modes()
|
|||
update_cbo_modes(min_modes);
|
||||
}
|
||||
|
||||
bool valid_mode_check(string &md)
|
||||
bool valid_mode_check(std::string &md)
|
||||
{
|
||||
return (valid_modes.find(md) != string::npos);
|
||||
return (valid_modes.find(md) != std::string::npos);
|
||||
}
|
||||
|
||||
void clear_estimate() {
|
||||
|
|
@ -320,7 +320,7 @@ static void cb_mnuOptions(Fl_Menu_*, void*) {
|
|||
}
|
||||
|
||||
static void cb_mnuHeaders(Fl_Menu_*, void*) {
|
||||
string tmp = hdr_from;
|
||||
std::string tmp = hdr_from;
|
||||
while (tmp.length() && tmp[0] == '\n') tmp.erase(0,1);
|
||||
txt_hdr_from->value(tmp.c_str());
|
||||
|
||||
|
|
@ -911,7 +911,7 @@ CUSTOM_PAIRS custom_pairs[NBR_CUSTOM_MENUS];
|
|||
extern void extract_fields();
|
||||
|
||||
static void cb_mnuCustomFormSelect(Fl_Menu_ *, void *d) {
|
||||
extern string edit_txt;
|
||||
extern std::string edit_txt;
|
||||
size_t n = (size_t)(d);
|
||||
custom_select = n;
|
||||
selected_form = CUSTOM;
|
||||
|
|
@ -946,8 +946,8 @@ void init_custom_menu()
|
|||
|
||||
void load_custom_menu()
|
||||
{
|
||||
static const string key1 = "<META NAME=\"EDITABLE\" CONTENT=\"true\">";
|
||||
static const string key2 = "<META NAME=\"MENU_ITEM\" CONTENT=";
|
||||
static const std::string key1 = "<META NAME=\"EDITABLE\" CONTENT=\"true\">";
|
||||
static const std::string key2 = "<META NAME=\"MENU_ITEM\" CONTENT=";
|
||||
guard_lock web_lock(&mutex_web_server);
|
||||
for (int i = 0; i < NBR_CUSTOM_MENUS; i++) {
|
||||
custom_menu[i].text = 0;
|
||||
|
|
@ -976,30 +976,30 @@ static const string key2 = "<META NAME=\"MENU_ITEM\" CONTENT=";
|
|||
DIR *cdir = opendir(CUSTOM_dir.c_str());
|
||||
if (!cdir) return;
|
||||
dirent *dentry = 0;
|
||||
string contents;
|
||||
string fname;
|
||||
string menu_name;
|
||||
ifstream in;
|
||||
std::string contents;
|
||||
std::string fname;
|
||||
std::string menu_name;
|
||||
std::ifstream in;
|
||||
char cin;
|
||||
dentry = readdir(cdir);
|
||||
while (dentry) {
|
||||
fname = CUSTOM_dir;
|
||||
fname.append(dentry->d_name);
|
||||
if (fname.find(".htm") != string::npos) {
|
||||
if (fname.find(".htm") != std::string::npos) {
|
||||
contents.clear();
|
||||
in.open(fname.c_str(), ios::in);
|
||||
in.open(fname.c_str(), std::ios::in);
|
||||
if (in) {
|
||||
while (in.get(cin))
|
||||
contents += cin;
|
||||
in.close();
|
||||
size_t p = string::npos;
|
||||
size_t p = std::string::npos;
|
||||
const char *ptr = strcasestr(contents.c_str(), key1.c_str());
|
||||
if (ptr) p = ptr - contents.c_str();
|
||||
if ( p != string::npos) {
|
||||
p = string::npos;
|
||||
if ( p != std::string::npos) {
|
||||
p = std::string::npos;
|
||||
ptr = strcasestr(contents.c_str(), key2.c_str());
|
||||
if (ptr) p = ptr - contents.c_str();
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
p += key2.length() + 1;
|
||||
contents.erase(0, p);
|
||||
p = contents.find("\"");
|
||||
|
|
@ -1052,11 +1052,11 @@ static const string key2 = "<META NAME=\"MENU_ITEM\" CONTENT=";
|
|||
|
||||
}
|
||||
|
||||
vector<string> custom_files;
|
||||
std::vector<std::string> custom_files;
|
||||
|
||||
void update_custom_transfer()
|
||||
{
|
||||
string current_selection = custom_selector->value();
|
||||
std::string current_selection = custom_selector->value();
|
||||
custom_files.clear();
|
||||
custom_selector->clear();
|
||||
|
||||
|
|
@ -1881,7 +1881,7 @@ Fl_Group *create_tab_radiogram(int X, int Y, int W, int H, const char *title)
|
|||
|
||||
void cb_find_roster()
|
||||
{
|
||||
string filename = ICS_dir;
|
||||
std::string filename = ICS_dir;
|
||||
filename.append("MARS_ROSTER.csv");
|
||||
|
||||
Fl_Native_File_Chooser native;
|
||||
|
|
@ -2271,7 +2271,7 @@ static void clear_cb(Fl_Widget* w, void*)
|
|||
btext->clear();
|
||||
}
|
||||
|
||||
void add_event(string s)
|
||||
void add_event(std::string s)
|
||||
{
|
||||
if (!btext) return;
|
||||
btext->add(s.c_str());
|
||||
|
|
@ -2303,7 +2303,7 @@ Fl_Button *btnShow = (Fl_Button *)0;
|
|||
Fl_Button *btnClearSelected = (Fl_Button *)0;
|
||||
Fl_Button *btnClearAll = (Fl_Button *)0;
|
||||
|
||||
void add_rcvd_msg(string s)
|
||||
void add_rcvd_msg(std::string s)
|
||||
{
|
||||
if (!rcvd_msgs_dialog) rcvd_msgs_dialog = create_rcvd_msgs_dialog();
|
||||
bmsgs->add(s.c_str());
|
||||
|
|
@ -2315,7 +2315,7 @@ void add_rcvd_msg(string s)
|
|||
void cb_view_msg(Fl_Button *w, void *d)
|
||||
{
|
||||
if (bmsgs->value() == 0) return;
|
||||
string pathname = ICS_msg_dir;
|
||||
std::string pathname = ICS_msg_dir;
|
||||
pathname.append(bmsgs->text(bmsgs->value()));
|
||||
|
||||
read_data_file(pathname);
|
||||
|
|
@ -2390,7 +2390,7 @@ void cb_custom_select(Fl_Button *w, void *d)
|
|||
custom_msg_dialog->hide();
|
||||
|
||||
handle_type = HANDLE_EDIT;
|
||||
string url = "http://127.0.0.1:";
|
||||
std::string url = "http://127.0.0.1:";
|
||||
url.append(sz_srvr_portnbr);
|
||||
open_url(url.c_str());
|
||||
}
|
||||
|
|
@ -2421,7 +2421,7 @@ Fl_Double_Window* create_custom_msgs_dialog()
|
|||
|
||||
extern void extract_fields();
|
||||
extern void exit_main(void *);
|
||||
extern string cmd_fname;
|
||||
extern std::string cmd_fname;
|
||||
|
||||
void cb_ve_combo(Fl_Widget *, void *d)
|
||||
{
|
||||
|
|
@ -2459,12 +2459,12 @@ void cb_ve_viewer(void *)
|
|||
if (event == FL_PASTE) {
|
||||
cmd_fname = Fl::event_text();
|
||||
size_t n;
|
||||
if ((n = cmd_fname.find("file:///")) != string::npos)
|
||||
if ((n = cmd_fname.find("file:///")) != std::string::npos)
|
||||
cmd_fname.erase(0, n + 7);
|
||||
if ((cmd_fname.find(":\\")) != string::npos || (cmd_fname.find("/") == 0)) {
|
||||
while ((n = cmd_fname.find('\n')) != string::npos)
|
||||
if ((cmd_fname.find(":\\")) != std::string::npos || (cmd_fname.find("/") == 0)) {
|
||||
while ((n = cmd_fname.find('\n')) != std::string::npos)
|
||||
cmd_fname.erase(n, 1);
|
||||
while ((n = cmd_fname.find('\r')) != string::npos)
|
||||
while ((n = cmd_fname.find('\r')) != std::string::npos)
|
||||
cmd_fname.erase(n, 1);
|
||||
print_and_exit();
|
||||
} else
|
||||
|
|
@ -2472,7 +2472,7 @@ void cb_ve_viewer(void *)
|
|||
return;
|
||||
}
|
||||
|
||||
string viewer_filename = ICS_msg_dir;
|
||||
std::string viewer_filename = ICS_msg_dir;
|
||||
|
||||
Fl_Native_File_Chooser native;
|
||||
|
||||
|
|
@ -2502,12 +2502,12 @@ void cb_ve_editor(void *)
|
|||
def_custom_filename = Fl::event_text();
|
||||
|
||||
size_t n;
|
||||
if ((n = def_custom_filename.find("file:///")) != string::npos)
|
||||
if ((n = def_custom_filename.find("file:///")) != std::string::npos)
|
||||
def_custom_filename.erase(0, n + 7);
|
||||
if ((def_custom_filename.find(":\\")) != string::npos || (def_custom_filename.find("/") == 0)) {
|
||||
while ((n = def_custom_filename.find('\n')) != string::npos)
|
||||
if ((def_custom_filename.find(":\\")) != std::string::npos || (def_custom_filename.find("/") == 0)) {
|
||||
while ((n = def_custom_filename.find('\n')) != std::string::npos)
|
||||
def_custom_filename.erase(n, 1);
|
||||
while ((n = def_custom_filename.find('\r')) != string::npos)
|
||||
while ((n = def_custom_filename.find('\r')) != std::string::npos)
|
||||
def_custom_filename.erase(n, 1);
|
||||
if (def_custom_filename.find("k2s") == std::string::npos) {
|
||||
fl_alert2("Use expert dialog to edit built-in forms!");
|
||||
|
|
@ -2518,7 +2518,7 @@ void cb_ve_editor(void *)
|
|||
using_custom_template = false;
|
||||
update_custom = true;
|
||||
handle_type = HANDLE_EDIT;
|
||||
string url = "http://127.0.0.1:";
|
||||
std::string url = "http://127.0.0.1:";
|
||||
url.append(sz_srvr_portnbr);
|
||||
open_url(url.c_str());
|
||||
} else
|
||||
|
|
@ -2553,7 +2553,7 @@ void cb_ve_editor(void *)
|
|||
using_custom_template = false;
|
||||
update_custom = true;
|
||||
handle_type = HANDLE_EDIT;
|
||||
string url = "http://127.0.0.1:";
|
||||
std::string url = "http://127.0.0.1:";
|
||||
url.append(sz_srvr_portnbr);
|
||||
open_url(url.c_str());
|
||||
break;
|
||||
|
|
@ -2567,13 +2567,13 @@ void cb_ve_Exit(Fl_Widget *, void *d)
|
|||
|
||||
void cb_ve_templates(Fl_Widget *, void *d)
|
||||
{
|
||||
string dir = CUSTOM_dir;
|
||||
std::string dir = CUSTOM_dir;
|
||||
open_url(dir.c_str(), 1);
|
||||
}
|
||||
|
||||
void cb_ve_messages(Fl_Widget *, void *d)
|
||||
{
|
||||
string dir = ICS_msg_dir;
|
||||
std::string dir = ICS_msg_dir;
|
||||
open_url(dir.c_str(), 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,42 +76,42 @@ using namespace std;
|
|||
// netlog field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string netlog_event = ":inc:";
|
||||
string netlog_date_fm = ":dfm:";
|
||||
string netlog_time_fm = ":tfm:";
|
||||
string netlog_date_to = ":dto:";
|
||||
string netlog_time_to = ":tto:";
|
||||
string netlog_prepared_by = ":pre:";
|
||||
string netlog_preparer_date_time = ":dtm:";
|
||||
string netlog_radio_net = ":net:";
|
||||
string netlog_radio_operator = ":opr:";
|
||||
std::string netlog_event = ":inc:";
|
||||
std::string netlog_date_fm = ":dfm:";
|
||||
std::string netlog_time_fm = ":tfm:";
|
||||
std::string netlog_date_to = ":dto:";
|
||||
std::string netlog_time_to = ":tto:";
|
||||
std::string netlog_prepared_by = ":pre:";
|
||||
std::string netlog_preparer_date_time = ":dtm:";
|
||||
std::string netlog_radio_net = ":net:";
|
||||
std::string netlog_radio_operator = ":opr:";
|
||||
|
||||
string netlog_comm_msg = ":msg[n]:"; // 60
|
||||
string netlog_comm_to = ":to[n]:"; // 60
|
||||
string netlog_comm_from = ":fm[n]:"; // 60
|
||||
string netlog_comm_time = ":tm[n]:"; // 60
|
||||
std::string netlog_comm_msg = ":msg[n]:"; // 60
|
||||
std::string netlog_comm_to = ":to[n]:"; // 60
|
||||
std::string netlog_comm_from = ":fm[n]:"; // 60
|
||||
std::string netlog_comm_time = ":tm[n]:"; // 60
|
||||
|
||||
string snetlog_event;
|
||||
string snetlog_date_fm;
|
||||
string snetlog_time_fm;
|
||||
string snetlog_date_to;
|
||||
string snetlog_time_to;
|
||||
string snetlog_prepared_by;
|
||||
string snetlog_preparer_date_time;
|
||||
string snetlog_radio_net;
|
||||
string snetlog_radio_operator;
|
||||
std::string snetlog_event;
|
||||
std::string snetlog_date_fm;
|
||||
std::string snetlog_time_fm;
|
||||
std::string snetlog_date_to;
|
||||
std::string snetlog_time_to;
|
||||
std::string snetlog_prepared_by;
|
||||
std::string snetlog_preparer_date_time;
|
||||
std::string snetlog_radio_net;
|
||||
std::string snetlog_radio_operator;
|
||||
|
||||
string snetlog_comm_time[60];
|
||||
string snetlog_comm_from[60];
|
||||
string snetlog_comm_msg[60];
|
||||
string snetlog_comm_to[60];
|
||||
std::string snetlog_comm_time[60];
|
||||
std::string snetlog_comm_from[60];
|
||||
std::string snetlog_comm_msg[60];
|
||||
std::string snetlog_comm_to[60];
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buffnetlog;
|
||||
string def_netlog_filename = "";
|
||||
string base_netlog_filename = "";
|
||||
string def_netlog_TemplateName = "";
|
||||
std::string buffnetlog;
|
||||
std::string def_netlog_filename = "";
|
||||
std::string base_netlog_filename = "";
|
||||
std::string def_netlog_TemplateName = "";
|
||||
bool using_netlog_template = false;
|
||||
|
||||
void cb_netlog_set_date_fm()
|
||||
|
|
@ -238,7 +238,7 @@ void clear_netlog_form()
|
|||
update_netlogform();
|
||||
}
|
||||
|
||||
string &netlog_nn(string & subst, int n)
|
||||
std::string &netlog_nn(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
static string nlog;
|
||||
|
|
|
|||
|
|
@ -76,101 +76,101 @@ using namespace std;
|
|||
// hics 203 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string hics203_tag_incident = ":inc:";
|
||||
string hics203_tag_date = ":dat:";
|
||||
string hics203_tag_time = ":tim:";
|
||||
string hics203_tag_op_period = ":opp:";
|
||||
string hics203_tag_incident_commander = ":icc:";
|
||||
string hics203_tag_incident_safety_officer = ":ics:";
|
||||
string hics203_tag_incident_info_officer = ":ici:";
|
||||
string hics203_tag_liaison_officer = ":icl:";
|
||||
string hics203_tag_prepared_by = ":pre:";
|
||||
string hics203_tag_facility = ":facility:";
|
||||
std::string hics203_tag_incident = ":inc:";
|
||||
std::string hics203_tag_date = ":dat:";
|
||||
std::string hics203_tag_time = ":tim:";
|
||||
std::string hics203_tag_op_period = ":opp:";
|
||||
std::string hics203_tag_incident_commander = ":icc:";
|
||||
std::string hics203_tag_incident_safety_officer = ":ics:";
|
||||
std::string hics203_tag_incident_info_officer = ":ici:";
|
||||
std::string hics203_tag_liaison_officer = ":icl:";
|
||||
std::string hics203_tag_prepared_by = ":pre:";
|
||||
std::string hics203_tag_facility = ":facility:";
|
||||
|
||||
string hics203_tag_tech_spc = ":tech_spc[n]:"; // 6
|
||||
std::string hics203_tag_tech_spc = ":tech_spc[n]:"; // 6
|
||||
|
||||
string hics203_tag_ops_chief = ":ops_chief:";
|
||||
string hics203_tag_bus_brch = ":bus_brch:";
|
||||
string hics203_tag_stg_mgr = ":stg_mgr:";
|
||||
string hics203_tag_med_care_brch = ":med_care_brch:";
|
||||
string hics203_tag_infr_brch = ":infr_brch:";
|
||||
string hics203_tag_sec_brch = ":sec_brch:";
|
||||
string hics203_tag_hazmat_brch = ":hazmat_brch:";
|
||||
string hics203_tag_ops_other = ":ops_other:";
|
||||
std::string hics203_tag_ops_chief = ":ops_chief:";
|
||||
std::string hics203_tag_bus_brch = ":bus_brch:";
|
||||
std::string hics203_tag_stg_mgr = ":stg_mgr:";
|
||||
std::string hics203_tag_med_care_brch = ":med_care_brch:";
|
||||
std::string hics203_tag_infr_brch = ":infr_brch:";
|
||||
std::string hics203_tag_sec_brch = ":sec_brch:";
|
||||
std::string hics203_tag_hazmat_brch = ":hazmat_brch:";
|
||||
std::string hics203_tag_ops_other = ":ops_other:";
|
||||
|
||||
string hics203_tag_fin_chief = ":fin_chief:";
|
||||
string hics203_tag_cost_unit = ":cost_unit:";
|
||||
string hics203_tag_proc_unit = ":proc_unit:";
|
||||
string hics203_tag_comp_unit = ":comp_unit:";
|
||||
string hics203_tag_time_unit = ":time_unit:";
|
||||
string hics203_tag_fin_other = ":fin_other:";
|
||||
std::string hics203_tag_fin_chief = ":fin_chief:";
|
||||
std::string hics203_tag_cost_unit = ":cost_unit:";
|
||||
std::string hics203_tag_proc_unit = ":proc_unit:";
|
||||
std::string hics203_tag_comp_unit = ":comp_unit:";
|
||||
std::string hics203_tag_time_unit = ":time_unit:";
|
||||
std::string hics203_tag_fin_other = ":fin_other:";
|
||||
|
||||
string hics203_tag_planning_chief = ":planning_chief:";
|
||||
string hics203_tag_res_unit = ":res_unit:";
|
||||
string hics203_tag_sit_unit = ":sit_unit:";
|
||||
string hics203_tag_doc_unit = ":doc_unit:";
|
||||
string hics203_tag_dem_unit = ":dem_unit:";
|
||||
string hics203_tag_planning_other = ":planning_other:";
|
||||
std::string hics203_tag_planning_chief = ":planning_chief:";
|
||||
std::string hics203_tag_res_unit = ":res_unit:";
|
||||
std::string hics203_tag_sit_unit = ":sit_unit:";
|
||||
std::string hics203_tag_doc_unit = ":doc_unit:";
|
||||
std::string hics203_tag_dem_unit = ":dem_unit:";
|
||||
std::string hics203_tag_planning_other = ":planning_other:";
|
||||
|
||||
string hics203_tag_log_chief = ":log_chief:";
|
||||
string hics203_tag_sup_brch = ":sup_brch:";
|
||||
string hics203_tag_svc_brch = ":svc_brch:";
|
||||
string hics203_tag_log_other = ":log_other:";
|
||||
std::string hics203_tag_log_chief = ":log_chief:";
|
||||
std::string hics203_tag_sup_brch = ":sup_brch:";
|
||||
std::string hics203_tag_svc_brch = ":svc_brch:";
|
||||
std::string hics203_tag_log_other = ":log_other:";
|
||||
|
||||
string hics203_tag_hcc_agency = ":hcc_agency:";
|
||||
string hics203_tag_hcc_rep = ":hcc_rep:";
|
||||
string hics203_tag_ext_loc = ":ext_loc:";
|
||||
string hics203_tag_ext_rep = ":ext_rep:";
|
||||
std::string hics203_tag_hcc_agency = ":hcc_agency:";
|
||||
std::string hics203_tag_hcc_rep = ":hcc_rep:";
|
||||
std::string hics203_tag_ext_loc = ":ext_loc:";
|
||||
std::string hics203_tag_ext_rep = ":ext_rep:";
|
||||
|
||||
string hics203_incident;
|
||||
string hics203_date;
|
||||
string hics203_time;
|
||||
string hics203_op_period;
|
||||
string hics203_incident_commander;
|
||||
string hics203_incident_safety_officer;
|
||||
string hics203_incident_info_officer;
|
||||
string hics203_liaison_officer;
|
||||
string hics203_prepared_by;
|
||||
string hics203_facility;
|
||||
std::string hics203_incident;
|
||||
std::string hics203_date;
|
||||
std::string hics203_time;
|
||||
std::string hics203_op_period;
|
||||
std::string hics203_incident_commander;
|
||||
std::string hics203_incident_safety_officer;
|
||||
std::string hics203_incident_info_officer;
|
||||
std::string hics203_liaison_officer;
|
||||
std::string hics203_prepared_by;
|
||||
std::string hics203_facility;
|
||||
|
||||
string hics203_fin_chief;
|
||||
string hics203_fin_other;
|
||||
string hics203_time_unit;
|
||||
string hics203_proc_unit;
|
||||
string hics203_comp_unit;
|
||||
string hics203_cost_unit;
|
||||
std::string hics203_fin_chief;
|
||||
std::string hics203_fin_other;
|
||||
std::string hics203_time_unit;
|
||||
std::string hics203_proc_unit;
|
||||
std::string hics203_comp_unit;
|
||||
std::string hics203_cost_unit;
|
||||
|
||||
string hics203_tech_spc[6];
|
||||
std::string hics203_tech_spc[6];
|
||||
|
||||
string hics203_planning_chief;
|
||||
string hics203_planning_other;
|
||||
string hics203_res_unit;
|
||||
string hics203_sit_unit;
|
||||
string hics203_doc_unit;
|
||||
string hics203_dem_unit;
|
||||
string hics203_log_chief;
|
||||
string hics203_log_other;
|
||||
string hics203_log_sup_brch;
|
||||
string hics203_bus_brch;
|
||||
string hics203_stg_mgr;
|
||||
string hics203_med_care_brch;
|
||||
string hics203_infr_brch;
|
||||
string hics203_sec_brch;
|
||||
string hics203_hazmat_brch;
|
||||
string hics203_hcc_agency;
|
||||
string hics203_svc_brch;
|
||||
string hics203_hcc_rep;
|
||||
string hics203_ext_loc;
|
||||
string hics203_ext_rep;
|
||||
string hics203_ops_chief;
|
||||
string hics203_ops_other;
|
||||
std::string hics203_planning_chief;
|
||||
std::string hics203_planning_other;
|
||||
std::string hics203_res_unit;
|
||||
std::string hics203_sit_unit;
|
||||
std::string hics203_doc_unit;
|
||||
std::string hics203_dem_unit;
|
||||
std::string hics203_log_chief;
|
||||
std::string hics203_log_other;
|
||||
std::string hics203_log_sup_brch;
|
||||
std::string hics203_bus_brch;
|
||||
std::string hics203_stg_mgr;
|
||||
std::string hics203_med_care_brch;
|
||||
std::string hics203_infr_brch;
|
||||
std::string hics203_sec_brch;
|
||||
std::string hics203_hazmat_brch;
|
||||
std::string hics203_hcc_agency;
|
||||
std::string hics203_svc_brch;
|
||||
std::string hics203_hcc_rep;
|
||||
std::string hics203_ext_loc;
|
||||
std::string hics203_ext_rep;
|
||||
std::string hics203_ops_chief;
|
||||
std::string hics203_ops_other;
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string hics_buff203;
|
||||
string def_hics203_filename = "";
|
||||
string base_hics203_filename = "";
|
||||
string def_hics203_TemplateName = "";
|
||||
std::string hics_buff203;
|
||||
std::string def_hics203_filename = "";
|
||||
std::string base_hics203_filename = "";
|
||||
std::string def_hics203_TemplateName = "";
|
||||
bool using_hics203_template = false;
|
||||
|
||||
void cb_hics203_set_date()
|
||||
|
|
@ -455,7 +455,7 @@ void clear_hics203_form()
|
|||
}
|
||||
}
|
||||
|
||||
string &hics_n(string & subst, int n)
|
||||
std::string &hics_n(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
size_t pos = subst.find("[");
|
||||
|
|
|
|||
|
|
@ -73,119 +73,119 @@
|
|||
using namespace std;
|
||||
|
||||
// hics206 tag fields
|
||||
string h206_tag_name = ":1:";
|
||||
string h206_tag_date_prepared = ":2:";
|
||||
string h206_tag_time_prepared = ":3:";
|
||||
string h206_tag_period = ":4:";
|
||||
std::string h206_tag_name = ":1:";
|
||||
std::string h206_tag_date_prepared = ":2:";
|
||||
std::string h206_tag_time_prepared = ":3:";
|
||||
std::string h206_tag_period = ":4:";
|
||||
|
||||
string h206_tag_location = ":5:";
|
||||
string h206_tag_loc_contact = ":6:";
|
||||
string h206_tag_team_leader = ":7:";
|
||||
string h206_tag_team_contact = ":8:";
|
||||
string h206_tag_special_instructions = ":9:";
|
||||
std::string h206_tag_location = ":5:";
|
||||
std::string h206_tag_loc_contact = ":6:";
|
||||
std::string h206_tag_team_leader = ":7:";
|
||||
std::string h206_tag_team_contact = ":8:";
|
||||
std::string h206_tag_special_instructions = ":9:";
|
||||
|
||||
string h206_tag_md_do = ":10:";
|
||||
string h206_tag_litters = ":11:";
|
||||
string h206_tag_pa_np = ":14:";
|
||||
string h206_tag_portable = ":15:";
|
||||
string h206_tag_rn_lpn = ":18:";
|
||||
string h206_tag_transport = ":19:";
|
||||
string h206_tag_tech_cn = ":22:";
|
||||
string h206_tag_wheelchairs = ":23:";
|
||||
string h206_tag_team_other = ":26:";
|
||||
string h206_tag_transport_other = ":27:";
|
||||
std::string h206_tag_md_do = ":10:";
|
||||
std::string h206_tag_litters = ":11:";
|
||||
std::string h206_tag_pa_np = ":14:";
|
||||
std::string h206_tag_portable = ":15:";
|
||||
std::string h206_tag_rn_lpn = ":18:";
|
||||
std::string h206_tag_transport = ":19:";
|
||||
std::string h206_tag_tech_cn = ":22:";
|
||||
std::string h206_tag_wheelchairs = ":23:";
|
||||
std::string h206_tag_team_other = ":26:";
|
||||
std::string h206_tag_transport_other = ":27:";
|
||||
|
||||
string h206_tag_meds_1 = ":12:";
|
||||
string h206_tag_meds_2 = ":16:";
|
||||
string h206_tag_meds_3 = ":20:";
|
||||
string h206_tag_meds_4 = ":24:";
|
||||
string h206_tag_meds_5 = ":28:";
|
||||
string h206_tag_supp_1 = ":13:";
|
||||
string h206_tag_supp_2 = ":17:";
|
||||
string h206_tag_supp_3 = ":21:";
|
||||
string h206_tag_supp_4 = ":25:";
|
||||
string h206_tag_supp_5 = ":29:";
|
||||
std::string h206_tag_meds_1 = ":12:";
|
||||
std::string h206_tag_meds_2 = ":16:";
|
||||
std::string h206_tag_meds_3 = ":20:";
|
||||
std::string h206_tag_meds_4 = ":24:";
|
||||
std::string h206_tag_meds_5 = ":28:";
|
||||
std::string h206_tag_supp_1 = ":13:";
|
||||
std::string h206_tag_supp_2 = ":17:";
|
||||
std::string h206_tag_supp_3 = ":21:";
|
||||
std::string h206_tag_supp_4 = ":25:";
|
||||
std::string h206_tag_supp_5 = ":29:";
|
||||
|
||||
string h206_tag_site_1 = ":30:";
|
||||
string h206_tag_address_1 = ":31:";
|
||||
string h206_tag_phone_1 = ":32:";
|
||||
string h206_tag_spec_care_1 = ":33:";
|
||||
std::string h206_tag_site_1 = ":30:";
|
||||
std::string h206_tag_address_1 = ":31:";
|
||||
std::string h206_tag_phone_1 = ":32:";
|
||||
std::string h206_tag_spec_care_1 = ":33:";
|
||||
|
||||
string h206_tag_site_2 = ":34:";
|
||||
string h206_tag_address_2 = ":35:";
|
||||
string h206_tag_phone_2 = ":36:";
|
||||
string h206_tag_spec_care_2 = ":37:";
|
||||
std::string h206_tag_site_2 = ":34:";
|
||||
std::string h206_tag_address_2 = ":35:";
|
||||
std::string h206_tag_phone_2 = ":36:";
|
||||
std::string h206_tag_spec_care_2 = ":37:";
|
||||
|
||||
string h206_tag_site_3 = ":38:";
|
||||
string h206_tag_address_3 = ":39:";
|
||||
string h206_tag_phone_3 = ":40:";
|
||||
string h206_tag_spec_care_3 = ":41:";
|
||||
std::string h206_tag_site_3 = ":38:";
|
||||
std::string h206_tag_address_3 = ":39:";
|
||||
std::string h206_tag_phone_3 = ":40:";
|
||||
std::string h206_tag_spec_care_3 = ":41:";
|
||||
|
||||
string h206_tag_site_4 = ":42:";
|
||||
string h206_tag_address_4 = ":43:";
|
||||
string h206_tag_phone_4 = ":44:";
|
||||
string h206_tag_spec_care_4 = ":45:";
|
||||
std::string h206_tag_site_4 = ":42:";
|
||||
std::string h206_tag_address_4 = ":43:";
|
||||
std::string h206_tag_phone_4 = ":44:";
|
||||
std::string h206_tag_spec_care_4 = ":45:";
|
||||
|
||||
string h206_tag_preparer = ":46:";
|
||||
string h206_tag_facility = ":47:";
|
||||
std::string h206_tag_preparer = ":46:";
|
||||
std::string h206_tag_facility = ":47:";
|
||||
|
||||
string h206_name;
|
||||
string h206_period;
|
||||
string h206_date_prepared;
|
||||
string h206_time_prepared;
|
||||
std::string h206_name;
|
||||
std::string h206_period;
|
||||
std::string h206_date_prepared;
|
||||
std::string h206_time_prepared;
|
||||
|
||||
string h206_location;
|
||||
string h206_loc_contact;
|
||||
string h206_team_leader;
|
||||
string h206_team_contact;
|
||||
string h206_special_instructions;
|
||||
std::string h206_location;
|
||||
std::string h206_loc_contact;
|
||||
std::string h206_team_leader;
|
||||
std::string h206_team_contact;
|
||||
std::string h206_special_instructions;
|
||||
|
||||
string h206_md_do;
|
||||
string h206_litters;
|
||||
string h206_pa_np;
|
||||
string h206_portable;
|
||||
string h206_rn_lpn;
|
||||
string h206_transport;
|
||||
string h206_tech_cn;
|
||||
string h206_wheelchairs;
|
||||
string h206_team_other;
|
||||
string h206_transport_other;
|
||||
std::string h206_md_do;
|
||||
std::string h206_litters;
|
||||
std::string h206_pa_np;
|
||||
std::string h206_portable;
|
||||
std::string h206_rn_lpn;
|
||||
std::string h206_transport;
|
||||
std::string h206_tech_cn;
|
||||
std::string h206_wheelchairs;
|
||||
std::string h206_team_other;
|
||||
std::string h206_transport_other;
|
||||
|
||||
string h206_meds_1;
|
||||
string h206_meds_2;
|
||||
string h206_meds_3;
|
||||
string h206_meds_4;
|
||||
string h206_meds_5;
|
||||
string h206_supp_1;
|
||||
string h206_supp_2;
|
||||
string h206_supp_3;
|
||||
string h206_supp_4;
|
||||
string h206_supp_5;
|
||||
std::string h206_meds_1;
|
||||
std::string h206_meds_2;
|
||||
std::string h206_meds_3;
|
||||
std::string h206_meds_4;
|
||||
std::string h206_meds_5;
|
||||
std::string h206_supp_1;
|
||||
std::string h206_supp_2;
|
||||
std::string h206_supp_3;
|
||||
std::string h206_supp_4;
|
||||
std::string h206_supp_5;
|
||||
|
||||
string h206_site_1;
|
||||
string h206_address_1;
|
||||
string h206_phone_1;
|
||||
string h206_spec_care_1;
|
||||
string h206_site_2;
|
||||
string h206_address_2;
|
||||
string h206_phone_2;
|
||||
string h206_spec_care_2;
|
||||
string h206_site_3;
|
||||
string h206_address_3;
|
||||
string h206_phone_3;
|
||||
string h206_spec_care_3;
|
||||
string h206_site_4;
|
||||
string h206_address_4;
|
||||
string h206_phone_4;
|
||||
string h206_spec_care_4;
|
||||
std::string h206_site_1;
|
||||
std::string h206_address_1;
|
||||
std::string h206_phone_1;
|
||||
std::string h206_spec_care_1;
|
||||
std::string h206_site_2;
|
||||
std::string h206_address_2;
|
||||
std::string h206_phone_2;
|
||||
std::string h206_spec_care_2;
|
||||
std::string h206_site_3;
|
||||
std::string h206_address_3;
|
||||
std::string h206_phone_3;
|
||||
std::string h206_spec_care_3;
|
||||
std::string h206_site_4;
|
||||
std::string h206_address_4;
|
||||
std::string h206_phone_4;
|
||||
std::string h206_spec_care_4;
|
||||
|
||||
string h206_preparer;
|
||||
string h206_facility;
|
||||
std::string h206_preparer;
|
||||
std::string h206_facility;
|
||||
|
||||
string h206_buff;
|
||||
string h206_def_filename = "";
|
||||
string h206_base_filename = "";
|
||||
string h206_def_template_name = "";
|
||||
std::string h206_buff;
|
||||
std::string h206_def_filename = "";
|
||||
std::string h206_base_filename = "";
|
||||
std::string h206_def_template_name = "";
|
||||
bool h206_using206_template = false;
|
||||
|
||||
void h206_cb_setdate()
|
||||
|
|
|
|||
|
|
@ -72,38 +72,38 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string h213_buffer;
|
||||
string h213_base_filename = "";
|
||||
string h213_def_filename = "";
|
||||
string h213_def_template_name = "";
|
||||
std::string h213_buffer;
|
||||
std::string h213_base_filename = "";
|
||||
std::string h213_def_filename = "";
|
||||
std::string h213_def_template_name = "";
|
||||
|
||||
bool h213_using_template = false;
|
||||
|
||||
string h213_tag_fm = ":1:";
|
||||
string h213_tag_to = ":2:";
|
||||
string h213_tag_date = ":3:";
|
||||
string h213_tag_time = ":4:";
|
||||
string h213_tag_via_phone = ":5a:";
|
||||
string h213_tag_via_radio = ":5b:";
|
||||
string h213_tag_via_other = ":5c:";
|
||||
string h213_tag_reply_yes = ":6a:";
|
||||
string h213_tag_reply_no = ":6b:";
|
||||
string h213_tag_reply_to = ":6c:";
|
||||
string h213_tag_priority = ":7:";
|
||||
string h213_tag_high = ":7a:";
|
||||
string h213_tag_medium = ":7b:";
|
||||
string h213_tag_low = ":7c:";
|
||||
string h213_tag_msg = ":8:";
|
||||
string h213_tag_action = ":9:";
|
||||
string h213_tag_rcvd_by = ":10:";
|
||||
string h213_tag_time_rcvd = ":11:";
|
||||
string h213_tag_fwd_to = ":12:";
|
||||
string h213_tag_comments = ":13:";
|
||||
string h213_tag_rcvd_by2 = ":14:";
|
||||
string h213_tag_time_rcvd2 = ":15:";
|
||||
string h213_tag_fwd_to2 = ":16:";
|
||||
string h213_tag_comments2 = ":17:";
|
||||
string h213_tag_facility = ":18:";
|
||||
std::string h213_tag_fm = ":1:";
|
||||
std::string h213_tag_to = ":2:";
|
||||
std::string h213_tag_date = ":3:";
|
||||
std::string h213_tag_time = ":4:";
|
||||
std::string h213_tag_via_phone = ":5a:";
|
||||
std::string h213_tag_via_radio = ":5b:";
|
||||
std::string h213_tag_via_other = ":5c:";
|
||||
std::string h213_tag_reply_yes = ":6a:";
|
||||
std::string h213_tag_reply_no = ":6b:";
|
||||
std::string h213_tag_reply_to = ":6c:";
|
||||
std::string h213_tag_priority = ":7:";
|
||||
std::string h213_tag_high = ":7a:";
|
||||
std::string h213_tag_medium = ":7b:";
|
||||
std::string h213_tag_low = ":7c:";
|
||||
std::string h213_tag_msg = ":8:";
|
||||
std::string h213_tag_action = ":9:";
|
||||
std::string h213_tag_rcvd_by = ":10:";
|
||||
std::string h213_tag_time_rcvd = ":11:";
|
||||
std::string h213_tag_fwd_to = ":12:";
|
||||
std::string h213_tag_comments = ":13:";
|
||||
std::string h213_tag_rcvd_by2 = ":14:";
|
||||
std::string h213_tag_time_rcvd2 = ":15:";
|
||||
std::string h213_tag_fwd_to2 = ":16:";
|
||||
std::string h213_tag_comments2 = ":17:";
|
||||
std::string h213_tag_facility = ":18:";
|
||||
|
||||
FIELD h213_fields[] = {
|
||||
{ h213_tag_to, "", (void **)&h213_txt_to, 't' },
|
||||
|
|
|
|||
|
|
@ -76,34 +76,34 @@ using namespace std;
|
|||
// hics 214 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string hics214_tag_incident = ":1:";
|
||||
string hics214_tag_date = ":2:";
|
||||
string hics214_tag_time = ":2a:";
|
||||
string hics214_tag_op_period = ":3:";
|
||||
string hics214_tag_sec_brch = ":4:";
|
||||
string hics214_tag_position = ":5:";
|
||||
string hics214_tag_activity_time = ":T[n]:"; // 30
|
||||
string hics214_tag_activity_event = ":E[n]:";
|
||||
string hics214_tag_prepared_by = ":7:";
|
||||
string hics214_tag_facility = ":8:"; // new field
|
||||
std::string hics214_tag_incident = ":1:";
|
||||
std::string hics214_tag_date = ":2:";
|
||||
std::string hics214_tag_time = ":2a:";
|
||||
std::string hics214_tag_op_period = ":3:";
|
||||
std::string hics214_tag_sec_brch = ":4:";
|
||||
std::string hics214_tag_position = ":5:";
|
||||
std::string hics214_tag_activity_time = ":T[n]:"; // 30
|
||||
std::string hics214_tag_activity_event = ":E[n]:";
|
||||
std::string hics214_tag_prepared_by = ":7:";
|
||||
std::string hics214_tag_facility = ":8:"; // new field
|
||||
|
||||
string hics214_incident;
|
||||
string hics214_date;
|
||||
string hics214_time;
|
||||
string hics214_op_period;
|
||||
string hics214_sec_brch;
|
||||
string hics214_position;
|
||||
string hics214_activity_time[30];
|
||||
string hics214_activity_event[30];
|
||||
string hics214_prepared_by;
|
||||
string hics214_facility;
|
||||
std::string hics214_incident;
|
||||
std::string hics214_date;
|
||||
std::string hics214_time;
|
||||
std::string hics214_op_period;
|
||||
std::string hics214_sec_brch;
|
||||
std::string hics214_position;
|
||||
std::string hics214_activity_time[30];
|
||||
std::string hics214_activity_event[30];
|
||||
std::string hics214_prepared_by;
|
||||
std::string hics214_facility;
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string hics214_buff;
|
||||
string hics214_def_filename = "";
|
||||
string hics214_base_filename = "";
|
||||
string hics214_template_name = "";
|
||||
std::string hics214_buff;
|
||||
std::string hics214_def_filename = "";
|
||||
std::string hics214_base_filename = "";
|
||||
std::string hics214_template_name = "";
|
||||
bool hics214_using_template = false;
|
||||
|
||||
void hics214_cb_set_date()
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string iaru_base_filename = "";
|
||||
string iaru_def_filename = "";
|
||||
string iaru_def_template_name = "";
|
||||
std::string iaru_base_filename = "";
|
||||
std::string iaru_def_filename = "";
|
||||
std::string iaru_def_template_name = "";
|
||||
|
||||
static string iaru_buffer;
|
||||
|
||||
|
|
@ -85,26 +85,26 @@ const char iaru_prec_items[] = "ROUTINE|PRIORITY|EMERGENCY";
|
|||
|
||||
// new tag strings
|
||||
|
||||
string iaru_nbr = ":nbr:"; // 0
|
||||
string iaru_prec = ":prec:"; // 1
|
||||
string iaru_station = ":sta:"; // 2
|
||||
string iaru_check = ":ck:"; // 3
|
||||
string iaru_orig = ":org:"; // 4
|
||||
std::string iaru_nbr = ":nbr:"; // 0
|
||||
std::string iaru_prec = ":prec:"; // 1
|
||||
std::string iaru_station = ":sta:"; // 2
|
||||
std::string iaru_check = ":ck:"; // 3
|
||||
std::string iaru_orig = ":org:"; // 4
|
||||
|
||||
string iaru_d1 = ":d1:"; // 5
|
||||
string iaru_t1 = ":t1:"; // 6
|
||||
std::string iaru_d1 = ":d1:"; // 5
|
||||
std::string iaru_t1 = ":t1:"; // 6
|
||||
|
||||
string iaru_to = ":to:"; // 7
|
||||
string iaru_msg = ":msg:"; // 8
|
||||
string iaru_fm = ":fm:"; // 9
|
||||
std::string iaru_to = ":to:"; // 7
|
||||
std::string iaru_msg = ":msg:"; // 8
|
||||
std::string iaru_fm = ":fm:"; // 9
|
||||
|
||||
string iaru_rcv_fm = ":rcv:"; // 10
|
||||
string iaru_d2 = ":d2:"; // 11
|
||||
string iaru_t2 = ":t2:"; // 12
|
||||
std::string iaru_rcv_fm = ":rcv:"; // 10
|
||||
std::string iaru_d2 = ":d2:"; // 11
|
||||
std::string iaru_t2 = ":t2:"; // 12
|
||||
|
||||
string iaru_sent_to = ":sto:"; // 13
|
||||
string iaru_d3 = ":d3:"; // 14
|
||||
string iaru_t3 = ":t3:"; // 15
|
||||
std::string iaru_sent_to = ":sto:"; // 13
|
||||
std::string iaru_d3 = ":d3:"; // 14
|
||||
std::string iaru_t3 = ":t3:"; // 15
|
||||
|
||||
FIELD iaru_fields[] = {
|
||||
{ iaru_nbr, "", (void **)&iaru_txt_nbr, 't' }, // 0
|
||||
|
|
|
|||
|
|
@ -76,122 +76,122 @@ using namespace std;
|
|||
// ics 203 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string ics203_incident = ":inc:";
|
||||
string ics203_date = ":dat:";
|
||||
string ics203_time = ":tim:";
|
||||
string ics203_op_period = ":opp:";
|
||||
string ics203_incident_commander = ":icc:";
|
||||
string ics203_incident_deputy = ":icd:";
|
||||
string ics203_incident_safety_officer = ":ics:";
|
||||
string ics203_incident_info_officer = ":ici:";
|
||||
string ics203_liaison_officer = ":icl:";
|
||||
string ics203_prepared_by = ":pre:";
|
||||
string ics203_agency = ":agency[n]:"; // 7
|
||||
string ics203_agency_name = ":agency_name[n]:"; // 7
|
||||
string ics203_planning_chief = ":planning_chief:";
|
||||
string ics203_planning_deputy = ":planning_deputy:";
|
||||
string ics203_resources_unit = ":resources_unit:";
|
||||
string ics203_situation_unit = ":situation_unit:";
|
||||
string ics203_documentation_unit = ":documentation_unit:";
|
||||
string ics203_demobilization_unit = ":demobilization_unit:";
|
||||
string ics203_tech_spc = ":tech_spc[n]:"; // 3
|
||||
string ics203_logistics_chief = ":logistics_chief:";
|
||||
string ics203_logistics_deputy = ":logistics_deputy:";
|
||||
string ics203_support_director = ":support_director:";
|
||||
string ics203_supply_unit = ":supply_unit:";
|
||||
string ics203_facilities_unit = ":facilities_unit:";
|
||||
string ics203_ground_support = ":ground_support:";
|
||||
string ics203_service_director = ":service_director:";
|
||||
string ics203_communications_unit = ":communications_unit:";
|
||||
string ics203_medical_unit = ":medical_unit:";
|
||||
string ics203_food_unit = ":food_unit:";
|
||||
string ics203_ops_chief = ":ops_chief:";
|
||||
string ics203_ops_deputy = ":ops_deputy:";
|
||||
string ics203_b1_director = ":b1_director:";
|
||||
string ics203_b1_deputy = ":b1_deputy:";
|
||||
string ics203_b1_div = ":b1_div[n]:"; // 4
|
||||
string ics203_b1_grp = ":b1_grp[n]:"; // 4
|
||||
string ics203_b2_director = ":b2_director:";
|
||||
string ics203_b2_deputy = ":b2_deputy:";
|
||||
string ics203_b2_div = ":b2_div[n]:"; // 4
|
||||
string ics203_b2_grp = ":b2_grp[n]:"; // 4
|
||||
string ics203_b3_director = ":b3_director:";
|
||||
string ics203_b3_deputy = ":b3_deputy:";
|
||||
string ics203_b3_div = ":b3_div[n]:"; // 4
|
||||
string ics203_b3_grp = ":b3_grp[n]:"; // 4
|
||||
string ics203_air_ops_br_dir = ":air_ops_br_dir:";
|
||||
string ics203_air_tactical_group_sup = ":air_tactical_group_sup:";
|
||||
string ics203_air_support_group_sup = ":air_support_group_sup:";
|
||||
string ics203_helicopter_coordinator = ":helicopter_coordinator:";
|
||||
string ics203_air_tanker_fixed_wing = ":air_tanker_fixed_wing:";
|
||||
string ics203_finance_chief = ":finance_chief:";
|
||||
string ics203_finance_deputy = ":finance_deputy:";
|
||||
string ics203_time_unit = ":time_unit:";
|
||||
string ics203_procurement_unit = ":procurement_unit:";
|
||||
string ics203_claims_unit = ":claims_unit:";
|
||||
string ics203_cost_unit = ":cost_unit:";
|
||||
std::string ics203_incident = ":inc:";
|
||||
std::string ics203_date = ":dat:";
|
||||
std::string ics203_time = ":tim:";
|
||||
std::string ics203_op_period = ":opp:";
|
||||
std::string ics203_incident_commander = ":icc:";
|
||||
std::string ics203_incident_deputy = ":icd:";
|
||||
std::string ics203_incident_safety_officer = ":ics:";
|
||||
std::string ics203_incident_info_officer = ":ici:";
|
||||
std::string ics203_liaison_officer = ":icl:";
|
||||
std::string ics203_prepared_by = ":pre:";
|
||||
std::string ics203_agency = ":agency[n]:"; // 7
|
||||
std::string ics203_agency_name = ":agency_name[n]:"; // 7
|
||||
std::string ics203_planning_chief = ":planning_chief:";
|
||||
std::string ics203_planning_deputy = ":planning_deputy:";
|
||||
std::string ics203_resources_unit = ":resources_unit:";
|
||||
std::string ics203_situation_unit = ":situation_unit:";
|
||||
std::string ics203_documentation_unit = ":documentation_unit:";
|
||||
std::string ics203_demobilization_unit = ":demobilization_unit:";
|
||||
std::string ics203_tech_spc = ":tech_spc[n]:"; // 3
|
||||
std::string ics203_logistics_chief = ":logistics_chief:";
|
||||
std::string ics203_logistics_deputy = ":logistics_deputy:";
|
||||
std::string ics203_support_director = ":support_director:";
|
||||
std::string ics203_supply_unit = ":supply_unit:";
|
||||
std::string ics203_facilities_unit = ":facilities_unit:";
|
||||
std::string ics203_ground_support = ":ground_support:";
|
||||
std::string ics203_service_director = ":service_director:";
|
||||
std::string ics203_communications_unit = ":communications_unit:";
|
||||
std::string ics203_medical_unit = ":medical_unit:";
|
||||
std::string ics203_food_unit = ":food_unit:";
|
||||
std::string ics203_ops_chief = ":ops_chief:";
|
||||
std::string ics203_ops_deputy = ":ops_deputy:";
|
||||
std::string ics203_b1_director = ":b1_director:";
|
||||
std::string ics203_b1_deputy = ":b1_deputy:";
|
||||
std::string ics203_b1_div = ":b1_div[n]:"; // 4
|
||||
std::string ics203_b1_grp = ":b1_grp[n]:"; // 4
|
||||
std::string ics203_b2_director = ":b2_director:";
|
||||
std::string ics203_b2_deputy = ":b2_deputy:";
|
||||
std::string ics203_b2_div = ":b2_div[n]:"; // 4
|
||||
std::string ics203_b2_grp = ":b2_grp[n]:"; // 4
|
||||
std::string ics203_b3_director = ":b3_director:";
|
||||
std::string ics203_b3_deputy = ":b3_deputy:";
|
||||
std::string ics203_b3_div = ":b3_div[n]:"; // 4
|
||||
std::string ics203_b3_grp = ":b3_grp[n]:"; // 4
|
||||
std::string ics203_air_ops_br_dir = ":air_ops_br_dir:";
|
||||
std::string ics203_air_tactical_group_sup = ":air_tactical_group_sup:";
|
||||
std::string ics203_air_support_group_sup = ":air_support_group_sup:";
|
||||
std::string ics203_helicopter_coordinator = ":helicopter_coordinator:";
|
||||
std::string ics203_air_tanker_fixed_wing = ":air_tanker_fixed_wing:";
|
||||
std::string ics203_finance_chief = ":finance_chief:";
|
||||
std::string ics203_finance_deputy = ":finance_deputy:";
|
||||
std::string ics203_time_unit = ":time_unit:";
|
||||
std::string ics203_procurement_unit = ":procurement_unit:";
|
||||
std::string ics203_claims_unit = ":claims_unit:";
|
||||
std::string ics203_cost_unit = ":cost_unit:";
|
||||
|
||||
string s203_incident;
|
||||
string s203_date;
|
||||
string s203_time;
|
||||
string s203_op_period;
|
||||
string s203_incident_commander;
|
||||
string s203_incident_deputy;
|
||||
string s203_incident_safety_officer;
|
||||
string s203_incident_info_officer;
|
||||
string s203_liaison_officer;
|
||||
string s203_prepared_by;
|
||||
string s203_agency[7];
|
||||
string s203_agency_name[7];
|
||||
string s203_planning_chief;
|
||||
string s203_planning_deputy;
|
||||
string s203_resources_unit;
|
||||
string s203_situation_unit;
|
||||
string s203_documentation_unit;
|
||||
string s203_demobilization_unit;
|
||||
string s203_tech_spc[3];
|
||||
string s203_logistics_chief;
|
||||
string s203_logistics_deputy;
|
||||
string s203_support_director;
|
||||
string s203_supply_unit;
|
||||
string s203_facilities_unit;
|
||||
string s203_ground_support;
|
||||
string s203_service_director;
|
||||
string s203_communications_unit;
|
||||
string s203_medical_unit;
|
||||
string s203_food_unit;
|
||||
string s203_ops_chief;
|
||||
string s203_ops_deputy;
|
||||
string s203_b1_director;
|
||||
string s203_b1_deputy;
|
||||
string s203_b1_div[5];
|
||||
string s203_b1_grp[5];
|
||||
string s203_b2_director;
|
||||
string s203_b2_deputy;
|
||||
string s203_b2_div[5];
|
||||
string s203_b2_grp[5];
|
||||
string s203_b3_director;
|
||||
string s203_b3_deputy;
|
||||
string s203_b3_div[5];
|
||||
string s203_b3_grp[5];
|
||||
string s203_air_ops_br_dir;
|
||||
string s203_air_tactical_group_sup;
|
||||
string s203_air_support_group_sup;
|
||||
string s203_helicopter_coordinator;
|
||||
string s203_air_tanker_fixed_wing;
|
||||
string s203_finance_chief;
|
||||
string s203_finance_deputy;
|
||||
string s203_time_unit;
|
||||
string s203_procurement_unit;
|
||||
string s203_claims_unit;
|
||||
string s203_cost_unit;
|
||||
std::string s203_incident;
|
||||
std::string s203_date;
|
||||
std::string s203_time;
|
||||
std::string s203_op_period;
|
||||
std::string s203_incident_commander;
|
||||
std::string s203_incident_deputy;
|
||||
std::string s203_incident_safety_officer;
|
||||
std::string s203_incident_info_officer;
|
||||
std::string s203_liaison_officer;
|
||||
std::string s203_prepared_by;
|
||||
std::string s203_agency[7];
|
||||
std::string s203_agency_name[7];
|
||||
std::string s203_planning_chief;
|
||||
std::string s203_planning_deputy;
|
||||
std::string s203_resources_unit;
|
||||
std::string s203_situation_unit;
|
||||
std::string s203_documentation_unit;
|
||||
std::string s203_demobilization_unit;
|
||||
std::string s203_tech_spc[3];
|
||||
std::string s203_logistics_chief;
|
||||
std::string s203_logistics_deputy;
|
||||
std::string s203_support_director;
|
||||
std::string s203_supply_unit;
|
||||
std::string s203_facilities_unit;
|
||||
std::string s203_ground_support;
|
||||
std::string s203_service_director;
|
||||
std::string s203_communications_unit;
|
||||
std::string s203_medical_unit;
|
||||
std::string s203_food_unit;
|
||||
std::string s203_ops_chief;
|
||||
std::string s203_ops_deputy;
|
||||
std::string s203_b1_director;
|
||||
std::string s203_b1_deputy;
|
||||
std::string s203_b1_div[5];
|
||||
std::string s203_b1_grp[5];
|
||||
std::string s203_b2_director;
|
||||
std::string s203_b2_deputy;
|
||||
std::string s203_b2_div[5];
|
||||
std::string s203_b2_grp[5];
|
||||
std::string s203_b3_director;
|
||||
std::string s203_b3_deputy;
|
||||
std::string s203_b3_div[5];
|
||||
std::string s203_b3_grp[5];
|
||||
std::string s203_air_ops_br_dir;
|
||||
std::string s203_air_tactical_group_sup;
|
||||
std::string s203_air_support_group_sup;
|
||||
std::string s203_helicopter_coordinator;
|
||||
std::string s203_air_tanker_fixed_wing;
|
||||
std::string s203_finance_chief;
|
||||
std::string s203_finance_deputy;
|
||||
std::string s203_time_unit;
|
||||
std::string s203_procurement_unit;
|
||||
std::string s203_claims_unit;
|
||||
std::string s203_cost_unit;
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buff203;
|
||||
string def_203_filename = "";
|
||||
string base_203_filename = "";
|
||||
string def_203_TemplateName = "";
|
||||
std::string buff203;
|
||||
std::string def_203_filename = "";
|
||||
std::string base_203_filename = "";
|
||||
std::string def_203_TemplateName = "";
|
||||
bool using_ics203_template = false;
|
||||
|
||||
void cb_203_set_date()
|
||||
|
|
@ -589,7 +589,7 @@ void clear_203_form()
|
|||
}
|
||||
}
|
||||
|
||||
string &ics_n(string & subst, int n)
|
||||
std::string &ics_n(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
size_t pos = subst.find("[");
|
||||
|
|
|
|||
|
|
@ -76,53 +76,53 @@ using namespace std;
|
|||
|
||||
// compatibility fields required to read older data files
|
||||
|
||||
string ics205_name = ":nam:";
|
||||
string ics205_dt1 = ":dt1:";
|
||||
string ics205_dt2 = ":dt2:";
|
||||
string ics205_dt3 = ":dt3:";
|
||||
string ics205_func = ":func";
|
||||
string ics205_chan = ":chan";
|
||||
string ics205_asgn = ":asgn";
|
||||
string ics205_rx_freq = ":rxfq";
|
||||
string ics205_rx_tone = ":rxtn";
|
||||
string ics205_tx_freq = ":txfq";
|
||||
string ics205_tx_tone = ":txtn";
|
||||
string ics205_mode_adm = ":mode";
|
||||
string ics205_rem = ":rmrk";
|
||||
string ics205_prep = ":prp:";
|
||||
string ics205_county = ":cnty:";
|
||||
string ics205_state = ":stat:";
|
||||
string ics205_latitude = ":lat:";
|
||||
string ics205_longitude = ":lon:";
|
||||
std::string ics205_name = ":nam:";
|
||||
std::string ics205_dt1 = ":dt1:";
|
||||
std::string ics205_dt2 = ":dt2:";
|
||||
std::string ics205_dt3 = ":dt3:";
|
||||
std::string ics205_func = ":func";
|
||||
std::string ics205_chan = ":chan";
|
||||
std::string ics205_asgn = ":asgn";
|
||||
std::string ics205_rx_freq = ":rxfq";
|
||||
std::string ics205_rx_tone = ":rxtn";
|
||||
std::string ics205_tx_freq = ":txfq";
|
||||
std::string ics205_tx_tone = ":txtn";
|
||||
std::string ics205_mode_adm = ":mode";
|
||||
std::string ics205_rem = ":rmrk";
|
||||
std::string ics205_prep = ":prp:";
|
||||
std::string ics205_county = ":cnty:";
|
||||
std::string ics205_state = ":stat:";
|
||||
std::string ics205_latitude = ":lat:";
|
||||
std::string ics205_longitude = ":lon:";
|
||||
|
||||
|
||||
const char *nbr[] = {
|
||||
"00:", "01:", "02:", "03:", "04:", "05:", "06:", "07:", "08:", "09:",
|
||||
"10:", "11:", "12:", "13:", "14:", "15:", "16:", "17:", "18:", "19:" };
|
||||
|
||||
string s205_name;
|
||||
string s205_dt_prepared;
|
||||
string s205_dt_op_from;
|
||||
string s205_dt_op_to;
|
||||
string s205_func[20];
|
||||
string s205_channel[20];
|
||||
string s205_asgn[20];
|
||||
string s205_rx_freq[20];
|
||||
string s205_rx_tone[20];
|
||||
string s205_tx_freq[20];
|
||||
string s205_tx_tone[20];
|
||||
string s205_mode_adm[20];
|
||||
string s205_remarks[20];
|
||||
string s205_preparer;
|
||||
string s205_county;
|
||||
string s205_state;
|
||||
string s205_latitude;
|
||||
string s205_longitude;
|
||||
std::string s205_name;
|
||||
std::string s205_dt_prepared;
|
||||
std::string s205_dt_op_from;
|
||||
std::string s205_dt_op_to;
|
||||
std::string s205_func[20];
|
||||
std::string s205_channel[20];
|
||||
std::string s205_asgn[20];
|
||||
std::string s205_rx_freq[20];
|
||||
std::string s205_rx_tone[20];
|
||||
std::string s205_tx_freq[20];
|
||||
std::string s205_tx_tone[20];
|
||||
std::string s205_mode_adm[20];
|
||||
std::string s205_remarks[20];
|
||||
std::string s205_preparer;
|
||||
std::string s205_county;
|
||||
std::string s205_state;
|
||||
std::string s205_latitude;
|
||||
std::string s205_longitude;
|
||||
|
||||
string buff205;
|
||||
string def_205_filename = "";
|
||||
string base_205_filename = "";
|
||||
string def_205_TemplateName = "";
|
||||
std::string buff205;
|
||||
std::string def_205_filename = "";
|
||||
std::string base_205_filename = "";
|
||||
std::string def_205_TemplateName = "";
|
||||
bool using_ics205_template = false;
|
||||
|
||||
void cb_205_SetDateTime1()
|
||||
|
|
|
|||
|
|
@ -76,38 +76,38 @@ using namespace std;
|
|||
// ics 205a field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string ics205a_incident = ":inc:";
|
||||
string ics205a_date_fm = ":dfm:";
|
||||
string ics205a_time_fm = ":tfm:";
|
||||
string ics205a_date_to = ":dto:";
|
||||
string ics205a_time_to = ":tto:";
|
||||
string ics205a_prepared_by = ":pre:";
|
||||
string ics205a_preparer_position = ":pos:";
|
||||
string ics205a_preparer_date_time = ":dtm:";
|
||||
std::string ics205a_incident = ":inc:";
|
||||
std::string ics205a_date_fm = ":dfm:";
|
||||
std::string ics205a_time_fm = ":tfm:";
|
||||
std::string ics205a_date_to = ":dto:";
|
||||
std::string ics205a_time_to = ":tto:";
|
||||
std::string ics205a_prepared_by = ":pre:";
|
||||
std::string ics205a_preparer_position = ":pos:";
|
||||
std::string ics205a_preparer_date_time = ":dtm:";
|
||||
|
||||
string ics205a_comm_position = ":asg[n]:"; // 32
|
||||
string ics205a_comm_name = ":nam[n]:"; // 32
|
||||
string ics205a_comm_info = ":inf[n]:"; // 32
|
||||
std::string ics205a_comm_position = ":asg[n]:"; // 32
|
||||
std::string ics205a_comm_name = ":nam[n]:"; // 32
|
||||
std::string ics205a_comm_info = ":inf[n]:"; // 32
|
||||
|
||||
string s205a_incident;
|
||||
string s205a_date_fm;
|
||||
string s205a_time_fm;
|
||||
string s205a_date_to;
|
||||
string s205a_time_to;
|
||||
string s205a_prepared_by;
|
||||
string s205a_preparer_position;
|
||||
string s205a_preparer_date_time;
|
||||
std::string s205a_incident;
|
||||
std::string s205a_date_fm;
|
||||
std::string s205a_time_fm;
|
||||
std::string s205a_date_to;
|
||||
std::string s205a_time_to;
|
||||
std::string s205a_prepared_by;
|
||||
std::string s205a_preparer_position;
|
||||
std::string s205a_preparer_date_time;
|
||||
|
||||
string s205a_comm_position[32];
|
||||
string s205a_comm_name[32];
|
||||
string s205a_comm_info[32];
|
||||
std::string s205a_comm_position[32];
|
||||
std::string s205a_comm_name[32];
|
||||
std::string s205a_comm_info[32];
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buff205a;
|
||||
string def_205a_filename = "";
|
||||
string base_205a_filename = "";
|
||||
string def_205a_TemplateName = "";
|
||||
std::string buff205a;
|
||||
std::string def_205a_filename = "";
|
||||
std::string base_205a_filename = "";
|
||||
std::string def_205a_TemplateName = "";
|
||||
bool using_ics205a_template = false;
|
||||
|
||||
void cb_205a_set_date_fm()
|
||||
|
|
@ -218,7 +218,7 @@ void clear_205a_form()
|
|||
update_205aform();
|
||||
}
|
||||
|
||||
string &ics205a_nn(string & subst, int n)
|
||||
std::string &ics205a_nn(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
static string ics;
|
||||
|
|
|
|||
|
|
@ -76,86 +76,86 @@ using namespace std;
|
|||
|
||||
// compatibility fields required to read older data files
|
||||
|
||||
string aics206_name = "<nam:";
|
||||
string aics206_period = "<opp:";
|
||||
string aics206_date_prepared = "<dat:";
|
||||
string aics206_time_prepared = "<tim:";
|
||||
string aics206_procedure = "<proc:";
|
||||
string aics206_preparer = "<prep:";
|
||||
string aics206_reviewer = "<rvwr:";
|
||||
string aics206_medaid_sta = "<msta0:"; // array of 5
|
||||
string aics206_medaid_loc = "<mloc0:"; // ...
|
||||
string aics206_medaid_paramedics = "<mpar0:"; // bool
|
||||
string aics206_transport_name = "<tname0:"; // array of 5
|
||||
string aics206_transport_address = "<taddr0:"; // ...
|
||||
string aics206_transport_phone = "<tphon0:";
|
||||
string aics206_transport_paramedics = "<tpara0:"; // bool
|
||||
string aics206_ambulance_name = "<aname0:"; // array of 5
|
||||
string aics206_ambulance_loc = "<aloca0:"; // ...
|
||||
string aics206_ambulance_paramedics = "<apara0:"; // bool
|
||||
string aics206_hosp_name = "<hname0:"; // array of 5
|
||||
string aics206_hosp_address = "<haddr0:"; // ...
|
||||
string aics206_hosp_phone = "<hphon0:";
|
||||
string aics206_hosp_airtime = "<hatim0:";
|
||||
string aics206_hosp_gndtime = "<hgtim0:";
|
||||
string aics206_hosp_helipad = "<hheli0:"; // bool (5)
|
||||
string aics206_hosp_burn_center = "<hburn0:"; // ...
|
||||
std::string aics206_name = "<nam:";
|
||||
std::string aics206_period = "<opp:";
|
||||
std::string aics206_date_prepared = "<dat:";
|
||||
std::string aics206_time_prepared = "<tim:";
|
||||
std::string aics206_procedure = "<proc:";
|
||||
std::string aics206_preparer = "<prep:";
|
||||
std::string aics206_reviewer = "<rvwr:";
|
||||
std::string aics206_medaid_sta = "<msta0:"; // array of 5
|
||||
std::string aics206_medaid_loc = "<mloc0:"; // ...
|
||||
std::string aics206_medaid_paramedics = "<mpar0:"; // bool
|
||||
std::string aics206_transport_name = "<tname0:"; // array of 5
|
||||
std::string aics206_transport_address = "<taddr0:"; // ...
|
||||
std::string aics206_transport_phone = "<tphon0:";
|
||||
std::string aics206_transport_paramedics = "<tpara0:"; // bool
|
||||
std::string aics206_ambulance_name = "<aname0:"; // array of 5
|
||||
std::string aics206_ambulance_loc = "<aloca0:"; // ...
|
||||
std::string aics206_ambulance_paramedics = "<apara0:"; // bool
|
||||
std::string aics206_hosp_name = "<hname0:"; // array of 5
|
||||
std::string aics206_hosp_address = "<haddr0:"; // ...
|
||||
std::string aics206_hosp_phone = "<hphon0:";
|
||||
std::string aics206_hosp_airtime = "<hatim0:";
|
||||
std::string aics206_hosp_gndtime = "<hgtim0:";
|
||||
std::string aics206_hosp_helipad = "<hheli0:"; // bool (5)
|
||||
std::string aics206_hosp_burn_center = "<hburn0:"; // ...
|
||||
|
||||
string ics206_name = ":nam:";
|
||||
string ics206_period = ":opp:";
|
||||
string ics206_date_prepared = ":dat:";
|
||||
string ics206_time_prepared = ":tim:";
|
||||
string ics206_procedure = ":proc:";
|
||||
string ics206_preparer = ":prep:";
|
||||
string ics206_reviewer = ":rvwr:";
|
||||
string ics206_medaid_sta = ":msta0:"; // array of 5
|
||||
string ics206_medaid_loc = ":mloc0:"; // ...
|
||||
string ics206_medaid_paramedics = ":mpar0:"; // bool
|
||||
string ics206_transport_name = ":tname0:"; // array of 5
|
||||
string ics206_transport_address = ":taddr0:"; // ...
|
||||
string ics206_transport_phone = ":tphon0:";
|
||||
string ics206_transport_paramedics = ":tpara0:"; // bool
|
||||
string ics206_ambulance_name = ":aname0:"; // array of 5
|
||||
string ics206_ambulance_loc = ":aloca0:"; // ...
|
||||
string ics206_ambulance_paramedics = ":apara0:"; // bool
|
||||
string ics206_hosp_name = ":hname0:"; // array of 5
|
||||
string ics206_hosp_address = ":haddr0:"; // ...
|
||||
string ics206_hosp_phone = ":hphon0:";
|
||||
string ics206_hosp_airtime = ":hatim0:";
|
||||
string ics206_hosp_gndtime = ":hgtim0:";
|
||||
string ics206_hosp_helipad = ":hheli0:"; // bool (5)
|
||||
string ics206_hosp_burn_center = ":hburn0:"; // ...
|
||||
std::string ics206_name = ":nam:";
|
||||
std::string ics206_period = ":opp:";
|
||||
std::string ics206_date_prepared = ":dat:";
|
||||
std::string ics206_time_prepared = ":tim:";
|
||||
std::string ics206_procedure = ":proc:";
|
||||
std::string ics206_preparer = ":prep:";
|
||||
std::string ics206_reviewer = ":rvwr:";
|
||||
std::string ics206_medaid_sta = ":msta0:"; // array of 5
|
||||
std::string ics206_medaid_loc = ":mloc0:"; // ...
|
||||
std::string ics206_medaid_paramedics = ":mpar0:"; // bool
|
||||
std::string ics206_transport_name = ":tname0:"; // array of 5
|
||||
std::string ics206_transport_address = ":taddr0:"; // ...
|
||||
std::string ics206_transport_phone = ":tphon0:";
|
||||
std::string ics206_transport_paramedics = ":tpara0:"; // bool
|
||||
std::string ics206_ambulance_name = ":aname0:"; // array of 5
|
||||
std::string ics206_ambulance_loc = ":aloca0:"; // ...
|
||||
std::string ics206_ambulance_paramedics = ":apara0:"; // bool
|
||||
std::string ics206_hosp_name = ":hname0:"; // array of 5
|
||||
std::string ics206_hosp_address = ":haddr0:"; // ...
|
||||
std::string ics206_hosp_phone = ":hphon0:";
|
||||
std::string ics206_hosp_airtime = ":hatim0:";
|
||||
std::string ics206_hosp_gndtime = ":hgtim0:";
|
||||
std::string ics206_hosp_helipad = ":hheli0:"; // bool (5)
|
||||
std::string ics206_hosp_burn_center = ":hburn0:"; // ...
|
||||
|
||||
string s206_name;
|
||||
string s206_period;
|
||||
string s206_date_prepared;
|
||||
string s206_time_prepared;
|
||||
string s206_procedure;
|
||||
string s206_preparer;
|
||||
string s206_reviewer;
|
||||
std::string s206_name;
|
||||
std::string s206_period;
|
||||
std::string s206_date_prepared;
|
||||
std::string s206_time_prepared;
|
||||
std::string s206_procedure;
|
||||
std::string s206_preparer;
|
||||
std::string s206_reviewer;
|
||||
|
||||
string s206_medaid_sta[5];
|
||||
string s206_medaid_loc[5];
|
||||
std::string s206_medaid_sta[5];
|
||||
std::string s206_medaid_loc[5];
|
||||
bool b206_medaid_paramedics[5];
|
||||
string s206_transport_name[5];
|
||||
string s206_transport_address[5];
|
||||
string s206_transport_phone[5];
|
||||
std::string s206_transport_name[5];
|
||||
std::string s206_transport_address[5];
|
||||
std::string s206_transport_phone[5];
|
||||
bool b206_transport_paramedics[5];
|
||||
string s206_ambulance_name[5];
|
||||
string s206_ambulance_loc[5];
|
||||
std::string s206_ambulance_name[5];
|
||||
std::string s206_ambulance_loc[5];
|
||||
bool b206_ambulance_paramedics[5];
|
||||
string s206_hosp_name[5];
|
||||
string s206_hosp_address[5];
|
||||
string s206_hosp_phone[5];
|
||||
string s206_hosp_airtime[5];
|
||||
string s206_hosp_gndtime[5];
|
||||
std::string s206_hosp_name[5];
|
||||
std::string s206_hosp_address[5];
|
||||
std::string s206_hosp_phone[5];
|
||||
std::string s206_hosp_airtime[5];
|
||||
std::string s206_hosp_gndtime[5];
|
||||
bool b206_hosp_helipad[5];
|
||||
bool b206_hosp_burn_center[5];
|
||||
|
||||
string buff206;
|
||||
string def_206_filename = "";
|
||||
string base_206_filename = "";
|
||||
string def_206_TemplateName = "";
|
||||
std::string buff206;
|
||||
std::string def_206_filename = "";
|
||||
std::string base_206_filename = "";
|
||||
std::string def_206_TemplateName = "";
|
||||
bool using_ics206_template = false;
|
||||
|
||||
void cb_206_setdate()
|
||||
|
|
@ -734,8 +734,8 @@ void cb_206_save()
|
|||
using_ics206_template = false;
|
||||
}
|
||||
|
||||
string yes = "YES";
|
||||
string no = "";
|
||||
std::string yes = "YES";
|
||||
std::string no = "";
|
||||
|
||||
void cb_206_html()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,22 +75,22 @@ using namespace std;
|
|||
// ICS213 fields
|
||||
// compatibility fields required to read older data files
|
||||
|
||||
string a_213_inc = "<inc:";
|
||||
string a_213_to = "<to:";
|
||||
string a_213_fm = "<fm:";
|
||||
string a_213_p1 = "<p1:";
|
||||
string a_213_p2 = "<p2:";
|
||||
string a_213_subj = "<sb:";
|
||||
string a_213_d1 = "<d1:";
|
||||
string a_213_t1 = "<t1:";
|
||||
string a_213_msg = "<mg:";
|
||||
string a_213_s1 = "<s1:";
|
||||
string a_213_p3 = "<p3:";
|
||||
string a_213_reply = "<rp:";
|
||||
string a_213_d2 = "<d2:";
|
||||
string a_213_t2 = "<t2:";
|
||||
string a_213_s2 = "<s2:";
|
||||
string a_213_p4 = "<p4:";
|
||||
std::string a_213_inc = "<inc:";
|
||||
std::string a_213_to = "<to:";
|
||||
std::string a_213_fm = "<fm:";
|
||||
std::string a_213_p1 = "<p1:";
|
||||
std::string a_213_p2 = "<p2:";
|
||||
std::string a_213_subj = "<sb:";
|
||||
std::string a_213_d1 = "<d1:";
|
||||
std::string a_213_t1 = "<t1:";
|
||||
std::string a_213_msg = "<mg:";
|
||||
std::string a_213_s1 = "<s1:";
|
||||
std::string a_213_p3 = "<p3:";
|
||||
std::string a_213_reply = "<rp:";
|
||||
std::string a_213_d2 = "<d2:";
|
||||
std::string a_213_t2 = "<t2:";
|
||||
std::string a_213_s2 = "<s2:";
|
||||
std::string a_213_p4 = "<p4:";
|
||||
|
||||
FIELD afields[] = {
|
||||
{ a_213_inc, "", (void **)&txt_213_inc, 't' },
|
||||
|
|
@ -110,26 +110,26 @@ FIELD afields[] = {
|
|||
{ a_213_msg, "", (void **)&txt_213_msg, 'e' },
|
||||
{ a_213_reply, "", (void **)&txt_213_reply, 'e' } };
|
||||
|
||||
string _213_inc = ":inc:";
|
||||
string _213_to = ":to:";
|
||||
string _213_fm = ":fm:";
|
||||
string _213_p1 = ":p1:";
|
||||
string _213_p2 = ":p2:";
|
||||
string _213_subj = ":sb:";
|
||||
string _213_d1 = ":d1:";
|
||||
string _213_t1 = ":t1:";
|
||||
string _213_msg = ":mg:";
|
||||
string _213_s1 = ":s1:";
|
||||
string _213_p3 = ":p3:";
|
||||
string _213_reply = ":rp:";
|
||||
string _213_d2 = ":d2:";
|
||||
string _213_t2 = ":t2:";
|
||||
string _213_s2 = ":s2:";
|
||||
string _213_p4 = ":p4:";
|
||||
std::string _213_inc = ":inc:";
|
||||
std::string _213_to = ":to:";
|
||||
std::string _213_fm = ":fm:";
|
||||
std::string _213_p1 = ":p1:";
|
||||
std::string _213_p2 = ":p2:";
|
||||
std::string _213_subj = ":sb:";
|
||||
std::string _213_d1 = ":d1:";
|
||||
std::string _213_t1 = ":t1:";
|
||||
std::string _213_msg = ":mg:";
|
||||
std::string _213_s1 = ":s1:";
|
||||
std::string _213_p3 = ":p3:";
|
||||
std::string _213_reply = ":rp:";
|
||||
std::string _213_d2 = ":d2:";
|
||||
std::string _213_t2 = ":t2:";
|
||||
std::string _213_s2 = ":s2:";
|
||||
std::string _213_p4 = ":p4:";
|
||||
|
||||
string ICS_213_msg = "";
|
||||
string ICS_213_reply = "";
|
||||
string buffer;
|
||||
std::string ICS_213_msg = "";
|
||||
std::string ICS_213_reply = "";
|
||||
std::string buffer;
|
||||
|
||||
FIELD fields[] = {
|
||||
{ _213_inc, "", (void **)&txt_213_inc, 't' },
|
||||
|
|
@ -151,9 +151,9 @@ FIELD fields[] = {
|
|||
|
||||
bool using_213Template = false;
|
||||
|
||||
string base_213_filename = "";
|
||||
string def_213_filename = "";
|
||||
string def_213_TemplateName = "";
|
||||
std::string base_213_filename = "";
|
||||
std::string def_213_filename = "";
|
||||
std::string def_213_TemplateName = "";
|
||||
|
||||
int numfields = sizeof(fields) / sizeof(FIELD);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,43 +76,43 @@ using namespace std;
|
|||
// ics 214 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string ics214_incident = ":inc:";
|
||||
string ics214_date = ":dat:";
|
||||
string ics214_time = ":tim:";
|
||||
string ics214_op_period = ":opp:";
|
||||
string ics214_unit_name = ":und:";
|
||||
string ics214_unit_leader = ":unl:";
|
||||
std::string ics214_incident = ":inc:";
|
||||
std::string ics214_date = ":dat:";
|
||||
std::string ics214_time = ":tim:";
|
||||
std::string ics214_op_period = ":opp:";
|
||||
std::string ics214_unit_name = ":und:";
|
||||
std::string ics214_unit_leader = ":unl:";
|
||||
|
||||
string ics214_roster_name = ":nam[n]:"; // 14
|
||||
string ics214_roster_position = ":pos[n]:";
|
||||
string ics214_roster_home_base = ":hom[n]:";
|
||||
std::string ics214_roster_name = ":nam[n]:"; // 14
|
||||
std::string ics214_roster_position = ":pos[n]:";
|
||||
std::string ics214_roster_home_base = ":hom[n]:";
|
||||
|
||||
string ics214_activity_time = ":at[n]:"; // 16
|
||||
string ics214_activity_event = ":ev[n]:";
|
||||
std::string ics214_activity_time = ":at[n]:"; // 16
|
||||
std::string ics214_activity_event = ":ev[n]:";
|
||||
|
||||
string ics214_prepared_by = ":pre:";
|
||||
std::string ics214_prepared_by = ":pre:";
|
||||
|
||||
string s214_incident;
|
||||
string s214_date;
|
||||
string s214_time;
|
||||
string s214_op_period;
|
||||
string s214_unit_name;
|
||||
string s214_unit_leader;
|
||||
std::string s214_incident;
|
||||
std::string s214_date;
|
||||
std::string s214_time;
|
||||
std::string s214_op_period;
|
||||
std::string s214_unit_name;
|
||||
std::string s214_unit_leader;
|
||||
|
||||
string s214_roster_name[16];
|
||||
string s214_roster_position[16];
|
||||
string s214_roster_home_base[16];
|
||||
string s214_activity_time[16];
|
||||
string s214_activity_event[16];
|
||||
std::string s214_roster_name[16];
|
||||
std::string s214_roster_position[16];
|
||||
std::string s214_roster_home_base[16];
|
||||
std::string s214_activity_time[16];
|
||||
std::string s214_activity_event[16];
|
||||
|
||||
string s214_prepared_by;
|
||||
std::string s214_prepared_by;
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buff214;
|
||||
string def_214_filename = "";
|
||||
string base_214_filename = "";
|
||||
string def_214_TemplateName = "";
|
||||
std::string buff214;
|
||||
std::string def_214_filename = "";
|
||||
std::string base_214_filename = "";
|
||||
std::string def_214_TemplateName = "";
|
||||
|
||||
bool using_ics214_template = false;
|
||||
|
||||
|
|
@ -221,7 +221,7 @@ void clear_214_form()
|
|||
update_214form();
|
||||
}
|
||||
|
||||
string &ics_nn(string & subst, int n)
|
||||
std::string &ics_nn(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
static string ics;
|
||||
|
|
|
|||
|
|
@ -76,45 +76,45 @@ using namespace std;
|
|||
// ics 216 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string ics216_incident = ":inc:";
|
||||
string ics216_date = ":dat:";
|
||||
string ics216_time = ":tim:";
|
||||
string ics216_branch = ":br:";
|
||||
string ics216_agc = ":agc:";
|
||||
string ics216_op_period = ":opp:";
|
||||
string ics216_tac_freq = ":tfr:";
|
||||
std::string ics216_incident = ":inc:";
|
||||
std::string ics216_date = ":dat:";
|
||||
std::string ics216_time = ":tim:";
|
||||
std::string ics216_branch = ":br:";
|
||||
std::string ics216_agc = ":agc:";
|
||||
std::string ics216_op_period = ":opp:";
|
||||
std::string ics216_tac_freq = ":tfr:";
|
||||
|
||||
string ics216_div_grp = ":div[n]:";
|
||||
string ics216_agency = ":agy[n]:";
|
||||
std::string ics216_div_grp = ":div[n]:";
|
||||
std::string ics216_agency = ":agy[n]:";
|
||||
|
||||
string ics216_ag = ":ag[n]:";
|
||||
string ics216_id = ":id[n]:";
|
||||
string ics216_rr = ":rr[n]:";
|
||||
std::string ics216_ag = ":ag[n]:";
|
||||
std::string ics216_id = ":id[n]:";
|
||||
std::string ics216_rr = ":rr[n]:";
|
||||
|
||||
string ics216_prepared_by = ":pre:";
|
||||
std::string ics216_prepared_by = ":pre:";
|
||||
|
||||
string s216_incident;
|
||||
string s216_date;
|
||||
string s216_time;
|
||||
string s216_branch;
|
||||
string s216_agc;
|
||||
string s216_op_period;
|
||||
string s216_tac_freq;
|
||||
std::string s216_incident;
|
||||
std::string s216_date;
|
||||
std::string s216_time;
|
||||
std::string s216_branch;
|
||||
std::string s216_agc;
|
||||
std::string s216_op_period;
|
||||
std::string s216_tac_freq;
|
||||
|
||||
string s216_div_grp[4];
|
||||
string s216_agency[4];
|
||||
string s216_ag[36];
|
||||
string s216_id[36];
|
||||
string s216_rr[36];
|
||||
std::string s216_div_grp[4];
|
||||
std::string s216_agency[4];
|
||||
std::string s216_ag[36];
|
||||
std::string s216_id[36];
|
||||
std::string s216_rr[36];
|
||||
|
||||
string s216_prepared_by;
|
||||
std::string s216_prepared_by;
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buff216;
|
||||
string def_216_filename = "";
|
||||
string base_216_filename = "";
|
||||
string def_216_TemplateName = "";
|
||||
std::string buff216;
|
||||
std::string def_216_filename = "";
|
||||
std::string base_216_filename = "";
|
||||
std::string def_216_TemplateName = "";
|
||||
bool using_ics216_template = false;
|
||||
|
||||
void cb_216_set_date()
|
||||
|
|
@ -237,7 +237,7 @@ void clear_216_form()
|
|||
update_216form();
|
||||
}
|
||||
|
||||
string &ics_216_nn(string & subst, int n)
|
||||
std::string &ics_216_nn(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
static string ics;
|
||||
|
|
|
|||
|
|
@ -76,42 +76,42 @@ using namespace std;
|
|||
// ics 309 field variables and template variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
string ics309_incident = ":inc:";
|
||||
string ics309_date_fm = ":dfm:";
|
||||
string ics309_time_fm = ":tfm:";
|
||||
string ics309_date_to = ":dto:";
|
||||
string ics309_time_to = ":tto:";
|
||||
string ics309_prepared_by = ":pre:";
|
||||
string ics309_preparer_date_time = ":dtm:";
|
||||
string ics309_radio_net = ":net:";
|
||||
string ics309_radio_operator = ":opr:";
|
||||
std::string ics309_incident = ":inc:";
|
||||
std::string ics309_date_fm = ":dfm:";
|
||||
std::string ics309_time_fm = ":tfm:";
|
||||
std::string ics309_date_to = ":dto:";
|
||||
std::string ics309_time_to = ":tto:";
|
||||
std::string ics309_prepared_by = ":pre:";
|
||||
std::string ics309_preparer_date_time = ":dtm:";
|
||||
std::string ics309_radio_net = ":net:";
|
||||
std::string ics309_radio_operator = ":opr:";
|
||||
|
||||
string ics309_comm_msg = ":msg[n]:"; // 34
|
||||
string ics309_comm_to = ":to[n]:"; // 34
|
||||
string ics309_comm_from = ":fm[n]:"; // 34
|
||||
string ics309_comm_time = ":tm[n]:"; // 34
|
||||
std::string ics309_comm_msg = ":msg[n]:"; // 34
|
||||
std::string ics309_comm_to = ":to[n]:"; // 34
|
||||
std::string ics309_comm_from = ":fm[n]:"; // 34
|
||||
std::string ics309_comm_time = ":tm[n]:"; // 34
|
||||
|
||||
string s309_incident;
|
||||
string s309_date_fm;
|
||||
string s309_time_fm;
|
||||
string s309_date_to;
|
||||
string s309_time_to;
|
||||
string s309_prepared_by;
|
||||
string s309_preparer_date_time;
|
||||
string s309_radio_net;
|
||||
string s309_radio_operator;
|
||||
std::string s309_incident;
|
||||
std::string s309_date_fm;
|
||||
std::string s309_time_fm;
|
||||
std::string s309_date_to;
|
||||
std::string s309_time_to;
|
||||
std::string s309_prepared_by;
|
||||
std::string s309_preparer_date_time;
|
||||
std::string s309_radio_net;
|
||||
std::string s309_radio_operator;
|
||||
|
||||
string s309_comm_time[34];
|
||||
string s309_comm_from[34];
|
||||
string s309_comm_msg[34];
|
||||
string s309_comm_to[34];
|
||||
std::string s309_comm_time[34];
|
||||
std::string s309_comm_from[34];
|
||||
std::string s309_comm_msg[34];
|
||||
std::string s309_comm_to[34];
|
||||
|
||||
// =====================================================================
|
||||
|
||||
string buff309;
|
||||
string def_309_filename = "";
|
||||
string base_309_filename = "";
|
||||
string def_309_TemplateName = "";
|
||||
std::string buff309;
|
||||
std::string def_309_filename = "";
|
||||
std::string base_309_filename = "";
|
||||
std::string def_309_TemplateName = "";
|
||||
bool using_ics309_template = false;
|
||||
|
||||
void cb_309_set_date_fm()
|
||||
|
|
@ -238,7 +238,7 @@ void clear_309_form()
|
|||
update_309form();
|
||||
}
|
||||
|
||||
string &ics309_nn(string & subst, int n)
|
||||
std::string &ics309_nn(string & subst, int n)
|
||||
{
|
||||
static string garbage = "#$^*!";
|
||||
static string ics;
|
||||
|
|
|
|||
|
|
@ -37,13 +37,11 @@
|
|||
|
||||
#include <FL/Fl.H>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define arq_Version "arq 0.2"
|
||||
|
||||
extern const char *ASCII[];
|
||||
extern string noCR(string s);
|
||||
extern string noCTL(string s);
|
||||
extern std::string noCR(std::string s);
|
||||
extern std::string noCTL(std::string s);
|
||||
|
||||
// link layer spec for flmsg_arq
|
||||
//
|
||||
|
|
@ -102,25 +100,25 @@ private:
|
|||
bool arqreset;
|
||||
bool sender;
|
||||
|
||||
string MyCall;
|
||||
string UrCall;
|
||||
string arqfname;
|
||||
std::string MyCall;
|
||||
std::string UrCall;
|
||||
std::string arqfname;
|
||||
|
||||
int blknbr;
|
||||
size_t xfrsize;
|
||||
|
||||
string str_xfrsize;
|
||||
string str_blknbr;
|
||||
std::string str_xfrsize;
|
||||
std::string str_blknbr;
|
||||
|
||||
// queues //
|
||||
string TxTextQueue;
|
||||
string RxTextQueue;
|
||||
string RxFrameQueue;
|
||||
string rcvPayLoad;
|
||||
string xmttext;
|
||||
string xmtsent;
|
||||
string payload;
|
||||
string nomFrame;
|
||||
std::string TxTextQueue;
|
||||
std::string RxTextQueue;
|
||||
std::string RxFrameQueue;
|
||||
std::string rcvPayLoad;
|
||||
std::string xmttext;
|
||||
std::string xmtsent;
|
||||
std::string payload;
|
||||
std::string nomFrame;
|
||||
|
||||
int buffer_length;
|
||||
int last_buffer_length;
|
||||
|
|
@ -154,9 +152,9 @@ private:
|
|||
void setbuffer_length();
|
||||
|
||||
void checkblocks();
|
||||
string upcase(string s);
|
||||
std::string upcase(std::string s);
|
||||
|
||||
string calls();
|
||||
std::string calls();
|
||||
void connectFrame();
|
||||
void conackFrame();
|
||||
void disackFrame();
|
||||
|
|
@ -167,7 +165,7 @@ private:
|
|||
void pollFrame();
|
||||
void disconnectFrame();
|
||||
|
||||
void addToTxQue(string s);
|
||||
void addToTxQue(std::string s);
|
||||
|
||||
bool rightCALLS();
|
||||
|
||||
|
|
@ -180,14 +178,14 @@ private:
|
|||
void parseACK();
|
||||
void parseNAK();
|
||||
|
||||
void parseFrame(string txt);
|
||||
void parseFrame(std::string txt);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// external functions called by arq class must use Fl::wait(fn,...)
|
||||
// to isolate the UI thread from the arq thread
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
string (*do_trx)();
|
||||
std::string (*do_trx)();
|
||||
int trx() {
|
||||
if (do_trx) {
|
||||
if (do_trx() == "TX") return 1;
|
||||
|
|
@ -196,8 +194,8 @@ private:
|
|||
return 0;
|
||||
}
|
||||
|
||||
void (*do_sendfnc)(const string& s);
|
||||
void sendfnc(const string &s) {
|
||||
void (*do_sendfnc)(const std::string& s);
|
||||
void sendfnc(const std::string &s) {
|
||||
if (do_sendfnc != NULL) do_sendfnc(s);
|
||||
}
|
||||
|
||||
|
|
@ -213,23 +211,23 @@ private:
|
|||
if (do_rcvfnc != NULL) do_rcvfnc();
|
||||
}
|
||||
|
||||
void (*do_printRX)(string s);
|
||||
void printRX(string s) {
|
||||
void (*do_printRX)(std::string s);
|
||||
void printRX(std::string s) {
|
||||
if (do_printRX != NULL) do_printRX(s);
|
||||
}
|
||||
|
||||
void (*do_printTX)(string s);
|
||||
void printTX(string s) {
|
||||
void (*do_printTX)(std::string s);
|
||||
void printTX(std::string s) {
|
||||
if (do_printTX != NULL) do_printTX(s);
|
||||
}
|
||||
|
||||
void (*do_printLOG)(string s1, string s2);
|
||||
void printLOG(string s1, string s2) {
|
||||
void (*do_printLOG)(std::string s1, std::string s2);
|
||||
void printLOG(std::string s1, std::string s2) {
|
||||
if (do_printLOG) do_printLOG(s1, s2);
|
||||
}
|
||||
|
||||
void (*do_printTALK)(string s);
|
||||
void printTALK(string s) {
|
||||
void (*do_printTALK)(std::string s);
|
||||
void printTALK(std::string s) {
|
||||
if (do_printTALK != NULL) do_printTALK(s);
|
||||
}
|
||||
|
||||
|
|
@ -243,8 +241,8 @@ private:
|
|||
if (do_disconnectfnc != NULL) do_disconnectfnc();
|
||||
}
|
||||
|
||||
void (*do_rxUrCall)(string s);
|
||||
void rxUrCall(string s) {
|
||||
void (*do_rxUrCall)(std::string s);
|
||||
void rxUrCall(std::string s) {
|
||||
if (do_rxUrCall != NULL) do_rxUrCall(s);
|
||||
}
|
||||
|
||||
|
|
@ -253,13 +251,13 @@ private:
|
|||
if (do_qualityfnc != NULL) do_qualityfnc(pcnt);
|
||||
}
|
||||
|
||||
void (*do_printSTATUS)(string s);
|
||||
void printSTATUS(string s) {
|
||||
void (*do_printSTATUS)(std::string s);
|
||||
void printSTATUS(std::string s) {
|
||||
if (do_printSTATUS != NULL) do_printSTATUS(s);
|
||||
}
|
||||
|
||||
float (*do_transmit_time)(string s);
|
||||
float transmit_time(string s) {
|
||||
float (*do_transmit_time)(std::string s);
|
||||
float transmit_time(std::string s) {
|
||||
if (do_transmit_time) return do_transmit_time(s);
|
||||
else return 0;
|
||||
}
|
||||
|
|
@ -287,36 +285,36 @@ public:
|
|||
void stop_arq();
|
||||
void exit_arq();
|
||||
|
||||
string checksum(string &s);
|
||||
std::string checksum(std::string &s);
|
||||
|
||||
void myCall(string s) {
|
||||
void myCall(std::string s) {
|
||||
MyCall = upcase(s);
|
||||
for (size_t n = 0; n < MyCall.length(); n++)
|
||||
if (MyCall[n] == ';') MyCall[n] = '-';
|
||||
}
|
||||
string myCall() { return MyCall;}
|
||||
std::string myCall() { return MyCall;}
|
||||
|
||||
void urCall(string s) {
|
||||
void urCall(std::string s) {
|
||||
UrCall = s;
|
||||
for (size_t n = 0; n < UrCall.length(); n++)
|
||||
if (UrCall[n] == ';') UrCall[n] = '-';
|
||||
}
|
||||
|
||||
string urCall() { return UrCall;}
|
||||
std::string urCall() { return UrCall;}
|
||||
|
||||
void escape(bool, string &);
|
||||
void escape(bool, std::string &);
|
||||
|
||||
void setSendFunc( void (*f)(const string& s)) { do_sendfnc = f;}
|
||||
void setSendFunc( void (*f)(const std::string& s)) { do_sendfnc = f;}
|
||||
void setGetCFunc( bool (*f)(char &)) { do_getc1 = f;}
|
||||
void setRcvFunc( void (*f)()) { do_rcvfnc = f;}
|
||||
|
||||
void setPrintRX( void (*f)(string s)) { do_printRX = f;}
|
||||
void setPrintTX( void (*f)(string s)) { do_printTX = f;}
|
||||
void setPrintTALK (void (*f)(string s)) {do_printTALK = f;}
|
||||
void setPrintLOG (void (*f)(string, string)){do_printLOG = f;}
|
||||
void setPrintSTATUS (void (*f)(string s)) { do_printSTATUS = f;}
|
||||
void setTRX(string (*f)()) { do_trx = f;}
|
||||
void setTransmitTime(float (*f)(string s)) { do_transmit_time = f; }
|
||||
void setPrintRX( void (*f)(std::string s)) { do_printRX = f;}
|
||||
void setPrintTX( void (*f)(std::string s)) { do_printTX = f;}
|
||||
void setPrintTALK (void (*f)(std::string s)) {do_printTALK = f;}
|
||||
void setPrintLOG (void (*f)(std::string, std::string)){do_printLOG = f;}
|
||||
void setPrintSTATUS (void (*f)(std::string s)) { do_printSTATUS = f;}
|
||||
void setTRX(std::string (*f)()) { do_trx = f;}
|
||||
void setTransmitTime(float (*f)(std::string s)) { do_transmit_time = f; }
|
||||
void setOK_to_transmit(bool (*f)()) { do_OK_to_transmit = f; }
|
||||
|
||||
void setExponent( int exp ) { exponent = exp; setbuffer_length(); }
|
||||
|
|
@ -324,13 +322,13 @@ public:
|
|||
void setRetries ( int rtries ) {
|
||||
Retries = rtries; }
|
||||
int getRetries() { return (int) Retries; }
|
||||
void setrxUrCall( void (*f)(string s)) { do_rxUrCall = f;}
|
||||
void setrxUrCall( void (*f)(std::string s)) { do_rxUrCall = f;}
|
||||
void setQualityValue( void (*f)(float)) { do_qualityfnc = f;}
|
||||
void setDisconnected( void (*f)()) { do_disconnectfnc = f;};
|
||||
|
||||
void connect();
|
||||
|
||||
void sendtext(string call, string txt);
|
||||
void sendtext(std::string call, std::string txt);
|
||||
|
||||
bool connected() { return (LinkState == ARQ_CONNECTED); }
|
||||
void disconnect();
|
||||
|
|
|
|||
|
|
@ -24,26 +24,24 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
class base128 {
|
||||
#define LINELEN 64
|
||||
private:
|
||||
string output;
|
||||
std::string output;
|
||||
size_t iolen;
|
||||
size_t iocp;
|
||||
bool ateof;
|
||||
int linelength;
|
||||
void init();
|
||||
void escape(string &, bool encode = true);
|
||||
void addlf(string &);
|
||||
void remlf(string &);
|
||||
void escape(std::string &, bool encode = true);
|
||||
void addlf(std::string &);
|
||||
void remlf(std::string &);
|
||||
public:
|
||||
base128() { init(); };
|
||||
~base128() {};
|
||||
string encode(string &in);
|
||||
string decode(string &in);
|
||||
std::string encode(std::string &in);
|
||||
std::string decode(std::string &in);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,23 +24,21 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class base256 {
|
||||
#define LINELEN 64
|
||||
private:
|
||||
string output;
|
||||
std::string output;
|
||||
size_t iolen;
|
||||
size_t iocp;
|
||||
bool ateof;
|
||||
int linelength;
|
||||
void init();
|
||||
void escape(string &, bool encode = true);
|
||||
void addlf(string &);
|
||||
void remlf(string &);
|
||||
void escape(std::string &, bool encode = true);
|
||||
void addlf(std::string &);
|
||||
void remlf(std::string &);
|
||||
public:
|
||||
base256() { init(); };
|
||||
~base256() {};
|
||||
string encode(string &in);
|
||||
string decode(string &in);
|
||||
std::string encode(std::string &in);
|
||||
std::string decode(std::string &in);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,14 +24,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
class base64 {
|
||||
#define LINELEN 64
|
||||
private:
|
||||
string output;
|
||||
std::string output;
|
||||
size_t iolen;
|
||||
size_t iocp;
|
||||
bool ateof;
|
||||
|
|
@ -43,6 +41,6 @@ private:
|
|||
public:
|
||||
base64(bool t = false) {crlf = t; init(); };
|
||||
~base64(){};
|
||||
string encode(string in);
|
||||
string decode(string in);
|
||||
std::string encode(std::string in);
|
||||
std::string decode(std::string in);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
#include <string>
|
||||
#include "debug.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Ccrc16 {
|
||||
private:
|
||||
unsigned int crcval;
|
||||
|
|
@ -35,7 +33,7 @@ public:
|
|||
~Ccrc16() {};
|
||||
void reset() { crcval = 0xFFFF;}
|
||||
unsigned int val() {return crcval;}
|
||||
string sval() {
|
||||
std::string sval() {
|
||||
const char *smft = "%04X";
|
||||
snprintf(ss,sizeof(ss), smft, crcval);
|
||||
return ss;
|
||||
|
|
@ -53,13 +51,13 @@ public:
|
|||
update(c);
|
||||
return crcval;
|
||||
}
|
||||
unsigned int crc16(string s) {
|
||||
unsigned int crc16(std::string s) {
|
||||
reset();
|
||||
for (size_t i = 0; i < s.length(); i++)
|
||||
update((char)(s[i] & 0xFF)); // only use lower half of unicode
|
||||
return crcval;
|
||||
}
|
||||
string scrc16(string s) {
|
||||
std::string scrc16(std::string s) {
|
||||
crc16(s);
|
||||
return sval();
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -50,9 +50,9 @@ extern bool rxTextReady;
|
|||
extern bool rxARQfile;
|
||||
extern std::string txtarqload;
|
||||
|
||||
extern void display_payloadtext(string outfname, string txtarqload);
|
||||
extern void direct_payload(string);
|
||||
extern void save_this_file_as(string, string);
|
||||
extern void display_payloadtext(std::string outfname, std::string txtarqload);
|
||||
extern void direct_payload(std::string);
|
||||
extern void save_this_file_as(std::string, std::string);
|
||||
|
||||
extern void send_xml_text(std::string txt);
|
||||
|
||||
|
|
|
|||
|
|
@ -83,13 +83,13 @@ extern Fl_Group *tab_UI;
|
|||
//======================================================================
|
||||
// events
|
||||
extern Fl_Double_Window* create_ARQ_event_dialog();
|
||||
extern void add_event(string s);
|
||||
extern void add_event(std::string s);
|
||||
extern Fl_Browser *btext;
|
||||
//======================================================================
|
||||
// rcvd msgs
|
||||
extern Fl_Double_Window *rcvd_msgs_dialog;
|
||||
extern Fl_Double_Window *create_rcvd_msgs_dialog();
|
||||
extern void add_rcvd_msg(string s);
|
||||
extern void add_rcvd_msg(std::string s);
|
||||
//======================================================================
|
||||
// custom editor
|
||||
extern Fl_Double_Window *edit_view_dialog();
|
||||
|
|
@ -187,8 +187,8 @@ extern Fl_ListBox *cbo_modes;
|
|||
|
||||
extern void clear_estimate();
|
||||
extern void estimate();
|
||||
extern bool valid_mode_check(string &md);
|
||||
extern void update_cbo_modes(string &fldigi_modes);
|
||||
extern bool valid_mode_check(std::string &md);
|
||||
extern void update_cbo_modes(std::string &fldigi_modes);
|
||||
|
||||
//======================================================================
|
||||
// all form tabs
|
||||
|
|
@ -848,7 +848,7 @@ extern Fl_Group *tab_custom_transfer;
|
|||
extern Fl_ListBox *custom_selector;
|
||||
extern Fl_Output * txt_rcvd_custom_html_filename;
|
||||
extern Fl_Button * btn_save_custom_html_file;
|
||||
extern vector<string> custom_files;
|
||||
extern std::vector<std::string> custom_files;
|
||||
|
||||
//======================================================================
|
||||
// Drag-n-Drop
|
||||
|
|
@ -867,18 +867,18 @@ extern void create_mars_tab();
|
|||
extern Fl_Group *tab_mars;
|
||||
extern Fl_Tabs *tab_mars_type;
|
||||
|
||||
extern string mars_list_lname;
|
||||
extern string mars_list_call;
|
||||
extern string mars_list_state;
|
||||
extern string mars_list_bcall;
|
||||
extern string mars_list_position;
|
||||
extern std::string mars_list_lname;
|
||||
extern std::string mars_list_call;
|
||||
extern std::string mars_list_state;
|
||||
extern std::string mars_list_bcall;
|
||||
extern std::string mars_list_position;
|
||||
|
||||
extern bool get_mars_list_text();
|
||||
|
||||
extern void cb_mars_fl_input2(Fl_Widget *w, void *d);
|
||||
extern void cb_mars_text(Fl_Widget *w, void *d);
|
||||
extern string notail(string s);
|
||||
extern string maxchars(string s, unsigned int n, int indent = 0);
|
||||
extern std::string notail(std::string s);
|
||||
extern std::string maxchars(std::string s, unsigned int n, int indent = 0);
|
||||
|
||||
//======================================================================
|
||||
// MARS daily
|
||||
|
|
@ -1305,7 +1305,7 @@ extern const std::string states[];
|
|||
extern int numstates;
|
||||
extern const std::string hail_size[];
|
||||
extern int num_hail_size;
|
||||
extern const string tzones[];
|
||||
extern const std::string tzones[];
|
||||
extern int num_tzones;
|
||||
extern const std::string us_tzones[];
|
||||
extern int num_us_tzones;
|
||||
|
|
|
|||
|
|
@ -24,17 +24,15 @@
|
|||
#include <string>
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
struct TAGS { const char *tag; void (*fp)(size_t &, std::string);};
|
||||
|
||||
struct TAGS { const char *tag; void (*fp)(size_t &, string);};
|
||||
extern void parse_ics(std::string);
|
||||
extern bool qform_ics_import(std::string);
|
||||
extern void qform_ics_export(std::string);
|
||||
|
||||
extern void parse_ics(string);
|
||||
extern bool qform_ics_import(string);
|
||||
extern void qform_ics_export(string);
|
||||
|
||||
extern void parse_rg(string);
|
||||
extern bool qform_rg_import(string);
|
||||
extern void qform_rg_export(string);
|
||||
extern void parse_rg(std::string);
|
||||
extern bool qform_rg_import(std::string);
|
||||
extern void qform_rg_export(std::string);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct status {
|
||||
int mainX;
|
||||
int mainY;
|
||||
|
|
@ -38,37 +36,37 @@ struct status {
|
|||
|
||||
void saveLastState();
|
||||
void loadLastState();
|
||||
string my_call;
|
||||
string my_tel;
|
||||
string my_name;
|
||||
string my_addr;
|
||||
string my_city;
|
||||
string my_email;
|
||||
std::string my_call;
|
||||
std::string my_tel;
|
||||
std::string my_name;
|
||||
std::string my_addr;
|
||||
std::string my_city;
|
||||
std::string my_email;
|
||||
bool sernbr_fname;
|
||||
bool call_fname;
|
||||
int dt_fname;
|
||||
bool rgnbr_fname;
|
||||
bool arl_desc;
|
||||
string sernbr;
|
||||
string rgnbr;
|
||||
std::string sernbr;
|
||||
std::string rgnbr;
|
||||
bool rri;
|
||||
bool insert_x;
|
||||
int tab;
|
||||
string mars_roster_file;
|
||||
std::string mars_roster_file;
|
||||
int charcount;
|
||||
bool autowordwrap;
|
||||
bool send_original;
|
||||
string xmlrpc_addr;
|
||||
string xmlrpc_port;
|
||||
std::string xmlrpc_addr;
|
||||
std::string xmlrpc_port;
|
||||
|
||||
bool use_compression;
|
||||
int selected_mode;
|
||||
int swx_index_default_state;
|
||||
int swx_index_default_county;
|
||||
string swx_default_city;
|
||||
string swx_default_location;
|
||||
string swx_default_zone;
|
||||
string swx_default_profile;
|
||||
std::string swx_default_city;
|
||||
std::string swx_default_location;
|
||||
std::string swx_default_zone;
|
||||
std::string swx_default_profile;
|
||||
bool change_modem_with_autosend;
|
||||
bool sync_modem_to_fldigi;
|
||||
bool caplocal;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ extern Fl_Button *btn_select_send;
|
|||
extern Fl_Hold_Browser *brws_xfr_filenames;
|
||||
extern Fl_Button *btn_open_rcvd;
|
||||
|
||||
extern string def_transfer_filename;
|
||||
extern std::string def_transfer_filename;
|
||||
|
||||
extern void create_transfer_tab();
|
||||
extern void clear_transfer_form();
|
||||
|
|
|
|||
|
|
@ -24,19 +24,17 @@
|
|||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
enum {BASE64, BASE128, BASE256};
|
||||
|
||||
extern void compress_maybe(string& input, bool file_transfer = false);
|
||||
extern int decompress_maybe(string& input);
|
||||
extern void compress_maybe(std::string& input, bool file_transfer = false);
|
||||
extern int decompress_maybe(std::string& input);
|
||||
|
||||
extern void export_wrapfile(string, string, string, bool with_ext);
|
||||
extern bool import_wrapfile(string fname, string &efname, string &text);
|
||||
extern void export_wrapfile(std::string, std::string, std::string, bool with_ext);
|
||||
extern bool import_wrapfile(std::string fname, std::string &efname, std::string &text);
|
||||
|
||||
extern void xfr_via_socket(string, string);
|
||||
extern void xfr_via_socket(std::string, std::string);
|
||||
|
||||
extern string wrap_outfilename;
|
||||
extern std::string wrap_outfilename;
|
||||
|
||||
extern bool b_autosend;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ extern pthread_mutex_t mutex_xmlrpc;
|
|||
extern std::string xml_get_rx_chars();
|
||||
extern void xml_send_tx_chars(std::string s);
|
||||
extern std::string xml_fldigi_trx();
|
||||
extern void xfr_via_xmlrpc(string s);
|
||||
extern void xfr_via_xmlrpc(std::string s);
|
||||
extern bool fldigi_OK_to_transmit();
|
||||
|
||||
extern void set_fldigi_txid(bool on_off);
|
||||
|
|
|
|||
|
|
@ -74,31 +74,31 @@ using namespace std;
|
|||
|
||||
const char army_precedent[] = "RPOZM";
|
||||
|
||||
string mars_army_de = ":de:";
|
||||
string mars_army_nbr = ":nbr:";
|
||||
std::string mars_army_de = ":de:";
|
||||
std::string mars_army_nbr = ":nbr:";
|
||||
|
||||
string mars_army_prec = ":pre:";
|
||||
string mars_army_dtg = ":dtg:";
|
||||
string mars_army_fm = ":fm:";
|
||||
string mars_army_to = ":to:";
|
||||
string mars_army_info = ":info:";
|
||||
string mars_army_subj = ":subj:";
|
||||
string mars_army_text = ":text:";
|
||||
std::string mars_army_prec = ":pre:";
|
||||
std::string mars_army_dtg = ":dtg:";
|
||||
std::string mars_army_fm = ":fm:";
|
||||
std::string mars_army_to = ":to:";
|
||||
std::string mars_army_info = ":info:";
|
||||
std::string mars_army_subj = ":subj:";
|
||||
std::string mars_army_text = ":text:";
|
||||
|
||||
string s_mars_army_de;
|
||||
string s_mars_army_nbr;
|
||||
string s_mars_army_prec = "R";
|
||||
string s_mars_army_dtg;
|
||||
string s_mars_army_fm;
|
||||
string s_mars_army_to;
|
||||
string s_mars_army_subj;
|
||||
string s_mars_army_info;
|
||||
string s_mars_army_text;
|
||||
std::string s_mars_army_de;
|
||||
std::string s_mars_army_nbr;
|
||||
std::string s_mars_army_prec = "R";
|
||||
std::string s_mars_army_dtg;
|
||||
std::string s_mars_army_fm;
|
||||
std::string s_mars_army_to;
|
||||
std::string s_mars_army_subj;
|
||||
std::string s_mars_army_info;
|
||||
std::string s_mars_army_text;
|
||||
|
||||
string buffmars_army;
|
||||
string def_mars_army_filename = "";
|
||||
string base_mars_army_filename = "";
|
||||
string def_mars_army_TemplateName = "";
|
||||
std::string buffmars_army;
|
||||
std::string def_mars_army_filename = "";
|
||||
std::string base_mars_army_filename = "";
|
||||
std::string def_mars_army_TemplateName = "";
|
||||
|
||||
bool using_mars_army_template = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
extern Fl_Double_Window* mars_army_list_dialog();
|
||||
extern Fl_Double_Window *mars_army_list_window;
|
||||
extern Fl_Multi_Browser *brws_mars_army_list;
|
||||
extern string mars_army_list_text;
|
||||
extern std::string mars_army_list_text;
|
||||
extern bool mars_army_list_ok;
|
||||
|
||||
Fl_Group *tab_mars_army = (Fl_Group *)0;
|
||||
|
|
@ -78,9 +78,9 @@ bool get_mars_army_list_text()
|
|||
void cb_btn_mars_army_pick_fm(Fl_Widget *w, void *d)
|
||||
{
|
||||
if (!get_mars_army_list_text()) return;
|
||||
string s = mars_army_list_text;
|
||||
std::string s = mars_army_list_text;
|
||||
size_t p;
|
||||
if ((p = s.find('\n')) != string::npos) s.erase(p);
|
||||
if ((p = s.find('\n')) != std::string::npos) s.erase(p);
|
||||
txt_mars_army_fm->value(s.c_str());
|
||||
estimate();
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ void cb_btn_mars_army_pick_fm(Fl_Widget *w, void *d)
|
|||
void cb_btn_mars_army_pick_to(Fl_Widget *w, void *d)
|
||||
{
|
||||
if (!get_mars_army_list_text()) return;
|
||||
string s = txt_mars_army_to->buffer()->text();
|
||||
std::string s = txt_mars_army_to->buffer()->text();
|
||||
if (s.length()) s += '\n';
|
||||
s.append(mars_army_list_text);
|
||||
txt_mars_army_to->clear();
|
||||
|
|
@ -99,7 +99,7 @@ void cb_btn_mars_army_pick_to(Fl_Widget *w, void *d)
|
|||
void cb_btn_mars_army_pick_info(Fl_Widget *w, void *d)
|
||||
{
|
||||
if (!get_mars_army_list_text()) return;
|
||||
string s = txt_mars_army_info->buffer()->text();
|
||||
std::string s = txt_mars_army_info->buffer()->text();
|
||||
if (s.length()) s += '\n';
|
||||
s.append(mars_army_list_text);
|
||||
txt_mars_army_info->clear();
|
||||
|
|
@ -254,12 +254,12 @@ Fl_Multi_Browser *brws_mars_army_list = (Fl_Multi_Browser *)0;
|
|||
|
||||
const int mars_army_list_widths[] = {80, 170, 30, 0};
|
||||
|
||||
string mars_army_list_text;
|
||||
std::string mars_army_list_text;
|
||||
bool mars_army_list_ok = false;
|
||||
|
||||
void cb_army_list_ok(Fl_Widget *w, void *d)
|
||||
{
|
||||
string retstr;
|
||||
std::string retstr;
|
||||
mars_army_list_text.clear();
|
||||
size_t p;
|
||||
for (int i = 1; i <= brws_mars_army_list->size(); i++) {
|
||||
|
|
|
|||
|
|
@ -75,76 +75,76 @@ using namespace std;
|
|||
const char mars_precedent[] = "RPOZ";
|
||||
const char mars_e_x[] = "EX";
|
||||
|
||||
string mars_daily_incident = ":md_inc:";
|
||||
string mars_daily_de = ":md_de_:";
|
||||
string mars_daily_nbr = ":md_nbr:";
|
||||
string mars_daily_prec = ":md_pre:";
|
||||
string mars_daily_dtg = ":md_dtg:";
|
||||
string mars_daily_fm_name = ":md_fnm:";
|
||||
string mars_daily_fm_call = ":md_fcl:";
|
||||
string mars_daily_fm_state = ":md_fst:";
|
||||
string mars_daily_to_pos = ":md_tps:";
|
||||
string mars_daily_to_call = ":md_tcl:";
|
||||
string mars_daily_to_state = ":md_tst:";
|
||||
string mars_daily_pos1 = ":md_ps1:";
|
||||
string mars_daily_call1 = ":md_cl1:";
|
||||
string mars_daily_state1 = ":md_st1:";
|
||||
string mars_daily_pos2 = ":md_ps2:";
|
||||
string mars_daily_call2 = ":md_cl2:";
|
||||
string mars_daily_state2 = ":md_st2:";
|
||||
string mars_daily_pos3 = ":md_ps3:";
|
||||
string mars_daily_call3 = ":md_cl3:";
|
||||
string mars_daily_state3 = ":md_st3:";
|
||||
string mars_daily_sitrep_id = ":md_sid:";
|
||||
string mars_daily_sitrep_loc = ":md_slo:";
|
||||
string mars_daily_24hr = ":md_22h:";
|
||||
string mars_daily_netcall = ":md_ncl:";
|
||||
string mars_daily_e_x = ":md_e_x:";
|
||||
string mars_daily_dtg_active = ":md_dta:";
|
||||
string mars_daily_dtg_deactive = ":md_dtd:";
|
||||
string mars_daily_nbr_stations = ":md_nst:";
|
||||
string mars_daily_details = ":md_det:";
|
||||
string mars_daily_activations = ":md_acs:";
|
||||
string mars_daily_agencies = ":md_agy:";
|
||||
string mars_daily_remarks = ":md_rem:";
|
||||
std::string mars_daily_incident = ":md_inc:";
|
||||
std::string mars_daily_de = ":md_de_:";
|
||||
std::string mars_daily_nbr = ":md_nbr:";
|
||||
std::string mars_daily_prec = ":md_pre:";
|
||||
std::string mars_daily_dtg = ":md_dtg:";
|
||||
std::string mars_daily_fm_name = ":md_fnm:";
|
||||
std::string mars_daily_fm_call = ":md_fcl:";
|
||||
std::string mars_daily_fm_state = ":md_fst:";
|
||||
std::string mars_daily_to_pos = ":md_tps:";
|
||||
std::string mars_daily_to_call = ":md_tcl:";
|
||||
std::string mars_daily_to_state = ":md_tst:";
|
||||
std::string mars_daily_pos1 = ":md_ps1:";
|
||||
std::string mars_daily_call1 = ":md_cl1:";
|
||||
std::string mars_daily_state1 = ":md_st1:";
|
||||
std::string mars_daily_pos2 = ":md_ps2:";
|
||||
std::string mars_daily_call2 = ":md_cl2:";
|
||||
std::string mars_daily_state2 = ":md_st2:";
|
||||
std::string mars_daily_pos3 = ":md_ps3:";
|
||||
std::string mars_daily_call3 = ":md_cl3:";
|
||||
std::string mars_daily_state3 = ":md_st3:";
|
||||
std::string mars_daily_sitrep_id = ":md_sid:";
|
||||
std::string mars_daily_sitrep_loc = ":md_slo:";
|
||||
std::string mars_daily_24hr = ":md_22h:";
|
||||
std::string mars_daily_netcall = ":md_ncl:";
|
||||
std::string mars_daily_e_x = ":md_e_x:";
|
||||
std::string mars_daily_dtg_active = ":md_dta:";
|
||||
std::string mars_daily_dtg_deactive = ":md_dtd:";
|
||||
std::string mars_daily_nbr_stations = ":md_nst:";
|
||||
std::string mars_daily_details = ":md_det:";
|
||||
std::string mars_daily_activations = ":md_acs:";
|
||||
std::string mars_daily_agencies = ":md_agy:";
|
||||
std::string mars_daily_remarks = ":md_rem:";
|
||||
|
||||
string s_mars_daily_incident;
|
||||
string s_mars_daily_de;
|
||||
string s_mars_daily_nbr;
|
||||
string s_mars_daily_prec = "R";
|
||||
string s_mars_daily_dtg;
|
||||
string s_mars_daily_fm_name;
|
||||
string s_mars_daily_fm_call;
|
||||
string s_mars_daily_fm_state;
|
||||
string s_mars_daily_to_pos;
|
||||
string s_mars_daily_to_call;
|
||||
string s_mars_daily_to_state;
|
||||
string s_mars_daily_pos1;
|
||||
string s_mars_daily_call1;
|
||||
string s_mars_daily_state1;
|
||||
string s_mars_daily_pos2;
|
||||
string s_mars_daily_call2;
|
||||
string s_mars_daily_state2;
|
||||
string s_mars_daily_pos3;
|
||||
string s_mars_daily_call3;
|
||||
string s_mars_daily_state3;
|
||||
string s_mars_daily_sitrep_id;
|
||||
string s_mars_daily_sitrep_loc;
|
||||
string s_mars_daily_24hr;
|
||||
string s_mars_daily_netcall;
|
||||
string s_mars_daily_e_x = "X";
|
||||
string s_mars_daily_dtg_active;
|
||||
string s_mars_daily_dtg_deactive;
|
||||
string s_mars_daily_nbr_stations;
|
||||
string s_mars_daily_details;
|
||||
string s_mars_daily_activations;
|
||||
string s_mars_daily_agencies;
|
||||
string s_mars_daily_remarks;
|
||||
std::string s_mars_daily_incident;
|
||||
std::string s_mars_daily_de;
|
||||
std::string s_mars_daily_nbr;
|
||||
std::string s_mars_daily_prec = "R";
|
||||
std::string s_mars_daily_dtg;
|
||||
std::string s_mars_daily_fm_name;
|
||||
std::string s_mars_daily_fm_call;
|
||||
std::string s_mars_daily_fm_state;
|
||||
std::string s_mars_daily_to_pos;
|
||||
std::string s_mars_daily_to_call;
|
||||
std::string s_mars_daily_to_state;
|
||||
std::string s_mars_daily_pos1;
|
||||
std::string s_mars_daily_call1;
|
||||
std::string s_mars_daily_state1;
|
||||
std::string s_mars_daily_pos2;
|
||||
std::string s_mars_daily_call2;
|
||||
std::string s_mars_daily_state2;
|
||||
std::string s_mars_daily_pos3;
|
||||
std::string s_mars_daily_call3;
|
||||
std::string s_mars_daily_state3;
|
||||
std::string s_mars_daily_sitrep_id;
|
||||
std::string s_mars_daily_sitrep_loc;
|
||||
std::string s_mars_daily_24hr;
|
||||
std::string s_mars_daily_netcall;
|
||||
std::string s_mars_daily_e_x = "X";
|
||||
std::string s_mars_daily_dtg_active;
|
||||
std::string s_mars_daily_dtg_deactive;
|
||||
std::string s_mars_daily_nbr_stations;
|
||||
std::string s_mars_daily_details;
|
||||
std::string s_mars_daily_activations;
|
||||
std::string s_mars_daily_agencies;
|
||||
std::string s_mars_daily_remarks;
|
||||
|
||||
string buffmars_daily;
|
||||
string def_mars_daily_filename = "";
|
||||
string base_mars_daily_filename = "";
|
||||
string def_mars_daily_TemplateName = "";
|
||||
std::string buffmars_daily;
|
||||
std::string def_mars_daily_filename = "";
|
||||
std::string base_mars_daily_filename = "";
|
||||
std::string def_mars_daily_TemplateName = "";
|
||||
|
||||
bool using_mars_daily_template = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,123 +74,123 @@ using namespace std;
|
|||
|
||||
const char mars_ineei_precedent[] = "RPIFM";
|
||||
|
||||
string ineei_buff;
|
||||
string def_mars_ineei_filename = "";
|
||||
string base_mars_ineei_filename = "";
|
||||
string def_mars_ineei_TemplateName = "";
|
||||
std::string ineei_buff;
|
||||
std::string def_mars_ineei_filename = "";
|
||||
std::string base_mars_ineei_filename = "";
|
||||
std::string def_mars_ineei_TemplateName = "";
|
||||
bool using_mars_ineei_template = false;
|
||||
|
||||
// mars_ineei fields
|
||||
|
||||
string mars_ineei_DE = ":de:";
|
||||
string mars_ineei_NBR = ":nbr:";
|
||||
string mars_ineei_PREC = ":prec:";
|
||||
string mars_ineei_DTG = ":dtg:";
|
||||
string mars_ineei_FMNAME = ":fmname:";
|
||||
string mars_ineei_FMCALL = ":fmcall:";
|
||||
string mars_ineei_FMSTATE = ":fmstate:";
|
||||
string mars_ineei_TOPOS = ":topos:";
|
||||
string mars_ineei_TOCALL = ":tocall:";
|
||||
string mars_ineei_TOSTATE = ":tostate:";
|
||||
string mars_ineei_INFO1POS = ":info1pos:";
|
||||
string mars_ineei_INFO1CALL = ":info1call:";
|
||||
string mars_ineei_INFO1STATE = ":info1state:";
|
||||
string mars_ineei_INFO2POS = ":info2pos:";
|
||||
string mars_ineei_INFO2CALL = ":info2call:";
|
||||
string mars_ineei_INFO2STATE = ":info2state:";
|
||||
string mars_ineei_INFO3POS = ":info3pos:";
|
||||
string mars_ineei_INFO3CALL = ":info3call:";
|
||||
string mars_ineei_INFO3STATE = ":info3state:";
|
||||
string mars_ineei_INFO4POS = ":info4pos:";
|
||||
string mars_ineei_INFO4CALL = ":info4call:";
|
||||
string mars_ineei_INFO4STATE = ":info4state:";
|
||||
string mars_ineei_INFO5POS = ":info5pos:";
|
||||
string mars_ineei_INFO5CALL = ":info5call:";
|
||||
string mars_ineei_INFO5STATE = ":info5state:";
|
||||
string mars_ineei_INFO6POS = ":info6pos:";
|
||||
string mars_ineei_INFO6CALL = ":info6call:";
|
||||
string mars_ineei_INFO6STATE = ":info6state:";
|
||||
string mars_ineei_INFO7POS = ":info7pos:";
|
||||
string mars_ineei_INFO7CALL = ":info7call:";
|
||||
string mars_ineei_INFO7STATE = ":info7state:";
|
||||
string mars_ineei_INFO8POS = ":info8pos:";
|
||||
string mars_ineei_INFO8CALL = ":info8call:";
|
||||
string mars_ineei_INFO8STATE = ":info8state:";
|
||||
string mars_ineei_INFO9POS = ":info9pos:";
|
||||
string mars_ineei_INFO9CALL = ":info9call:";
|
||||
string mars_ineei_INFO9STATE = ":info9state:";
|
||||
string mars_ineei_INFO10POS = ":info10pos:";
|
||||
string mars_ineei_INFO10CALL = ":info10call:";
|
||||
string mars_ineei_INFO10STATE = ":info10state:";
|
||||
string mars_ineei_INCIDENT = ":incident:";
|
||||
string mars_ineei_REF = ":ref:";
|
||||
string mars_ineei_STATE = ":state:";
|
||||
string mars_ineei_1A_INCIDENT = ":1a_incident:";
|
||||
string mars_ineei_1A_LOCATION = ":1a_location:";
|
||||
string mars_ineei_1A_TIME = ":1a_time:";
|
||||
string mars_ineei_1B_MEDFACSTS = ":1b_medfacsts:";
|
||||
string mars_ineei_1C_TRNPSTS = ":1c_trnpsts:";
|
||||
string mars_ineei_1D_DAMAGE = ":1d_damage:";
|
||||
string mars_ineei_1E_UTILSTS = ":1e_utilsts:";
|
||||
string mars_ineei_1F_COMMSTS = ":1f_commsts:";
|
||||
string mars_ineei_1G_INFOSRC = ":1g_infosrc:";
|
||||
string mars_ineei_1G_INFOTIME = ":1g_infotime:";
|
||||
string mars_ineei_1H_REMARKS = ":1h_remarks:";
|
||||
std::string mars_ineei_DE = ":de:";
|
||||
std::string mars_ineei_NBR = ":nbr:";
|
||||
std::string mars_ineei_PREC = ":prec:";
|
||||
std::string mars_ineei_DTG = ":dtg:";
|
||||
std::string mars_ineei_FMNAME = ":fmname:";
|
||||
std::string mars_ineei_FMCALL = ":fmcall:";
|
||||
std::string mars_ineei_FMSTATE = ":fmstate:";
|
||||
std::string mars_ineei_TOPOS = ":topos:";
|
||||
std::string mars_ineei_TOCALL = ":tocall:";
|
||||
std::string mars_ineei_TOSTATE = ":tostate:";
|
||||
std::string mars_ineei_INFO1POS = ":info1pos:";
|
||||
std::string mars_ineei_INFO1CALL = ":info1call:";
|
||||
std::string mars_ineei_INFO1STATE = ":info1state:";
|
||||
std::string mars_ineei_INFO2POS = ":info2pos:";
|
||||
std::string mars_ineei_INFO2CALL = ":info2call:";
|
||||
std::string mars_ineei_INFO2STATE = ":info2state:";
|
||||
std::string mars_ineei_INFO3POS = ":info3pos:";
|
||||
std::string mars_ineei_INFO3CALL = ":info3call:";
|
||||
std::string mars_ineei_INFO3STATE = ":info3state:";
|
||||
std::string mars_ineei_INFO4POS = ":info4pos:";
|
||||
std::string mars_ineei_INFO4CALL = ":info4call:";
|
||||
std::string mars_ineei_INFO4STATE = ":info4state:";
|
||||
std::string mars_ineei_INFO5POS = ":info5pos:";
|
||||
std::string mars_ineei_INFO5CALL = ":info5call:";
|
||||
std::string mars_ineei_INFO5STATE = ":info5state:";
|
||||
std::string mars_ineei_INFO6POS = ":info6pos:";
|
||||
std::string mars_ineei_INFO6CALL = ":info6call:";
|
||||
std::string mars_ineei_INFO6STATE = ":info6state:";
|
||||
std::string mars_ineei_INFO7POS = ":info7pos:";
|
||||
std::string mars_ineei_INFO7CALL = ":info7call:";
|
||||
std::string mars_ineei_INFO7STATE = ":info7state:";
|
||||
std::string mars_ineei_INFO8POS = ":info8pos:";
|
||||
std::string mars_ineei_INFO8CALL = ":info8call:";
|
||||
std::string mars_ineei_INFO8STATE = ":info8state:";
|
||||
std::string mars_ineei_INFO9POS = ":info9pos:";
|
||||
std::string mars_ineei_INFO9CALL = ":info9call:";
|
||||
std::string mars_ineei_INFO9STATE = ":info9state:";
|
||||
std::string mars_ineei_INFO10POS = ":info10pos:";
|
||||
std::string mars_ineei_INFO10CALL = ":info10call:";
|
||||
std::string mars_ineei_INFO10STATE = ":info10state:";
|
||||
std::string mars_ineei_INCIDENT = ":incident:";
|
||||
std::string mars_ineei_REF = ":ref:";
|
||||
std::string mars_ineei_STATE = ":state:";
|
||||
std::string mars_ineei_1A_INCIDENT = ":1a_incident:";
|
||||
std::string mars_ineei_1A_LOCATION = ":1a_location:";
|
||||
std::string mars_ineei_1A_TIME = ":1a_time:";
|
||||
std::string mars_ineei_1B_MEDFACSTS = ":1b_medfacsts:";
|
||||
std::string mars_ineei_1C_TRNPSTS = ":1c_trnpsts:";
|
||||
std::string mars_ineei_1D_DAMAGE = ":1d_damage:";
|
||||
std::string mars_ineei_1E_UTILSTS = ":1e_utilsts:";
|
||||
std::string mars_ineei_1F_COMMSTS = ":1f_commsts:";
|
||||
std::string mars_ineei_1G_INFOSRC = ":1g_infosrc:";
|
||||
std::string mars_ineei_1G_INFOTIME = ":1g_infotime:";
|
||||
std::string mars_ineei_1H_REMARKS = ":1h_remarks:";
|
||||
|
||||
string s_mars_ineei_DE;
|
||||
string s_mars_ineei_NBR;
|
||||
string s_mars_ineei_PREC = "R";
|
||||
string s_mars_ineei_DTG;
|
||||
string s_mars_ineei_FMNAME;
|
||||
string s_mars_ineei_FMCALL;
|
||||
string s_mars_ineei_FMSTATE;
|
||||
string s_mars_ineei_TOPOS;
|
||||
string s_mars_ineei_TOCALL;
|
||||
string s_mars_ineei_TOSTATE;
|
||||
string s_mars_ineei_INFO1POS;
|
||||
string s_mars_ineei_INFO1CALL;
|
||||
string s_mars_ineei_INFO1STATE;
|
||||
string s_mars_ineei_INFO2POS;
|
||||
string s_mars_ineei_INFO2CALL;
|
||||
string s_mars_ineei_INFO2STATE;
|
||||
string s_mars_ineei_INFO3POS;
|
||||
string s_mars_ineei_INFO3CALL;
|
||||
string s_mars_ineei_INFO3STATE;
|
||||
string s_mars_ineei_INFO4POS;
|
||||
string s_mars_ineei_INFO4CALL;
|
||||
string s_mars_ineei_INFO4STATE;
|
||||
string s_mars_ineei_INFO5POS;
|
||||
string s_mars_ineei_INFO5CALL;
|
||||
string s_mars_ineei_INFO5STATE;
|
||||
string s_mars_ineei_INFO6POS;
|
||||
string s_mars_ineei_INFO6CALL;
|
||||
string s_mars_ineei_INFO6STATE;
|
||||
string s_mars_ineei_INFO7POS;
|
||||
string s_mars_ineei_INFO7CALL;
|
||||
string s_mars_ineei_INFO7STATE;
|
||||
string s_mars_ineei_INFO8POS;
|
||||
string s_mars_ineei_INFO8CALL;
|
||||
string s_mars_ineei_INFO8STATE;
|
||||
string s_mars_ineei_INFO9POS;
|
||||
string s_mars_ineei_INFO9CALL;
|
||||
string s_mars_ineei_INFO9STATE;
|
||||
string s_mars_ineei_INFO10POS;
|
||||
string s_mars_ineei_INFO10CALL;
|
||||
string s_mars_ineei_INFO10STATE;
|
||||
string s_mars_ineei_INCIDENT;
|
||||
string s_mars_ineei_REF;
|
||||
string s_mars_ineei_STATE;
|
||||
string s_mars_ineei_1A_INCIDENT;
|
||||
string s_mars_ineei_1A_LOCATION;
|
||||
string s_mars_ineei_1A_TIME;
|
||||
string s_mars_ineei_1B_MEDFACSTS;
|
||||
string s_mars_ineei_1C_TRNPSTS;
|
||||
string s_mars_ineei_1D_DAMAGE;
|
||||
string s_mars_ineei_1E_UTILSTS;
|
||||
string s_mars_ineei_1F_COMMSTS;
|
||||
string s_mars_ineei_1G_INFOSRC;
|
||||
string s_mars_ineei_1G_INFOTIME;
|
||||
string s_mars_ineei_1H_REMARKS;
|
||||
std::string s_mars_ineei_DE;
|
||||
std::string s_mars_ineei_NBR;
|
||||
std::string s_mars_ineei_PREC = "R";
|
||||
std::string s_mars_ineei_DTG;
|
||||
std::string s_mars_ineei_FMNAME;
|
||||
std::string s_mars_ineei_FMCALL;
|
||||
std::string s_mars_ineei_FMSTATE;
|
||||
std::string s_mars_ineei_TOPOS;
|
||||
std::string s_mars_ineei_TOCALL;
|
||||
std::string s_mars_ineei_TOSTATE;
|
||||
std::string s_mars_ineei_INFO1POS;
|
||||
std::string s_mars_ineei_INFO1CALL;
|
||||
std::string s_mars_ineei_INFO1STATE;
|
||||
std::string s_mars_ineei_INFO2POS;
|
||||
std::string s_mars_ineei_INFO2CALL;
|
||||
std::string s_mars_ineei_INFO2STATE;
|
||||
std::string s_mars_ineei_INFO3POS;
|
||||
std::string s_mars_ineei_INFO3CALL;
|
||||
std::string s_mars_ineei_INFO3STATE;
|
||||
std::string s_mars_ineei_INFO4POS;
|
||||
std::string s_mars_ineei_INFO4CALL;
|
||||
std::string s_mars_ineei_INFO4STATE;
|
||||
std::string s_mars_ineei_INFO5POS;
|
||||
std::string s_mars_ineei_INFO5CALL;
|
||||
std::string s_mars_ineei_INFO5STATE;
|
||||
std::string s_mars_ineei_INFO6POS;
|
||||
std::string s_mars_ineei_INFO6CALL;
|
||||
std::string s_mars_ineei_INFO6STATE;
|
||||
std::string s_mars_ineei_INFO7POS;
|
||||
std::string s_mars_ineei_INFO7CALL;
|
||||
std::string s_mars_ineei_INFO7STATE;
|
||||
std::string s_mars_ineei_INFO8POS;
|
||||
std::string s_mars_ineei_INFO8CALL;
|
||||
std::string s_mars_ineei_INFO8STATE;
|
||||
std::string s_mars_ineei_INFO9POS;
|
||||
std::string s_mars_ineei_INFO9CALL;
|
||||
std::string s_mars_ineei_INFO9STATE;
|
||||
std::string s_mars_ineei_INFO10POS;
|
||||
std::string s_mars_ineei_INFO10CALL;
|
||||
std::string s_mars_ineei_INFO10STATE;
|
||||
std::string s_mars_ineei_INCIDENT;
|
||||
std::string s_mars_ineei_REF;
|
||||
std::string s_mars_ineei_STATE;
|
||||
std::string s_mars_ineei_1A_INCIDENT;
|
||||
std::string s_mars_ineei_1A_LOCATION;
|
||||
std::string s_mars_ineei_1A_TIME;
|
||||
std::string s_mars_ineei_1B_MEDFACSTS;
|
||||
std::string s_mars_ineei_1C_TRNPSTS;
|
||||
std::string s_mars_ineei_1D_DAMAGE;
|
||||
std::string s_mars_ineei_1E_UTILSTS;
|
||||
std::string s_mars_ineei_1F_COMMSTS;
|
||||
std::string s_mars_ineei_1G_INFOSRC;
|
||||
std::string s_mars_ineei_1G_INFOTIME;
|
||||
std::string s_mars_ineei_1H_REMARKS;
|
||||
|
||||
void cb_mars_ineei_SetDTG()
|
||||
{
|
||||
|
|
@ -875,7 +875,7 @@ void cb_mars_ineei_save()
|
|||
using_mars_ineei_template = false;
|
||||
}
|
||||
|
||||
string justify_remarks(string instr, int start_count)
|
||||
std::string justify_remarks(string instr, int start_count)
|
||||
{
|
||||
// strip new lines
|
||||
string tmp = instr;
|
||||
|
|
@ -916,7 +916,7 @@ string justify_remarks(string instr, int start_count)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
string formated_output( string target )
|
||||
std::string formated_output( string target )
|
||||
{
|
||||
string formnet = target;
|
||||
string temp;
|
||||
|
|
|
|||
|
|
@ -74,63 +74,63 @@ using namespace std;
|
|||
|
||||
const char mars_net_precedent[] = "RPOZ";
|
||||
|
||||
string buffnet;
|
||||
string def_mars_net_filename = "";
|
||||
string base_mars_net_filename = "";
|
||||
string def_mars_net_TemplateName = "";
|
||||
std::string buffnet;
|
||||
std::string def_mars_net_filename = "";
|
||||
std::string base_mars_net_filename = "";
|
||||
std::string def_mars_net_TemplateName = "";
|
||||
bool using_mars_net_template = false;
|
||||
|
||||
// mars_net fields
|
||||
|
||||
string mars_net_DE = ":de:";
|
||||
string mars_net_NBR = ":nbr:";
|
||||
string mars_net_PREC = ":prec:";
|
||||
string mars_net_DTG = ":dtg:";
|
||||
string mars_net_FMNAME = ":fmname:";
|
||||
string mars_net_FMCALL = ":fmcall:";
|
||||
string mars_net_FMSTATE = ":fmstate:";
|
||||
string mars_net_TOPOS = ":topos:";
|
||||
string mars_net_TOCALL = ":tocall:";
|
||||
string mars_net_TOSTATE = ":tostate:";
|
||||
string mars_net_INFOPOS = ":INFOpos:";
|
||||
string mars_net_INFOCALL = ":INFOcall:";
|
||||
string mars_net_INFOSTATE = ":INFOstate:";
|
||||
string mars_net_INCIDENT = ":incident:";
|
||||
string mars_net_DND = ":dnd:";
|
||||
string mars_net_NETCALL = ":netcall:";
|
||||
string mars_net_DTGSTART = ":dtgstart:";
|
||||
string mars_net_DTGEND = ":dtgend:";
|
||||
string mars_net_NETSB = ":netsb:";
|
||||
string mars_net_NCSCALL = ":ncscall:";
|
||||
string mars_net_NBRSTAS = ":nbrstas:";
|
||||
string mars_net_CALLS = ":calls:";
|
||||
string mars_net_NBRMSGS = ":nbrmsgs:";
|
||||
string mars_net_COMMENTS = ":comments:";
|
||||
std::string mars_net_DE = ":de:";
|
||||
std::string mars_net_NBR = ":nbr:";
|
||||
std::string mars_net_PREC = ":prec:";
|
||||
std::string mars_net_DTG = ":dtg:";
|
||||
std::string mars_net_FMNAME = ":fmname:";
|
||||
std::string mars_net_FMCALL = ":fmcall:";
|
||||
std::string mars_net_FMSTATE = ":fmstate:";
|
||||
std::string mars_net_TOPOS = ":topos:";
|
||||
std::string mars_net_TOCALL = ":tocall:";
|
||||
std::string mars_net_TOSTATE = ":tostate:";
|
||||
std::string mars_net_INFOPOS = ":INFOpos:";
|
||||
std::string mars_net_INFOCALL = ":INFOcall:";
|
||||
std::string mars_net_INFOSTATE = ":INFOstate:";
|
||||
std::string mars_net_INCIDENT = ":incident:";
|
||||
std::string mars_net_DND = ":dnd:";
|
||||
std::string mars_net_NETCALL = ":netcall:";
|
||||
std::string mars_net_DTGSTART = ":dtgstart:";
|
||||
std::string mars_net_DTGEND = ":dtgend:";
|
||||
std::string mars_net_NETSB = ":netsb:";
|
||||
std::string mars_net_NCSCALL = ":ncscall:";
|
||||
std::string mars_net_NBRSTAS = ":nbrstas:";
|
||||
std::string mars_net_CALLS = ":calls:";
|
||||
std::string mars_net_NBRMSGS = ":nbrmsgs:";
|
||||
std::string mars_net_COMMENTS = ":comments:";
|
||||
|
||||
string s_mars_net_DE;
|
||||
string s_mars_net_NBR;
|
||||
string s_mars_net_PREC = "R";
|
||||
string s_mars_net_DTG;
|
||||
string s_mars_net_FMNAME;
|
||||
string s_mars_net_FMCALL;
|
||||
string s_mars_net_FMSTATE;
|
||||
string s_mars_net_TOPOS;
|
||||
string s_mars_net_TOCALL;
|
||||
string s_mars_net_TOSTATE;
|
||||
string s_mars_net_INFOPOS;
|
||||
string s_mars_net_INFOCALL;
|
||||
string s_mars_net_INFOSTATE;
|
||||
string s_mars_net_INCIDENT;
|
||||
string s_mars_net_DND;
|
||||
string s_mars_net_NETCALL;
|
||||
string s_mars_net_DTGSTART;
|
||||
string s_mars_net_DTGEND;
|
||||
string s_mars_net_NETSB;
|
||||
string s_mars_net_NCSCALL;
|
||||
string s_mars_net_NBRSTAS;
|
||||
string s_mars_net_CALLS;
|
||||
string s_mars_net_NBRMSGS;
|
||||
string s_mars_net_COMMENTS;
|
||||
std::string s_mars_net_DE;
|
||||
std::string s_mars_net_NBR;
|
||||
std::string s_mars_net_PREC = "R";
|
||||
std::string s_mars_net_DTG;
|
||||
std::string s_mars_net_FMNAME;
|
||||
std::string s_mars_net_FMCALL;
|
||||
std::string s_mars_net_FMSTATE;
|
||||
std::string s_mars_net_TOPOS;
|
||||
std::string s_mars_net_TOCALL;
|
||||
std::string s_mars_net_TOSTATE;
|
||||
std::string s_mars_net_INFOPOS;
|
||||
std::string s_mars_net_INFOCALL;
|
||||
std::string s_mars_net_INFOSTATE;
|
||||
std::string s_mars_net_INCIDENT;
|
||||
std::string s_mars_net_DND;
|
||||
std::string s_mars_net_NETCALL;
|
||||
std::string s_mars_net_DTGSTART;
|
||||
std::string s_mars_net_DTGEND;
|
||||
std::string s_mars_net_NETSB;
|
||||
std::string s_mars_net_NCSCALL;
|
||||
std::string s_mars_net_NBRSTAS;
|
||||
std::string s_mars_net_CALLS;
|
||||
std::string s_mars_net_NBRMSGS;
|
||||
std::string s_mars_net_COMMENTS;
|
||||
|
||||
void cb_mars_net_SetDTG()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void cb_btn_mars_net_pick_NCSCALL(Fl_Widget *w, void *d)
|
|||
void cb_btn_mars_net_add_calls(Fl_Widget *w, void *d)
|
||||
{
|
||||
if (!get_mars_list_text()) return;
|
||||
string calls = txt_mars_net_CALLS->value();
|
||||
std::string calls = txt_mars_net_CALLS->value();
|
||||
if (calls.length() && (calls[calls.length()-1] != '\n')) calls.append(" ");
|
||||
calls.append(mars_list_call);
|
||||
txt_mars_net_CALLS->value(calls.c_str());
|
||||
|
|
|
|||
|
|
@ -52,16 +52,16 @@ Fl_Double_Window *mars_list_window = 0;
|
|||
Fl_Hold_Browser *brws_mars_list = (Fl_Hold_Browser *)0;
|
||||
const int mars_list_widths[] = {160, 100, 40, 160, 0};
|
||||
|
||||
string mars_list_lname;
|
||||
string mars_list_call;
|
||||
string mars_list_state;
|
||||
string mars_list_bcall;
|
||||
string mars_list_position;
|
||||
std::string mars_list_lname;
|
||||
std::string mars_list_call;
|
||||
std::string mars_list_state;
|
||||
std::string mars_list_bcall;
|
||||
std::string mars_list_position;
|
||||
static bool mars_list_ok = false;
|
||||
|
||||
void cb_list_ok(Fl_Widget *w, void *d)
|
||||
{
|
||||
string retstr = brws_mars_list->text(brws_mars_list->value());
|
||||
std::string retstr = brws_mars_list->text(brws_mars_list->value());
|
||||
mars_list_window->hide();
|
||||
|
||||
mars_list_call.clear();
|
||||
|
|
@ -71,22 +71,22 @@ void cb_list_ok(Fl_Widget *w, void *d)
|
|||
mars_list_position.clear();
|
||||
|
||||
size_t p = retstr.find('\t');
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
mars_list_call = retstr.substr(0, p);
|
||||
retstr.erase(0,p+1);
|
||||
}
|
||||
p = retstr.find('\t');
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
mars_list_lname = retstr.substr(0, p);
|
||||
retstr.erase(0,p+1);
|
||||
}
|
||||
p = retstr.find('\t');
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
mars_list_state = retstr.substr(0, p);
|
||||
retstr.erase(0,p+1);
|
||||
}
|
||||
p = retstr.find('\t');
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
mars_list_bcall = retstr.substr(0, p);
|
||||
retstr.erase(0,p+1);
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ void cb_mars_fl_input2(Fl_Widget *w, void *d)
|
|||
{
|
||||
Fl_Input2 *inp = (Fl_Input2 *)w;
|
||||
int pos = inp->position();
|
||||
string text = inp->value();
|
||||
std::string text = inp->value();
|
||||
ucase(text);
|
||||
inp->value(text.c_str());
|
||||
inp->position(pos);
|
||||
|
|
@ -157,7 +157,7 @@ void cb_mars_text(Fl_Widget *w, void *d)
|
|||
{
|
||||
FTextEdit *inp = (FTextEdit *)w;
|
||||
int pos = inp->insert_position();
|
||||
string text = inp->buffer()->text();
|
||||
std::string text = inp->buffer()->text();
|
||||
ucase(text);
|
||||
inp->clear();
|
||||
inp->add(text.c_str());
|
||||
|
|
@ -165,18 +165,18 @@ void cb_mars_text(Fl_Widget *w, void *d)
|
|||
estimate();
|
||||
}
|
||||
|
||||
string notail(string s)
|
||||
std::string notail(std::string s)
|
||||
{
|
||||
static string str;
|
||||
static std::string str;
|
||||
str = s;
|
||||
while (str[str.length()-1] == '\n')
|
||||
str.erase(str.length()-1, 1);
|
||||
return str;
|
||||
}
|
||||
|
||||
string maxchars(string s, unsigned int nchars, int indent)
|
||||
std::string maxchars(std::string s, unsigned int nchars, int indent)
|
||||
{
|
||||
static string str;
|
||||
static std::string str;
|
||||
str = notail(s);
|
||||
if (str.length() <= nchars) return str;
|
||||
size_t ccount = 0; // # chars on line
|
||||
|
|
|
|||
|
|
@ -76,13 +76,13 @@ using namespace std;
|
|||
|
||||
// compatibility fields required to read older data files
|
||||
|
||||
string apt_title = "<tt:";
|
||||
string apt_to = "<to:";
|
||||
string apt_fm = "<fm:";
|
||||
string apt_subj = "<sb:";
|
||||
string apt_dt = "<dt:";
|
||||
string apt_tm = "<tm:";
|
||||
string apt_msg = "<mg:";
|
||||
std::string apt_title = "<tt:";
|
||||
std::string apt_to = "<to:";
|
||||
std::string apt_fm = "<fm:";
|
||||
std::string apt_subj = "<sb:";
|
||||
std::string apt_dt = "<dt:";
|
||||
std::string apt_tm = "<tm:";
|
||||
std::string apt_msg = "<mg:";
|
||||
|
||||
FIELD aptfields[] = {
|
||||
{ apt_title, "", (void **)&txt_pt_title, 't' },
|
||||
|
|
@ -94,13 +94,13 @@ FIELD aptfields[] = {
|
|||
{ apt_msg, "", (void **)&txt_pt_msg, 'e' } };
|
||||
|
||||
// new string tags & fields
|
||||
string pt_title = ":tt:";
|
||||
string pt_to = ":to:";
|
||||
string pt_fm = ":fm:";
|
||||
string pt_subj = ":sb:";
|
||||
string pt_dt = ":dt:";
|
||||
string pt_tm = ":tm:";
|
||||
string pt_msg = ":mg:";
|
||||
std::string pt_title = ":tt:";
|
||||
std::string pt_to = ":to:";
|
||||
std::string pt_fm = ":fm:";
|
||||
std::string pt_subj = ":sb:";
|
||||
std::string pt_dt = ":dt:";
|
||||
std::string pt_tm = ":tm:";
|
||||
std::string pt_msg = ":mg:";
|
||||
|
||||
FIELD ptfields[] = {
|
||||
{ pt_title, "", (void **)&txt_pt_title, 't' },
|
||||
|
|
@ -111,10 +111,10 @@ FIELD ptfields[] = {
|
|||
{ pt_subj, "", (void **)&txt_pt_subj, 't' },
|
||||
{ pt_msg, "", (void **)&txt_pt_msg, 'e' } };
|
||||
|
||||
string ptbuffer;
|
||||
string def_pt_filename = "";
|
||||
string base_pt_filename = "";
|
||||
string def_pt_TemplateName = "";
|
||||
std::string ptbuffer;
|
||||
std::string def_pt_filename = "";
|
||||
std::string base_pt_filename = "";
|
||||
std::string def_pt_TemplateName = "";
|
||||
|
||||
bool using_pt_template = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ void cb_arl_cancel()
|
|||
|
||||
void cb_arl_add()
|
||||
{
|
||||
string msg = "ARL ";
|
||||
string fill;
|
||||
std::string msg = "ARL ";
|
||||
std::string fill;
|
||||
msg.append(arl_list[arl_nbr].sznbr).append(progStatus.insert_x ? " X " : " ");
|
||||
fill = txt_arl_fill1->value(); if (!fill.empty()) msg.append(fill).append(progStatus.insert_x ? " X " : " ");
|
||||
fill = txt_arl_fill2->value(); if (!fill.empty()) msg.append(fill).append(progStatus.insert_x ? " X " : " ");
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void cb_hx_select()
|
|||
|
||||
void cb_hx_select_add()
|
||||
{
|
||||
string hxadd = txt_hx_select_text->value();
|
||||
std::string hxadd = txt_hx_select_text->value();
|
||||
int n = sel_hx_select->index();
|
||||
if (n < 0) return;
|
||||
if (hxadd.empty())
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string base_rg_filename = "";
|
||||
string def_rg_filename = "";
|
||||
string def_rg_TemplateName = "";
|
||||
std::string base_rg_filename = "";
|
||||
std::string def_rg_filename = "";
|
||||
std::string def_rg_TemplateName = "";
|
||||
|
||||
// Radiogram rgfields
|
||||
|
||||
|
|
@ -91,31 +91,31 @@ const char hxitems[] = " |HXA|HXB|HXC|HXD|HXE|HXF|HXG";
|
|||
|
||||
// compatibility fields required to read older data files
|
||||
|
||||
string a_rg_nbr = "<nbr:"; // 0.
|
||||
string a_rg_prec = "<prec:"; // 1.
|
||||
string a_rg_hx = "<hx:"; // 2.
|
||||
string a_rg_d1 = "<d1:"; // 3.
|
||||
string a_rg_t1 = "<t1:"; // 4.
|
||||
string a_rg_dt2 = "<dt2:"; // 5.
|
||||
string a_rg_dt3 = "<dt3:"; // 6.
|
||||
string a_rg_to = "<to:"; // 7.
|
||||
string a_rg_phone = "<tel:"; // 8.
|
||||
string a_rg_opnote = "<opn:"; // 9
|
||||
string a_rg_msg = "<msg:"; // 10.
|
||||
string a_rg_sig = "<sig:"; // 11.
|
||||
string a_rg_opnote2 = "<op2:"; // 12
|
||||
string a_rg_check = "<ck:"; // 13.
|
||||
string a_rg_station = "<sta:"; // 14.
|
||||
string a_rg_place = "<org:"; // 15
|
||||
string a_rg_orig = "<ori:"; // 16
|
||||
string a_rg_dlvd_to = "<dlv:"; // 17
|
||||
string a_rg_sent_to = "<sto:"; // 18
|
||||
string a_rg_snt_net = "<snt:"; // 19
|
||||
string a_rg_dt4 = "<dt4:"; // 20
|
||||
string a_rg_rcv_fm = "<rfm:"; // 21
|
||||
string a_rg_rcv_net = "<rnt:"; // 22
|
||||
string a_rg_dt5 = "<dt5:"; // 23
|
||||
string a_rg_svc = "<svc:"; // 24
|
||||
std::string a_rg_nbr = "<nbr:"; // 0.
|
||||
std::string a_rg_prec = "<prec:"; // 1.
|
||||
std::string a_rg_hx = "<hx:"; // 2.
|
||||
std::string a_rg_d1 = "<d1:"; // 3.
|
||||
std::string a_rg_t1 = "<t1:"; // 4.
|
||||
std::string a_rg_dt2 = "<dt2:"; // 5.
|
||||
std::string a_rg_dt3 = "<dt3:"; // 6.
|
||||
std::string a_rg_to = "<to:"; // 7.
|
||||
std::string a_rg_phone = "<tel:"; // 8.
|
||||
std::string a_rg_opnote = "<opn:"; // 9
|
||||
std::string a_rg_msg = "<msg:"; // 10.
|
||||
std::string a_rg_sig = "<sig:"; // 11.
|
||||
std::string a_rg_opnote2 = "<op2:"; // 12
|
||||
std::string a_rg_check = "<ck:"; // 13.
|
||||
std::string a_rg_station = "<sta:"; // 14.
|
||||
std::string a_rg_place = "<org:"; // 15
|
||||
std::string a_rg_orig = "<ori:"; // 16
|
||||
std::string a_rg_dlvd_to = "<dlv:"; // 17
|
||||
std::string a_rg_sent_to = "<sto:"; // 18
|
||||
std::string a_rg_snt_net = "<snt:"; // 19
|
||||
std::string a_rg_dt4 = "<dt4:"; // 20
|
||||
std::string a_rg_rcv_fm = "<rfm:"; // 21
|
||||
std::string a_rg_rcv_net = "<rnt:"; // 22
|
||||
std::string a_rg_dt5 = "<dt5:"; // 23
|
||||
std::string a_rg_svc = "<svc:"; // 24
|
||||
|
||||
FIELD argfields[] = {
|
||||
{ a_rg_nbr, "", (void **)&txt_rg_nbr, 't' }, // 0
|
||||
|
|
@ -147,32 +147,32 @@ FIELD argfields[] = {
|
|||
|
||||
// new tag strings
|
||||
|
||||
string _rg_nbr = ":nbr:"; // 0.
|
||||
string _rg_prec = ":prec:"; // 1.
|
||||
string _rg_hx = ":hx:"; // 2.
|
||||
string _rg_d1 = ":d1:"; // 3.
|
||||
string _rg_t1 = ":t1:"; // 4.
|
||||
string _rg_dt2 = ":dt2:"; // 5.
|
||||
string _rg_dt3 = ":dt3:"; // 6.
|
||||
string _rg_to = ":to:"; // 7.
|
||||
string _rg_phone = ":tel:"; // 8.
|
||||
string _rg_opnote = ":opn:"; // 9
|
||||
string _rg_msg = ":msg:"; // 10.
|
||||
string _rg_sig = ":sig:"; // 11.
|
||||
string _rg_opnote2 = ":op2:"; // 12
|
||||
string _rg_check = ":ck:"; // 13.
|
||||
string _rg_station = ":sta:"; // 14.
|
||||
string _rg_place = ":org:"; // 15
|
||||
string _rg_orig = ":ori:"; // 16
|
||||
string _rg_dlvd_to = ":dlv:"; // 17
|
||||
string _rg_sent_to = ":sto:"; // 18
|
||||
string _rg_snt_net = ":snt:"; // 19
|
||||
string _rg_dt4 = ":dt4:"; // 20
|
||||
string _rg_rcv_fm = ":rfm:"; // 21
|
||||
string _rg_rcv_net = ":rnt:"; // 22
|
||||
string _rg_dt5 = ":dt5:"; // 23
|
||||
string _rg_svc = ":svc:"; // 24
|
||||
string _rg_standard = ":std:"; // 25
|
||||
std::string _rg_nbr = ":nbr:"; // 0.
|
||||
std::string _rg_prec = ":prec:"; // 1.
|
||||
std::string _rg_hx = ":hx:"; // 2.
|
||||
std::string _rg_d1 = ":d1:"; // 3.
|
||||
std::string _rg_t1 = ":t1:"; // 4.
|
||||
std::string _rg_dt2 = ":dt2:"; // 5.
|
||||
std::string _rg_dt3 = ":dt3:"; // 6.
|
||||
std::string _rg_to = ":to:"; // 7.
|
||||
std::string _rg_phone = ":tel:"; // 8.
|
||||
std::string _rg_opnote = ":opn:"; // 9
|
||||
std::string _rg_msg = ":msg:"; // 10.
|
||||
std::string _rg_sig = ":sig:"; // 11.
|
||||
std::string _rg_opnote2 = ":op2:"; // 12
|
||||
std::string _rg_check = ":ck:"; // 13.
|
||||
std::string _rg_station = ":sta:"; // 14.
|
||||
std::string _rg_place = ":org:"; // 15
|
||||
std::string _rg_orig = ":ori:"; // 16
|
||||
std::string _rg_dlvd_to = ":dlv:"; // 17
|
||||
std::string _rg_sent_to = ":sto:"; // 18
|
||||
std::string _rg_snt_net = ":snt:"; // 19
|
||||
std::string _rg_dt4 = ":dt4:"; // 20
|
||||
std::string _rg_rcv_fm = ":rfm:"; // 21
|
||||
std::string _rg_rcv_net = ":rnt:"; // 22
|
||||
std::string _rg_dt5 = ":dt5:"; // 23
|
||||
std::string _rg_svc = ":svc:"; // 24
|
||||
std::string _rg_standard = ":std:"; // 25
|
||||
|
||||
FIELD rgfields[] = {
|
||||
{ _rg_nbr, "", (void **)&txt_rg_nbr, 't' }, // 0
|
||||
|
|
@ -292,7 +292,7 @@ void clear_rgfields()
|
|||
}
|
||||
}
|
||||
|
||||
string numeric(int n)
|
||||
std::string numeric(int n)
|
||||
{
|
||||
static char snum[12];
|
||||
snprintf(snum, sizeof(snum), "%d", n);
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string transfer_buffer = "";
|
||||
string def_transfer_filename = "";
|
||||
string base_transfer_filename = "";
|
||||
std::string transfer_buffer = "";
|
||||
std::string def_transfer_filename = "";
|
||||
std::string base_transfer_filename = "";
|
||||
|
||||
const char xfrstr[] = "<transfer>\n";
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ void cb_transfer_wrap_import(string fname, string txt)
|
|||
int num = 0;
|
||||
outfname.assign(XFR_dir).append(tst_name).append(tst_ext);
|
||||
|
||||
ifstream tstfile;
|
||||
std::ifstream tstfile;
|
||||
tstfile.open(outfname.c_str());
|
||||
while (tstfile) {
|
||||
tstfile.close();
|
||||
|
|
@ -160,7 +160,7 @@ LOG_INFO("Text length %d", (int)txt.length());
|
|||
LOG_INFO("File length %d", (int)txt.length());
|
||||
}
|
||||
|
||||
ofstream ofile(outfname.c_str(), ios::binary);
|
||||
std::ofstream ofile(outfname.c_str(), ios::binary);
|
||||
if (ofile) ofile << txt;
|
||||
ofile.close();
|
||||
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ void base128::init()
|
|||
// this function substitutes a two character sequence for the offending
|
||||
// characters
|
||||
//----------------------------------------------------------------------
|
||||
void base128::escape(string &in, bool encode)
|
||||
void base128::escape(std::string &in, bool encode)
|
||||
{
|
||||
string out;
|
||||
std::string out;
|
||||
if (encode) {
|
||||
for( size_t i = 0; i < in.length(); i++) {
|
||||
switch ((in[i] & 0xFF)) {
|
||||
|
|
@ -97,9 +97,9 @@ void base128::escape(string &in, bool encode)
|
|||
in = out;
|
||||
}
|
||||
|
||||
void base128::addlf(string &in)
|
||||
void base128::addlf(std::string &in)
|
||||
{
|
||||
string out;
|
||||
std::string out;
|
||||
int len = 0;
|
||||
for (size_t n = 0; n < in.length(); n++) {
|
||||
if (len < LINELEN) {out += in[n]; len++;}
|
||||
|
|
@ -108,16 +108,16 @@ void base128::addlf(string &in)
|
|||
in.assign(out);
|
||||
}
|
||||
|
||||
void base128::remlf(string &in)
|
||||
void base128::remlf(std::string &in)
|
||||
{
|
||||
string out;
|
||||
std::string out;
|
||||
for (size_t n = 0; n < in.length(); n++) {
|
||||
if (in[n] != '\n') out += in[n];
|
||||
}
|
||||
in.assign(out);
|
||||
}
|
||||
|
||||
string base128::encode(string &in)
|
||||
std::string base128::encode(std::string &in)
|
||||
{
|
||||
size_t n;
|
||||
byte igroup[7], ogroup[8];
|
||||
|
|
@ -130,7 +130,7 @@ string base128::encode(string &in)
|
|||
ateof = false;
|
||||
|
||||
iolen = in.length();
|
||||
string temp;
|
||||
std::string temp;
|
||||
while (!ateof) {
|
||||
igroup[0] = igroup[1] = igroup[2] =
|
||||
igroup[3] = igroup[4] = igroup[5] = igroup[6] = 0;
|
||||
|
|
@ -161,13 +161,13 @@ string base128::encode(string &in)
|
|||
return output;
|
||||
}
|
||||
|
||||
string base128::decode(string &in)
|
||||
std::string base128::decode(std::string &in)
|
||||
{
|
||||
int i;
|
||||
unsigned int nbr = 0;
|
||||
string temp = in;
|
||||
std::string temp = in;
|
||||
size_t p = temp.find("\n");
|
||||
if (p == string::npos)
|
||||
if (p == std::string::npos)
|
||||
return "ERROR: b128 missing character count";
|
||||
sscanf(temp.substr(0, p).c_str(), "%u", &nbr);
|
||||
temp.erase(0, p+1);
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ void base256::init()
|
|||
// this function substitutes a two character sequence for the offending
|
||||
// characters
|
||||
//----------------------------------------------------------------------
|
||||
void base256::escape(string &in, bool encode)
|
||||
void base256::escape(std::string &in, bool encode)
|
||||
{
|
||||
string out;
|
||||
std::string out;
|
||||
if (encode) {
|
||||
for( size_t i = 0; i < in.length(); i++) {
|
||||
switch ((in[i] & 0xFF)) {
|
||||
|
|
@ -94,9 +94,9 @@ void base256::escape(string &in, bool encode)
|
|||
in = out;
|
||||
}
|
||||
|
||||
void base256::addlf(string &in)
|
||||
void base256::addlf(std::string &in)
|
||||
{
|
||||
string out;
|
||||
std::string out;
|
||||
int len = 0;
|
||||
for (size_t n = 0; n < in.length(); n++) {
|
||||
if (len < LINELEN) {out += in[n]; len++;}
|
||||
|
|
@ -105,16 +105,16 @@ void base256::addlf(string &in)
|
|||
in.assign(out);
|
||||
}
|
||||
|
||||
void base256::remlf(string &in)
|
||||
void base256::remlf(std::string &in)
|
||||
{
|
||||
string out;
|
||||
std::string out;
|
||||
for (size_t n = 0; n < in.length(); n++) {
|
||||
if (in[n] != '\n') out += in[n];
|
||||
}
|
||||
in.assign(out);
|
||||
}
|
||||
|
||||
string base256::encode(string &in)
|
||||
std::string base256::encode(std::string &in)
|
||||
{
|
||||
char insize[20];
|
||||
long n = static_cast<long>(in.length());
|
||||
|
|
@ -124,19 +124,19 @@ string base256::encode(string &in)
|
|||
iocp = 0;
|
||||
ateof = false;
|
||||
|
||||
string temp (in);
|
||||
std::string temp (in);
|
||||
escape (temp);
|
||||
addlf(temp);
|
||||
output.append(temp);
|
||||
return output;
|
||||
}
|
||||
|
||||
string base256::decode(string &in)
|
||||
std::string base256::decode(std::string &in)
|
||||
{
|
||||
// size_t nbr = 0;
|
||||
string output = in;
|
||||
std::string output = in;
|
||||
size_t p = output.find("\n");
|
||||
if (p == string::npos)
|
||||
if (p == std::string::npos)
|
||||
return "ERROR: base256 missing character count";
|
||||
// sscanf(output.substr(0, p).c_str(), "%lu", &nbr);
|
||||
output.erase(0, p+1);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void base64::init()
|
|||
dtable[(int)'='] = 0;
|
||||
}
|
||||
|
||||
string base64::encode(string in)
|
||||
std::string base64::encode(std::string in)
|
||||
{
|
||||
int n;
|
||||
byte igroup[3], ogroup[4];
|
||||
|
|
@ -113,7 +113,7 @@ string base64::encode(string in)
|
|||
return output;
|
||||
}
|
||||
|
||||
string base64::decode(string in)
|
||||
std::string base64::decode(std::string in)
|
||||
{
|
||||
int i;
|
||||
output = "";
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static void save_cb(Fl_Widget* w, void*)
|
|||
if (!btext->size()) return;
|
||||
string filename = FLMSG_log_dir;
|
||||
filename.append("events.txt");
|
||||
ofstream out;
|
||||
std::ofstream out;
|
||||
out.open(filename.c_str(), ios::app);
|
||||
out << dbg_buffer;
|
||||
out.close();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ using namespace std;
|
|||
|
||||
//======================================================================
|
||||
|
||||
string strXML;
|
||||
std::string strXML;
|
||||
|
||||
//======================================================================
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ size_t next_tag(size_t p0, string xml)
|
|||
return p0;
|
||||
}
|
||||
|
||||
string get_element(size_t p0, string xml)
|
||||
std::string get_element(size_t p0, string xml)
|
||||
{
|
||||
size_t p1 = xml.find(">",p0),
|
||||
p2 = tag_end(p0, xml);
|
||||
|
|
@ -193,7 +193,7 @@ char get_byte(size_t p0, string xml)
|
|||
return (val & 0xFF);
|
||||
}
|
||||
|
||||
string get_bytes(size_t p0, string xml)
|
||||
std::string get_bytes(size_t p0, string xml)
|
||||
{
|
||||
unsigned int val;
|
||||
size_t space;
|
||||
|
|
@ -299,33 +299,33 @@ TAGS ICS_tags[] = {
|
|||
};
|
||||
|
||||
//recipient
|
||||
string ics_xml_to;
|
||||
string ics_xml_p1;
|
||||
std::string ics_xml_to;
|
||||
std::string ics_xml_p1;
|
||||
//sender
|
||||
string ics_xml_fm;
|
||||
string ics_xml_p2;
|
||||
std::string ics_xml_fm;
|
||||
std::string ics_xml_p2;
|
||||
//subject date time
|
||||
string ics_xml_subj;
|
||||
string ics_xml_d1;
|
||||
string ics_xml_t1;
|
||||
std::string ics_xml_subj;
|
||||
std::string ics_xml_d1;
|
||||
std::string ics_xml_t1;
|
||||
//message body
|
||||
string ics_xml_msg;
|
||||
std::string ics_xml_msg;
|
||||
//preparer
|
||||
string xml_s1;
|
||||
string xml_p3;
|
||||
std::string xml_s1;
|
||||
std::string xml_p3;
|
||||
//reply
|
||||
string xml_reply;
|
||||
string ics_xml_d2;
|
||||
string ics_xml_t2;
|
||||
string ics_xml_s2;
|
||||
string ics_xml_p4;
|
||||
std::string xml_reply;
|
||||
std::string ics_xml_d2;
|
||||
std::string ics_xml_t2;
|
||||
std::string ics_xml_s2;
|
||||
std::string ics_xml_p4;
|
||||
|
||||
enum PARSE_ICS_MODE {HICS_TO, HICS_FM, HICS_RECIP, HICS_SENDER, HICS_SUBJ, HICS_MSG, HICS_PREP, HICS_REPLY} ics_pmode;
|
||||
|
||||
|
||||
void parse_ics_name(size_t &p0, string xml)
|
||||
{
|
||||
string contents = get_element(p0, xml).c_str();
|
||||
std::string contents = get_element(p0, xml).c_str();
|
||||
switch (ics_pmode) {
|
||||
case HICS_TO:
|
||||
case HICS_RECIP: ics_xml_to = contents; break;
|
||||
|
|
@ -341,7 +341,7 @@ string contents = get_element(p0, xml).c_str();
|
|||
|
||||
void parse_ics_position(size_t &p0, string xml)
|
||||
{
|
||||
string contents = get_element(p0, xml).c_str();
|
||||
std::string contents = get_element(p0, xml).c_str();
|
||||
switch (ics_pmode) {
|
||||
case HICS_TO:
|
||||
case HICS_RECIP: ics_xml_p1 = contents; break;
|
||||
|
|
@ -362,7 +362,7 @@ void parse_ics_subject(size_t &p0, string xml)
|
|||
|
||||
void parse_ics_para(size_t &p0, string xml)
|
||||
{
|
||||
string contents = get_element(p0, xml).c_str();
|
||||
std::string contents = get_element(p0, xml).c_str();
|
||||
switch (ics_pmode) {
|
||||
case HICS_MSG:
|
||||
fm_xml(contents);
|
||||
|
|
@ -774,24 +774,24 @@ TAGS RG_tags[] = {
|
|||
{0, 0}
|
||||
};
|
||||
|
||||
string rg_xml_nbr;
|
||||
string rg_xml_prec;
|
||||
string rg_xml_exer;
|
||||
string rg_xml_hx;
|
||||
string rg_xml_d1;
|
||||
string rg_xml_t1;
|
||||
string rg_xml_dt2;
|
||||
string rg_xml_dt3;
|
||||
string rg_xml_to;
|
||||
string rg_xml_rx;
|
||||
string rg_xml_phone;
|
||||
string rg_xml_msg;
|
||||
string rg_xml_station;
|
||||
string rg_xml_place;
|
||||
string rg_xml_signed;
|
||||
string rg_xml_sent_to;
|
||||
string rg_xml_check;
|
||||
string rg_xml_arl;
|
||||
std::string rg_xml_nbr;
|
||||
std::string rg_xml_prec;
|
||||
std::string rg_xml_exer;
|
||||
std::string rg_xml_hx;
|
||||
std::string rg_xml_d1;
|
||||
std::string rg_xml_t1;
|
||||
std::string rg_xml_dt2;
|
||||
std::string rg_xml_dt3;
|
||||
std::string rg_xml_to;
|
||||
std::string rg_xml_rx;
|
||||
std::string rg_xml_phone;
|
||||
std::string rg_xml_msg;
|
||||
std::string rg_xml_station;
|
||||
std::string rg_xml_place;
|
||||
std::string rg_xml_signed;
|
||||
std::string rg_xml_sent_to;
|
||||
std::string rg_xml_check;
|
||||
std::string rg_xml_arl;
|
||||
|
||||
enum PARSE_RG_MODE {FILED, ORIGIN, ADDRESS, RECEIVEDAT, BODY, RECEIVEDFROM, SENTO} rg_pmode;
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ void Address::lookup(const char* proto_name)
|
|||
|
||||
int r;
|
||||
if ((r = getaddrinfo(node.empty() ? NULL : node.c_str(), service.c_str(), &hints, &info)) < 0) {
|
||||
string errstr = "getaddrinfo: ";
|
||||
std::string errstr = "getaddrinfo: ";
|
||||
errstr.append(node).append(" : ").append(service);
|
||||
throw SocketException(r, errstr.c_str());
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ errstr.append(node).append(" : ").append(service);
|
|||
|
||||
if ((hp = gethostbyname(node.c_str())) == NULL) {
|
||||
#ifdef __WIN32__
|
||||
string errstr = "gethostbyname: ";
|
||||
std::string errstr = "gethostbyname: ";
|
||||
errstr.append(node).append(" not found");
|
||||
throw SocketException(0, errstr.c_str());
|
||||
#else
|
||||
|
|
@ -415,7 +415,7 @@ const addr_info_t* Address::get(size_t n) const
|
|||
///
|
||||
/// Returns the string representation of an address
|
||||
///
|
||||
string Address::get_str(const addr_info_t* addr)
|
||||
std::string Address::get_str(const addr_info_t* addr)
|
||||
{
|
||||
if (!addr)
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ const char *dashes = "\n====================\n";
|
|||
//const char *binaryfile[] = {
|
||||
// ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".ico", ".zip", ".gz", ".tgz", ".bz2", 0 };
|
||||
|
||||
string test_version = "1.1.23A";
|
||||
std::string test_version = "1.1.23A";
|
||||
bool old_version = false;
|
||||
|
||||
bool b_autosend = false;
|
||||
|
|
@ -129,14 +129,14 @@ base64 b64(1); // insert lf for ease of viewing
|
|||
base128 b128;
|
||||
base256 b256;
|
||||
|
||||
string inptext = "";
|
||||
string wtext = "";
|
||||
string check = "";
|
||||
string wrap_outfilename = "";
|
||||
string wrap_inpfilename = "";
|
||||
string wrap_inpshortname = "";
|
||||
string wrap_outshortname = "";
|
||||
string wrap_foldername = "";
|
||||
std::string inptext = "";
|
||||
std::string wtext = "";
|
||||
std::string check = "";
|
||||
std::string wrap_outfilename = "";
|
||||
std::string wrap_inpfilename = "";
|
||||
std::string wrap_inpshortname = "";
|
||||
std::string wrap_outshortname = "";
|
||||
std::string wrap_foldername = "";
|
||||
|
||||
bool isExtension(const char *s1, const char *s2)
|
||||
{
|
||||
|
|
@ -422,7 +422,7 @@ bool wrapfile(bool with_ext)
|
|||
ostr.append(inptext).append(wrap_chksum).append(check).append("]");
|
||||
ostr.append(wrap_end);
|
||||
|
||||
ofstream wrapstream(wrap_outfilename.c_str(), ios::binary);
|
||||
std::ofstream wrapstream(wrap_outfilename.c_str(), ios::binary);
|
||||
if (wrapstream) {
|
||||
LOG_INFO("Writing wrapfile: %s", wrap_outfilename.c_str());
|
||||
wrapstream << ostr;
|
||||
|
|
@ -608,7 +608,7 @@ bool readfile()
|
|||
{
|
||||
old_version = false;
|
||||
char cin;
|
||||
ifstream textfile;
|
||||
std::ifstream textfile;
|
||||
textfile.open(wrap_inpfilename.c_str(), ios::binary);
|
||||
if (textfile) {
|
||||
inptext.erase();
|
||||
|
|
@ -659,7 +659,7 @@ void xfr_via_arq(string basename, string inptext)
|
|||
|
||||
string xfrs = ICS_dir;
|
||||
xfrs.append("auto_sent.csv");
|
||||
ofstream xfr_rec_file(xfrs.c_str(), ios::app);
|
||||
std::ofstream xfr_rec_file(xfrs.c_str(), ios::app);
|
||||
if (xfr_rec_file.fail()) {
|
||||
LOG_ERROR("Could not open %s", xfrs.c_str());
|
||||
return;
|
||||
|
|
@ -715,7 +715,7 @@ void xfr_via_socket(string basename, string inptext)
|
|||
|
||||
string xfrs = ICS_dir;
|
||||
xfrs.append("auto_sent.csv");
|
||||
ofstream xfr_rec_file(xfrs.c_str(), ios::app);
|
||||
std::ofstream xfr_rec_file(xfrs.c_str(), ios::app);
|
||||
if (xfr_rec_file.fail()) {
|
||||
LOG_ERROR("Could not open %s", xfrs.c_str());
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static const char* modem_set_by_name = "modem.set_by_name";
|
|||
|
||||
static XmlRpc::XmlRpcClient* client;
|
||||
|
||||
string xml_rxbuffer;
|
||||
std::string xml_rxbuffer;
|
||||
|
||||
#define XMLRPC_UPDATE_INTERVAL 500
|
||||
|
||||
|
|
@ -368,7 +368,7 @@ bool fldigi_OK_to_transmit()
|
|||
// main.get_trx_state returns one of
|
||||
// "TX", "RX"
|
||||
//
|
||||
string xml_fldigi_trx()
|
||||
std::string xml_fldigi_trx()
|
||||
{
|
||||
if (!fldigi_online || !client) return "RX";
|
||||
|
||||
|
|
@ -418,7 +418,7 @@ static void get_fldigi_modems()
|
|||
}
|
||||
}
|
||||
|
||||
string auto_msg;
|
||||
std::string auto_msg;
|
||||
|
||||
void process_autosend(void *)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ void FTextBase::saveFile(void)
|
|||
const char *fn = FSEL::saveas(_("Save text as"), "Text\t*.txt");
|
||||
if (fn) {
|
||||
#ifdef __WOE32__
|
||||
ofstream tfile(fn);
|
||||
std::ofstream tfile(fn);
|
||||
if (!tfile)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ namespace FSEL {
|
|||
void create(void) {};
|
||||
void destroy(void) {};
|
||||
|
||||
string filename, stitle, sfilter, sdef, sdirectory;
|
||||
std::string filename, stitle, sfilter, sdef, sdirectory;
|
||||
char dirbuf[FL_PATH_MAX + 1] = "";
|
||||
char msg[400];
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ void Font_Browser::fontFilter(filter_t filter)
|
|||
|
||||
int s = lst_Font->size();
|
||||
|
||||
static vector<bool> fixed;
|
||||
static std::vector<bool> fixed;
|
||||
if (fixed.empty()) {
|
||||
Progress_Window pw(1, s, _("Reading fonts..."));
|
||||
fixed.resize(s);
|
||||
|
|
|
|||
|
|
@ -73,30 +73,30 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string wxhc_rptsta;
|
||||
string wxhc_email;
|
||||
string wxhc_phone;
|
||||
string wxhc_addr;
|
||||
string wxhc_city;
|
||||
string wxhc_state;
|
||||
string wxhc_country;
|
||||
string wxhc_lat;
|
||||
string wxhc_long;
|
||||
string wxhc_date;
|
||||
string wxhc_time;
|
||||
std::string wxhc_rptsta;
|
||||
std::string wxhc_email;
|
||||
std::string wxhc_phone;
|
||||
std::string wxhc_addr;
|
||||
std::string wxhc_city;
|
||||
std::string wxhc_state;
|
||||
std::string wxhc_country;
|
||||
std::string wxhc_lat;
|
||||
std::string wxhc_long;
|
||||
std::string wxhc_date;
|
||||
std::string wxhc_time;
|
||||
|
||||
bool wxhc_meas;
|
||||
bool wxhc_est;
|
||||
string wxhc_wind_speed;
|
||||
string wxhc_wind_speed_units;
|
||||
string wxhc_wind_gusts;
|
||||
string wxhc_wind_gusts_units;
|
||||
string wxhc_wind_dir;
|
||||
string wxhc_wind_degrees;
|
||||
string wxhc_baro_press;
|
||||
string wxhc_baro_units;
|
||||
std::string wxhc_wind_speed;
|
||||
std::string wxhc_wind_speed_units;
|
||||
std::string wxhc_wind_gusts;
|
||||
std::string wxhc_wind_gusts_units;
|
||||
std::string wxhc_wind_dir;
|
||||
std::string wxhc_wind_degrees;
|
||||
std::string wxhc_baro_press;
|
||||
std::string wxhc_baro_units;
|
||||
|
||||
string wxhc_comments;
|
||||
std::string wxhc_comments;
|
||||
|
||||
const char *s_wsu_units[] = { "MPH", "KNOTS", "KPH", NULL };
|
||||
const char *s_wdu_units[] = { "N", "NE", "E", "SE", "S", "SW", "W", "NW", NULL };
|
||||
|
|
@ -141,10 +141,10 @@ NHC_QUAD wxhc_QUAD[] = {
|
|||
{ E, "", NULL, NULL }
|
||||
};
|
||||
|
||||
string buffwxhc;
|
||||
string def_wxhc_filename = "";
|
||||
string base_wxhc_filename = "";
|
||||
string def_wxhc_TemplateName = "";
|
||||
std::string buffwxhc;
|
||||
std::string def_wxhc_filename = "";
|
||||
std::string base_wxhc_filename = "";
|
||||
std::string def_wxhc_TemplateName = "";
|
||||
|
||||
bool using_wxhc_template = false;
|
||||
static bool fields_initialized = false;
|
||||
|
|
|
|||
|
|
@ -71,24 +71,24 @@
|
|||
#include <FL/Fl_Pixmap.H>
|
||||
#include <FL/Fl_Image.H>
|
||||
|
||||
string severe_wx_date;
|
||||
string severe_wx_time;
|
||||
string severe_wx_zone;
|
||||
std::string severe_wx_date;
|
||||
std::string severe_wx_time;
|
||||
std::string severe_wx_zone;
|
||||
bool severe_wx_exact;
|
||||
bool severe_wx_not_exact;
|
||||
|
||||
string severe_wx_city;
|
||||
string severe_wx_state;
|
||||
string severe_wx_county;
|
||||
std::string severe_wx_city;
|
||||
std::string severe_wx_state;
|
||||
std::string severe_wx_county;
|
||||
|
||||
bool severe_wx_tornado;
|
||||
bool severe_wx_funnel_cloud;
|
||||
bool severe_wx_wall_cloud;
|
||||
bool severe_wx_hail;
|
||||
string severe_wx_hail_size;
|
||||
std::string severe_wx_hail_size;
|
||||
|
||||
bool severe_wx_high_wind;
|
||||
string severe_wx_wind_speed;
|
||||
std::string severe_wx_wind_speed;
|
||||
bool severe_wx_measured;
|
||||
bool severe_wx_estimated;
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ bool severe_wx_dmg_no;
|
|||
bool severe_wx_inj_yes;
|
||||
bool severe_wx_inj_no;
|
||||
|
||||
string severe_wx_narrative;
|
||||
std::string severe_wx_narrative;
|
||||
|
||||
// could not use real names ... WIN32 barfs
|
||||
enum SWX_QTYPE { B, D, S, M, T, I, F, C, O, E };
|
||||
|
|
@ -109,7 +109,7 @@ enum SWX_QTYPE { B, D, S, M, T, I, F, C, O, E };
|
|||
|
||||
struct SWX_QUAD {
|
||||
SWX_QTYPE qtype; // type of field
|
||||
string html_fld;
|
||||
std::string html_fld;
|
||||
void *ptr;
|
||||
Fl_Widget *widget; };
|
||||
|
||||
|
|
@ -142,10 +142,10 @@ SWX_QUAD severe_wx_QUAD[] = {
|
|||
{ E, "", NULL, NULL }
|
||||
};
|
||||
|
||||
string buffsevere_wx;
|
||||
string def_severe_wx_filename = "";
|
||||
string base_severe_wx_filename = "";
|
||||
string def_severe_wx_TemplateName = "";
|
||||
std::string buffsevere_wx;
|
||||
std::string def_severe_wx_filename = "";
|
||||
std::string base_severe_wx_filename = "";
|
||||
std::string def_severe_wx_TemplateName = "";
|
||||
|
||||
bool using_severe_wx_template = false;
|
||||
static bool fields_initialized = false;
|
||||
|
|
@ -194,8 +194,8 @@ static void clearQUAD(SWX_QUAD *p)
|
|||
case B : (*(bool *)(p->ptr)) = false; break;
|
||||
case S :
|
||||
case D :
|
||||
case M : ((string *)(p->ptr))->clear(); break;
|
||||
case T : ((string *)(p->ptr))->clear(); break;
|
||||
case M : ((std::string *)(p->ptr))->clear(); break;
|
||||
case T : ((std::string *)(p->ptr))->clear(); break;
|
||||
case C : (*(char *)(p->ptr)) = ' '; break;
|
||||
case I : (*(int *)(p->ptr)) = 0; break;
|
||||
case F : (*(float *)(p->ptr)) = 0.0; break;
|
||||
|
|
@ -227,15 +227,15 @@ static bool checkQUAD(SWX_QUAD *p)
|
|||
break;
|
||||
case S:
|
||||
case M:
|
||||
if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value())
|
||||
if (*((std::string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value())
|
||||
return true;
|
||||
break;
|
||||
case D:
|
||||
if (*((string *)(p->ptr)) != ((Fl_DateInput *)p->widget)->value())
|
||||
if (*((std::string *)(p->ptr)) != ((Fl_DateInput *)p->widget)->value())
|
||||
return true;
|
||||
break;
|
||||
case T:
|
||||
if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text())
|
||||
if (*((std::string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text())
|
||||
return true;
|
||||
break;
|
||||
case C:
|
||||
|
|
@ -261,7 +261,7 @@ static bool checkQUAD(SWX_QUAD *p)
|
|||
break;
|
||||
case O:
|
||||
if (((Fl_ListBox *)p->widget)->index() == 0) break;
|
||||
if (*((string *)(p->ptr)) != ((Fl_ListBox *)p->widget)->value())
|
||||
if (*((std::string *)(p->ptr)) != ((Fl_ListBox *)p->widget)->value())
|
||||
return true;
|
||||
break;
|
||||
case E:
|
||||
|
|
@ -290,21 +290,21 @@ static void updateQUAD(SWX_QUAD *p)
|
|||
break;
|
||||
case S:
|
||||
case M:
|
||||
*((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value();
|
||||
*((std::string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value();
|
||||
break;
|
||||
case D:
|
||||
*((string *)(p->ptr)) = ((Fl_DateInput *)p->widget)->value();
|
||||
*((std::string *)(p->ptr)) = ((Fl_DateInput *)p->widget)->value();
|
||||
break;
|
||||
case O:
|
||||
{ string s = ((Fl_ListBox *)p->widget)->value();
|
||||
{ std::string s = ((Fl_ListBox *)p->widget)->value();
|
||||
if (s.find("--") == 0)
|
||||
((string *)(p->ptr))->clear();
|
||||
((std::string *)(p->ptr))->clear();
|
||||
else
|
||||
*((string *)(p->ptr)) = ((Fl_ListBox *)p->widget)->value();
|
||||
*((std::string *)(p->ptr)) = ((Fl_ListBox *)p->widget)->value();
|
||||
}
|
||||
break;
|
||||
case T:
|
||||
*((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text();
|
||||
*((std::string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text();
|
||||
break;
|
||||
case C:
|
||||
c = ' ';
|
||||
|
|
@ -344,17 +344,17 @@ void update_severe_wxfields()
|
|||
void set_severe_wx_counties(int n) {
|
||||
if (n > (numstates - 1)) return;
|
||||
|
||||
string st_letters = states[n].substr(0,3);
|
||||
std::string st_letters = states[n].substr(0,3);
|
||||
size_t p1 = counties.find(st_letters);
|
||||
size_t p2 = counties.rfind(st_letters);
|
||||
if (p1 == string::npos || p2 == string::npos) {
|
||||
if (p1 == std::string::npos || p2 == std::string::npos) {
|
||||
printf("not found\n");
|
||||
return;
|
||||
}
|
||||
string state_counties = counties.substr(p1 + 3, p2 - p1 - 3);
|
||||
std::string state_counties = counties.substr(p1 + 3, p2 - p1 - 3);
|
||||
size_t p4 = 0, p5 = 0;
|
||||
w_severe_wx_county->clear();
|
||||
while ((p5 = state_counties.find(',',p4)) != string::npos) {
|
||||
while ((p5 = state_counties.find(',',p4)) != std::string::npos) {
|
||||
w_severe_wx_county->add(state_counties.substr(p4, p5-p4).c_str());
|
||||
p4 = p5 + 1;
|
||||
}
|
||||
|
|
@ -390,17 +390,17 @@ static void updateFORM(SWX_QUAD *p)
|
|||
break;
|
||||
case S:
|
||||
case M:
|
||||
((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str());
|
||||
((Fl_Input2 *)p->widget)->value(((std::string *)(p->ptr))->c_str());
|
||||
break;
|
||||
case D:
|
||||
((Fl_DateInput *)p->widget)->value(((string *)(p->ptr))->c_str());
|
||||
((Fl_DateInput *)p->widget)->value(((std::string *)(p->ptr))->c_str());
|
||||
break;
|
||||
case O:
|
||||
((Fl_ListBox *)p->widget)->put_value(((string *)(p->ptr))->c_str());
|
||||
((Fl_ListBox *)p->widget)->put_value(((std::string *)(p->ptr))->c_str());
|
||||
break;
|
||||
case T:
|
||||
((FTextEdit *)p->widget)->clear();
|
||||
((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str());
|
||||
((FTextEdit *)p->widget)->add(((std::string *)(p->ptr))->c_str());
|
||||
break;
|
||||
case C:
|
||||
val[0] = *((char *)(p->ptr));
|
||||
|
|
@ -450,12 +450,12 @@ void clear_severe_wx_form()
|
|||
w_severe_wx_not_exact->value(1);
|
||||
}
|
||||
|
||||
static string mbuff;
|
||||
static std::string mbuff;
|
||||
|
||||
static void make_buffQUAD(SWX_QUAD *p)
|
||||
{
|
||||
string one = "1"; string zero = "0";
|
||||
string sval = " ";
|
||||
std::string one = "1"; std::string zero = "0";
|
||||
std::string sval = " ";
|
||||
char szval[20];
|
||||
SWX_QTYPE qt = E;
|
||||
while ((qt = p->qtype) != E) {
|
||||
|
|
@ -465,11 +465,11 @@ static void make_buffQUAD(SWX_QUAD *p)
|
|||
mbuff.append( lineout( p->html_fld, *((bool *)(p->ptr)) ? one : zero));
|
||||
break;
|
||||
case O: case S: case D: case M:
|
||||
if (((string *)(p->ptr))->length())
|
||||
mbuff.append( lineout( p->html_fld, *((string *)(p->ptr))));
|
||||
if (((std::string *)(p->ptr))->length())
|
||||
mbuff.append( lineout( p->html_fld, *((std::string *)(p->ptr))));
|
||||
break;
|
||||
case T:
|
||||
mbuff.append( lineout( p->html_fld, *((string *)(p->ptr))));
|
||||
mbuff.append( lineout( p->html_fld, *((std::string *)(p->ptr))));
|
||||
break;
|
||||
case C:
|
||||
if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') {
|
||||
|
|
@ -507,7 +507,7 @@ void make_buff_severe_wx(bool compress = false)
|
|||
buffsevere_wx.append(mbuff);
|
||||
}
|
||||
|
||||
static void readQUAD(string data, SWX_QUAD *p)
|
||||
static void readQUAD(std::string data, SWX_QUAD *p)
|
||||
{
|
||||
int i = 0;
|
||||
float f;
|
||||
|
|
@ -518,10 +518,10 @@ static void readQUAD(string data, SWX_QUAD *p)
|
|||
*((bool *)(p->ptr)) = (findstr( data, p->html_fld ) == "1");
|
||||
break;
|
||||
case D: case O: case S: case M:
|
||||
*((string *)(p->ptr)) = findstr( data, p->html_fld );
|
||||
*((std::string *)(p->ptr)) = findstr( data, p->html_fld );
|
||||
break;
|
||||
case T:
|
||||
*((string *)(p->ptr)) = findstr( data, p->html_fld );
|
||||
*((std::string *)(p->ptr)) = findstr( data, p->html_fld );
|
||||
break;
|
||||
case C:
|
||||
*((char *)(p->ptr)) = findstr( data, p->html_fld )[0];
|
||||
|
|
@ -544,7 +544,7 @@ static void readQUAD(string data, SWX_QUAD *p)
|
|||
}
|
||||
}
|
||||
|
||||
void read_severe_wx_buffer(string data)
|
||||
void read_severe_wx_buffer(std::string data)
|
||||
{
|
||||
clear_severe_wxfields();
|
||||
read_header(data);
|
||||
|
|
@ -553,7 +553,7 @@ void read_severe_wx_buffer(string data)
|
|||
update_severe_wxform();
|
||||
int idx = w_severe_wx_state->index();
|
||||
set_severe_wx_counties(idx);
|
||||
w_severe_wx_county->value( ((string *)(severe_wx_QUAD[4].ptr))->c_str() );
|
||||
w_severe_wx_county->value( ((std::string *)(severe_wx_QUAD[4].ptr))->c_str() );
|
||||
}
|
||||
|
||||
void cb_severe_wx_new()
|
||||
|
|
@ -582,7 +582,7 @@ void cb_severe_wx_export()
|
|||
fl_alert2("Not implemented");
|
||||
}
|
||||
|
||||
void cb_severe_wx_wrap_import(string wrapfilename, string inpbuffer)
|
||||
void cb_severe_wx_wrap_import(std::string wrapfilename, std::string inpbuffer)
|
||||
{
|
||||
clear_severe_wx_form();
|
||||
read_severe_wx_buffer(inpbuffer);
|
||||
|
|
@ -618,11 +618,11 @@ void cb_severe_wx_wrap_export()
|
|||
}
|
||||
update_severe_wxfields();
|
||||
|
||||
if (base_severe_wx_filename == string("new").append(FSWX_EXT) ||
|
||||
base_severe_wx_filename == string("default").append(FSWX_EXT) )
|
||||
if (base_severe_wx_filename == std::string("new").append(FSWX_EXT) ||
|
||||
base_severe_wx_filename == std::string("default").append(FSWX_EXT) )
|
||||
if (!cb_severe_wx_save_as()) return;
|
||||
|
||||
string wrapfilename = WRAP_send_dir;
|
||||
std::string wrapfilename = WRAP_send_dir;
|
||||
wrapfilename.append(base_severe_wx_filename);
|
||||
wrapfilename.append(".wrap");
|
||||
const char *p = FSEL::saveas(
|
||||
|
|
@ -630,7 +630,7 @@ void cb_severe_wx_wrap_export()
|
|||
"Wrap file\t*.{wrap,WRAP}",
|
||||
wrapfilename.c_str());
|
||||
if (p) {
|
||||
string pext = fl_filename_ext(p);
|
||||
std::string pext = fl_filename_ext(p);
|
||||
wrapfilename = p;
|
||||
|
||||
update_header(FROM);
|
||||
|
|
@ -653,8 +653,8 @@ void cb_severe_wx_wrap_autosend()
|
|||
}
|
||||
update_severe_wxfields();
|
||||
|
||||
if (base_severe_wx_filename == string("new").append(FSWX_EXT) ||
|
||||
base_severe_wx_filename == string("default").append(FSWX_EXT) )
|
||||
if (base_severe_wx_filename == std::string("new").append(FSWX_EXT) ||
|
||||
base_severe_wx_filename == std::string("default").append(FSWX_EXT) )
|
||||
if (!cb_severe_wx_save_as()) return;
|
||||
|
||||
update_header(FROM);
|
||||
|
|
@ -669,10 +669,10 @@ void cb_severe_wx_wrap_autosend()
|
|||
|
||||
void cb_severe_wx_load_template()
|
||||
{
|
||||
string def_severe_wx_filename = def_severe_wx_TemplateName;
|
||||
std::string def_severe_wx_filename = def_severe_wx_TemplateName;
|
||||
const char *p = FSEL::select(
|
||||
"Open template file",
|
||||
string("Template file\t*").append(TSWX_EXT).c_str(),
|
||||
std::string("Template file\t*").append(TSWX_EXT).c_str(),
|
||||
def_severe_wx_filename.c_str());
|
||||
if (p) {
|
||||
clear_severe_wx_form();
|
||||
|
|
@ -689,10 +689,10 @@ void cb_severe_wx_save_template()
|
|||
cb_severe_wx_save_as_template();
|
||||
return;
|
||||
}
|
||||
string def_severe_wx_filename = def_severe_wx_TemplateName;
|
||||
std::string def_severe_wx_filename = def_severe_wx_TemplateName;
|
||||
const char *p = FSEL::saveas(
|
||||
"Save template file",
|
||||
string("Template file\t*").append(TSWX_EXT).c_str(),
|
||||
std::string("Template file\t*").append(TSWX_EXT).c_str(),
|
||||
def_severe_wx_filename.c_str());
|
||||
if (p) {
|
||||
update_header(CHANGED);
|
||||
|
|
@ -705,10 +705,10 @@ void cb_severe_wx_save_template()
|
|||
|
||||
void cb_severe_wx_save_as_template()
|
||||
{
|
||||
string def_severe_wx_filename = def_severe_wx_TemplateName;
|
||||
std::string def_severe_wx_filename = def_severe_wx_TemplateName;
|
||||
const char *p = FSEL::saveas(
|
||||
"Save as template file",
|
||||
string("Template file\t*").append(TSWX_EXT).c_str(),
|
||||
std::string("Template file\t*").append(TSWX_EXT).c_str(),
|
||||
def_severe_wx_filename.c_str());
|
||||
if (p) {
|
||||
const char *pext = fl_filename_ext(p);
|
||||
|
|
@ -732,7 +732,7 @@ void cb_severe_wx_open()
|
|||
{
|
||||
const char *p = FSEL::select(
|
||||
_("Open data file"),
|
||||
string("ICS-severe_wx\t*").append(FSWX_EXT).c_str(),
|
||||
std::string("ICS-severe_wx\t*").append(FSWX_EXT).c_str(),
|
||||
def_severe_wx_filename.c_str());
|
||||
if (!p) return;
|
||||
if (strlen(p) == 0) return;
|
||||
|
|
@ -743,7 +743,7 @@ void cb_severe_wx_open()
|
|||
show_filename(def_severe_wx_filename);
|
||||
}
|
||||
|
||||
void write_severe_wx(string s)
|
||||
void write_severe_wx(std::string s)
|
||||
{
|
||||
FILE *filesevere_wx = fopen(s.c_str(), "w");
|
||||
if (!filesevere_wx) return;
|
||||
|
|
@ -756,9 +756,9 @@ void write_severe_wx(string s)
|
|||
bool cb_severe_wx_save_as()
|
||||
{
|
||||
const char *p;
|
||||
string newfilename;
|
||||
std::string newfilename;
|
||||
|
||||
string name = named_file();
|
||||
std::string name = named_file();
|
||||
if (!name.empty()) {
|
||||
name.append(FSWX_EXT);
|
||||
newfilename = ICS_msg_dir;
|
||||
|
|
@ -768,7 +768,7 @@ bool cb_severe_wx_save_as()
|
|||
|
||||
p = FSEL::saveas(
|
||||
_("Save data file"),
|
||||
string("ICS-severe_wx\t*").append(FSWX_EXT).c_str(),
|
||||
std::string("ICS-severe_wx\t*").append(FSWX_EXT).c_str(),
|
||||
newfilename.c_str());
|
||||
|
||||
if (!p) return false;
|
||||
|
|
@ -795,8 +795,8 @@ bool cb_severe_wx_save_as()
|
|||
|
||||
void cb_severe_wx_save()
|
||||
{
|
||||
if (base_severe_wx_filename == string("new").append(FSWX_EXT) ||
|
||||
base_severe_wx_filename == string("default").append(FSWX_EXT) ||
|
||||
if (base_severe_wx_filename == std::string("new").append(FSWX_EXT) ||
|
||||
base_severe_wx_filename == std::string("default").append(FSWX_EXT) ||
|
||||
using_severe_wx_template == true) {
|
||||
cb_severe_wx_save_as();
|
||||
return;
|
||||
|
|
@ -811,17 +811,17 @@ void cb_severe_wx_save()
|
|||
using_severe_wx_template = false;
|
||||
}
|
||||
|
||||
static void quad_to_html( string &target, SWX_QUAD *p)
|
||||
static void quad_to_html( std::string &target, SWX_QUAD *p)
|
||||
{
|
||||
string X = "x"; string SP = "_";
|
||||
string sval = " ";
|
||||
string del = "";
|
||||
std::string X = "x"; std::string SP = "_";
|
||||
std::string sval = " ";
|
||||
std::string del = "";
|
||||
char szval[20];
|
||||
while (p->qtype != E) {
|
||||
if (p->qtype == B)
|
||||
replacestr(target, p->html_fld, *((bool *)(p->ptr)) ? X : SP);
|
||||
else if (p->qtype == S || p->qtype == O || p->qtype == D) {
|
||||
string s = *((string *)(p->ptr));
|
||||
std::string s = *((std::string *)(p->ptr));
|
||||
if (p->html_fld == ":state:") {
|
||||
if (s.length() > 1) s.erase(2);
|
||||
replacestr(target, p->html_fld, s);
|
||||
|
|
@ -832,16 +832,16 @@ static void quad_to_html( string &target, SWX_QUAD *p)
|
|||
} else if (s.find("--") == 0) {
|
||||
replacestr(target, p->html_fld, del);
|
||||
} else {
|
||||
replacestr(target, p->html_fld, *((string *)(p->ptr)));
|
||||
replacestr(target, p->html_fld, *((std::string *)(p->ptr)));
|
||||
}
|
||||
} else if (p->qtype == M) {
|
||||
sval = *((string *)(p->ptr));
|
||||
size_t np = string::npos;
|
||||
while ( (np = sval.find("\n")) != string::npos)
|
||||
sval = *((std::string *)(p->ptr));
|
||||
size_t np = std::string::npos;
|
||||
while ( (np = sval.find("\n")) != std::string::npos)
|
||||
sval.replace(np, 1, "<br>");
|
||||
replacestr(target, p->html_fld, sval);
|
||||
} else if (p->qtype == T)
|
||||
replacestr(target, p->html_fld, *((string *)(p->ptr)));
|
||||
replacestr(target, p->html_fld, *((std::string *)(p->ptr)));
|
||||
else if (p->qtype == C) {
|
||||
sval = " ";
|
||||
sval[0] = *((char *)(p->ptr));
|
||||
|
|
@ -867,16 +867,16 @@ static void quad_to_html( string &target, SWX_QUAD *p)
|
|||
|
||||
void cb_severe_wx_html()
|
||||
{
|
||||
string name_name = fl_filename_name(def_severe_wx_filename.c_str());
|
||||
std::string name_name = fl_filename_name(def_severe_wx_filename.c_str());
|
||||
size_t p = name_name.rfind('.');
|
||||
if (p != string::npos) name_name.erase(p);
|
||||
if (p != std::string::npos) name_name.erase(p);
|
||||
|
||||
string severe_wx_rptsta = ICS_dir;
|
||||
std::string severe_wx_rptsta = ICS_dir;
|
||||
severe_wx_rptsta.append(name_name);
|
||||
severe_wx_rptsta.append(".html");
|
||||
|
||||
update_severe_wxfields();
|
||||
string formsevere_wx = severe_wx_html_template;
|
||||
std::string formsevere_wx = severe_wx_html_template;
|
||||
|
||||
replacestr(formsevere_wx, TITLE, name_name);
|
||||
|
||||
|
|
@ -889,11 +889,11 @@ void cb_severe_wx_html()
|
|||
open_url(severe_wx_rptsta.c_str());
|
||||
}
|
||||
|
||||
static void quad_to_text( string &target, SWX_QUAD *p)
|
||||
static void quad_to_text( std::string &target, SWX_QUAD *p)
|
||||
{
|
||||
string X = "X"; string SP = " ";
|
||||
string sval = " ";
|
||||
string del = "";
|
||||
std::string X = "X"; std::string SP = " ";
|
||||
std::string sval = " ";
|
||||
std::string del = "";
|
||||
char szval[20];
|
||||
while (p->qtype != E) {
|
||||
if (p->qtype == B) {
|
||||
|
|
@ -902,7 +902,7 @@ static void quad_to_text( string &target, SWX_QUAD *p)
|
|||
else replacestr(target, p->html_fld, SP);
|
||||
} else if (p->qtype == S || p->qtype == M ||
|
||||
p->qtype == O || p->qtype == D) {
|
||||
string s = *((string *)(p->ptr));
|
||||
std::string s = *((std::string *)(p->ptr));
|
||||
if (p->html_fld == ":state:") {
|
||||
if (s.length() > 1) s.erase(2);
|
||||
replacestr(target, p->html_fld, s);
|
||||
|
|
@ -913,13 +913,13 @@ static void quad_to_text( string &target, SWX_QUAD *p)
|
|||
} else if (s.find("--") == 0) {
|
||||
replacestr(target, p->html_fld, del);
|
||||
} else {
|
||||
if (((string *)(p->ptr))->length())
|
||||
replacestr(target, p->html_fld, *((string *)(p->ptr)));
|
||||
if (((std::string *)(p->ptr))->length())
|
||||
replacestr(target, p->html_fld, *((std::string *)(p->ptr)));
|
||||
else replacestr(target, p->html_fld, del);
|
||||
}
|
||||
} else if (p->qtype == T) {
|
||||
if (((string *)(p->ptr))->length())
|
||||
replacestr(target, p->html_fld, *((string *)(p->ptr)));
|
||||
if (((std::string *)(p->ptr))->length())
|
||||
replacestr(target, p->html_fld, *((std::string *)(p->ptr)));
|
||||
else replacestr(target, p->html_fld, del);
|
||||
} else if (p->qtype == C) {
|
||||
sval = " ";
|
||||
|
|
@ -948,11 +948,11 @@ static void quad_to_text( string &target, SWX_QUAD *p)
|
|||
|
||||
void cb_severe_wx_textout()
|
||||
{
|
||||
string severe_wx_rptsta = ICS_dir;
|
||||
std::string severe_wx_rptsta = ICS_dir;
|
||||
severe_wx_rptsta.append("severe_wx.txt");
|
||||
|
||||
update_severe_wxfields();
|
||||
string formsevere_wx = severe_wx_text_template;
|
||||
std::string formsevere_wx = severe_wx_text_template;
|
||||
|
||||
quad_to_text (formsevere_wx, severe_wx_QUAD);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,41 +73,41 @@
|
|||
|
||||
#include "wx_strings.h"
|
||||
|
||||
string buffstorm;
|
||||
string def_storm_filename = "";
|
||||
string base_storm_filename = "";
|
||||
string def_storm_TemplateName = "";
|
||||
std::string buffstorm;
|
||||
std::string def_storm_filename = "";
|
||||
std::string base_storm_filename = "";
|
||||
std::string def_storm_TemplateName = "";
|
||||
|
||||
string storm_date;
|
||||
string storm_time;
|
||||
string storm_zone;
|
||||
string storm_state;
|
||||
string storm_county;
|
||||
string storm_location;
|
||||
std::string storm_date;
|
||||
std::string storm_time;
|
||||
std::string storm_zone;
|
||||
std::string storm_state;
|
||||
std::string storm_county;
|
||||
std::string storm_location;
|
||||
bool storm_tornado;
|
||||
string storm_tornado_cat;
|
||||
std::string storm_tornado_cat;
|
||||
bool storm_hail;
|
||||
string storm_hail_size;
|
||||
std::string storm_hail_size;
|
||||
bool storm_wind;
|
||||
string storm_wind_cat;
|
||||
std::string storm_wind_cat;
|
||||
bool storm_flood;
|
||||
string storm_flood_cat;
|
||||
std::string storm_flood_cat;
|
||||
bool storm_damage;
|
||||
string storm_damage_cat;
|
||||
std::string storm_damage_cat;
|
||||
bool storm_snow;
|
||||
string storm_snow_tot;
|
||||
string storm_snow_dur;
|
||||
std::string storm_snow_tot;
|
||||
std::string storm_snow_dur;
|
||||
bool storm_f_rain;
|
||||
string storm_f_rain_tot;
|
||||
string storm_f_rain_dur;
|
||||
std::string storm_f_rain_tot;
|
||||
std::string storm_f_rain_dur;
|
||||
bool storm_h_rain;
|
||||
string storm_h_rain_tot;
|
||||
string storm_h_rain_dur;
|
||||
string storm_o_name;
|
||||
string storm_o_email;
|
||||
string storm_o_tele;
|
||||
string storm_o_profile;
|
||||
string storm_details;
|
||||
std::string storm_h_rain_tot;
|
||||
std::string storm_h_rain_dur;
|
||||
std::string storm_o_name;
|
||||
std::string storm_o_email;
|
||||
std::string storm_o_tele;
|
||||
std::string storm_o_profile;
|
||||
std::string storm_details;
|
||||
|
||||
// could not use real names ... WIN32 barfs
|
||||
enum STORM_QTYPE { B, D, S, M, T, I, F, C, O, E };
|
||||
|
|
@ -115,7 +115,7 @@ enum STORM_QTYPE { B, D, S, M, T, I, F, C, O, E };
|
|||
|
||||
struct STORM_QUAD {
|
||||
STORM_QTYPE qtype; // type of field
|
||||
string html_fld;
|
||||
std::string html_fld;
|
||||
void *ptr;
|
||||
Fl_Widget *widget; };
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ bool using_storm_template = false;
|
|||
//------------------------------------------------------------------------------
|
||||
static bool fields_initialized = false;
|
||||
|
||||
static void init_widget(string s, Fl_Widget * w)
|
||||
static void init_widget(std::string s, Fl_Widget * w)
|
||||
{
|
||||
for (int i = 0; i < num_quads; i++) {
|
||||
if (sQ[i].html_fld == s) {
|
||||
|
|
@ -218,12 +218,12 @@ static void clearQUAD()
|
|||
case B : (*(bool *)(sQ[i].ptr)) = false; break;
|
||||
case S :
|
||||
case D :
|
||||
case M : ((string *)(sQ[i].ptr))->clear(); break;
|
||||
case T : ((string *)(sQ[i].ptr))->clear(); break;
|
||||
case M : ((std::string *)(sQ[i].ptr))->clear(); break;
|
||||
case T : ((std::string *)(sQ[i].ptr))->clear(); break;
|
||||
case C : (*(char *)(sQ[i].ptr)) = ' '; break;
|
||||
case I : (*(int *)(sQ[i].ptr)) = 0; break;
|
||||
case F : (*(float *)(sQ[i].ptr)) = 0.0; break;
|
||||
case O : ((string *)(sQ[i].ptr))->clear(); break;
|
||||
case O : ((std::string *)(sQ[i].ptr))->clear(); break;
|
||||
case E : return;
|
||||
}
|
||||
}
|
||||
|
|
@ -248,17 +248,17 @@ static bool checkQUAD()
|
|||
break;
|
||||
case S:
|
||||
case M:
|
||||
if (*((string *)(sQ[i].ptr)) != ((Fl_Input2 *)sQ[i].widget)->value()){
|
||||
if (*((std::string *)(sQ[i].ptr)) != ((Fl_Input2 *)sQ[i].widget)->value()){
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case D:
|
||||
if (*((string *)(sQ[i].ptr)) != ((Fl_DateInput *)sQ[i].widget)->value()){
|
||||
if (*((std::string *)(sQ[i].ptr)) != ((Fl_DateInput *)sQ[i].widget)->value()){
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case T:
|
||||
if (*((string *)(sQ[i].ptr)) != ((FTextEdit *)sQ[i].widget)->buffer()->text()){
|
||||
if (*((std::string *)(sQ[i].ptr)) != ((FTextEdit *)sQ[i].widget)->buffer()->text()){
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -288,7 +288,7 @@ static bool checkQUAD()
|
|||
break;
|
||||
case O:
|
||||
if (((Fl_ListBox *)sQ[i].widget)->index() == 0) break;
|
||||
if (*((string *)(sQ[i].ptr)) != ((Fl_ListBox *)sQ[i].widget)->value()) {
|
||||
if (*((std::string *)(sQ[i].ptr)) != ((Fl_ListBox *)sQ[i].widget)->value()) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -315,21 +315,21 @@ static void updateQUAD()
|
|||
break;
|
||||
case S:
|
||||
case M:
|
||||
*((string *)(sQ[i].ptr)) = ((Fl_Input2 *)sQ[i].widget)->value();
|
||||
*((std::string *)(sQ[i].ptr)) = ((Fl_Input2 *)sQ[i].widget)->value();
|
||||
break;
|
||||
case D:
|
||||
*((string *)(sQ[i].ptr)) = ((Fl_DateInput *)sQ[i].widget)->value();
|
||||
*((std::string *)(sQ[i].ptr)) = ((Fl_DateInput *)sQ[i].widget)->value();
|
||||
break;
|
||||
case O:
|
||||
{ string s = ((Fl_ListBox *)sQ[i].widget)->value();
|
||||
{ std::string s = ((Fl_ListBox *)sQ[i].widget)->value();
|
||||
if (s.find("--") == 0)
|
||||
((string *)(sQ[i].ptr))->clear();
|
||||
((std::string *)(sQ[i].ptr))->clear();
|
||||
else
|
||||
*((string *)(sQ[i].ptr)) = ((Fl_ListBox *)sQ[i].widget)->value();
|
||||
*((std::string *)(sQ[i].ptr)) = ((Fl_ListBox *)sQ[i].widget)->value();
|
||||
}
|
||||
break;
|
||||
case T:
|
||||
*((string *)(sQ[i].ptr)) = ((FTextEdit *)sQ[i].widget)->buffer()->text();
|
||||
*((std::string *)(sQ[i].ptr)) = ((FTextEdit *)sQ[i].widget)->buffer()->text();
|
||||
break;
|
||||
case C:
|
||||
c = ' ';
|
||||
|
|
@ -416,20 +416,20 @@ static void updateFORM()
|
|||
break;
|
||||
case S:
|
||||
case M:
|
||||
((Fl_Input2 *)sQ[i].widget)->value(((string *)(sQ[i].ptr))->c_str());
|
||||
((Fl_Input2 *)sQ[i].widget)->value(((std::string *)(sQ[i].ptr))->c_str());
|
||||
break;
|
||||
case D:
|
||||
((Fl_DateInput *)sQ[i].widget)->value(((string *)(sQ[i].ptr))->c_str());
|
||||
((Fl_DateInput *)sQ[i].widget)->value(((std::string *)(sQ[i].ptr))->c_str());
|
||||
break;
|
||||
case O:
|
||||
if (((string *)(sQ[i].ptr))->empty())
|
||||
if (((std::string *)(sQ[i].ptr))->empty())
|
||||
((Fl_ListBox *)sQ[i].widget)->index(0);
|
||||
else
|
||||
((Fl_ListBox *)sQ[i].widget)->put_value(((string *)(sQ[i].ptr))->c_str());
|
||||
((Fl_ListBox *)sQ[i].widget)->put_value(((std::string *)(sQ[i].ptr))->c_str());
|
||||
break;
|
||||
case T:
|
||||
((FTextEdit *)sQ[i].widget)->clear();
|
||||
((FTextEdit *)sQ[i].widget)->add(((string *)(sQ[i].ptr))->c_str());
|
||||
((FTextEdit *)sQ[i].widget)->add(((std::string *)(sQ[i].ptr))->c_str());
|
||||
break;
|
||||
case C:
|
||||
val[0] = *((char *)(sQ[i].ptr));
|
||||
|
|
@ -472,12 +472,12 @@ void clear_storm_form()
|
|||
w_storm_zone->index(0);
|
||||
}
|
||||
|
||||
static string mbuff;
|
||||
static std::string mbuff;
|
||||
|
||||
static void make_buffQUAD()
|
||||
{
|
||||
string one = "1"; string zero = "0";
|
||||
string sval = " ";
|
||||
std::string one = "1"; std::string zero = "0";
|
||||
std::string sval = " ";
|
||||
char szval[20];
|
||||
for (int i = 0; i < num_quads; i++) {
|
||||
switch (sQ[i].qtype) {
|
||||
|
|
@ -486,11 +486,11 @@ static void make_buffQUAD()
|
|||
mbuff.append( lineout( sQ[i].html_fld, *((bool *)(sQ[i].ptr)) ? one : zero));
|
||||
break;
|
||||
case O: case S: case D: case M:
|
||||
if (((string *)(sQ[i].ptr))->length())
|
||||
mbuff.append( lineout( sQ[i].html_fld, *((string *)(sQ[i].ptr))));
|
||||
if (((std::string *)(sQ[i].ptr))->length())
|
||||
mbuff.append( lineout( sQ[i].html_fld, *((std::string *)(sQ[i].ptr))));
|
||||
break;
|
||||
case T:
|
||||
mbuff.append( lineout( sQ[i].html_fld, *((string *)(sQ[i].ptr))));
|
||||
mbuff.append( lineout( sQ[i].html_fld, *((std::string *)(sQ[i].ptr))));
|
||||
break;
|
||||
case C:
|
||||
if ((*(char *)(sQ[i].ptr)) != 0 && *((char *)(sQ[i].ptr)) != ' ') {
|
||||
|
|
@ -527,7 +527,7 @@ void make_buff_storm(bool compress = false)
|
|||
buffstorm.append(mbuff);
|
||||
}
|
||||
|
||||
static void readQUAD(string data)
|
||||
static void readQUAD(std::string data)
|
||||
{
|
||||
float f;
|
||||
for (int i = 0; i < num_quads; i++) {
|
||||
|
|
@ -536,10 +536,10 @@ static void readQUAD(string data)
|
|||
*((bool *)(sQ[i].ptr)) = (findstr( data, sQ[i].html_fld ) == "1");
|
||||
break;
|
||||
case D: case O: case S: case M:
|
||||
*((string *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld );
|
||||
*((std::string *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld );
|
||||
break;
|
||||
case T:
|
||||
*((string *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld );
|
||||
*((std::string *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld );
|
||||
break;
|
||||
case C:
|
||||
*((char *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld )[0];
|
||||
|
|
@ -560,7 +560,7 @@ static void readQUAD(string data)
|
|||
}
|
||||
}
|
||||
|
||||
void read_storm_buffer(string data)
|
||||
void read_storm_buffer(std::string data)
|
||||
{
|
||||
clear_stormfields();
|
||||
read_header(data);
|
||||
|
|
@ -569,7 +569,7 @@ void read_storm_buffer(string data)
|
|||
update_stormform();
|
||||
int idx = w_storm_state->index();
|
||||
set_storm_counties(idx);
|
||||
w_storm_county->value( ((string *)(sQ[4].ptr))->c_str() );
|
||||
w_storm_county->value( ((std::string *)(sQ[4].ptr))->c_str() );
|
||||
}
|
||||
|
||||
void cb_storm_new()
|
||||
|
|
@ -598,7 +598,7 @@ void cb_storm_export()
|
|||
fl_alert2("Not implemented");
|
||||
}
|
||||
|
||||
void cb_storm_wrap_import(string wrapfilename, string inpbuffer)
|
||||
void cb_storm_wrap_import(std::string wrapfilename, std::string inpbuffer)
|
||||
{
|
||||
clear_storm_form();
|
||||
read_storm_buffer(inpbuffer);
|
||||
|
|
@ -634,11 +634,11 @@ void cb_storm_wrap_export()
|
|||
}
|
||||
update_stormfields();
|
||||
|
||||
if (base_storm_filename == string("new").append(FSTRM_EXT) ||
|
||||
base_storm_filename == string("default").append(FSTRM_EXT) )
|
||||
if (base_storm_filename == std::string("new").append(FSTRM_EXT) ||
|
||||
base_storm_filename == std::string("default").append(FSTRM_EXT) )
|
||||
if (!cb_storm_save_as()) return;
|
||||
|
||||
string wrapfilename = WRAP_send_dir;
|
||||
std::string wrapfilename = WRAP_send_dir;
|
||||
wrapfilename.append(base_storm_filename);
|
||||
wrapfilename.append(".wrap");
|
||||
const char *p = FSEL::saveas(
|
||||
|
|
@ -646,7 +646,7 @@ void cb_storm_wrap_export()
|
|||
"Wrap file\t*.{wrap,WRAP}",
|
||||
wrapfilename.c_str());
|
||||
if (p) {
|
||||
string pext = fl_filename_ext(p);
|
||||
std::string pext = fl_filename_ext(p);
|
||||
wrapfilename = p;
|
||||
|
||||
update_header(FROM);
|
||||
|
|
@ -669,8 +669,8 @@ void cb_storm_wrap_autosend()
|
|||
}
|
||||
update_stormfields();
|
||||
|
||||
if (base_storm_filename == string("new").append(FSTRM_EXT) ||
|
||||
base_storm_filename == string("default").append(FSTRM_EXT) )
|
||||
if (base_storm_filename == std::string("new").append(FSTRM_EXT) ||
|
||||
base_storm_filename == std::string("default").append(FSTRM_EXT) )
|
||||
if (!cb_storm_save_as()) return;
|
||||
|
||||
update_header(FROM);
|
||||
|
|
@ -685,10 +685,10 @@ void cb_storm_wrap_autosend()
|
|||
|
||||
void cb_storm_load_template()
|
||||
{
|
||||
string def_storm_filename = def_storm_TemplateName;
|
||||
std::string def_storm_filename = def_storm_TemplateName;
|
||||
const char *p = FSEL::select(
|
||||
"Open template file",
|
||||
string("Template file\t*").append(TSTRM_EXT).c_str(),
|
||||
std::string("Template file\t*").append(TSTRM_EXT).c_str(),
|
||||
def_storm_filename.c_str());
|
||||
if (p) {
|
||||
clear_storm_form();
|
||||
|
|
@ -705,10 +705,10 @@ void cb_storm_save_template()
|
|||
cb_storm_save_as_template();
|
||||
return;
|
||||
}
|
||||
string def_storm_filename = def_storm_TemplateName;
|
||||
std::string def_storm_filename = def_storm_TemplateName;
|
||||
const char *p = FSEL::saveas(
|
||||
"Save template file",
|
||||
string("Template file\t*").append(TSTRM_EXT).c_str(),
|
||||
std::string("Template file\t*").append(TSTRM_EXT).c_str(),
|
||||
def_storm_filename.c_str());
|
||||
if (p) {
|
||||
update_header(CHANGED);
|
||||
|
|
@ -721,10 +721,10 @@ void cb_storm_save_template()
|
|||
|
||||
void cb_storm_save_as_template()
|
||||
{
|
||||
string def_storm_filename = def_storm_TemplateName;
|
||||
std::string def_storm_filename = def_storm_TemplateName;
|
||||
const char *p = FSEL::saveas(
|
||||
"Save as template file",
|
||||
string("Template file\t*").append(TSTRM_EXT).c_str(),
|
||||
std::string("Template file\t*").append(TSTRM_EXT).c_str(),
|
||||
def_storm_filename.c_str());
|
||||
if (p) {
|
||||
const char *pext = fl_filename_ext(p);
|
||||
|
|
@ -748,7 +748,7 @@ void cb_storm_open()
|
|||
{
|
||||
const char *p = FSEL::select(
|
||||
_("Open data file"),
|
||||
string("ICS-storm\t*").append(FSTRM_EXT).c_str(),
|
||||
std::string("ICS-storm\t*").append(FSTRM_EXT).c_str(),
|
||||
def_storm_filename.c_str());
|
||||
if (!p) return;
|
||||
if (strlen(p) == 0) return;
|
||||
|
|
@ -759,7 +759,7 @@ void cb_storm_open()
|
|||
show_filename(def_storm_filename);
|
||||
}
|
||||
|
||||
void write_storm(string s)
|
||||
void write_storm(std::string s)
|
||||
{
|
||||
FILE *filestorm = fopen(s.c_str(), "w");
|
||||
if (!filestorm) return;
|
||||
|
|
@ -772,9 +772,9 @@ void write_storm(string s)
|
|||
bool cb_storm_save_as()
|
||||
{
|
||||
const char *p;
|
||||
string newfilename;
|
||||
std::string newfilename;
|
||||
|
||||
string name = named_file();
|
||||
std::string name = named_file();
|
||||
if (!name.empty()) {
|
||||
name.append(FSTRM_EXT);
|
||||
newfilename = ICS_msg_dir;
|
||||
|
|
@ -784,7 +784,7 @@ bool cb_storm_save_as()
|
|||
|
||||
p = FSEL::saveas(
|
||||
_("Save data file"),
|
||||
string("ICS-storm\t*").append(FSTRM_EXT).c_str(),
|
||||
std::string("ICS-storm\t*").append(FSTRM_EXT).c_str(),
|
||||
newfilename.c_str());
|
||||
|
||||
if (!p) return false;
|
||||
|
|
@ -811,8 +811,8 @@ bool cb_storm_save_as()
|
|||
|
||||
void cb_storm_save()
|
||||
{
|
||||
if (base_storm_filename == string("new").append(FSTRM_EXT) ||
|
||||
base_storm_filename == string("default").append(FSTRM_EXT) ||
|
||||
if (base_storm_filename == std::string("new").append(FSTRM_EXT) ||
|
||||
base_storm_filename == std::string("default").append(FSTRM_EXT) ||
|
||||
using_storm_template == true) {
|
||||
cb_storm_save_as();
|
||||
return;
|
||||
|
|
@ -827,18 +827,18 @@ void cb_storm_save()
|
|||
using_storm_template = false;
|
||||
}
|
||||
|
||||
static string X = "x"; string SP = "_";
|
||||
static string sval = " ";
|
||||
static string del = "";
|
||||
static std::string X = "x"; std::string SP = "_";
|
||||
static std::string sval = " ";
|
||||
static std::string del = "";
|
||||
|
||||
static void quad_to_html(string &target)
|
||||
static void quad_to_html(std::string &target)
|
||||
{
|
||||
char szval[20];
|
||||
for (int i = 0; i < num_quads; i++) {
|
||||
if (sQ[i].qtype == B)
|
||||
replacestr(target, sQ[i].html_fld, *((bool *)(sQ[i].ptr)) ? X : SP);
|
||||
else if (sQ[i].qtype == O ) {
|
||||
string s = *((string *)(sQ[i].ptr));
|
||||
std::string s = *((std::string *)(sQ[i].ptr));
|
||||
if (sQ[i].html_fld == ":state:") {
|
||||
if (s.length() > 1) s.erase(2);
|
||||
replacestr(target, sQ[i].html_fld, s);
|
||||
|
|
@ -854,17 +854,17 @@ static void quad_to_html(string &target)
|
|||
else replacestr(target, sQ[i].html_fld, del);
|
||||
}
|
||||
} else if (sQ[i].qtype == S || sQ[i].qtype == M || sQ[i].qtype == D) {
|
||||
if (((string *)(sQ[i].ptr))->length())
|
||||
replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr)));
|
||||
if (((std::string *)(sQ[i].ptr))->length())
|
||||
replacestr(target, sQ[i].html_fld, *((std::string *)(sQ[i].ptr)));
|
||||
else replacestr(target, sQ[i].html_fld, del);
|
||||
} else if (sQ[i].qtype == M) {
|
||||
sval = *((string *)(sQ[i].ptr));
|
||||
size_t np = string::npos;
|
||||
while ( (np = sval.find("\n")) != string::npos)
|
||||
sval = *((std::string *)(sQ[i].ptr));
|
||||
size_t np = std::string::npos;
|
||||
while ( (np = sval.find("\n")) != std::string::npos)
|
||||
sval.replace(np, 1, "<br>");
|
||||
replacestr(target, sQ[i].html_fld, sval);
|
||||
} else if (sQ[i].qtype == T)
|
||||
replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr)));
|
||||
replacestr(target, sQ[i].html_fld, *((std::string *)(sQ[i].ptr)));
|
||||
else if (sQ[i].qtype == C) {
|
||||
sval = " ";
|
||||
sval[0] = *((char *)(sQ[i].ptr));
|
||||
|
|
@ -889,16 +889,16 @@ static void quad_to_html(string &target)
|
|||
|
||||
void cb_storm_html()
|
||||
{
|
||||
string name_name = fl_filename_name(def_storm_filename.c_str());
|
||||
std::string name_name = fl_filename_name(def_storm_filename.c_str());
|
||||
size_t p = name_name.rfind('.');
|
||||
if (p != string::npos) name_name.erase(p);
|
||||
if (p != std::string::npos) name_name.erase(p);
|
||||
|
||||
string storm_rptsta = ICS_dir;
|
||||
std::string storm_rptsta = ICS_dir;
|
||||
storm_rptsta.append(name_name);
|
||||
storm_rptsta.append(".html");
|
||||
|
||||
update_stormfields();
|
||||
string formstorm = storm_html_template;
|
||||
std::string formstorm = storm_html_template;
|
||||
|
||||
replacestr(formstorm, TITLE, name_name);
|
||||
|
||||
|
|
@ -911,14 +911,14 @@ void cb_storm_html()
|
|||
open_url(storm_rptsta.c_str());
|
||||
}
|
||||
|
||||
static void quad_to_text( string &target)
|
||||
static void quad_to_text( std::string &target)
|
||||
{
|
||||
char szval[20];
|
||||
for (int i = 0; i < num_quads; i++) {
|
||||
if (sQ[i].qtype == B)
|
||||
replacestr(target, sQ[i].html_fld, *((bool *)(sQ[i].ptr)) ? X : del);
|
||||
else if (sQ[i].qtype == O ) {
|
||||
string s = *((string *)(sQ[i].ptr));
|
||||
std::string s = *((std::string *)(sQ[i].ptr));
|
||||
if (sQ[i].html_fld == ":state:") {
|
||||
if (s.length() > 1) s.erase(2);
|
||||
replacestr(target, sQ[i].html_fld, s);
|
||||
|
|
@ -934,12 +934,12 @@ static void quad_to_text( string &target)
|
|||
else replacestr(target, sQ[i].html_fld, del);
|
||||
}
|
||||
} else if (sQ[i].qtype == S || sQ[i].qtype == M || sQ[i].qtype == D) {
|
||||
if (((string *)(sQ[i].ptr))->length())
|
||||
replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr)));
|
||||
if (((std::string *)(sQ[i].ptr))->length())
|
||||
replacestr(target, sQ[i].html_fld, *((std::string *)(sQ[i].ptr)));
|
||||
else replacestr(target, sQ[i].html_fld, del);
|
||||
} else if (sQ[i].qtype == T) {
|
||||
if (((string *)(sQ[i].ptr))->length())
|
||||
replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr)));
|
||||
if (((std::string *)(sQ[i].ptr))->length())
|
||||
replacestr(target, sQ[i].html_fld, *((std::string *)(sQ[i].ptr)));
|
||||
else replacestr(target, sQ[i].html_fld, del);
|
||||
} else if (sQ[i].qtype == C) {
|
||||
sval = " ";
|
||||
|
|
@ -967,11 +967,11 @@ static void quad_to_text( string &target)
|
|||
|
||||
void cb_storm_textout()
|
||||
{
|
||||
string storm_rptsta = ICS_dir;
|
||||
std::string storm_rptsta = ICS_dir;
|
||||
storm_rptsta.append("storm.txt");
|
||||
|
||||
update_stormfields();
|
||||
string formstorm = storm_text_template;
|
||||
std::string formstorm = storm_text_template;
|
||||
|
||||
quad_to_text (formstorm);
|
||||
|
||||
|
|
|
|||
|
|
@ -88,17 +88,17 @@ FTextEdit *w_storm_details = (FTextEdit *)0;
|
|||
|
||||
void set_storm_counties(int ndx)
|
||||
{
|
||||
string st = states[ndx];
|
||||
std::string st = states[ndx];
|
||||
size_t p = st.find(',');
|
||||
if (p != string::npos) {
|
||||
if (p != std::string::npos) {
|
||||
st.erase(p+1);
|
||||
size_t p1 = counties.find(st);
|
||||
size_t p2 = counties.rfind(st);
|
||||
string cnty = counties.substr(p1+3, p2 - p1 - 3);
|
||||
std::string cnty = counties.substr(p1+3, p2 - p1 - 3);
|
||||
size_t pc = cnty.find(',');
|
||||
p1 = 0;
|
||||
w_storm_county->clear();
|
||||
while (pc != string::npos) {
|
||||
while (pc != std::string::npos) {
|
||||
w_storm_county->add(cnty.substr(p1, pc - p1).c_str());
|
||||
p1 = pc + 1;
|
||||
pc = cnty.find(',', pc + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue