Trailing-Edge
-
PDP-10 Archives
-
bb-h138f-bm
-
7-sources/scrreset.bli
There are 10 other files named scrreset.bli in the archive. Click here to see a list.
%TITLE 'SCRRESET - reset the terminal'
MODULE SCRRESET ( ! Reset the terminal
IDENT = '1-006' ! File: SCRRESET.BLI Edit: JBS1006
) =
BEGIN
!COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1981, 1988. ALL RIGHTS RESERVED.
!
!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 THAT IS NOT SUPPLIED BY DIGITAL.
!
!
!++
! FACILITY: EDT -- The DEC Standard Editor
!
! ABSTRACT:
!
! This module resets the terminal attributes to their state
! before change mode was entered.
!
! ENVIRONMENT: Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: September 8, 1979
!
! MODIFIED BY:
!
! 1-001 - Original. DJS 12-Feb-1981. This module was created by
! extracting the routine EDT$$SC_RESET from module SCREEN.
! 1-002 - Regularized headers. JBS 24-Feb-1981
! 1-003 - Fix module name. JBS 13-Mar-1981
! 1-004 - Revise autorepeat logic. JBS 30-Jan-1982
! 1-005 - Change if test for nokeypad command. SMB 23-Feb-1982
! 1-006 - Change test back and add test for terminal type, moved here
! from EDT$CHMCHANGE. JBS 22-Apr-1982
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SC_RESET : NOVALUE;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
BIND
NOKEYPAD_MODE = UPLIT (%STRING (%CHAR (ASC_K_ESC), '>'));
LITERAL
NOKEYPAD_MODE_LEN = 2;
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SC_RESET - reset the terminal'
GLOBAL ROUTINE EDT$$SC_RESET ! Reset the terminal
: NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine resets all the funny things we did to the terminal when
! entering screen mode.
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! TI_TYPE
! KPAD
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! Puts the cursor at the bottom of the screen, and
! leaves change mode.
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$FMT_LIT,
EDT$$OUT_FMTBUF,
EDT$$TI_LEAVECHM,
EDT$$SC_POSABS : NOVALUE,
EDT$$SC_NONREVID : NOVALUE,
EDT$$SC_FULLSCLL : NOVALUE,
EDT$$TI_ENBLAUTREP : NOVALUE; ! Enable or disable autorepeat
EXTERNAL
TI_TYP, ! The type of terminal we have
KPAD; ! Keypad activated?
IF ((.TI_TYP EQL TERM_VT52) OR (.TI_TYP EQL TERM_VT100))
THEN
BEGIN
IF .KPAD THEN EDT$$FMT_LIT (CH$PTR (NOKEYPAD_MODE), NOKEYPAD_MODE_LEN);
EDT$$SC_FULLSCLL ();
EDT$$SC_NONREVID ();
EDT$$TI_ENBLAUTREP (1);
!+
! Put cursor at bottom of screen.
!-
EDT$$SC_POSABS (23, 0);
EDT$$FMT_LIT (CH$PTR (UPLIT (%STRING (%CHAR (ASC_K_LF)))), 1);
EDT$$OUT_FMTBUF ();
!+
! Inform the terminal I/O routines that we are leaving screen mode.
!-
EDT$$TI_LEAVECHM ();
END;
END; ! of routine EDT$$SC_RESET
END
ELUDOM