Trailing-Edge
-
PDP-10 Archives
-
bb-h138e-bm_tops20_v6_1_distr
-
6-1-sources/wfstrins.bli
There are 10 other files named wfstrins.bli in the archive. Click here to see a list.
%TITLE 'WFSTRINS - start an INSERT operation'
MODULE WFSTRINS ( ! Start an INSERT operation
IDENT = '1-002' ! File: WFSTRINS.BLI Edit: JBS1002
) =
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:
!
! Start an INSERT operation.
!
! ENVIRONMENT: Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: October 16, 1978
!
! MODIFIED BY:
!
! 1-001 - Original. DJS 23-Feb-1981. This module was created by
! extracting routine EDT$$START_INS from module EDTWF.
! 1-002 - Regularize headers. JBS 19-Mar-1981
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$START_INS : NOVALUE;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$START_INS - start an INSERT operation'
GLOBAL ROUTINE EDT$$START_INS ! Start an INSERT operation
: NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine is called to start the insertion of text. The new lines
! will be inserted immediately before the current line. The insert
! count (WK_INSCNT ) is set to zero, and the numbers of the current and
! preceding lines are saved.
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! WK_LN
! WK_NXTLNO
! WK_STARTNO
! LNO_ZERO
!
! IMPLICIT OUTPUTS:
!
! WK_INSCNT
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$RD_PRVLN,
EDT$$RD_NXTLN;
EXTERNAL
WK_INSCNT : LN_BLOCK, ! The count of inserted lines
WK_LN : REF LIN_BLOCK, ! Pointer to current line
WK_NXTLNO : LN_BLOCK, ! Line number following an insert
WK_STARTNO : LN_BLOCK, ! Line number of line preceding an insert
LNO_ZERO : LN_BLOCK;
!+
! Zero out the insert line counter
!-
MOVELINE (LNO_ZERO, WK_INSCNT);
!+
! Save the current line number, bucket number, and line address
!-
MOVELINE (WK_LN [LIN_NUM], WK_NXTLNO);
!+
! Find the prevsious line number
!-
IF EDT$$RD_PRVLN ()
THEN
BEGIN
MOVELINE (WK_LN [LIN_NUM], WK_STARTNO);
EDT$$RD_NXTLN ()
END
ELSE
!+
! Make the previous line number 0 if the insert is at the beginning of the buffer
!-
MOVELINE (LNO_ZERO, WK_STARTNO)
END;
END
ELUDOM