Google
 

Trailing-Edge - PDP-10 Archives - BB-K818A-BM_1981 - sources/cyctxt.for
There are no other files named cyctxt.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 cyfont ( k , m )
      integer k , m
      integer cycval
      integer fontv ( 4 )
C string font Font
C slist fonti
C string fontc ascii
C string + user\ 1
C string + user\ 2
C string + user\ 3
C elist fonti
      integer fonti ( 4 )
      integer font ( 5 )
      integer fontc ( 27 )
      data font ( 1 ) , font ( 2 ) , font ( 3 ) , font ( 4 ) , font ( 5 
     *) / 70 , 111 , 110 , 116 , 0 /
      data fontc ( 1 ) , fontc ( 2 ) , fontc ( 3 ) , fontc ( 4 ) , fontc
     * ( 5 ) / 97 , 115 , 99 , 105 , 105 /
      data fontc ( 6 ) , fontc ( 7 ) , fontc ( 8 ) , fontc ( 9 ) , fontc
     * ( 10 ) / 0 , 117 , 115 , 101 , 114 /
      data fontc ( 11 ) , fontc ( 12 ) , fontc ( 13 ) , fontc ( 14 ) , f
     *ontc ( 15 ) / 32 , 49 , 0 , 117 , 115 /
      data fontc ( 16 ) , fontc ( 17 ) , fontc ( 18 ) , fontc ( 19 ) , f
     *ontc ( 20 ) / 101 , 114 , 32 , 50 , 0 /
      data fontc ( 21 ) , fontc ( 22 ) , fontc ( 23 ) , fontc ( 24 ) , f
     *ontc ( 25 ) / 117 , 115 , 101 , 114 , 32 /
      data fontc ( 26 ) , fontc ( 27 ) / 51 , 0 /
      data fonti ( 1 ) , fonti ( 2 ) , fonti ( 3 ) , fonti ( 4 ) / 1 , 7
     * , 14 , 21 /
      data fontv ( 1 ) , fontv ( 2 ) , fontv ( 3 ) , fontv ( 4 ) / 0 , 1
     * , 2 , 3 /
      cyfont = cycval ( k , font , 4 , fonti , fontc , fontv , m )
      return
      end
      integer function cywide ( k , m )
      integer k , m
      common / glopts / wrtopt , wrtcrv , wrtlin , wrtbox , wrtcir , wrt
     *txt , txtopt , gwopsp , gwop , ttytop
      integer wrtopt ( 10 ) , wrtcrv ( 10 ) , wrtlin ( 10 ) , wrtbox ( 1
     *0 )
      integer wrtcir ( 10 ) , wrttxt ( 10 ) , txtopt ( 6 ) , ttytop ( 6 
     *)
      integer gwop ( 36 ) , gwopsp
C         ^ should be Woplen*Maxwops
      integer cycval
      integer widv ( 8 )
C string wide Width
C slist widei
C string widec 1
C string + 2
C string + 3
C string + 4
C string + 5
C string + 6
C string + 7
C string + 8
C elist widei
      integer widei ( 8 )
      integer wide ( 6 )
      integer widec ( 16 )
      data wide ( 1 ) , wide ( 2 ) , wide ( 3 ) , wide ( 4 ) , wide ( 5 
     *) / 87 , 105 , 100 , 116 , 104 /
      data wide ( 6 ) / 0 /
      data widec ( 1 ) , widec ( 2 ) , widec ( 3 ) , widec ( 4 ) , widec
     * ( 5 ) / 49 , 0 , 50 , 0 , 51 /
      data widec ( 6 ) , widec ( 7 ) , widec ( 8 ) , widec ( 9 ) , widec
     * ( 10 ) / 0 , 52 , 0 , 53 , 0 /
      data widec ( 11 ) , widec ( 12 ) , widec ( 13 ) , widec ( 14 ) , w
     *idec ( 15 ) / 54 , 0 , 55 , 0 , 56 /
      data widec ( 16 ) / 0 /
      data widei ( 1 ) , widei ( 2 ) , widei ( 3 ) , widei ( 4 ) , widei
     * ( 5 ) / 1 , 3 , 5 , 7 , 9 /
      data widei ( 6 ) , widei ( 7 ) , widei ( 8 ) / 11 , 13 , 15 /
      data widv ( 1 ) , widv ( 2 ) , widv ( 3 ) , widv ( 4 ) , widv ( 5 
     *) / 1 , 2 , 3 , 4 , 5 /
      data widv ( 6 ) , widv ( 7 ) , widv ( 8 ) / 6 , 7 , 8 /
      cywide = cycval ( k , wide , 8 , widei , widec , widv , m )
      if(.not.( cywide .gt. 0 ))goto 23000
      txtopt ( 3 ) = ( 1 . 5 * m ) + . 5
