Google
 

Trailing-Edge - PDP-10 Archives - bb-r775c-bm_tops20_ks_upd_3 - sources/chmgqustr.bli
There are 11 other files named chmgqustr.bli in the archive. Click here to see a list.
 %TITLE 'CHMGQUSTR - scan a search string'
MODULE CHMGQUSTR (				! Scan a search string
		IDENT = '1-001'			! File: CHMGQUSTR.BLI Edit: DJS1001
		) =
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 scans over the search string when used as an entity.
!
! 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$$SCAN_SEASTR  from module CHANGE.BLI.
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$SCAN_SEASTR : NOVALUE;			! Scan over the search string when used as an entity

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$SCAN_SEASTR  - scan a search string'

GLOBAL ROUTINE EDT$$SCAN_SEASTR 		! Scan a search string
    : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine scans over the search string when used as an entity.
!	The address of the string is placed in the global variable SEA_PTR
!	and the length in SEA_LEN .
!
!	The command pointer CMD_PTR  is left pointing one character beyond the
!	end of the command.
!
! FORMAL PARAMETERS:
!
!	NONE
!
! IMPLICIT INPUTS:
!
!	CMD_END
!	CMD_PTR
!
! IMPLICIT OUTPUTS:
!
!	CMD_PTR
!	SEA_PTR
!	SEA_LEN
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL
	CMD_END,				! End of command pointer
	CMD_PTR,				! Command string pointer
	SEA_PTR,				! Pointer to search string.
	SEA_LEN;				! Length of search string.

    LOCAL
	QUOTE_CHAR;

!+
! The quote character is one character back, get it so we can match.
!-
    SEA_PTR = .CMD_PTR;
    SEA_LEN = 0;
    QUOTE_CHAR = CH$RCHAR (CH$PLUS (.CMD_PTR, -1));

    WHILE ((CH$PTR_NEQ (.CMD_PTR, .CMD_END)) AND
	   (CH$RCHAR_A (CMD_PTR) NEQ .QUOTE_CHAR)) DO
	    SEA_LEN = .SEA_LEN + 1;

    END;

END
ELUDOM