home *** CD-ROM | disk | FTP | other *** search
-
- procedure Display_Help;
- var help_msg : Str_80;
- action : Char;
-
- procedure Select_Subject;
- begin
- Clear_Prompts;
- help_msg := 'Accept | Modify | Print | '
- + QUIT_KEY + 'Exit';
- Display_Prompt(CMD_LINE,'HLP',help_msg);
- Display_Prompt(MSG_LINE,'INP'
- ,'Press a HLP: key to select subject ==> ');
- action := Valid_Key([ACCEPT,MODIFY,PRINT,QUIT]);
- end; { Select_Subject }
-
- begin { Display_Help }
- Select_Subject;
- case action of
- ACCEPT : Disp_Help(19,27);
- MODIFY : Disp_Help(1,18);
- PRINT : Disp_Help(28,36);
- QUIT : esc_flag := FALSE;
- end {case}
- end; { Display_Help }
-
- procedure Exit_Housekeeping;
- var size : Integer;
-
- procedure Display_Exit_Warning;
- var action : Char;
-
- begin
- Clear_Prompts;
- Display_Prompt(CMD_LINE,'CMD',
- '<Y> Abandon Changes | <N> Return to Input Screen');
- Display_Prompt(MSG_LINE,'INP',
- 'Do you want to abandon modifications? ( Y/N ) ==> ');
- action := Valid_Key(['Y','N']);
- if (action = 'Y') then
- esc_flag := TRUE
- else
- esc_flag := FALSE;
- end; { Display_Exit_Warning }
-
- begin { Exit_Housekeeping }
- io_status := ZERO;
- if modified then
- Display_Exit_Warning
- else
- esc_flag := TRUE;
- if esc_flag then
- begin
- {$I+}
- size := FileSize(loan_file); { Get size of file. }
- io_status := IOresult;
- if (io_status = ZERO) then
- begin
- Close(loan_file); { Close the file. }
- io_status := IOresult;
- if (io_status = ZERO) then
- if (size = ZERO) then { If it was empty then }
- Erase(loan_file); { delete it from the disk }
- end;
- end;
- {$I+}
- if (io_status <> ZERO) then
- Disp_IO_Error(file_name);
- end; { Exit_Housekeeping }
-