Google
 

Trailing-Edge - PDP-10 Archives - bb-h138f-bm - 7-sources/scrncol.bli
There are 10 other files named scrncol.bli in the archive. Click here to see a list.
 %TITLE 'SCRNCOL - compute new column position'
MODULE SCRNCOL (				! Compute new column position
		IDENT = '3-001'			! File: SCRNCOL.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:
!
!	This module computes a new column position for vertical moves.
!
! ENVIRONMENT:	Runs at any access mode - AST reentrant
!
! AUTHOR: Bob Kushlis, CREATION DATE: September 8, 1979
!
! MODIFIED BY:
!
! 1-001	- Original.  DJS 12-Feb-1981.  This module was created by
!	extracting the routine EDT$$SC_CPUNEWCOLPOS  from module SCREEN.
! 1-002	- Regularize headers.  JBS 13-Mar-1981
! 1-003	- Avoid using the screen data base, since the current line may not
!	   be on the screen.  JBS 10-Sep-1982
! 3-001 - Add updates from V3 sources.  GB 03-May-1983
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!

REQUIRE 'EDTSRC:TRAROUNAM';

FORWARD ROUTINE
    EDT$$SC_CPUNEWCOLPOS : NOVALUE;

!
! INCLUDE FILES:
!

REQUIRE 'EDTSRC:EDTREQ';

!
! MACROS:
!
!	NONE
!
! EQUATED SYMBOLS:
!
!	NONE
!
! OWN STORAGE:
!
!	NONE
!
! EXTERNAL REFERENCES:
!
!	In the routine
%SBTTL 'EDT$$SC_CPUNEWCOLPOS  - compute new column position'

GLOBAL ROUTINE EDT$$SC_CPUNEWCOLPOS 		! Compute new column position
    : NOVALUE =

!++
! FUNCTIONAL DESCRIPTION:
!
!	This routine computes a new column position for vertical moves.  When
!	any command other than a vertical arrow which moves the cursor is executed
!	this procedure is called to get the new column position for vertical moves.
!	The column position is kept in COL .
!
! FORMAL PARAMETERS:
!
!	NONE
!
! IMPLICIT INPUTS:
!
!	LN_BUF
!	LN_PTR
!
! IMPLICIT OUTPUTS:
!
!	COL
!
! ROUTINE VALUE:
!
!	NONE
!
! SIDE EFFECTS:
!
!	NONE
!
!--

    BEGIN

    EXTERNAL ROUTINE
	EDT$$FMT_CHWID;				! Compute the width of a character

    EXTERNAL
	COL,				! The column we should be on.
	LN_BUF,				! Current line buffer.
	LN_PTR;				! Current character pointer.

    LOCAL
	COL_POINT;

    COL_POINT = CH$PTR (LN_BUF,, BYTE_SIZE);
    COL = 0;

    WHILE CH$PTR_NEQ (.COL_POINT, .LN_PTR) DO
	COL = .COL + EDT$$FMT_CHWID (CH$RCHAR_A (COL_POINT), .COL);

    END;					! of routine EDT$$SC_CPUNEWCOLPOS

!<BLF/PAGE>
END						! of module EDT$SCRNCOL

ELUDOM