/* LOCATE.SYS maintenance program */ input (locate.idx; locexpl.idx) output () noauto; clear; display "This program will help you to maintain the LOCATE.SYS file."; curse 2,1; display "When you enter an extension, an explanation will appear, if"; curse 3,1; display "there is one on file. You may change the drive name for any"; curse 4,1; display "extension, but you cannot use this program to add new entries."; curse 6,1; display "When you're ready to start, "; call wait for RETURN; loop: clear; curse 20,1; display 'Enter "END" to stop, "P" for previous, "N" for next '; curse 9,1; clearln; curse 9,12; display "Extension: "; curse 9,23; enterur 1,1; curse 20,1; clearln; switch 1,1 case "END": clear; stop; case "N ": nread next 1; break; case "P ": nread prev 1; break; default: kread 1; endswitch /* we'll check for error later */ 2,1 = 1,1; kread 2; if error 2 /* how to do "if not error... " */ ; else curse 3,1; display "Explanation for " 2,1 ":"; curse 3,23; display 2,2; endif if error 1 curse 20,1; display "Can't find that one in LOCATE.SYS - "; call wait for RETURN; curse 20,1; clearln; goto loop; endif curse 9,23; display 1,1; /* in case wild cards used, fill in actual field found */ curse 20,1; display "Use linefeed to keep the same value." " Use RETURN or the spacebar for a space."; curse 10,11; display "Drive name: "; curse 10,30; display "Current value: " 1,2; if 1,2 = " " display "(space)"; endif curse 10,23; enterur 1,2; kwrite 1; /* note that rewrite would not work, because file 1 was not the last read. */ curse 20,1; clearln; goto loop; wait for RETURN: display "Please press RETURN-"; waitloop: if key != 13 goto waitloop; endif return; end;