Trailing-Edge
-
PDP-10 Archives
-
bb-h138e-bm_tops20_v6_1_distr
-
6-1-sources/ltype.bli
There are 10 other files named ltype.bli in the archive. Click here to see a list.
%TITLE 'LTYPE - TYPE and null line-mode commands'
MODULE LTYPE ( ! TYPE and null line-mode commands
IDENT = '3-002' ! File: LTYPE.BLI Edit: GB3002
) =
BEGIN
!
! COPYRIGHT (c) 1981, 1985 BY
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
! 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 WHICH IS NOT SUPPLIED BY DIGITAL.
!
!++
! FACILITY: EDT -- The DEC Standard Editor
!
! ABSTRACT:
!
! This module executes the line mode TYPE and null commands.
!
! ENVIRONMENT: Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: February 3, 1978
!
! MODIFIED BY:
!
! 1-001 - Original. DJS 30-JAN-1981. This module was created by
! extracting the routines EDT$$TY_CMD and NULL_COM from the
! module EXEC.BLI.
! 1-002 - Regularize headers. JBS 20-Mar-1981
! 1-003 - Change NULL_COM to EDT$$NULL_CMD . JBS 30-Mar-1981
! 1-005 - Switch back to first buffer if /STAY. STS 21-Apr-1982
! 1-006 - Add a check for CNTRL/C. SMB 19-May-1982
! 1-007 - Set a flag if control C actually aborts something. JBS 25-May-1982
! 1-008 - Stop working message before printing to screen. SMB 22-Jun-1982
! 1-009 - Stop processing on bad select range. SMB 01-Jul-1982
! 1-010 - Undo yesterday's fix because we want to print current line. SMB 02-Jul-1982
! 1-011 - Don't fool with the formatting routine. JBS 05-Jul-1982
! 1-012 - Make the call to EDT$$RNG_NUMLN in line. STS 22-Sep-1982
! 1-013 - Correct a typo in edit 1-012. JBS 30-Sep-1982
! 1-014 - Put code for edt$$rng_retfrst in line. STS 11-Oct-1982
! 1-015 - Remove setting of G_TXT_ONSCR. SMB 14-Dec-1982
! 3-001 - Fix problem when there is no range pointer in the null command. CJG 10-Jan-1984
! 3-002 - Fix the fix above. GB 22-Aug-1984
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$TY_CMD : NOVALUE, ! Process the TYPE command
EDT$$NULL_CMD : NOVALUE; ! Process the null command
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routines
%SBTTL 'EDT$$TY_CMD - TYPE line-mode command'
GLOBAL ROUTINE EDT$$TY_CMD ! TYPE line-mode command
: NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! Command processing routine for the TYPE command. Position to
! the first line of the range, then loop through the range
! displaying each line. If the /STAY qualifier was used,
! then reposition to the position at the start of the command,
! otherwise, reposition to the first line typed.
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! CUR_BUF
! RNG_ORIGPOS
! EXE_CURCMD
! EXE_SBITS
! RNG_NOOFLN
!
! IMPLICIT OUTPUTS:
!
! CUR_BUF
! CC_DONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$STOP_WKINGMSG, ! Stop the working message
EDT$$CHK_CC, ! Check for CONTROL C typed
EDT$$NXT_LNRNG,
EDT$$RNG_REPOS,
EDT$$RD_CURLN,
EDT$$TY_CURLN;
EXTERNAL
EXT_MOD, ! 1 = we are under the EXT command
RNG_FRSTLN,
CUR_BUF : REF TBCB_BLOCK,
RNG_ORIGPOS : POS_BLOCK,
EXE_CURCMD : REF NODE_BLOCK, ! Pointer to the current command.
RNG_SAVPOS : POS_BLOCK,
EXE_SBITS, ! The options switches.
CC_DONE, ! Set to 1 if control C actually aborts something
RNG_NOOFLN; ! number of lines processed in a range
LOCAL
SAV_BUF,
STATUS;
SAV_BUF = .CUR_BUF;
RNG_FRSTLN = 1;
EDT$$CPY_MEM (POS_SIZE, .CUR_BUF, RNG_ORIGPOS);
EDT$$RNG_REPOS (.EXE_CURCMD [RANGE1]);
STATUS = 1;
!+
! Turn off the "working" message if it might be on, since the type
! command doesn't want competition with a flashing message.
!-
IF (.EXT_MOD) THEN EDT$$STOP_WKINGMSG ();
WHILE .STATUS DO
BEGIN
STATUS = EDT$$NXT_LNRNG (0);
IF .STATUS
THEN
BEGIN
STATUS = ( NOT EDT$$CHK_CC ());
IF .STATUS THEN EDT$$TY_CURLN () ELSE CC_DONE = 1;
END;
END;
IF (.RNG_NOOFLN EQL 0) THEN EDT$$TY_CURLN ();
IF ( NOT .EXE_SBITS<OPB_STAY>)
THEN
BEGIN
EDT$$CPY_MEM (POS_SIZE, RNG_SAVPOS, .CUR_BUF);
EDT$$RD_CURLN ();
END
ELSE
BEGIN
CUR_BUF = .SAV_BUF;
EDT$$CPY_MEM (POS_SIZE, RNG_ORIGPOS, .CUR_BUF);
EDT$$RD_CURLN ();
END;
END; ! of routine EDT$TY_CMD
%SBTTL 'EDT$$NULL_CMD - null line-mode command'
GLOBAL ROUTINE EDT$$NULL_CMD ! Null line-mode command
: NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! Command processing routine for the null command. If the range is '.'
! then move one line forward and display it. Otherwise, process it as
! a TYPE comamnd.
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! EXE_CURCMD
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$RD_NXTLN,
EDT$$TY_CURLN;
EXTERNAL
EXE_CURCMD : REF NODE_BLOCK; ! Pointer to the current command.
BIND
RANGE = .EXE_CURCMD [RANGE1] : NODE_BLOCK;
IF ((.RANGE [RAN_TYPE] EQL RAN_NULL) OR (RANGE EQL 0))
THEN
BEGIN
EDT$$RD_NXTLN ();
EDT$$TY_CURLN ()
END
ELSE
EDT$$TY_CMD ();
END; ! of routine EDT$$NULL_CMD
END ! of module EDT$LTYPE
ELUDOM