! Fix.tes - Copyright (c) 1990, by Network-Systems Design, Inc. ! !Fix.tec - Copyright (c) 1990, by Network-Systems Design, Inc.! 0,8ET ! echo off ! 1,2ED ! ^ means Ctrl, allow Y and _ to destroy buffer ! 0B ! use edit buffer 0 ! HK ! kill contents of edit buffer 0 ! 20W ! set display window of current buffer (0) to 20! 1B ! lines then do the same to edit buffer 1 ! HK ! ... ! 20W ! ... ! !Menu! 0B ! select edit buffer 0 ! HK ! kill text ! ! Now insert into the bufer the text of the menu. ! ! Note, the text following has NO tabs AND each line is space filled on ! ! the right so as to fill the background to the right margin. ! @I% Fix.tec - Copyright (c) 1990, by Network-Systems Design, Inc. B) Build list V) View list O) Open old list M) Modify files in list S) Search list K) Kill list F) File list X) eXit Option? ________________________________________________________________________________ % ! text inserted for top of screen ! 1B ! switch to edit buffer 1 ! J ! go to start of buffer ! < ! loop ! :@S% %; ! search for , exit if not found ! RR ! backup in front of ! 0XF ! put line sans into F.str ! CC ! advance past ! 0B ! switch to edit buffer 0 ! GF ! copy F.str into buffer 0 ! 0^Q-79"G ! if line is now longer than 79 characters ! ^SD ! delete the text we just inserted ! @I% % ! insert ! W ! refresh the display ! GF ! get the text again (after the ! ' ! endif line .gt. 79 chars ! @I% % ! insert some blanks ! -(0^Q&15)D ! delete those blanks that fall after tab stop! 1B ! back kto edit buffer 1 ! > ! end loop ! 0B ! select edit buffer 0 ! J ! jump to start of buffer ! @S%? % ! position after the ? in Option? ! W ! refresh the screen (and cursor positon) ! < ! loop ! ^T@I%% ! read a character from the keyboard, insert char ! D ! delete a blank to adjust for the inserted char ! R ! backup over the char ! ^W ! upcase the char ! ! then dispatch depending on the value of char ! 0A-^^B"E @O!Build! ' 0A-^^O"E @O!Open! ' 0A-^^S"E @O!Search! ' 0A-^^F"E @O!File! ' 0A-^^V"E @O!View! ' 0A-^^M"E @O!Modify! ' 0A-^^K"E @O!Kill!' 0A-^^X"E $^[ ' 1@FR% % ! none of the above replace the char with ! R ! backup ! 7^T ! beep ! > ! end loop ! !Modify! ! Modify files in list ! 1:@EI%Modify% ! call Modify.tec, entry arg=1 ! F> ! Modify wants to exit to prompt ! !Kill! ! kill list (presumably to start over ! 1B ! switch to buffer 1 ! HK ! kill the contents of buffer 1 ! @O!Menu! ! go back up to menu loop ! !Build! ! build list (adds to list) ! C ! advance past the B that was inputed ! @I%uild list% ! insert the rest of the text of the option ! L ! down a line... ! 6C ! indent 6 chars ! @I%Enter file match (use ?'s and or *): % -^SD ! delete the blanks to right of text (above) for ! ! text length of text entered ! 13:@EI%gettext%"E ! get text (end on return) then if nothing entered ! @O!Menu! ! go back to menu loop ! ' ! endif null text ! ^S::^W ! upcase the text entered (to left, anchored) ! @^UF%EN% ! load F.str with EN ! ^Y:XF ! append to F.str the filespec just entered ! 27:@^UF%% ! end F.str with ! 1B ! switch to buffer 1 (the list buffer) ! MF ! execute F.str to load the file match buffer ! ZJ ! go to the end of the buffer (file list) ! @I% % ! insert a ! < ! loop ! :@EN%%; ! find next name match, exit if no more ! G* ! insert matching name into buffer ! @I% % ! insert a ! W ! refresh the screen ! > ! end loop ! @O!Fix List! ! reformat the list ! !View! ! view the list in buffer 1 ! @^A% Strike any key to go back% ! type out prompt ! 1B ! select buffer 1 (the file list buffer) ! W ! refresh the screen ! ^T$ ! wait for character, throw it out ! 13^T ! type (move cursor to left margin) ! 27^T ! type ! @^A%[K% ! type [K kill text to right of cursor ! @O!Menu! ! go back up to menu loop ! !Open! ! Open file (use list we've created before) ! C ! advance past the O that was inputed ! @I%pen old list% ! insert the rest of the text of the option ! L ! down a line... ! 6C ! indent 6 chars ! @I%Enter file name to retrieve: % 13:@EI%gettext%"E ! get text (end on return) then if nothing entered ! @O!Menu! ! go back to menu loop ! ' ! endif null text ! @^UF%:ER% ! F.str = conditional Edit Read ! ^Y:XF ! :ERfilespec ! 27:@^UF%% ! :ERfilespec ! 1B ! switch to buffer 1 ! MF"F ! if :ERfilespec fails ! @^A%List not found % @O!Menu! ! back to menu loop ! ' ! endif filespec not found ! ZJ ! end of list buffer ! 0^Q"N ! if not at left margin ! @I% % ! insert ! ' ! endif not at left margin ! A ! append contents of file to buffer ! !Fix List! ! fix file list ! ! remove extra CR/LFs and duplicate entries ! 1B ! select buffer 1 ! J ! jump to front of buffer ! < ! loop to remove any blank lines in front ! ::@FD% %; ! anchored delete of , exit on fail ! > ! end loop to remove any blank lines in front ! < ! loop to replace with ! :@FS% % %; ! do replace, exit if not found ! RR ! backup 1 ! > ! end loop ! < ! loop to eliminate duplicate entries ! :@S% %; ! advance a line, exit if no more ! .UP ! save the position ! -XF ! copy previous line (filespec) into F.str ! < ! loop to replace ! :@FS% ^EQF% %; ! filespec with ! > QPJ ! back to the saved position ! > ! end loop ! @O!Menu! ! go back to menu loop ! !File! ! process to file away a built list ! C ! advance past the F that was inputed ! @I%ile list% ! insert the rest of the text of the option ! L ! down a line... ! 6C ! indent 6 chars ! @I%Enter file name for save: % 13:@EI%gettext%"N ! return is delimiter, get filespec, if something ! @^UF%EW% ! F.str = EW ! ^Y:XF ! F.str = EWfilespec ! 27:@^UF%% ! F.str = EWfilespec ! 1B ! select buffer 1 (the file list buffer) ! MF ! open the output file ! EC ! output list buffer, clear buffer, close file ! ' @O!Menu! ! back to menu loop ! !Search! ! search list for something (reduce list to match) ! 1:@EI%search% ! call with buffer 1 having list ! @O!Menu! ! backup to menu loop !