23000 continue
      return
      end
      integer function cyhght ( k , m )
      integer k , m
      integer cycval
      integer hgtv ( 16 )
C string hgt Height
C slist hgti
C string hgtc .5
C string + 1
C string + 1.5
C string + 2
C string + 2.5
C string + 3
C string + 3.5
C string + 4
C string + 4.5
C string + 5
C string + 5.5
C string + 6
C string + 6.5
C string + 7
C string + 7.5
C string + 8
C elist hgti
      integer hgti ( 16 )
      integer hgt ( 7 )
      integer hgtc ( 47 )
      data hgt ( 1 ) , hgt ( 2 ) , hgt ( 3 ) , hgt ( 4 ) , hgt ( 5 ) / 7
     *2 , 101 , 105 , 103 , 104 /
      data hgt ( 6 ) , hgt ( 7 ) / 116 , 0 /
      data hgtc ( 1 ) , hgtc ( 2 ) , hgtc ( 3 ) , hgtc ( 4 ) , hgtc ( 5 
     *) / 46 , 53 , 0 , 49 , 0 /
      data hgtc ( 6 ) , hgtc ( 7 ) , hgtc ( 8 ) , hgtc ( 9 ) , hgtc ( 10
     * ) / 49 , 46 , 53 , 0 , 50 /
      data hgtc ( 11 ) , hgtc ( 12 ) , hgtc ( 13 ) , hgtc ( 14 ) , hgtc 
     *( 15 ) / 0 , 50 , 46 , 53 , 0 /
      data hgtc ( 16 ) , hgtc ( 17 ) , hgtc ( 18 ) , hgtc ( 19 ) , hgtc 
     *( 20 ) / 51 , 0 , 51 , 46 , 53 /
      data hgtc ( 21 ) , hgtc ( 22 ) , hgtc ( 23 ) , hgtc ( 24 ) , hgtc 
     *( 25 ) / 0 , 52 , 0 , 52 , 46 /
      data hgtc ( 26 ) , hgtc ( 27 ) , hgtc ( 28 ) , hgtc ( 29 ) , hgtc 
     *( 30 ) / 53 , 0 , 53 , 0 , 53 /
      data hgtc ( 31 ) , hgtc ( 32 ) , hgtc ( 33 ) , hgtc ( 34 ) , hgtc 
     *( 35 ) / 46 , 53 , 0 , 54 , 0 /
      data hgtc ( 36 ) , hgtc ( 37 ) , hgtc ( 38 ) , hgtc ( 39 ) , hgtc 
     *( 40 ) / 54 , 46 , 53 , 0 , 55 /
      data hgtc ( 41 ) , hgtc ( 42 ) , hgtc ( 43 ) , hgtc ( 44 ) , hgtc 
     *( 45 ) / 0 , 55 , 46 , 53 , 0 /
      data hgtc ( 46 ) , hgtc ( 47 ) / 56 , 0 /
      data hgti ( 1 ) , hgti ( 2 ) , hgti ( 3 ) , hgti ( 4 ) , hgti ( 5 
     *) / 1 , 4 , 6 , 10 , 12 /
      data hgti ( 6 ) , hgti ( 7 ) , hgti ( 8 ) , hgti ( 9 ) , hgti ( 10
     * ) / 16 , 18 , 22 , 24 , 28 /
      data hgti ( 11 ) , hgti ( 12 ) , hgti ( 13 ) , hgti ( 14 ) , hgti 
     *( 15 ) / 30 , 34 , 36 , 40 , 42 /
      data hgti ( 16 ) / 46 /
      data hgtv ( 1 ) , hgtv ( 2 ) , hgtv ( 3 ) , hgtv ( 4 ) , hgtv ( 5 
     *) / 1 , 2 , 3 , 4 , 5 /
      data hgtv ( 6 ) , hgtv ( 7 ) , hgtv ( 8 ) , hgtv ( 9 ) , hgtv ( 10
     * ) / 6 , 7 , 8 , 9 , 10 /
      data hgtv ( 11 ) , hgtv ( 12 ) , hgtv ( 13 ) , hgtv ( 14 ) , hgtv 
     *( 15 ) / 11 , 12 , 13 , 14 , 15 /
      data hgtv ( 16 ) / 16 /
      cyhght = cycval ( k , hgt , 16 , hgti , hgtc , hgtv , m )
      return
      end
      integer function cyspac ( k , m )
      integer k , m
      integer cycval
      integer spacv ( 2 )
