Trailing-Edge
-
PDP-10 Archives
-
bb-r775d-bm_tops20_ks_upd_4
-
sources/usstring.bli
There are 10 other files named usstring.bli in the archive. Click here to see a list.
%TITLE 'USSTRING - set search string'
MODULE USSTRING ( ! Set search string
IDENT = '1-007' ! File: USSTRING.BLI Edit: GB1007
) =
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:
!
! Set up the current search string.
!
! ENVIRONMENT: Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: February 7, 1978
!
! MODIFIED BY:
!
! 1-001 - Original. DJS 19-FEB-1981. This module was created by
! extracting routine EDT$$SET_SEASTR from module UTIL.
! 1-002 - Regularize headers and don't store into the parameter list. This change
! saves one word on the PDP-11. JBS 11-Mar-1981
! 1-003 - Change the check for edt$$exct_match to consider wps. STS 02-Oct-1981
! 1-004 - Add an error return. JBS 04-May-1982
! 1-005 - Allow 0-length strings. JBS 05-May-1982
! 1-006 - Don't upcase the search string; the match condition may be changed
! before the string is used for the last time. JBS 16-Jul-1982
! 1-007 - Call CPY_STR with string pointers not addresses. GB 21-Mar-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SET_SEASTR;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SET_SEASTR - set up search string'
GLOBAL ROUTINE EDT$$SET_SEASTR ( ! Set up search string
STRING, ! Pointer to new search string
LEN ! Its length
) =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine sets up the search current search string. If the parameter
! is zero in length, the current search string is kept.
!
! FORMAL PARAMETERS:
!
! STRING Pointer to the new search string.
!
! LEN Length of the new search string.
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! SEA_STR
! SEA_STRLEN
!
! ROUTINE VALUE:
!
! 1 = success
! 0 = invalid string
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL
SEA_STR : BLOCK [CH$ALLOCATION (64, BYTE_SIZE)], ! Last search string.
SEA_STRLEN; ! Length of above.
LOCAL
RET_VALUE;
IF ((.LEN GTR 0) AND (.LEN LEQ 64))
THEN
BEGIN
EDT$$CPY_STR (.LEN, .STRING, CH$PTR (SEA_STR,, BYTE_SIZE));
SEA_STRLEN = .LEN;
RET_VALUE = 1;
END
ELSE
IF (.LEN EQL 0) THEN RET_VALUE = 1 ELSE RET_VALUE = 0;
RETURN (.RET_VALUE);
END; ! of routine EDT$$SET_SEASTR
END
ELUDOM