Trailing-Edge
-
PDP-10 Archives
-
BB-R775E-BM
-
sources/edt/tisave.bli
There are 10 other files named tisave.bli in the archive. Click here to see a list.
%TITLE 'TISAVE - buffer a character for the journal file'
MODULE TISAVE ( ! Buffer a character for the journal file
IDENT = '3-003' ! File: TISAVE.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:
!
! Buffer a character for the journal file.
!
! 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_BUFCH from module TINPUT.
! 1-002 - Regularize headers. JBS 11-Mar-1981
! 1-003 - Change call to EDT$$TI_FLUSHJOUFI . JBS 18-Jun-1981
! 3-001 - Modify operation of journal buffer for TOPS-20. CJG 15-Jun-1983
! 3-002 - Add EDT$$TI_BUFSTR to speed up journalling. CJG 15-Jun-1983
! 3-003 - Guard against bad length in TI_BUFSTR. CJG 8-Jul-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$TI_BUFSTR : NOVALUE,
EDT$$TI_BUFCH : NOVALUE;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$TI_BUFCH - buffer a character for the journal file'
GLOBAL ROUTINE EDT$$TI_BUFCH ( ! Buffer a character for the journal file
BUF ! Character to be buffered
) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine saves a character for the journal file. If the journal
! output buffer is full, then it is written out, then the character
! is placed in the buffer.
!
! FORMAL PARAMETERS:
!
! BUF The character to be saved.
!
! IMPLICIT INPUTS:
!
! TIN_OBUF
! TIN_OBUFPOS
!
! IMPLICIT OUTPUTS:
!
! TIN_OBUFPOS
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! May write a record on the journal file.
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$TI_FLUSHJOUFI : NOVALUE;
EXTERNAL
TIN_OBUF : VECTOR [CH$ALLOCATION (256, BYTE_SIZE)], ! The journal buffer
TIN_OBUFPOS; ! Position in journal output buffer
IF (.TIN_OBUFPOS EQL 254) THEN EDT$$TI_FLUSHJOUFI (%C'T');
CH$WCHAR (.BUF, CH$PTR (TIN_OBUF, .TIN_OBUFPOS, BYTE_SIZE));
TIN_OBUFPOS = .TIN_OBUFPOS + 1;
END;
%SBTTL 'EDT$$TI_BUFSTR - buffer a string for the journal file'
GLOBAL ROUTINE EDT$$TI_BUFSTR ( ! Buffer a string for the journal file
BUF, ! Byte pointer to string
LEN ! Length of string
) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine saves a string for the journal file. If the journal
! output buffer is full, then it is written out, then the string
! is placed in the buffer.
!
! FORMAL PARAMETERS:
!
! BUF Pointer to string to save
! LEN Length of string
!
! IMPLICIT INPUTS:
!
! TIN_OBUF
! TIN_OBUFPOS
!
! IMPLICIT OUTPUTS:
!
! TIN_OBUFPOS
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS:
!
! May write a record on the journal file.
!
!--
BEGIN
EXTERNAL ROUTINE
EDT$$TI_FLUSHJOUFI : NOVALUE;
EXTERNAL
TIN_OBUF : VECTOR [CH$ALLOCATION (256, BYTE_SIZE)], ! The journal buffer
TIN_OBUFPOS; ! Position in journal output buffer
IF (.LEN LEQ 0) THEN RETURN;
IF ((.LEN + .TIN_OBUFPOS) GEQ 254) THEN EDT$$TI_FLUSHJOUFI (%C'T');
CH$MOVE (.LEN, .BUF, CH$PTR (TIN_OBUF, .TIN_OBUFPOS, BYTE_SIZE));
TIN_OBUFPOS = .TIN_OBUFPOS + .LEN;
END;
END
ELUDOM