%title 'Reset' %sbttl 'Introduction' MODULE Reset(main=reset, ! IDENT = '1' ) = BEGIN ! ! COPYRIGHT (c) 1981 BY ! Project Software & Development, Inc. ! ! 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 PROJECT SOFTWARE ! AND DEVELOPMENT, INC. ! ! PROJECT SOFTWARE assumes no responsibility for the use or reliability ! of its software on equipment which is not supplied by PROJECT SOFTWARE. ! !++ ! FACILITY: ! ! ABSTRACT: This routine is used to reset the characteristics of a BLACK_HOLE ! device (bh). ! ! ENVIRONMENT: VMS 2.2 ! ! AUTHOR: M. Erik Husby, CREATION DATE: March 1981 ! ! MODIFIED BY: ! ! , : VERSION ! 01 - !-- ! ! TABLE OF CONTENTS: ! ! ! INCLUDE FILES: ! library 'SYS$LIBRARY:STARLET'; require 'SYS$LIBRARY:PSDI'; ! ! MACROS: ! ! ! EQUATED SYMBOLS: ! ! ! OWN STORAGE: ! OWN bh_name : string('_BHx:'), bh_name_desc : descriptor(bh_name,5), bh_channel : word, cmd_line : allocate_string(80), cmd_line_desc : descriptor(cmd_line,80); ! ! EXTERNAL REFERENCES: ! EXTERNAL ROUTINE lib$get_foreign : addressing_mode(general) ; ! %sbttl 'Reset' ROUTINE Reset :NOVALUE = ! !++ ! FUNCTIONAL DESCRIPTION: ! ! This routine attempts to do a IO$_SETCHAR to a black_hole. ! ! FORMAL PARAMETERS: ! ! A command line which should be the name of a black_hole. ! ! IMPLICIT INPUTS: ! ! NONE ! ! IMPLICIT OUTPUTS: ! ! NONE ! ! ROUTINE VALUE: ! COMPLETION CODES: ! ! System service status. ! ! SIDE EFFECTS: ! ! The black_hole characteristics should be reset. ! !-- BEGIN LOCAL length,status ; ! ! ! Get a command line lib$get_foreign(cmd_line_desc, static_descriptor('Black hole to be reset? '), length); ch$move(min(5,.length),ch$ptr(cmd_line),ch$ptr(bh_name)); bh_name_desc[dsc$w_length]=min(5,.length); status=$assign(devnam=bh_name_desc,chan=bh_channel); if bool( not .status) then $exit(code=.status); status=$qio(chan=.bh_channel,func=io$_setchar); $exit(code=.status); END; !End of Reset END !End of module ELUDOM