Skip to content
Snippets Groups Projects
Commit 0ad742dd authored by rswindell's avatar rswindell
Browse files

New way of looking up external programs (using associative array).

parent 92734150
No related branches found
No related tags found
No related merge requests found
......@@ -96,10 +96,15 @@ function xtrn_name(code)
if(this.xtrn_area==undefined)
return(code);
for(s in xtrn_area.sec_list)
for(p in xtrn_area.sec_list[s].prog_list)
if(xtrn_area.sec_list[s].prog_list[p].code.toLowerCase()==code.toLowerCase())
return(xtrn_area.sec_list[s].prog_list[p].name);
if(xtrn_area.prog!=undefined)
if(xtrn_area.prog[code]!=undefined)
return(xtrn_area.prog[code].name);
else { /* old way */
for(s in xtrn_area.sec_list)
for(p in xtrn_area.sec_list[s].prog_list)
if(xtrn_area.sec_list[s].prog_list[p].code.toLowerCase()==code.toLowerCase())
return(xtrn_area.sec_list[s].prog_list[p].name);
}
return(code);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment