Google
 

Trailing-Edge - PDP-10 Archives - bb-r775e-bm_tops20_ks_upd_5 - sources/edt/chmsavpos.bli
There are 11 other files named chmsavpos.bli in the archive. Click here to see a list.
 %TITLE 'CHMSAVPOS - save the current buffer position'
MODULE CHMSAVPOS (				! Save the current buffer position
		IDENT = '1-003'			! File: CHMSAVPOS.BLI Edit: GB1003
		) =
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 saves the current buffer position in a
!	position block.
!
! 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_BUFPOS  from module CHANGE.BLI.
! 1-002	- Regularize headers.  JBS 03-Mar-1981
! 1-003 - Cope with bigger than 7 bit bytes in line buffer.  GB 3-Mar-1983
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$SAV_BUFPOS : NOVALUE;			! Save the current buffer position

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$SAV_BUFPOS  - save the current buffer position'

GLOBAL ROUTINE EDT$$SAV_BUFPOS (		! Save the current buffer position
	POS					! the position block in which to save
    ) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine saves the current buffer position in a position block.
!
! FORMAL PARAMETERS:
!
!  POS			The position block in which the current buffer position
!			is to be saved
!
! IMPLICIT INPUTS:
!
!	CUR_BUF
!	LN_BUF
!	LN_PTR
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$RPL_CHGDLN;			! Declare current line as changed

    EXTERNAL
	CUR_BUF : REF TBCB_BLOCK,	! The current buffer tbcb
	LN_BUF,				! Current line buffer
	LN_PTR;				! Current character pointer

    MAP
	POS : REF POS_BLOCK;

!+
! Update the current line if necessary.
!-
    EDT$$RPL_CHGDLN ();
    EDT$$CPY_MEM (POS_SIZE, .CUR_BUF, .POS);
    POS [POS_CHAR_POS] = CH$DIFF (.LN_PTR, CH$PTR (LN_BUF, 0, BYTE_SIZE));
    END;


END
ELUDOM