MODULE XTESTD ( IDENT = 'X00.09', %TITLE 'XPORT File Delete Test' MAIN = TEST_DELETE ! Entry point of main program %BLISS32( ,ADDRESSING_MODE( EXTERNAL=LONG_RELATIVE ) ) ) = BEGIN ! ! COPYRIGHT (c) 1979 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. ! ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY ! TRANSFERRED. ! ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT ! CORPORATION. ! ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. ! !++ ! ! FACILITY: BLISS Library ! ! ABSTRACT: ! ! This module tests the XPORT file delete facility. ! ! ENVIRONMENT: User Mode ! ! AUTHOR: Ward Clark, CREATION DATE: 26 February 1979 ! !-- ! ! TABLE OF CONTENTS: ! FORWARD ROUTINE TEST_DELETE; ! Principal testing routine ! ! INCLUDE FILES: ! LIBRARY 'BLI:XPORT' ; ! XPORT control block and macro definitions ! ! MACROS: ! MACRO SKIP( literal_string ) = ! Prefix a literal string with a line-feed %STRING( %CHAR(lf), literal_string ) %; ! ! EQUATED SYMBOLS: ! LITERAL lf = %O'12'; ! ASCII line feed character ! ! OWN STORAGE: ! OWN tty_input : $XPO_IOB(), ! IOB for input from terminal tty_output : $XPO_IOB(), ! IOB for output to terminal file : $XPO_IOB(); ! IOB for the file to be deleted ! ! EXTERNAL REFERENCES: ! GLOBAL ROUTINE TEST_DELETE = !++ ! ! FUNCTIONAL DESCRIPTION: ! ! This module tests the XPORT file delete facility. ! ! FORMAL PARAMETERS: ! ! None ! ! IMPLICIT INPUTS: ! ! None ! ! IMPLICIT OUTPUTS: ! ! None ! ! COMPLETION CODES: ! ! XPO$_NORMAL - successful completion ! ! SIDE EFFECTS: ! ! None ! !-- BEGIN %IF %VARIANT NEQ 0 %THEN ! ! Initialize the IOB'S ! $XPO_IOB_INIT( IOB = tty_input ); $XPO_IOB_INIT( IOB = tty_output ); $XPO_IOB_INIT( IOB = file ); %FI ! ! Open the user's terminal for output and send the user a greeting message. ! $XPO_OPEN( IOB = tty_output, ! Open the user's terminal: FILE_SPEC = $XPO_OUTPUT, ! standard output file OPTIONS = OUTPUT ); ! open for output $XPO_PUT( IOB = tty_output, ! Send the user a greeting message. STRING = skip('XPORT File Delete Test') ); ! ! Open the user's terminal for input. ! $XPO_OPEN( IOB = tty_input, ! Open the user's terminal: FILE_SPEC = $XPO_INPUT, ! standard input file OPTIONS = INPUT ); ! open for input ! ! Request the name of the file to be deleted. ! WHILE 1 DO ! Keep asking for a new file-spec. BEGIN IF NOT $XPO_GET( IOB = tty_input, ! Read a file name from the terminal. PROMPT = skip('Name of file to be deleted? ') ) THEN ! If terminal end-of-file (^Z) is reached, EXITLOOP; ! terminate delete testing. ! ! Delete the specified file. ! $XPO_DELETE( IOB = file, ! Delete the specified file. FILE_SPEC = tty_input[IOB$T_STRING], FAILURE = XPO$IO_FAILURE ); END; ! ! Send the user a completion message. ! $XPO_PUT( IOB = tty_output, ! Send the user a blank line followed by a message. STRING = skip('XPORT File Delete Test Complete') ); ! ! Close the terminal input and output files. ! $XPO_CLOSE( IOB = tty_input ); ! Close the terminal input file. $XPO_CLOSE( IOB = tty_output ); ! Close the terminal output file. ! ! Terminate XPORT I/O testing. ! RETURN XPO$_NORMAL; ! Exit with a normal completion code. END; END ELUDOM