Google
 

Trailing-Edge - PDP-10 Archives - BB-K829A-BM_1981 - sources/cespio.for
There is 1 other file named cespio.for in the archive. Click here to see a list.
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  cespio -- character editor i/o
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  copyright notice
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 ** Symbolic definitions **
C  data types
C max string storage
C max string index storage
C  important string indices (see gs module)
C  cdisp - function codes
C  coord - axis codes
C  cpystr - option codes
C  da1 - function codes
C  da2 - function codes
C  dcs - function codes
C  ffopen - modes
C  frtyp - record types
C  (careful - used in computed goto's)
C  ftran - function codes
C  undo - function codes
C  utty - function codes
C  codes returned by keypad function
C  character types
C  composites
C  CTKEY  = CTALPHA + CTNUM + CTHYPH
C  CTFILE = CTALPHA + CTNUM + CTDOT + CTSLASH + CTCOLON
C  colors - temporarily all white
C  screen dimensions (pixels)
C  displays in area 3
C  must match showtab in gm
C  maximum mosaic dimensions
C  dimensions of mosaic display window
C  quan to subtract from char to get fmat/fmatc subscript
C  lowest, highest, number of characters in VK100 font
C  number of loadable fonts in VK100
C  character definitions
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  character definitions
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  copyright notice
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 ========== Ratfor character definitions ==========
C 	 9-FEB-79
C 	12-MAY-80
C  ampersand
C  exclamation mark
C  ASCIZ strings as used by SYSLIB
C  max element count in packed char array
C  input record size
C  must be 2 more than MAXRECORD
C  alternative to YES, NO
C  a linefeed
C  for OPENF calls
C 	"
C 	"
C 	"
C  char i/o format:  "r1" for TOPS-20; "a1" otherwise
C  quoted string version of above
C  first char for single space with LIST carriagecontrol:
C 	' ' for RSTS, nothing for VMS
C  ascii numeric value corresponding to LISTSS, above
C  if "#", omit packed string code for this machine
C  5 for TOPS-20, 1 otherwise
C  if "#", omit TOPS20 code
C 	define (PBUFLEN,30)
C 	# putc -- write a character to the terminal
C 	
C 	subroutine putc (c)
C 	
C 	character c
C 	
C 	include ced:logcom
C 	
C 	logical inesc, indcs, inquot
C 	
C 	if (c == NEWLINE)
C 		call pchar(CR)
C 	if (c == 27)
C 		call pchar(ESCAPE)
C 	else
C 		call pchar(c)
C 	
C 	LOGIF
C 	{
C 		if (c == NEWLINE)
C 			write (LOGTTOUT, 100) CR
C 	
C 		if ((c & \177) == 27)
C 			write (LOGTTOUT, 200)
C 		else
C 			write (LOGTTOUT, 100) c
C 	
C 		100 format ('+', $, a1)
C 		200 format ('+<ESC>', $)
C 	}
C 	end
C 	# pchar -- buffer a character for tt output
C 	
C 	subroutine pchar (c)
C 	
C 	character c
C 	
C 	include ced:pccom
C 	
C 	if (bufp > PBUFLEN)
C 		call pflush	# flush buffer when full
C 	
C 	pbuf (bufp) = c
C 	bufp = bufp + 1
C 	
C 	return
C 	end
C 	# pflush -- flush the ttout buffer
C 	
C 	subroutine pflush
C 	
C 	include ced:pccom
C 	
C 	if (bufp > 1)
C 		call putln (pbuf, bufp-1)
C 	
C 	bufp = 1
C 	return
C 	end
C 	# utty -- set terminal modes?
C 	
C 	subroutine utty(arg)
C 	
C 	integer arg
C 	
C 	include ced:ttecho
C 	include ced:logcom
C 	
C 	LOGSTAR 'utty>', arg
C 	LOGSTAR
C 	
C 	echosw = (arg != 4)
C 	
C 	call pflush
C 	
C 	call putln (0, 0)	# force completion of qio
C 	
C 	end
C  putarg - dump a string argument in several ways
      subroutine putarg ( str )
      integer str ( 1 )
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
      common / logcom / logsw
      logical logsw
      if(.not.( logsw ))goto 23000
      ln = min0 ( length ( str ) , 100 )
      continue
       i = 1
23002 if(.not.(i.le.ln))goto 23004
      if(.not.( str ( i ) .lt. 0 .or. str ( i ) .gt. " 777 ))goto 23005
      goto 23004
23005 continue
23003 i=i+1
      goto 23002
23004 continue
      if(.not.( i .le. ln ))goto 23007
      write ( 45 , 110 ) ( str ( i ) , i = 1 , ln + 1 )
      goto 23008
23007 continue
      write ( 45 , 100 ) ( str ( i ) , i = 1 , ln + 1 )
23008 continue
100   format (' ' , 20 ( x , o3 ) )
110   format (' ' , 8 o8 )
      write ( 45 , 200 ) ( str ( i ) , i = 1 , ln )
      write ( 45 , 200 )
200   format (' ' , 80 r1 )
23000 continue
      end
C  block data
      block data
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
      common / logcom / logsw
      logical logsw
C 	include ced:pccom
C 	include ced:ttecho
      data logsw / . true . /
C 	data bufp /1/
C 	data echosw /.true./
      end