C string spac Spacing
C slist spaci
C string spacc text
C string + mosaic
C elist spaci
      integer spaci ( 2 )
      integer spac ( 8 )
      integer spacc ( 12 )
      data spac ( 1 ) , spac ( 2 ) , spac ( 3 ) , spac ( 4 ) , spac ( 5 
     *) / 83 , 112 , 97 , 99 , 105 /
      data spac ( 6 ) , spac ( 7 ) , spac ( 8 ) / 110 , 103 , 0 /
      data spacc ( 1 ) , spacc ( 2 ) , spacc ( 3 ) , spacc ( 4 ) , spacc
     * ( 5 ) / 116 , 101 , 120 , 116 , 0 /
      data spacc ( 6 ) , spacc ( 7 ) , spacc ( 8 ) , spacc ( 9 ) , spacc
     * ( 10 ) / 109 , 111 , 115 , 97 , 105 /
      data spacc ( 11 ) , spacc ( 12 ) / 99 , 0 /
      data spaci ( 1 ) , spaci ( 2 ) / 1 , 6 /
      data spacv ( 1 ) , spacv ( 2 ) / 0 , 1 /
      cyspac = cycval ( k , spac , 2 , spaci , spacc , spacv , m )
      return
      end
      integer function cyital ( k , m )
      integer k , m
      integer cycval
      integer italv ( 5 )
C string ital Italic\ angle
C slist itali
C string italc 0
C string + 27
C string + 45
C string + -45
C string + -27
C elist itali
      integer itali ( 5 )
      integer ital ( 13 )
      integer italc ( 16 )
      data ital ( 1 ) , ital ( 2 ) , ital ( 3 ) , ital ( 4 ) , ital ( 5 
     *) / 73 , 116 , 97 , 108 , 105 /
      data ital ( 6 ) , ital ( 7 ) , ital ( 8 ) , ital ( 9 ) , ital ( 10
     * ) / 99 , 32 , 97 , 110 , 103 /
      data ital ( 11 ) , ital ( 12 ) , ital ( 13 ) / 108 , 101 , 0 /
      data italc ( 1 ) , italc ( 2 ) , italc ( 3 ) , italc ( 4 ) , italc
     * ( 5 ) / 48 , 0 , 50 , 55 , 0 /
      data italc ( 6 ) , italc ( 7 ) , italc ( 8 ) , italc ( 9 ) , italc
     * ( 10 ) / 52 , 53 , 0 , 45 , 52 /
      data italc ( 11 ) , italc ( 12 ) , italc ( 13 ) , italc ( 14 ) , i
     *talc ( 15 ) / 53 , 0 , 45 , 50 , 55 /
      data italc ( 16 ) / 0 /
      data itali ( 1 ) , itali ( 2 ) , itali ( 3 ) , itali ( 4 ) , itali
     * ( 5 ) / 1 , 3 , 6 , 9 , 13 /
      data italv ( 1 ) , italv ( 2 ) , italv ( 3 ) , italv ( 4 ) , italv
     * ( 5 ) / 0 , 27 , 45 , - 45 , - 27 /
      cyital = cycval ( k , ital , 5 , itali , italc , italv , m )
      return
      end
      integer function cyslop ( k , m )
      integer k , m
      integer cycval
      integer slopv ( 5 )
C string slop Slope\ angle
C slist slopi
C string slopc 0
C string + 45
C string + 90
C string + -90
C string + -45
C elist slopi
      integer slopi ( 5 )
      integer slop ( 12 )
      integer slopc ( 16 )
      data slop ( 1 ) , slop ( 2 ) , slop ( 3 ) , slop ( 4 ) , slop ( 5 
     *) / 83 , 108 , 111 , 112 , 101 /
      data slop ( 6 ) , slop ( 7 ) , slop ( 8 ) , slop ( 9 ) , slop ( 10
     * ) / 32 , 97 , 110 , 103 , 108 /
      data slop ( 11 ) , slop ( 12 ) / 101 , 0 /
      data slopc ( 1 ) , slopc ( 2 ) , slopc ( 3 ) , slopc ( 4 ) , slopc
     * ( 5 ) / 48 , 0 , 52 , 53 , 0 /
      data slopc ( 6 ) , slopc ( 7 ) , slopc ( 8 ) , slopc ( 9 ) , slopc
     * ( 10 ) / 57 , 48 , 0 , 45 , 57 /
      data slopc ( 11 ) , slopc ( 12 ) , slopc ( 13 ) , slopc ( 14 ) , s
     *lopc ( 15 ) / 48 , 0 , 45 , 52 , 53 /
      data slopc ( 16 ) / 0 /
      data slopi ( 1 ) , slopi ( 2 ) , slopi ( 3 ) , slopi ( 4 ) , slopi
     * ( 5 ) / 1 , 3 , 6 , 9 , 13 /
      data slopv ( 1 ) , slopv ( 2 ) , slopv ( 3 ) , slopv ( 4 ) , slopv
     * ( 5 ) / 0 , 45 , 90 , - 90 , - 45 /
      cyslop = cycval ( k , slop , 5 , slopi , slopc , slopv , m )
      return
      end