Google
 

Trailing-Edge - PDP-10 Archives - BB-H138F-BM_1988 - 7-sources/tiecho.bli
There are 10 other files named tiecho.bli in the archive. Click here to see a list.
 %TITLE 'TIECHO - echo a character'
MODULE TIECHO (				! Echo a character
		IDENT = '3-001'			! File: TIECHO.BLI Edit: GB3001
		) =
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:
!
!	Echo a character on the echo line.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: June 9, 1979
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 18-FEB-1981.  This module was created by
!	extracting routine EDT$$TI_ECHOCH  from module TINPUT.
! 1-002	- Regularized headers.  JBS 24-Feb-1981
! 1-003	- Fix module name.  JBS 11-Mar-1981
! 1-004 - Modify for new error message coordination.  SMB 24-Jun-1982
! 1-005	- Don't update EDT$$G_PRV_COL, EDT$$FMT_CH is maintaining it.  JBS 05-Oct-1982
! 3-001 - Add updates from V3 sources. GB 03-May-1983
!--

%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$TI_ECHOCH : NOVALUE;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$TI_ECHOCH  - echo a character'

GLOBAL ROUTINE EDT$$TI_ECHOCH (			! Echo a character
    C						! Character to echo
    ) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	Echo a character on the echo line.  If the character is a control character
!	it is echoed as ^letter.  The echo flag is set to indicate that the line
!	will need to be erased in the future.
!
! FORMAL PARAMETERS:
!
!  C 			the character to be echoed.
!
! IMPLICIT INPUTS:
!
!	TIN_ECHOFLG
!	TIN_ECHOPOS
!
! IMPLICIT OUTPUTS:
!
!	TIN_ECHOFLG
!	TIN_ECHOPOS
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$FMT_CH,
	EDT$$OUT_FMTBUF,
	EDT$$SC_POSCSIF;

    EXTERNAL
	KPAD,				! Are we in Keypad mode
	MESSAGE_LINE,			! Echo line
	TIN_ECHOFLG,			! Flag indicating character have been echoed
	TIN_ECHOPOS;			! Position on the echo line

    IF (.TIN_ECHOFLG EQL 0)
    THEN
!+
! For nokeypad commands do the echoing on the first message line
! otherwise echo on the last message line.
!-

	IF ( NOT .KPAD)
	THEN
	    EDT$$SC_POSCSIF (.MESSAGE_LINE, .TIN_ECHOPOS)
	ELSE
	    EDT$$SC_POSCSIF (.MESSAGE_LINE + 1, .TIN_ECHOPOS);

    IF (.C LSS %C' ')
    THEN
	BEGIN
	EDT$$FMT_CH (%C'^');
	TIN_ECHOPOS = .TIN_ECHOPOS + 1;
	C = .C + %C'@';
	END;

    EDT$$FMT_CH (.C);
    EDT$$OUT_FMTBUF ();
    TIN_ECHOPOS = .TIN_ECHOPOS + 1;
    TIN_ECHOFLG = 1;
    END;


END
ELUDOM