Trailing-Edge
-
PDP-10 Archives
-
BB-AE97C-BM
-
sources/scrrelpos.bli
There are 10 other files named scrrelpos.bli in the archive. Click here to see a list.
%TITLE 'SCRRELPOS - compare current position to specified position'
MODULE SCRRELPOS ( ! Compare current position to specified position
IDENT = '1-002' ! File: SCRRELPOS.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:
!
! This module compares the current position to a specified position.
!
! ENVIRONMENT: Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: September 8, 1979
!
! MODIFIED BY:
!
! 1-001 - Original. DJS 12-Feb-1981. This module was created by
! extracting the routine REL_POS from module SCREEN.
! 1-002 - Regularize headers. JBS 13-Mar-1981
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SC_CMPPOS;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SC_CMPPOS - compare current position to selected position'
GLOBAL ROUTINE EDT$$SC_CMPPOS ( ! Compare current position to selected position
CP, ! Current column
TESTL, ! Model line
TESTP ! Model column
) =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine compares the current position in the buffer to a
! specified position and returns -1, or 1 depending on their relation.
!
! FORMAL PARAMETERS:
!
! CP The current position, assumed to be on the current line
!
! TESTL The model line
!
! TESTP The model position, on the model line
!
! IMPLICIT INPUTS:
!
! CUR_BUF
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! -1 = model position is before the current position
! +1 = model position is on or after the current position
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$CMP_LNO;
EXTERNAL
CUR_BUF : REF TBCB_BLOCK; ! The current buffer tbcb.
LOCAL
COMP;
COMP = EDT$$CMP_LNO (CUR_BUF [TBCB_CUR_LIN], .TESTL);
IF (.COMP EQL 0)
THEN
IF CH$PTR_LSS (.CP, .TESTP) THEN RETURN (-1) ELSE RETURN (1)
ELSE
RETURN (.COMP);
END;
END
ELUDOM