Trailing-Edge
-
PDP-10 Archives
-
tops20-v7-ft-dist1-clock
-
7-sources/scrregion.bli
There are 10 other files named scrregion.bli in the archive. Click here to see a list.
%TITLE 'SCRREGION - set the scrolling region'
MODULE SCRREGION ( ! Set the scrolling region
IDENT = '3-001' ! File: SCRREGION.BLI Edit: GB3001
) =
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 outputs a sequence to change the scrolling region.
!
! 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_SETSCLLREG from module SCREEN.
! 1-002 - regularize headers. JBS 13-Mar-1981
! 1-003 - Don't set the scrolling region on a VT52. JBS 31-Aug-1982
! 1-004 - Maintain the cursor position. JBS 05-Oct-1982
! 1-005 - Add check for scrolling terminal. SMB 21-Oct-1982
! 1-006 - Save the current top and bottom scrolling parameters. SMB 11-Jan-1983
! 3-001 - Add updates from V3 sources. GB 03-May-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SC_SETSCLLREG : NOVALUE;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
BIND
ESC_BRACKET = UPLIT (%STRING (%CHAR (ASC_K_ESC), '['));
LITERAL
ESC_BRACKET_LEN = 2;
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SC_SETSCLLREG - set the scrolling region'
GLOBAL ROUTINE EDT$$SC_SETSCLLREG ( ! Set the scrolling region
T, ! Top line
B ! Bottom line
) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine puts the escape sequence to change the scrolling region
! into the format buffer. T and B define the top and bottom line of the
! desired scrolling region.
!
! FORMAL PARAMETERS:
!
! T Top line
!
! B Bottom line
!
! IMPLICIT INPUTS:
!
! TOP_SCREG
! BOT_SCREG
! TI_SCROLL
! TI_TYP
!
! IMPLICIT OUTPUTS:
!
! TOP_SCREG
! BOT_SCREG
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$FMT_CH : NOVALUE, ! Output a character
EDT$$FMT_DCML : NOVALUE, ! Output a number is decimal
EDT$$FMT_LIT : NOVALUE, ! Output a string without editing
EDT$$SC_POSCSIF : NOVALUE; ! Position the cursor
EXTERNAL
TOP_SCREG, ! Current top parameter
BOT_SCREG, ! Current bottom parameter
TI_SCROLL, ! Scrolling terminal
TI_TYP, ! Terminal type
PRV_COL, ! Cursor column
PRV_LN; ! Cursor line
IF ((.TI_TYP EQL TERM_VT100) AND (.TI_SCROLL) !
AND ((.T NEQ .TOP_SCREG) OR (.B NEQ .BOT_SCREG)))
THEN
BEGIN
EDT$$FMT_LIT (CH$PTR (ESC_BRACKET), ESC_BRACKET_LEN);
IF (.T NEQ 0) THEN EDT$$FMT_DCML (.T + 1);
EDT$$FMT_CH (%C';');
EDT$$FMT_DCML (.B);
EDT$$FMT_CH (%C'r');
!+
! Setting the scrolling region homes the cursor.
!-
PRV_LN = 0;
PRV_COL = 0;
!+
! Save a copy of the current scrolling region parameters
!-
TOP_SCREG = .T;
BOT_SCREG = .B;
END;
END; ! of routine EDT$$SC_SETSCLLREG
!<BLF/PAGE>
END ! of module EDT$SCRREGION
ELUDOM