Google
 

Trailing-Edge - PDP-10 Archives - BB-H138E-BM - 6-1-sources/lfill.bli
There are 10 other files named lfill.bli in the archive. Click here to see a list.
 %TITLE 'LFILL - FILL line-mode command'
MODULE LFILL (				! FILL line-mode command
		IDENT = '3-001'			! File: LFILL.BLI Edit: GB3001
		) =
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 FILL command.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: February 3, 1978
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 30-JAN-81.  This module was created by
!	extracting the routine EDT$$FILL_CMD  from the module EXEC.BLI.
! 1-002	- Regularize headers.  JBS 19-Mar-1981
! 1-003	- Flag that the screen has changed.  JBS 07-Jul-1982
! 1-004 - Put edt$$tst_eob in line. STS 22-Sep-1982
! 1-005	- Remove EDT$$G_SCR_CHGD, not needed by new screen logic.  JBS 09-Oct-1982
! 1-006 - Remove EDT$$RNG_POSFRST. STS 11-Oct-1982
! 3-001 - Add updates from v3 sources. GB 29-Apr-1983
!--

%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$FILL_CMD : NOVALUE;			! Process the FILL command

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$FILL_CMD  - FILL line-mode command'

GLOBAL ROUTINE EDT$$FILL_CMD 			! FILL line-mode command
    : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	Command processing for the FILL command.  If the range is null,
!	then assume SELECT.   Make sure the range is contiguous.  Count
!	the number of lines, then call the FILL routine.
!
! FORMAL PARAMETERS:
!
!	NONE
!
! IMPLICIT INPUTS:
!
!	EXE_CURCMD
!	WK_LN
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
    	EDT$$RNG_REPOS,
	EDT$$FILL_TXT,
	EDT$$TST_NONCNTGRNG,
	EDT$$NXT_LNRNG,
	EXT_MOD,				! 1 = we are under EXT
    	EDT$$RD_CURLN;

    EXTERNAL
 	RNG_FRSTLN,
    	CUR_BUF : REF TBCB_BLOCK,
    	RNG_SAVPOS : POS_BLOCK,
    	RNG_ORIGPOS : POS_BLOCK,
	WK_LN : REF LIN_BLOCK,
	EOB_LN,
	EXE_CURCMD : REF NODE_BLOCK;	! Pointer to the current command.

    LOCAL
	RANGE : REF NODE_BLOCK,
	NLINES;

    RANGE = .EXE_CURCMD [RANGE1];

    IF (.RANGE [RAN_TYPE] EQL RAN_NULL) THEN RANGE [RAN_TYPE] = RAN_SELECT;

    IF EDT$$TST_NONCNTGRNG (.EXE_CURCMD [RANGE1]) THEN RETURN;

    RNG_FRSTLN = 1;
    EDT$$CPY_MEM( POS_SIZE, .CUR_BUF, RNG_ORIGPOS);
    IF EDT$$RNG_REPOS (.EXE_CURCMD [RANGE1])
    THEN
	BEGIN
	NLINES = 0;

	WHILE (EDT$$NXT_LNRNG (0) AND (.WK_LN NEQA EOB_LN)) DO
	    NLINES = .NLINES + 1;

    	EDT$$CPY_MEM(POS_SIZE, RNG_SAVPOS, .CUR_BUF);
    	EDT$$RD_CURLN();
	EDT$$FILL_TXT (.NLINES);
	END;

    END;					! of routine EDT$$FILL_CMD

!<BLF/PAGE>
END						! of module EDT$LFILL

ELUDOM