Google
 

Trailing-Edge - PDP-10 Archives - bb-r775c-bm_tops20_ks_upd_3 - sources/lnonctg.bli
There are 10 other files named lnonctg.bli in the archive. Click here to see a list.
 %TITLE 'LNONCTG - test for non-contiguous range'
MODULE LNONCTG (				! Test for non-contiguous range
		IDENT = '1-003'			! File: LNONCTG.BLI Edit: JBS1003
		) =
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:
!
!	Test for a non-contiguous range.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: February 3, 1978
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 10-MAR-81.  This module was created by
!	extracting the routine EDT$$TST_NONCNTGRNG  from EXEC.BLI.
! 1-002	- Regularize headers.  JBS 20-Mar-1981
! 1-003	- Use new message codes.  JBS 04-Aug-1981
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$TST_NONCNTGRNG;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$TST_NONCNTGRNG  - test for non-contiguous range'

GLOBAL ROUTINE EDT$$TST_NONCNTGRNG (		! Test for non-contiguous range
	RANGE					! The range to test
    ) =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine takes a range node and determines whether or not it
!	defines a contiguous range.  The range is non-contiguous if it is
!	a ALL or if the next range field is non-zero, indicating and AND.
!
! FORMAL PARAMETERS:
!
!  RANGE		The range to test
!
! IMPLICIT INPUTS:
!
!	NONE
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	0 = range is contiguous, 1 = range is non-contiguous
!
! SIDE EFFECTS:
!
!	Prints a message if the range is non-contiguous.
!	Calls itself recursively if the range refers to a buffer.
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$FMT_MSG;

    MESSAGES ((RANNONCON));

    MAP
	RANGE : REF NODE_BLOCK;

    IF ((.RANGE [RAN_TYPE] EQL RAN_ALL) OR (.RANGE [NEXT_RANGE] NEQ 0))
    THEN
	BEGIN
	EDT$$FMT_MSG (EDT$_RANNONCON);
	RETURN (1);
	END
    ELSE
!+
! If is is a buffer range, we better look at the range below it.
!-

	IF (.RANGE [RAN_TYPE] EQL RAN_BUFFER)
	THEN
	    RETURN (EDT$$TST_NONCNTGRNG (.RANGE [RANGE1]))
	ELSE
	    RETURN (0);

    END;


END
ELUDOM