Trailing-Edge
-
PDP-10 Archives
-
bb-r775c-bm_tops20_ks_upd_3
-
sources/scrmcol.bli
There are 10 other files named scrmcol.bli in the archive. Click here to see a list.
%TITLE 'SCRMCOL - match column'
MODULE SCRMCOL ( ! Match column
IDENT = '3-001' ! File: SCRMCOL.BLI Edit: GB3001
) =
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:
!
! This module fixes up the column after a vertical move.
!
! 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_MATCHCOL from module SCREEN.
! 1-002 - Regularize headers. JBS 13-Mar-1981
! 1-003 - Don't use the screen data base, since the current line may not
! be on the screen. JBS 10-Sep-1982
! 1-004 - Remove references to globals that aren't there. SMB 22-Sep-1982
!--
%SBTTL 'Declarations'
!
! TABLE OF CONTENTS:
!
REQUIRE 'EDTSRC:TRAROUNAM';
FORWARD ROUTINE
EDT$$SC_MATCHCOL : NOVALUE;
!
! INCLUDE FILES:
!
REQUIRE 'EDTSRC:EDTREQ';
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
! NONE
!
! OWN STORAGE:
!
! NONE
!
! EXTERNAL REFERENCES:
!
! In the routine
%SBTTL 'EDT$$SC_MATCHCOL - match column'
GLOBAL ROUTINE EDT$$SC_MATCHCOL ! Match column
: NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! Match column. This routine is called when a vertical arrow has been used to
! move the cursor. We have already moved to the new line, now we will try to
! match the column we were previously in. The column we are trying to hit is
! COL . We start at the beginning of the line and keep moving
! forward by a character until the next character would cause the column to exceed
! COL .
!
! FORMAL PARAMETERS:
!
! NONE
!
! IMPLICIT INPUTS:
!
! COL
! LN_BUF
! LN_END
!
! IMPLICIT OUTPUTS:
!
! CUR_COL
! LN_PTR
! CS_LNO
!
! 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.
CUR_COL, ! current cursor column
LN_BUF, ! Current line buffer.
LN_PTR, ! Current character pointer.
LN_END; ! End of current line pointer.
LOCAL
NEXT_COL;
LN_PTR = CH$PTR (LN_BUF,, BYTE_SIZE);
CUR_COL = 0;
NEXT_COL = 0;
WHILE CH$PTR_NEQ (.LN_END, .LN_PTR) DO
BEGIN
NEXT_COL = .NEXT_COL + EDT$$FMT_CHWID (CH$RCHAR (.LN_PTR), .NEXT_COL);
IF (.NEXT_COL GTR .COL) THEN EXITLOOP;
LN_PTR = CH$PLUS (.LN_PTR, 1);
CUR_COL = .NEXT_COL;
END;
END; ! of routine EDT$$SC_MATCHCOL
!<BLF/PAGE>
END ! of module EDT$SCRMCOL
ELUDOM