Google
 

Trailing-Edge - PDP-10 Archives - tops20-v7-ft-dist1-clock - 7-sources/wfopnbuf.bli
There are 10 other files named wfopnbuf.bli in the archive. Click here to see a list.
 %TITLE 'WFOPNBUF - open a text buffer'
MODULE WFOPNBUF (				! Open a text buffer
		IDENT = '3-001'			! File: WFOPNBUF.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:
!
!	Open (or create) a text buffer.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: October 16, 1978
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 23-Feb-1981.  This module was created by
!	extracting routine EDT$$NEW_BUF  from module EDTWF.
! 1-002	- Regularized headers.  JBS 25-Feb-1981
! 1-003	- Fix module name.  JBS 19-Mar-1981
! 1-004 - Put edt$$wf_nxt_buk in line. STS 11-Oct-1982
!--

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

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$NEW_BUF : NOVALUE;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$NEW_BUF  - open (or create) a text buffer'

GLOBAL ROUTINE EDT$$NEW_BUF 			! Open (or create) a text buffer
    : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine opens (or creates) a text buffer.  The text buffer
!	has originally no lines, but may have an associated input file.
!	CUR_BUF  is initialized to reflect this state.
!
! FORMAL PARAMETERS:
!
!	NONE
!
! IMPLICIT INPUTS:
!
!	NONE
!
! IMPLICIT OUTPUTS:
!
!	CUR_BUF
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$WF_NEWBUK : NOVALUE,
	EDT$$RD_ILN;

    EXTERNAL
    	WK_AVAIL,
    	WK_GRTSTBUK,
	CUR_BUF : REF TBCB_BLOCK;	! Current text buffer control block

    IF .WK_AVAIL NEQ 0
    THEN
        BEGIN
    	CUR_BUF [TBCB_FIRST_BUKT] = .WK_AVAIL;
        CUR_BUF [TBCB_LAST_BUKT] = .WK_AVAIL;
    	END
    ELSE
    	BEGIN
    	CUR_BUF [TBCB_FIRST_BUKT] = .WK_GRTSTBUK;
        CUR_BUF [TBCB_LAST_BUKT] = .WK_GRTSTBUK;
    	END;
    
    EDT$$WF_NEWBUK (0, 0);
    EDT$$RD_ILN ();
    END;


END
ELUDOM