Newer
Older
}
for(u=i;u<cfg.arcdefs;u++)
memcpy(&cfg.arcdef[u],&cfg.arcdef[u+1]
}
if (msk == MSK_COPY) {
memcpy(&savarcdef,&cfg.arcdef[i],sizeof(arcdef_t));
}
if (msk == MSK_PASTE) {
if(!new_arcdef(i))
continue;
memcpy(&cfg.arcdef[i],&savarcdef,sizeof(arcdef_t));
}
if (msk != 0)
continue;
uifc.helpbuf=
"Archive Type and Program configuration";
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %u","Signature Offset"
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Pack Command Line"
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Unpack Command Line"
,cfg.arcdef[i].unpack);
opt[j][0]=0;
k=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,0,0,0,&packop,0,str,opt);
if(k==-1)
break;
switch(k) {
case 0:
"~ Archive Type ~\n\n"
"This is the identifying name of the archive file type. Usually this name\n"
"corresponds with the common file extension or suffix denoting this type\n"
uifc.input(WIN_MID|WIN_SAV,0,0
,"Archive Type"
,cfg.arcdef[i].name,sizeof(cfg.arcdef[i].name)-1
,K_EDIT|K_UPPER);
break;
case 1:
"~ Archive Signature ~\n\n"
"This is the identifying signature of the archive file format (in\n"
"hexadecimal notation). This signature is used in combination with the\n"
"Archive `Signature Offset` for the automatic detection of proper archive\n"
"program to extract (unarchive) inbound EchoMail bundle files."
;
uifc.input(WIN_MID|WIN_SAV,0,0
,"Archive Signature"
,cfg.arcdef[i].hexid,sizeof(cfg.arcdef[i].hexid)-1
,K_EDIT|K_UPPER);
break;
case 2:
"~ Archive Signature Offset ~\n\n"
"This is the byte-offset of the identifying signature of the archive file\n"
"format. This offset is used in combination with the Archive `Signature`\n"
"for the automatic detection of proper archive program to extract\n"
sprintf(str,"%u",cfg.arcdef[i].byteloc);
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"Archive Signature Offset",str,5
,K_NUMBER|K_EDIT) > 0)
cfg.arcdef[i].byteloc=atoi(str);
"~ Pack Command Line ~\n\n"
"This is the command-line to execute to create an archive file of the\n"
"selected type. The following command-line specifiers may be used for\n"
"dynamic variable replacement:\n"
"\n"
" `%f` The path/filename of the archive file to be created\n"
" `%s` The path/filename of the file(s) to be added to the archive\n"
" `%!` The Synchronet `exec` directory\n"
" `%@` The Synchronet `exec` directory only for non-Unix systems\n"
" `%.` Blank for Unix systems, '`.exe`' otherwise\n"
" `%?` The current platform description (e.g. 'linux', 'win32')\n"
" `%j` The Synchronet `data` directory\n"
" `%k` The Synchronet `ctrl` directory\n"
" `%o` The configured system operator name\n"
" `%q` The configured system QWK-ID\n"
" `%g` The configured temporary file directory\n"
uifc.input(WIN_MID|WIN_SAV,0,0
,"Pack Command Line"
,cfg.arcdef[i].pack,sizeof(cfg.arcdef[i].pack)-1
,K_EDIT);
break;
case 4:
"~ Unpack Command Line ~\n\n"
"This is the command-line to execute to extract an archive file of the\n"
"selected type. The following command-line specifiers may be used for\n"
"dynamic variable replacement:\n"
"\n"
" `%f` The path/filename of the archive file to be extracted\n"
" `%s` The destination directory for files extracted from the archive\n"
" `%!` The Synchronet `exec` directory\n"
" `%@` The Synchronet `exec` directory only for non-Unix systems\n"
" `%.` Blank for Unix systems, '`.exe`' otherwise\n"
" `%?` The current platform description (e.g. 'linux', 'win32')\n"
" `%j` The Synchronet `data` directory\n"
" `%k` The Synchronet `ctrl` directory\n"
" `%o` The configured system operator name\n"
" `%q` The configured system QWK-ID\n"
" `%g` The configured temporary file directory\n"
uifc.input(WIN_MID|WIN_SAV,0,0
,"Unpack Command Line"
,cfg.arcdef[i].unpack,sizeof(cfg.arcdef[i].unpack)-1
}
uifc.helpbuf=
"~ Domains ~\n\n"
"The `Domains` sub-menu is where FidoNet-style domains (the '@domain'\n"
"of 5D FTN address) are mapped to zone numbers, DNS suffixes, NodeLists\n"
"and BSO root directories for use by the BinkIT mailer.\n"
;
i=0;
while(1) {
for(u=0; u < cfg.domain_count; u++)
snprintf(opt[u], MAX_OPLN-1, "%-*s %s"
,FIDO_DOMAIN_LEN, cfg.domain_list[u].name, cfg.domain_list[u].dns_suffix);
opt[u][0]=0;
int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
| WIN_INSACT | WIN_DELACT | WIN_XTR;
if(cfg.domain_count)
mode |= WIN_COPY | WIN_CUT;
if(savedomain.name[0])
mode |= WIN_PASTE | WIN_PASTEXTR;
i=uifc.list(mode,0,0,0,&domain_opt,0,"Domains",opt);
if(i==-1)
break;
int msk = i&MSK_ON;
i &= MSK_OFF;
if (msk == MSK_INS) {
str[0]=0;
if(uifc.input(WIN_MID|WIN_SAV,0,0
,"FTN Domain Name", str, FIDO_DOMAIN_LEN, K_EDIT)<1)
continue;
if(!new_domain(i)) {
printf("\nMemory Allocation Error\n");
}
SAFECOPY(cfg.domain_list[i].name, str);
}
if (msk == MSK_DEL || msk == MSK_CUT) {
if(msk == MSK_CUT)
memcpy(&savedomain, &cfg.domain_list[i], sizeof(savedomain));
cfg.domain_count--;
if(cfg.domain_count <= 0) {
cfg.domain_count = 0;
}
for(u=i; u < cfg.domain_count; u++)
memcpy(&cfg.domain_list[u], &cfg.domain_list[u+1], sizeof(struct fido_domain));
}
if (msk == MSK_COPY) {
memcpy(&savedomain, &cfg.domain_list[i], sizeof(savedomain));
}
if (msk == MSK_PASTE) {
if(!new_domain(i))
continue;
memcpy(&cfg.domain_list[i], &savedomain, sizeof(savedomain));
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
}
if (msk != 0)
continue;
while(1) {
j=0;
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Name"
,cfg.domain_list[i].name);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Zones"
,int_list(cfg.domain_list[i].zone_list, cfg.domain_list[i].zone_count));
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","DNS Suffix"
,cfg.domain_list[i].dns_suffix);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Outbound Root"
,cfg.domain_list[i].root);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","NodeList"
,cfg.domain_list[i].nodelist);
opt[j][0]=0;
SAFEPRINTF(str, "Domain - %s", cfg.domain_list[i].name);
k=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,0,0,0,&listop,0,str,opt);
if(k==-1)
break;
switch(k) {
case 0:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Domain Name"
,cfg.domain_list[i].name,sizeof(cfg.domain_list[i].name)-1
,K_EDIT);
break;
case 1:
SAFECOPY(str, int_list(cfg.domain_list[i].zone_list, cfg.domain_list[i].zone_count));
if(uifc.input(WIN_MID|WIN_SAV, 0, 0
,"Zone List (comma-separated)"
,str, 40, K_EDIT) >= 0) {
FREE_AND_NULL(cfg.domain_list[i].zone_list);
cfg.domain_list[i].zone_list = parseIntList(str, ",", &cfg.domain_list[i].zone_count);
uifc.changes = TRUE;
}
break;
case 2:
uifc.input(WIN_MID|WIN_SAV,0,0
,"DNS Suffix"
,cfg.domain_list[i].dns_suffix,sizeof(cfg.domain_list[i].dns_suffix)-1
,K_EDIT);
break;
case 3:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Outbound Root Directory"
,cfg.domain_list[i].root,sizeof(cfg.domain_list[i].root)-1
,K_EDIT);
break;
case 4:
uifc.input(WIN_MID|WIN_SAV,0,0
,"NodeList"
,cfg.domain_list[i].nodelist,sizeof(cfg.domain_list[i].nodelist)-1
,K_EDIT);
break;
}
break;
case 7:
uifc.helpbuf=
"~ EchoLists ~\n\n"
"This feature allows you to specify lists of echoes, in `BACKBONE.NA`\n"
"format, which are utilized in `addition` to your Area File (e.g. \n"
"`areas.bbs`) for advanced AreaFix (Area Management) operations.\n";
while(1) {
for(u=0;u<cfg.listcfgs;u++)
int mode = WIN_SAV | WIN_INS | WIN_DEL | WIN_ACT
| WIN_INSACT | WIN_DELACT | WIN_XTR;
if(cfg.listcfgs)
mode |= WIN_COPY | WIN_CUT;
if(savlistcfg.listpath[0])
mode |= WIN_PASTE | WIN_PASTEXTR;
break;
int msk = i&MSK_ON;
i &= MSK_OFF;
if (msk == MSK_INS) {
str[0]=0;
uifc.helpbuf=
"~ EchoList ~\n\n"
"This is the path and filename of the echolist file you wish\n"
"to add.\n";
if(uifc.input(WIN_MID|WIN_SAV,0,0
if(!new_list(i)) {
printf("\nMemory Allocation Error\n");
}
SAFECOPY(cfg.listcfg[i].listpath,str);
}
if (msk == MSK_DEL || msk == MSK_CUT) {
if(msk == MSK_CUT)
memcpy(&savlistcfg, &cfg.listcfg[i], sizeof(echolist_t));
cfg.listcfgs--;
if(cfg.listcfgs<=0) {
cfg.listcfgs=0;
}
for(u=i;u<cfg.listcfgs;u++)
memcpy(&cfg.listcfg[u],&cfg.listcfg[u+1]
}
if (msk == MSK_COPY) {
memcpy(&savlistcfg,&cfg.listcfg[i],sizeof(echolist_t));
}
if (msk == MSK_PASTE) {
if(!new_list(i))
continue;
memcpy(&cfg.listcfg[i],&savlistcfg,sizeof(echolist_t));
}
if (msk != 0)
continue;
;
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","EchoList Path/Name"
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Required Key"
,strListCombine(cfg.listcfg[i].keys, str, sizeof(str), ","));
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Hub Address"
,(cfg.listcfg[i].hub.zone) ?
faddrtoa(&cfg.listcfg[i].hub) : "None");
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","Forward AreaMgr Requests"
if(cfg.listcfg[i].forward) {
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","AreaMgr Name"
,cfg.listcfg[i].areamgr);
snprintf(opt[j++],MAX_OPLN-1,"%-30.30s %s","AreaMgr Password"
,cfg.listcfg[i].password);
}
SAFEPRINTF(str, "EchoList - %s", getfname(cfg.listcfg[i].listpath));
k=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,0,0,0,&listop,0,str,opt);
break;
uifc.input(WIN_MID|WIN_SAV,0,0
,"EchoList Path/Name"
,cfg.listcfg[i].listpath,sizeof(cfg.listcfg[i].listpath)-1
,K_EDIT);
"~ Required Key ~\n\n"
"These keys determine which linked nodes have access to the selected\n"
"echolist file via AreaFix requests (e.g. query, add, remove).\n"
"\n"
"A linked node need only have one of the required keys to have access\n"
"the echolist."
;
for(u=0; cfg.listcfg[i].keys!=NULL && cfg.listcfg[i].keys[u] != NULL;u++)
strcpy(opt[u],cfg.listcfg[i].keys[u]);
x=uifc.list(WIN_SAV|WIN_INS|WIN_DEL|WIN_ACT|
WIN_XTR|WIN_INSACT|WIN_DELACT|WIN_RHT
if(x==-1)
break;
if((x&MSK_ON)==MSK_INS) {
x&=MSK_OFF;
str[0]=0;
if(uifc.input(WIN_MID|WIN_SAV,0,0
,K_EDIT|K_UPPER)<1)
continue;
}
if((x&MSK_ON)==MSK_DEL) {
x&=MSK_OFF;
}
,str,SBBSECHO_MAX_KEY_LEN,K_EDIT|K_UPPER);
strListReplace(cfg.listcfg[i].keys,x,str);
}
SAFECOPY(str,faddrtoa(&cfg.listcfg[i].hub));
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
else
str[0]=0;
uifc.input(WIN_MID|WIN_SAV,0,0
,"Hub Address",str
,25,K_EDIT);
if(str[0])
cfg.listcfg[i].hub=atofaddr(str);
else
memset(&cfg.listcfg[i].hub,0
,sizeof(faddr_t));
break;
case 3:
cfg.listcfg[i].forward = !cfg.listcfg[i].forward;
break;
case 4:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Name to use when forwarding AreaMgr requests"
,cfg.listcfg[i].areamgr,sizeof(cfg.listcfg[i].areamgr)-1
,K_EDIT);
break;
case 5:
uifc.input(WIN_MID|WIN_SAV,0,0
,"Password to use when forwarding AreaMgr requests"
,cfg.listcfg[i].password,sizeof(cfg.listcfg[i].password)-1
,K_EDIT|K_UPPER);
break;
}
case 8:
if(!sbbsecho_write_ini(&cfg))
uifc.msg("Error saving configuration file");
else {
orig_cfg = cfg;
uifc.changes = FALSE;
}
break;
case -1:
if(uifc.changes) {
uifc.helpbuf=
"~ Save Configuration File ~\n\n"
"Select `Yes` to save the config file, `No` to quit without saving,\n"
"or hit ~ ESC ~ to go back to the menu.\n\n";
i=uifc.list(WIN_MID,0,0,0,&i,0,"Save Config File",uifcYesNoOpts);
if(i == 0) {
if(!sbbsecho_write_ini(&cfg))
uifc.msg("Error saving configuration file");
}
}
uifc.pop("Exiting");
break;