Trailing-Edge
-
PDP-10 Archives
-
BB-AE97C-BM
-
sources/chmginstr.bli
There are 11 other files named chmginstr.bli in the archive. Click here to see a list.
%TITLE 'CHMGINSTR - scan an insert command string'
MODULE CHMGINSTR ( ! Scan an insert command string
IDENT = '1-004' ! File: CHMGINSTR.BLI Edit: GB1004
) =
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 string of characters to be inserted
! by an insert command.
!
! 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_INSSTR from module CHANGE.BLI.
! 1-002 - Regularize headers. JBS 02-Mar-1981
! 1-003 - Add a return value to indicate end of journal file. JBS 02-Oct-1981
! 1-004 - Change CMD_BUF to CMD_PTR. GB 09-Mar-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SCAN_INSSTR; ! Scan over the string of characters to be inserted
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SCAN_INSSTR - scan an insert command'
GLOBAL ROUTINE EDT$$SCAN_INSSTR ! Scan an insert command
=
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine scans over the string of characters to be inserted by
! an insert command.
!
! An insert string is delimited by either a CTRL/Z character, or the printable
! equivalent of ^Z or ^z.
!
! The command pointer CMD_PTR is left pointing one character beyond the command.
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! CMD_END
! CMD_PTR
!
! IMPLICIT OUTPUTS:
!
! CMD_PTR
! SEA_LEN
!
! ROUTINE VALUE:
!
! 1 = ok, 0 = end of journal file
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$INS_MOD; ! Process no-keypad insertion
EXTERNAL
CMD_END, ! End of command pointer
CMD_PTR, ! Command string pointer
SEA_LEN; ! Length of search string.
LOCAL
SUCCEED;
SUCCEED = 1;
SEA_LEN = 0;
WHILE 1 DO
BEGIN
IF CH$PTR_EQL (.CMD_PTR, .CMD_END)
THEN
BEGIN
SUCCEED = EDT$$INS_MOD ();
EXITLOOP;
END;
IF (CH$RCHAR (.CMD_PTR) EQL ASC_K_CTRL_Z)
THEN
BEGIN
CMD_PTR = CH$PLUS (.CMD_PTR, 1);
EXITLOOP;
END;
IF ((CH$RCHAR (.CMD_PTR) EQL %C'^') AND !
((CH$RCHAR (CH$PLUS (.CMD_PTR, 1)) EQL %C'Z') OR !
(CH$RCHAR (CH$PLUS (.CMD_PTR, 1)) EQL %C'z')))
THEN
BEGIN
CMD_PTR = CH$PLUS (.CMD_PTR, 2);
EXITLOOP;
END;
CMD_PTR = CH$PLUS (.CMD_PTR, 1);
SEA_LEN = .SEA_LEN + 1;
END;
RETURN (.SUCCEED);
END;
END
ELUDOM