Trailing-Edge
-
PDP-10 Archives
-
BB-R775E-BM
-
sources/edt/chmchgc.bli
There are 11 other files named chmchgc.bli in the archive. Click here to see a list.
%TITLE 'CHMCHGC - change case'
MODULE CHMCHGC ( ! Change case
IDENT = '3-003' ! File: CHMCHGC.BLI Edit: CJG3003
) =
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 executes the change mode commands
! CHGC, CHGU, and CHGL.
!
! 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 PROCESS_CHGC from routine CHANGE.BLI.
! 1-002 - Regularize headers. JBS 27-Feb-1981
! 1-003 - Fix module name. JBS 02-Mar-1981
! 1-004 - Use the ASSERT macro. JBS 01-Jun-1981
! 1-005 - Change the alphabetic test logic. JBS 19-Jul-1982
! 1-006 - New screen update logic. JBS 13-Sep-1982
! 1-007 - Add conditionals for WPS and VT220 support. JBS 10-FEB-1983
! 3-001 - Add updates from V3 sources. GB 26-Apr-1983
! 3-002 - Remove VT220 conditional to speed up code. CJG 25-Nov-1983
! 3-003 - Modify ASSERT macro to include error code. CJG 30-Jan-1984
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
LIBRARY 'EDTSRC:TRANSLATE';
FORWARD ROUTINE
EDT$$CHG_CAS : NOVALUE; ! Process the changecase commands
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$CHG_CAS - change case'
GLOBAL ROUTINE EDT$$CHG_CAS ( ! Change case
FC, ! first character
LC ! last character
) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This is the processing routine for the changecase commands.
! This routine is called by the process lines command
! for each line of the selected text.
!
! FORMAL PARAMETERS:
!
! FC First character position to process
!
! LC Last character position to process
!
! IMPLICIT INPUTS:
!
! CAS_TYP
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL
CAS_TYP,
CHAR_INFO : BLOCKVECTOR [256, 1]; ! Information about charactere
LOCAL
CHAR,
CP;
CP = .FC;
WHILE CH$PTR_NEQ (.CP, .LC) DO
BEGIN
IF .CHAR_INFO [CH$RCHAR (.CP), CI_LET] ! If this is a letter
THEN
CASE .CAS_TYP FROM CASE_K_CHGC TO CASE_K_CHGL OF
SET
[CASE_K_CHGC] :
!+
! Invert case
!-
CH$WCHAR (CH$RCHAR (.CP) XOR %O'40', .CP);
[CASE_K_CHGU] :
!+
! Force to upper case
!-
CH$WCHAR (CH$RCHAR (.CP) AND ( NOT %O'40'), .CP);
[CASE_K_CHGL] :
!+
! Force to lower case
!-
CH$WCHAR (CH$RCHAR (.CP) OR %O'40', .CP);
[OUTRANGE] :
ASSERT (3, 0);
TES;
CP = CH$PLUS (.CP, 1);
END;
END; ! of routine EDT$$CHG_CAS
!<BLF/PAGE>
END ! of module EDT$CHMCHGC
ELUDOM