Trailing-Edge
-
PDP-10 Archives
-
BB-H138E-BM
-
6-1-sources/ussubs.bli
There are 10 other files named ussubs.bli in the archive. Click here to see a list.
%TITLE 'USSUBS - set up search and substitute strings'
MODULE USSUBS ( ! Set up search and substitute strings
IDENT = '1-005' ! File: USSUBS.BLI Edit: GB1005
) =
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 search and substitute strings.
!
! 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_SEASUBSTR from module UTIL.
! 1-002 - Regularize headers and don't store into the parameter list. JBS 11-Mar-1981
! 1-003 - Add an error return. JBS 04-May-1982
! 1-004 - Allow 0-length substitute strings. JBS 09-Jun-1982
! 1-005 - Call CPY_STR with string pointers. GB 21-Mar-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SET_SEASUBSTR;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SET_SEASUBSTR - set up search and substitute strings'
GLOBAL ROUTINE EDT$$SET_SEASUBSTR ( ! Set up search and substitute strings
SEARCH, ! Address of new search string
SLEN, ! Its length
SUBSTR, ! Address of new substitute string
SUBLEN ! Its length
) =
!++
! FUNCTIONAL DESCRIPTION:
!
! Set-up the the search and substitute strings.
!
! FORMAL PARAMETERS:
!
! SEARCH Pointer to the new search string
!
! SLEN Length of the search string.
!
! SUBSTR Pointer to the new substitute string.
!
! SUBLEN Length of substitute string.
!
! IMPLICIT INPUTS:
!
! SUB_STR
! SUB_STRLEN
!
! IMPLICIT OUTPUTS:
!
! SUB_STR
! SUB_STRLEN
!
! ROUTINE VALUE:
!
! 1 = success
! 0 = invalid string
!
! SIDE EFFECTS:
!
! Calls EDT$$SET_SEASTR to set up the search string.
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$SET_SEASTR;
EXTERNAL
SUB_STR : BLOCK [CH$ALLOCATION (64, BYTE_SIZE)], ! Last substitute string.
SUB_STRLEN; ! Length of above.
LOCAL
RET_VALUE;
IF ((.SUBLEN GEQ 0) AND (.SUBLEN LEQ 64))
THEN
BEGIN
RET_VALUE = EDT$$SET_SEASTR (.SEARCH, .SLEN);
IF .RET_VALUE
THEN
BEGIN
EDT$$CPY_STR (.SUBLEN, .SUBSTR, CH$PTR (SUB_STR,, BYTE_SIZE));
SUB_STRLEN = .SUBLEN;
END;
END
ELSE
RET_VALUE = 0;
RETURN (.RET_VALUE);
END; ! of routine EDT$$SET_SEASUBSTR
END
ELUDOM