Google
 

Trailing-Edge - PDP-10 Archives - bb-h138f-bm - 7-sources/tiauto.bli
There are 10 other files named tiauto.bli in the archive. Click here to see a list.
 %SBTTL 'TIAUTO - enable auto-repeat'
MODULE TIAUTO (				! Enable auto-repeat
		IDENT = '1-006'			! File: TIAUTO.BLI Edit: JBS1006
		) =
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:
!
!	This module enables the auto-repeat VT100 function.
!
! 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_ENBLAUTREP  from module TINPUT.
! 1-002	- Regularized the headers.  JBS 24-Feb-1981
! 1-003	- Fix module name.  JBS 10-Mar-1981
! 1-004	- Adjust the flag even if nothing is sent to the terminal.
!	   JBS 30-Jan-1982
! 1-005	- Add a parameter, to turn autorepeat on or off.  JBS 30-Jan-1982
! 1-006	- Use ENB_AUTRPT to suppress actually sending the control
!	   sequences.  JBS 09-Feb-1982
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$TI_ENBLAUTREP : NOVALUE;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!

BIND
    AUTO_REPT = UPLIT (%STRING (%CHAR (ASC_K_ESC), '[?8h')),
    NO_REPT = UPLIT (%STRING (%CHAR (ASC_K_ESC), '[?8l'));

LITERAL
    AUTO_REPT_LENGTH = 5,
    NO_REPT_LEN = 5;

!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$TI_ENBLAUTREP  - enable auto-repeat'

GLOBAL ROUTINE EDT$$TI_ENBLAUTREP (		! Enable auto-repeat
    MODE					! 1 = turn on, 0 = turn off
    ) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine turns auto repeat on and off, if possible.
!
! FORMAL PARAMETERS:
!
!  MODE		1 = turn autorepeat on, 0 = turn autorepeat off
!
! IMPLICIT INPUTS:
!
!	TI_TYP
!	K_AUTRPT
!	ENB_AUTRPT
!
! IMPLICIT OUTPUTS:
!
!	K_AUTRPT
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$FMT_LIT;				! Send a string to the terminal

    EXTERNAL
	TI_TYP,				! Terminal type
	ENB_AUTRPT,			! 1 = send control sequences, 0 = don't
	K_AUTRPT;			! Auto repeat flag

    CASE .MODE FROM 0 TO 1 OF
	SET

	[0] :
	    BEGIN
!+
! Turn autorepeat off
!-

	    IF ((.TI_TYP EQL TERM_VT100) AND (.K_AUTRPT EQL 1) AND .ENB_AUTRPT)
	    THEN
		EDT$$FMT_LIT (CH$PTR (NO_REPT), NO_REPT_LEN);

	    K_AUTRPT = 0;
	    END;

	[1] :
	    BEGIN
!+
! Turn autorepeat on
!-

	    IF ((.TI_TYP EQL TERM_VT100) AND (.K_AUTRPT EQL 0) AND .ENB_AUTRPT)
	    THEN
		EDT$$FMT_LIT (CH$PTR (AUTO_REPT), AUTO_REPT_LENGTH);

	    K_AUTRPT = 1;
	    END;
	TES;

    RETURN;
    END;					! of routine EDT$$TI_ENBLAUTREP


END
ELUDOM