Google
 

Trailing-Edge - PDP-10 Archives - bb-r775e-bm_tops20_ks_upd_5 - sources/edt/paudit.bli
There are 10 other files named paudit.bli in the archive. Click here to see a list.
 %TITLE 'PAUDIT - write a journal file record'
MODULE PAUDIT (				! Write a journal file record
		IDENT = '3-003'			! File: PAUDIT.BLI Edit: GB3003
		) =
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:
!
!	Write a journal file record.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: 6-AUG-1979
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 18-FEB-1981.  This module was created by
!	extracting routine EDT$$JOU_PUTREC  from module EDTCTR.
! 1-002	- Regularize headers and fix file name.  JBS 04-Mar-1981
! 1-003 - Switch to using edt$fileio for i/o. STS 15-Jan-1982
! 1-004 - Remove call to edt$$flush_obuf. STS 10-Feb-1982
! 1-005 - Add literals for callable EDT. STS 10-Mar-1982
! 1-006	- Change JOU to OPTIONS.  JBS 18-Mar-1982
! 1-007 - Make use of bit masks in options word. STS 17-Aug-1982
! 1-008	- Fix the references to the EDT$M_ symbols.  JBS 23-Aug-1982
! 1-009 - Don't do a str$copy for puts. STS 10-Nov-1982
! 3-001 - Change call to CALLFIO. CJG 19-Apr-1983
! 3-002 - Add updates from V3 sources.  GB 03-May-1983
! 3-003 - Remove call to EDT$$CALLFIO. CJG 10-Jun-1983
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

REQUIRE 'SYS:JSYS';

FORWARD ROUTINE
    EDT$$JOU_PUTREC : NOVALUE;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$JOU_PUTREC  - write a record in the journal file'

GLOBAL ROUTINE EDT$$JOU_PUTREC (		! Write a record in the journal file
    LINE, 					! Address of the record
    LEN						! Length of the record
    ) : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	Write a record in the journal file.
!
! FORMAL PARAMETERS:
!
!  LINE			Address of the record
!
!  LEN			Length of the record
!
! IMPLICIT INPUTS:
!
!	JOU
!
! IMPLICIT OUTPUTS:
!
!	INP_CNT
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$SC_RESET,
	EDT$$SYS_EXI,
	EDT$$TI_RES,
	EDT$FILEIO;

    EXTERNAL
	ERR_NUMBER,
	TI_RESET,
	OPTIONS : BITVECTOR [36];	! options; bit 2 = /NOJOURNAL

    EXTERNAL LITERAL
	EDT$M_NOJOURNAL,
	EDT$K_PUT,
	EDT$K_JOURNAL_FILE;

    LOCAL
	FILE_DESC : BLOCK [1];

    MESSAGES ((EDITORABO))

    IF ((.OPTIONS AND EDT$M_NOJOURNAL) NEQ 0) THEN RETURN;

    FILE_DESC[DSC$W_LENGTH] = .LEN;
    FILE_DESC[DSC$A_POINTER] = .LINE;

    IF (NOT EDT$FILEIO (EDT$K_PUT, EDT$K_JOURNAL_FILE, FILE_DESC))
    THEN
	BEGIN
!+
! Fatal error, reset the terminal to its original state
!-

	IF (.TI_RESET) THEN EDT$$SC_RESET ();
!+
! Output a suitable message and exit
!-

	EDT$$TI_RES ();
	_PSOUT (CH$PTR (UPLIT (%ASCIZ '?Fatal error writing to journal file -')));
	_PSOUT (CH$PTR (UPLIT (%CHAR (ASC_K_CR, ASC_K_LF, 0))));
	_ERSTR ($PRIOU, FLD ($FHSLF, FLD_LHS) + (.ERR_NUMBER AND FLD_RHS), 0);
	_PSOUT (CH$PTR (UPLIT (%CHAR (ASC_K_CR, ASC_K_LF, 0))));
	_PSOUT (CH$PTR (UPLIT (%ASCIZ 'After correcting the problem use EDT/RECOVER to recover your edit.')));
	EDT$$SYS_EXI (EDT$_EDITORABO);
	END;
    END;


END
ELUDOM