Skip to content
Snippets Groups Projects
Commit a05440fb authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Eliminate one unnecessary/redundant object.

parent 1fdc2534
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1295 passed
...@@ -10,21 +10,21 @@ var file_cnf = cnflib.read("file.cnf"); ...@@ -10,21 +10,21 @@ var file_cnf = cnflib.read("file.cnf");
var cfgtype; var cfgtype;
var cfgtypes = { var cfgtypes = {
'msg-grps': msg_area.grp, 'msg-grps': 'grp',
'msg-subs': msg_area.sub, 'msg-subs': 'sub',
'file-libs': file_area.lib, 'file-libs': 'lib',
'file-dirs': file_area.dir, 'file-dirs': 'dir',
'file-prots': file_cnf.prot, 'file-prots': 'prot',
'file-extrs': file_cnf.fextr, 'file-extrs': 'fextr',
'file-comps': file_cnf.fcomp, 'file-comps': 'fcomp',
'file-viewers': file_cnf.fview, 'file-viewers': 'fview',
'file-testers': file_cnf.ftest, 'file-testers': 'ftext',
'file-dlevents':file_cnf.dlevent, 'file-dlevents':'dlevent',
'text-secs': file_cnf.txtsec, 'text-secs': 'txtsec',
'xtrn-secs': xtrn_area.sec, 'xtrn-secs': 'xtrnsec',
'xtrn-progs': xtrn_area.prog, 'xtrn-progs': 'xtrn',
'xtrn-events': xtrn_area.event, 'xtrn-events': 'event',
'xtrn-editors': xtrn_area.editor, 'xtrn-editors': 'xedit',
}; };
var cnf_fnames = { var cnf_fnames = {
...@@ -45,24 +45,6 @@ var cnf_fnames = { ...@@ -45,24 +45,6 @@ var cnf_fnames = {
'xtrn-editors': 'xtrn.cnf', 'xtrn-editors': 'xtrn.cnf',
}; };
var cnf_objs = {
'msg-grps': 'grp',
'msg-subs': 'sub',
'file-libs': 'lib',
'file-dirs': 'dir',
'file-prots': 'prot',
'file-extrs': 'fextr',
'file-comps': 'fcomp',
'file-viewers': 'fview',
'file-testers': 'ftext',
'file-dlevents':'dlevent',
'text-secs': 'txtsec',
'xtrn-secs': 'xtrnsec',
'xtrn-progs': 'xtrn',
'xtrn-events': 'event',
'xtrn-editors': 'xedit',
};
var filename; var filename;
function usage(msg) function usage(msg)
...@@ -128,7 +110,7 @@ for(var i in text) { ...@@ -128,7 +110,7 @@ for(var i in text) {
} }
/* Add list of imported objects into the .cnf file */ /* Add list of imported objects into the .cnf file */
const cnf_obj = cnf_objs[cfgtype]; const cnf_obj = cfgtypes[cfgtype];
const cnf_fname = system.ctrl_dir + cnf_fnames[cfgtype]; const cnf_fname = system.ctrl_dir + cnf_fnames[cfgtype];
var cnf = cnflib.read(cnf_fname); var cnf = cnflib.read(cnf_fname);
if(!cnf) { if(!cnf) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment