Google
 

Trailing-Edge - PDP-10 Archives - BB-K840A-BM_1981 - sources/sn.for
There are no other files named sn.for in the archive.
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C sn> More command drivers
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  operating system dependent switches from RATLIB
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 	define character byte
C max string storage
C max number of string indices
C  important string indices (see ss module)
C  coord - axis codes
C  cpystr - option codes
C  dcs - function codes
C  ffopen - modes
C  ffopen - logical file numbers
C  utty - function codes
C  codes returned by keypad function
C  parameter codes
C  screen areas
C column number of text in aea 2
C  character types
C  composites
C  CTKEY  = CTALPHA + CTNUM + CTHYPH
C  legal filename characters are defined in pflnm (sp module)
C  colors
C  maximum time between slides
C  screen dimensions (pixels)
C  character definitions
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C  character definitions
C regcmd - process ReGIS command
C  forms of command:
C 	ReGIS string		-> stores string in memory
C 	ReGIS ?			-> types string from memory
C 	ReGIS			-> puts VK100 in graphics mode
C 				   and then writes the string
C  If any % characters appear in the string, the program will
C  prompt the user for text to replace them.
      subroutine regcmd
      implicit integer ( a - z )
C  Copyright (C) 1980, by Digital Equipment Corporation, Maynard, Mass.
C sscom>
      integer sv ( 3500 )
      integer sx ( 150 )
      common / gscom /  ipptr , iuptr , pptr , uptr , sv , sx
C contains sx (SNINP)
C contains sx (SNUST)
C index into sv, used when parsing tty input (SNINP)
C index into sv, used when building a string (SNUST)
C subscript is string #, contains index into sv
      if(.not.( chkeol ( 0 ) .eq. 0 ))goto 23000
C something after command name
      if(.not.( sv ( pptr ) .eq. 63 ))goto 23002
      call dcs ( 4 )
      call pr0 ( 7 )
C wants to see string
      goto 23003
23002 continue
      rp1 = sx ( 7 )
C wants to specify string
      continue
23004 continue
      sv ( rp1 ) = sv ( pptr )
C copy string to SNREG
      rp1 = rp1 + 1
      pptr = pptr + 1
23005 if(.not.( sv ( pptr - 1 ) .eq. 0 ))goto 23004
23006 continue
23003 continue
      goto 23001
23000 continue
C nothing after command name
      rp1 = sx ( 7 ) - 1
      rp2 = iuptr
      sv ( rp2 ) = 0
      continue
23007 continue
C loop to xfer SNREG to SNUST
      rp1 = rp1 + 1
      if(.not.( sv ( rp1 ) .eq. 37 ))goto 23010
C  % hit, do substitution
      call prdtty ( 6 )
C prompt
      continue
23012 if(.not.( . true . ))goto 23013
C append input to SNUST
      if(.not.( sv ( pptr ) .eq. 0 ))goto 23014
      goto 23013
C end of input
23014 continue
      sv ( rp2 ) = sv ( pptr )
      rp2 = rp2 + 1
      pptr = pptr + 1
      goto 23012
23013 continue
      goto 23011
23010 continue
      sv ( rp2 ) = sv ( rp1 )
C not %, just copy it
      rp2 = rp2 + 1
C bump destination ptr
23011 continue
      sv ( rp2 ) = 0
C keep a null at the end
23008 if(.not.( sv ( rp1 ) .eq. 0 ))goto 23007
23009 continue
      call pdiag ( 6 )
C display final product in area 4
      call regis ( 6 )
C send it in graphics mode
23001 continue
      end