Trailing-Edge
-
PDP-10 Archives
-
BB-K818A-BM_1981
-
sources/ednotz.for
There are no other files named ednotz.for in the archive.
C Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C operating-system-dependent switches
C Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C
C
C C O P Y R I G H T
C
C
C Copyright (C) 1980 by
C Digital Equipment Corporation, Maynard, Mass.
C
C
C This software is furnished under a license and may be used and
C copied only in accordance with the terms of such license and
C with the inclusion of the above copyright notice. This
C software or any other copies thereof may not be provided or
C otherwise made available to any other person. No title to and
C ownership of the software is hereby transferred.
C
C The information in this software is subject to change without
C notice and should not be construed as a commitment by Digital
C Equipment Corporation.
C
C DIGITAL assumes no responsibility for the use or reliability
C of its software on equipment that is not supplied by DIGITAL.
C
C define char byte
C 27+128
C w(riting) opt(ion)s come groups of 8:
C (1) replace(0)/erase(1)/complement(2)/overlay(3)
C (2) negative image 0/1
C (3) pattern < 256 bit mask (e.g. 192 = P11000000)
C >= 256 canned pattern * 256 (e.g. 512 = P2)
C if value >= 256, low 8 bits are ignored
C (4) pattern multiplier, different from 6(?)
C (5) shading flag, sim pattern+ >= 10 use char
C (6) if shading != 0 this is y reference val
C (7) pixel multiplier, 1 <= value <= 10
C (8) alternating 0/1
C (9) foreground intensity, 0 <= value <= 7
C (10) background intensity, 0 <= value <= 7
C
C offsets from gwopsp...
C Inktypes...
C Inkolors...
C Text options
C RSTSONLY define Maxgels 1000 # due to limited RAM on RSTS
C drawing primitive gels...
C attribute/marker/other gels...
C writing attribute gels : Woptbase + wopindex
C similarly topts...
C maximum # of characters in a filespec
C maximum # of characters in a command line
C max length of prompt buffer
C max number of characters in file record
C size of record buffers (Fbufsz + 1)
C include logdef
C ========================================================================
C ========================================================================
integer function ednotz ( cmd , wrtopt , prmt )
integer cmd , prmt ( 1 )
integer wrtopt ( 10 )
integer curdx , curdy , smalld , larged
integer scf , lorng , hirng
integer cname ( 75 )
common / keypad / curdx , curdy , smalld , larged , scf , lorng ,
*hirng , cname
integer edning , enterd
integer attrw , helper
C RSTSONLY define Maxnotz 64 # due to limited RAM on RSTS
integer notx ( 300 ) , noty ( 300 ) , nnotz
integer cpx , cpy
integer cls
common / cnotz / cpx , cpy , nnotz , notx , noty , cls
integer lcx , lcy
integer inch , key , c
integer noflip
integer redef
integer cnot
integer i
C string lineid lines
C string curvid curve
C string edhelp ed
integer lineid ( 6 )
integer curvid ( 6 )
integer edhelp ( 3 )
data lineid ( 1 ) , lineid ( 2 ) , lineid ( 3 ) , lineid ( 4 ) , l
*ineid ( 5 ) / 108 , 105 , 110 , 101 , 115 /
data lineid ( 6 ) / 0 /
data curvid ( 1 ) , curvid ( 2 ) , curvid ( 3 ) , curvid ( 4 ) , c
*urvid ( 5 ) / 99 , 117 , 114 , 118 , 101 /
data curvid ( 6 ) / 0 /
data edhelp ( 1 ) , edhelp ( 2 ) , edhelp ( 3 ) / 101 , 100 , 0 /
noflip = 0
edning = 1
enterd = 0
if(.not.( nnotz .le. 0 ))goto 23000
cnot = 0
goto 23001
23000 continue
cnot = 1
cpx = notx ( 1 )
cpy = noty ( 1 )
23001 continue
lcx = cpx
lcy = cpy
call pushxo
if(.not.( cmd .eq. 118 ))goto 23002
call prompt ( prmt , lineid )
goto 23003
23002 continue
call prompt ( prmt , curvid )
23003 continue
redef = 1
continue
23004 if(.not.( edning .eq. 1 ))goto 23005
if(.not.( redef .ne. 0 ))goto 23006
call defmac ( 79 )
call drnotz ( cmd , cls , 1 , nnotz , notx , noty )
call fedmac ( 79 )
redef = 0
23006 continue
if(.not.( nnotz .eq. 0 ))goto 23008
call positn ( cpx , cpy )
goto 23009
23008 continue
if(.not.( noflip .eq. 0 ))goto 23010
call drline ( lcx , lcy , cpx , cpy )
23010 continue
23009 continue
noflip = 0
key = inch ( c )
if(.not.( key .ge. 256 .and. key .le. 267 ))goto 23012
if(.not.( nnotz .gt. 0 ))goto 23014
call drline ( lcx , lcy , cpx , cpy )
23014 continue
cpx = cpx + curdx
cpy = cpy + curdy
call clip ( cpx , cpy )
goto 23013
23012 continue
if(.not.( key .eq. 272 .and. nnotz .gt. 0 ))goto 23016
C delete...
call drline ( lcx , lcy , cpx , cpy )
call usemac ( 79 )
continue
i = cnot
23018 if(.not.(i.lt.nnotz))goto 23020
notx ( i ) = notx ( i + 1 )
noty ( i ) = noty ( i + 1 )
23019 i=i+1
goto 23018
23020 continue
nnotz = nnotz - 1
if(.not.( cnot .gt. nnotz ))goto 23021
cnot = nnotz
23021 continue
if(.not.( cnot .gt. 0 ))goto 23023
lcx = notx ( cnot )
lcy = noty ( cnot )
23023 continue
redef = 1
goto 23017
23016 continue
if(.not.( key .eq. 269 .and. nnotz .gt. 0 ))goto 23025
C move ^
call drline ( lcx , lcy , cpx , cpy )
call usemac ( 79 )
notx ( cnot ) = cpx
lcx = cpx
noty ( cnot ) = cpy
lcy = cpy
redef = 1
goto 23026
23025 continue
if(.not.( key .eq. 270 ))goto 23027
C add^
if(.not.( nnotz .gt. 0 ))goto 23029
call drline ( lcx , lcy , cpx , cpy )
23029 continue
call usemac ( 79 )
continue
i = nnotz
23031 if(.not.(i.gt.cnot))goto 23033
notx ( i + 1 ) = notx ( i )
noty ( i + 1 ) = noty ( i )
23032 i=i-1
goto 23031
23033 continue
nnotz = nnotz + 1
cnot = cnot + 1
notx ( cnot ) = cpx
lcx = cpx
noty ( cnot ) = cpy
lcy = cpy
redef = 1
goto 23028
23027 continue
if(.not.( key .eq. 271 ))goto 23034
if(.not.( nnotz .gt. 0 ))goto 23036
call drline ( lcx , lcy , cpx , cpy )
23036 continue
call usemac ( 79 )
if(.not.( cls .eq. 115 ))goto 23038
cls = 98
goto 23039
23038 continue
cls = 115
23039 continue
redef = 1
goto 23035
23034 continue
if(.not.( key .eq. 274 .and. nnotz .gt. 0 ))goto 23040
cnot = cnot + 1
if(.not.( cnot .gt. nnotz ))goto 23042
cnot = 1
23042 continue
call drline ( lcx , lcy , cpx , cpy )
cpx = notx ( cnot )
lcx = cpx
cpy = noty ( cnot )
lcy = cpy
goto 23041
23040 continue
if(.not.( key .eq. 276 .and. nnotz .gt. 0 ))goto 23044
cnot = cnot - 1
if(.not.( cnot .lt. 1 ))goto 23046
cnot = nnotz
23046 continue
call drline ( lcx , lcy , cpx , cpy )
cpx = notx ( cnot )
lcx = cpx
cpy = noty ( cnot )
lcy = cpy
goto 23045
23044 continue
if(.not.( key .eq. 273 ))goto 23048
enterd = enterd + attrw ( wrtopt )
noflip = 1
goto 23049
23048 continue
if(.not.( key .eq. 277 ))goto 23050
if(.not.( helper ( edhelp ) .eq. ( - 1 ) ))goto 23052
edning = 0
23052 continue
goto 23051
23050 continue
if(.not.( key .eq. 275 .or. key .eq. 277 .or. key .eq. 269 .or. k
*ey .eq. 272 .or. key .eq. 274 .or. key .eq. 276 ))goto 23054
noflip = 1
goto 23055
23054 continue
if(.not.( key .eq. 268 ))goto 23056
enterd = 1
edning = 0
goto 23057
23056 continue
edning = 0
23057 continue
23055 continue
23051 continue
23049 continue
23045 continue
23041 continue
23035 continue
23028 continue
23026 continue
23017 continue
23013 continue
goto 23004
23005 continue
if(.not.( noflip .eq. 0 .and. nnotz .gt. 0 ))goto 23058
call drline ( lcx , lcy , cpx , cpy )
23058 continue
call usemac ( 79 )
call usemac ( 80 )
call popwo
ednotz = enterd
if(.not.( enterd .eq. 0 ))goto 23060
return
23060 continue
if(.not.( wrtopt ( 5 ) .ne. 0 ))goto 23062
wrtopt ( 6 ) = noty ( 1 )
23062 continue
call pushwo ( wrtopt )
call drnotz ( cmd , cls , 0 , nnotz , notx , noty )
call popwo
return
end