Trailing-Edge
-
PDP-10 Archives
-
DEC_CMS-20_V1.0_SRC
-
cms/sources/getlxm.bli
There are no other files named getlxm.bli in the archive.
MODULE GETLXM (
IDENT = '1',
%IF
%BLISS(BLISS32)
%THEN
LANGUAGE(BLISS32),
ADDRESSING_MODE(EXTERNAL=LONG_RELATIVE,
NONEXTERNAL=LONG_RELATIVE)
%ELSE
LANGUAGE(BLISS36)
%FI
) =
BEGIN
!
! COPYRIGHT (c) 1982 BY
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
!
! 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: CMS Library Processor
!
! ABSTRACT:
!
! Get a specified text lexeme from a string.
!
! ENVIRONMENT: VAX/VMS, DS-20
!
! AUTHOR: D. Knight , CREATION DATE: 20-Nov-78
!
!--
!
! TABLE OF CONTENTS
!
FORWARD ROUTINE
GET_LXM;
!
! INCLUDE FILES:
!
%if %bliss(bliss32) %then
library 'sys$library:starlet';
undeclare %quote $descriptor;
%fi
%if %bliss(bliss36) %then
require 'jsys:';
%fi
LIBRARY 'XPORT:';
REQUIRE 'SCONFG:';
REQUIRE 'BLISSX:';
!
! MACROS:
!
!
! EQUATED SYMBOLS:
!
!
! OWN STORAGE:
!
!
! EXTERNAL REFERENCES:
!
GLOBAL ROUTINE GET_LXM (PTR,MARK,LENGTH,BUF_PNT) =
!++
! FUNCTIONAL DESCRIPTION:
!
! Get a text lexeme from a line.
!
! FORMAL PARAMETERS:
!
! PTR - pointer into line
! MARK - lexeme terminator to be found
! LENGTH - length of line containing lexeme (remaining).
! BUF_PNT - character pointer, where to store lexeme.
!
! IMPLICIT INPUTS:
!
! NONE.
!
! IMPLICIT OUTPUTS:
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! Length of lexeme found.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
BEGIN
LOCAL
CHAR,
COUNT;
!Keep track of remaining characters
COUNT=.LENGTH;
!Assemble a single lexeme
WHILE
.COUNT NEQ 0
DO
BEGIN
!Pick up a character for comparison
CHAR=CH$RCHAR_A(.PTR);
COUNT=.COUNT-1;
!Look for end of scan
IF
.CHAR EQL .MARK
THEN
EXITLOOP;
!Save the character seen
CH$WCHAR_A(.CHAR,.BUF_PNT)
END;
!Number of characters scanned (excluding terminator)
IF
.CHAR EQL .MARK
THEN
.LENGTH-.COUNT-1
ELSE
.LENGTH-.COUNT
END; !End of GET_LXM
END !End of Module GETLXM
ELUDOM