Google
 

Trailing-Edge - PDP-10 Archives - BB-H138F-BM_1988 - 7-sources/ucvtcase.bli
There are 10 other files named ucvtcase.bli in the archive. Click here to see a list.
 %TITLE 'UCVTCASE - convert to upper case'
MODULE UCVTCASE (				! Convert to upper case
		IDENT = '3-001'			! File: UCVTCASE.BLI Edit: CJG3001
		) =
BEGIN
!COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1981, 1988.  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 THAT IS NOT SUPPLIED BY DIGITAL.
!
!
!++
! FACILITY:	EDT -- The DEC Standard Editor
!
! ABSTRACT:
!
!	Convert a character string to upper case.
!
! 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$$CNV_UPC  from module UTIL.
! 1-002	- Regularized headers.  JBS 25-Feb-1981
! 1-003	- Fix module name.  JBS 11-Mar-1981
! 1-004	- Support DEC Multinational character set.  JBS 16-Jul-1982
! 1-005	- Do the conversion by subtracting 32 rather than looking
!	   in a table, to make this module fit better on the PDP-11.
!	   JBS 23-Aug-1982
! 1-006	- Add VT220 support conditional.  JBS 11-Feb-1983
! 3-001 - Remove VT220 conditional to speed up code. CJG 25-Nov-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$CNV_UPC : NOVALUE;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

LIBRARY 'EDTSRC:TRANSLATE';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	NONE
%SBTTL 'EDT$$CNV_UPC  - convert to upper case'

GLOBAL ROUTINE EDT$$CNV_UPC (			! Convert to upper case
    STRING, 					! Pointer to the string to convert
    LEN						! Length of that string
    ) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine converts a character string to upper case in place.
!	Because source and destination overlay we cannot use CH$TRANSLATE.
!
! FORMAL PARAMETERS:
!
!  STRING		Pointer to the string.
!
!  LEN			Length of the string.
!
! IMPLICIT INPUTS:
!
!	NONE
!
! IMPLICIT OUTPUTS:
!
!	NONE
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL
	CHAR_INFO : BLOCKVECTOR [256, 1];	! Information about characters

    LOCAL
	C,
	P;

    P = .STRING;

    INCR I FROM 1 TO .LEN DO
	BEGIN
	C = CH$RCHAR (.P);

	IF .CHAR_INFO [.C, CI_LC] THEN C = .C - %C'a' + %C'A';

	CH$WCHAR_A (.C, P);
	END;

    END;					! of routine EDT$$CNV_UPC

!<BLF/PAGE>
END						! of module EDT$UCVTCASE

ELUDOM