Google
 

Trailing-Edge - PDP-10 Archives - CFS_TSU04_19910205_1of1 - update/t20src/chmsavlin.bli
There are 11 other files named chmsavlin.bli in the archive. Click here to see a list.
 %TITLE 'CHMSAVLIN - save a line'
MODULE CHMSAVLIN (				! Save a line
		IDENT = '1-002'			! File: CHMSAVLIN.BLI Edit: JBS1002
		) =
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 saves a line in the auxiliary buffer.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: Unknown
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 04-Feb-1981.  This module was created by
!	extracting the routine EDT$$SAV_LN  from module CHANGE.BLI.
! 1-002	- Regularize headers.  JBS 03-Mar-1981
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$SAV_LN : NOVALUE;			! Save a line in the auxiliary buffer

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$SAV_LN  - save a line'

GLOBAL ROUTINE EDT$$SAV_LN (			! Save a line
	LINE, 					! Pointer to the line to save
	LEN					! Length of that line
    ) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine saves a line to the auxiliary buffer if there is one.
!	The routine is called by the deletes, and the aux buffer will be set
!	if it is really a cut command rather than a delete.
!
! FORMAL PARAMETERS:
!
!  LINE			Address of the line to save
!
!  LEN			Length of the line to save
!
! IMPLICIT INPUTS:
!
!	ALT_BUF
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$INS_LN,				! Insert a line into buffer
	EDT$$RD_CURLN;				! Get the current line

    EXTERNAL
	ALT_BUF : REF TBCB_BLOCK,	! Alternate buffer used for cut/paste.
	CUR_BUF : REF TBCB_BLOCK;	! The current buffer tbcb

    LOCAL
	SAVE_TBCB;

!+
! See if there is an aux buffer.
!-

    IF (.ALT_BUF EQL 0) THEN RETURN;

!+
! Switch to the aux buffer.
!-
    SAVE_TBCB = .CUR_BUF;
    CUR_BUF = .ALT_BUF;
!+
! Read the current line.
!-
    EDT$$RD_CURLN ();
!+
! Insert the line to be saved.
!-
    EDT$$INS_LN (.LINE, .LEN);
!+
! And switch back to the main buffer.
!-
    CUR_BUF = .SAVE_TBCB;
    EDT$$RD_CURLN ();
    END;


END
ELUDOM