Google
 

Trailing-Edge - PDP-10 Archives - BB-H138F-BM_1988 - 7-sources/chmenttrm.bli
There are 11 other files named chmenttrm.bli in the archive. Click here to see a list.
 %TITLE 'CHMENTTRM - test for entity delimiter'
MODULE CHMENTTRM (				! Test for entity delimiter
		IDENT = '3-002'			! File: CHMENTTRM.BLI Edit: CJG3002
		) =
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 determines if the current character is an
!	entity delimiter.
!
! 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$$TST_ENTDELIM  from module CHANGE.BLI.
! 1-002	- Regularize headers.  JBS 02-Mar-1981
! 3-001 - Change code to handle different format entities.  GB 7-Apr-1983
! 3-002 - Modify loop to improve speed. CJG 29-Jun-1983
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$TST_ENTDELIM;				! Determine if the current character is an entity delimiter

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$TST_ENTDELIM  - test for entity delimiter'

GLOBAL ROUTINE EDT$$TST_ENTDELIM (		! Test for entity delimiter
	TERM_STRING				! Counted string of delimiter characters
    ) =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This function returns a 1 if the current character is an entity delimiter.
!
! FORMAL PARAMETERS:
!
!  TERM_STRING 		a counted string of valid delimiter characters
!
! IMPLICIT INPUTS:
!
!	LN_PTR
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	1		Character is a delimiter
!	0		Character is not a delimiter
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL
	LN_PTR;				! Current character pointer

    LOCAL
	NT,
	CH,
	TS;

    TS = CH$PTR (.TERM_STRING + 1,, BYTE_SIZE);
    NT = ..TERM_STRING;
    CH = CH$RCHAR (.LN_PTR);

    DECR I FROM .NT - 1 TO 0 DO

	IF (.CH EQL CH$RCHAR_A (TS)) THEN RETURN (1);

    RETURN (0);
    END;


END
ELUDOM