Trailing-Edge
-
PDP-10 Archives
-
bb-h138f-bm
-
7-sources/titypahd.bli
There are 10 other files named titypahd.bli in the archive. Click here to see a list.
%TITLE 'TITYPAHD - check for type ahead'
MODULE TITYPAHD ( ! Check for type ahead
IDENT = '1-002' ! File: TITYPAHD.BLI Edit: JBS1002
) =
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:
!
! Check for type ahead.
!
! 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_TSTTYAHED from module TINPUT.
! 1-002 - Regularize headers. JBS 11-Mar-1981
! 1-003 - Revise typeahead logic. JBS 02-Sep-1982
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$TI_TSTTYAHED;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$TI_TSTTYAHED - check for type ahead'
GLOBAL ROUTINE EDT$$TI_TSTTYAHED ! Check for type ahead
=
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine checks to see if a character was typed ahead. If we
! are in recovery mode, always return false. If the type-ahead counter
! is greater than 0, return true, and if not, try to read a type-ahead character
! and if it is read, place it in the type-ahead buffer and return true.
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! RCOV_MOD
! RDAHED
!
! IMPLICIT OUTPUTS:
!
! RDAHEDBF
! RDAHED
!
! ROUTINE VALUE:
!
! 0 = no type ahead
! 1 = there was type ahead
!
! SIDE EFFECTS:
!
! NONE
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$TI_RDTYAHED;
EXTERNAL
RCOV_MOD, ! Recovery mode flag
RDAHED, ! Type ahead counter
RDAHEDBF; ! Text from type-ahead
IF .RCOV_MOD THEN RETURN (0);
IF (.RDAHED GTR 0) THEN RETURN (1);
RDAHED = EDT$$TI_RDTYAHED (RDAHEDBF);
IF (.RDAHED GTR 0) THEN RETURN (1) ELSE RETURN (0);
END;
END
ELUDOM