diff -uNr 3.5/cnews/AlwaysAll/V3.6_Changes unipops-3.6/cnews/AlwaysAll/V3.6_Changes
--- 3.5/cnews/AlwaysAll/V3.6_Changes	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/cnews/AlwaysAll/V3.6_Changes	2008-12-29 14:36:37.000000000 -0700
@@ -0,0 +1,24 @@
+The following documents changes to UniPOPS since NRAO's version 3.5.
+
+
+I.  Numerous internal changes
+	- added byte-order sensitivity to input sdd files
+	- added byte order sensitivity to the parser
+	- removed all Solaris and sunmath library dependencies
+	- replaced Solaris libs with equivalent C functions
+	- removed support for SunView
+	- error returns are typically int*4, not shorts
+	- string math is done with equivalencies now, not implicitly
+	- cleaner make system and packaging
+	- eliminated need for a f77-capable preprocessor
+
+    This allows UniPOPS to be dramatically more portable.  The next 
+    incremental release will support 3 architectures (Intel, PowerPC, 
+    and Sparc) and 5 OS's (Solaris, Linux, Darwin/OSX, FreeBSD and 
+    NetBSD).
+
+
+II. A few sticky points remain.  EXPLAIN remains broken for non-Solaris 
+    architectures, though HELP remains available.  There is still no 
+    workable color support for generic X11 platforms.  
+
diff -uNr 3.5/explain/source/Makefile unipops-3.6/explain/source/Makefile
--- 3.5/explain/source/Makefile	2000-03-16 11:31:11.000000000 -0700
+++ unipops-3.6/explain/source/Makefile	2008-12-29 14:36:49.000000000 -0700
@@ -4,12 +4,12 @@
 FC = $(FCMP)
 FDEBOROPT = -g
 FLOATOPT = 
-FILLIB = -libmil
+FILLIB = 
 FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(FILLIB)
-FFLAGS = -u -i2 $(FFLOAT)
+FFLAGS = $(FFLOAT)
 LFLAGS = $(FFLOAT)
 LLIBS  = -lm
-AR = /usr/5bin/ar
+AR = /usr/bin/ar
 #
 # Macros which define compilation and linking parameters
 # FDEBOROPT (debug or optimize flag) = 'g' as a default for using the debugger 
@@ -25,7 +25,7 @@
 
 clean:
 	rm -f $(BINLIST)
-	-sccs clean
+#	-sccs clean
 	rm -f *.o *.a
 
 explain: explain.o explainlib.a 
diff -uNr 3.5/explain/source/explain.f unipops-3.6/explain/source/explain.f
--- 3.5/explain/source/explain.f	2000-03-16 11:31:11.000000000 -0700
+++ unipops-3.6/explain/source/explain.f	2008-12-29 14:36:49.000000000 -0700
@@ -9,8 +9,8 @@
       character*64 infofile, topic, uppercase, outname
       character*80 string
       integer*4 iargc, findminmatch, stack(32767), lnblnk, loc, top,
-     .		MAXSTCK, system, findchar, long, newloc, getpid
-      integer*2 ISTDOUT, ISTDERR, ISTDIN, OUTFILE, INFILE, irtn
+     .		MAXSTCK, system, findchar, newloc, getpid, irtn
+      integer*2 ISTDOUT, ISTDERR, ISTDIN, OUTFILE, INFILE
       logical preproc, resetproc
       character*8 spid
 c
@@ -23,24 +23,24 @@
 c
       include 'explain.inc'
 c
-      open(unit=ISTDERR, form="print")
-      open(unit=ISTDOUT, form="print")
+      open(unit=ISTDERR, form='formatted')
+      open(unit=ISTDOUT, form='formatted')
 c
       if (iargc() .lt. 1) then
 	write(ISTDERR,*) 'Syntax: info_file  [topic]'
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
-      call getarg(long(1), infofile)
+      call getarg(int(1), infofile)
       if (iargc() .ge. 2) then
-	call getarg(long(2), topic)
+	call getarg(int(2), topic)
       else
 	topic = 'HELP'
       endif
 c     Check and get arguments
 c
-      write(spid, fmt='(i8)') getpid()
-      irtn = system("echo " // spid // " >> $INFANTS")
+c      write(spid, fmt='(i8)') getpid()
+c      irtn = system("echo " // spid // " >> $INFANTS")
       call readinfo(infofile)
 c
       loc = findchar(nodes, next, start, '.')
@@ -57,7 +57,7 @@
 	    newloc = findchar(nodes, next, start, '.')
       	    call push(stack, top, MAXSTCK, newloc)
 	else if (uppercase(topic) .eq. 'DONE')then
-	    call exit(long(0))
+	    call exit(int(0))
 	else if (topic .eq. '.') then
 	     topic = nodes(loc)
 	     newloc = loc
@@ -116,7 +116,7 @@
 	write(OUTFILE,*) ' '
 	call listedges(nodes, dest, link, adj(loc), '',OUTFILE)
 	write(OUTFILE,*) ' '
-	call flush(long(OUTFILE))
+	call flush(int(OUTFILE))
 	irtn = system('more -d ' // outname)
 c
 1091 	write(ISTDOUT,fmt='(1x,2a,/,a,$)') 'Enter topic (or: HELP for help,',
diff -uNr 3.5/explain/source/explain.inc unipops-3.6/explain/source/explain.inc
--- 3.5/explain/source/explain.inc	2000-03-16 11:31:11.000000000 -0700
+++ unipops-3.6/explain/source/explain.inc	2008-12-29 14:36:49.000000000 -0700
@@ -15,7 +15,7 @@
       integer*4 next(NUMNODES), adj(NUMNODES)
       integer*4 dest(NUMDEST), link(NUMDEST), start, availn, availe
 c
-      common/explain/next, adj, dest, link, start, availn, availe,
+      common/explainblock/next, adj, dest, link, start, availn, availe,
      .		     nodes,filenames
 c
 c     NUMNODES = number of nodes in graph
diff -uNr 3.5/explain/source/explainlib.f unipops-3.6/explain/source/explainlib.f
--- 3.5/explain/source/explainlib.f	2000-03-16 11:31:12.000000000 -0700
+++ unipops-3.6/explain/source/explainlib.f	2008-12-29 14:36:49.000000000 -0700
@@ -86,7 +86,7 @@
       character*(*) info(*), item
       integer*4 link(*), start
 c
-      integer*4 ptr, NULL, ilen, lnblnk
+      integer*4 ptr, NULL, ilen
       character*64 uppercase, item1
 c
       parameter (NULL = 0)
@@ -447,8 +447,8 @@
 c
       include 'explain.inc'
 c
-      integer*2 IFILE, ierr, ISTDERR
-      integer*4 lnblnk, long
+      integer*4 IFILE, ISTDERR
+      integer*4 ierr
 c
       parameter (IFILE = 10)
       parameter (ISTDERR = 0)
@@ -457,19 +457,19 @@
      .     iostat = ierr)
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot open input file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
       rewind(IFILE,iostat=ierr)
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot rewind input file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
       read(IFILE,iostat=ierr) start, availn, availe
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot read from input file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
       read(IFILE) nodes
       read(IFILE) filenames
@@ -481,7 +481,7 @@
       close(IFILE,iostat=ierr)
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot close input file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
       return
@@ -499,8 +499,8 @@
 c
       include 'explain.inc'
 c
-      integer*2 IFILE, ierr, ISTDERR
-      integer*4 lnblnk, long
+      integer*2 IFILE, ISTDERR
+      integer*4 ierr
 c
       parameter (IFILE = 10)
       parameter (ISTDERR = 10)
@@ -509,19 +509,19 @@
      .     form='unformatted', iostat = ierr)
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot open output file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
       rewind(IFILE,iostat=ierr)
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot rewind output file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
       write(IFILE,iostat=ierr) start, availn, availe
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot write to output file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
       write(IFILE) nodes
       write(IFILE) filenames
@@ -533,7 +533,7 @@
       close(IFILE,iostat=ierr)
       if (ierr .ne. 0) then
 	write(ISTDERR,*) 'Cannot close output file: ', iofile(1:lnblnk(iofile))
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
       return
@@ -551,7 +551,7 @@
 c
       include 'explain.inc'
 c
-      integer*4 newloc, findchar, lnblnk
+      integer*4 newloc, findchar
       integer*2 ISTDERR
 c
       parameter (ISTDERR = 0)
@@ -588,7 +588,7 @@
 c
       include 'explain.inc'
 c
-      integer*4 loca, locb, findminmatch, new, findedge, lnblnk
+      integer*4 loca, locb, findminmatch, new, findedge
       integer*2 ISTDERR
 c
       parameter (ISTDERR = 0)
@@ -637,7 +637,7 @@
       include 'explain.inc'
 c
       integer*4 loc, findminmatch, ptr, beg,
-     .	        end, lnblnk
+     .	        end
       integer*2 ISTDERR
       logical deletei4, anything, deletechar
 c
@@ -693,7 +693,7 @@
 c
       include 'explain.inc'
 c
-      integer*4 loca, locb, findminmatch, findedge, lnblnk
+      integer*4 loca, locb, findminmatch, findedge
       integer*2 ISTDERR
       logical deletei4
 c
@@ -892,7 +892,7 @@
 c
       include 'explain.inc'
 c
-      integer*4 ptr, lnblnk
+      integer*4 ptr
 c
       ptr = start
 c
@@ -1001,7 +1001,7 @@
       character*(*) lc
 c
       character*64 uc
-      integer*4 lnblnk, ic1, i
+      integer*4 ic1, i
 c
       uc = lc
 c
@@ -1026,7 +1026,7 @@
 c
       character*(*) stringin, stringout
 c
-      integer*4 lnblnk, i
+      integer*4 i
 c
       stringout = stringin
       if (lnblnk(stringin) .eq. 0) return
@@ -1205,12 +1205,12 @@
       character*(*) string, topic
       logical reset
 c
-      integer*4 lnblnk, i, i1, ilen, i2, i3, ii1, ilennew, 
+      integer*4 i, i1, ilen, i2, i3, ii1, ilennew, 
      .		istrt, istp
 c
       character*80 names(100), anything(100), parsed
-      logical topicok, ifon, maxnames
-      integer numnames
+      logical topicok, ifon
+      integer numnames, maxnames
 c     NAMES/ANYTHING = arrays containing the contents of 'def' lines
 c     NUMNAMES = number of 'def' lines so far
 c     MAXNAMES = maximum number of #def's
@@ -1271,7 +1271,7 @@
 c
 		ifon = .true.
 		
-		if (index(parsed(2:),' ' // topic(1:lnblnk(topic)) // 
+		if (index(parsed(2:),' ' // topic(1:72) // 
      .				' ') .ne. 0) then
 		   topicok = .true.
 		else
@@ -1283,7 +1283,7 @@
 c		We can try to process an #ifnot -- ignore all embedded #if's.
 c
 		ifon = .true.
-		if (index(parsed(2:),' ' // topic(1:lnblnk(topic)) // 
+		if (index(parsed(2:),' ' // topic(1:72) // 
      .				' ') .eq. 0) then
 		   topicok = .true.
 		else
diff -uNr 3.5/explain/source/explainmap.f unipops-3.6/explain/source/explainmap.f
--- 3.5/explain/source/explainmap.f	2000-03-16 11:31:26.000000000 -0700
+++ unipops-3.6/explain/source/explainmap.f	2008-12-29 14:36:50.000000000 -0700
@@ -7,21 +7,21 @@
 c     Syntax:  info_file
 c
       character*64 infofile
-      integer*4 iargc, long, lnblnk, loc
+      integer*4 iargc, lnblnk, loc
 c
       include 'explainmap.inc'
 c
       integer*4 findchar
 c
-      open(unit=ISTDERR, form="print")
-      open(unit=ISTDOUT, form="print")
+      open(unit=ISTDERR, form="formatted")
+      open(unit=ISTDOUT, form="formatted")
 c
       if (iargc() .lt. 1) then
 	write(ISTDERR,*) 'Syntax: explainmap info_file'
-	call exit(long(1))
+	call exit(int(1))
       endif
 c		Get the info file and open it
-      call getarg(long(1), infofile)
+      call getarg(1, infofile)
       call readinfo(infofile)
 c
       call initarrays
@@ -44,8 +44,8 @@
          loc = next(loc)
  10   continue
 c
- 1000 format(x,'Statistics:',/,4x,'Node Name',19x,'# Hard',x,'# Soft')
- 1010 format(x,a32,x,2i4)
+ 1000 format(1x,'Statistics:',/,4x,'Node Name',19x,'# Hard',1x,'# Soft')
+ 1010 format(1x,a32,1x,2i4)
 c
       stop
       end
diff -uNr 3.5/explain/source/filecheck.f unipops-3.6/explain/source/filecheck.f
--- 3.5/explain/source/filecheck.f	2000-03-16 11:31:27.000000000 -0700
+++ unipops-3.6/explain/source/filecheck.f	2008-12-29 14:36:50.000000000 -0700
@@ -8,19 +8,19 @@
 c
       character*64 infofile
       integer*4 ISTDOUT, ISTDERR
-      integer*4 iargc, lnblnk, long, loc, access
+      integer*4 iargc, loc, access
 c
       parameter (ISTDERR = 0)
       parameter (ISTDOUT = 6)
 c
-      open(unit=ISTDOUT, form="print")
+      open(unit=ISTDOUT, form="formatted")
 c
       if (iargc() .lt. 1) then
          write(ISTDERR,*) 'Syntax: filecheck info_file'
-         call exit(long(1))
+         call exit(int(1))
       endif
 c			get the info file and open it
-      call getarg(long(1), infofile)
+      call getarg(int(1), infofile)
       call readinfo(infofile)
 c			start at start and make sure each file can be accessed
       write(ISTDOUT,*) ' '
diff -uNr 3.5/explain/source/initexplain.f unipops-3.6/explain/source/initexplain.f
--- 3.5/explain/source/initexplain.f	2000-03-16 11:31:15.000000000 -0700
+++ unipops-3.6/explain/source/initexplain.f	2008-12-29 14:36:49.000000000 -0700
@@ -13,7 +13,7 @@
       parameter (ISTDOUT = 6)
       parameter (ISTDIN = 5)
 c
-      open(unit=ISTDOUT, form="print")
+      open(unit=ISTDOUT, form="formatted")
 c
       write(ISTDOUT,*) ' '
       write(ISTDOUT,*) 'Creates an empty/initilaized explain ',
diff -uNr 3.5/explain/source/manonepage.f unipops-3.6/explain/source/manonepage.f
--- 3.5/explain/source/manonepage.f	2000-03-16 11:31:24.000000000 -0700
+++ unipops-3.6/explain/source/manonepage.f	2008-12-29 14:36:50.000000000 -0700
@@ -14,9 +14,9 @@
 c
       character*64 infofile, topic, ppdef
       character*80 string, stack(4096)
-      integer*4 iargc, findminmatch, lnblnk, loc, long, top, ierr,
+      integer*4 iargc, findminmatch, loc, long, top, ierr,
      .		MAXSTCK, i, pagesize
-      integer*2 ISTDOUT, ISTDERR, IOUNIT
+      integer*4 ISTDOUT, ISTDERR, IOUNIT
       logical preproc, resetproc
 c
       parameter (ISTDOUT = 6)
@@ -29,23 +29,23 @@
 c
       include 'explain.inc'
 c
-      open(unit=ISTDERR, form="print")
-      open(unit=ISTDOUT, form="print")
+      open(unit=ISTDERR, form="formatted")
+      open(unit=ISTDOUT, form="formatted")
 c
       if (iargc() .lt. 3) then
 	write(ISTDERR,*) 'Syntax: info_file  topic pp_def'
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
-      call getarg(long(1), infofile)
-      call getarg(long(2), topic)
-      call getarg(long(3), ppdef)
+      call getarg(int(1), infofile)
+      call getarg(int(2), topic)
+      call getarg(int(3), ppdef)
       if (iargc() .ge. 4) then
-	call getarg(long(4), string)
+	call getarg(int(4), string)
 	read(string,iostat=ierr,fmt='(i10)') pagesize
 	if (ierr .ne. 0 .or. pagesize .le. 0) then
 	   write(ISTDERR,*) 'Syntax: info_file  topic  pp_def [pagesize]'
-	   call exit(long(1))
+	   call exit(int(1))
         endif
       else
 	pagesize = 60
@@ -58,7 +58,7 @@
 c
       if (loc .eq. NULL) then
 	  write(ISTDERR,*) 'No topic with the name: ', topic(1:lnblnk(topic))
-	  call exit(long(1))
+	  call exit(int(1))
       endif
 c     Checks that the desired topic exists
 c
@@ -102,7 +102,7 @@
 c     List out the contents of the stack
 c
 c
-      call exit(long(0))
+      call exit(int(0))
 c
       end
 c
diff -uNr 3.5/explain/source/manpages.f unipops-3.6/explain/source/manpages.f
--- 3.5/explain/source/manpages.f	2000-03-16 11:31:22.000000000 -0700
+++ unipops-3.6/explain/source/manpages.f	2008-12-29 14:36:50.000000000 -0700
@@ -14,11 +14,11 @@
 c
       character*64 infofile, topic, topiclist(1024), ppdef
       character*80 string, stack(4096)
-      integer*4 iargc, ierr, place, pagesize, top, findminmatch, lnblnk,
+      integer*4 iargc, ierr, place, pagesize, top, findminmatch,
      .		loc, MAXSTCK, locother, i, ptr, numedges, available, 
-     .		docsize, NFIELD, BORDER, lnblnk, numtopics, k, leftover,
+     .		docsize, NFIELD, BORDER, numtopics, k, leftover,
      .		nextplace, skip, findchar, long
-      integer*2 ISTDOUT, ISTDERR, IOUNIT
+      integer*4 ISTDOUT, ISTDERR, IOUNIT
       logical preproc, resetproc
 c
       parameter (ISTDOUT = 6)
@@ -37,23 +37,23 @@
 c
       include 'explain.inc'
 c
-      open(unit=ISTDOUT, form="print")
-      open(unit=ISTDERR, form="print")
+      open(unit=ISTDOUT, form="formatted")
+      open(unit=ISTDERR, form="formatted")
 c
       if (iargc() .lt. 3) then
 	write(ISTDERR,*) 'Syntax: info_file  topic  pp_def [pagesize]'
-	call exit(long(1))
+	call exit(int(1))
       endif
 c
-      call getarg(long(1), infofile)
-      call getarg(long(2), topic)
-      call getarg(long(3), ppdef)
+      call getarg(int(1), infofile)
+      call getarg(int(2), topic)
+      call getarg(int(3), ppdef)
       if (iargc() .ge. 4) then
-	call getarg(long(4), string)
+	call getarg(int(4), string)
 	read(string,iostat=ierr,fmt='(i10)') pagesize
 	if (ierr .ne. 0 .or. pagesize .le. 0) then
 	   write(ISTDERR,*) 'Syntax: info_file  topic  pp_def [pagesize]'
-	   call exit(long(1))
+	   call exit(int(1))
         endif
       else
 	pagesize = 60
@@ -68,7 +68,7 @@
       loc = findminmatch(nodes, next, start, topic, ISTDERR)
       if (loc .eq. NULL) then
 	  write(ISTDERR,*) 'No topic with the name: ', topic(1:lnblnk(topic))
-	  call exit(long(1))
+	  call exit(int(1))
       endif
 c     Checks that the desired topic exists
 c
@@ -98,7 +98,7 @@
 c
         if (loc .eq. NULL) then
 	  write(ISTDERR,*) 'No topic with the name: ', topic(1:lnblnk(topic))
-	  call exit(long(1))
+	  call exit(int(1))
         endif
 c       Checks that the desired topic exists
 c
@@ -219,7 +219,7 @@
 c
 100	continue
 c
-      call exit(long(0))
+      call exit(int(0))
 c
       end
 c
diff -uNr 3.5/explain/source/manrange.f unipops-3.6/explain/source/manrange.f
--- 3.5/explain/source/manrange.f	2000-03-16 11:31:24.000000000 -0700
+++ unipops-3.6/explain/source/manrange.f	2008-12-29 14:36:50.000000000 -0700
@@ -19,9 +19,9 @@
 c
       character*64 infofile, topic, topiclist(1024), ppdef, first, last
       character*80 string, stack(4096)
-      integer*4 iargc, ierr, place, pagesize, top, findminmatch, lnblnk,
+      integer*4 iargc, ierr, place, pagesize, top, findminmatch,
      .		loc, MAXSTCK, locother, i, ptr, numedges, available, 
-     .		docsize, NFIELD, BORDER, lnblnk, numtopics, k, leftover,
+     .		docsize, NFIELD, BORDER, numtopics, k, leftover,
      .		nextplace, skip, findchar, long, i1, BOTBORDER, i2
       integer*2 ISTDOUT, ISTDERR, IOUNIT
       logical preproc, resetproc
@@ -44,29 +44,29 @@
 c
       include 'explain.inc'
 c
-      open(unit=ISTDOUT, form="print")
-      open(unit=ISTDERR, form="print")
+      open(unit=ISTDOUT)
+      open(unit=ISTDERR)
 c
       if (iargc() .lt. 5) then
 	write(ISTDERR,*) 'Syntax:info_file topic pp_def first last [pagesize]'
-	call exit(long(1))
+	call exit(1)
       endif
 c
-      call getarg(long(1), infofile)
-      call getarg(long(2), topic)
-      call getarg(long(3), ppdef)
-      call getarg(long(4), first)
-      call getarg(long(5), last)
+      call getarg(1, infofile)
+      call getarg(2, topic)
+      call getarg(3, ppdef)
+      call getarg(4, first)
+      call getarg(5, last)
       if (llt(last,first)) then
 	write(ISTDERR,*) 'Syntax:info_file topic pp_def first last [pagesize]'
-	call exit(long(1))
+	call exit(1)
       endif
       if (iargc() .ge. 6) then
-	call getarg(long(6), string)
+	call getarg(6, string)
 	read(string,iostat=ierr,fmt='(i10)') pagesize
 	if (ierr .ne. 0 .or. pagesize .le. 0) then
 	   write(ISTDERR,*) 'Syntax:info_file topic pp_def first last [pagesize]'
-	   call exit(long(1))
+	   call exit(1)
         endif
       else
 	pagesize = 60
@@ -81,7 +81,7 @@
       loc = findminmatch(nodes, next, start, topic, ISTDERR)
       if (loc .eq. NULL) then
 	  write(ISTDERR,*) 'No topic with the name: ', topic(1:lnblnk(topic))
-	  call exit(long(1))
+	  call exit(1)
       endif
 c     Checks that the desired topic exists
 c
@@ -111,7 +111,7 @@
 c
         if (loc .eq. NULL) then
 	  write(ISTDERR,*) 'No topic with the name: ', topic(1:lnblnk(topic))
-	  call exit(long(1))
+	  call exit(1)
         endif
 c       Checks that the desired topic exists
 c
@@ -247,7 +247,7 @@
 c
 100	continue
 c
-101   call exit(long(0))
+101   call exit(0)
 c
       end
 c
diff -uNr 3.5/explain/source/mkexp.f unipops-3.6/explain/source/mkexp.f
--- 3.5/explain/source/mkexp.f	2000-03-16 11:31:16.000000000 -0700
+++ unipops-3.6/explain/source/mkexp.f	2008-12-29 14:36:50.000000000 -0700
@@ -13,13 +13,13 @@
       integer*4 ploc, findminmatch, findchar, i0, i1, i2, narg, 
      .		available, lnblnk, itemp, findedge, long, itemp2,
      .		itemp3, irtn, system, access
-      integer*2 ISTDOUT, ISTDIN
+      integer*4 ISTDOUT, ISTDIN
       logical insnodechar, delnode, insedge, deledge
 c
       parameter (ISTDOUT = 6)
       parameter (ISTDIN = 5)
 c
-      open(unit=ISTDOUT, form="print")
+      open(unit=ISTDOUT, form="formatted")
 c
       write(ISTDOUT,*) ' '
       write(ISTDOUT,fmt='(1x,a,$)') 'Enter name of information file: '
@@ -441,7 +441,7 @@
 	if (answr .eq. 'y' .or. answr .eq. 'Y') then
 	   write(ISTDOUT,*) ' '
 	   call writeinfo(file)
-	   call exit(long(0))
+	   call exit(int(0))
 	endif
 c
 c--------------------
@@ -451,7 +451,7 @@
         read(ISTDIN,fmt='(a)') answr
 	if (answr .eq. 'y' .or. answr .eq. 'Y') then
 	   write(ISTDOUT,*) ' '
-	   call exit(long(0))
+	   call exit(int(0))
 	endif
 c
 c--------------------
diff -uNr 3.5/explain/text/CookBook/ApM_Environment-Variables.text unipops-3.6/explain/text/CookBook/ApM_Environment-Variables.text
--- 3.5/explain/text/CookBook/ApM_Environment-Variables.text	2000-03-16 11:54:39.000000000 -0700
+++ unipops-3.6/explain/text/CookBook/ApM_Environment-Variables.text	2008-12-29 14:37:51.000000000 -0700
@@ -90,7 +90,7 @@
 
 PATH	   :    This gives the search path that the shell uses to find
 		commands that you type at the Unix prompt.  To use UniPOPS
-		you must include $popsdir/sunbin and $popsdir/utilities
+		you must include $popsdir/bin and $popsdir/utilities
 		some place in your path.
 
 popsproc1  :    This is the first procedure directory.  It is searched by
diff -uNr 3.5/explain/text/CookBook.text unipops-3.6/explain/text/CookBook.text
--- 3.5/explain/text/CookBook.text	2000-03-16 11:54:21.000000000 -0700
+++ unipops-3.6/explain/text/CookBook.text	2008-12-29 14:37:52.000000000 -0700
@@ -4,7 +4,7 @@
 	it as EXPLAIN files.   You can print out a copy of the Cookbook
 	by typing the following Unix commands:
 
-		cd ${popsdir}sunbin
+		cd ${popsdir}bin
 		make -f Makeman cookbook
   
 	Note: the Cookbook is about 200 pages long so keep your printer
diff -uNr 3.5/explain/text/Installation.text unipops-3.6/explain/text/Installation.text
--- 3.5/explain/text/Installation.text	2000-03-16 15:37:38.000000000 -0700
+++ unipops-3.6/explain/text/Installation.text	2008-12-29 14:37:55.000000000 -0700
@@ -207,7 +207,7 @@
    utilities: source code and scripts for useful utilities as well as,
 	    after installation, the executables for these utilities.
 
-   sunbin: the main Makefile for UniPOPS and most of the shell scripts
+   bin: the main Makefile for UniPOPS and most of the shell scripts
 	    used by the user as well as the non-utility executables.
 
    xwindows: the X11 graphics interface.
@@ -268,15 +268,15 @@
 4.1 Editing a Controlling Script.
 ---------------------------------
 
-   The master Makefile in $popsdir/sunbin is a monster.  A smaller
+   The master Makefile in $popsdir/bin is a monster.  A smaller
 shell script, makelocal, is used to control the behavior of this
 monster.  Copy makelocal to some other file name (e.g., makemysystem)
 and edit it as appropriate and as outlined below for your system.
 Type the following:
 
-   % cd $popsdir/sunbin
+   % cd $popsdir/bin
 
-   [move to the sunbin area]
+   [move to the bin area]
 
    % cp makelocal makemysystem
 
@@ -347,7 +347,7 @@
 
    With makemysystem edited, type:
 
-   % cd $popsdir/sunbin
+   % cd $popsdir/bin
    % makemysystem links
 
    [this makes sure that certain symbolic links are correct] [You will
@@ -371,7 +371,7 @@
 Maddalena, rmaddale@nrao.edu or 304-456-2207.  To compile the programs
 necessary for remote Green Bank data access, type:
 
-   % cd $popsdir/sunbin
+   % cd $popsdir/bin
    % makemysystem gball
 
     There is currently no remote access for 12-meter data so you should
@@ -387,7 +387,7 @@
 modified.  UniPOPS knowledge of printers is kept in a printers data
 base file that needs to be updated to reflect your configuration of
 printers.  You may want to modify and use the suite of "dot" files in
-the $sunbin/sys.unipops directory.
+the $bin/sys.unipops directory.
 
    The environment variables which MUST be set before using the program
 are described below.  [These are also described in Appendix M of the
@@ -443,7 +443,7 @@
    list of available printers and asked to choose one.  Setting this
    variable eliminates one question at startup.
 
-path -- must include ${popsdir}sunbin and ${popsdir}utilities.
+path -- must include ${popsdir}bin and ${popsdir}utilities.
 
    To set the environment variables in a user's account, you have a
 choice of modifying and using setup ("dot") files provided by us in the
@@ -457,7 +457,7 @@
    The $popsdir/sys.unipops/prepare.unipops shell script prepares the
 directory from which it is run for using UniPOPS.  The script creates a
 ~/.unipops file which contains the definitions of most of the required
-environment variables.  It also calls $popsdir/sunbin/mkfiles.unipops
+environment variables.  It also calls $popsdir/bin/mkfiles.unipops
 which creates the files that UniPOPS needs in order to run (memory
 files, and empty data and log files).
 
@@ -540,7 +540,7 @@
 
 	setenv popsprinter postscript
 	# Choices are:  whatever is the name of a printer in the 
-	# $popsdir/sunbin/printer file (see Section 5.3).
+	# $popsdir/bin/printer file (see Section 5.3).
 
 	if (-e ~/.unipops) then
       		source ~/.unipops
@@ -578,14 +578,14 @@
 
     The information that UniPOPS needs on all printers that
 you want UniPOPS to use must be located in a file name "printers" in
-the $popsdir/sunbin directory.  There is a heavily commented file,
-printers.example, that you should find in $popsdir/sunbin as well as
+the $popsdir/bin directory.  There is a heavily commented file,
+printers.example, that you should find in $popsdir/bin as well as
 the printers file that is currently in use in Charlottesville,
 printers.cv.  The simplest way to create a printers file appropriate
 for your installation is to copy the example file to "printers" and
 then edit the copy.
 
-	% cd $popsdir/sunbin
+	% cd $popsdir/bin
 	% cp printers.example printers
 	% vi printers
 
@@ -701,7 +701,7 @@
 -----------
 
    The edit2.exe script may need to be modified.   Within edit2.exe
-(found in the $popsdir/sunbin directory) is a list of available editors
+(found in the $popsdir/bin directory) is a list of available editors
 divided into those that use the window environment and those that
 don't.  You may need to edit this file if you have editors that you
 like that we don't have or if we have editors that you don't have.
@@ -765,7 +765,7 @@
 -----------------------------------
 
    UniPOPS has a messages and news facility (controlled by messages.exe
-and news.exe in the $popsdir/sunbin directory).  The primary difference
+and news.exe in the $popsdir/bin directory).  The primary difference
 between messages and news is that a user can chose to read, or not to
 read, news items when the program starts and messages are simply shown
 to the user without any option to skip them.  There are separate
@@ -955,12 +955,12 @@
    Documentation in UniPOPS consists of a set of on-line help files, a
 subset of which is a Cookbook and Reference Manual.  To print out
 either the Cookbook or Reference Manual, you must first edit a special
-Makefile called Makeman found in the $popsdir/sunbin directory and then
+Makefile called Makeman found in the $popsdir/bin directory and then
 run 'make' on that file.
 
    To edit the file:
 
-	% cd $popsdir/sunbin
+	% cd $popsdir/bin
 	% vi Makeman
 
 You should only need to modify the variables FRMTR, PRNTR, ADDPAGE,
@@ -987,10 +987,10 @@
    You can elect to receive a copy of the Cookbook from NRAO via mail.
 However, you may wish to print out a hard copy (its large, nearly 300
 pages if printed with one manual page per printed page).  Once you have
-edited the Makeman file in $popsdir/sunbin, you should run 'make' on the
+edited the Makeman file in $popsdir/bin, you should run 'make' on the
 file:
 
-	% cd $popsdir/sunbin
+	% cd $popsdir/bin
 	% make -f Makeman cookbook
 
 The Cookbook has not changed from the version that accompanied version 3.3.
@@ -1006,7 +1006,7 @@
 print out the Reference Manual, you should make sure printer has a lot of
 paper available and:
 
-	% cd $popsdir/sunbin
+	% cd $popsdir/bin
 	% make -f Makeman reference
 
 8.0 Known Problems.
@@ -1105,14 +1105,14 @@
 
 [ ]  Create and edit your local copy of the file
 
-		$popsdir/sunbin/makemysystem
+		$popsdir/bin/makemysystem
 
-	using the file $pospdir/sunbin/makelocal as a model and as described
+	using the file $pospdir/bin/makelocal as a model and as described
 	in Section 4.1
 
 [ ]  Make UniPOPS by typing:
 
-		cd $popsdir/sunbin
+		cd $popsdir/bin
 		makemysystem links
 		makemysystem cvall
 
@@ -1130,11 +1130,11 @@
 [ ]  Create a printers file for your installation by editing the
      	example printers file:
 
-		cd $popsdir/sunbin
+		cd $popsdir/bin
 		cp printers.example printers
 		vi printers      (or use the editor of your choice)
 
-[ ]  Edit the $popsdir/sunbin/edit2.exe file if necessary.
+[ ]  Edit the $popsdir/bin/edit2.exe file if necessary.
 
 [ ]  Create the symbolic link called 'old' by typing:
 
@@ -1157,7 +1157,7 @@
 
 [ ]  If you want to print out the documentation, first edit the file:
 
-		$popsdir/sunbin/Makeman
+		$popsdir/bin/Makeman
 
 	and then print out the documentation using the commands
 	described in Sections 7.1 or 7.2.
diff -uNr 3.5/explain/text/Reference-Manual.text unipops-3.6/explain/text/Reference-Manual.text
--- 3.5/explain/text/Reference-Manual.text	2000-03-16 11:54:22.000000000 -0700
+++ unipops-3.6/explain/text/Reference-Manual.text	2008-12-29 14:37:53.000000000 -0700
@@ -3,7 +3,7 @@
 	the bulk of the Reference Manual.  You can print out a hard copy
         of the Reference Manual by typing the following Unix commands:
 
-		cd ${popsdir}sunbin
+		cd ${popsdir}bin
 		make -f Makeman reference
   
 	Note: the Cookbook is over 700 pages long so keep your printer
diff -uNr 3.5/fonts/Makefile unipops-3.6/fonts/Makefile
--- 3.5/fonts/Makefile	2000-03-16 11:31:09.000000000 -0700
+++ unipops-3.6/fonts/Makefile	2008-12-29 14:39:20.000000000 -0700
@@ -8,4 +8,4 @@
 all:	$(FONTLIST)
 
 clean:
-	-sccs clean
+#	-sccs clean
diff -uNr 3.5/includes/core.inc unipops-3.6/includes/core.inc
--- 3.5/includes/core.inc	2000-03-16 11:28:48.000000000 -0700
+++ unipops-3.6/includes/core.inc	2008-12-29 14:37:57.000000000 -0700
@@ -19,7 +19,7 @@
      . s_sort,s_object,default,cnterr,hghterr,hwerr,conline,clut,
      . typetip,eta,tau0,ftm,ftsbr,trcvr,etafree,tvane,userprompt,
      . fbver,hcver,conver,cclick,tclick,vclick,fclick,mclick,xclick,
-     . yclick,crossflag,defmode
+     . yclick,crossflag,defmode,ffbver,aosver,ctsver
       character*32 ctitle
       character*16 cxtitle,cytitle,cs_object
       character*8 cuserprompt
@@ -29,7 +29,7 @@
 c	NOTE:  Make sure that the order and sizes of variables agree with
 c	what is set in POPSDAT.  Array sizes MUST be declared in the
 c	common block definition below and NOT in the declerations above.
-c	Except for K arrays,all variables must be R*4's -- use equivalneces
+c	Except for K arrays,all variables must be R*4's -- use equivalences
 c	for strings.  Initial values for arrays and strings are set in
 c	ARAININT; for scalars,values are set in POPSDAT.
 c
@@ -50,7 +50,7 @@
      . HMARK(12),CENTER(24),HEIGHT(24),HWIDTH(24),cnterr(24),
      . hghterr(24),hwerr(24),SMWGT(12),BADPT(12),gmfrac(5),gout(6,5),
      . mlims(2,5),LEVS(32),flevs(32),BPARM(15),status(32),conline(32),
-     . clut(3,32),fbver,hcver,conver,PROTECTED(255)
+     . clut(3,32),fbver,hcver,conver,aosver,ffbver,ctsver,PROTECTED(255)
 c
       equivalence (k(1),c(1)),(k(8),kxorg),(kkt(1),k(51)),
      .            (kx(1),c(16384))
diff -uNr 3.5/includes/defaults.inc unipops-3.6/includes/defaults.inc
--- 3.5/includes/defaults.inc	2000-03-16 11:33:34.000000000 -0700
+++ unipops-3.6/includes/defaults.inc	2008-12-29 14:37:59.000000000 -0700
@@ -1,8 +1,8 @@
-       INTEGER*2 OFFSETS(  141), NUMTAGS
-       REAL*8 DEFVALUES(  141)
-       DATA NUMTAGS/  141/
-      DATA OFFSETS(  1) /     1/, DEFVALUES(  1) /X'7FF0000000000000'/
-      DATA OFFSETS(  2) / 16390/, DEFVALUES(  2) /X'7FF0000000000000'/
+       INTEGER*2 OFFSETS( 144), NUMTAGS
+       REAL*8 DEFVALUES( 144)
+       DATA NUMTAGS/ 144/
+      DATA OFFSETS(  1) /   144/, DEFVALUES(  1) /X'          93AA1C'/
+      DATA OFFSETS(  2) / 16390/, DEFVALUES(  2) /X'          93AA1C'/
       DATA OFFSETS(  3) / 16391/, DEFVALUES(  3) /3.0                /
       DATA OFFSETS(  4) / 16392/, DEFVALUES(  4) /1.0                /
       DATA OFFSETS(  5) / 16393/, DEFVALUES(  5) /1.0                /
@@ -61,33 +61,33 @@
       DATA OFFSETS( 58) / 16446/, DEFVALUES( 58) /-1.0               /
       DATA OFFSETS( 59) / 16447/, DEFVALUES( 59) /11111.             /
       DATA OFFSETS( 60) / 16448/, DEFVALUES( 60) /-1.0               /
-      DATA OFFSETS( 61) / 16449/, DEFVALUES( 61) /X'7FF0000000000000'/
-      DATA OFFSETS( 62) / 16450/, DEFVALUES( 62) /X'7FF0000000000000'/
-      DATA OFFSETS( 63) / 16451/, DEFVALUES( 63) /X'7FF0000000000000'/
-      DATA OFFSETS( 64) / 16452/, DEFVALUES( 64) /X'7FF0000000000000'/
-      DATA OFFSETS( 65) / 16453/, DEFVALUES( 65) /X'7FF0000000000000'/
-      DATA OFFSETS( 66) / 16454/, DEFVALUES( 66) /X'7FF0000000000000'/
-      DATA OFFSETS( 67) / 16455/, DEFVALUES( 67) /X'7FF0000000000000'/
-      DATA OFFSETS( 68) / 16456/, DEFVALUES( 68) /X'7FF0000000000000'/
-      DATA OFFSETS( 69) / 16457/, DEFVALUES( 69) /X'7FF0000000000000'/
-      DATA OFFSETS( 70) / 16458/, DEFVALUES( 70) /X'7FF0000000000000'/
-      DATA OFFSETS( 71) / 16459/, DEFVALUES( 71) /X'7FF0000000000000'/
-      DATA OFFSETS( 72) / 16460/, DEFVALUES( 72) /X'7FF0000000000000'/
-      DATA OFFSETS( 73) / 16461/, DEFVALUES( 73) /X'7FF0000000000000'/
-      DATA OFFSETS( 74) / 16462/, DEFVALUES( 74) /X'7FF0000000000000'/
-      DATA OFFSETS( 75) / 16463/, DEFVALUES( 75) /X'7FF0000000000000'/
-      DATA OFFSETS( 76) / 16464/, DEFVALUES( 76) /X'7FF0000000000000'/
-      DATA OFFSETS( 77) / 16465/, DEFVALUES( 77) /X'7FF0000000000000'/
-      DATA OFFSETS( 78) / 16466/, DEFVALUES( 78) /X'7FF0000000000000'/
-      DATA OFFSETS( 79) / 16467/, DEFVALUES( 79) /X'7FF0000000000000'/
-      DATA OFFSETS( 80) / 16468/, DEFVALUES( 80) /X'7FF0000000000000'/
-      DATA OFFSETS( 81) / 16469/, DEFVALUES( 81) /X'7FF0000000000000'/
-      DATA OFFSETS( 82) / 16470/, DEFVALUES( 82) /X'7FF0000000000000'/
-      DATA OFFSETS( 83) / 16471/, DEFVALUES( 83) /X'7FF0000000000000'/
-      DATA OFFSETS( 84) / 16472/, DEFVALUES( 84) /X'7FF0000000000000'/
-      DATA OFFSETS( 85) / 16473/, DEFVALUES( 85) /X'7FF0000000000000'/
-      DATA OFFSETS( 86) / 16474/, DEFVALUES( 86) /X'7FF0000000000000'/
-      DATA OFFSETS( 87) / 16475/, DEFVALUES( 87) /X'7FF0000000000000'/
+      DATA OFFSETS( 61) / 16449/, DEFVALUES( 61) /X'          93AA1C'/
+      DATA OFFSETS( 62) / 16450/, DEFVALUES( 62) /X'          93AA1C'/
+      DATA OFFSETS( 63) / 16451/, DEFVALUES( 63) /X'          93AA1C'/
+      DATA OFFSETS( 64) / 16452/, DEFVALUES( 64) /X'          93AA1C'/
+      DATA OFFSETS( 65) / 16453/, DEFVALUES( 65) /X'          93AA1C'/
+      DATA OFFSETS( 66) / 16454/, DEFVALUES( 66) /X'          93AA1C'/
+      DATA OFFSETS( 67) / 16455/, DEFVALUES( 67) /X'          93AA1C'/
+      DATA OFFSETS( 68) / 16456/, DEFVALUES( 68) /X'          93AA1C'/
+      DATA OFFSETS( 69) / 16457/, DEFVALUES( 69) /X'          93AA1C'/
+      DATA OFFSETS( 70) / 16458/, DEFVALUES( 70) /X'          93AA1C'/
+      DATA OFFSETS( 71) / 16459/, DEFVALUES( 71) /X'          93AA1C'/
+      DATA OFFSETS( 72) / 16460/, DEFVALUES( 72) /X'          93AA1C'/
+      DATA OFFSETS( 73) / 16461/, DEFVALUES( 73) /X'          93AA1C'/
+      DATA OFFSETS( 74) / 16462/, DEFVALUES( 74) /X'          93AA1C'/
+      DATA OFFSETS( 75) / 16463/, DEFVALUES( 75) /X'          93AA1C'/
+      DATA OFFSETS( 76) / 16464/, DEFVALUES( 76) /X'          93AA1C'/
+      DATA OFFSETS( 77) / 16465/, DEFVALUES( 77) /X'          93AA1C'/
+      DATA OFFSETS( 78) / 16466/, DEFVALUES( 78) /X'          93AA1C'/
+      DATA OFFSETS( 79) / 16467/, DEFVALUES( 79) /X'          93AA1C'/
+      DATA OFFSETS( 80) / 16468/, DEFVALUES( 80) /X'          93AA1C'/
+      DATA OFFSETS( 81) / 16469/, DEFVALUES( 81) /X'          93AA1C'/
+      DATA OFFSETS( 82) / 16470/, DEFVALUES( 82) /X'          93AA1C'/
+      DATA OFFSETS( 83) / 16471/, DEFVALUES( 83) /X'          93AA1C'/
+      DATA OFFSETS( 84) / 16472/, DEFVALUES( 84) /X'          93AA1C'/
+      DATA OFFSETS( 85) / 16473/, DEFVALUES( 85) /X'          93AA1C'/
+      DATA OFFSETS( 86) / 16474/, DEFVALUES( 86) /X'          93AA1C'/
+      DATA OFFSETS( 87) / 16475/, DEFVALUES( 87) /X'          93AA1C'/
       DATA OFFSETS( 88) / 16476/, DEFVALUES( 88) /0.0                /
       DATA OFFSETS( 89) / 16477/, DEFVALUES( 89) /0.0                /
       DATA OFFSETS( 90) / 16478/, DEFVALUES( 90) /0.84               /
@@ -107,13 +107,13 @@
       DATA OFFSETS(104) / 16492/, DEFVALUES(104) /0.0                /
       DATA OFFSETS(105) / 16493/, DEFVALUES(105) /0.0                /
       DATA OFFSETS(106) / 16494/, DEFVALUES(106) /0.0                /
-      DATA OFFSETS(107) / 16495/, DEFVALUES(107) /X'7FF0000000000000'/
-      DATA OFFSETS(108) / 16496/, DEFVALUES(108) /X'7FF0000000000000'/
-      DATA OFFSETS(109) / 16504/, DEFVALUES(109) /X'7FF0000000000000'/
-      DATA OFFSETS(110) / 16508/, DEFVALUES(110) /X'7FF0000000000000'/
-      DATA OFFSETS(111) / 16512/, DEFVALUES(111) /X'7FF0000000000000'/
-      DATA OFFSETS(112) / 16516/, DEFVALUES(112) /X'7FF0000000000000'/
-      DATA OFFSETS(113) / 16517/, DEFVALUES(113) /X'7FF0000000000000'/
+      DATA OFFSETS(107) / 16495/, DEFVALUES(107) /X'          93AA1C'/
+      DATA OFFSETS(108) / 16496/, DEFVALUES(108) /X'          93AA1C'/
+      DATA OFFSETS(109) / 16504/, DEFVALUES(109) /X'          93AA1C'/
+      DATA OFFSETS(110) / 16508/, DEFVALUES(110) /X'          93AA1C'/
+      DATA OFFSETS(111) / 16512/, DEFVALUES(111) /X'          93AA1C'/
+      DATA OFFSETS(112) / 16516/, DEFVALUES(112) /X'          93AA1C'/
+      DATA OFFSETS(113) / 16517/, DEFVALUES(113) /X'          93AA1C'/
       DATA OFFSETS(114) / 16519/, DEFVALUES(114) / 0.0               /
       DATA OFFSETS(115) / 16521/, DEFVALUES(115) / 0.0               /
       DATA OFFSETS(116) / 16553/, DEFVALUES(116) / 0.0               /
@@ -131,14 +131,17 @@
       DATA OFFSETS(128) / 16805/, DEFVALUES(128) / 0.0               /
       DATA OFFSETS(129) / 16817/, DEFVALUES(129) / 0.0               /
       DATA OFFSETS(130) / 16822/, DEFVALUES(130) / 0.0               /
-      DATA OFFSETS(131) / 16852/, DEFVALUES(131) /X'7FF0000000000000'/
+      DATA OFFSETS(131) / 16852/, DEFVALUES(131) /X'          93AA1C'/
       DATA OFFSETS(132) / 16862/, DEFVALUES(132) /-999999.           /
       DATA OFFSETS(133) / 16894/, DEFVALUES(133) /-999999.           /
       DATA OFFSETS(134) / 16926/, DEFVALUES(134) / 0.0               /
       DATA OFFSETS(135) / 16941/, DEFVALUES(135) / 0.0               /
       DATA OFFSETS(136) / 16973/, DEFVALUES(136) / 0.0               /
       DATA OFFSETS(137) / 17005/, DEFVALUES(137) /-16.0              /
-      DATA OFFSETS(138) / 17101/, DEFVALUES(138) /X'7FF0000000000000'/
-      DATA OFFSETS(139) / 17102/, DEFVALUES(139) /X'7FF0000000000000'/
-      DATA OFFSETS(140) / 17103/, DEFVALUES(140) /X'7FF0000000000000'/
-      DATA OFFSETS(141) / 17104/, DEFVALUES(141) /X'7FF0000000000000'/
+      DATA OFFSETS(138) / 17101/, DEFVALUES(138) /X'          93AA1C'/
+      DATA OFFSETS(139) / 17102/, DEFVALUES(139) /X'          93AA1C'/
+      DATA OFFSETS(140) / 17103/, DEFVALUES(140) /X'          93AA1C'/
+      DATA OFFSETS(141) / 17104/, DEFVALUES(141) /.0                 /
+      DATA OFFSETS(142) / 17105/, DEFVALUES(142) /X'          93AA1C'/
+      DATA OFFSETS(143) / 17106/, DEFVALUES(143) /.0                 /
+      DATA OFFSETS(144) / 17107/, DEFVALUES(144) /X'          93AA1C'/
diff -uNr 3.5/includes/lsf.inc unipops-3.6/includes/lsf.inc
--- 3.5/includes/lsf.inc	2000-03-16 11:28:48.000000000 -0700
+++ unipops-3.6/includes/lsf.inc	2008-12-29 14:37:57.000000000 -0700
@@ -6,5 +6,5 @@
       COMMON /LSF/ LISTF
 c
 c     listf = array containing the listings of the currently
-c	avaialable procedures
+c	available procedures
 c
diff -uNr 3.5/includes/sdd.h unipops-3.6/includes/sdd.h
--- 3.5/includes/sdd.h	2000-03-16 11:28:49.000000000 -0700
+++ unipops-3.6/includes/sdd.h	2008-12-29 14:37:58.000000000 -0700
@@ -14,8 +14,23 @@
  *
 */
 
+
+/* some macros for swapping the byte order */
+//#define SWAP_SHORT(Var)  Var = *(short*) SwapEndian((void*)&Var, sizeof(short))
+//#define SWAP_LONG(Var)   Var = *(int*) SwapEndian((void*)&Var, sizeof(int))
+//#define SWAP_FLOAT(Var)  Var = *(float*) SwapEndian((void*)&Var, sizeof(float))
+//#define SWAP_DOUBLE(Var) Var = *(double*) SwapEndian((void*)&Var, sizeof(double))
+//#define SWAP_ARRAY(Var, size) Var = (void*)SwapEndian((void*)&Var, size)
+
 #define NUMBER_HEADER_CLASS 13
 
+//extern void *SwapEndian(void* Addr, const int Nb);
+
+extern void swapdouble(double *dp, int n);
+extern void swapfloat(float *fp, int n);
+extern void swaplong(unsigned int *lp, int n);
+extern void swapshort(unsigned short *sp, int n);
+
 /*		class 11 is still in the proto type phase */
 /*		for now, a number of the parameters here are */
 /*		dependant on each other, modify them carefully */
diff -uNr 3.5/includes/smt/pdfl.h unipops-3.6/includes/smt/pdfl.h
--- 3.5/includes/smt/pdfl.h	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/includes/smt/pdfl.h	2008-12-29 14:37:59.000000000 -0700
@@ -0,0 +1,91 @@
+/*
+** @(#)pdfl.h	5.1 06/22/94
+**
+** data structures useful for tucson pdfl files
+**
+*/
+
+#ifndef PDFL_H
+
+typedef struct 	{
+	short	ndir;		/* No. of blocks in directory table */
+        short   maxent;		/* Max no. of entries in dir table  */
+        short   bytperent;	/* bytes per dir table entry */ 
+	short   nextent;	/* next available dir table entry */
+	short   lastblk;	/* block of next available entry */
+	short   nextblk;        /* next block location in file for data */
+
+				/* these 6 are not used by unipops */
+	short   nxtb;		/* last dir table block currently used */
+	short	nbcal;		/* first block where cal data are stored */
+	short	nbsv;		/* first block where save scans stored */
+	short   nbwrk;		/* first block of integration work area */
+	short	nbscr;		/* first block of link task scratch area */
+        short	pftype;		/* POPS file type */
+
+	char	obsname[16];	/* observer name */
+	char	pid[8];		/* Project ID */
+
+	char	binfmt_id[16];	/* Binary number format ID */
+
+	short	ifiller[224];   /* fills it out to 512 bytes */ 	
+	}	pdfl_bs_block;  /* bootstrap block */
+
+/*	WARNING:  This gets padded out to 64 bytes !!! */
+
+typedef struct {
+	long	scan_number;	
+	char	mode[4];	
+	long	blk1;		/* block location of first "feed" */
+	long    nblk1; 		/* number of blocks for first "feed" */
+	long    blk2;		/* block location of second "feed" */
+        long    nblk2;		/* number of block for second "feed" */
+	char	source_name[16];
+	double	velocity, rest_freq;
+        short   subscan;
+} pdfl_index_entry;
+
+typedef struct {
+	long	scan_number;	
+	char	mode[4];	
+	long	blk1;		/* block location of first "feed" */
+	long    nblk1; 		/* number of blocks for first "feed" */
+	long    blk2;		/* block location of second "feed" */
+        long    nblk2;		/* number of block for second "feed" */
+	char	source_name[16];
+	double	velocity, rest_freq;
+} old_pdfl_index_entry;
+
+typedef struct {
+	long	scan_number;
+        }	gzfl_index_entry;   /* old, pre Sept 91 gzfl index format */
+
+typedef struct {
+	long	scan_number;
+	char	type[2]; 	/* ED, edit scans, KP, keep scans */
+	char	mode[2];	/* LI, line, CO, continuum */
+	short	blk;
+	short   nblk;		
+	}	pkfl_index_entry;	
+
+#define PDBUFSIZE sizeof(pdfl_bs_block)
+#define MAXENT 2048
+/*		see warning above for reason why sizeof won't work here */
+#define BYTPERENT 58
+#define OLD_BYTPERENT sizeof(old_pdfl_index_entry)
+#define NDIR ((MAXENT * BYTPERENT) / PDBUFSIZE)
+#define OLD_NDIR ((MAXENT * OLD_BYTPERENT) / PDBUFSIZE)
+#define INDEX_BLOCK(ENTRY) (((ENTRY)*(BYTPERENT))/(PDBUFSIZE))
+#define BLOCK_OFFSET(ENTRY)(((ENTRY)*(BYTPERENT)) % (PDBUFSIZE))
+#define ISNEW(A) ((A).bs.bytperent == BYTPERENT)
+
+typedef struct {
+	int fd;		/* file descriptor */
+	char name[256]; /* name of file */
+	pdfl_bs_block bs; 	/* boot strap block */
+	pdfl_index_entry index[MAXENT]; /* index, gains if GZFL file */
+        old_pdfl_index_entry old_index[MAXENT]; /* used only for old type */
+	} pdfl_file;
+
+#define PDFL_H
+#endif
diff -uNr 3.5/includes/smt/smt_online_sdd.h unipops-3.6/includes/smt/smt_online_sdd.h
--- 3.5/includes/smt/smt_online_sdd.h	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/includes/smt/smt_online_sdd.h	2008-12-29 14:37:59.000000000 -0700
@@ -0,0 +1,197 @@
+/* ---------------------------------------------------------------------------
+ *  @(#)smt_online_sdd.h	5.2 09/10/98
+ * ---------------------------------------------------------------------------
+
+/*
+ * on_line data structure for pdfl files written at the 12-meter
+ * Hopefully this will work for the SMT -- we never used PDFL... -CAK
+ * This is from pdfl.h version 1.9 (9/24/92) of the cactus system 
+ */
+
+typedef struct smt_sdd_header
+{
+	short		number_header_class;
+        short		class_location[15];
+
+	double		header_length;
+	double		data_length;
+	double		scan_number;
+	char		observer_initials[8];
+	char		observer_name[16];
+	char		telescope[8];
+	char		project_ident[8];
+	char		source_name[16];
+	char		type_data[8];
+	char		front_end_desc[8];
+	char		back_end_desc[8];
+	char		data_precision[8];
+
+	double		tot_azra_pointing;
+	double		tot_eldec_pointing;
+	double		user_azra_pointing;
+	double		user_eldec_pointing;
+	double		pointing_constant[4];
+	double		orient_angle;
+	double		radial_focus;
+	double		north_south_focus;
+	double		east_west_focus;
+	char		pt_model[8];
+
+	double		ut_date;
+	double		utime;
+	double		lst;
+	double		nb_receiv_channels;
+	double		nb_sw_variables;
+	double		nb_phases;
+	double		length_cycle;
+	double		length_sample;
+	char		class11_type[8];
+
+	double		epoch;
+	double		sourcex;
+	double		sourcey;
+	double		referencex;
+	double		referencey;
+	double		epoch_ra;
+	double		epoch_dec;
+	double		galactic_l;
+	double		galactic_b;
+	double		azimuth;
+	double		elevation;
+	double		xposition;
+	double		yposition;
+	double		desc_origin[3];
+	char		coord_sys_code[8];
+
+	double		amb_temp;
+        double          pressure;
+        double          relative_humidity;
+        double          index_refraction;
+        double          dew_point;
+        double          mm_h2o;
+
+	double		map_scan_angle;
+	double		xposition_zero;
+	double		yposition_zero;
+ 	double		deltax_rate;
+	double		deltay_rate;
+	double		nb_grid_pt;
+	double		x_grid_pt;
+	double		y_grid_pt;
+	double		x_grid_cell_nb;
+	double		y_grid_cell_nb;
+	char		xy_ref_frame_code[8];
+
+	double		beam;
+	double		off_scan_nb;
+	double		bad_channel_value;
+	double		velocity_correct;
+	double		velocity_ref;
+	char		velocity_def_ref[8];
+	char		type_calibration[8];
+
+	double		antenna_aperature_eff;
+        double          antenna_beam_eff;
+        double          antenna_gain;
+        double          etal;
+        double          etalfss;
+
+	double 		synth_freq;
+	double		lo_factor;
+	double		harmonic;
+	double		lo_if;
+	double		first_if;
+	double		ref_AZ_offset;
+	double		ref_EL_offset;
+	double		beam_throw;
+	double		beam_orient;
+	double		bl_offset;
+	double		obs_tol;
+	double		sideband;
+	double		wavelength;
+	double		gain_scan;
+	double		p_beam[2];
+	double		m_beam[2];
+	double		RA_DEC_offsets[4];
+	double		freq_off_signal;
+	double		freq_off_ref_1;
+	double		freq_off_ref_2;
+
+	char		open_param_values[80];
+
+	double		nb_sw_variables_fast;
+        double		nb_cycles;
+        double		nb_cycles_fast;
+        double		nb_phases_fast;
+        double		length_cycle_fast;
+        double		length_sample_fast;
+        struct {
+           double          variable_value;
+           char            variable_desc[8];
+           char            phase_table[32];
+        } cl11ent[10];
+/*		10 used here but only 5 in the original pdfl.h */
+
+	double		obs_freq;
+	double		rest_freq;
+	double		freq_resolution;
+	double		bandwidth;
+	double		receiver_temp;
+	double		calibration_temp;
+	double		source_syst_temp;
+	double		ref_sys_temp;
+	double		source_temp;
+	double		std_deviation_mean;
+	double		ref_point_nb;
+	double		xvalue_ref_pt;
+	double		deltax;
+	double		tot_integ_time;
+	double		nb_integrations;
+	double		starting_pt_nb;
+	double		h2o_opacity;
+	double		h2o_temp;
+	double		o2_opacity;
+	double		o2_temp;
+	char		polarization[8];
+	double		effint;
+	char		receiver_info[16];
+
+	double		nb_scans_stacked;
+	double		f_scan_stack;
+	double		l_scan_stack;
+	double		line_amplitude;
+	double		line_width;
+	double		integrated_line_int;
+	double		rms_noise;
+	double		save[38];
+
+} smtsddheader;
+
+#ifndef MAX_DATA_POINTS
+#define MAX_DATA_POINTS 16384  /* max number of data values */
+#endif
+
+typedef struct smt_sdd_format
+{
+	smtsddheader header;
+	float data[MAX_DATA_POINTS];
+} smtsddformat;
+
+/*		the default class pointers for this structure	*/
+
+#define TUC_NUMBER_HEADER_CLASS 13
+#define TUC_CLASS_1 5
+#define TUC_CLASS_2 19
+#define TUC_CLASS_3 32
+#define TUC_CLASS_4 41
+#define TUC_CLASS_5 58
+#define TUC_CLASS_6 64
+#define TUC_CLASS_7 75
+#define TUC_CLASS_8 82
+#define TUC_CLASS_9 87
+#define TUC_CLASS_10 112
+#define TUC_CLASS_11 122		
+#define TUC_CLASS_12 188
+#define TUC_CLASS_13 212
+#define TUC_CLASS_14 257
+#define TUC_CLASS_15 0
diff -uNr 3.5/includes/smt/smtaccess.h unipops-3.6/includes/smt/smtaccess.h
--- 3.5/includes/smt/smtaccess.h	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/includes/smt/smtaccess.h	2008-12-29 14:37:59.000000000 -0700
@@ -0,0 +1,67 @@
+
+/* @(#)smtaccess.h	09/21/06 */
+
+#ifndef SMTACCESS_H
+
+#include <files.h>
+
+typedef struct {
+   sddfile datafile;
+   sddfile gainfile;
+   int data_status;
+   int gain_status;
+   int version;
+   char type[8];
+} smtfile;
+
+smtfile onfile[6];
+
+char obsinit[6], datadir[160];
+
+int filetype;
+
+
+#define ST_OK 0			/* the file is fine */
+#define ST_UNAVAIL -1		/* the file is not to be opened */
+
+/*			these match the values in POPSDAT.ADVERBS */
+
+#define HCTYPE 1
+#define FBTYPE 2
+#define CONTYPE 3
+#define AOSTYPE 4
+#define FFBTYPE 5
+#define CTSTYPE 6
+
+static struct {
+   char *c;
+} ftype[6] = {
+   "HCTYPE",
+   "FBTYPE",
+   "CONTYPE",
+   "AOSTYPE",
+   "FFBTYPE",
+   "CTSTYPE"
+};
+
+#define SDDFMT 0
+#define IEEEFMT 1
+
+typedef struct {
+   double def_val;
+   char source_name[16];
+   char obs_mode[8];
+   double scan_min, scan_max;
+   double feed_min, feed_max;
+   double x_min, x_max;
+   double y_min, y_max;
+   double lst_min, lst_max;
+   double ut_min, ut_max;
+   double bw_min, bw_max;
+   double f_min, f_max;
+   double rate_min, rate_max;
+   double int_min, int_max;
+} sel_params;
+
+#define SMTACCESS_H
+#endif
diff -uNr 3.5/includes/tuc/pdfl.h unipops-3.6/includes/tuc/pdfl.h
--- 3.5/includes/tuc/pdfl.h	2000-03-16 11:30:36.000000000 -0700
+++ unipops-3.6/includes/tuc/pdfl.h	2008-12-29 14:37:56.000000000 -0700
@@ -1,7 +1,7 @@
 /*
 ** @(#)pdfl.h	5.1 06/22/94
 **
-** data structures usefull for tucson pdfl files
+** data structures useful for tucson pdfl files
 **
 */
 
diff -uNr 3.5/includes/tuc/tuc_online_sdd.h unipops-3.6/includes/tuc/tuc_online_sdd.h
--- 3.5/includes/tuc/tuc_online_sdd.h	2000-03-16 11:29:58.000000000 -0700
+++ unipops-3.6/includes/tuc/tuc_online_sdd.h	2008-12-29 14:37:56.000000000 -0700
@@ -167,7 +167,7 @@
 } tucsddheader;
 
 #ifndef MAX_DATA_POINTS
-#define MAX_DATA_POINTS 16284  /* max number of data values */
+#define MAX_DATA_POINTS 16384  /* max number of data values */
 #endif
 
 typedef struct tuc_sdd_format
diff -uNr 3.5/includes/tuc/tucaccess.h unipops-3.6/includes/tuc/tucaccess.h
--- 3.5/includes/tuc/tucaccess.h	2000-03-16 11:37:57.000000000 -0700
+++ unipops-3.6/includes/tuc/tucaccess.h	2008-12-29 14:37:56.000000000 -0700
@@ -22,7 +22,7 @@
 
 
 #define ST_OK 0			/* the file is fine */
-#define ST_UNAVAIL -1		/* the file is not be opened */
+#define ST_UNAVAIL -1		/* the file is not to be opened */
 
 /*			these match the values in POPSDAT.ADVERBS */
 
diff -uNr 3.5/lnews/AlwaysAll/V3.6_Changes unipops-3.6/lnews/AlwaysAll/V3.6_Changes
--- 3.5/lnews/AlwaysAll/V3.6_Changes	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/lnews/AlwaysAll/V3.6_Changes	2008-12-29 14:39:20.000000000 -0700
@@ -0,0 +1,24 @@
+The following documents changes to UniPOPS since NRAO's version 3.5.
+
+
+I.  Numerous internal changes
+	- added byte-order sensitivity to input sdd files
+	- added byte order sensitivity to the parser
+	- removed all Solaris and sunmath library dependencies
+	- replaced Solaris libs with equivalent C functions
+	- removed support for SunView
+	- error returns are typically int*4, not shorts
+	- string math is done with equivalencies now, not implicitly
+	- cleaner make system and packaging
+	- eliminated need for a f77-capable preprocessor
+
+    This allows UniPOPS to be dramatically more portable.  The next 
+    incremental release will support 3 architectures (Intel, PowerPC, 
+    and Sparc) and 5 OS's (Solaris, Linux, Darwin/OSX, FreeBSD and 
+    NetBSD).
+
+
+II. A few sticky points remain.  EXPLAIN remains broken for non-Solaris 
+    architectures, though HELP remains available.  There is still no 
+    workable color support for generic X11 platforms.  
+
diff -uNr 3.5/procedures/LSETUP unipops-3.6/procedures/LSETUP
--- 3.5/procedures/LSETUP	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/procedures/LSETUP	2008-12-29 14:36:49.000000000 -0700
@@ -0,0 +1,59 @@
+batch a.prc
+batch add.prc
+batch fold.prc
+batch gshow.prc
+batch head.prc
+batch all.prc
+batch reset.prc
+batch addfeed.prc
+batch ldisk.prc
+batch halves.prc
+batch psmsave.prc
+# front end for TEMP (with setup) and its shorthand
+batch tonns.prc
+batch t.prc
+#       spectral line five-point, the basic one plus 2 shorthands
+batch fiveline.prc
+batch fivel1.prc
+batch fivel2.prc
+#       baseline related, bset1 and 2 depend on bsets which calls bset
+batch bset.prc
+batch bsets.prc
+batch bset1.prc
+batch bset2.prc
+# HC/FB selection procedures, also sets global spectype, used by other procs
+batch fbdata.prc
+batch hcdata.prc
+# and set up the default
+fbdata
+# cboth et al.
+batch cboth.prc
+batch xx12m.prc
+batch badch.prc
+# the following depend on cboth (which depends on all) and fbmode and gfbmode
+batch fbmode.prc
+batch gfbmode.prc
+#                disp12m includes s1, s2, and aliases for f and s
+batch disp12m.prc
+batch g.prc
+#                gcdisp12m includes g1 and g2
+batch gcdisp12m.prc
+#                gdisp12m includes ggets, gget1, gget2, gf, and gs
+batch gdisp12m.prc
+# averaging data, they depend on cboth and pstack and numsubs
+batch prcstack.prc
+batch pstack.prc
+#		cbavg.prc includes c1 and c2
+batch cbavg.prc
+batch c1p1.prc
+batch c1p2.prc
+batch cb.prc
+batch cb1.prc
+batch cb2.prc
+#		Just a general avg of the stack
+batch cstack.prc
+# 	aliases
+alias makecopy gcopy
+alias lf fiveline
+alias lf1 fivel1
+alias lf2 fivel2
diff -uNr 3.5/procedures/annotate.prc unipops-3.6/procedures/annotate.prc
--- 3.5/procedures/annotate.prc	2000-03-16 11:31:44.000000000 -0700
+++ unipops-3.6/procedures/annotate.prc	2008-12-29 14:36:39.000000000 -0700
@@ -1,6 +1,5 @@
 procedure annotate
 string*60 note
-#       place a string on the graphics screen
 print "Enter the text you wish to appear on the graphics screen."
 print "It must be surrounded by quotation marks"
 read note
diff -uNr 3.5/procedures/aosdata.prc unipops-3.6/procedures/aosdata.prc
--- 3.5/procedures/aosdata.prc	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/procedures/aosdata.prc	2008-12-29 14:36:49.000000000 -0700
@@ -0,0 +1,15 @@
+procedure aosdata
+#  Switch to AOS Data Stream, leave file version as is, set prompt
+#  Erroff is used so that this sets prompt and spectype even if no online data
+global scalar spectype
+if (status(15) = TRUE) then
+#   if online data is available, try and change to aostype
+   erroff
+   chngonline(aostype, aos_ver)
+   erron
+end
+prompt = "LineA>"
+spectype = aostype
+histogram
+return
+finish
diff -uNr 3.5/procedures/badch.prc unipops-3.6/procedures/badch.prc
--- 3.5/procedures/badch.prc	2000-03-16 11:31:44.000000000 -0700
+++ unipops-3.6/procedures/badch.prc	2008-12-29 14:36:39.000000000 -0700
@@ -25,8 +25,8 @@
    lsubscan = nint((h0(scan) - ifix(h0(scan))) * 100)
    loffset = 128 * (lsubscan - 1)
 end
-fprint(-1,"a,$") " Enter # of bad channels : "
-fread(-1,"i") bch
+fprint(-1,"A,$") " Enter # of bad channels : "
+fread(-1,"I2") bch
 if (bch <= 0) then; return; end
 if (bch > 12) then;
    print "You can only remove up to 12 bad channels at a time."
@@ -69,7 +69,7 @@
    if (ldamage) then
       print " Bad channels in scan # ", h3(scan)
       for i = 1 to lcount
-         fprint(-1, "i6,x,$") lbch(i)
+         fprint(-1, "I6,X,$") lbch(i)
          if (mod(i,6)=0) then
             fprint(-1," ") " "
          end
@@ -79,7 +79,7 @@
    if (rdamage) then
       print " Bad channels in scan # ", h4(scan)
       for i = 1 to rcount
-         fprint(-1, "i6,x,$") rbch(i)
+         fprint(-1, "I6,X,$") rbch(i)
          if (mod(i,6)=0) then
             fprint(-1," ") " "
          end
@@ -89,7 +89,7 @@
 else
    PRINT " Bad channels in scan # ", h0(scan)
    for i = 1 to bch
-      fprint(-1,"i6,x,$") lbch(i)
+      fprint(-1,"I6,X,$") lbch(i)
       if (mod(i,6)=0) then 
          fprint(-1," ") " " 
       end
diff -uNr 3.5/procedures/bset.prc unipops-3.6/procedures/bset.prc
--- 3.5/procedures/bset.prc	2000-03-16 11:31:45.000000000 -0700
+++ unipops-3.6/procedures/bset.prc	2008-12-29 14:36:39.000000000 -0700
@@ -5,14 +5,14 @@
 scalar i, blt, x1, x2, xtmp, j, tseg, continue, k, overlap
 array ntmp(32)
 nregion = 0
-fprint(-1,"a,$") "Enter # of Baseline regions, maximum of 16 : "
-fread(-1,"i") nseg
+fprint(-1,"A,$") "Enter # of Baseline regions, maximum of 16 : "
+fread(-1,"I2") nseg
 if (nseg <= 0 | nseg >16) then
    print "Illegal value : ",nseg
    return
 end
 FOR I = 1 TO NSEG; 
-   fprint(-1,"x,a,x,i2,x,a") "Indicate ends of region",I,"using the cursor"
+   fprint(-1,"X,A,X,I2,X,A") "Indicate ends of region",I,"using the cursor"
    X1=ifix(CCUR); x2 = ifix(ccur) 
    if (x2 < x1) then 
       xtmp = x1; x1 = x2; x2 = xtmp
diff -uNr 3.5/procedures/chkavrg.prc unipops-3.6/procedures/chkavrg.prc
--- 3.5/procedures/chkavrg.prc	2000-03-16 11:31:47.000000000 -0700
+++ unipops-3.6/procedures/chkavrg.prc	2008-12-29 14:36:40.000000000 -0700
@@ -35,7 +35,7 @@
    newccode = ccode; x=newx; y=newy
 end
 fclose(unit)
-sprint(strout,'a,a') '/bin/rm ',substr(f_sortstk,1,lnblnk(f_sortstk))
+sprint(strout,'A,A') '/bin/rm ',substr(f_sortstk,1,lnblnk(f_sortstk))
 z_system(strout)
 return
 finish
diff -uNr 3.5/procedures/ctsdata.prc unipops-3.6/procedures/ctsdata.prc
--- 3.5/procedures/ctsdata.prc	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/procedures/ctsdata.prc	2008-12-29 14:36:49.000000000 -0700
@@ -0,0 +1,15 @@
+procedure ctsdata
+#  Switch to Chirp Data Stream, leave file version as is, set prompt
+#  Erroff is used so that this sets prompt and spectype even if no online data
+global scalar spectype
+if (status(15) = TRUE) then
+#   if online data is available, try and change to ctstype
+   erroff
+   chngonline(ctstype, cts_ver)
+   erron
+end
+prompt = "LineC>"
+spectype = ctstype
+histogram
+return
+finish
diff -uNr 3.5/procedures/cubeinput.prc unipops-3.6/procedures/cubeinput.prc
--- 3.5/procedures/cubeinput.prc	2000-03-16 11:31:49.000000000 -0700
+++ unipops-3.6/procedures/cubeinput.prc	2008-12-29 14:36:41.000000000 -0700
@@ -38,20 +38,20 @@
 fprint(unit," ") 'N'
 #		No cube.exe debugging messages
 filename = fname(sscans)
-fprint(-1,"1x,a,a") "Input sdd file (save file) : ", filename
-fprint(unit,"1x,a") filename
+fprint(-1,"1X,A,A") "Input sdd file (save file) : ", filename
+fprint(unit,"1X,A") filename
 #		Use the current save file name as the input data file
-fprint(-1,"1x,a,1x,$") "Enter name of cube file : "
-fread(-1,"a") filename
-fprint(unit,"1x,a") filename
+fprint(-1,"1X,A,1X,$") "Enter name of cube file : "
+fread(-1,"A") filename
+fprint(unit,"1X,A") filename
 #		The user chooses the output cube name
-fprint(unit,"1x,i1") 2
+fprint(unit,"1X,I1") 2
 #		Use OBJECT of first scan as OBJECT of cube
-fprint(unit,"1x,i1") 2
+fprint(unit,"1X,I1") 2
 #		Use UTDATE of first scan as DATE of cube
-fprint(unit,"1x,i1") 2
+fprint(unit,"1X,I1") 2
 #		Use TELESCOP as ORIGIN in cube header
-fprint(unit,"1x,i1") 1
+fprint(unit,"1X,I1") 1
 #		Assume units are K.
 #		Find out the nitty gritty stuff about the scans
 nsave=1; recall
@@ -105,7 +105,7 @@
 coordtype = substr(coordcode, i, i+3)
 hourdeg = compare(coordtype,"RADC") | compare(coordtype,"HADC")
 ralike = compare(coordtype,"RADC")
-fprint(unit,"1x,i1") ctype
+fprint(unit,"1X,I1") ctype
 #			Use observed coordinate system
 if (docar) then
    fprint(unit," ") "N"
@@ -128,11 +128,11 @@
    else
       dms(xmax/15,sgn,ideg,imin,secs)
    end
-   fprint(unit,"1x,i2,x,i2,x,f5.2") ideg, imin, secs
+   fprint(unit,"1X,I2,X,I2,X,F5.2") ideg, imin, secs
 #		Value at 1st (reference) X pixel
    dms(ymin,sgn,ideg,imin,secs)
    csgn = "+"; if (sgn < 0) then; csgn = "-"; end
-   fprint(unit,"1x,a1,i2,x,i2,x,f5.2") csgn, ideg, imin, secs
+   fprint(unit,"1X,A1,I2,X,I2,X,F5.2") csgn, ideg, imin, secs
 #		Value at 1st (reference) Y pixel
    fprint(unit," ") zmin
 #		Value at 1st (reference) Z pixel
@@ -140,41 +140,41 @@
    dytmp = dytmp / 3600.0
    dms(dxtmp/15,sgn,ideg,imin,secs)
    csgn = "+"; if (sgn < 0) then; csgn = "-"; end
-   fprint(unit,"1x,a1,i2,x,i2,x,f5.2") csgn, ideg, imin, secs
+   fprint(unit,"1X,A1,I2,X,I2,X,F5.2") csgn, ideg, imin, secs
 #		X axis increment
    dms(dytmp,sgn,ideg,imin,secs)
    csgn = "+"
-   fprint(unit,"1x,a1,i2,x,i2,x,f5.2") csgn, ideg, imin, secs
+   fprint(unit,"1X,A1,I2,X,I2,X,F5.2") csgn, ideg, imin, secs
 #		Y axis increment
    fprint(unit," ") abs(dz)
 #		Z axis increment
    dms(dxtmp/30, sgn,ideg,imin,secs)
-   fprint(unit,"1x,i2,x,i2,x,f5.2") ideg, imin, secs
+   fprint(unit,"1X,I2,X,I2,X,F5.2") ideg, imin, secs
 #		Allowable error in X axis (dxtmp/2)
    dms(dytmp/2, sgn,ideg,imin,secs)
-   fprint(unit,"1x,i2,x,i2,x,f5.2") ideg, imin, secs
+   fprint(unit,"1X,I2,X,I2,X,F5.2") ideg, imin, secs
 #		Allowable error in Y axis (dy/2)
    fprint(unit," ") abs(dz/2)
 #		Allowable error in Z axis (dz/2)
 else
 #		if not hourdeg, can not be ralike, all axis positive incr.
-   fprint(unit,"1x,f10.5") xmin
+   fprint(unit,"1X,F10.5") xmin
 #		Value at 1st (reference) X pixel
-   fprint(unit,"1x,f9.5") ymin
+   fprint(unit,"1X,F9.5") ymin
 #		Value at 1st (reference) Y pixel
    fprint(unit," ") zmin
 #		Value at 1st (reference) Z pixel
    dxtmp = dxtmp / 3600.0
    dytmp = dytmp / 3600.0
-   fprint(unit,"1x,f10.5") dxtmp
+   fprint(unit,"1X,F10.5") dxtmp
 #		X axis increment
-   fprint(unit,"1x,f9.5") dytmp
+   fprint(unit,"1X,F9.5") dytmp
 #		Y axis increment
    fprint(unit," ") dz
 #		Z axis increment
-   fprint(unit,"1x,f9.5") dxtmp/2
+   fprint(unit,"1X,F9.5") dxtmp/2
 #		Allowable error in X axis (dxtmp/2)
-   fprint(unit,"1x,f8.5") dytmp/2
+   fprint(unit,"1X,F8.5") dytmp/2
 #		Allowable error in Y axis (dy/2)
    fprint(unit," ") abs(dz/2)
 #		Allowable error in Z axis (dz/2)
@@ -182,16 +182,16 @@
 nx = nint((xmax-xmin)/abs(dxtmp) + 1)
 ny = nint((ymax-ymin)/dytmp + 1)
 nz = nint((zmax-zmin)/abs(dz) + 1)
-fprint(unit,"1x,i") nx
-fprint(unit,"1x,i") ny
-fprint(unit,"1x,i") nz
+fprint(unit,"1X,I") nx
+fprint(unit,"1X,I") ny
+fprint(unit,"1X,I") nz
 #		Number of pixels on each axis
 if (~ docar) then
    if (hourdeg) then
       dms(xcent/15,sgn,ideg,imin,secs)
-      fprint(unit,"1x,i2,x,i2,x,f5.2") ideg, imin, secs
+      fprint(unit,"1X,I2,X,I2,X,F5.2") ideg, imin, secs
    else
-      fprint(unit,"1x,f10.5") xcent
+      fprint(unit,"1X,F10.5") xcent
    end
 end
 #		The reference X position for the GLS projection
@@ -199,10 +199,10 @@
 fprint(unit," ") " "
 fprint(unit," ") " "
 #			No comments
-fprint(unit,"1x,i1") 0
-fprint(unit,"1x,i1") 0
-fprint(unit,"1x,i1") 0
-fprint(unit,"1x,i1") 0
+fprint(unit,"1X,I1") 0
+fprint(unit,"1X,I1") 0
+fprint(unit,"1X,I1") 0
+fprint(unit,"1X,I1") 0
 #			Full scan and feed number range
 #
 fclose(unit)
diff -uNr 3.5/procedures/ffbdata.prc unipops-3.6/procedures/ffbdata.prc
--- 3.5/procedures/ffbdata.prc	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/procedures/ffbdata.prc	2008-12-29 14:36:49.000000000 -0700
@@ -0,0 +1,15 @@
+procedure ffbdata
+#  Switch to Forbes Filter Bank Data Stream, leave file version as is, set prompt
+#  Erroff is used so that this sets prompt and spectype even if no online data
+global scalar spectype
+if (status(15) = TRUE) then
+#   if online data is available, try and change to ffbtype
+   erroff
+   chngonline(ffbtype, ffb_ver)
+   erron
+end
+prompt = "LineF>"
+spectype = ffbtype
+histogram
+return
+finish
diff -uNr 3.5/procedures/testscn.prc unipops-3.6/procedures/testscn.prc
--- 3.5/procedures/testscn.prc	2000-03-16 11:31:55.000000000 -0700
+++ unipops-3.6/procedures/testscn.prc	2008-12-29 14:36:47.000000000 -0700
@@ -165,9 +165,9 @@
    if (totswvar > 0) then
       for i_loop = 1 to totswvar
           offset = (i_loop - 1) * 6
-          fprint(-1,"(x,a6,i2.2,a2,1pg15.8.2)") "varval",i_loop," ",h0(varval01+offset)
-          fprint(-1,"(x,a6,i2.2,a2,a8)") "vardes",i_loop," ",h0(vardes01+offset)
-          fprint(-1,"(x,a6,i2.2,a2,a32)") "phastb",i_loop," ",h0(phastb01+offset)
+          fprint(-1,"(X,A6,I2,A2,1PG15.8E2)") "varval",i_loop," ",h0(varval01+offset)
+          fprint(-1,"(X,A6,I2,A2,A8)") "vardes",i_loop," ",h0(vardes01+offset)
+          fprint(-1,"(X,A6,I2,A2,A32)") "phastb",i_loop," ",h0(phastb01+offset)
       end
    end
 else
@@ -177,9 +177,9 @@
    if (totswvar > 0) then
       for i_loop = 0 to (totswvar-1)
           offset = i_loop * 3
-          fprint(-1,"(x,a10,i2,a2,1pg15.7.2)") " varval + ",i_loop," ",h0(varval+offset)
-          fprint(-1,"(x,a10,i2,a2,a8)") " vardes + ",i_loop," ",h0(vardes+offset)
-          fprint(-1,"(x,a10,i2,a2,a8)") " phastb + ",i_loop," ",h0(phastb+offset)
+          fprint(-1,"(X,A10,I2,A2,1PG15.7E2)") " varval + ",i_loop," ",h0(varval+offset)
+          fprint(-1,"(A,A10,I2,A2,A8)") " vardes + ",i_loop," ",h0(vardes+offset)
+          fprint(-1,"(X,A10,I2,A2,A8)") " phastb + ",i_loop," ",h0(phastb+offset)
       end
    end
 end
diff -uNr 3.5/procedures/testscn2.prc unipops-3.6/procedures/testscn2.prc
--- 3.5/procedures/testscn2.prc	2000-03-16 11:31:55.000000000 -0700
+++ unipops-3.6/procedures/testscn2.prc	2008-12-29 14:36:47.000000000 -0700
@@ -163,7 +163,7 @@
    totswvar = min(h0(noswvar)+h0(noswvarf),10)
    ? '-------- Displaying ',totswvar,' switching var. info'
    if (totswvar > 0) then
-      fmt1 = "(x,a6,i2.2,a2,1pg15.7.2,2x,g15.7.2)"
+      fmt1 = "(x,a6,i2.2,a2,1PG15.7E2,2x,G15.7E2)"
       fmt2 = "(x,a6,i2.2,a2,a8,2x,a8)"
       fmt3 = "(x,a6,i2.2,a2,a32,2x,a32)"
       for i_loop = 1 to totswvar
@@ -178,7 +178,7 @@
    totswvar = min(h0(noswvar),22)
    ? '-------- Displaying ',totswvar,' switching var. info'
    if (totswvar > 0) then
-      fmt1 = "(x,a10,i2,a2,1pg15.7.2,g15.7.2)"
+      fmt1 = "(x,a10,i2,a2,1PG15.7E2,G15.7E2)"
       fmt2 = "(x,a10,i2,a2,a8,2x,a8)"
       for i_loop = 0 to (totswvar-1)
          offset = i_loop * 3
diff -uNr 3.5/source/amathparser.f unipops-3.6/source/amathparser.f
--- 3.5/source/amathparser.f	2000-03-16 11:31:58.000000000 -0700
+++ unipops-3.6/source/amathparser.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,176 +0,0 @@
-      subroutine amathparser (stringin, stringout)
-C-------------------------------------------------------------------------------
-C  @(#)amathparser.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Parses the input string STRINGIN and replaces Array-Math structures
-c     with their equivalent POPS commands.
-c
-      character*(*) stringin, stringout
-      character*160 stringtemp, sbegin, send, sexpand, s1, s2
-      character*60 ckpak
-      character*1 char
-      integer*2 lastblnk, ilenin, i1, i3, i4, i5, iii, ilenbegin, 
-     .          ilenend, ilentemp, ilenexpand, iat, charat, charopn,
-     .		charclse, snglclose, snglopen, dbleclose, dbleopen,
-     .		at, opn, clse, i
-      integer*2 n1, n4, n9, n35
-c
-      include 'cio.inc'
-      include 'smstuf.inc'
-c
-      equivalence (ckpak, kpak)
-c
-      data n1, n4, n9, n35 /1, 4, 9, 35/
-c
-      data charat/10/, charopn/11/, charclse/12/
-c     ASCII decimal codes for what will be substituted fro @, {, and }
-c	if such characters are found within a literal constant in the 
-c	input string.
-c
-      ilenin = lastblnk(stringin)
-c
-      i1 = 0
-      i3 = 0
-      i4 = 1
-      i5 = 1
-      iii = 0
-      sexpand = ' '
-      s1 = ' '
-      s2 = ' '
-      send = ' '
-      sbegin = ' '
-      stringtemp = ' '
-      stringout = ' '
-      snglclose = 0
-      dbleclose = 0
-c
-5     snglopen = index(stringin(snglclose+1:ilenin),'''') + snglclose
-      if (snglopen .gt. snglclose) then
-	snglclose =  index(stringin(snglopen+1:ilenin),'''') + snglopen
-	if (snglclose .gt. snglopen) then
-10	   at = index(stringin(snglopen+1:snglclose-1),'@') + snglopen
-	   if (at .gt. snglopen) then
-		stringin(at:at) = char(charat)
-		goto 10
-	   endif
-20	   opn = index(stringin(snglopen+1:snglclose-1),'{') + snglopen
-	   if (opn .gt. snglopen) then
-		stringin(opn:opn) = char(charopn)
-		goto 20
-	   endif
-30	   clse = index(stringin(snglopen+1:snglclose-1),'}') + snglopen
-	   if (clse .gt. snglopen) then
-		stringin(clse:clse) = char(charclse)
-		goto 30
-	   endif
-	   goto 5
-	endif
-      endif
-c     Finds all strings delineated by single quotes; between the quotes,
-c	turms all occurances of @, {, and } to the characters whose
-c	ASCII decimal representation is CHARAT, CHAROPN, and CHARCLSE
-c
-c     Now do the same for strings surrounded by double quotes
-c
-35    dbleopen = index(stringin(dbleclose+1:ilenin),'"') + dbleclose
-      if (dbleopen .gt. dbleclose) then
-	dbleclose =  index(stringin(dbleopen+1:ilenin),'"') + dbleopen
-	if (dbleclose .gt. dbleopen) then
-40	   at = index(stringin(dbleopen+1:dbleclose-1),'@') + dbleopen
-	   if (at .gt. dbleopen) then
-		stringin(at:at) = char(charat)
-		goto 40
-	   endif
-50	   opn = index(stringin(dbleopen+1:dbleclose-1),'{') + dbleopen
-	   if (opn .gt. dbleopen) then
-		stringin(opn:opn) = char(charopn)
-		goto 50
-	   endif
-60	   clse = index(stringin(dbleopen+1:dbleclose-1),'}') + dbleopen
-	   if (clse .gt. dbleopen) then
-		stringin(clse:clse) = char(charclse)
-		goto 60
-	   endif
-	   goto 35
-	endif
-      endif  
-c
-      i1 = index(stringin(1:ilenin), '{')
-c
-      if (i1 .eq. ilenin) then
-	ckpak = '{'
-	stringout = stringin
-	call oerror(n35,n1,'No closing }')
-      endif
-c     { was the last character in line.. a no-no
-c
-      if (i1 .eq. 0) then
-	  i3 = index(stringin(1:ilenin), '}')
-	  if (i3 .ne. 0) call oerror(n35, n1, 'No opening {')
-c	  Can't have a } if you don't have  a {
-c
-	  stringout = stringin
-	  goto 99
-      endif
-c     No array math to do so just return input string
-c
-      if (i1 .gt. 1) sbegin = stringin(1:i1-1)
-c     SBEGIN = input string up to the {
-c
-      i3 = index(stringin(i1+1:ilenin),'}') + i1
-      if (i3 .eq. i1) then
-	  ckpak = '}'
-	  stringout = stringin
-	  call oerror(n35,n1,' ')
-	  goto 99
-      endif
-c     Must have a }
-c
-      stringtemp = stringin(i1+1:i3-1)
-      sexpand = ';amathon;for n_n = 1 to 16384;'
-c
-      if (i3 .ne. ilenin) send = stringin(i3+1:ilenin)
-c     SEND = input string from } to end of line
-c
-      ilenbegin = lastblnk(sbegin) + 1
-      ilenend = lastblnk(send) + 1
-      ilentemp = lastblnk(stringtemp)
-      ilenexpand = lastblnk(sexpand) + 1
-c
-31    iat = index(stringtemp(i5:ilentemp), '@') + i5 - 1
-c     IAT = index of next @
-c
-      ilenexpand = lastblnk(sexpand) + 1
-      if (iat .ne. i5 - 1) then
-        sexpand = sexpand(1:ilenexpand)//stringtemp(i5:iat-1)//'(n_n)'
-	i5 = iat + 1   
-	if (iat .le. ilentemp) goto 31
-      endif
-c     Replace all @ with (n_n)
-c
-      ilenexpand = lastblnk(sexpand) + 1
-      if (ilenexpand + ilentemp - i5 + 12 .gt. karlim) then
-	   ckpak = '{}'
-	   stringout = stringin
-	   call oerror(n4,n1,'Array Math statement is too long ')
-c          Make sure that the returned line doesn't exceed the maximum line
-c          length.
-c
-      else
-c
-	   stringout = sbegin(1:ilenbegin) // sexpand(1:ilenexpand) // 
-     1              stringtemp(i5:ilentemp) // ';end;amathoff' //
-     2		    send(1:ilenend)
-      endif
-c
-99    do 100 i = 1, lastblnk(stringout)
-	if (stringout(i:i) .eq. char(charat)) stringout(i:i) = '@'
-	if (stringout(i:i) .eq. char(charopn)) stringout(i:i) = '{'
-	if (stringout(i:i) .eq. char(charclse)) stringout(i:i) = '}'
-100	continue
-c	Return @, {, and } into the output string
-c
-      return
-      end
-c
diff -uNr 3.5/source/bclean.f unipops-3.6/source/bclean.f
--- 3.5/source/bclean.f	2000-03-16 11:32:00.000000000 -0700
+++ unipops-3.6/source/bclean.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-      SUBROUTINE BCLEAN
-C-------------------------------------------------------------------------------
-C  @(#)bclean.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C--------------------------------------------------------------------
-C    B-STACK CLEAN ROUTINE
-C	 POPS ITEMS FROM B-STACK ONTO A-STACK UNTIL THE	PRECEDENCE IN
-C    BPR-STACK IS LESS THAN THE	PARAMETER NEXTP.   USED	IN GENERATING
-C    POLISH POSTFIX STRING OF OPCODES AND OPERANDS.
-C    Changed 890105 [PPM] includes to .inc and lowercase
-c            8903   [RJM] see CHANGES.DOC
-C--------------------------------------------------------------------
-      INCLUDE 'smstuf.inc'
-      include 'stk.inc'
-      integer*2 m
-c
-10    IF (BP.LE.0) GO TO 99
-	 M=B(BP)
-	 IF (BPR(BP).LT.NEXTP) GO TO 99
-	 CALL PUSH(A,AP,M)
-	 BP=BP-1
-	 GO TO 10
- 99   RETURN
-      END
diff -uNr 3.5/source/closms.f unipops-3.6/source/closms.f
--- 3.5/source/closms.f	2000-03-16 11:32:00.000000000 -0700
+++ unipops-3.6/source/closms.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,16 +0,0 @@
-      SUBROUTINE CLOSMS(LUN,IER)
-C-------------------------------------------------------------------------------
-C  @(#)closms.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c     Changed 8903    [RJM] See CHANGES.DOC
-c****************************************************************
-      INTEGER*2 LUN, ier, inunit, istat
-c
-      include 'cio.inc'
-c
-      inunit = LUN
-      CLOSE(UNIT=inunit, IOSTAT=ISTAT)
-      ier = istat
-      RETURN
-      END
-
diff -uNr 3.5/source/compil.f unipops-3.6/source/compil.f
--- 3.5/source/compil.f	2000-03-16 11:32:00.000000000 -0700
+++ unipops-3.6/source/compil.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,246 +0,0 @@
-      SUBROUTINE COMPIL
-C-------------------------------------------------------------------------------
-C  @(#)compil.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-------------------------------------------------------------------------------
-C     Compiles an input line
-C-------------------------------------------------------------------------------
-      integer*2 pr(23), eq
-      integer*2 maxlev, nothng, leftside, i, j, n, it
-      integer*2 n1, n8, n10, fshort, n2, n39, n29
-      logical dhset, reading
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-c
-      include 'tags.inc'
-c
-      DATA MAXLEV/11/, NOTHNG/0/
-      data n1, n8, n10, n2, n29, n39 / 1, 8, 10, 2, 29, 39/
-      DATA PR/0,0,0,1,7, 7,8,8,9, 5,5,0,8,4, 5, 5, 5, 6, 6,5,2,3,0/
-C             , ( ) = +	 - * / ** > < + - ~ ~= >= <= TO BY = | & ;
-C
-C=======================================================================
-C
-      leftside = 0
-      EQ = 0
-      dhset = .false.
-      reading = .false.
-c
-   10 CALL GETFLD
-c
-      if (type .eq. 5 .and. (ap .ne. 0  .or. bp .ne. 0) .and.
-     .	  tag .ge. ipseudo) call oerror(n39, n1,' ')
-c     Protects against a misplaced PSEUDO command
-c
-      IF ((NKAR.EQ.0).OR.(TAG.eq.0).OR.(TYPE.EQ.5)) GO TO 98
-      IF ((TYPE.EQ.3).OR.(TYPE.EQ.4).or.(type.eq.6)) GO TO 50
-      if (type .eq. 0) call oerror(n2, n1, ' ')
-C---------------------------------------------------------------------
-C		   O P E R A N D    P R	O C E S	S O R
-C---------------------------------------------------------------------
-      IF (LAST.le.0) then
-	 NEXTP=1+LEVEL
-	 CALL BCLEAN
-      endif
-C
-      IF (TYPE.eq.2) then
-         N=K(LOCSYM+3)
-         N=K(N)
-         CALL PUSH (A,AP,fshort(-TYPE))
-	 CALL PUSH (A,AP,fshort(-N))
-         CALL PUSH (A,AP,fshort(-TAG))
-	 CALL PUSH (A, AP,fshort(-2))
-c	 Operand is an array
-c
-      else if (type.eq.7) then
-         N=K(LOCSYM+3)
-         N=K(N)
-         CALL PUSH (A,AP,fshort(-TYPE))
-	 CALL PUSH (A,AP,fshort(-N))
-         CALL PUSH (A,AP,fshort(-TAG))
-	 CALL PUSH (A, AP, fshort(-3))
-c	 Operand is a string
-c
-      else if (TYPE.eq.14) then
-	if (level .eq. 0 .and. reading) 
-     .		call oerror(n29, n1, 'Trying to READ a literal constant')
-         N=K(LOCSYM+1)/16
-         CALL PUSH (A,AP,fshort(-TYPE))
-	 CALL PUSH (A,AP,fshort(-N))
-         CALL PUSH (A,AP,fshort(-TAG))
-	 CALL PUSH (A,AP,fshort(-3))
-c	 Operand is a literal
-c
-      else
-	 if (level .eq. 0 .and. reading .and. type .eq. 8) then
-     		call oerror(n29, n1, 'Trying to READ a POINTER adverb')
-	 else if (level .eq. 0 .and. reading .and. type .eq. 11) then
-     		call oerror(n29, n1, 'Trying to READ a real constant')
-	 else
- 		CALL PUSH (A,AP,fshort(-TAG))
-	 endif
-C	 All other operands.
-c
-      endif
-c
-      LAST = -TAG
-c
-      if (level .eq. 0) then
-	if (type .eq. 8 .or. type .eq. 11 .or. type .eq. 15) then
-	   leftside = 0
-c          Flag that the last operator/operand not enclosed in () is a
-c           protected operand and thus cannot be assigned a value.
-c
-        else 
-	   leftside = -1
-c          Flag that the last operator/operand not enclosed in () is an
-c          unprotected operand and thus can be assigned a value.
-c
-	endif
-      endif
-      GO TO 10
-C---------------------------------------------------------------------
-C		   O P E R A T O R    P	R O C E	S S O R
-C---------------------------------------------------------------------
-C					Comma (,) operator.
-50    IF (TAG.eq.icomma) then
-	 LAST=NOTHNG
-	 NEXTP=1+LEVEL
-	 CALL BCLEAN
-C					Array assign ?
-	 IF (LEVEL.GT.0) GOTO 10
-c
-         if (level .eq. 0 .and. .not. dhset) leftside = 1
-	 IF (EQ.EQ.0) GOTO 10
-	 EQ = EQ + 1
-	 IF (EQ.GT.0) GOTO 10
-	 EQ = 2
-	 AP = AP - 1
-	 GO TO 10
-C					Left Paren "(" operator.
-      else IF (TAG.eq.ilparen) then
-	 LEVEL=LEVEL+MAXLEV
-	 IF (LAST.ge.nothng .or. a(ap) .ne. -2 .or. ap .lt. 4) GO TO 10
-c
-C					     CASE OF ARRAY SUBSCRIPT
-	 J= level - 1
-	 CALL PUSH (B,BP,isubs)
-	 BPR(BP)=J
-	 CALL PUSH (B,BP,fshort(-K(LOCSYM+3)))
-	 BPR(BP)=J
-	 DO 2601 I=1,4
-	    CALL POP (A,AP,IT)
-	    CALL PUSH (B,BP,IT)
-	    BPR(BP)=J
-2601	    continue
-	 last = nothng
-c        Allows for unary +/- for array subscripts
-c
-	 GO TO 10
-C					Right paren ")".
-      else IF (TAG.eq.irparen) then
-	 LEVEL=LEVEL-MAXLEV
-	 GO TO 10
-C					Semi colon ";".
-      else IF (TAG.eq.icolon) then
-	 leftside = 0
-	 dhset = .false.
-	 reading = .false.
-	 NEXTP=0
-	 IFFLAG=0
-	 CALL BCLEAN
-	 LAST=NOTHNG
-	 IF (EQ.gt.0) then
-	    CALL PUSH (A,AP,fshort(-EQ))
-	    CALL PUSH (A,AP,igets)
-	 endif
-         EQ = 0
-	 GO TO 10
-c
-      else if (reading .and. level .eq. 0) then
-	call oerror(n29, n1, 'Trying to READ a PROC or VERB')
-c       Check that everyting to the left of a READ is an Adverb.
-c
-C					Unary plus "+"
-      else IF (tag .eq. iuplus) then
-           if (last .ge. 0) GO TO 10
-C					Unary minus "-"
-      else IF (TAG.EQ.iuminus) then
-	    if (last .ge. 0) TAG = iminus 
-C					"=" . .	. compare or store?
-      else IF (TAG.eq.icompare) then
-	 if (ifflag .eq. 0 .and. level .ne. 0) call oerror(n8,n1,' ')
-     	 if (ifflag .eq. 0 .and. leftside .ge. 0)
-     +      call oerror(n10,n1,' ')
-c        Traps an error if the left hand side of a equals sign is NOT a virtual
-c        or if all ( are not closed.
-c
-         if (ifflag .eq. 0 .and. dhset) then
-		dhset = .false.
-		last = 1
-		nextp = 11 + level
-		call bclean
-		goto 10
-	 endif
-c	 Skip over = if a H0-9 type of function is on the left of the
-c	 equal sign
-c
-	 IF (IFFLAG.NE.1) EQ = -1
-	 IF (IFFLAG.EQ.1) TAG= iassign
-	 IFFLAG=1
-c
-      endif
-C					All other operators.
-      if (level .eq. 0 .and. leftside .eq. 0 .and. 
-     .    ifflag .ne. 1 .and.
-     .    tag .ge. idhfunc1 .and. tag .le. idhfunc2) then
-		 tag = tag - idhfunc1 + idhset1
-		 dhset = .true.
-		 leftside = -1
-      endif
-c     Change last commands tag if it is the H0-H9, etc. type of function
-c     to the left of the = sign.
-c
-      IF (TAG .eq. iread .or. tag .eq. isread .or.
-     .	tag .eq. ifread) reading = .true.
-c
-      IF (TAG .ge. ifunct) then
-	if (tag .ge. igenop .and. (last .le. 0 .or. (last .ge. igenop .or.
-     .			(last .gt. iprint .and. last .lt. ifunct) ) ) ) then
-	   NEXTP=LEVEL+3
-	else
-	   NEXTP=LEVEL+ maxlev - 1
-      	endif
-      else IF (TAG.le.icolon) then
-	NEXTP=LEVEL+PR(TAG)
-      else
-	nextp = level
-      endif
-      CALL BCLEAN
-      CALL PUSH	(B,BP,TAG)
-      BPR(BP)=NEXTP
-      LAST = TAG
-      if (tag .ge. ifunfunct .and. tag .lt. igenop) last = -last
-c     Reverse the sign of LAST if it is a function which doesn't take a
-c     value off of the stack but does return one.  In compiling a line
-c     containing such an operator, it looks like it were an operand.
-c
-      if (level .eq. 0 .and. 
-     .   (tag .lt. idhset1 .or. tag .gt. idhset2 .or. 
-     .   .not. dhset) ) leftside = 1
-c     Flag that the last operator/operand not enclosed in () is an operator
-c     and thus cannot be assigned a value.
-c
-      GO TO 10
-C-----------------------------------------------------------------------
-   98 IF (EQ.gt.0) then
-	 NEXTP = 0
-	 CALL BCLEAN
-	 CALL PUSH(A,AP,fshort(-EQ))
-	 CALL PUSH(A,AP,igets)
-      endif
-c
-      RETURN
-      END
diff -uNr 3.5/source/conline/apch.f unipops-3.6/source/conline/apch.f
--- 3.5/source/conline/apch.f	2000-03-16 11:30:08.000000000 -0700
+++ unipops-3.6/source/conline/apch.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,101 +0,0 @@
-      SUBROUTINE APCH(XDATA,YDATA,N,IP,XD,X0,WORK,IER)
-C-------------------------------------------------------------------------------
-C  @(#)apch.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c***********************************
-c* Modified 8903 [RJM] See CHANGES.DOC
-c***********************************
-C
-      integer*2 n, ip, ier, mt2, mt2m, i, m, j, k, ll, kk, jj, iend
-      real*4 xd, x0, xa, xe, xm, sum, df, t
-C                                   DIMENSIONED DUMMY VARIABLES
-      real*4 XDATA(*), YDATA(*), WORK(*)
-C
-C                      CHECK FOR FORMAL ERRORS IN SPECIFIED DIMENSIONS
-      IF(N-1)19,20,1
-    1 IF(IP)19,19,2
-C
-C                                 SMALLEST AND LARGEST ARGUMENT
-    2 IF(IP-N)3,3,19
-    3 XA=XDATA(1)
-      X0=XDATA(N)
-      XE=0.
-C
-C                         INITIALIZE CALCULATION OF NORMAL EQUATIONS
-      XD=X0-XA
-      M=(IP*(IP+1))/2
-      IEND=M+IP+1
-      MT2=IP+IP
-      MT2M=MT2-1
-C
-C                       SET WORKING STORAGE AND RIGHT HAND SIDE TO ZER
-      DO 8 I=1,IP
-         J=MT2-I
-         WORK(J)=0.
-         WORK(I)=0.
-         K=M+I
-    8    WORK(K)=0.
-C
-C                            CHECK FOR DEGENERATE ARGUMENT RANGE
-      IF(XD)20,20,9
-C
-C                       CALCULATE CONSTANTS FOR REDUCTION OF ARGUMENTS
-    9 X0=-(X0+XA)/XD
-      XD=2./XD
-      SUM=0.
-C
-C                            START GREAT LOOP OVER ALL GIVEN POINTS
-      DO 15 I=1,N
-         T=XDATA(I)*XD+X0
-         DF=YDATA(I)
-C
-C                            CALCULATE AND STORE VALUES OF CHEBYSHEV
-C                                       POLYNOMIALS FOR ARGUMENT T
-         XA=1.
-         XM=T 
-C                                        WEIGHTING REMOVED
-   11    T=T+T
-         SUM=SUM+DF*DF
-         DF=DF+DF
-         J=1
-   12    K=M+J
-         WORK(K)=WORK(K)+DF*XA
-   13    WORK(J)=WORK(J)+XA
-         IF(J-MT2M)14,15,15
-   14    J=J+1
-         XE=T*XM-XA
-         XA=XM
-         XM=XE
-         IF(J-IP)12,12,13
-   15    CONTINUE
-      WORK(IEND)=SUM+SUM
-C
-C                             CALCULATE MATRIX OF NORMAL EQUATIONS
-      LL=M
-      KK=MT2M
-      JJ=1
-      K=KK
-      DO 18 J=1,M
-         WORK(LL)=WORK(K)+WORK(JJ)
-         LL=LL-1
-         IF(K-JJ)16,16,17
-   16    KK=KK-2
-         K=KK
-         JJ=1
-         GO TO 18
-   17    JJ=JJ+1
-         K=K-1
-   18    CONTINUE
-      IER=0
-      RETURN
-C
-C                           ERROR RETURN IN CASE OF FORMAL ERRORS
-   19 IER=-1
-      RETURN
-C
-C                         ERROR RETURN IN CASE OF COINCIDING ARGUMENTS
-   20 IER=1
-      RETURN
-      END
-
-
diff -uNr 3.5/source/conline/apfs.f unipops-3.6/source/conline/apfs.f
--- 3.5/source/conline/apfs.f	2000-03-16 11:30:09.000000000 -0700
+++ unipops-3.6/source/conline/apfs.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,104 +0,0 @@
-      SUBROUTINE APFS (WORK,IP,IRES,IOP,EPS,ETA,IER)
-C-------------------------------------------------------------------------------
-C  @(#)apfs.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C*******************************************
-* Modified 8903 [RJM] See CHANGES.DOC
-c*******************************************
-      integer*2 ip, ires, iop, ier, ipiv, ite, ipp1, iend, i, ja, je, 
-     .          jk, k, iadr, jj, j
-      real*4 eps, eta, tol, test, sum, piv
-      real*4 WORK(*)
-      IRES=0
-C
-C                                       Test specified dimension.
-      IF (IP.GT.0) GO TO 2
-         IER=-1
-         RETURN
-C
-C        INITIALIZE FACTORIZATION PROCESS
-    2 IPIV=0
-      IPP1=IP+1
-      IER=1
-      ITE=IP*IPP1/2
-      IEND=ITE+IPP1
-      TOL=ABS(EPS*WORK(1))
-      TEST=ABS(ETA*WORK(IEND))
-C
-C          START LOOP OVER ALL ROWS OF WORK
-      DO 11 I=1,IP
-       IPIV=IPIV+I
-        JA=IPIV-IRES
-        JE=IPIV-1
-C
-C          FORM SCALAR PRODUCT NEEDED TO MODIFY CURRENT ROW ELEMENTS
-        JK=IPIV
-        DO 9 K=I,IPP1
-        SUM=0.
-        IF (IRES)5,5,3
-    3   JK=JK-IRES
-        DO 4 J=JA,JE
-           SUM=SUM+WORK(J)*WORK(JK)
-    4       JK=JK+1
-    5    IF (JK-IPIV)6,6,8
-C
-C                                   TEST FOR LOSS OF SIGNIFICANCE
-    6    SUM=WORK(IPIV)-SUM
-         IF (SUM-TOL) 12,12,7
-    7    SUM=SQRT(SUM)
-         WORK(IPIV)=SUM
-         PIV=1./SUM
-         GOTO 9
-C
-C                                      UPDATE OFF-DIAGONAL TERMS
-    8    SUM=(WORK(JK)-SUM)*PIV
-         WORK(JK)=SUM
-    9    JK=JK+K
-C
-C           UPDATE SQUARE SUM OF ERRORS
-         WORK(IEND)=WORK(IEND)-SUM*SUM
-C
-C                            RECORD ADDRESS OF LAST PIVOT ELEMENT
-         IRES=IRES+1
-         IADR=IPIV
-C
-C                              TEST FOR TOLERABLE ERROR IF SPECIFIED
-         IF (IOP) 10,11,11
-   10    IF (WORK(IEND)-TEST) 13,13,11
-   11    CONTINUE
-      IF (IOP) 12,22,12
-C
-C                             PERFORM BACK SUBSTITUTION IF SPECIFIED
-   12 IF (IOP) 14,23,14
-   13 IER=0
-   14 IPIV=IRES
-   15 IF (IPIV)23,23,16
-   16 SUM=0.
-      JA=ITE+IPIV
-      JJ=IADR
-      JK=IADR
-      K=IPIV
-      DO 19 I=1,IPIV
-        WORK(JK)=(WORK(JA)-SUM)/WORK(JJ)
-        IF (K-1)20,20,17
-   17   JE=JJ-1
-        SUM=0.
-        DO 18 J=K,IPIV
-           SUM=SUM+WORK(JK)*WORK(JE)
-           JK=JK+1
-  18       JE=JE+J
-         JK=JE-IPIV
-         JA=JA-1
-         JJ=JJ-K
-   19    K=K-1
-   20 IF (IOP/2)21,23,21
-   21 IADR=IADR-IPIV
-      IPIV=IPIV-1
-      GOTO 15
-C
-C                                           NORMAL RETURN
-   22 IER=0
-   23 RETURN
-      END
-
-
diff -uNr 3.5/source/conline/assgn.f unipops-3.6/source/conline/assgn.f
--- 3.5/source/conline/assgn.f	2000-03-16 11:32:36.000000000 -0700
+++ unipops-3.6/source/conline/assgn.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,98 +0,0 @@
-      SUBROUTINE  ASSGN
-C-------------------------------------------------------------------------------
-C  @(#)assgn.f	5.5 03/23/96
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C Modified 890105 [PPM] includes to .inc, lowercase
-c          8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      integer*2 iblank, nsize, j, m, itag, isize, itype, irealp, iwpr
-      integer*2 n28, n107, n126, n127, m1, iwpc, kmin, kmax
-      INCLUDE 'smstuf.inc'
-      include 'core.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-c
-      DATA IBLANK/'  '/
-      data n28, n107, n126, n127, m1 /28, 107, 126, 127, -1/
-C
-C=======================================================================
-C
-      kmin = iwpc(kxorg) + 6
-      kmax = 32766
-      if (sp .le. 0 .or. sp .gt. slim) 
-     .		call oerror(n107, m1, '= (Assignment)')
-      M=STACK(SP)
-      IF (M.EQ.2 .or. m .eq. 3) GO TO	4002
-      if (sp-1 .le. 0) call oerror(n107, m1, '= (Assignment)')
-      M	= STACK(SP-1)
-      IF (M.EQ.2) GO TO	4000
-c
-      if (m .le. kmin .or. m. ge. kmax) 
-     .		call oerror(n126, m1, 'Left side is a constant')
-c
-      call setdefaults(m, v(sp))
-c     Revert adverb value back to default value, if needed
-c
-      C(M)=V(SP)
-      SP=SP-2
-      if (sp .lt. 0) call oerror(n107, m1, '= (Assignment)')
-      goto 99
-c
-C					Vector = Constant.
- 4000 if (sp-4 .le. 0) call oerror(n107, m1, '= (Assignment)')
-      TAG=STACK(SP-2)
-      NSIZE=STACK(SP-3)
-      TYPE=STACK(SP-4)
-      IF (TYPE.ne.2) call oerror(n126, m1, ' ')
-      M	= TAG +	NSIZE -	1
-      if (tag .le. kmin .or. m. ge. kmax) 
-     .		call oerror(n126, m1, 'Left side is a constant')
-c
-      call setdefaults(tag, v(sp))
-c     Revert adverb value back to default value, if needed
-c
-      DO 4009 J	= TAG, M
-	   C(J)	= V(SP)
- 4009	   CONTINUE
-      SP=SP-5
-      if (sp .lt. 0) call oerror(n107, m1, '= (Assignment)')
-      goto 99
-c
-C					   VECTOR & STRING ASSIGNMENT
- 4002 if (sp-7 .lt. 0) call oerror(n107, m1, '= (Assignment)')
-      ITAG = STACK(SP-1)
-      ISIZE = STACK(SP-2)
-      ITYPE = STACK(SP-3)
-      IF (STACK(SP-4).ne.stack(sp)) call oerror(n126, m1, ' ')
-      TAG = STACK(SP-5)
-      NSIZE = STACK(SP-6)
-      TYPE = STACK(SP-7)
-      IF ( (TYPE.ne.7.or.ITYPE.ne.14) .and.
-     .     (type.ne.7.or.itype.ne.7) ) call oerror(n126, m1, ' ')
-      SP = SP -	8
-      if (sp .lt. 0) call oerror(n107, m1, '= (Assignment)')
-      IF (ITYPE.EQ.14) ISIZE = IREALP(ISIZE)
-      IF (ISIZE.gt.NSIZE) call oerror(n127, m1, ' ')
-      M	= IWPR(ISIZE)
-      if (itag .le. 0 .or. itag+isize-1. ge. kmax) 
-     .		call oerror(n126, m1, ' ')
-      if (tag .le. kmin .or. tag+isize-1. ge. kmax) 
-     .		call oerror(n126, m1, 'Left side is a constant')
-      CALL COPY (M,C(ITAG),C(TAG))
-C					   Blank fill.
-      IF (ISIZE.ne.NSIZE) then
-	 M = IBLANK
-	 IF (TYPE.EQ.2)	M = 0
-	 ITAG =	TAG + ISIZE
-	 NSIZE = NSIZE - ISIZE
-	 NSIZE = IWPR (NSIZE)
-	 if (itag.le.kmin.or.itag+iwpc(nsize)-1.ge.kmax) 
-     .		call oerror(n126, m1, 'Left side is a constant')
-	 CALL FILL (NSIZE,M,C(ITAG))
-      endif
-c
-   99 CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/autolev.f unipops-3.6/source/conline/autolev.f
--- 3.5/source/conline/autolev.f	2000-03-16 11:34:03.000000000 -0700
+++ unipops-3.6/source/conline/autolev.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,125 +0,0 @@
-      subroutine autolev(zmin, zmax, numlevs, z1, z2, zdiff)
-c
-c     @(#)autolev.f	5.1 06/22/94
-c
-c     From ZMIN, ZMAX, and NUMLEVS, calculates reasonable values
-c     for conmtour levels.
-c
-c     ZMIN, ZMAX = (R*4) Input Max and min values that are to be spanned
-c     NUMLEVS = (I*2)Input  Number of levels  desired
-c     Z1, Z2 = (R*4) Output Min, Max values that 'look' nice and span the data
-c     ZDIFF = (R*4) Output 'nice' delta between levels
-c
-      real zmin, zmax, z1, z2, zdiff
-      integer*2 numlevs
-c
-      integer*4 i, NUMTEST, nshift, nlevs
-c
-      parameter (NUMTEST=57)
-c
-      real r1, r2, adx, zexpon, test(NUMTEST), ztemp
-c
-      data test/1.00, 1.05, 1.10, 1.15, 1.20, 1.25, 1.30, 1.35, 1.40, 
-     .		1.45, 1.50, 1.55, 1.60, 1.65, 1.70, 1.75, 1.80, 1.90,
-     .	        2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.80,
-     .		2.90, 
-     .		3.00, 3.10, 3.25, 3.3333333, 3.50, 3.6666666, 3.75, 3.90,
-     .		4.00, 4.20, 4.25, 4.50, 4.75, 
-     .		5.00, 5.25, 5.50, 5.75,
-     .		6.00, 6.3333333, 6.6666666,
-     .		7.00, 7.3333333, 7.6666666,
-     . 		8.00, 8.3333333, 8.6666666,
-     .		9.00, 9.50, 10.00 /
-c     Values for TEST must go from 1 to 10 and must be separated by
-c     the percentage of what you want as the maximum percentage of 
-c     levels that go beyond the edge of the data.  5% is probably OK,
-c     so test(i+1) should be approximately 1.05*test(i).
-c
-      r1 = min(zmin,zmax)
-      r2 = max(zmin,zmax)
-      nlevs = numlevs
-c
-c     First, let's take care of some degenerate cases
-c
-      if (nlevs .le. 0) then
-	zdiff = 0
-	z1 = r1
-	z2 = r2
-	return
-      endif
-c
-      if (nlevs .eq. 1) then
-	z1 = (r2+r1)/2.
-	zdiff = 0
-	z2 = z1
-	return
-      endif
-c
-      if (r1 .eq. r2) then
-	r2 = r1 + abs(r1)
-	r1 = r1 - abs(r1)
-      endif
-c
-9     zdiff = (r2-r1)/(nlevs-1)
-c     ZDIFF will always be positive
-c
-      zexpon = 10.**(int(log10(zdiff)))
-      adx = zdiff / zexpon
-10    if (adx .lt. 1.0) then
-	adx = adx*10.
-	zexpon = zexpon/10.
-	goto 10
-      endif
-11    if (adx .gt. 10) then
-	adx = adx/10.
-	zexpon = zexpon*10.
-	goto 11
-      endif
-c     ADX should fall between 1 and 10
-c
-      do 20 i = 1, NUMTEST
-	   if (adx .le. test(i)) goto 25
-20	   continue
-      i = NUMTEST
-c
-25    zdiff = test(i)*zexpon
-c     We now have a 'nice' value for zdiff
-c
-      z1 = zdiff * anint(r1 / zdiff)
-26    if (z1 .gt. r1) then
-	z1 = z1 - zdiff
-	goto 26
-      endif
-c     Cannot let Z1 be larger tha the minimum bound so shift Z1 down
-c
-      z2 = z1 + (numlevs-1)*zdiff
-      if (z2 .lt. r2) then
-	i = i + 1
-	if (i .gt. NUMTEST) then
-	   i = 2
-	   zexpon = zexpon*10
-	endif
-	goto 25
-      endif
-c     Cannot let Z2 be smaller than the maximum bound.  Must increase
-c     the value of ZDIFF by using the next larger value from TEST.
-c
-      nshift = ( nint((r1-z1)/zdiff) - nint((z2-r2)/zdiff)  )/2
-      z1 = z1 + nshift*zdiff
-      z2 = z2 + nshift*zdiff
-c     Now, balance the contour levels around the data so an equal
-c     number go above and below the range in data.
-c     NOTE:  In none of my tests was NSHIFT anything else but zero
-c     		so we may want to delete this snippet of code.
-c
-      if (zmin .gt. zmax) then
-	   zdiff = - zdiff
-	   ztemp = z2
-	   z2 = z1
-	   z1 = ztemp
-      endif
-c     Flip the data if upper and lower bounds were switched on input.
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/batch.f unipops-3.6/source/conline/batch.f
--- 3.5/source/conline/batch.f	2000-03-16 11:32:37.000000000 -0700
+++ unipops-3.6/source/conline/batch.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,81 +0,0 @@
-      subroutine batch(cnfile)
-C-------------------------------------------------------------------------------
-C  @(#)batch.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Redirects POPS input from a specified file until EOF
-c     or ERROR 
-c
-c     March 1989 [RJM]
-c**********************************************************
-c
-      integer*2 i, lastblnk, ilen, ilen2, ier, istat
-      integer*2 n28, n364, m1
-      integer*4 tmpunit, ioget
-      character*60 cbatchin
-      character*1023 cnfile2
-      character*(*) cnfile
-c
-      include 'cio.inc'
-      data n28, n364, m1 /28, 364, -1/
-c
-      tmpunit = -1
-      if (iinptr .lt. 50) then
-         tmpunit = ioget()
-      endif
-      if (tmpunit .eq. -1) then
-         call oerror(n28, m1, ' ')
-      endif
-c
-c     Makes sure there is an available unit and space in iinlist
-c
-      ilen = min(lastblnk(cnfile), 60)
-      if (ilen .eq. 0) goto 210
-c     Extracts the next field on the input line and stores it in cnfile
-c
-      do 200 i = 0, 2, 1
-	if (i.eq.0) then
-	   cbatchin = cnfile(1:ilen)
-           call filecomp(cbatchin, cnfile2)
-c		only attempt a file completion the first time, if this isn't
-c		found, then look for it as is in the other 2 places
-	else
-	   ilen2 = lastblnk(dirprefix(i+3))
-	   if (ilen2 .eq. 0) goto 200
-	   cnfile2 = dirprefix(i+3)(1:ilen2)// '/' //cnfile(1:ilen)
-	endif
-	open(unit=tmpunit,file=cnfile2,status='old',iostat=ier)
-c
-	if (ier .eq. 0) rewind(tmpunit,iostat=istat)
-	if (ier .eq. 0 .and. istat .eq. 0) then
-           iinptr = iinptr + 1
-           iinlist(iinptr, 1) = tmpunit
-           iinlist(iinptr, 2) = ibatchin
-           cinlist(iinptr) = cbatchin
-           iinunit = tmpunit
-	   iintype = ibatchin
-           if (.not. lsetup) then
-              if (i.eq.0) then
-                 ilen2 = lastblnk(cnfile2)
-                 write(iout,1200) cnfile2(1:ilen2)
-              else
-                 ilen2 = lastblnk(cbatchin)
-                 write(iout,1210) i, cbatchin(1:ilen2)
-              endif
-           endif
-	   return
-	endif
-200	continue
-c     Looks for file in present directory and then in pop's system 
-c     directory
-c
-210   call ioput(tmpunit)
-c				free up the unused tmpunit if error
-      call oerror(n364, m1, ' ' // cnfile(1:ilen) )
-      return
-c
- 1200 format(x,'Batch File: ',a)
- 1210 format(x,'Batch File: $popsproc',i1,'/',a)
-c
-      end
-c
diff -uNr 3.5/source/conline/box.f unipops-3.6/source/conline/box.f
--- 3.5/source/conline/box.f	2000-03-16 11:32:37.000000000 -0700
+++ unipops-3.6/source/conline/box.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine box(ix0, iy0, ix1, iy1)
-c
-c     @(#)box.f	5.1 06/22/94
-c
-c     Draws a box with corners (IX0,IY0) and (IX1,IY1)
-c
-      include 'cio.inc'
-c
-      integer*2 ix0, iy0, ix1, iy1
-c
-      if (igraphtype .gt. 2) then
-	call otherbox(ix0,iy0,ix1,iy1)
-      else if (igraphtype .eq. 2) then
-	call corebox(ix0,iy0,ix1,iy1)
-      else if (igraphtype .eq. 1) then
-	call nogbox(ix0,iy0,ix1,iy1)
-      endif
-      if (iprinttype .eq. 1) then
-	call noghardbox(ix0,iy0,ix1,iy1)
-      else if (iprinttype .eq. 3) then
-        call posthardbox(ix0,iy0,ix1,iy1)
-      else if (iprinttype .gt. 1) then
-        call otherbox(ix0,iy0,ix1,iy1)
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/bshape.f unipops-3.6/source/conline/bshape.f
--- 3.5/source/conline/bshape.f	2000-03-16 11:32:38.000000000 -0700
+++ unipops-3.6/source/conline/bshape.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,50 +0,0 @@
-      SUBROUTINE BSHAPE (ierr)
-C-------------------------------------------------------------------------------
-C  @(#)bshape.f	5.2 03/06/95
-C-------------------------------------------------------------------------------
-C-------------------------------------------------------------------
-C Changed includes to .inc and lowercase 890105 [PPM]
-c Modified 8904 [RJM] See CHANGES.DOC
-C-------------------------------------------------------------------
-      integer*2 ip, ierr, iop, iposn, i, istch(40), ier
-      integer*2 n80
-      real*4 xd, x0, eps, eta
-      character*80 stch
-c
-      INCLUDE 'appl.inc'
-      include 'core.inc'
-c
-      equivalence (istch, stch)
-c
-      data n80 /80/
-c
-      ierr = 0
-      IP=IFIX(NFIT)+1
-      CALL APCH (XDATA,YDATA,IBASE,IP,XD,X0,WORK,IER)
-c
-      if (ier .ne. 0) then
-	ierr = -1
-	return
-      endif
-c
-      EPS=1.0E-6
-      eta=0.0
-      IOP=-1
-      CALL APFS (WORK,IP,IRES,IOP,EPS,ETA,IER)
-c
-      if (ip .ne. ires) then
-	write(stch,9000) "You are losing numerical significance through"
-9000	format(a)
-	call pwrite(istch,n80)
-	write(stch,9001) "using a value of NFIT larger than", ires-1
-9001	format(a,i4)
-	call pwrite(istch,n80)
-      endif
-c
-      IPOSN=((IRES-1)*IRES)/2
-      DO 10 I=1,IRES
-  10     BPARM(I)=WORK(I+IPOSN)
-      BPARM(14)=X0
-      BPARM(15)=XD
-      RETURN
-      END
diff -uNr 3.5/source/conline/changeproj.f unipops-3.6/source/conline/changeproj.f
--- 3.5/source/conline/changeproj.f	2000-03-16 11:32:38.000000000 -0700
+++ unipops-3.6/source/conline/changeproj.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,113 +0,0 @@
-      logical*2 function changeproj(project)
-C-------------------------------------------------------------------------------
-C  @(#)changeproj.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-cc
-c     Checks and changes the project code to PROJCODE
-c     PROJCODE = C*8 string containing the project code. 
-c 
-c     Returns TRUE if the user has permission to access the data with the
-c     specified project code EVENTHOUGH online data maybe unavailable
-c
-      include 'cio.inc'
-      include 'core.inc'
-c
-      integer*2 lastblnk
-      character*8 project, projin, coobs, csite
-      real*8 dprojin, doobs, dsite
-      integer*4 irtn, onlinesite, qvers, hctype, fbtype, contype, 
-     .          sddfmt
-      logical first
-c
-      equivalence (projin, dprojin), (coobs, doobs), (csite, dsite)
-c
-      save projin, first
-c
-      data first/.true./
-      data hctype, fbtype, contype /1,2,3/
-      data sddfmt /0/
-c
-      changeproj = .false.
-      csite = site
-      coobs = oobs
-
-      if (onlinesite() .eq. -1) then
-c			no on-line data is available
-         online = .false.
-         first = .false.
-         changeproj = .true.
-         goto 99
-      endif
-c        
-      if (project .ne. 'tucson  ') then
-         if (lastblnk(project) .lt. 3) then
-	    write(istderr,*) 'Project code is less than 3 characters!'
-	    goto 99
-         endif
-c
-         projin = project      
-         if ((projin .ne. 'operatio') .and. (onlinesite() .ne. 1)) 
-     .            call uppercase(project, projin)
-c        Makes sure project code is in uppercase but only if not 'operation'
-c        and not tucson online data.
-      else
-	projin = project
-      endif
-c
-      if (projin .ne. 'NULL    ') then
-	if (first) then
-      	  call openaccess(dprojin, doobs, dsite, irtn)
-        else
-	  call chgprj(dprojin, doobs, dsite, irtn)
-        endif
-      endif
-c     IRTN would zero if the user is in the securefile and has
-c     authorization to access that project's data and if call(s) are succesfull.  
-c     IRTN < 0 if not in securefile, > 0 if can't access on-line data for any
-c     other reason.  Must call them using R*8 instead of C*8.
-c
-      if (projin .eq. 'NULL    ' .or. projin .eq. 'tucson  ') then
-	 online=.false.
-      else if (irtn .lt. 0) then
-         write(istderr,*) 'Data with project code ', project,
-     1                        ' cannot be accessed by ', oobs
-	 write(istderr,*) 'Try again ....'
-         online = .false.
-	 goto 99
-      else if (irtn .ge. 80000)  then 
-         write(istderr,*) 'Security File is not available!! ',
-     .			  'Contact the telescope''s computer staff'
-         online = .false.
-      else if (irtn .eq. 0) then
-         first = .false.
-	 online = .true.
-      else
-         write(istderr,109) '***** WARNING: Online data is not ',
-     1			     'available.  IRTN = ', irtn,' *****'
-109      format(1x,a,a,i6,a)
-         online = .false.
-      endif
-c
-c			set format to SDD, anything else turn online off
-      if (online) then
-         call setformat(sddfmt, irtn)
-         if (irtn .ne. 0) then
-            call closeaccess
-            online = .false.
-            goto 99
-         endif
-      endif
-c
-      projcode = projin
-      changeproj = .true.
-      hcver = qvers(hctype)
-      fbver = qvers(fbtype)
-      conver = qvers(contype)
-c
-c     Even if ONLINE data is not available, the user has typed in an authorized
-c     project code so we should let him/her go on with the program.  Hence,
-c     changeproj should be set to true.
-c
-99    return
-      end
-c
diff -uNr 3.5/source/conline/charsize.f unipops-3.6/source/conline/charsize.f
--- 3.5/source/conline/charsize.f	2000-03-16 11:32:39.000000000 -0700
+++ unipops-3.6/source/conline/charsize.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      subroutine charsize(csize1)
-c
-c     @(#)charsize.f	5.1 06/22/94
-c
-c     To specify character size to be output as CSIZE basic character size
-c     (1 = default)
-c
-c     csize1 = (R*4) Specifies character size factor
-c
-      real*4 csize1
-c
-      include 'foxplot.inc'
-c
-      csize = csize1
-c     Change SIZE into number of 'points' (CSIZE)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/checkfperror.F unipops-3.6/source/conline/checkfperror.F
--- 3.5/source/conline/checkfperror.F	2000-03-16 11:32:39.000000000 -0700
+++ unipops-3.6/source/conline/checkfperror.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,50 +0,0 @@
-      subroutine checkfperror
-c
-c     @(#)checkfperror.F	5.1 06/22/94
-c
-c     Prints out a list of Floating Point errors which have accrued since
-c     the last time routine was called.
-c
-      include 'errors.inc'
-      include 'cio.inc'
-c
-      character*16 out, mode, in
-      integer*4 ieeer, ieee_flags
-c
-#ifdef sun3
-      ieeer = ieee_flags('clear', 'exception', 'inexact', out)
-      call cleanup()
-      call ieee_retrospective()
-      ieeer = ieee_flags('clearall', mode, in, out)
-#else
-      if (numdivision .gt. 0 .or. numunderflow .gt. 0 .or.
-     .    numoverflow .gt. 0 .or. numinvalid .gt. 0 .or. 
-     .	  numothererr .gt. 0) then
-	write(istderr,*) 'Warning:  the following IEEE floating-point',
-     .			' arithmetic'
-	write(istderr,*) 'exceptions occurred during execution of the',
-     .			' last command:'
-	if (numdivision .gt. 0) write(istderr,10) numdivision, 'Division by zero;'
-10	format(1x,i4,1x,a,$) 
-	if (numunderflow .gt. 0) write(istderr,10) numunderflow, 'Underflow;'
-	if (numoverflow .gt. 0) write(istderr,10) numoverflow, 'Overflow;'
-	if (numinvalid .gt. 0) write(istderr,10) numinvalid, 'Invalid Op.;'
-	if (numothererr .gt. 0) write(istderr,12) numothererr, 
-     .		'FPA type:', loclasterr, ';'
-12	format(1x,i4,1x,a,i3,a,$) 
-	write(istderr,*) ' '
-        numdivision = 0
-        numunderflow = 0
-        numoverflow = 0
-        numinvalid = 0
-        numothererr = 0
-        loclasterr = 0
-        ieeer = ieee_flags('clearall', mode, in, out)
-      endif
-#endif
-c
-      amath = .false.
-      erron = .true.
-c
-      return
-      end
diff -uNr 3.5/source/conline/chngfile.f unipops-3.6/source/conline/chngfile.f
--- 3.5/source/conline/chngfile.f	2000-03-16 11:32:39.000000000 -0700
+++ unipops-3.6/source/conline/chngfile.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,287 +0,0 @@
-      integer*2 function chngfile(answr2, inum, filename)
-C-------------------------------------------------------------------------------
-C  @(#)chngfile.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Function for changing data files
-c     ANSWR2 = one of the possible commands (HELP, DIR, SUBTRACT, etc.)
-c     INUM = file type number (1,2,3...)
-c     FILENAME = name of new files
-c
-      include 'cio.inc'
-c
-      character*4 modes(12)
-      integer*2 inum, n0, n9, GAINS, RECORDS
-      character*(*) filename, answr2
-      character*1023 fullname
-      character*24 zdatetime
-      logical*2 opened
-      integer*4 irtn, istat, access, liounit, system, onlinesite
-c
-      data modes/'r ','rw ','rw ','r ','r ',5*' ','w ','w '/
-      data n0, n9 /0, 9/
-c
-      parameter (GAINS=4)
-      parameter (RECORDS=5)
-c
-      chngfile = -1
-c
-      if (answr2 .eq. ' ') then
-	chngfile = 0
-	goto 99
-      endif
-c
-      if (filename .eq. cmemory) then
-	   write(istderr,1) 'CHNGFILE: Cannot name a file ',cmemory,' ***'
-	   goto 99
-      endif
-c
-      if (inum .ne. 11 .and. inum .ne. 12) then
-	if (inum .gt. 0 .and. inum .le. 10 ) then
-	  if (iounit(inum) .eq. -32767) then
-		write(istderr,1) 'CHNGFILE: Bad file type.'
-		goto 99
-	   endif
-	endif
-      endif
-c
-      if ( (inum .eq. RECORDS .and. onlinesite() .gt. 0) .or. 
-     .     (inum .eq. GAINS .and. onlinesite() .eq. 0) ) then
-     		write(istderr,1) 'CHNGFILE: Bad file type.'
-		goto 99
-      endif
-c
-46    if(answr2 .eq. 'SUBTRACT') then
-	if (inum .eq. 11 ) then
-            call filecomp(cprtout, fullname)
-	    if (opened(fullname)) close(abs(iprtout),iostat=istat)
-	    iprtout = -abs(iprtout)
-	    cprtout = ' '
-      	    iout = istdout
-	else if (inum .eq. 12 ) then
-            call filecomp(clogout, fullname)
-	    if (opened(fullname)) then
-	        if (dolog) write(ilogout, 1030, iostat=istat)
-     .			'# Command logging OFF -- ', zdatetime()
- 1030 	        format(2a)
-		close(abs(ilogout),iostat=istat)
-	    endif
-	    ilogout = -abs(ilogout)
-	    clogout = ' '
-	    dolog = .false.
-	else 
-            liounit = iounit(inum)
-            call sddclose(liounit)
-	    iounit(inum) = -abs(iounit(inum))
-	    ciounit(inum) = ' '
-	endif
-c
-      else if(answr2 .eq. 'CHANGE') then
-        call filecomp(filename, fullname)
-	if (access(fullname,modes(inum)).eq.0) then
-	  if (inum .eq. 11) then
-           call filecomp(cprtout, fullname)
-	   if(opened(fullname)) close(abs(iprtout),iostat=istat)
-	   iprtout = abs(iprtout)
-	   cprtout = filename
-	   if (iout .eq. iprtout) then
-        	call filecomp(cprtout, fullname)
-		open(unit=iprtout, file=fullname, 
-     1		     status='old', fileopt = 'eof', iostat=istat)
-           endif
-	  else if (inum .eq. 12) then
-           call filecomp(clogout, fullname)
-	   if(opened(fullname)) then
-	        if (dolog) write(ilogout, 1030, iostat=istat)
-     .			'# Command logging OFF -- ', zdatetime()
-		close(abs(ilogout),iostat=istat)
-	   endif
-	   ilogout = abs(ilogout)
-	   clogout = filename
-	   if (dolog) then
-        	call filecomp(clogout, fullname)
-	   	open(unit=ilogout, file=fullname, 
-     1		     status='old', fileopt = 'eof', iostat=istat)
-	   	write(ilogout, 1030, iostat=istat)'# Command logging ON -- ', 
-     .				zdatetime()
-           endif
-	  else 
-	   iounit(inum) = abs(iounit(inum))
-	   ciounit(inum) = filename
-           liounit = -iounit(inum)
-           call sddopen(liounit,fullname,modes(inum), irtn)
-c			if irtn is non-zero, an error occured
-c
-	   if (inum .eq. RECORDS) then
-	     if (irtn .eq. -1) then
-		irtn = 0
-	     else if (irtn .eq. 0) then
-		call sddclose(liounit)
-		write(istderr,1) 'CHNGFILE:  Trying to attach a file that',
-     .			' is not in RECORDS format.'
-                goto 99
-	     endif
-	   else
-	     if (irtn .eq. -1) then
-		call sddclose(liounit)
-                write(istderr,1) 'CHNGFILE: Cannot attach a RECORDS ',
-     .			'file as a data file.'
-                goto 99
-	     endif
-	   endif
-c	   If RECORDS file, an irtn of -1 is OK but 0 is bad; for all other
-c	   an irtn of 0 is OK but a -1 is bad.
-c
-           if (irtn .ne. 0) then
-	      if (irtn .le. 3) then
-                  write(istderr,1) 'CHNGFILE: File by that name ',
-     .	  	  'doesn"t exist or has the wrong access privelages.'
-                  goto 99
-               else if (irtn .eq. 4 .or. irtn .eq. 5) then
-                  write(istderr,1) 
-     .              'CHNGFILE: An impossible error occured.'
-                  write(istderr,2)
-     .              'Send a report of this error to a unipops guru ',
-     .              ' ... sddopen err no ', irtn
-                  goto 99
-               else if (irtn .eq. 6) then
-                  write(istderr,1) 'CHNGFILE: Could not open new file',
-     .              ' -- Old file WAS closed.'
-                  iounit(inum) = -iounit(inum)
-                  ciounit(inum) = ' '
-                  goto 99
-               else if (irtn .eq. 7) then
-                  write(istderr, 1) 
-     .              'CHNGFILE: Error reading bootstrap ',
-     .              'or index information -- File may be corrupt.'
-                  write(istderr, 1) 'CHNGFILE: Old file was closed.'
-               else if (irtn .eq. 8) then
-                  write(istderr,1) 
-     .              'CHNGFILE: File is in an improper format.'
-                  iounit(inum) = -iounit(inum)
-                  ciounit(inum) = ' '
-                  goto 99
-               else 
-                  write(istderr, 1) 
-     .              'CHNGFILE: An unrecognized error was returned ',
-     .              'by sddopen.'
-                  write(istderr,2)
-     .              'Send a report of this error to a unipops guru ',
-     .              ' ... sddopen err no ', irtn
-               endif
-            endif
-	  endif
-	else
-	  write(istderr,1) 'CHNGFILE: File by that name ',
-     1		'doesn"t exist or has the wrong access privelages.'
-	  goto 99
-	endif
-c
-      else if(answr2 .eq. 'CREATE') then
-	  if (inum .eq. 11) then
-            call filecomp(cprtout, fullname)
-	    if (opened(fullname)) close(abs(iprtout),iostat=istat)
-            call filecomp(filename, fullname)
-	    open(unit = abs(iprtout), file = fullname, status='new',
-     1		iostat = irtn, fileopt = 'eof')
-	    if (irtn .eq. 0) then
-	      iprtout = abs(iprtout)
-	      cprtout = filename
-	      if (iout .ne. iprtout) close(unit=abs(iprtout),iostat=istat)
-	    else
-	      write(istderr,1) 'CHNGFILE: Cannot create file.'
-	      goto 99
-	    endif
-c	    Creates printout file if it doesn't already exist
-c
-	  else if (inum .eq. 12) then
-            call filecomp(clogout, fullname)
-	    if (opened(fullname)) then
-	        if (dolog) write(ilogout, 1030, iostat=istat)
-     .			'# Command logging OFF -- ', zdatetime()
-		close(abs(ilogout),iostat=istat)
-	    endif
-            call filecomp(filename, fullname)
-	    open(unit = abs(ilogout), file = fullname, status='new',
-     1		iostat = irtn)
-	    if (irtn .eq. 0) then
-	      ilogout = abs(ilogout)
-	      clogout = filename
-	      if (dolog) then
-	   	write(ilogout, 1030, iostat=istat) '# Command logging ON -- ', 
-     .				zdatetime()
-	      else
-		close(unit=abs(ilogout),iostat=istat)
-	      endif
-	    else
-	      write(istderr,1) 'CHNGFILE: Cannot create file.'
-	      goto 99
-	    endif
-c	    Creates printout file if it doesn't already exist
-c
-	  else if (inum .ne. RECORDS) then
-	    irtn = system('makefile.exe ' // filename  )
-            if (irtn .ne. 0) call oerror(n9, n0, 'CHNGFILE')
-	    iounit(inum) = abs(iounit(inum))
-	    ciounit(inum) = filename
-            liounit = -iounit(inum)
-            call filecomp(filename, fullname)
-            call sddopen(liounit,fullname,modes(inum), irtn)
-c			if irtn is non-zero, an error occured
-            if (irtn .ne. 0) then
-              if (irtn .le. 3) then
-                  write(istderr,1) 'CHNGFILE: File by that name ',
-     .	  	  'doesn"t exist or has the wrong access privelages.'
-                  goto 99
-               else if (irtn .eq. 4 .or. irtn .eq. 5) then
-                  write(istderr,1) 
-     .              'CHNGFILE: An impossible error occured.'
-                  write(istderr,2)
-     .              'Send a report of this error to a unipops guru ',
-     .              ' ... sddopen err no ', irtn
-                  goto 99
-               else if (irtn .eq. 6) then
-                  write(istderr,1) 'CHNGFILE: Could not open new file',
-     .              ' -- Old file WAS closed.'
-                  iounit(inum) = -iounit(inum)
-                  ciounit(inum) = ' '
-                  goto 99
-               else if (irtn .eq. 7) then
-                  write(istderr, 1) 
-     .              'CHNGFILE: Error reading bootstrap ',
-     .              'or index information -- File may be corrupt.'
-                  write(istderr, 1) 'CHNGFILE: Old file was closed.'
-               else if (irtn .eq. 8) then
-                  write(istderr,1) 
-     .              'CHNGFILE: File is in an improper format.'
-                  iounit(inum) = -iounit(inum)
-                  ciounit(inum) = ' '
-                  goto 99
-               else 
-                  write(istderr, 1) 
-     .              'CHNGFILE: An unrecognized error was returned ',
-     .              'by sddopen.'
-                  write(istderr,2)
-     .              'Send a report of this error to a unipops guru ',
-     .              ' ... sddopen err no ', irtn
-               endif
-            endif
-	  else
-            write(istderr, 1)
-     .		'CHNGFILE: Cannot create the desired file type.'
-	    goto 99
-	  endif
-c
-      else
-	write(istderr,1) 'CHNGFILE: Unrecognized command.'
-	goto 99
-      endif
-c 
-      chngfile = 0
-c
-99    return
-c
- 1    format(1x, 10a)
- 2    format(1x,2a,i)
-C
-      end	
diff -uNr 3.5/source/conline/cleanup.c unipops-3.6/source/conline/cleanup.c
--- 3.5/source/conline/cleanup.c	2000-03-16 11:32:41.000000000 -0700
+++ unipops-3.6/source/conline/cleanup.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-
-/* @(#)cleanup.c	5.1 06/22/94 */
-
-/* workaround hack to avoid message about NaNs and Infs being written */
-/* only needed for sun3 version.  May not work on anything but OS 4.1 */
-/* and fortran 1.4 */
-
-#ifdef IEEEHACK
-
-extern int	__inf_read, __inf_written, __nan_read, __nan_written;
-
-void cleanup_()
-{
-   __inf_read = 0;
-   __inf_written = 0;
-   __nan_read = 0;
-   __nan_written = 0;
-}
-
-#else
-
-void cleanup_()
-{
-}
-
-#endif
diff -uNr 3.5/source/conline/clrpage.f unipops-3.6/source/conline/clrpage.f
--- 3.5/source/conline/clrpage.f	2000-03-16 11:32:41.000000000 -0700
+++ unipops-3.6/source/conline/clrpage.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,61 +0,0 @@
-      subroutine clrpage
-C-------------------------------------------------------------------------------
-C  @(#)clrpage.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Clears Graphics screen
-c*************************
-c 8904 [RJM]
-c 8911 [RJM]
-c*************************
-c
-      integer*2 istat
-      integer*4 unlink
-      logical*2 opened, inquirefile
-      include 'cio.inc'
-c
-c
-      if (igraphtype .eq. 4) then
-	call v102clrpage
-	inline = 1
-	inlast = 1
-      else if (igraphtype .eq. 3) then
-	call tekclrpage
-	inline = 1
-	inlast = 1
-      else if (igraphtype .eq. 2) then
-	call coreclrpage
-      else 
-	call nogclrpage
-      endif
-c
-      if (opened(coutgrph)) close(ioutgrph,status='delete',iostat=istat)
-      if (istat .ne. 0) then
-         write(istderr,*) ' Problem with CLRPAGE during attempted close'
-      else 
-         if (inquirefile(coutgrph)) istat = unlink(coutgrph)
-         if (istat .ne. 0) then
-            write(istderr,*) ' Problem with CLRPAGE during unlink'
-         else 
-            open(unit=ioutgrph,file=coutgrph, status='new',
-     +	                 iostat=istat)
-            if (istat .ne. 0) then
-               write(istderr,*) ' Problem with CLRPAGE during open'
-               write(istderr,*) ' istat = ', istat
-               write(istderr,*) ' ioutgrph = ', ioutgrph
-               write(istderr,*) ' coutgrph = ', coutgrph
-            else 
-               rewind(ioutgrph,iostat=istat)
-               if (istat .ne. 0) 
-     +           write(istderr,*) ' Problem with CLRPAGE during rewind'
-            end if
-         end if
-      end if
-c
-      iglinex = 1
-      igliney = 780
-c     Reset graphics screen text line pointer.  
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/cmprsstrng.f unipops-3.6/source/conline/cmprsstrng.f
--- 3.5/source/conline/cmprsstrng.f	2000-03-16 11:32:42.000000000 -0700
+++ unipops-3.6/source/conline/cmprsstrng.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,30 +0,0 @@
-      subroutine cmprsstrng(in, out)
-c---------------------------------------------
-c  @(#)cmprsstrng.f	5.1 06/22/94
-c---------------------------------------------
-c
-c     Compresses out all double blanks from IN string and places
-c     results back into into OUT string
-c
-      character*(*) in, out
-      integer*2 lastblnk, ilen, i, i1
-c
-      ilen = lastblnk(in)
-      i1 = 1
-      out = ' '
-      if (ilen .ne. 0) then
-	do 100 i = 1, ilen-1
-	   if (in(i:i+1) .ne. '  ') then
-		out(i1:i1+1) = in(i:i+1)
-		i1 = i1 + 1
-	   endif
-100	   continue
-c
-      else
-	out = in
-      endif
-c
-      return
-      end
-c
-     
diff -uNr 3.5/source/conline/cnps.f unipops-3.6/source/conline/cnps.f
--- 3.5/source/conline/cnps.f	2000-03-16 11:30:10.000000000 -0700
+++ unipops-3.6/source/conline/cnps.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      SUBROUTINE CNPS (Y,X,C,N)
-C-------------------------------------------------------------------------------
-C  @(#)cnps.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c**********************************
-c  Modified 8903 [RJM] See CHANGES.DOC
-c**********************************
-      integer*2 n, i, k
-      real*4 C(*), y, x, c, h1, h0, arg, h2
-c
-      IF (N-2) 3,4,4
-   3  Y=C(1)
-      RETURN
-C
-   4  ARG=X+X
-      H1=0.0
-      H0=0.0
-C
-      DO 5 I=1,N
-         K=N-I
-         H2=H1
-         H1=H0
-   5     H0=ARG*H1 -H2+C(K+1)
-      Y=0.5*(C(1)-H2+H0)
-      RETURN
-      END
-
-
diff -uNr 3.5/source/conline/color.f unipops-3.6/source/conline/color.f
--- 3.5/source/conline/color.f	2000-03-16 11:32:43.000000000 -0700
+++ unipops-3.6/source/conline/color.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,174 +0,0 @@
-      integer*2 function color(huered, shdgrn, satblu)
-c
-c     @(#)color.f	5.2 09/23/94
-c
-c     Allows for the changing of colors on the graphics screen.  Only
-c     128 different colors are allowed.   If COLORS is called twice with
-c     the same parameters, the old color plane is used and a new one is
-c     not assigned.  
-c
-c     huered = (R*4) Hue specification (0 <= ihuered <= 63), or, if < 0,
-c		       Red specification (-16 <= ihuered <= -1).
-c     shdgrn = (R*4) Shade or lightness specification (0 <= ishdgrn <= 8),
-c			 or, if ihuered < 0, Green specification (-16 <=
-c			 ishdgrn <= -1).
-c     satblu = (R*4) Saturation specification (0 <= isatblu <= 6), or, if
-c			ihuered < 0, Blue specification (-16 <= isatblu <=
-c			-1).
-c
-c     COLOR returns RED*16*16 + GREEN*16 + BLUE (0 - 4095 range).
-c
-c     CAUTION: If huered < 0, then the absolute values of huered, 
-c	       shdgrn, and satblu must be between 1 and 16.  If 
-c	       huered >= 0, then the absolute values of huered must 
-c	       be <= 63, shdgrn <= 8, and satblu <= 6.
-c
-c     NOTE: The default color is white.
-c
-      include 'cio.inc'
-c
-      real*4 huered, shdgrn, satblu
-c
-      integer*4 idxarray(64,9,7), idx, ihurd, ishgr, istbl
-      integer*2 ilen, lastblnk, ierr
-      integer*2 n261, n352, n357, m1, m2
-      character*1023 filename
-      logical first
-c
-      data first/.true./
-      data n261, n352, n357, m1, m2 /261, 352, 357, -1, -2/
-c
-      save first, idxarray
-c
-      if (first) then
-	ilen = lastblnk(dirprefix(1))
-      	filename = dirprefix(1)(1:ilen) // '/sunbin/ihstorgb'
-c
-      	open(unit=iiotmp,file=filename,access='sequential',
-     .		form='unformatted',status='old',iostat=ierr)
-c
-      	if (ierr .ne. 0) 
-     .		call oerror(n352, m1, 'IHSTORGB file')
-c
-        rewind(iiotmp,iostat=ierr)
-        read(iiotmp,iostat=ierr) idxarray
-      	if (ierr .ne. 0) 
-     .		call oerror(n357, m1, 'IHSTORGB file')
-c
-	close(iiotmp,iostat=ierr)
-        first = .false.
-      endif
-c     Reads in the table that allows one to convert from IHS color system to
-c	RGB.
-c
-      if (huered .ge. 0.) then
-        ihurd = nint(abs(huered))
-        ishgr = nint(abs(shdgrn))
-        istbl = nint(abs(satblu))
-      	if (ihurd .gt. 63) call oerror(n261, m2, ' ')
-      	if (ishgr .gt. 8) call oerror(n261, m2, ' ')
-      	if (istbl .gt. 6) call oerror(n261, m2, ' ')
-	idx = idxarray(ihurd+1, ishgr+1, istbl+1)
-	ihurd = and(rshift(idx,16),255) + 1
-	ishgr = and(rshift(idx,8),255) + 1
-	istbl = and(idx,255) + 1
-      else
-	ihurd = nint(abs(huered)*17.-16.)
-	ishgr = nint(abs(shdgrn)*17.-16.)
-	istbl = nint(abs(satblu)*17.-16.)
-	if (ihurd .gt. 256 .or. ihurd .le. 0) call oerror(n261, m2, ' ')
-	if (ishgr .gt. 256 .or. ishgr .le. 0) call oerror(n261, m2, ' ')
-	if (istbl .gt. 256 .or. istbl .le. 0) call oerror(n261, m2, ' ')
-        idx = (ihurd-1)*256*256 + (ishgr-1)*256 + (istbl-1)
-      endif
-c     Check inputs for IHS and RGB system; IDX = coded RGB color;
-c	IHURD, ISHGR, and ISTBL are now between 1 and 256 and are the RGB
-c	values of IDX.   
-c
-      if (igraphtype .eq. 2) then
-	call corecolor(idx)
-      else if (igraphtype .eq. 1)  then
-	call nogcolor(idx)
-      else if (igraphtype .gt. 0) then
-	call othercolor(idx)
-      endif
-      if(iprinttype .eq. 1) then
-	call noghardcolor(idx)
-      else if (iprinttype .eq. 3) then
-        call posthardcolor(idx)
-      else if (iprinttype .gt. 1) then
-        call othercolor(idx)
-      endif
-c
-      color = nint((float(ihurd)-1.)/17.)*256 + 
-     .	      nint((float(ishgr)-1.)/17.)*16 + 
-     .	      nint((float(istbl)-1.)/17.)
-c     COLOR will be the approximate color (last 4 bits of each color
-c	has been lost).
-c
-      return
-      end
-c
-c-----------------------------------------------
-      subroutine revertcolor
-c
-c     Reverts the color to the currently defined color
-c
-      include 'cio.inc'
-      include 'appl.inc'
-c
-      integer*4 IDXBLACK
-      integer*2 color, IDXWHITE
-      real*4 red, green, blue
-c
-      parameter (IDXBLACK=0)
-      parameter (IDXWHITE = 4095)
-c
-      red = -(and(rshift(idx,8),15) + 1)
-      green = -(and(rshift(idx,4),15) + 1)
-      blue = -(and(idx,15) + 1)
-c
-      if (color(red, green, blue) .eq. IDXWHITE) then
-        if(iprinttype .eq. 1) then
-	  call noghardcolor(IDXBLACK)
-        else if (iprinttype .eq. 3) then
-          call posthardcolor(IDXBLACK)
-        else if (iprinttype .gt. 1) then
-          call othercolor(IDXBLACK)
-       endif
-      endif
-c     Reset printers to black if screens are white
-c
-      return
-      end
-c
-c-----------------------------------------------
-      subroutine resetcolor
-c
-c     Resets the color to the default color (white for screen, 
-c     black for printers)
-c
-      include 'appl.inc'
-      include 'cio.inc'
-c
-      integer*4 IDXBLACK
-      integer*2 color
-      real*4 RM16
-c
-      parameter (RM16 = -16.)
-      parameter (IDXBLACK = 0)
-c
-      idx = color(RM16, RM16, RM16)
-c
-      if(iprinttype .eq. 1) then
-	  call noghardcolor(IDXBLACK)
-      else if (iprinttype .eq. 3) then
-          call posthardcolor(IDXBLACK)
-      else if (iprinttype .gt. 1) then
-          call othercolor(IDXBLACK)
-      endif
-c
-      return
-      end
-c
-
diff -uNr 3.5/source/conline/compar.f unipops-3.6/source/conline/compar.f
--- 3.5/source/conline/compar.f	2000-03-16 11:32:43.000000000 -0700
+++ unipops-3.6/source/conline/compar.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      integer*2 function compar(el1, el2)
-c
-c     @(#)compar.f	5.1 06/22/94
-c
-c     Function used by QSORT to sort an array
-c
-      character*10 el1, el2
-c
-      if (lgt(el1, el2)) then
-	compar = 1
-      else
-	compar = -1
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/compress.f unipops-3.6/source/conline/compress.f
--- 3.5/source/conline/compress.f	2000-03-16 11:32:44.000000000 -0700
+++ unipops-3.6/source/conline/compress.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,539 +0,0 @@
-      subroutine compress
-c
-c     @(#)compress.f	5.1 06/22/94
-c
-c     Compresses the K, KXORG and LISTF arrays
-c
-      integer*2 newlistf(32766), newk(32766), newkxorg, length, top2,
-     .		type, tag, nk0, nt, newl, newkxl, newtag, isize,  top1,
-     .		ndim, nsub, i, oldstack(4096), newstack(4096), maxstck, 
-     .		newlistl, ii, iwpc, newnk0, ibyte, llocat, irealp, listl,
-     .		finish, irtn, unused, iwpr, newkx(32766), maxlnk,
-     .		llast, newllast, lstart, substack(4096), top3
-      integer*2 n0, n1, n2, n132, m1, fshort
-      logical debug, pushcmp
-      character*10 names
-      real*4 newc(32766)
-c
-      include 'core.inc'
-      include 'cio.inc'
-      include 'lsf.inc'
-      include 'stk.inc'
-c
-      equivalence (newk(1), newc(1)), (newk(8),newkxorg), 
-     .		  (newkx(1), newc(16384))
-c
-      data n0, n1, n2, n132, m1 /0, 1, 2, 132, -1/
-c
-      parameter (MAXSTCK = 4096)
-      parameter (MAXLNK = 32766)
-c
-      debug = idebug .gt. 0
-      top1 = 0
-      top2 = 0
-      top3 = 0
-c     TOP1,2,3 = number of tags that might have to be relinked.
-c
-      call copy(k(7), k, newk)
-      newk(3) = k(7)
-      newk(10) = 205
-c
-      l = 1
-2       lstart = l
-	l = k(l)
-        if (l .gt. 0 .and. l .lt. k(7)) then
-		newk(9) = l
-		goto 2
-	endif
-c     Copy over builtin section of K array; reset 'next-free-index' pointers.
-c     LFIRST = pointer to first user-defined item in linked list.
-c
-      call copy(kx(7),kx,newkx)
-      newkx(3) = kx(7)
-c     Copy over values of builtin adverbs; reset 'next-free-index' pointer.
-c
-      call copy(listf(7), listf, newlistf)
-      newlistf(3) = listf(7)
-c     Copy over builtin section of LISTF array; reset 'next-free-index' pointer.
-c
-      write(istdout,*) 'Compressing Adverbs and Aliases'
-c
-      l = lstart
-c     K(LSTART) = Start of user-defined section of K array's linked list
-c
-10      l = k(l)
-        if (l .ne. 0) then
-c
-	   length = k(l+1)/16
-	   type = k(l+1) - 16*length
-	   tag = k(l+2)
-	   nk0 = l+3
-	   nt = length + 4
-c	   LENGTH = number of chars in name of proc/adverb
-c	   TYPE = type of operator/operand
-c	   TAG = tag of operator/operand
-c	   NK0 = link to sub-link-list (if it exists)
-c	   NT = Number of I*2 words this entry should take up
-c
-	   if (type .eq. 1 .or. type .eq. 2 .or. type .eq. 7 .or.
-     .		    type .eq. 8) then
-c
-c		We have found a user-defined ADVERB
-c
-	        if (debug) write(istderr,11) 'Adverb:',l,(k(l+i-1), i = 1, nt)
-c
-		newl = llocat(nt,newk,newk(9))
-c		Find an empty location in the NEWK array
-c
-		newkxl = 1
-		newtag = irealp(fshort(llocat(n2,newkx,newkxl))) + 
-     .                                 + irealp(newkxorg) - n1
-c		Find an empty location in the adverb section of the NEWKX array
-c
-		newk(newl+1) = type + 16*length
-		newk(newl+2) = newtag
-		newk(newl+3) = 0
-		call copy(length,k(l+4),newk(newl+4))
-c		Copy over the type, length, name from old K to NEWK; use the 
-c		new TAG of the location of the new adverb value.
-c
-		if (type .eq. 2 .or. type .eq. 7) then
-c
-c		   You have a string or an array and must create the 
-c		   sub-link-list entry.
-c
-		   nk0 = k(nk0)
-		   isize = k(nk0)
-		   ndim = k(nk0+1)
-		   nsub = 2*ndim+2
-c		   NK0 = Location of first element in sub-link-list
-c		   ISIZE = total number of R*4 elements in array or string
-c		   NDIM = Number of dimensions
-c		   NSUB = Number of I*2 this sub-link-list should take up.
-c
-	           if (debug) write(istderr,22) '    In:',nk0,
-     .					(k(nk0+i-1), i = 1, nsub)
-c
-		   newnk0 = newl + 3
-		   newnk0 = llocat(nsub, newk, newnk0)
-c		   Create space for array dimension sub-link-list in NEWK
-c		   NEWNK0 = Location in NEWK where the link to sub-link-list
-c			will be found.
-c
-		   if (nk0 .ne. newnk0) then
-     		      if (.not. pushcmp(oldstack,top1,maxstck,fshort(-nk0)) .or.
-     .		       .not. pushcmp(newstack,top2,maxstck,fshort(-newnk0)))
-     .			call oerror(n132, m1, 'Too many ADVERBS to compress')
-                      if (type .eq. 2) then
-			if (.not. pushcmp(substack,top3,maxstck,n1))
-     .			 call oerror(n132, m1, 'Too many ADVERBS to compress')
-                      else 
-			if (.not. pushcmp(substack,top3,maxstck,n0))
-     .			 call oerror(n132, m1, 'Too many ADVERBS to compress')
-                      endif
-		   endif
-c		   Store away NK0's (equiv. to: K(LOCSYM+2) ) for relinking 
-c		   later on references to array subscripts.
-c
-		   if (isize .gt. 1) irtn = 
-     .			llocat(fshort(iwpr(isize)-n2),newkx,newkxl)
-c		   Reserve more space in adverb value section of NEWK (the
-c		   KXORG list); two I*2 words were already reserved by 
-c		   above call to LLOCAT that found NEWTAG.
-c
-		   call copy(nsub,k(nk0),newk(newnk0))
-c		   Copy over dimensions from K to NEWK
-c
-	           if (debug) write(istderr,22) '   Out:',newnk0,
-     .					(newk(newnk0+i-1), i = 1, nsub)
-c
-		else if (type .eq. 1 .or. type .eq. 8) then
-c
-c		   You don't have a string or array so the size is 1 R*4 word
-c
-		   isize = 1
-c
-c
-		endif
-c
-	        if (debug) write(istderr,11) '   Out:',newl,
-     .					(newk(newl+i-1), i = 1, nt)
-		if (debug) write(istderr,17) '               Values'
-17		format(1x,a)
-c
-		do 15 i = 1, isize
-		   newc(newtag+i-1) = c(tag+i-1)
-		   if (debug .and. type .ne. 7) then
-			write(istderr,12) i, newc(newtag+i-1), c(tag+i-1)
-12			format(1x,i6,2x,1p2g14.7)
-		   else if (debug .and. type .eq. 7) then
-			write(istderr,13) i, newc(newtag+i-1), c(tag+i-1)
-13			format(1x,i6,2x,a4,2x,a4)
-		   endif
-15		   continue
-c		Copy over old adverb's value from old C to NEWC
-c
-		if (tag .ne. newtag) then
-     		   if (.not. pushcmp(oldstack,top1,maxstck,fshort(-tag)) .or.
-     .		       .not. pushcmp(newstack,top2,maxstck,fshort(-newtag)) .or.
-     .		       .not. pushcmp(substack,top3,maxstck,n0))
-     .			call oerror(n132, m1, 'Too many ADVERBS to compress')
-		endif
-c		Store away tags for relinking later on
-c
-	  else if (type .eq. 6) then
-c
-	        if (debug) write(istderr,11) 'Alias:',l,(k(l+i-1), i = 1, nt)
-c
-		newl = llocat(nt,newk,newk(9))
-c		Find an empty location in the NEWK array
-c
-		newk(newl+1) = type + 16*length
-		newk(newl+2) = k(l+2)
-		newk(newl+3) = 0
-		call copy(length,k(l+4),newk(newl+4))
-c		Now, copy over the type, length, name from old K to NEWK.
-c
-	        if (debug) write(istderr,11) '  Out:',newl,
-     .					(newk(newl+i-1), i = 1, nt)
-c
-c		NOTE:  No need to store away tags for later relinking!
-c
-	   else if (type .ne. 3) then
-c
-c		You shouldn't find anything but Adverbs, Aliases, and Proc's 
-c		in the user-defined section of the K array.
-c
-	        if (debug) write(istderr,11) '    :',l, (k(l+i-1), i = 1, nt)
-11		format(1x,a,5i7,(1x,5a2))
-		call oerror(n132,m1, 
-     .		      'Found something where it doesn''t belong')
-c
-	   endif
-c
-	   goto 10
-c
-   	endif
-c
-      write(istdout,*) 'Compressing Constants'
-c
-      l = 4
-c     K(4) = Start of K array's linked list of permanent constants
-c
-30      l = k(l)
-        if (l .ne. 0) then
-c
-	   if (l .lt. k(7)) goto 30
-c 	   We can skip over the builtin-stuff
-c
-	   length = k(l+1)/16
-	   type = k(l+1) - 16*length
-	   tag = irealp(l) + 1
-	   nt = length + 2
-c	   LENGTH = number of chars in name of proc/adverb
-c	   TYPE = type of operator/operand
-c	   TAG = tag of operator/operand
-c	   NT = Number of I*2 words this entry should take up
-c
-	   if (type .ne. 11 .and. type .ne. 14) then
-c
-c		You shouldn't find anything but literals and real constants
-c		in this linked-list.
-c
-	        if (debug) write(istderr,11) '     ',l, (k(l+i-1), i = 1, nt)
-		call oerror(n132,m1, 
-     .		      'Found something besides a real/literal constant')
-c
-	   else 
-c
-c		We have found a literal/real
-c
-	        if (debug .and. type .eq. 11) write(istderr,31) 
-     .			'   Real Constant:',l,k(l), k(l+1), c(tag)
-31		format(1x,a,3i7,1pg14.7)		
-	        if (debug .and. type .eq. 14) write(istderr,32) 
-     .			'Literal Constant:',l,(k(l+i-1), i = 1, nt)
-32		format(1x,a,3i7,(1x,30a2))		
-c
-		if (unused(k, n1, fshort(-tag), names, n0) .eq. 0) then
-		   if (debug) write(istderr,17) 'Constant never used --- skipping'
-		   goto 30
-		endif
-c		Make sure the constant is used by a procedure before you try
-c		to move it into NEWK.
-c 
-		newl = llocat(nt,newk,newk(10))
-c		Find an empty location in the NEWK array
-c
-		newtag = irealp(newl) + 1
-c
-		newk(newl+1) = type + 16*length
-		call copy(length,k(l+2),newk(newl+2))
-c		Copy over the type, length, values from old K to NEWK.
-c
-	        if (debug .and. type .eq. 11) write(istderr,31) 
-     .		   '             Out:',newl,newk(newl),newk(newl+1),newc(newtag)
-	        if (debug .and. type .eq. 14) write(istderr,32) 
-     .		   '             Out:',newl,(newk(newl+i-1), i = 1, nt)
-c
-		if (tag .ne. newtag) then
-     		   if (.not. pushcmp(oldstack,top1,maxstck,fshort(-tag)) .or.
-     .		       .not. pushcmp(newstack,top2,maxstck,fshort(-newtag)) .or.
-     .		       .not. pushcmp(substack,top3,maxstck,n0))
-     .			call oerror(n132, m1, 'Too many CONSTANTS to compress')
-		endif
-c		Store away tags for relinking later on
-c
-	   endif
-c
-	   goto 30
-c
-   	endif
-c
-      write(istdout,*) 'Compressing Procedures'
-c
-      l = lstart
-c     K(LSTART) = Start of K array's linked list
-c
-20      l = k(l)
-        if (l .ne. 0) then
-c
-	   length = k(l+1)/16
-	   type = k(l+1) - 16*length
-	   tag = k(l+2)
-	   nk0 = l+2
-           llast = l+3
-	   nt = length + 4
-c	   LENGTH = number of chars in name of proc/adverb
-c	   TYPE = type of operator/operand
-c	   TAG = tag of operator/operand
-c	   NK0 = link to sub-link-list (if it exists)
-c	   NT = Number of I*2 words this entry should take up
-c          LLAST = Location of next entry in local adverb linked-list
-c
-	   if (type .eq. 3) then
-c
-	        if (debug) write(istderr,11) 'Proc:',l,(k(l+i-1), i = 1, nt)
-c
-		newl = llocat(nt,newk,newk(9))
-c		Find an empty location in the NEWK array
-c
-		newnk0 = newl + 2
-	        newllast = newl + 3
-c		NEWNK0 = Location in NEWK where the link to next program chunk
-c			will be found.
-c		NEWLCLLAST = Location where new local adverb list will be start.
-c
-		newk(newl+1) = type + 16*length
-		newk(newl+2) = 0
-		newk(newl+3) = 0
-		call copy(length,k(l+4),newk(newl+4))
-c		Now, copy over the type, length, name from old K to NEWK.
-c
-21		nk0 = k(nk0)
-	  	if (nk0 .ne. 0) then
-		  listl = k(nk0+1)
-c		  LISTL = Location in LISTF array where procedure text begins
-c
-		  i = nk0 + 2
-25		  if (k(i) .ne. 1) then
-		     i = i + 1
-		     goto 25
-		  endif
-		  nsub = i - nk0 + 1
-c		  NSUB = Number of I*2 words that this sub-link-list should take up.
-c
-	          if (debug) write(istderr,22) '  In:',nk0,
-     .				(k(nk0+i-1), i = 1, nsub)
-22		  format(1x,a,(1x,10i7))
-c
-		  newnk0 = llocat(nsub, newk, newnk0)
-c		  Create space for next program chunk in sub-link-list in NEWK
-c
-		  call copy(nsub,k(nk0),newk(newnk0))
-c		  Copy over program chunk from K to NEWK
-c
-		  newk(newnk0) = 0
-		  newk(newnk0+1) = 0
-c		  Zero out link to next program chunk -- will be reset when
-c		  next program chunk is handled.  Also reset pointer to LISTF
-c		  array -- will fill in in the next stage.
-c
-		  if ( listl .ne. 0) then
-c		     We have to move over the LISTF entry, if one exits.
-c
-		     ibyte = listf(listl)
-		     ii = iwpc(ibyte) + 1
-c		     IBYTE = Number of chars in procedure listing
-c		     II = Number of I*2 words to hold procedure listing.
-c
-		     if (debug) write(istderr,23) '  In:',listl,
-     .					(listf(listl+i-1),i=1,ii)
-23		     format(1x,a,2i7,(1x,36a2))
-c
-		     newlistl = 1
-		     newk(newnk0+1) = llocat(ii, newlistf, newlistl)
-c		     Reserve space in LISTF array; update pointer to LISTF in NEWK
-c		     array.
-c
-		     call copy(ii, listf(listl), newlistf(newlistl) )
-c		     Copy over contents of LISTF to NEWLISTF
-c
-		     if (debug) write(istderr,23) ' Out:',newlistl,
-     .					(newlistf(newlistl+i-1),i=1,ii)
-		  endif
-c
-c		  We are finished with this program chunk so we can go on to 
-c		  the next.
-c
-	          if (debug) write(istderr,22) ' Out:',newnk0,
-     .				(newk(newnk0+i-1), i = 1, nsub)
-c
-		  goto 21
-c
-		endif
-c
-c		Now we can handle the local list of adverbs
-c
-110             llast = k(llast)
-        	if (llast .ne. 0) then
-	           length = k(llast+1)/16
-	   	   type = k(llast+1) - 16*length
-	   	   tag = k(llast+2)
-	   	   nk0 = llast+3
-	   	   nt = length + 4
-	           if (type .eq. 1 .or. type .eq. 2 .or. type .eq. 7 .or.
-     .		       type .eq. 8) then
-	               if (debug) write(istderr,11) 'Loc Adverb:',
-     .				llast,(k(llast+i-1), i = 1, nt)
-		       newllast = llocat(nt,newk,newllast)
-		       newkxl = 1
-		       newtag = irealp(fshort(llocat(n2,newkx,newkxl))) + 
-     .                                 + irealp(newkxorg) - n1
-		       newk(newllast+1) = type + 16*length
-		       newk(newllast+2) = newtag
-		       newk(newllast+3) = 0
-		       call copy(length,k(llast+4),newk(newllast+4))
-		       if (type .eq. 2 .or. type .eq. 7) then
-		   	  nk0 = k(nk0)
-		   	  isize = k(nk0)
-		   	  ndim = k(nk0+1)
-		   	  nsub = 2*ndim+2
-	           	  if (debug) write(istderr,22) '        In:',nk0,
-     .					(k(nk0+i-1), i = 1, nsub)
-		   	  newnk0 = newllast + 3
-		   	  newnk0 = llocat(nsub, newk, newnk0)
-		          if (nk0 .ne. newnk0) then
-     		            if (.not. pushcmp(oldstack, top1, maxstck,
-     .			  	fshort(-nk0)) .or. .not. pushcmp(newstack,
-     .				top2, maxstck, fshort(-newnk0)) .or. .not.
-     .				pushcmp(substack, top3, maxstck, n0))
-     .			       call oerror(n132, m1, 
-     .					'Too many ADVERBS to compress')
-		          endif
-		          if (isize .gt. 1) irtn = 
-     .			       llocat(fshort(iwpr(isize)-n2),newkx,newkxl)
-		          call copy(nsub,k(nk0),newk(newnk0))
-	                  if (debug) write(istderr,22) '       Out:',newnk0,
-     .					(newk(newnk0+i-1), i = 1, nsub)
-		       else if (type .eq. 1 .or. type .eq. 8) then
-		          isize = 1
-		       endif
-	               if (debug) write(istderr,11) '       Out:',newllast,
-     .					(newk(newllast+i-1), i = 1, nt)
-		       if (debug) write(istderr,17) '               Values'
-		       do 115 i = 1, isize
-		          newc(newtag+i-1) = c(tag+i-1)
-		          if (debug .and. type .ne. 7) then
-			       write(istderr,12) i, newc(newtag+i-1), c(tag+i-1)
-		          else if (debug .and. type .eq. 7) then
-			       write(istderr,13) i, newc(newtag+i-1), c(tag+i-1)
-		          endif
-115		          continue
-		       if (tag .ne. newtag) then
-     		          if (.not. pushcmp(oldstack, top1, maxstck,
-     .			       fshort(-tag)) .or. .not. pushcmp(newstack,
-     .			       top2, maxstck, fshort(-newtag)) .or. .not.
-     .                         pushcmp(substack, top3, maxstck, n0))
-     .			       call oerror(n132, m1, 
-     .				    'Too many ADVERBS to compress')
-		       endif
-c
-	 	  else if (type .eq. 6) then
-	        	if (debug) write(istderr,11) 'Loc Alias:',
-     .			          llast,(k(llast+i-1), i = 1, nt)
-			newllast = llocat(nt,newk,newllast)
-			newk(newllast+1) = type + 16*length
-			newk(newllast+2) = k(llast+2)
-			newk(newllast+3) = 0
-			call copy(length,k(llast+4),newk(newllast+4))
-	        	if (debug) write(istderr,11) '      Out:',newllast,
-     .					(newk(newllast+i-1), i = 1, nt)
-	  	  else 
-	        	if (debug) write(istderr,11) '    :',
-     .			        llast, (k(llast+i-1), i = 1, nt)
-			call oerror(n132,m1, 
-     .		           'Found something where it doesn''t belong')
-	          endif
-	          goto 110
-   		endif
-c
-c		We are now done with this procedure
-c
-	        if (debug) write(istderr,11) ' Out:',newl,
-     .					(newk(newl+i-1), i = 1, nt)
-c
-		newtag = newk(newl+2)
-	 	tag = k(l+2)
-c
-		if (tag .ne. newtag) then
-     		   if (.not. pushcmp(oldstack, top1, maxstck, tag) .or.
-     .		       .not. pushcmp(newstack, top2, maxstck, newtag) .or.
-     .		       .not. pushcmp(substack, top3, maxstck, n0))
-     .			call oerror(n132, m1, 'Too many PROCEDURES to compress')
-		endif
-c		Store away tags for relinking later on
-c
-	   endif
-c
-	   goto 20
-c
-   	endif
-c
-      write(istdout,*) 'Relinking ADVERBS, ALIASES, and PROCEDURES'
-c
-      call fill(maxlnk, n0, k)
-      call fill(maxlnk, n0, listf)
-      call fill(maxlnk, n0, kx)
-c     Zero out old arrays.
-c
-      call copy(newk(3), newk, k)
-c     Copy back NEWK array on top of K array
-c
-      call copy(newkx(3),newkx,kx)
-c     Copy back variable values in NEWK array on top of K array
-c
-      call copy(newlistf(3), newlistf, listf)
-c     Copy back LISTF array
-c
-      if (top1 .gt. 0) call relink(oldstack, newstack, substack, top1)
-c     Now, do the relinking of old proc/adverb tags with new ones; do for
-c     all adverbs and procs.
-c
-      l = lstart
-40      l = k(l)
-        if (l .ne. 0) then
-	   length = k(l+1)/16
-	   type = k(l+1) - 16*length
-	   if (type .eq. 3) irtn = finish(k, k(l+2), .false.)
-c	   We can ignore any FOR/IF/THEN/ELSE/WHILE errors (i.e., the value
-c	   of IRTN) since the erorrs existed in the procedure prior to
-c	   compressing.  
-c
-	   goto 40
-	endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/accums.f unipops-3.6/source/conline/condar/accums.f
--- 3.5/source/conline/condar/accums.f	2000-03-16 11:36:06.000000000 -0700
+++ unipops-3.6/source/conline/condar/accums.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,92 +0,0 @@
-      SUBROUTINE ACCUMS(XSCALE, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)accums.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-      real*4 XSCALE, newscale, oldscale, rinfinity 
-      integer*2 iptwh, jj, lk, ierr
-      INTEGER*4 ISTART, ISTOP, istarthold, istophold
-      logical okreal4
-c
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      include 'core.inc'
-c
-C=======================================================================
-C
-      IPTWH = 1
-      ierr = 0
-c
-      if (dtwh(c12ni,iptwh) .eq. 0) then
-	ierr = 225
-	goto 99
-      endif
-c     Needs a scan to be in Work
-c
-      ISTART = DTWH(c12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(c12SPN,IPTWH) + DTWH(c12NI,IPTWH)
-     .        + IDATOFF - 1
-c
-      if (istart .ge. istop) then
-	 ierr = 225
-	 goto 99
-      endif
-c
-      IF (NACCUM.EQ.0) then
-c
-        CALL COPY2(HDU_FLOAT_SIZE*2,iTWH(1,IPTWH),IACCUM(1))
-c
-        DACCUM(c12WT) = XSCALE
-        DACCUM(c13NS)=1.
-        DACCUM(c13FS)=DACCUM(c1SNO)
-        DACCUM(c13LS)=DACCUM(c1SNO)
-C
-      else
-c
-        istarthold = DACCUM(c12SPN) + IDATOFF
-        istophold = DACCUM(c12SPN) + DTWH(c12NI,IPTWH)
-     .          + IDATOFF - 1
-        if (istarthold .ge. istophold) then
-	 ierr = 225
-	 goto 99
-        endif
-c
-c
-        oldscale = daccum(c12wt)
- 	newscale = DACCUM(c12WT) + XSCALE
-        DACCUM(c12WT) = newscale
-        DACCUM(c13NS) = DACCUM(c13NS) + 1.0
-        DACCUM(c13LS) = DTWH(c1SNO,iptwh)
-c
-        LK = istarthold
-        DO 12 JJ = ISTART,ISTOP
-           if (lk .ge. istarthold .and. lk .le. istophold) then
-	     if (okreal4(RACCUM(LK)) .and. okreal4(TWH(jj,IPTWH)) ) then
-     		RACCUM(LK) = 
-     1            ( RACCUM(LK)*oldscale+TWH(jj,IPTWH)*XSCALE )/newscale
-	     else if (defmode .ge. 0.5 .and. okreal4(TWH(jj,IPTWH)) ) then
-     		RACCUM(LK) = TWH(jj,IPTWH)
-	     else if (defmode .lt. 0.5) then
-     		RACCUM(LK) = rinfinity()
-	     endif
-	   endif
-c	   Make sure that you don't go beyond the ends of the data
-c
-           LK=LK+1
-   12      CONTINUE
-c
-      endif
-c
-  19  NACCUM=NACCUM+1
-c
-      IF(NACCUM.LE.100)THEN
-      	DAINDEX(NACCUM) = DTWH(c1SNO,iptwh)
-      ELSE
-	DAINDEX(101) = DTWH(c1SNO,iptwh)
-      ENDIF
-c	
-  99  CONTINUE
-      RETURN
-      END
-
-
diff -uNr 3.5/source/conline/condar/au1.f unipops-3.6/source/conline/condar/au1.f
--- 3.5/source/conline/condar/au1.f	2000-03-16 11:36:06.000000000 -0700
+++ unipops-3.6/source/conline/condar/au1.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,425 +0,0 @@
-      SUBROUTINE    AU1 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au1.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     au1 - Copy, Move, Remove
-c            On, Off, Get, Get[0-9], Recall, Save, Keep, Cget, Check
-c            Tell, Summary, GGet, CGGet, Chngonline, Kget
-c
-C-------------------------------------------------------------------------------
-C
-      INCLUDE 'appl.inc'
-      include 'core.inc'
-      INCLUDE 'cio.inc'
-      INCLUDE 'cform.inc'
-      include 'stk.inc'
-c
-      integer*2 j, itemp, iwork, ihold, iptwh, jj, iarrayout, 
-     .          iarrayin, isave, imagic, ifil, ier
-      integer*2 m1, m2, m3, n80, n105, n112, n120, n224, n226,
-     .          n232, n263, n367
-      integer*4 onlinesite, idtype, iver
-      real*4 fscan, scan, icur
-      character*60 errstr
-c
-      logical*2 oversave, overkeep
-C
-      DATA  ITEMP/2/, IWORK/1/, ihold/3/
-c
-      data m1, m2, m3, n80, n105, n112, n120, n224, n226,
-     .          n232, n263, n367 
-     .     /-1, -2, -3, 80, 105, 112, 120, 224, 226, 232, 263, 367/
-C
-C=======================================================================
-C
-      IPTWH = 1
-c
-      JJ = J
-      GO TO ( 10, 20, 30,110,120,140,123,124,125,126,127,128,129,
-     1        150,160,200,210,240,260,70,280,281,290,300), JJ
-      call oerror(n120, m3, 'AU1')
-C-----------------------------------------------------------------------
-C					      COPY MOVE REMOVE
-C-----------------------------------------------------------------------
-  10  continue
-      if (sp .le. 1) call oerror(n112, m1, 'COPY: Two needed')
-c
-      iarrayout = nint(v(sp))
-      iarrayin = nint(v(sp-1))
-      sp = sp - 2
-c
-      if (iarrayin .lt. 0 .or. iarrayin .gt. 9 .or.
-     1    iarrayout .lt. 0 .or. iarrayout .gt. 9) 
-     2    call oerror(n105, m1, 'COPY')
-      if (iarrayin .eq. iarrayout) call oerror(n263, m2, 'COPY')
-c
-      if (dtwh(c12ni,iarrayin + 1) .eq. 0) call oerror(n226, m2, 'COPY')
-c     Needs a scan to be in array to be copied
-c
-      call copy2(HDU_FLOAT_SIZE*2, itwh(1,iarrayin+1), 
-     .     itwh(1,iarrayout+1) )
-      goto 99
-c---------------------------------------------------------------------
-  20  continue
-      if (sp .le. 1) call oerror(n112, m1, 'MOVE: Two needed ')
-c
-      iarrayout = nint(v(sp))
-      iarrayin = nint(v(sp-1))
-      sp = sp - 2
-c
-      if (iarrayin .lt. 0 .or. iarrayin .gt. 9 .or.
-     1    iarrayout .lt. 0 .or. iarrayout .gt. 9) 
-     2    call oerror(n105, m1, 'MOVE')
-      if (iarrayin .eq. iarrayout) call oerror(n263, m2, 'MOVE')
-c
-      if (dtwh(c12ni,iarrayin + 1) .eq. 0) call oerror(n226, m2, 'MOVE')
-c     Needs a scan to be in array to be moved
-c
-      call copy2(HDU_FLOAT_SIZE*2, itwh(1,iarrayin+1), 
-     .     itwh(1,iarrayout+1) )
-      call raz(dtwh(1,iarrayin+1))
-      goto 99
-c-------------------------------------------------------------
-  30  continue
-      if (sp .le. 0) call oerror(n112, m1, 'REMOVE: One needed')
-c
-      iarrayin = nint(v(sp))
-      sp = sp - 1
-c
-      if (iarrayin .lt. 0 .or. iarrayin .gt. 9) 
-     1		call oerror(n105, m1, 'REMOVE')
-c
-      call raz(dtwh(1,iarrayin+1))
-      goto 99
-C--------------------------------------------------------------------
-C							  GET, GET0, ON
-C---------------------------------------------------------------------
- 110  IPTWH = IWORK
-      goto 130
-c
-C---------------------------------------------------------------------
-C							  OFF, GET1
-C---------------------------------------------------------------------
- 120  IPTWH = ITEMP
-      goto 130
-c
-c--------------------------------------------------------------------
-c     							GET2
-c--------------------------------------------------------------------
- 140  iptwh = ihold
-      goto 130
-c--------------------------------------------------------------------
-c     							GET3
-c--------------------------------------------------------------------
- 123  iptwh = 4
-      goto 130
-c--------------------------------------------------------------------
-c     							GET4
-c--------------------------------------------------------------------
- 124  iptwh = 5
-      goto 130
-c--------------------------------------------------------------------
-c     							GET5
-c--------------------------------------------------------------------
- 125  iptwh = 6
-      goto 130
-c--------------------------------------------------------------------
-c     							GET6
-c--------------------------------------------------------------------
- 126  iptwh = 7
-      goto 130
-c--------------------------------------------------------------------
-c     							GET7
-c--------------------------------------------------------------------
- 127  iptwh = 8
-      goto 130
-c--------------------------------------------------------------------
-c     							GET8
-c--------------------------------------------------------------------
- 128  iptwh = 9
-      goto 130
-c--------------------------------------------------------------------
-c     							GET9
-c--------------------------------------------------------------------
- 129  iptwh = 10
-C
- 130  if (sp .le. 0) call oerror(n112, m1, 'GET0/9: One needed')
-c
-      fscan = v(sp)
-      sp = sp - 1
-      call getscan(fscan,iptwh,ier)
-      if (ier .lt. 0) then
-         call oerror(-ier, m1, 'GET0/9')
-      else if (ier .gt. 0) then
-         if (ier .eq. 362) then
-            write(errstr, 1310) fscan
- 1310       format('SCAN ',f10.2,' : GET0/9')
-         else if (ier .eq. 371) then
-            ier = 357
-            write(errstr, 1320) fscan
- 1320       format('SCAN ',f10.2,
-     .             ' is not a valid scan number : GET0/9')
-         else
-            write(errstr, 1330)
- 1330       format('GET0/9')
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      goto 99
-C---------------------------------------------------------------------
-C							  RECALL
-C---------------------------------------------------------------------
- 150  CONTINUE
-      ISAVE=nint(NSAVE)
-      call getbyloc(dtwh(1,iptwh),isave,imagic,iounit(3),ciounit(3),ier)
-      if (ier .lt. 0) then
-         call oerror(-ier, m1, 'RECALL')
-      else if (ier .gt. 0) then
-         if (ier .eq. 368 .or. ier .eq. 371) then
-            write(errstr, 1510) isave
- 1510       format('NSAVE ',i,' : RECALL')
-         else
-            write(errstr, 1520)
- 1520       format('RECALL')
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      GO TO 99
-C---------------------------------------------------------------------
-C							  SAVE
-C---------------------------------------------------------------------
- 160  isave = nint(nsave)
-c
-      if (itwh(1,iwork) .eq. 0) call oerror(n224, m2, 'SAVE')
-c     Needs a scan to be in array to be saved
-c
-      if (sprotect .le. 0) then
-	oversave = .true.
-      else
-	oversave = .false.
-      endif
-      imagic = 2
-      call savebyloc(dtwh(1,iptwh),isave,imagic,iounit(3),ciounit(3),
-     1               oversave,ier)
-      if (ier .lt. 0) then
-         ier = -ier
-         if (ier .eq. 355) then
-            write(errstr, 1610)
- 1610       format('SAVE file is full')
-         else
-            write(errstr, 1620)
- 1620       format('SAVE')
-         endif
-         call oerror(ier, m1, errstr)
-      else if (ier .gt. 0) then
-         if (ier .eq. 355) then
-            write(errstr, 1630) isave
- 1630       format('Data exists at ',i,
-     .             ' .... can not overwrite! : SAVE')
-         else
-            write(errstr, 1620)
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      goto 99
-c----------------------------------------------------------------------
-c    TELL
-c----------------------------------------------------------------------
- 200  continue
-      call tells
-      goto 99
-C---------------------------------------------------------------------
-C						      CGET
-C---------------------------------------------------------------------
-  210 CONTINUE
-      IPTWH = IWORK
-C
-      if (sp .le. 0) call oerror(n112, m1, 'CGET: One needed')
-c
-      IFIL=nint(V(SP))
-      SP=SP-1
-      call getcurrent(ifil, iptwh,ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'CGET')
-      GO TO 99
-C-------------------------------------------------------------------------
-C                                     DATA SUMMARY
-C-------------------------------------------------------------------------
- 240  CONTINUE
-      call summary
-      GO TO 99
-C
-C------------------------------------------------------------------------
-C					 KEEP
-C----------------------------------------------------------------------
-  260 CONTINUE
-c
-      if (itwh(1,iwork) .eq. 0) then
-	call oerror(n224, m2, 'KEEP')
-	goto 99
-      endif
-c     Needs a scan to be in array to be kept
-c
-      if (kprotect .le. 0) then
-	overkeep = .true.
-      else
-	overkeep = .false.
-      endif
-      imagic = 2
-      call savebynum(dtwh(1,iptwh),dtwh(c1sno,iptwh),imagic,iounit(2), 
-     1               ciounit(2), overkeep,ier)
-      if (ier .lt. 0) then
-         ier = -ier
-         if (ier .eq. 355) then
-            write(errstr, 2601)
- 2601       format('KEEP file is full')
-         else
-            write(errstr, 2602)
- 2602       format('KEEP')
-         endif
-         call oerror(ier, m1, errstr)
-      else if (ier. gt. 0) then
-         if (ier .eq. 355) then
-            write(errstr, 2603) dtwh(c1sno,iptwh)
- 2603       format('Scan ',f10.2,
-     .             ' exists ... can not overwrite! : KEEP')
-         else
-            write(errstr, 2602)
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      GO TO 99
-C---------------------------------------------------------------------
-C					  CHECK
-C---------------------------------------------------------------------
- 70   ISAVE=nint(NSAVE)
-      call checkbyloc(isave, iounit(3), ciounit(3), scan, ier)
-      if (ier .lt. 0) then
-	call oerror(-ier, m1, 'CHECK')
-      else if (ier .gt. 0) then
-	call oerror(ier, m2, 'CHECK')
-      else 
-	if (scan .gt. 0) then
-	   WRITE (CPUF,73,IOSTAT=IER) ISAVE, SCAN
-        else
-           WRITE (CPUF,74,IOSTAT=IER) ISAVE
-	endif
-      endif
-      CALL PWRITE (IPUF,n80)
- 73   FORMAT(' NSAVE = ',I4, ' contains scan ',F8.2)
- 74   FORMAT(' NSAVE = ',I4, ' is empty.')
-      GO TO 99
-C----------------------------------------------------------------------
-C                                        GGET 
-C-----------------------------------------------------------------------
- 280  continue
-      icur = 0
-      iptwh = ihold
-c                       gains are loaded into ihold
-      if (sp.le.0) call oerror(n112, m1, 'GGET: One needed.')
-c                       GGET needs a scan number
-      fscan = v(sp)
-      sp = sp - 1
-c
-      call gget(fscan, iptwh, icur, ier)
-      if (ier .lt. 0) then
-         call oerror(-ier, m1, 'GGET')
-      else if (ier .gt. 0) then
-         if (ier .eq. 362) then
-            write(errstr, 2801) fscan
- 2801       format('SCAN ',f10.2,' : GGET')
-         else if (ier .eq. 371) then
-            ier = 357
-            write(errstr, 2802) fscan
- 2802       format('SCAN ',f10.2,
-     .             ' is not a valid scan number : GGET')
-         else
-            write(errstr, 2803)
- 2803       format('GGET')
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      goto 99
-C----------------------------------------------------------------------
-C                                        CGGET 
-C-----------------------------------------------------------------------
- 281  continue
-      icur = 1
-c			signal that current gain scan is wanted
-      iptwh = ihold
-c			gains are loaded into ihold 
-      if (sp.le.0) call oerror(n112, m1, 'CGGET: One needed.')
-c			CGGET needs a rec/subscan number
-      fscan = v(sp)
-      sp = sp - 1
-c
-      call gget(fscan, iptwh, icur, ier)
-      if (ier .lt. 0) then
-         call oerror(-ier, m1, 'CGGET')
-      else if (ier .gt. 0) then
-         if (ier .eq. 362) then
-            write(errstr, 2811) nint(fscan)
- 2811       format('Subscan ',i,' : CGGET')
-         else if (ier .eq. 371) then
-            ier = 357
-            write(errstr, 2812) nint(fscan)
- 2812       format('Subscan ',i,
-     .             ' is not a valid subscan number : CGGET')
-         else
-            write(errstr, 2813)
- 2813       format('CGGET')
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      goto 99
-C-----------------------------------------------------------------------
-C					CHNGONLINE
-C-----------------------------------------------------------------------
-  290 continue
-      if (sp .le. 1) call oerror(n112, m1, 'CHNGONLINE: Two needed.')
-C
-      if (online) then
-         if (onlinesite() .eq. 1) then
-            idtype = v(sp-1) 
-            iver = v(sp)
-            sp = sp - 2
-            call chngol(idtype, iver)
-         else
-            call oerror(n232, m2, 'CHNGONLINE.')
-         endif
-      else
-         call oerror(n367, m2, 'CHNGONLINE.')
-      endif
-      goto 99
-C-----------------------------------------------------------------------
-C					KGET
-C-----------------------------------------------------------------------
- 300  continue
-      if (sp .le. 0) call oerror(n112, m1, 'KGET: One needed.')
-c
-      fscan = v(sp)
-      sp = sp - 1
-      iptwh = 1
-      call getbynum(dtwh(1,iptwh),fscan,imagic,iounit(2),ciounit(2),ier)
-      if (ier .lt. 0) then
-         call oerror(-ier, m1, 'KGET')
-      else if (ier .gt. 0) then
-         if (ier .eq. 362) then
-            write(errstr, 3001) fscan
- 3001       format('SCAN ',f10.2,' : KGET')
-         else if (ier .eq. 371) then
-            ier = 357
-            write(errstr, 3002) fscan
- 3002       format('SCAN ',f10.2,' is not a valid scan number : KGET')
-         else
-            write(errstr, 3003)
- 3003       format('KGET')
-         endif
-         call oerror(ier, m2, errstr)
-      endif
-      goto 99
-C-----------------------------------------------------------------------
-  99  CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/au2.F unipops-3.6/source/conline/condar/au2.F
--- 3.5/source/conline/condar/au2.F	2000-03-16 11:36:08.000000000 -0700
+++ unipops-3.6/source/conline/condar/au2.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,1200 +0,0 @@
-      SUBROUTINE AU2 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au2.F	5.4 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     au2 - Accum, Sum, Ave, Boxcar, Hanning, Scale, Clip, DIff, Moment,
-c            Smooth, Invert, Divide, Spike, Replace, Peak,
-c            Bias, Chngres, Crossfcn, Convfcn, Decnvlv, Shift, Fshift,
-c	     Vshift, Pdoc, Listshift, Plus, Multiply
-c
-C-------------------------------------------------------------------------------
-c
-      INCLUDE 'appl.inc'
-c
-      INTEGER*2 IPUF(40), j, iptwh, inn, ierr, lxa1, ishift,
-     .          istart, istop, n, ier, nchn, num, ntmp
-      integer*4 itemp, jj, istart0, istop0, istart1, istop1, lim1, lim2,
-     .          lim, i, jj1, ib, ie, ll, i1, i2, ijk, ist, isp, ii,
-     .          ibad, iswtch, ilist(4), ii2, in, jcnt
-      integer*2 n224, m2, n120, m3, n238, n293, n227, n223, n228, n225,
-     .		n288, n222, n292, n235, n80, n249, n251, n252, n253,
-     .		n230, n248, n112, m1, n0, n3, n270, n268
-      real*4 xscale, x, y, storetemp, wgt(12), 
-     .       tmax, tch, hwdth, oldres, temporary(MAX_DATA_POINTS), aa, 
-     .	     tvel, rmaxnormal, rminnormal, rinfinity, centchan
-      logical*4 invers
-      logical okarray, okreal4, first
-      real*8 t12m, numaa1, numaa2, mag2, chantox
-      CHARACTER*80 CPUF
-c
-#ifdef CONTINUUM
-#else
-      real*4 z, f
-      integer*2 ifit
-      logical useeff, okreal8, setrst
-      real*8 xtochan, dinfinity
-#endif 
-C
-      INCLUDE 'cform.inc'
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (ipuf, cpuf)
-c
-#ifdef CONTINUUM
-#else
-      save f
-#endif
-c
-      DATA ITEMP /2/
-      data t12m/'NRAO 12M'/
-      data n224/224/, m2/-2/, n120/120/, m3/-3/, n238/238/, n293/293/,
-     .	   n227/227/, n223/223/, n228/228/, n225/225/,  n288/288/, 
-     .	   n222/222/, n292/292/, n235/235/, n80/80/,  n249/249/,  
-     .	   n251/251/, n252/252/, n253/253/, n230/230/, n248/248/
-      data n112/112/, m1/-1/, n0/0/, n3/3/, n270/270/, n268/268/
-c
-C
-C=======================================================================
-C
-      IPTWH = 1
-c
-      JJ=J
-      GO TO (10,20,30,40,50,60,80,90,100,110,120,
-     .	     160,200,210,220,280,290,300,310,320,
-     .	     130,230,240,250,260,330,340 ), JJ
-      call oerror(n120, m3, 'AU2')
-C---------------------------------------------------------------------
-C							  ACCUM
-C---------------------------------------------------------------------
-  10  CONTINUE
-c
-#ifdef CONTINUUM
-      xscale = 1.
-#else
-      if (dtwh(c12it,iptwh) .le. 0.0 .or.
-     1    dtwh(c12sst,iptwh) .le. 0.0) call oerror(n224, m2, 'ACCUM')
-c
-      setrst = .true.
-      useeff = .true.
-      if(dtwh(c1tel,iptwh).eq.t12m .or. 
-     .   .not. okreal8(dtwh(c12eit,iptwh))) useeff = .false.
-c
-      if (useeff) then
-         XSCALE=DTWH(c12eit,IPTWH)/DTWH(C12SST,IPTWH)**2
-      else
-         XSCALE=DTWH(c12it,IPTWH)/DTWH(C12SST,IPTWH)**2
-      endif
-#endif
-c
-      CALL ACCUMS(XSCALE, ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'ACCUM')
-c
-c
-#ifdef CONTINUUM
-c
-      IF (NACCUM.ne.1) then
-        DACCUM(c12it)=DACCUM(c12it) + DTWH(c12it,IPTWH)
-      endif
-c
-#else
-c
-      IF (NACCUM.ne.1) then
-        IF (  abs((DTWH(c12FR,IPTWH)-DACCUM(c12FR))/DACCUM(c12FR)) 
-     .        .gt. 1.e-05) call oerror(n238, n0, 'Warning: ACCUM')
-        DACCUM(c12it) = DACCUM(c12it) + DTWH(c12it,IPTWH)
-        DACCUM(c12SST)=sqrt ( ( (DACCUM(c12wt)-xscale)*DACCUM(c12SST)**2
-     .                  + XSCALE*DTWH(c12SST,IPTWH)**2) / daccum(c12wt))
-        if (useeff) then
-           DACCUM(c12eit) = DACCUM(c12eit) + DTWH(c12eit,IPTWH)
-           DACCUM(c12rms) = f * daccum(c12sst) / sqrt( DACCUM(c12eit) )
-           if (setrst .and. dtwh(c12rst,iptwh) .ne. 0 .and.
-     .         okreal8(dtwh(c12rst,iptwh))) then
-              DACCUM(c12rst)=sqrt ( daccum(c12eit)/ 
-     .		 ( dtwh(c12eit,iptwh)/(DTWH(c12rst,IPTWH)**2) + 
-     .		 (daccum(c12eit)-dtwh(c12eit,iptwh))/(DACCUM(c12rst)**2) ) )
-           else
-              setrst = .false.
-              daccum(c12rst) = dinfinity()
-           endif
-	else
-           DACCUM(c12rms) = f * daccum(c12sst) / sqrt( DACCUM(c12it) )
-           if (setrst .and. dtwh(c12rst,iptwh) .ne. 0 .and.
-     .         okreal8(dtwh(c12rst,iptwh))) then
-       	      DACCUM(c12rst)=sqrt ( daccum(c12it)/ 
-     .		 ( dtwh(c12it,iptwh)/(DTWH(c12rst,IPTWH)**2) + 
-     .		 (daccum(c12it)-dtwh(c12it,iptwh))/(DACCUM(c12rst)**2) ) )
-           else
-              setrst = .false.
-              daccum(c12rst) = dinfinity()
-           endif
-	endif
-c       Update all necessary header parameters (see memo by R.Maddalena
-c	dated Jan 22, 1992).
-c
-      else
-        setrst = okreal8(daccum(c12rst)) .and. daccum(c12rst).ne.0
-        if (useeff) then
-	   F = dtwh(c12rms,iptwh) *  sqrt( daccum(c12eit) ) / daccum(c12sst)
-	else
-	   F = dtwh(c12rms,iptwh) *  sqrt( daccum(c12it) ) / daccum(c12sst)
-	endif
-c	Save away the conversion factor from T/TSYS**2 to rms for later use.
-      endif
-#endif
-c
-      GO TO 99
-c
-C-------------------------------------------------------------------------
-C							 SUM
-C-------------------------------------------------------------------------
-  20  CONTINUE
-c
-      xscale=weight
-c
-      if (xscale .le. 0.0) call oerror(n293, m2, 'SUM')
-c
-      CALL ACCUMS(XSCALE, ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'SUM')
-c
-#ifdef CONTINUUM
-      IF (NACCUM.ne.1) then
-        DACCUM(c12IT)=DACCUM(c12IT) + DTWH(c12IT,IPTWH)
-      endif
-#else
-      useeff = .true.
-      if(dtwh(c1tel,iptwh).eq.t12m .or. 
-     .	 .not. okreal8(dtwh(c12eit,iptwh)) ) useeff = .false.
-c
-      IF (NACCUM.ne.1) then
-        IF (  abs((DTWH(c12FR,IPTWH)-DACCUM(c12FR))/DACCUM(c12FR)) 
-     .        .gt. 1.e-05) call oerror(n238, n0, 'Warning: SUM')
-        DACCUM(c12IT)=DACCUM(c12IT) + DTWH(c12IT,IPTWH)
-        DACCUM(c12SST)=sqrt ( ( (DACCUM(c12wt)-xscale)*DACCUM(c12SST)**2
-     .                  + XSCALE*DTWH(c12SST,IPTWH)**2) / daccum(c12wt))
-        DACCUM(c12rst)=sqrt ( ( (DACCUM(c12wt)-xscale)*DACCUM(c12rst)**2
-     .                  + XSCALE*DTWH(c12rst,IPTWH)**2) / daccum(c12wt))
-        if (useeff) then
-		DACCUM(c12eit) = DACCUM(c12eit) + DTWH(c12eit,IPTWH)
-        	DACCUM(c12rms) = f * daccum(c12sst) / sqrt( DACCUM(c12eit) )
-	else
-        	DACCUM(c12rms) = f * daccum(c12sst) / sqrt( DACCUM(c12it) )
-	endif
-c
-      else
-        if (useeff) then
-	   F = dtwh(c12rms,iptwh) *  sqrt( daccum(c12eit) ) / daccum(c12sst)
-	else
-	   F = dtwh(c12rms,iptwh) *  sqrt( daccum(c12it) ) / daccum(c12sst)
-	endif
-c	Save away the conversion factor from T/TSYS**2 to rms for later use.
-      endif
-#endif
-c
-      GO TO 99
-c
-C---------------------------------------------------------------------
-C							  AVE
-C---------------------------------------------------------------------
-  30  continue
-c 
-      IF (NACCUM.le.0) call oerror(n227, m2, 'AVE')
-c
-      call copy2(HDU_FLOAT_SIZE*2, IACCUM(1), itwh(1,iptwh))
-c
-      NACCUM=0
-      weight = 1
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							  BOXCAR
-C---------------------------------------------------------------------
-  40  CONTINUE
-c
-      N = nint(NBOX)
-      IF (MOD(N,2).eq.0 .or. n.le.0 .or. n.gt.maxmrk)
-     .		 call oerror(n228, m2, 'BOXCAR')
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'BOXCAR')
-c
-      DO 43 I = 1, N
-         WGT(I)=1.0/float(n)
-   43    CONTINUE
-      CALL SMOOTH (TWH(1,IPTWH),ISTART,ISTOP,WGT,N,XDATA)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							  HANNING
-C---------------------------------------------------------------------
-  50  CONTINUE
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'HANNING')
-c
-      WGT(1)=0.25
-      WGT(2)=0.5
-      WGT(3)=0.25
-      N	= 3
-      CALL SMOOTH (TWH(1,IPTWH),ISTART,ISTOP,WGT,N,XDATA)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							   SCALE
-C---------------------------------------------------------------------
-  60  CONTINUE
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'SCALE')
-c
-      DO 62 JJ = ISTART,ISTOP
-         if (okreal4(TWH(JJ,IPTWH))) TWH(JJ,IPTWH)=TWH(JJ,IPTWH) * FACT
-   62    CONTINUE
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							   CLIP
-C---------------------------------------------------------------------
-  80  CONTINUE
-c
-      if(bdrop.lt.0.or.edrop.lt.0.or.
-     1	   (bdrop+edrop.gt.dtwh(c12ni,iptwh))) 
-     .		call oerror(n288, m2, 'CLIP')
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF + bdrop
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     1       + IDATOFF - 1 - edrop
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'CLIP')
-c
-      DO 82 JJ = ISTART,ISTOP
-         if (okreal4(TWH(JJ,IPTWH))) then
-         	IF (TWH(JJ,IPTWH).GT.CPMAX) TWH(JJ,IPTWH)=CPMAX
-         	IF (TWH(JJ,IPTWH).LT.CPMIN) TWH(JJ,IPTWH)=CPMIN
-	 endif
-   82    CONTINUE
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                       DIFF and MINUS                
-C-----------------------------------------------------------------------
- 90   CONTINUE
-c
-      istart0 = DTWH(C12SPN,IPTWH) + IDATOFF
-      istop0 = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     1        + IDATOFF - 1
-      istart1 = DTWH(C12SPN,itemp) + IDATOFF
-      istop1 = DTWH(C12SPN,itemp) + DTWH(C12NI,itemp)
-     1        + IDATOFF - 1
-c
-      if (istart0 .gt. istop0 .or. istart1 .gt. istop1) 
-     .		call oerror(n222, m2, 'DIFF')
-c
-      DO 920 JJ = istart0, istop0
-	 jj1 = jj - istart0 + istart1
-         if (jj1 .le. istop1 .and. jj1 .ge. istart1) then
-            if (okreal4(TWH(JJ,IPTWH)).and.okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=TWH(JJ,IPTWH)-TWH(jj1,ITEMP)
-	    else if(defmode .ge. 0.5 .and. okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=-TWH(jj1,ITEMP)
-	    else if (defmode .lt. 0.5) then
-		twh(jj,iptwh)=rinfinity()
-	    endif
-	 endif	
-920	 continue
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							    MOMENT
-C---------------------------------------------------------------------
- 100  CONTINUE
-c
-      IB = BWIND
-      IE = EWIND
-c
-      if (bwind .le. 0.0 .or. bwind .ge. ewind .or.
-     1    ewind .gt. (dtwh(c12ni,iptwh)+dtwh(c12spn,iptwh)-1) .or.
-     1    bwind .lt. dtwh(c12spn,iptwh)) 
-     1   call oerror(n292, m2, 'MOMENT')
-c
-      X=0.0
-      Y=0.0
-      first = .true.
-c
-      lxa1 = lxa
-      if (.not. okarray(lxa, dtwh(1,iptwh)) ) then
-         call oerror(n270, n0, 
-     .		'MOMENT: Units of X-axis will be channels or samples')
-	 lxa1 = 1
-      endif
-c
-#ifdef CONTINUUM
-      DO 102 JJ = IB,IE
-	 if (okreal4(twh(jj+idatoff,iptwh))) then
-	    x = x + twh(jj+idatoff,iptwh)
-	    y = y + twh(jj+idatoff,iptwh) * jj
-	 else if (first) then
-	     call oerror(n268, n0, "MOMENT: Skipping points")
-	     first = .false.
-	 endif
-  102    CONTINUE
-      size(1) = x * dtwh(c12dx, iptwh)
-      size(2) = chantox(lxa1, dtwh(1,iptwh), y, ierr) / x
-#else
-      DO 102 JJ = IB,IE
-	 if (okreal4(twh(jj+idatoff,iptwh))) then
-	    z = dabs(chantox(lxa1, dtwh(1,iptwh), float(jj)-0.5, ierr) -
-     .		     chantox(lxa1, dtwh(1,iptwh), float(jj)+0.5, ierr))
-	    x = x + twh(jj+idatoff,iptwh) * z
-	    y = y + twh(jj+idatoff,iptwh) * 
-     1	        chantox(lxa1, dtwh(1,iptwh), float(jj), ierr) * z
-	 else if (first) then
-	     call oerror(n268, n0, "MOMENT: Skipping points")
-	     first = .false.
-	 endif
-  102    CONTINUE
-c
-      size(1) = x
-      size(2) = y / x
-#endif
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							    SMOOTH
-C---------------------------------------------------------------------
- 110  CONTINUE
-c
-      N = nint(SMWGT(1))
-      IF (N.gt.maxmrk-1 .or. n.le.0) call oerror(n235, m2, 'SMOOTH')
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'SMOOTH')
-c
-      CALL SMOOTH (TWH(1,IPTWH),ISTART,ISTOP,SMWGT(2),N,XDATA)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							    INVERT
-C---------------------------------------------------------------------
- 120  CONTINUE
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'INVERT')
-c
-      DO 121 I = ISTART, istart + (istop-istart+1)/2 - 1
-         storetemp = TWH(I,IPTWH)
-	 twh(i,iptwh) = twh(istop-i+istart,iptwh)
-	 twh(istop-i+istart,iptwh) = storetemp
-121      continue
-c
-      dtwh(c12dx,iptwh) = -dtwh(c12dx,iptwh)
-      dtwh(c12rp,iptwh) = dtwh(c12ni,iptwh) - dtwh(c12rp,iptwh) + 
-     .			   dtwh(c12spn,iptwh)
-#ifdef CONTINUUM
-      dtwh(c3srt,iptwh) = -dtwh(c3srt,iptwh)
-#else
-      dtwh(c12fr,iptwh) = -dtwh(c12fr,iptwh)
-#endif
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					DIVIDE
-C---------------------------------------------------------------------
- 160  CONTINUE
-c
-      istart0 = DTWH(C12SPN,IPTWH) + IDATOFF
-      istop0 = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     1        + IDATOFF - 1
-      istart1 = DTWH(C12SPN,itemp) + IDATOFF
-      istop1 = DTWH(C12SPN,itemp) + DTWH(C12NI,itemp)
-     1        + IDATOFF - 1
-c
-      if (istart0 .gt. istop0 .or. istart1 .gt. istop1) 
-     .    call oerror(n222, m2, 'DIVIDE')
-c
-      DO 161 JJ = istart0, istop0
-	 jj1 = jj - istart0 + istart1
-         if (jj1 .le. istop1 .and. jj1 .ge. istart1) then
-            if (okreal4(TWH(JJ,IPTWH)).and.okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=TWH(JJ,IPTWH)/TWH(jj1,ITEMP)
-	    else if(defmode .ge. 0.5 .and. okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=1./TWH(jj1,ITEMP)
-	    else if (defmode .lt. 0.5) then
-		twh(jj,iptwh)=rinfinity()
-	    endif
-	 endif
-  161    CONTINUE
-c
-      GO TO 99
-C----------------------------------------------------------------------
-C                                      SPIKE   
-C----------------------------------------------------------------------
-  200 CONTINUE
-c
-      if(bdrop.lt.0.or.edrop.lt.0.or.
-     1	   (bdrop+edrop.gt.dtwh(c12ni,iptwh))) 
-     .		call oerror(n288, m2, 'SPIKE')
-c
-      ISTART=DTWH(C12SPN,IPTWH)+IDATOFF+BDROP
-      ISTOP=DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-     .      + IDATOFF - 1 - EDROP
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'SPIKE')
-c
-      LL=0
-      DO 201 I = 1,maxmrk
-         BADPT(I)=0.
-201      continue
-      DO 203 JJ=ISTART,ISTOP
-         IF (okreal4(TWH(JJ,IPTWH)) .and. 
-     .	     ABS(TWH(JJ,IPTWH)). ge. NSIGMA ) then
-           LL=LL+1
-           BADPT(LL)=JJ-IDATOFF
-           IF (LL.EQ.maxmrk) GO TO 205
-	 endif
-  203    CONTINUE
-c
-  205 CONTINUE
-c
-      do 2081 i1 = 1, ll, 12
-	i2 = min(ll, i1 + 11)
-        WRITE (CPUF,1000,IOSTAT=IER) (nint(badpt(Ijk)),Ijk= i1, i2)
- 1000 FORMAT ('BAD POINTS:',12I5)
-        CALL PWRITE (IPUF,n80)
-2081    continue
-c
-      GO TO 99
-C----------------------------------------------------------------------
-C                                    REPLACE   
-C----------------------------------------------------------------------
-  210 CONTINUE
-c
-       if(bdrop.lt.0.or.edrop.lt.0.or.
-     1	   (bdrop+edrop.gt.dtwh(c12ni,iptwh))) 
-     .		call oerror(n288, m2, 'REPLACE')
-c
-      IST=DTWH(C12SPN,IPTWH)+IDATOFF + bdrop
-      ISP=DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1 - edrop
-c
-      if (ist .gt. isp) call oerror(n225, m2, 'REPLACE')
-c
-      first = .true.
-      DO 212 II = 1,maxmrk
-         ibad=nint(BADPT(II))+IDATOFF
-         IF (ibad.EQ.IST.OR.ibad.EQ.ISP) then
-            TWH(ibad,IPTWH)=0.
-         else IF (ibad.EQ.IST+1.OR.ibad.EQ.ISP-1) then
-            if (okreal4(TWH(ibad-1,IPTWH)) .and. 
-     .		okreal4(TWH(ibad+1,IPTWH))) then
-     	     TWH(ibad,IPTWH)=(TWH(ibad-1,IPTWH)+TWH(ibad+1,IPTWH))/2.
-	    else if (first) then
-	     call oerror(n268, n0, "REPLACE: Skipping points")
-	     first = .false.
-	    endif
-         else if(ibad.le.isp.and.ibad.ge.ist) then
-            if (okreal4(TWH(ibad-1,IPTWH)) .and. 
-     .		okreal4(TWH(ibad-2,IPTWH)) .and.
-     .		okreal4(TWH(ibad+2,IPTWH)) .and.
-     .		okreal4(TWH(ibad+1,IPTWH))) then
-             TWH(ibad,IPTWH)=2*(TWH(ibad-1,IPTWH)+TWH(ibad+1,IPTWH))/3.-
-     .               (TWH(ibad-2,IPTWH)+TWH(ibad+2,IPTWH))/6.
-	    else if (first) then
-	     call oerror(n268, n0, "REPLACE: Skipping points")
-	     first = .false.
-	    endif
-	 endif
-  212    CONTINUE
-c
-      GO TO 99
-C----------------------------------------------------------------------
-C                                  PEAK   
-C----------------------------------------------------------------------
-  220 CONTINUE
-c
-      if(bdrop.lt.0.or.edrop.lt.0.or.(bdrop+
-     1   edrop.gt.dtwh(c12ni,iptwh) )) call oerror(n288, m2, 'PEAK')
-c
-      ISTART=DTWH(C12SPN,IPTWH)+BDROP+IDATOFF
-      ISTOP=DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-     .      +IDATOFF-1-EDROP
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'PEAK')
-c
-      TMAX=-1.e34
-      TCH=0.
-      DO 221 JJ = ISTART,ISTOP
-         IF (okreal4(twh(jj,iptwh)).and.TMAX.lt.TWH(JJ,IPTWH)) then
-            TMAX=TWH(JJ,IPTWH)
-            TCH=FLOAT(JJ-IDATOFF)
-	 endif
-  221    CONTINUE
-c
-      LIM=nint(TCH)+IDATOFF
-      DO 222 I=LIM,ISTOP
-         IF(okreal4(twh(i,iptwh)).and.TWH(I,IPTWH).LT.TMAX/2.0) GOTO 223
-  222    CONTINUE
-      i = istop
-  223 LIM1=I
-      DO 224 I = LIM,ISTART,-1
-         IF(okreal4(twh(i,iptwh)).and.TWH(I,IPTWH).LT.TMAX/2.0) GOTO 225
-  224    CONTINUE
-      i = istart
-  225 lim2 = i
-      HWIDTH(1)=LIM1-lim2+1
-      CENTER(1)=TCH
-      HEIGHT(1)=TMAX
-      BGAUSS=TCH-HWIDTH(1)
-      EGAUSS=TCH+HWIDTH(1)
-c
-      lxa1 = lxa
-      if (.not. okarray(lxa, dtwh(1,iptwh)) ) then
-         call oerror(n270, n0, 
-     .		'PEAK: Units of X-axis will be channels or samples')
-	 lxa1 = 1
-      endif
-      tvel = chantox(lxa1, dtwh(1,iptwh), tch, ierr)
-      hwdth = chantox(lxa1, dtwh(1,iptwh), float(lim1+1-idatoff), ierr)
-     1       - chantox(lxa1, dtwh(1,iptwh), float(lim2-idatoff), ierr)
-c
-      WRITE (CPUF,2000,IOSTAT=IER) TMAX,TVEL,nint(TCH),abs(hwdth)
-      CALL PWRITE (IPUF,n80)
-c
-#ifdef CONTINUUM
- 2000 FORMAT('Hght:',1pg13.6,'; Cntr:',g13.6,' (Sample:',i5,
-     .		'); HW:',g13.6)
-#else
- 2000 FORMAT('Hght:',1pg13.6,'; Cntr:',g13.6,' (Channl:',i5,
-     .		'); HW:',g13.6)
-#endif
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C						      BIAS  
-C---------------------------------------------------------------------
- 280  CONTINUE
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-     .           + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'BIAS')
-c
-      DO 282 JJ = ISTART,ISTOP
- 282	    if (okreal4(TWH(JJ,IPTWH))) TWH(JJ,IPTWH)=TWH(JJ,IPTWH)+FACT
- 284        CONTINUE
-c
-      GO TO 99
-C----------------------------------------------------------------
-C                                          CHNGRES
-C----------------------------------------------------------------
-  290 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH)+IDATOFF
-      ISTOP=DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-     .      + IDATOFF - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'CHNGRES')
-c
-      DO 292 JJ = ISTART,ISTOP
-         XDATA(JJ-ISTART+1)=TWH(JJ,IPTWH)
-  292    CONTINUE
-c
-      NCHN=ISTOP-ISTART+1
-      OLDRES = 1.
-      CALL CHGRES(XDATA,NCHN,abs(OLDRES),abs(NEWRES))
-c
-      DO 293 JJ=ISTART,ISTOP
-         TWH(JJ,IPTWH)=XDATA(JJ-ISTART+1)
-  293    CONTINUE
-c
-#ifdef CONTINUUM
-      dtwh(c12dx,iptwh)=newres*dtwh(c12dx,iptwh)
-      dtwh(c3srt,iptwh)=newres*dtwh(c3srt,iptwh)
-      dtwh(c12it,iptwh)=newres*dtwh(c12it,iptwh)
-#else
-      DTWH(C12BW,IPTWH)=NEWRES*dtwh(c12bw,iptwh)
-      DTWH(C12FR,IPTWH)=NEWRES*dtwh(c12fr,iptwh)
-      dtwh(c12dx,iptwh)=newres*dtwh(c12dx,iptwh)
-#endif
-c		adjust reference channel if not at center of data
-      ntmp = nint(dtwh(c12rp,iptwh)*2.0 - 1.0)
-      if (ntmp .ne. nchn) then
-         centchan = (float(nchn) + 1.0) / 2.0
-         dtwh(c12rp,iptwh) = centchan - 
-     .           (centchan - dtwh(c12rp,iptwh)) / newres 
-      endif
-c
-      GO TO 99
-C
-C-----------------------------------------------------------------------
-C     CROSSFCN                  
-C-----------------------------------------------------------------------
-  300 CONTINUE
-c
-      iswtch = -1
-c
-      istart = DTWH(C12SPN,IPTWH) + idatoff
-      istop = istart + DTWH(C12NI,IPTWH) - 1
-      istart1 = DTWH(C12SPN,itemp) + idatoff
-      istop1 = istart1 + DTWH(C12NI,itemp) - 1
-c
-      if (istop-istart .ne. istop1-istart1) 
-     .		call oerror(n249, m2, 'CROSSFCN')
-      if (istart .ge. istop) call oerror(n222, m2, 'CROSSFCN')
-c
-      goto 315
-C-----------------------------------------------------------------------
-C     CONVFCN                  
-C-----------------------------------------------------------------------
-  310 CONTINUE
-c
-      iswtch = 1
-c
-      istart = DTWH(C12SPN,IPTWH) + idatoff
-      istop = istart + DTWH(C12NI,IPTWH) - 1
-      istart1 = DTWH(C12SPN,itemp) + idatoff
-      istop1 = istart1 + DTWH(C12NI,itemp) - 1
-c
-      if (istop-istart .ne. istop1-istart1) 
-     .		call oerror(n249, m2, 'CONVFCN')
-      if (istart .ge. istop) call oerror(n222, m2, 'CONVFCN')
-c
-315   invers = .false.
-      in = (istop - istart + 1)
-      INN = IN*2
-      CALL COPY (INN,TWH(istart,iptwh),XDATA)
-      CALL COPY (INN,TWH(istart1,itemp),work)
-      DO 15 I = 1,IN
-	    if (.not. okreal4(xdata(i)) .or. 
-     .		.not. okreal4(work(i)) )
-     .		call oerror(n268, m2, "CONVFCN/CROSSFCN: Cannot proceed")
-            YDATA(I)=0.0
-            temporary(I)=0.0
-   15       CONTINUE
-c
-      jCNT=0
-   16   jCNT=jCNT+1
-        IF (2**jcnt .lt. in) GO TO 16
-c
-      IF (2**jcnt .eq. in) THEN
-         CALL FFT(XDATA,YDATA,jCNT,INVERS)
-         CALL FFT(work, temporary,jCNT,INVERS)
-      ELSE
-         CALL DFT(XDATA,YDATA,IN,INVERS)
-         CALL DFT(work, temporary,IN,INVERS)
-      ENDIF
-c
-      do 327 i = 1, in
-        aa = xdata(i)
-	xdata(i) = aa*work(i) - iswtch*ydata(i)*temporary(i)
-	ydata(i) = ydata(i)*work(i) + iswtch*aa*temporary(i)
-327	continue
-c
-      invers = .true.
-      IF (2**jcnt .eq. in) THEN
-         CALL FFT(XDATA,YDATA,jCNT,INVERS)
-      ELSE
-         CALL DFT(XDATA,YDATA,IN,INVERS)
-      ENDIF
-c
-      do 328 i = 1, in/2
-	twh(i+istart-1,iptwh) = xdata(i+in/2)
-328	continue
-      do 329 i = in/2+1, in
-	twh(i+istart-1,iptwh) = xdata(i-in/2)
-329	continue
-c
-      goto 99
-c
-C-----------------------------------------------------------------------
-C     DECNVLV                  
-C-----------------------------------------------------------------------
-  320 CONTINUE
-c
-      istart = DTWH(C12SPN,IPTWH) + idatoff
-      istop = istart + DTWH(C12NI,IPTWH) - 1
-      istart1 = DTWH(C12SPN,itemp) + idatoff
-      istop1 = istart1 + DTWH(C12NI,itemp) - 1
-c
-      if (istop-istart .ne. istop1-istart1) 
-     .		call oerror(n249, m2, 'DECNVLV')
-      if (istart .ge. istop) call oerror(n222, m2, 'DECNVLV')
-c
-      invers = .false.
-      in = (istop - istart + 1)
-      INN = IN*2
-      CALL COPY (INN,TWH(istart,iptwh),XDATA)
-      CALL COPY (INN,TWH(istart1,itemp),work)
-      DO 335 I = 1,IN
-	    if (.not. okreal4(xdata(i)) .or. 
-     .		.not. okreal4(work(i)) ) 
-     .		call oerror(n268, m2, "DECNVLV: Cannot proceed")
-            YDATA(I)=0.0
-            temporary(I)=0.0
-  335       CONTINUE
-c
-      jCNT=0
-  336   jCNT=jCNT+1
-        IF (2**jcnt .lt. in) GO TO 336
-c
-      IF (2**jcnt .eq. in) THEN
-         CALL FFT(XDATA,YDATA,jCNT,INVERS)
-         CALL FFT(work, temporary,jCNT,INVERS)
-      ELSE
-         CALL DFT(XDATA,YDATA,IN,INVERS)
-         CALL DFT(work, temporary,IN,INVERS)
-      ENDIF
-c
-      do 337 i = 1, in
-        mag2 = dprod(work(i),work(i)) + dprod(temporary(i),temporary(i))
-	numaa1 = dprod(xdata(i),work(i)) + dprod(ydata(i),temporary(i))
-	numaa2 = dprod(ydata(i),work(i)) - dprod(xdata(i),temporary(i))
-c
-	if (mag2 .eq. 0.0d00) then
-c	   Watch out for division by zero if MAG2 is zero.
-c	   Make sure that something reasonable is placed into XDATA and YDATA.
-c
-	   if (numaa1 .ge. 0.0d00) then
-	       xdata(i) = rmaxnormal()
-	   else 
-	       xdata(i) = rminnormal()
-	   endif
-	   if (numaa2 .ge. 0.0d00) then
-	       ydata(i) = rmaxnormal()
-	   else 
-	       ydata(i) = rminnormal()
-	   endif
-	else
-	   numaa1 = numaa1/mag2
-	   numaa2 = numaa2/mag2
-c	   MAG2 is not zero but the division could overflow R*4 representation
-c	   Make sure that something reasonable is placed into XDATA and YDATA.
-c
-	   if (numaa1 .gt. rmaxnormal() ) then
-	      xdata(i) = rmaxnormal()
-	   else if (numaa1 .lt. rminnormal() ) then
-	      xdata(i) = rminnormal()
-	   else
-	      xdata(i) = numaa1
-	   endif
-	   if (numaa2 .gt. rmaxnormal() ) then
-	      ydata(i) = rmaxnormal()
-	   else if (numaa2 .lt. rminnormal() ) then
-	      ydata(i) = rminnormal()
-	   else
-	      ydata(i) = numaa2
-	   endif
-	endif
-337	continue
-c
-      invers = .true.
-      IF (2**jcnt .eq. in) THEN
-         CALL FFT(XDATA,YDATA,jCNT,INVERS)
-      ELSE
-         CALL DFT(XDATA,YDATA,IN,INVERS)
-      ENDIF
-c
-      do 338 i = 1, in/2
-	twh(i+istart-1,iptwh) = xdata(i+in/2)
-338	continue
-      do 339 i = in/2+1, in
-	twh(i+istart-1,iptwh) = xdata(i-in/2)
-339	continue
-c
-      goto 99
-c
-C---------------------------------------------------------------------
-C					SHIFT
-C---------------------------------------------------------------------
-  130 CONTINUE
-c
-      istart = DTWH(C12SPN,IPTWH) + idatoff
-      istop = istart + DTWH(C12NI,IPTWH) - 1
-c
-      if (istart .gt. istop) call oerror(n225, m2, 'SHIFT')
-c
-      if (abs(ashift) .gt. dtwh(c12ni,iptwh)) 
-     .		call oerror(n251, m2, 'SHIFT')
-c
-      num = nint(dtwh(c12ni, iptwh))
-      call shift(twh(istart, iptwh), num, ashift, ishift, ierr)
-      if (ierr .ne. 0) call oerror(ierr, m2, "SHIFT")
-c
-      dtwh(c12rp,iptwh) = dtwh(c12rp,iptwh) + ashift
-c
-      chshifts(ichnext, 1) = dtwh(c1sno, iptwh)
-      chshifts(ichnext, 2) = ashift
-      ichnext = ichnext + 1
-      if (ichnext .gt. maxstck) ichnext = 1
-      ichnum = min(ichnum+1, maxstck)
-c
-      GO TO 99
-C-------------------------------------------------------------------------
-C                              FSHIFT
-C-----------------------------------------------------------------------
-  230 CONTINUE
-c
-      IF (NACCUM.le.0) then
-	ashift = 0.0
-      else
-c
-#ifdef CONTINUUM
-         if (dtwh(c3srt,iptwh) .ne. daccum(c3srt)) 
-     .       call oerror(n230, n0, 'FSHIFT:  Time resolutions differ')
-         ashift = 0.0
-#else
-         if (dtwh(c12fr,iptwh) .ne. daccum(c12fr)) 
-     .       call oerror(n230, m2, 'FSHIFT:  Freq. resolutions differ')
-c
-         ashift=(DTWH(C12RF,iptwh)-daccum(C12RF))/daccum(C12FR)
-c
-         ashift = ashift - dtwh(c12rp,iptwh) + daccum(c12rp)
-#endif
-c
-      endif
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C                              VSHIFT
-C-----------------------------------------------------------------------
-  240 CONTINUE
-c
-      IF (NACCUM.le.0) then
-	 ashift = 0.0
-      else
-c
-#ifdef CONTINUUM
-         if (dtwh(c12dx,iptwh) .ne. daccum(c12dx)) 
-     .      call oerror(n230, n0, 
-     .              'FSHIFT:  Position resolutions differ')
-         ashift = 0.0
-#else
-      if (.not. okarray(n3, dtwh(1,iptwh)) ) 
-     .	call oerror(n270, m2, 'VSHIFT')
-c
-         ashift = daccum(c12rp) - 
-     .		xtochan(n3, dtwh(1,iptwh), sngl(daccum(c12x0)), ier)
-#endif
-      endif
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C                              PDOC
-C-----------------------------------------------------------------------
-  250 CONTINUE
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'PDOC')
-c
-      do 2509 i1 = 1, 10
-         if (.not.okreal4(twh(idatoff+i1,iptwh))) 
-     .		call oerror(n268, m2, "PDOC: Cannot proceed")
-2509	 continue
-c
-#ifdef CONTINUUM
-      call pdoc
-#else
-      if (sp .lt. 1) call oerror(n112, m1, 'PDOC: One needed')
-c
-      ifit = nint(v(sp))
-      sp = sp - 1
-c
-      if (ifit .lt. 1 .or. ifit .gt. 2) 
-     .   call oerror(n112, m1,'PDOC: argument must be 1 or 2')
-c
-      call pdoc(ifit)
-#endif
-c
-      GO TO 99
-C--------------------------------------------------------------------
-C				LISTSHIFT
-C--------------------------------------------------------------------
-  260 continue
-c
-      if (ichnum .le. 0) then
-         write(cpuf, 1250, iostat = ier)
-         call pwrite(ipuf, n80)
- 1250 format('LISTSHIFT: The list of shifts is empty!')
-      else
-         write(cpuf, 1251, iostat=ier)
- 1251 format(4(3x,'scan',4x,'shift',2x))
-         call pwrite(ipuf, n80)
-         i1 = ichnext - ichnum
-         if (i1 .lt. 1) i1 = i1 + maxstck
-         do 251 i2 = 1, ichnum, 4
-            do 252 ii = 1, min(4, ichnum-i2+1)
-               if (i1 .gt. maxstck) i1 = i1 - maxstck
-               ilist(ii) = i1
-               i1 = i1 + 1
- 252        continue
-            write(cpuf, 1252, iostat=ier)
-     .         (chshifts(ilist(ii2),1), chshifts(ilist(ii2), 2), 
-     .         ii2=1,(ii-1))
- 1252 format(4(x,f8.2,x,f6.1,2x))
-            call pwrite(ipuf, n80)
- 251     continue
-      endif
-c
-      goto 99
-C---------------------------------------------------------------------
-C					PLUS
-C---------------------------------------------------------------------
- 330  CONTINUE
-c
-      istart0 = DTWH(C12SPN,IPTWH) + IDATOFF
-      istop0 = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     1        + IDATOFF - 1
-      istart1 = DTWH(C12SPN,itemp) + IDATOFF
-      istop1 = DTWH(C12SPN,itemp) + DTWH(C12NI,itemp)
-     1        + IDATOFF - 1
-c
-      if (istart0 .gt. istop0 .or. istart1 .gt. istop1) 
-     .    call oerror(n222, m2, 'PLUS')
-c
-      DO 331 JJ = istart0, istop0
-	 jj1 = jj - istart0 + istart1
-         if (jj1 .le. istop1 .and. jj1 .ge. istart1) then
-            if (okreal4(TWH(JJ,IPTWH)).and.okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=TWH(JJ,IPTWH)+TWH(jj1,ITEMP)
-	    else if(defmode .ge. 0.5 .and. okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=TWH(jj1,ITEMP)
-	    else if (defmode .lt. 0.5) then
-		twh(jj,iptwh)=rinfinity()
-	    endif
-	 endif
-  331    CONTINUE
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					MULTIPLY
-C---------------------------------------------------------------------
- 340  CONTINUE
-c
-      istart0 = DTWH(C12SPN,IPTWH) + IDATOFF
-      istop0 = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     1        + IDATOFF - 1
-      istart1 = DTWH(C12SPN,itemp) + IDATOFF
-      istop1 = DTWH(C12SPN,itemp) + DTWH(C12NI,itemp)
-     1        + IDATOFF - 1
-c
-      if (istart0 .gt. istop0 .or. istart1 .gt. istop1) 
-     .    call oerror(n222, m2, 'MULTIPLY')
-c
-      DO 341 JJ = istart0, istop0
-	 jj1 = jj - istart0 + istart1
-         if (jj1 .le. istop1 .and. jj1 .ge. istart1) then
-            if (okreal4(TWH(JJ,IPTWH)).and.okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=TWH(JJ,IPTWH)*TWH(jj1,ITEMP)
-	    else if(defmode .ge. 0.5 .and. okreal4(TWH(jj1,ITEMP))) then
-         	TWH(JJ,IPTWH)=TWH(jj1,ITEMP)
-	    else if (defmode .lt. 0.5) then
-		twh(jj,iptwh)=rinfinity()
-	    endif
-	 endif
-  341    CONTINUE
-c
-      GO TO 99
-C--------------------------------------------------------------------
-  99  CONTINUE
-C
-      RETURN
-      END
-c
-c
-      subroutine shift(data, num, ashift, ishift, ierr)
-c
-c     Performs a shift of the DATA by ASHIFT channels
-c
-c     DATA(NUM) = R*4 data array
-c     NUM = dI*2 imension of DATA
-c     ASHIFT = R*4 magnitude of shift
-c     ISHIFT = I*2 Returns the number of channels that have been set to
-c		blank values at either end of the array.  If > 0, then
-c		the first ISHIFT channels have been set to blank values,
-c		else the last -ishift channels have been set to blank values. 
-c     ierr = I*2 = 0 if all goes OK
-c
-      integer*2 num, ierr, ishift
-      real ashift, data(*)
-c
-      real fshift, rinfinity, welch
-      double precision amp, phs, phshft, pi
-      logical okreal4
-      integer*4 num4, jcnt, numexp, kk, i, k1, nskip, k2
-      logical*4 t, f
-c
-      include 'appl.inc'
-c
-      parameter (pi = 3.1415926535898d0 )
-c 
-      welch(kk) = 1.0 - ( float(kk - numexp/2)/float(numexp/2) )**2
-c     Definition of Welch windowing function
-c
-      ierr = 0
-      ishift = 0
-      num4 = num
-c
-      t = .true.
-      f = .false.
-      if (ashift .eq. 0.0) goto 99
-c
-      if (abs(ashift) .gt. num4) then
-	ierr = 251
-	goto 99
-      endif
-c
-      ishift = int(ashift)
-      fshift = mod(ashift,1.0)
-c
-      if (abs(fshift) .gt. 0.99) then
-	ishift = ishift + sign(1,fshift)
-	fshift = 0.0
-      else if (abs(fshift) .lt. 0.01) then
-	fshift = 0.0
-      endif
-c     Don't shift by fraction of a channel if the requested shift is
-c     less than one percent of a channel width.
-c
-      if (fshift .gt. 0.0) then
-	ishift = ishift + 1
-	fshift = 1.0 - fshift
-      else
-	fshift = - fshift
-      endif
-c     Reverse sense of fshift
-c
-c     Take care of fractional part of shift.   
-c
-      if (fshift .ne. 0.0) then
-c
-	if (num4 .gt. MAX_DATA_POINTS) then
-		ierr = 252
-		goto 99
-	endif
-c
-c       Step 1:  To prevent aliasing, expand array and pad with zeros
-c
-	  jcnt=0
-336         jcnt=jcnt+1
-            if (2**jcnt .le. num4) goto 336
-c	2**JCNT should be larger than the number of points in array
-c	
-	numexp = min(2**jcnt,MAX_DATA_POINTS)
-c	NUMEXP should be the size of the expanded array (up to the limit
-c	set by MAX_DATA_POINTS). It will either be a power of 2 or 
-c       MAX_DATA_POINTS (and even).
-c
-	  jcnt=0
-337         jcnt=jcnt+1
-            if (2**jcnt .lt. numexp) goto 337
-c	2**JCNT should be equal to or larger than the number of points in the
-c	expanded array
-c		
-	nskip = numexp - num4
-c       NSKIP is the number of locataion that are padded out.
-c
-	do 331 i = 1, numexp
-	   xdata(i) = 0.0
-	   ydata(i) = 0.0
-331	   continue
-c	Zero out X/YDATA
-c
-c	Step 2: Move contents of DATA into XDATA
-c
-        do 335 i = 1, num4
-	    k1 = i + nskip/2
-	    if (okreal4(data(i)) ) then
-		xdata(k1) = data(i)
-	    else
-		if (i .gt. 1) then
-		   xdata(k1) = xdata(i-1)
-		else
-		   xdata(k1) = 0.0
-		endif
-	    endif
-335         continue
-c
-c	  Step 3:  Do FFT
-c
-          if (2**jcnt .eq. numexp) then
-            call fft(xdata,ydata,jcnt,f)
-          else
-            call dft(xdata,ydata,numexp,f)
-          endif
-c
-c	  Step 4:  Calculate and add phase shift; Window Amplitudes with
-c		   Welch function so as to reduce leakage.
-c
-	  phshft = 2.d0*pi*fshift/float(numexp)
-          do 340 i = 1, numexp
-	    if (i .le. numexp/2) then
-		k1 = i
-	    else
-	        k1 = i - numexp
-	    endif	
-	    k2 = k1 + numexp/2
-	    amp = welch(k2)*sqrt(xdata(i)**2 + ydata(i)**2)
-	    phs = atan2(ydata(i), xdata(i)) + phshft*float(k1)
-	    xdata(i) = amp*cos(phs)
-	    ydata(i) = amp*sin(phs)
-340	    continue
-c
-c	  Step 5:  Do IFFT
-c
-          if (2**jcnt .eq. numexp) then
-            call fft(xdata,ydata,jcnt,t)
-          else
-            call dft(xdata,ydata,numexp,t)
-          endif
-c
-c	  Step 6:  Move data from XDATA back into DATA
-c
-          do 350 i = 1,num4
-	    k1 = i + nskip/2
-	    if (okreal4(data(i)) ) then
-		data(i) = xdata(k1)
-	    else
-		data(i) = rinfinity()
-		if (i .gt. 1) data(i-1) = rinfinity()
-	    endif
-350	    continue
-      endif
-c
-c     Now, the integer part of the shift
-c
-      if (ishift .gt. 0) then
-	do 131 i = num4, ishift+1, -1
-	   data(i) = data(i-ishift)
-131	   continue
-	do 132 i = ishift, 1, -1
-	   data(i) = rinfinity()
-132	   continue
-      else if (ishift .lt. 0) then
-	do 133 i = 1, num4 + ishift
-	   data(i) = data(i-ishift)
-133	   continue
-	do 134 i = num4 + ishift + 1, num4
-	   data(i) = rinfinity()
-134	   continue
-      endif
-c     Moves the integer part of the desired shift.
-c
-99    return
-      end
-c
diff -uNr 3.5/source/conline/condar/au3.f unipops-3.6/source/conline/condar/au3.f
--- 3.5/source/conline/condar/au3.f	2000-03-16 11:36:12.000000000 -0700
+++ unipops-3.6/source/conline/condar/au3.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,275 +0,0 @@
-      SUBROUTINE AU3 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au3.f	5.2 07/07/94
-C-------------------------------------------------------------------------------
-c
-c     au3 - Baseline, Bmodel, Dcbase, RMS, Bshow, Pcbase, Mdbase
-c
-C---------------------------------------------------------------------
-c
-      integer*2 j, iptwh, jj, istart, istop, i, ier, ix, iy, isort, i2,
-     .		kk, ip, median, in, inn, md2
-      integer*4 I4, mdsize
-      integer*2 n0, n80, n120, n225, n237, n242, n297, n298, m3, m2
-      integer*2 n25, n780, n1, n33, n268
-      logical isfirst, okreal4
-      real*4 x0, xd, t, y, sum, total, sum2, xx, zbase, ajj
-c
-      external qcomphi
-c
-      PARAMETER (I4 = 4)
-c
-      INCLUDE 'cform.inc'
-      include 'core.inc'
-      INCLUDE 'appl.inc'
-      INCLUDE 'cio.inc'
-      data n0, n80, n120, n225, n237, n242, n297, n298, m3, m2, n33
-     .     /0, 80, 120, 225, 237, 242, 297, 298, -3, -2, 33/
-      data n25, n780, n1, n268 /25, 780, 1, 268/
-C
-C=======================================================================
-C
-      IPTWH=1
-c
-      JJ=J
-      GO TO (10,20,30,40,50,60,70,80), JJ
-      call oerror(n120, m3, 'AU3')
-C---------------------------------------------------------------------
-C							  BASELINE
-C---------------------------------------------------------------------
-  10  CONTINUE
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'BASELINE')
-c
-      if (nint(nfit).lt. 0 .or. nint(nfit) .gt. 12.) 
-     .		call oerror(n297, m2, 'BASELINE')
-c
-      CALL PREP (ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'BASELINE')
-c
-      do 15 i = 1, 15
-	bparm(i) = 0.0
-15	continue
-c     Zero out BPARM so that no left over coefficients remain
-c
-      CALL BSHAPE (ier)
-      if (ier .ne. 0) call oerror(n297, m2, 'BASELINE')
-      X0=BPARM(14)
-      XD=BPARM(15)
-      DO 16 JJ=ISTART,ISTOP
-         T=float(jj)*XD+X0
-         CALL CNPS (Y,T,BPARM,IRES)
-         if (okreal4(TWH(JJ,IPTWH))) TWH(JJ,IPTWH)=TWH(JJ,IPTWH)-Y
-16       continue
-      GO TO 99
-C---------------------------------------------------------------------
-C							  BMODEL
-C---------------------------------------------------------------------
-  20  CONTINUE
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'BMODEL')
-c
-      X0=BPARM(14)
-      XD=BPARM(15)
-      DO 26 JJ=ISTART,ISTOP
-	    T=float(jj)*XD+X0
-	    CALL CNPS (Y,T,BPARM,IRES)
-	    TWH(JJ,IPTWH)=Y
-26          continue
-      GO TO 99
-C---------------------------------------------------------------------
-C							  BSHAPE
-C---------------------------------------------------------------------
-  30  CONTINUE
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'BSHAPE')
-c
-      if (nint(nfit).lt. 0 .or. nint(nfit) .gt. 12.) 
-     .		call oerror(n297, m2, 'BSHAPE')
-c
-      CALL PREP (ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'BSHAPE')
-c
-      do 31 i = 1, 15
-	bparm(i) = 0.0
-31	continue
-c     Zero out BPARM so that no left over coefficients remain
-c
-      CALL BSHAPE (ier)
-      if (ier .ne. 0) call oerror(n297, m2, 'BSHAPE')
-      GO TO 99
-C---------------------------------------------------------------------
-C							  DCBASE
-C---------------------------------------------------------------------
-  40  CONTINUE
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'DCBASE')
-c
-      CALL PREP (ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'DCBASE')
-c
-      SUM=0.0
-      DO 44 I=1,IBASE
-  	    SUM=SUM+YDATA(I)
-44	    continue
-      SUM=SUM/IBASE
-      DO 46 JJ=ISTART,ISTOP
-  	    if(okreal4(TWH(JJ,IPTWH))) TWH(JJ,IPTWH)=TWH(JJ,IPTWH)-SUM
-46	    continue
-      GO TO 99
-C---------------------------------------------------------------------
-C							  RMS
-C---------------------------------------------------------------------
-  50  CONTINUE
-c
-      CALL PREP(ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'RMS')
-c
-      TOTAL=FLOAT(IBASE)
-      SUM=0.0
-      SUM2=0.0 
-      DO 54 I=1,IBASE
-	    SUM=SUM+YDATA(I)
-  	    SUM2=SUM2+YDATA(I)*YDATA(I)
-54	    continue
-      SUM=SUM2-SUM*SUM/TOTAL
-      VRMS=SQRT(SUM/(TOTAL-1.0))
-      WRITE (CPUF,2000,IOSTAT=IER) VRMS
-      CALL PWRITE (IPUF,n80)
- 2000 FORMAT(1X,'RMS VALUE',F8.4)
-      GO TO 99
-C-------------------------------------------------------------------
-C                                          BSHOW
-C--------------------------------------------------------------------
-   60 CONTINUE
-      if (showplot(numplots) .ne. 0) call oerror(n298, m2, 'BSHOW')
-c
-      ISTART = DTWH (C12SPN,IPTWH)
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'BSHOW')
-c
-      X0=BPARM(14)
-      XD=BPARM(15)
-      isfirst = .true.
-      DO 66 ix = ix0, ixm, 2
-         ajj = (float(ix)-bx(numplots))/ax(numplots)
-         T=(ajj+float(idatoff))*XD+X0
-         CALL CNPS (Y,T,BPARM,IRES)
-         IY=min(max(iy0,nint(AY(numplots)*Y+BY(numplots))), iym)
-         if (nint(ajj) .ge. isbg) then
-           if (isfirst) then 
-	      call placewp(ix, iy, n33)
-              isfirst  = .false.
-           else
-	      CALL vctrwp(IX, IY, n33, sclchar, 0.)
-           endif
-         endif
-   66 CONTINUE
-      call place(n0, n780 - n25*(inline-n1))
-      call pchar('',n0)
-      GO TO 99
-C-----------------------------------------------------------------------
-C        PCBASE                                          
-C-----------------------------------------------------------------------
-   70 CONTINUE
-c
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'PCBASE')
-c
-      if (dcpct .le. 0 .or. dcpct .ge. 100) 
-     .		call oerror(n237, m2, 'PCBASE')
-c
-      CALL PREP (ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'PCBASE')
-c
-      ISORT=nint(DCPCT*FLOAT(ibase)*0.01)
-c
-      DO 62 J=1,ISORT
-         I2=J+1
-         DO 64 KK=I2,ibase
-            IF (ydata(J).gt.ydata(KK)) then
-              XX=ydata(J)
-              ydata(J)=ydata(KK)
-              ydata(KK)=XX
-	    endif
-   64       CONTINUE
-   62    CONTINUE
-c
-      ZBASE=ydata(ISORT)
-c
-      DO 63 I=ISTART,ISTOP
-         if(okreal4(TWH(I,IPTWH))) TWH(I,IPTWH)=TWH(I,IPTWH)-ZBASE
-63	 continue
-c
-      GO TO 99
-C--------------------------------------------------------------------
-C                        MDBASE             
-C--------------------------------------------------------------------
-  80  CONTINUE
-c
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'MDBASE')
-c
-      mdsize = mdbox
-      IF (MOD(mdsize,2).ne.1 .or. mdsize.le.0 .or. 
-     .	  mdsize.gt.dtwh(c12ni,iptwh)) call oerror(n242, m2, 'MDBASE')
-C
-      do 801 i = istart, istop
-	if (.not.okreal4(twh(i,iptwh))) 
-     .      call oerror(n268, m2, "MDBASE: Cannot proceed")
-801     continue
-c
-      in = istop - istart + 1
-      inn = 2*in
-      median = mdsize/2 + 1
-      md2 = 2*mdsize
-c
-      call copy(inn, twh(istart,iptwh), ydata)
-c     Copy to YDATA the original data; YDATA never gets altered.
-c
-c     Do the first few (MDSIZE) channels by....
-      call copy(md2, ydata(1), work(1))
-      call qsort(work, mdsize, I4, qcomphi)
-c     Copying 1st MDSIZE data points from YDATA to WORK, sort WORK....
-      do 815 ip = 1, median
-	xdata(ip) = ydata(ip) - work(median)
-815	continue
-c     Subtract the median value from the first MDSIZE data points and
-c     store results in xdata.
-c     
-c     Now, the central part of the array
-      do 840 ip = median+1, in - mdsize/2
-	call copy(md2, ydata(ip-median+1), work(1))
-	call qsort(work, mdsize, I4, qcomphi)
-	xdata(ip) = ydata(ip) - work(median)
-840	continue
-c
-c     The final MDSIZE data points...  We've already sorted the last
-c     MDSIZE data points during the last execution of the above loop.
-c
-      do 845 ip = in - mdsize/2 + 1, in
-	xdata(ip) = ydata(ip) - work(median)
-845	continue
-c
-      call copy(inn, xdata, twh(istart,iptwh))
-c     Copy XDATA back to the original array.
-c
-      GO TO 99
-C
-  99  CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/au4.F unipops-3.6/source/conline/condar/au4.F
--- 3.5/source/conline/condar/au4.F	2000-03-16 11:36:14.000000000 -0700
+++ unipops-3.6/source/conline/condar/au4.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,513 +0,0 @@
-      SUBROUTINE AU4 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au4.F	5.3 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     au4 - Show, Reshow, Crosshair, Flag, Fullgrid, Plot, Setpage,
-c		Rstpage, Color, Linetype, Charsize, Rstcolor 
-c
-C-----------------------------------------------------------------
-c
-      INTEGER*2 iptwh, iy, itmp, short, nchan, ix, ier, j, ilct,
-     .          ichar, iyz, ixy, ipixel, sclc, color, ierr, nplot, 
-     .		curcur
-      integer*2 n0, n1, n8, n10, n33, n112, n120, n222, n245, n299,
-     .		n2, n5, n9, n14, n25, n50, m1, m2, m3, m16, n3,
-     .		n271, n272, n273, n4, n244
-      REAL*4 tmp, chn, ymark, vell, xz, csize1, satblu, shdgrn,
-     .		huered 
-      character*10 getformat, format, stch
-      integer*4 ialt, ibx, istart1, istart2, istop1, istop2,
-     .		jj, i
-      real*8 chantox, xtochan
-      logical okarray, seton, okreal8
-c
-      INCLUDE 'appl.inc'
-c
-      double precision dtmphdr(PADDED_HDR_SIZE)
-      real rtmphdr(PADDED_HDR_SIZE*2)
-      integer*2 itmphdr(PADDED_HDR_SIZE*4), cflag
-      equivalence (dtmphdr, rtmphdr), (dtmphdr, itmphdr)
-c
-      INCLUDE 'mappl.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-      include 'core.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'mform.inc'
-c
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-c
-      data ialt/-1/
-      data m1, m2, m3, m16
-     .    /-1, -2, -3, -16/
-      data n0, n1, n3, n8, n10, n33, n112, n120, n222, n245, n299
-     .    /0, 1, 3, 8, 10, 33, 112, 120, 222, 245, 299/
-      data n2, n4, n5, n9, n14, n25, n50, n271, n272, n273, n244
-     .    /2, 4, 5, 9, 14, 25, 50, 271, 272, 273, 244/
-c
-      IPTWH = 1
-      JJ=J
-      GO TO (10,20,30,40,110,50, 120, 130, 140, 150, 160, 170, 180), JJ
-      call oerror(n120, m3, 'AU4')
-      goto 99
-C---------------------------------------------------------------------
-C					SHOW  
-C---------------------------------------------------------------------
- 30   CONTINUE
-c
-      call show(n1, splt)
-      call str4cur(n0)
-c    
-      GO TO 99
-C---------------------------------------------------------------------
-C					     RESHOW
-C---------------------------------------------------------------------
-  20  CONTINUE
-c
-      call show(n0, rplt)
-      call str4cur(n0)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					CROSSHAIR   
-C---------------------------------------------------------------------
- 10   CONTINUE
-c
-      if (numplots .eq. 0) call oerror(n299, m2, 'CROSSHAIR')
-c
-      ichar = 1
-      if (sclchar .ne. 1.) call charsize(sclchar)
-  12  CALL CURSOR (ICHAR, IX, IY)
-      IF (ICHAR.ne.IALT) then
-        if (sclchar .ne. 1.) call charsize(1.)
-	GO TO 99
-      endif
-c
-      cflag = crossflag
-c
-      CALL PLACE (ix - sclc(n5),IY)
-      CALL VCTR (ix + sclc(n5),IY)
-      CALL PLACE (IX,iy - sclc(n5))
-      CALL VCTR (IX,iy + sclc(n5))
-c     Draw plus sign
-c
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) then
-	call oerror(n244, n0, 'CROSSHAIR')
-	goto 12
-      endif
-c
-C     Channel/Sample number for SHOW, X value for PLOT, X-pixel for Matrices
-c
-      CHN = (float(ix)-bx(nplot))/ax(nplot) 
-      if (showplot(nplot) .eq. 1 .and. dtmphdr(5) .gt. 0.5) 
-     .		chn = 10**chn
-      if ( seton( cflag, n5)) then
-         format = getformat(chn,2.*chn,n8)
-         write(cpuf,format,iostat=ier) chn
-         CALL PLACE (ix - sclc(n9*n14),IY)
-	 call pchar(ipuf, n8)
-      endif
-c
-c     y-value for SHOW and PLOT, Y-pixel for Matrices
-c
-      TMP = (FLOAT(IY)-BY(nplot))/AY(nplot)
-      if (showplot(nplot) .eq. 1 .and. dtmphdr(6) .gt. 0.5) 
-     .		tmp = 10**tmp
-      if ( seton( cflag, n4)) then
-        format = getformat(tmp,2.*tmp,n8)
-        WRITE (CPUF,format,IOSTAT=IER) TMP
-        CALL PLACE (IX,IY)
-	CALL PCHAR(IPUF,n8)
-      endif
-c
-C     Velocity/Position for SHOW, X value for Matrices, skip for PLOT
-c
-      if ( seton( cflag, n3)) then
-         ierr = 1
-         if (showplot(nplot) .eq. 0 .and. okarray(n3, dtmphdr) ) then
-	   vell = chantox(n3, dtmphdr, chn, ierr)
-           if (ierr .ne. 0) call oerror(n272, m2, 'CROSSHAIR')
-         else if (showplot(nplot).gt.1 .and. okarray(m2, dtmphdr)) then
-	   vell = chantox(m2, dtmphdr, chn, ierr)
-           if (ierr .ne. 0) call oerror(n273, m2, 'CROSSHAIR')
-        endif
-c
-         if (ierr .eq. 0) then
-	   format = getformat(vell,2.*vell,n8)
-           WRITE (CPUF,format,IOSTAT=IER) vell
-           call place (ix - sclc(n9*n14), iy - sclc(n25))
-           CALL PCHAR(IPUF,n8)
-         endif
-      endif
-c		
-C     Freq/time for SHOW, Y value for Matrices, skip for PLOT
-c
-      if ( seton( cflag, n2)) then
-         ierr = 1
-         if (showplot(nplot) .eq. 0 .and. okarray(n2, dtmphdr) ) then
-          xz = chantox(n2, dtmphdr, chn, ierr)
-          if (ierr .ne. 0) call oerror(n271, m2, 'CROSSHAIR')
-         else if (showplot(nplot).gt.1 .and. okarray(m1, dtmphdr)) then
-          xz = chantox(m1, dtmphdr, tmp, ierr)
-          if (ierr .ne. 0) call oerror(n273, m2, 'CROSSHAIR')
-         endif
-c
-         if (ierr .eq. 0) then
-           format = getformat(xz,2.*xz,n8)
-           WRITE (CPUF,format,IOSTAT=IER) xz
-           CALL PLACE (IX,iy - sclc(n25))
-           CALL PCHAR(IPUF,n8)
-         endif
-      endif
-c
-c     Z value for matrices, skip for PLOT and SHOW
-c
-      if ( seton( cflag, n1)) then
-       if (showplot(nplot) .gt. 1 .and. numplots .eq. nplot .and.
-     .	nint(chn).ge.1.and.nint(chn).le.mhead(mnaxis1,iptwh).and.
-     .  nint(tmp).ge.1.and.nint(tmp).le.mhead(mnaxis2,iptwh)) then 
-	     xz = mdata(ilct(nint(chn),nint(tmp),iptwh))
-             format = getformat(xz,2.*xz,n8)
-             WRITE (CPUF,format,IOSTAT=IER) xz
-             call place (ix - sclc(n9*n14/n2), iy - sclc(n50))
-             CALL PCHAR(IPUF,n8)
-        endif
-      endif
-c
-      GO TO 12
-C
-C---------------------------------------------------------------------
-C					FLAG   166
-C---------------------------------------------------------------------
-  40  CONTINUE
-c
-      if (sp .le. 0) call oerror(n112, m1, 'FLAG')
-      if (showplot(numplots) .lt. 0) call oerror(n299, m2, 'FLAG')
-c
-      YMARK=V(SP)
-      SP=SP-1
-      LIT=MOD(LIT+1,3)
-c
-      if (showplot(numplots) .eq. 1 .and. xlog .gt. 0.5) then
-	chn = alog10(ymark)
-      else if (showplot(numplots) .eq. 0) then
-	chn = xtochan(lxa, dtwh(1,iptwh), ymark, ierr)
-        if (ierr .ne. 0) call oerror(n272, m2, 'FLAG')
-      else if (showplot(numplots) .ge. 2) then
-	chn = xtochan(m2, mhead(1,iptwh), ymark, ierr)
-        if (ierr .ne. 0) call oerror(n273, m2, 'FLAG')
-      else
-	chn = ymark
-      endif
-c     Calculate channel number for the desired flag
-c
-      IbX=CHN*AX(numplots)+bx(numplots) + 0.5
-      if (ibx .ge. ix0 .and. ibx .le. ixm)  then
-         if (sclchar .ne. 1.) call charsize(sclchar)
-         call place(short(ibx), IY0)
-         IYZ=IYM-(LIT+2)*sclc(n25)
-         CALL VCTR(short(ibx),IYZ)
-         format = getformat(ymark,2.*ymark,n10)
-         write(cpuf,format,iostat=ier) ymark
-         CALL PLACE(short(ibx) - sclc(n10*n14/n2),IYZ)
-         CALL PCHAR(IPUF,n10)
-         if (sclchar .ne. 1.) call charsize(1.)
-      endif
-c     Plot it if it is within the limits of the plot
-c
-      GO TO 99
-C----------------------------------------------------------------------
-C                                     FULLGRID  180
-C----------------------------------------------------------------------
-  110 CONTINUE
-c
-      if (showplot(numplots) .lt. 0) call oerror(n299, m2, 'FULLGRID')
-c
-      DO 111 I = 1,limy
-           IYZ=riyt(i)
-           CALL PLACE (IX0,IYZ)
-           CALL VCTR (IXM, IYZ)
-  111      CONTINUE
-      DO 112 I = 1,limx
-           IXY=rIXT(i)
-           CALL PLACE (IXY,IY0)
-           CALL VCTR (IXY,IYM)
-  112      CONTINUE
-      GO TO 99
-C---------------------------------------------------------------------
-C					     PLOT
-C---------------------------------------------------------------------
- 50   CONTINUE
-c
-      istart1 = dtwh(c12spn,1) + idatoff
-      istart2 = dtwh(c12spn,2) + idatoff
-      istop1 = istart1 + dtwh(c12ni,1) - 1
-      istop2 = istart2 + dtwh(c12ni,2) - 1
-      nchan = min(istop1-istart1+1, istop2-istart2+1)
-c
-      if(nchan .le. 0) call oerror(n222, m2, 'PLOT')
-c
-      call copy(nchan*n2, twh(istart1,1),ydata)
-      call copy(nchan*n2, twh(istart2,2),xdata)
-c
-      call plot(nchan)
-      call str4cur(n1)
-c
-      goto 99
-c
-C---------------------------------------------------------------------
-C					SETPAGE  
-C---------------------------------------------------------------------
-120   CONTINUE
-c
-      if (sp .le. 3) call oerror(n112, m1, 'SETPAGE: four needed')
-c     
-      if (.not. okreal8(v(sp)) ) v(sp) = ymax0+1
-      if (.not. okreal8(v(sp-1)) ) v(sp-1) = yorg0-1
-      yorg(curcur()) = min(v(sp), v(sp-1))
-      ymax(curcur()) = max(v(sp), v(sp-1))
-      sp = sp - 2
-      if (.not. okreal8(v(sp)) ) v(sp) = xmax0+1
-      if (.not. okreal8(v(sp-1)) ) v(sp-1) = xorg0-1
-      xorg(curcur()) = min(v(sp), v(sp-1))
-      xmax(curcur()) = max(v(sp), v(sp-1))
-      sp = sp - 2
-c
-      if (xorg(curcur()) .lt. xorg0) then
-	xorg(curcur()) = xorg0
-        write(stch,71,iostat=ierr) xorg0
-71	format(i10)
-	call oerror(n245, n0, 'SETPAGE:  Setting X-origin to ' // stch)
-      endif
-      if (yorg(curcur()) .lt. yorg0) then
-	yorg(curcur()) = yorg0
-        write(stch,71,iostat=ierr) yorg0
-	call oerror(n245, n0, 'SETPAGE:  Setting Y-origin to ' // stch)
-      endif
-      if (xmax(curcur()) .gt. xmax0) then
-	xmax(curcur()) = xmax0
-        write(stch,71,iostat=ierr) xmax0
-	call oerror(n245, n0, 'SETPAGE:  Setting X-max to ' // stch)
-      endif
-      if (ymax(curcur()) .gt. ymax0) then
-	ymax(curcur()) = ymax0
-        write(stch,71,iostat=ierr) ymax0
-	call oerror(n245, n0, 'SETPAGE:  Setting Y-max to ' // stch)
-      endif
-c
-      if (xmax(curcur()) .eq. xorg(curcur())) 
-     .		xmax(curcur()) = xorg(curcur()) + 1
-      if (ymax(curcur()) .eq. yorg(curcur())) 
-     .		ymax(curcur()) = yorg(curcur()) + 1
-c
-      sclfctx = float(xmax(curcur()) - xorg(curcur()) + 1) / 
-     .			float(xmax0 - xorg0 + 1)
-      sclfcty = float(ymax(curcur()) - yorg(curcur()) + 1) / 
-     .			float(ymax0 - yorg0 + 1)
-      sclchar = min(sclfctx,sclfcty)
-c      
-      GO TO 98
-C---------------------------------------------------------------------
-C					RSTPAGE  
-C---------------------------------------------------------------------
-130   CONTINUE
-c
-      xorg(curcur()) = xorg0
-      yorg(curcur()) = yorg0
-      xmax(curcur()) = xmax0
-      ymax(curcur()) = ymax0
-      sclfctx = 1.
-      sclfcty = 1.
-      sclchar = 1.
-c      
-      GO TO 98
-C---------------------------------------------------------------------
-C					COLOR  
-C---------------------------------------------------------------------
-140   CONTINUE
-c
-      if (sp .le. 2) call oerror(n112, m1, 'COLOR: Three needed')
-c    
-      if (.not. okreal8(v(sp)) ) v(sp) = -16.
-      if (.not. okreal8(v(sp-1)) ) v(sp-1) = -16.
-      if (.not. okreal8(v(sp-2)) ) v(sp-2) = -16.
-c
-      satblu = v(sp-2)
-      shdgrn = v(sp-1)
-      huered = v(sp)
-      sp = sp - 3
-c
-      if (satblu .eq. -16. .and. shdgrn .eq. -16. .and.
-     .    huered .eq. -16.) then
-	call resetcolor
-      else
-	idx = color(satblu, shdgrn, huered)
-      endif
-c
-      goto 98
-c
-C---------------------------------------------------------------------
-C					LINETYPE  
-C---------------------------------------------------------------------
-150   CONTINUE
-c
-      if (sp .le. 0) call oerror(n112, m1, 'LINETYPE: One needed')
-c    
-      if (.not. okreal8(v(sp)) ) v(sp) = 0.
-c
-      ltype = nint(v(sp))
-      sp = sp - 1
-c
-      call linetype(ltype, n33)
-c
-      goto 98
-c
-C---------------------------------------------------------------------
-C					CHARSIZE  
-C---------------------------------------------------------------------
-160   CONTINUE
-c
-      if (sp .le. 0) call oerror(n112, m1, 'CHARSIZE: One needed')
-c    
-      if (.not. okreal8(v(sp)) ) v(sp) = 11.
-c
-      csize1 = v(sp)
-      sp = sp - 1
-c
-      if (csize1 .le. 0 .or. csize1 .gt. 44) 
-     .		call oerror(n112, m2, 'CHARSIZE')
-c
-      sclchar = csize1/11.
-c     SCLCHAR is ratio of current char. size to default (11 points)
-c
-      goto 98
-c
-C---------------------------------------------------------------------
-C					RSTCOLOR  
-C---------------------------------------------------------------------
-170   CONTINUE
-c
-      call resetcolor
-c
-      goto 98
-c
-C---------------------------------------------------------------------
-C					CLICK   
-C---------------------------------------------------------------------
-180   CONTINUE
-c
-      if (numplots .eq. 0) call oerror(n299, m2, 'CLICK')
-c
-      cclick = default
-      tclick = default
-      fclick = default
-      vclick = default
-      mclick = default
-      xclick = default
-      yclick = default
-c
-      ichar = 0
-      CALL CURSOR (ICHAR, IX, IY)
-c
-      xclick = ix
-      yclick = iy
-c
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) then
-	call oerror(n244, n0, 'CLICK')
-	goto 99
-      endif
-c
-C     Channel/Sample number for SHOW, X value for PLOT, X-pixel for Matrices
-c
-      cclick = (float(ix)-bx(nplot))/ax(nplot) 
-      if (showplot(nplot) .eq. 1 .and. dtmphdr(5) .gt. 0.5) 
-     .		chn = 10**chn
-c
-c     y-value for SHOW and PLOT, Y-pixel for Matrices
-c
-      tclick = (FLOAT(IY)-BY(nplot))/AY(nplot)
-      if (showplot(nplot) .eq. 1 .and. dtmphdr(6) .gt. 0.5) 
-     .		tclick = 10**tclick
-c
-C     Velocity/Position for SHOW, X value for Matrices, skip for PLOT
-c
-      ierr = 1
-      if (showplot(nplot) .eq. 0 .and. okarray(n3, dtmphdr) ) then
-	   vclick = chantox(n3, dtmphdr, cclick, ierr)
-           if (ierr .ne. 0) then
-		call oerror(n272, n0, 'CLICK')
-		vclick = default
-	   endif
-      else if (showplot(nplot) .gt. 1 .and. okarray(m2, dtmphdr) ) then
-	   vclick = chantox(m2, dtmphdr, cclick, ierr)
-           if (ierr .ne. 0) then
-		call oerror(n272, n0, 'CLICK')
-		vclick = default
-	   endif
-      endif
-c		
-C     Freq/time for SHOW, Y value for Matrices, skip for PLOT
-c
-      ierr = 1
-      if (showplot(nplot) .eq. 0 .and. okarray(n2, dtmphdr) ) then
-          fclick = chantox(n2, dtmphdr, cclick, ierr)
-          if (ierr .ne. 0) then
-		call oerror(n271, n0, 'CLICK')
-		fclick = default
-	  endif
-      else if (showplot(nplot) .gt. 1 .and. okarray(m1, dtmphdr) ) then
-          fclick = chantox(m1, dtmphdr, tclick, ierr)
-          if (ierr .ne. 0) then
-		call oerror(n271, n0, 'CLICK')
-		fclick = default
-	  endif
-      endif
-c
-c     Z value for matrices, skip for PLOT and SHOW
-c
-      if (showplot(nplot) .gt. 1 .and. numplots .eq. nplot .and.
-     .nint(cclick).ge.1.and.nint(cclick).le.mhead(mnaxis1,iptwh).and.
-     .nint(tclick).ge.1.and.nint(tclick).le.mhead(mnaxis2,iptwh) ) 
-     .      mclick = mdata(ilct(nint(cclick),nint(tclick),iptwh))
-c
-      GO TO 99
-C
-C --------------------------------------------------------------
-99    continue
-      itmp = int(750. - (float(inline)-1.)*22.5)
-      call place(n0, itmp)
-      call pchar('',n0)
-98    return
-C --------------------------------------------------------------
-  219 FORMAT(F8.2)
-      END
-c
-c-----------------------------------
-c
-      logical function seton(flag, byte)
-c
-c     Returns TRUE if the BYTE digit of FLAG is > 0 else it returns 
-c     FALSE
-c
-      integer*2 flag, byte
-c
-      integer*2 test
-c
-      if (byte .gt. 1) then
-         test = flag / (10**(byte-1))
-      else
-	 test = flag
-      endif
-c
-      if (mod(test, 10) .eq. 0) then
-	seton = .false.
-      else
-	seton = .true.
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/au5.f unipops-3.6/source/conline/condar/au5.f
--- 3.5/source/conline/condar/au5.f	2000-03-16 11:36:16.000000000 -0700
+++ unipops-3.6/source/conline/condar/au5.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,1770 +0,0 @@
-      SUBROUTINE AU5 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au5.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     au5 - mtable, mheader, mblank, mcopy, mmove, mremove, minit, mrange,
-c		hlftne, label, setlev, autolev, raster, setclut, contour,
-c		mread, mwrite, readcube, slice, mlimits, cheader, mfft, mifft,
-c		holwindow, holfitfoc, eqhistlev, funclev, putrow, putcol, 
-c		getrow, getcol, mplus, mminus, mmultiply, mdivide, mscale,
-c               mbias
-c
-C-----------------------------------------------------------------------
-c
-      integer*2 j, iptwh, iarrayin, iarrayout, i1, i2, j1, j2, irealp,
-     .		ierr, jj, numlevs, loc, itype, isize, curcur, 
-     .		itable, face, i3
-      integer*2 m1, m2, m3, n0, n80, n112, n120, n254, n255, n256, n257,
-     .          n258, n259, n264, n296, nconj, n272, n1, n2, n3, n4, n5,
-     .		n267, n252, n274, n275
-      integer*2 is1, n25, n780, ixmin, iymin, ixmax, iymax, ntick, col, 
-     .		row
-      integer*4 istart, istop, numx, numy, istart1, i, x1, x2 
-      integer*4 l1, long, ilct, numx1, numy1, numtot, numtot1
-      real value, zmin, zmax, zdiff, percents(32), mratio1, cfactor,
-     .	   mtemp, rstch(10), xmn, xmx, ymn, ymx, nyqrate, dishdia,
-     .     focalpt, z1, z2, func(32), rinfinity, hues(32), sats(32), 
-     .     shds(32), undef0, undef1, value0, value1, sfact
-      double precision xtochan, chantox
-      logical quick, flipx, flipy, invertxy, invers, okreal8, okreal4
-      character*80 stch
-c
-      include 'cio.inc'
-      include 'core.inc'
-      INCLUDE 'mappl.inc'
-      INCLUDE 'appl.inc'
-      INCLUDE 'stk.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'mform.inc'
-c
-      equivalence (rstch,stch)
-c
-      data m1, m2, m3, n0, n80, n112, n120,n252,n254,n255,n256,n257,
-     .          n258, n259, n264, n267, n296, n272, n1, n2, n3, n4, n5
-     .    /-1, -2, -3, 0, 80, 112, 120, 252, 254, 255, 256, 257, 258,
-     .     259, 264, 267, 296, 272, 1, 2, 3, 4, 5/
-      data is1, n25, n780 /1, 25, 780/
-      data n274, n275 /274, 275/
-c
-      data l1 /1/
-c
-C=======================================================================
-C
-      IPTWH = 1
-c
-      imin = nint(mxmin)
-      if (imin .lt. 1 .or. imin .gt. nint(mhead(mnaxis1,iptwh)))
-     .		 imin = 1
-      jmin = nint(mymin)
-      if (jmin .lt. 1 .or. jmin .gt. nint(mhead(mnaxis2,iptwh))) 
-     .		jmin = 1
-      imax = nint(mxmax)
-      if (imax .lt. 1 .or. imax .gt. nint(mhead(mnaxis1,iptwh))) 
-     .			imax = nint(mhead(mnaxis1,iptwh))
-      jmax = nint(mymax)
-      if (jmax .lt. 1 .or. jmax .gt. nint(mhead(mnaxis2,iptwh))) 
-     .			jmax = nint(mhead(mnaxis2,iptwh))
-c
-      JJ=J
-      GO TO (10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,
-     .	     160,170,180,190,200,210,220,230,240,250,260,270,280,
-     .	     290,300,310,320,330,340,350,360,370,380,390,400,410,
-     .       420), JJ
-      call oerror(n120, m3, 'AU5')
-      GO TO 99
-c
-c------------------------------------------------------------------------
-c     MTABLE
-c------------------------------------------------------------------------
-10    continue
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MTABLE')
-C     Make sure matrix 0 has been initialized.
-c
-      call mtable(mdata(istart),numx,numy)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MHEADER
-c------------------------------------------------------------------------
-20    continue
-c
-      call mheader(iptwh)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MBLANK
-c------------------------------------------------------------------------
-30    continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'MBLANK: One needed')
-c
-      iarrayin = nint(v(sp)) + 1
-      sp = sp - 1
-c
-      if (iarrayin .lt. 1 .or. iarrayin .gt. mnumarrays) 
-     .		call oerror(n112, m2, 'MBLANK')
-c     User has specified the IARRAYIN matrix; check it's value
-c
-      istart = long(iarrayin-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iarrayin))
-      numy = nint(mhead(mnaxis2,iarrayin))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'MBLANK')
-c     Make sure matrix specified has been initialized.
-c
-      istop = istart + numx*numy - 1
-      value = mhead(mblank,iarrayin)
-c
-      do 32 i = istart, istop
-	mdata(i) = value
-32	continue
-c     Assign undefined values to all elements of matrix
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MCOPY
-c------------------------------------------------------------------------
-40    continue
-c
-      if (sp .lt. 2) call oerror(n112, m1, 'MCOPY: Two needed')
-c
-      iarrayout = nint(v(sp)) + 1
-      iarrayin = nint(v(sp-1)) + 1
-      sp = sp - 2
-c
-      if (iarrayin .lt. 1 .or. iarrayin .gt. mnumarrays .or.
-     1    iarrayout .lt. 1 .or. iarrayout .gt. mnumarrays) 
-     2    call oerror(n112, m2, 'MCOPY')
-      if (iarrayin .eq. iarrayout) call oerror(n257, m2, 'MCOPY')
-c     User has specified IRARRAYIN and OUT matrices for copying; check
-c	their values
-c
-      istart = long(iarrayin-is1)*mdatasize/mnumarrays + l1
-      istart1 = long(iarrayout-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iarrayin))
-      numy = nint(mhead(mnaxis2,iarrayin))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'MCOPY')
-c     Make sure the input matrix has been initialized
-c
-      istop = istart + numx*numy - 1
-c
-      do 43 i = 1, mheadsize
-	mhead(i,iarrayout) = mhead(i,iarrayin)
-43	continue
-      do 42 i = istart, istop
-	mdata(i-istart+istart1) = mdata(i)
-42	continue
-c     Copy matrix header and data
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MMOVE
-c------------------------------------------------------------------------
-50    continue
-c
-      if (sp .lt. 2) call oerror(n112, m1, 'MMOVE: Two needed')
-c
-      iarrayout = nint(v(sp)) + 1
-      iarrayin = nint(v(sp-1)) + 1
-      sp = sp - 2
-c
-      if (iarrayin .lt. 1 .or. iarrayin .gt. mnumarrays .or.
-     1    iarrayout .lt. 1 .or. iarrayout .gt. mnumarrays) 
-     2    call oerror(n112, m2, 'MMOVE')
-      if (iarrayin .eq. iarrayout) call oerror(n257, m2, 'MMOVE')
-c     User has specified IRARRAYIN and OUT matrices for moving; check
-c	their values
-c
-      istart = long(iarrayin-is1)*mdatasize/mnumarrays + l1
-      istart1 = long(iarrayout-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iarrayin))
-      numy = nint(mhead(mnaxis2,iarrayin))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'MMOVE')
-c     Make sure the input matrix has been initialized
-c
-      istop = istart + numx*numy - 1
-c
-      do 53 i = 1, mheadsize
-	mhead(i,iarrayout) = mhead(i,iarrayin)
-53	continue
-      do 52 i = istart, istop
-	mdata(i-istart+istart1) = mdata(i)
-52	continue
-c     Copy matrix header and data
-c
-      call mraz(iarrayin)
-c     Now zero out original matrix
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MREMOVE
-c------------------------------------------------------------------------
-60    continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'MREMOVE: One needed')
-c
-      iarrayin = nint(v(sp)) + 1
-      sp = sp - 1
-c
-      if (iarrayin .lt. 1 .or. iarrayin .gt. mnumarrays) 
-     .		call oerror(n112, m2, 'MREMOVE')
-c     User has specified IRARRAYIN matrix for removing; check
-c	its values
-c
-      call mraz(iarrayin)
-c
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MINIT
-c------------------------------------------------------------------------
-70    continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'MINIT: One needed')
-c
-      iarrayin = nint(v(sp)) + 1
-      sp = sp - 1
-c
-      if (iarrayin .lt. 1 .or. iarrayin .gt. mnumarrays) 
-     .		call oerror(n112, m1, 'MINIT')
-c     User has specified IRARRAYIN matrix for initializing; check
-c	its values
-c
-      call minit(iarrayin,.true.)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MRANGE
-c------------------------------------------------------------------------
-80    continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'MRANGE: Four needed')
-c
-      if (.not. okreal8(v(sp)) .and. .not. okreal8(v(sp-1)) ) then
-	  mymax = nint(mhead(mnaxis2,iptwh)) + 1
-	  mymin = 0
-      else if (.not. okreal8(v(sp)) ) then
-	  mymax = nint(mhead(mnaxis2,iptwh)) + 1
-          mymin = nint(xtochan(m1, mhead(1,1), sngl(v(sp-1)), ierr))
-          if (ierr .ne. 0) call oerror(n272, m2, 'MRANGE')
-      else if (.not. okreal8(v(sp-1)) ) then
-      	  mymax = nint(xtochan(m1, mhead(1,1), sngl(v(sp)), ierr))
-          if (ierr .ne. 0) call oerror(n272, m2, 'MRANGE')
-          mymin = 0
-      else
-         j2 = nint(xtochan(m1, mhead(1,1), sngl(v(sp)), ierr))
-         if (ierr .ne. 0) call oerror(n272, m2, 'MRANGE')
-         j1 = nint(xtochan(m1, mhead(1,1), sngl(v(sp-1)), ierr))
-         mymin = min(j1, j2)
-         mymax = max(j1, j2)
-      endif
-      sp = sp -2
-c
-      if (.not. okreal8(v(sp)) .and. .not. okreal8(v(sp-1)) ) then
-	  mxmax = nint(mhead(mnaxis1,iptwh)) + 1
-	  mxmin = 0
-      else if (.not. okreal8(v(sp)) ) then
-	  mxmax = nint(mhead(mnaxis1,iptwh)) + 1
-          mxmin = nint(xtochan(m2, mhead(1,1), sngl(v(sp-1)), ierr))
-          if (ierr .ne. 0) call oerror(n272, m2, 'MRANGE')
-      else if (.not. okreal8(v(sp-1)) ) then
-      	  mxmax = nint(xtochan(m2, mhead(1,1), sngl(v(sp)), ierr))
-          if (ierr .ne. 0) call oerror(n272, m2, 'MRANGE')
-          mxmin = 0
-      else
-         i2 = nint(xtochan(m2, mhead(1,1), sngl(v(sp)), ierr))
-         if (ierr .ne. 0) call oerror(n272, m2, 'MRANGE')
-         i1 = nint(xtochan(m2, mhead(1,1), sngl(v(sp-1)), ierr))
-         mxmin = min(i1, i2)
-         mxmax = max(i1, i2)
-      endif
-      sp = sp -2
-c     Get the user's input parameters; arrange in increasing order regardless
-c     of how the user has entered them.  Watch out and trap for default
-c     values.
-c
-      if (mxmin .le. 0.5) then
-	mxmin = 1.
-	call oerror(n258, n0, 'MRANGE: Setting MXMIN to 1')
-      endif
-      if (mymin .le. 0.5) then
-	mymin = 1.
-	call oerror(n258, n0, 'MRANGE: Setting MYMIN to 1')
-      endif
-      if (mxmax .gt. mhead(mnaxis1,iptwh) .or. mxmax .le. 0.5) then
-	mxmax = nint(mhead(mnaxis1,iptwh))
-        write(stch,71,iostat=ierr) nint(mxmax)
-71	format(i10)
-	call oerror(n258, n0, 'MRANGE:  Setting MXMAX to ' // stch(1:10))
-      endif
-      if (mymax .gt. mhead(mnaxis2,iptwh) .or. mymax .le. 0.5) then
-	mymax = nint(mhead(mnaxis2,iptwh))
-        write(stch,71,iostat=ierr) nint(mymax)
-	call oerror(n258, n0, 'MRANGE:  Setting MYMAX to ' // stch(1:10))
-      endif
-      if (mxmin .eq. mxmax) then
-	mxmin = 1.
-	mxmax = nint(mhead(mnaxis1,iptwh))
-	call oerror(n258, n0, 'MRANGE: Setting MXMIN to 1')
-        write(stch,71,iostat=ierr) nint(mxmax)
-	call oerror(n258, n0, 'MRANGE:  Setting MXMAX to ' // stch(1:10))
-      endif
-      if (mymin .eq. mymax) then
-	mymin = 1.
-	mymax = nint(mhead(mnaxis2,iptwh))
-	call oerror(n258, n0, 'MRANGE: Setting MYMIN to 1')
-        write(stch,71,iostat=ierr) nint(mymax)
-	call oerror(n258, n0, 'MRANGE:  Setting MYMAX to ' // stch(1:10))
-      endif
-c     If any input parameter is out of range, reset to default value
-c	(either 1 or max size of dimension of matrix 0).
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     HLFTNE
-c------------------------------------------------------------------------
-90    continue
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'HLFTNE')
-C     Make sure matrix 0 has been initialized.
-c
-      value = mhead(mblank,iptwh)
-      call zerror(mdata(istart),numx,numy,value,ierr)
-c
-      if (ierr .ge. 1024) 
-     .		call oerror(n259,m2,'HLFTNE: All < Min of Matrix')
-      if (ierr .ge. 512) 
-     .		call oerror(n259,m2,'HLFTNE: Not in ascending order')
-      if (ierr .ge. 256) 
-     .		call oerror(n259,m2,'HLFTNE: All LEVS <= -999999')
-      if (ierr .ne. 0) call oerror(n254,m2,'HLFTNE')
-c     Check LEVS, IMIN, IMAX, ..., and matrix for errors
-c
-      if (mratio .le. 0.) call oerror(n296, m2, 'HLFTNE')
-c
-      do 91 numlevs = 1, maxregn-1
-	if (levs(numlevs+1) .le. -999999) goto 92
-91	continue
-      numlevs = maxregn
-92    percents(1) = 0.0
-      do 93 i = 2, numlevs
-	percents(i) = (float(i-1)/float(numlevs-1))**2
-93	continue
-c     Find number of levels and calculate percentages of half toning
-c
-      mratio1 = mratio*float(imax-imin+1)/float(jmax-jmin+1)
-      if (mratio1 .ge. 1.) then
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=XMAX(curcur()) - sclfctx*269
-        IYM=YMAX(curcur()) - sclfcty*60
-        IY0=IYM - (IXM-IX0 + 1)/MRATIO + 1
-      else
-	IY0=YORG(curcur()) + sclfcty*125
-        IYM=YMAX(curcur()) - sclfcty*60
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=IX0 + (IYM-IY0 + 1)*MRATIO - 1
-      endif
-      ax(curcur()) = float(ixm-ix0)/float(imax-imin)
-      bx(curcur()) = float(ix0) - float(imin)*ax(curcur())
-      ay(curcur()) = float(iym-iy0)/float(jmax-jmin)
-      by(curcur()) = float(iy0) - float(jmin)*ay(curcur())
-c
-      value = mhead(mblank,iptwh)
-      call hlftne(mdata(istart),numx,numy,levs,percents,numlevs,value)
-c
-      call str4cur(n2)
-c
-      goto 98
-c
-c------------------------------------------------------------------------
-c     LABEL
-c------------------------------------------------------------------------
-100   continue
-c
-      if (showplot(numplots) .le. 1) call oerror(n264, m2, 'LABEL')
-c
-      call mlabel(showplot(numplots))
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     SETLEV
-c------------------------------------------------------------------------
-110   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'SETLEV: Four needed')
-c
-      itype = nint(v(sp))
-      numlevs = nint(v(sp-1))
-      zdiff = v(sp-2)
-      zmin = v(sp-3)
-      sp = sp - 4
-c     ZMIN = minimum contour level
-c     NUMLEVS = number of levels
-c     ITYPE = true (>=0) for linera levels else logarithmic
-c     ZDIFF = diff between levels if linear, fctor between levels if log
-c
-      if (numlevs .lt. 2 .or. numlevs .gt. maxregn) then
-	call oerror(n112, n0, 'SETLEV: Using maximum number of levels')
-	numlevs = maxregn
-      endif
-c     If NUMLEVS out of range, use MAXREGN levels
-c
-      if (zdiff .le. 0) call oerror(n112, m2, 'SETLEV: Increment <= 0')
-      if (itype .lt. 0) then
-	if (zmin .eq. 0) then
-	   call oerror(n112, m2, 'SETLEV: For logs, min. cannot = 0')
-        else if (zmin .gt. 0 .and. zdiff .le. 1.) then
-     	   call oerror(n112, m2,
-     .		 'SETLEV: For logs, inc. must be > 1 if Min > 0')
-        else if (zmin .lt. 0 .and. zdiff .ge. 1.) then
-     	  call oerror(n112, m2, 
-     .		'SETLEV: For logs, inc. must be < 1 if Min < 0')
-	endif
-      endif
-c     make sure inputs are correct for log and linear contour levels
-c
-      do 111 i = 1, numlevs
-        if (itype .ge. 0) then
-		levs(i) = zmin + zdiff*(i-1)
-	else
-		levs(i) = zmin*(zdiff**(i-1))
-	endif
-111     continue
-c     Calculate levels
-c
-      do 112 i = numlevs+1, maxregn
-	levs(i) = -999999.
-112	continue
-c     Void remaining levels
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     AUTOLEV
-c------------------------------------------------------------------------
-120   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'AUTOLEV: One needed')
-c
-      numlevs = nint(v(sp))
-      sp = sp - 1
-      if (numlevs .lt. 2 .or. numlevs .gt. maxregn) then
-	call oerror(n112, n0, 'AUTOLEV: Using maximum number of levels')
-	numlevs = maxregn
-      endif
-c     NUMLEVS = number of desired contour levels; reset to MAXREGN if
-c	bad value.
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'AUTOLEV')
-c     Make sure that data exists in matrix 0
-c
-      value = mhead(mblank,iptwh)
-      call zlimit(mdata(1), numx, numy, zmin, ixmin, iymin, zmax, ixmax, 
-     .		  iymax, value)
-c     Fins max/min values in matrix -- skip over undefined points
-c
-      if (zmin .eq. zmax) then
-         z1 = zmin
-         z2 = zmax
-         zdiff = 0
-         ntick = 1
-         if (zmin .eq. value) then
-            ntick = 0
-            write(stch, 1212)
-1212  format('AUTOLEV: all values in matrix 0 are undefined.')
-            call pwrite(rstch, n80)
-         else
-            write(stch, 1210)
-1210  format('AUTOLEV: matrix 0 is single-valued, only 1 level set.')
-            call pwrite(rstch, n80)
-         endif
-      else
-         call autolev(zmin, zmax, numlevs, z1, z2, zdiff)
-         ntick = numlevs
-      endif
-c
-      do 121 i = 1, ntick
-	levs(i) = z1 + float(i-1)*zdiff
-121	continue
-c     Calculate levels
-c
-      do 122 i = ntick+1, maxregn
-	levs(i) = -999999.
-122	continue
-c     Void any remaining levels
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     RASTER
-c------------------------------------------------------------------------
-130   continue
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'RASTER')
-C     Make sure matrix 0 has been initialized.
-c
-      value = mhead(mblank,iptwh)
-      call zerror(mdata(istart),numx,numy,value,ierr)
-c
-      if (ierr .ge. 1024) 
-     .		call oerror(n259,m2,'RASTER: All < Min of Matrix')
-      if (ierr .ge. 512) 
-     .		call oerror(n259,m2,'RASTER: Not in ascending order')
-      if (ierr .ge. 256) 
-     .		call oerror(n259,m2,'RASTER: All LEVS <= -999999')
-      if (ierr .ne. 0) call oerror(n254,m2,'RASTER')
-c     Check LEVS, IMIN, IMAX, ..., and matrix for errors
-c
-      if (mratio .le. 0.) call oerror(n296, m2, 'RASTER')
-c
-      do 131 numlevs = 1, maxregn-1
-	if (levs(numlevs+1) .le. -999999) goto 132
-131	continue
-      numlevs = maxregn
-132   do 133 i = 1, numlevs
-	hues(i) = clut(1,i)
-	shds(i) = clut(2,i)
-	sats(i) = clut(3,i)
-133	continue
-c     Find number of levels and stores color values into arrays
-c	 HUES, SHDS, and SATS
-c
-      mratio1 = mratio*float(imax-imin+1)/float(jmax-jmin+1)
-      if (mratio1 .ge. 1.) then
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=XMAX(curcur()) - sclfctx*269
-        IYM=YMAX(curcur()) - sclfcty*60
-        IY0=IYM - (IXM-IX0 + 1)/MRATIO + 1
-      else
-	IY0=YORG(curcur()) + sclfcty*125
-        IYM=YMAX(curcur()) - sclfcty*60
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=IX0 + (IYM-IY0 + 1)*MRATIO - 1
-      endif
-      ax(curcur()) = float(ixm-ix0)/float(imax-imin)
-      bx(curcur()) = float(ix0) - float(imin)*ax(curcur())
-      ay(curcur()) = float(iym-iy0)/float(jmax-jmin)
-      by(curcur()) = float(iy0) - float(jmin)*ay(curcur())
-c
-      value = mhead(mblank,iptwh)
-      call raster(mdata(istart),numx,numy,levs,hues,shds,sats,
-     .		  numlevs,value)
-c
-      call str4cur(n3)
-c
-      goto 98
-c
-c------------------------------------------------------------------------
-c     SETCLUT
-c------------------------------------------------------------------------
-140   continue
-c
-      if (sp .lt. 2) call oerror(n112, m1, 'SETCLUT: Two needed')
-c
-      itable = nint(v(sp-1))
-      numlevs = nint(v(sp)) 
-      sp = sp - 2
-c
-      if (numlevs .lt. 2 .or. numlevs .gt. maxregn) then
-	call oerror(n112, n0, 'SETCLUT: Using maximum number of levels')
-	numlevs = maxregn
-      endif
-c     NUMLEVS = number of desired contour levels; reset to MAXREGN if
-c	bad value.
-c
-      if (itable .le. 0 .or. itable .gt. 6)
-     .		call oerror(n112,m2,'SETCLUT: Bad color table number')
-c
-      do 1409 i = 1, maxregn
-	clut(1,i) = 0.0
-	clut(2,i) = 0.0
-	clut(3,i) = 0.0
-1409	continue
-c     Zero out CLUT first
-c
-      if (itable .eq. 1) then
-	do 141 i = 1, numlevs
-	   clut(1,i) = -16. + float(i-1)*15./(numlevs-1)
-	   clut(2,i) = -16. + float(i-1)*15./(numlevs-1)
-	   clut(3,i) = -16. + float(i-1)*15./(numlevs-1)
-141	   continue
-c	   Gray scale (-16,-16,-16) -> (-1,-1,-1)
-c
-      else if (itable .eq. 2) then
-	do 1419 i = 1, numlevs
-	   clut(1,i) = -1. - float(i-1)*15./float(numlevs-1)
-	   clut(2,i) = -1. - float(i-1)*15./float(numlevs-1)
-	   clut(3,i) = -1. - float(i-1)*15./float(numlevs-1)
-1419	   continue
-c	   Reverse Gray scale (-1,-1,-1) -> (-16,-16,-16)
-c
-      else if (itable .eq. 3) then
-	do 142 i = 1, numlevs
-	   clut(1,i) = 32. - float(i-1)*32/float(numlevs-1)
-	   clut(2,i) = 4.
-	   clut(3,i) = 6.
-142	   continue
-c	   Blue -> Red (32,4,6) -> (0,4,6)
-c
-      else if (itable .eq. 4) then
-	do 143 i = 1, numlevs
-	   clut(1,i) = float(i-1)*32./float(numlevs-1)
-	   clut(2,i) = 4.
-	   clut(3,i) = 6.
-143	   continue
-c	   Red -> Blue (0,4,6) -> (32,4,6)
-c
-      else if (itable .eq. 5) then
-	do 144 i = 1, numlevs
-	   clut(1,i) = 32. + float(i-1)*30./float(numlevs-1)
-	   clut(2,i) = 4.
-	   clut(3,i) = 6.
-144	   continue
-c	   Blue -> Brown  (32,4,6) -> (62,4,6)
-c
-      else if (itable .eq. 6) then
-	do 145 i = 1, numlevs
-	   clut(1,i) = 62. - float(i-1)*30./float(numlevs-1)
-	   clut(2,i) = 4.
-	   clut(3,i) = 6.
-145	   continue
-c	   Brown -> Blue  (62,4,6) -> (32,4,6)
-c
-      endif
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     CONTOUR
-c------------------------------------------------------------------------
-150   continue
-c
-      quick = .false.
-c
-      goto 155
-c
-210   quick = .true.
-c
-155   istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'CONTOUR')
-C     Make sure matrix 0 has been initialized.
-c
-      value = mhead(mblank,iptwh)
-      call zerror(mdata(istart),numx,numy,value,ierr)
-c
-      if (ierr .ge. 1024) 
-     .		call oerror(n259,m2,'CONTOUR: All < Min of Matrix')
-      if (ierr .ge. 512) 
-     .		call oerror(n259,m2,'CONTOUR: Not in ascending order')
-      if (ierr .ge. 256) 
-     .		call oerror(n259,m2,'CONTOUR: All LEVS <= -999999')
-      if (ierr .ne. 0) call oerror(n254,m2,'CONTOUR')
-c     Check LEVS, IMIN, IMAX, ..., and matrix for errors
-c
-      if (mratio .le. 0.) call oerror(n296, m2, 'CONTOUR')
-c
-      if (.not. quick) then
-	do 151 numlevs = 1, maxregn-1
-	  if (levs(numlevs+1) .le. -999999) goto 152
-151	  continue
-        numlevs = maxregn
-152     do 153 j = 1, numlevs
-          nconj = nint(conline(j))
-	  call linetype(nconj,j)
-153	  continue
-      endif
-c     Set up and check linetypes (if not a quick contour map)
-c
-      mratio1 = mratio*float(imax-imin+1)/float(jmax-jmin+1)
-      if (mratio1 .ge. 1.) then
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=XMAX(curcur()) - sclfctx*269
-        IYM=YMAX(curcur()) - sclfcty*60
-        IY0=IYM - (IXM-IX0 + 1)/MRATIO + 1
-      else
-	IY0=YORG(curcur()) + sclfcty*125
-        IYM=YMAX(curcur()) - sclfcty*60
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=IX0 + (IYM-IY0 + 1)*MRATIO - 1
-      endif
-      ax(curcur()) = float(ixm-ix0)/float(imax-imin)
-      bx(curcur())= float(ix0) - float(imin)*ax(curcur())
-      ay(curcur()) = float(iym-iy0)/float(jmax-jmin)
-      by (curcur())= float(iy0) - float(jmin)*ay(curcur())
-c
-      value = mhead(mblank,iptwh)
-      call tracer(mdata(istart),numx,numy,value,quick)
-c
-      call str4cur(n4)
-c
-      goto 98
-c
-c------------------------------------------------------------------------
-c     MREAD
-c------------------------------------------------------------------------
-160   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'MREAD')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'MREAD')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'MREAD')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      stch = ' '
-      do 161 i = 1, isize
-	rstch(i) = c(loc+i-1)
-161	continue
-c
-      sp = sp - 4
-c
-      call mread(stch)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MWRITE
-c------------------------------------------------------------------------
-170   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'MWRITE')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'MWRITE')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'MWRITE')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      stch = ' '
-      do 171 i = 1, isize
-	rstch(i) = c(loc+i-1)
-171	continue
-c     Get the filename
-c
-      sp = sp - 4
-c			reset imin, imax, jmin, jmax to use full array
-      imin = 1
-      jmin = 1
-      imax = nint(mhead(mnaxis1, iptwh))
-      jmax = nint(mhead(mnaxis2, iptwh))
-c
-      call mwrite(stch(1:4*isize))
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     READCUBE
-c------------------------------------------------------------------------
-180   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'READCUBE')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'READCUBE')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'READCUBE')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      stch = ' '
-      do 181 i = 1, isize
-	rstch(i) = c(loc+i-1)
-181	continue
-c     Get the filename
-c
-      sp = sp - 4
-c
-      call readcube(stch)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     SLICE
-c------------------------------------------------------------------------
-190   continue
-c
-      if (sp .lt. 3) call oerror(n112, m1, 'SLICE: Three needed')
-c
-      x2 = nint(v(sp))
-      x1 = nint(v(sp-1))
-      face = nint(v(sp-2))
-      sp = sp - 3
-c
-c     FACE = 1, 2, or 3; the face parrallel to which a slice will be made
-c     X1, X2 = pixel numbers from that face at which the slice is to
-c	be made.
-c
-      call slice(face, x1, x2)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MLIMITS
-c------------------------------------------------------------------------
-200   continue
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MLIMITS')
-c     Make sure that data exists in matrix 0
-c
-      value = mhead(mblank,iptwh)
-      call zlimit(mdata(1), numx, numy, zmin, ixmin, iymin, zmax, ixmax, 
-     .		  iymax, value)
-      xmn = chantox(m2, mhead(1,1), float(ixmin), ierr)
-      if (ierr .ne. 0) call oerror(n272, m2, 'MLIMITS')
-      xmx = chantox(m2, mhead(1,1), float(ixmax), ierr)
-      ymn = chantox(m1, mhead(1,1), float(iymin), ierr)
-      if (ierr .ne. 0) call oerror(n272, m2, 'MLIMITS')
-      ymx = chantox(m1, mhead(1,1), float(iymax), ierr)
-c     Fins max/min values in matrix -- skip over undefined points
-c
-      write(stch,211,iostat=ierr) cmhead(mbunit,iptwh), 
-     .		cmhead(mtype1,iptwh), cmhead(mtype2,iptwh)
-211   format(t12, a, t30, a, t46, a, t64, 'Pixels')
-      call pwrite(rstch,n80)
-c
-      write(stch,201,iostat=ierr) 'Min. = ',zmin,xmn,ymn,ixmin,iymin 
-      call pwrite(rstch,n80)
-201   format(a, 1pg15.7, ' at (', g15.7, ',', g15.7, 
-     .	     ') (', i4, ',', i4, ')')
-      write(stch,201,iostat=ierr) 'Max. = ',zmax,xmx,ymx,ixmax,iymax
-      call pwrite(rstch,n80)
-c
-      mlims(1,1)=zmin
-      mlims(1,2)=xmn
-      mlims(1,3)=ymn
-      mlims(1,4)=ixmin
-      mlims(1,5)=iymin
-      mlims(2,1)=zmax
-      mlims(2,2)=xmx
-      mlims(2,3)=ymx
-      mlims(2,4)=ixmax
-      mlims(2,5)=iymax
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     cheader
-c------------------------------------------------------------------------
-220   continue
-c
-      call cheader
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     PLOTDPTS
-c------------------------------------------------------------------------
-230   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'PLOTDOTS: One needed')
-c
-      i1 = nint(v(sp)) 
-      sp = sp - 1
-c
-      if (abs(i1) .gt. 2) 
-     .		call oerror(n112, m2, 'PLOTDOTS: -2, -1, 0, 1, or 2')
-c     I1 = type of dots wanted
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'PLOTDOTS')
-C     Make sure matrix 0 has been initialized.
-c
-      if (mratio .le. 0.) call oerror(n296, m2, 'PLOTDOTS')
-c
-      mratio1 = mratio*float(imax-imin+1)/float(jmax-jmin+1)
-      if (mratio1 .ge. 1.) then
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=XMAX(curcur()) - sclfctx*269
-        IYM=YMAX (curcur())- sclfcty*60
-        IY0=IYM - (IXM-IX0 + 1)/MRATIO + 1
-      else
-	IY0=YORG(curcur()) + sclfcty*125
-        IYM=YMAX(curcur()) - sclfcty*60
-	IX0=XORG(curcur()) + sclfctx*140
-        IXM=IX0 + (IYM-IY0 + 1)*MRATIO - 1
-      endif
-      ax(curcur()) = float(ixm-ix0)/float(imax-imin)
-      bx(curcur()) = float(ix0) - float(imin)*ax(curcur())
-      ay(curcur()) = float(iym-iy0)/float(jmax-jmin)
-      by(curcur()) = float(iy0) - float(jmin)*ay(curcur())
-c
-      value = mhead(mblank,iptwh)
-      call pltdots(mdata(istart),numx,numy,i1,value)
-c
-      call str4cur(n5)
-c
-      goto 98
-c
-c------------------------------------------------------------------------
-c     MSMOOTH
-c------------------------------------------------------------------------
-240   continue
-c
-      if (sp .lt. 2) call oerror(n112, m1, 'MSMOOTH: Two needed')
-c
-      i1 = nint(v(sp))
-      cfactor = v(sp-1)
-      sp = sp - 2
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-      istart1 = l1*mdatasize/mnumarrays + l1
-      istop = istart + numx*numy - l1
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MSMOOTH')
-c     Make sure the input matrix has been initialized
-c
-      do 243 i = 1, mheadsize
-	mhead(i,2) = mhead(i,iptwh)
-243	continue
-      do 242 i = istart, istop
-	mdata(i-istart+istart1) = mdata(i)
-242	continue
-c     Copy matrix header and data into Matrix (2)
-c
-      value = mhead(mblank,iptwh)
-      if (i1 .gt. 0) then
-	call msmooth(cfactor,mdata(istart1),mdata(istart),numx,numy,value)
-      else
-	call msmoth2(cfactor,mdata(istart1),mdata(istart),numx,numy,value)
-      endif
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MFILL
-c------------------------------------------------------------------------
-250   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'MFILL: One needed')
-c
-      i1 = nint(v(sp))
-      sp = sp - 1
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-      istart1 = l1*mdatasize/mnumarrays + l1
-      istop = istart + numx*numy - 1
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MFILL')
-c     Make sure the input matrix has been initialized
-c
-      do 253 i = 1, mheadsize
-	mhead(i,2) = mhead(i,iptwh)
-253	continue
-      do 252 i = istart, istop
-	mdata(i-istart+istart1) = mdata(i)
-252	continue
-c     Copy matrix header and data into Matrix (2)
-c
-      value = mhead(mblank,iptwh)
-      call mfill(mdata(istart1),mdata(istart),numx,numy,i1,value)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     ROTATE
-c------------------------------------------------------------------------
-260   continue
-c
-      if (sp .lt. 3) call oerror(n112, m1, 'ROTATE: Three needed')
-c
-      i3 = nint(v(sp))
-      i2 = nint(v(sp-1))
-      i1 = nint(v(sp-2))
-      sp = sp - 3
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-      istart1 = l1*mdatasize/mnumarrays + l1
-      istop = istart + numx*numy - l1
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'ROTATE')
-c     Make sure the input matrix has been initialized
-c
-      flipx = .false.
-      flipy = .false.
-      invertxy = .false.
-      if (i3 .gt. 0) flipy = .true.
-      if (i2 .gt. 0) flipx = .true.
-      if (i1 .gt. 0) invertxy = .true.
-c
-      do 263 i = 1, mheadsize
-	mhead(i,2) = mhead(i,iptwh)
-263	continue
-      do 262 i = istart, istop
-	mdata(i-istart+istart1) = mdata(i)
-262	continue
-c     Copy matrix header and data into Matrix (2)
-c
-      if (invertxy) then
-	mhead(mnaxis2,1) = mhead(mnaxis1,2)
-	mhead(mnaxis1,1) = mhead(mnaxis2,2)
-	cmhead(mtype2,1) = cmhead(mtype1,2)
-	cmhead(mtype1,1) = cmhead(mtype2,2)
-	mhead(mrval2,1) = mhead(mrval1,2)
-	mhead(mrval1,1) = mhead(mrval2,2)
-	mhead(mdelt2,1) = mhead(mdelt1,2)
-	mhead(mdelt1,1) = mhead(mdelt2,2)
-	mhead(mpix2,1) = mhead(mpix1,2)
-	mhead(mpix1,1) = mhead(mpix2,2)
-	mtemp = mxmin
-	mxmin = mymin
-      	mymin = mtemp
-	mtemp = mxmax
-      	mxmax = mymax
-      	mymax = mtemp
-      endif
-c
-      if (flipx) then
-	mhead(mpix1,1) = mhead(mnaxis1,1) - mhead(mpix1,1) + 1
-	mhead(mdelt1,1) = -mhead(mdelt1,1)
-	mtemp = mxmin
-	mxmin = mhead(mnaxis1,1) - mxmax + 1
-      	mxmax = mhead(mnaxis1,1) - mtemp + 1
-      endif
-c
-      if (flipy) then
-	mhead(mpix2,1) = mhead(mnaxis2,1) - mhead(mpix2,1) + 1
-	mhead(mdelt2,1) = -mhead(mdelt2,1)
-	mtemp = mymin
-	mymin = mhead(mnaxis2,1) - mymax + 1
-      	mymax = mhead(mnaxis2,1) - mtemp + 1
-      endif
-c     Update matrix header
-c
-      call rotate(mdata(istart1),mdata(istart), numx, numy,
-     .		   invertxy, flipx, flipy)
-c     rotate/invert matrix
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     MFFT
-c------------------------------------------------------------------------
-270   continue
-c
-      invers = .false.
-      call virfft(invers)
-c
-      goto 99
-c------------------------------------------------------------------------
-c     MIFFT
-c------------------------------------------------------------------------
-280   continue
-c
-      invers = .true.
-      call virfft(invers)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     HOLWINDOW
-c------------------------------------------------------------------------
-290   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'HOLWINDOW: One needed')
-c
-      i1 = nint(v(sp))
-      sp = sp - 1
-c
-      call window(i1)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     HOLFITFOC
-c------------------------------------------------------------------------
-300   continue
-c
-      if (sp .lt. 3) call oerror(n112, m1, 'HOLFITFOC: Three needed')
-c
-      focalpt = v(sp)
-      dishdia = v(sp-1)
-      nyqrate = v(sp-2)
-      sp = sp - 3
-c
-      call fitfoc(nyqrate, dishdia, focalpt)
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     EQHISTLEV
-c------------------------------------------------------------------------
-310   continue
-c
-      if (sp .lt. 3) call oerror(n112, m1, 'EQHISTLEV: Three needed')
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'EQHISTLEV')
-c     Make sure that data exists in matrix 0
-c
-      numlevs = nint(v(sp))
-      sp = sp - 1
-      if (numlevs .lt. 2 .or. numlevs .gt. maxregn) then
-	call oerror(n112, n0, 'EQHISTLEV: Using maximum number of levels')
-	numlevs = maxregn
-      endif
-c     NUMLEVS = number of desired contour levels; reset to MAXREGN if
-c	bad value.
-c
-      if ( .not. okreal8(v(sp)) .or. .not. okreal8(v(sp)) ) then
-         value = mhead(mblank,iptwh)
-         call zlimit(mdata(istart), numx, numy, zmin, ixmin, iymin, 
-     .		  zmax, ixmax, iymax, value)
-	 if ( okreal8(v(sp)) ) zmax = v(sp)
-	 if ( okreal8(v(sp-1)) ) zmin = v(sp-1)
-      else
-         zmax = v(sp)
-         zmin = v(sp-1)
-      endif
-      sp = sp - 2
-c
-      do 311 i = 1, numlevs
-	func(i) = 1.
-311	continue
-c
-      value = mhead(mblank,iptwh)
-      call funclev(mdata(istart), numx, numy, value, func, zmin, zmax, 
-     .             levs, numlevs, ierr)
-c
-      if (ierr .eq. 1) then
-	call oerror(n112, m2, 'EQHISTLEV')
-      else if (ierr .eq. 3) then
-	call oerror(n120, m3, 'EQHISTLEV')
-      else if (ierr .eq. 4) then
-	call oerror(n120, m3, 'EQHISTLEV')
-      else if (ierr .eq. 5) then
-	call oerror(n258, m2, 'EQHISTLEV: Bad max or min value')
-      else if (ierr .ne. 0) then
-	call oerror(n112, m2, 'EQHISTLEV')
-      endif
-c
-      do 312 i = numlevs+1, maxregn
-	levs(i) = -999999.
-312	continue
-c     Void any remaining levels
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     FUNCLEV
-c------------------------------------------------------------------------
-320   continue
-c
-      if (sp .lt. 2) call oerror(n112, m1, 'FUNCLEV: Two needed')
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'EQHISTLEV')
-c     Make sure that data exists in matrix 0
-c
-      if ( .not. okreal8(v(sp)) .or. .not. okreal8(v(sp)) ) then
-         value = mhead(mblank,iptwh)
-         call zlimit(mdata(istart), numx, numy, zmin, ixmin, iymin, 
-     .		 zmax,  ixmax, iymax, value)
-	 if ( okreal8(v(sp)) ) zmax = v(sp)
-	 if ( okreal8(v(sp-1)) ) zmin = v(sp-1)
-      else
-         zmax = v(sp)
-         zmin = v(sp-1)
-      endif
-      sp = sp - 2
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'FUNCLEV')
-c     Make sure that data exists in matrix 0
-c
-      do 321 i = 1, maxregn
-	if (flevs(i) .lt. 0) then
-	    numlevs = i
-	    goto 325
-        endif
-        func(i) = flevs(i)
-321	continue
-      if (numlevs .lt. 2 .or. numlevs .gt. maxregn) 
-     .	call oerror(n112, m2, 'FUNCLEV: Too few values in FLEVS')
-c
-325   value = mhead(mblank,iptwh)
-      call funclev(mdata(istart), numx, numy, value, func, zmin, zmax, 
-     .             levs, numlevs, ierr)
-c
-      if (ierr .eq. 1) then
-	call oerror(n112, m2, 'FUNCLEV')
-      else if (ierr .eq. 3) then
-	call oerror(n120, m3, 'FUNCLEV')
-      else if (ierr .eq. 4) then
-	call oerror(n120, m3, 'FUNCLEV')
-      else if (ierr .eq. 5) then
-	call oerror(n258, m2, 'FUNCLEV')
-      else if (ierr .ne. 0) then
-	call oerror(n112, m2, 'FUNCLEV')
-      endif
-c
-      do 322 i = numlevs+1, maxregn
-	levs(i) = -999999.
-322	continue
-c     Void any remaining levels
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     PUTROW
-c------------------------------------------------------------------------
-330   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'PUTROW')
-c
-      row = nint(v(sp))
-      sp = sp - 1
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      istop = nint(dtwh(c12spn,iptwh) + dtwh(c12ni,iptwh)) - 1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'PUTROW')
-c     Make sure that data exists in matrix 0
-c
-      if (istop .eq. 0) call oerror(n252, m2, 'PUTROW')
-c
-      if (row .le. 0 .or. row .gt. numy )
-     .				call oerror(n112, m2, 'PUTROW')
-c
-      if (istop .gt. numx ) then
-	write(stch,'(i5)',iostat=ierr) numx
-	call oerror(n267, n0, 'PUTROW: Using the first ' // stch(1:5) // 
-     .				' values in Array 0')
-      else if (istop .lt. numx ) then
-	write(stch,'(i5)',iostat=ierr) istop
-	call oerror(n267, n0, 'PUTROW: Setting the first ' // stch(1:5) // 
-     .				' in the row of Matrix 0')
-      endif
-c     Do the proper things if the matrix is bigger than the array and
-c     vice-versa.
-c
-      do 331 i1 = 1, min(istop,numx) 
-	if (okreal4(twh(idatoff+i1,iptwh)) ) then 
-            mdata(ilct(i1,row,iptwh)) = twh(idatoff+i1,iptwh)
-        else
-	    mdata(ilct(i1,row,iptwh)) = mhead(mblank,iptwh)
-        endif
-331	continue
-c     Place values into row of matrix
-c
-      do 332 i1 = min(istop,numx)+1, numx
-	    mdata(ilct(i1,row,iptwh)) = mhead(mblank,iptwh)
-332	    continue
-c     Blank out any unused part of row.   
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     PUTCOL
-c------------------------------------------------------------------------
-340   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'PUTCOL')
-c
-      col = nint(v(sp))
-      sp = sp - 1
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      istop = nint(dtwh(c12spn,iptwh) + dtwh(c12ni,iptwh)) - 1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'PUTCOL')
-c     Make sure that data exists in matrix 0
-c
-      if (istop .eq. 0) call oerror(n252, m2, 'PUTCOL')
-c
-      if (col .le. 0 .or. col .gt. numx )
-     .				call oerror(n112, m2, 'PUTCOL')
-c
-      if (istop .gt. numy ) then
-	write(stch,'(i5)',iostat=ierr) numy
-	call oerror(n267, n0, 'PUTCOL: Using the first ' // stch(1:5) // 
-     .				' values in Array 0')
-      else if (istop .lt. numy ) then
-	write(stch,'(i5)',iostat=ierr) istop
-	call oerror(n267, n0, 'PUTCOL: Setting the first ' // stch(1:5) // 
-     .				' in the column of Matrix 0')
-      endif
-c     Do the proper things if the matrix is bigger than the array and
-c     vice-versa.
-c
-      do 341 i1 = 1, min(istop,numy) 
-	if (okreal4(twh(idatoff+i1,iptwh)) ) then 
-            mdata(ilct(col,i1,iptwh)) = twh(idatoff+i1,iptwh)
-        else
-	    mdata(ilct(col,i1,iptwh)) = mhead(mblank,iptwh)
-        endif
-341	continue
-c     Place values into column of matrix
-c
-      do 342 i1 = min(istop,numy)+1, numy
-	    mdata(ilct(col,i1,iptwh)) = mhead(mblank,iptwh)
-342	    continue
-c     Blank out any unused part of column.   
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     GETROW
-c------------------------------------------------------------------------
-350   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'GETROW')
-c
-      row = nint(v(sp))
-      sp = sp - 1
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      istop = nint(dtwh(c12spn,iptwh) + dtwh(c12ni,iptwh)) - 1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'GETROW')
-c     Make sure that data exists in matrix 0
-c
-      if (istop .eq. 0) call oerror(n252, m2, 'GETROW')
-c
-      if (row .le. 0 .or. row .gt. numy )
-     .				call oerror(n112, m2, 'GETROW')
-c
-      if (istop .gt. numx ) then
-	write(stch,'(i5)',iostat=ierr) numx
-	call oerror(n267, n0, 'GETROW: Setting the first ' // stch(1:5) // 
-     .				' values in Array 0')
-      else if (istop .lt. numx ) then
-	write(stch,'(i5)',iostat=ierr) istop
-	call oerror(n267, n0, 'GETROW: Using the first ' // stch(1:5) // 
-     .				' in the row of Matrix 0')
-      endif
-c     Do the proper things if the matrix is bigger than the array and
-c     vice-versa.
-c
-      undef0 = sngl(mhead(mblank,iptwh))
-      do 351 i1 = 1, min(istop,numx) 
-	value = mdata(ilct(i1,row,iptwh))
-	if (value .ne. undef0 ) then
-	    twh(idatoff+i1,iptwh) = value
-	else
-	    twh(idatoff+i1,iptwh) = rinfinity()
-        endif
-351	continue
-c     Place values into row of matrix
-c
-      do 352 i1 = min(istop,numx)+1, istop
-	    twh(idatoff+i1,iptwh) = rinfinity()
-352	    continue
-c     Blank out any unused part of row.   
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c     GETCOL
-c------------------------------------------------------------------------
-360   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'GETCOL')
-c
-      col = nint(v(sp))
-      sp = sp - 1
-c
-      istart = long(iptwh-is1)*mdatasize/mnumarrays + l1
-      istop = nint(dtwh(c12spn,iptwh) + dtwh(c12ni,iptwh)) - 1
-      numx = nint(mhead(mnaxis1,iptwh))
-      numy = nint(mhead(mnaxis2,iptwh))
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numx*numy .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'GETCOL')
-c     Make sure that data exists in matrix 0
-c
-      if (istop .eq. 0) call oerror(n252, m2, 'GETCOL')
-c
-      if (col .le. 0 .or. col .gt. numx )
-     .				call oerror(n112, m2, 'GETCOL')
-c
-      if (istop .gt. numy ) then
-	write(stch,'(i5)',iostat=ierr) numy
-	call oerror(n267, n0, 'GETCOL: Setting the first ' // stch(1:5) // 
-     .				' values in Array 0')
-      else if (istop .lt. numy ) then
-	write(stch,'(i5)',iostat=ierr) istop
-	call oerror(n267, n0, 'GETCOL: Using the first ' // stch(1:5) // 
-     . 				' in the row of Matrix 0')
-      endif
-c     Do the proper things if the matrix is bigger than the array and
-c     vice-versa.
-c
-      undef0 = sngl(mhead(mblank,iptwh))
-      do 361 i1 = 1, min(istop,numy) 
-	value = mdata(ilct(col,i1,iptwh))
-	if (value .ne. undef0 ) then
-	    twh(idatoff+i1,iptwh) = value
-	else
-	    twh(idatoff+i1,iptwh) = rinfinity()
-        endif
-361	continue
-c     Place values into row of matrix
-c
-      do 362 i1 = min(istop,numy)+1, istop
-	    twh(idatoff+i1,iptwh) = rinfinity()
-362	    continue
-c     Blank out any unused part of row.   
-c
-      goto 99
-c
-
-c------------------------------------------------------------------------
-c		MPLUS
-c------------------------------------------------------------------------
- 370  continue
-      istart = long(n1-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,n1))
-      numy = nint(mhead(mnaxis2,n1))
-      numtot = numx * numy
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numtot .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MPLUS')
-C     		Make sure matrix 0 has been initialized.
-      istart1 = long(n2-is1)*mdatasize/mnumarrays + l1
-      numx1 = nint(mhead(mnaxis1,n2))
-      numy1 = nint(mhead(mnaxis2,n2))
-      numtot1 = numx1 * numy1
-c
-      if (istart1.le. 0 .or. istart1.gt. mdatasize .or. numx1.le. 0 .or.
-     .	  numy1.le. 0 .or. numtot1 .gt. mdatasize/mnumarrays) 
-     .		call oerror(n274, m2, 'MPLUS')
-C     		Make sure matrix 1 has been initialized.
-      if (numtot .ne. numtot1 .or. numx .ne. numx1 .or.
-     .    numy .ne. numy1) call oerror(n275, m2, 'MPLUS')
-c 		Make sure they have the same shape
-      undef0 = mhead(mblank, n1)
-      undef1 = mhead(mblank, n2)
-      do 375 i = 1, numtot
-         value0 = mdata(i+istart-1)
-         value1 = mdata(i+istart1-1)
-         if (value0 .ne. undef0 .and. value1 .ne. undef1) then
-            mdata(i+istart-1) = value0 + value1
-         else if (defmode .ge. 0.5 .and. value1 .ne. undef1) then
-            mdata(i+istart-1) = value1
-         else if (defmode .lt. 0.5) then
-            mdata(i+istart-1) = undef0
-         endif
- 375  continue
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c		MMINUS
-c------------------------------------------------------------------------
- 380  continue
-      istart = long(n1-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,n1))
-      numy = nint(mhead(mnaxis2,n1))
-      numtot = numx * numy
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numtot .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MMINUS')
-C     		Make sure matrix 0 has been initialized.
-      istart1 = long(n2-is1)*mdatasize/mnumarrays + l1
-      numx1 = nint(mhead(mnaxis1,n2))
-      numy1 = nint(mhead(mnaxis2,n2))
-      numtot1 = numx1 * numy1
-c
-      if (istart1.le. 0 .or. istart1.gt. mdatasize .or. numx1.le. 0 .or.
-     .	  numy1.le. 0 .or. numtot1 .gt. mdatasize/mnumarrays) 
-     .		call oerror(n274, m2, 'MMINUS')
-C     		Make sure matrix 1 has been initialized.
-      if (numtot .ne. numtot1 .or. numx .ne. numx1 .or.
-     .    numy .ne. numy1) call oerror(n275, m2, 'MPLUS')
-c 		Make sure they have the same shape
-      undef0 = mhead(mblank, n1)
-      undef1 = mhead(mblank, n2)
-      do 385 i = 1, numtot
-         value0 = mdata(i+istart-1)
-         value1 = mdata(i+istart1-1)
-         if (value0 .ne. undef0 .and. value1 .ne. undef1) then
-            mdata(i+istart-1) = value0 - value1
-         else if (defmode .ge. 0.5 .and. value1 .ne. undef1) then
-            mdata(i+istart-1) = - value1
-         else if (defmode .lt. 0.5) then
-            mdata(i+istart-1) = undef0
-         endif
- 385  continue
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c		MMULTIPLY
-c------------------------------------------------------------------------
- 390  continue
-      istart = long(n1-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,n1))
-      numy = nint(mhead(mnaxis2,n1))
-      numtot = numx * numy
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numtot .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MMULTIPLY')
-C     		Make sure matrix 0 has been initialized.
-      istart1 = long(n2-is1)*mdatasize/mnumarrays + l1
-      numx1 = nint(mhead(mnaxis1,n2))
-      numy1 = nint(mhead(mnaxis2,n2))
-      numtot1 = numx1 * numy1
-c
-      if (istart1.le. 0 .or. istart1.gt. mdatasize .or. numx1.le. 0 .or.
-     .	  numy1.le. 0 .or. numtot1 .gt. mdatasize/mnumarrays) 
-     .		call oerror(n274, m2, 'MMULTIPLY')
-C     		Make sure matrix 1 has been initialized.
-      if (numtot .ne. numtot1 .or. numx .ne. numx1 .or.
-     .    numy .ne. numy1) call oerror(n275, m2, 'MPLUS')
-c 		Make sure they have the same shape
-      undef0 = mhead(mblank, n1)
-      undef1 = mhead(mblank, n2)
-      do 395 i = 1, numtot
-         value0 = mdata(i+istart-1)
-         value1 = mdata(i+istart1-1)
-         if (value0 .ne. undef0 .and. value1 .ne. undef1) then
-            mdata(i+istart-1) = value0 * value1
-         else if (defmode .ge. 0.5 .and. value1 .ne. undef1) then
-            mdata(i+istart-1) = value1
-         else if (defmode .lt. 0.5) then
-            mdata(i+istart-1) = undef0
-         endif
- 395  continue
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c		MDIVIDE
-c------------------------------------------------------------------------
- 400  continue
-      istart = long(n1-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,n1))
-      numy = nint(mhead(mnaxis2,n1))
-      numtot = numx * numy
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numtot .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MDIVIDE')
-C     		Make sure matrix 0 has been initialized.
-      istart1 = long(n2-is1)*mdatasize/mnumarrays + l1
-      numx1 = nint(mhead(mnaxis1,n2))
-      numy1 = nint(mhead(mnaxis2,n2))
-      numtot1 = numx1 * numy1
-c
-      if (istart1.le. 0 .or. istart1.gt. mdatasize .or. numx1.le. 0 .or.
-     .	  numy1.le. 0 .or. numtot1 .gt. mdatasize/mnumarrays) 
-     .		call oerror(n274, m2, 'MDIVIDE')
-C     		Make sure matrix 1 has been initialized.
-      if (numtot .ne. numtot1 .or. numx .ne. numx1 .or.
-     .    numy .ne. numy1) call oerror(n275, m2, 'MPLUS')
-c 		Make sure they have the same shape
-      undef0 = mhead(mblank, n1)
-      undef1 = mhead(mblank, n2)
-      do 405 i = 1, numtot
-         value0 = mdata(i+istart-1)
-         value1 = mdata(i+istart1-1)
-         if (value0 .ne. undef0 .and. value1 .ne. undef1) then
-            if (value1 .ne. 0.0) then
-               mdata(i+istart-1) = value0 / value1
-            else
-               mdata(i+istart-1) = undef0
-            endif
-         else if (defmode .ge. 0.5 .and. value1 .ne. undef1) then
-            if (value1 .ne. 0.0) then
-               mdata(i+istart-1) = 1.0 / value1
-            else
-               mdata(i+istart-1) = undef0
-            endif
-         else if (defmode .lt. 0.5) then
-            mdata(i+istart-1) = undef0
-         endif
- 405  continue
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c		MSCALE
-c------------------------------------------------------------------------
- 410  continue
-      if (sp .lt. 1) call oerror(n112, m1, 'MSCALE: One needed')
-c
-      sfact = v(sp)
-      sp = sp - 1
-c
-      istart = long(n1-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,n1))
-      numy = nint(mhead(mnaxis2,n1))
-      numtot = numx * numy
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numtot .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MSCALE')
-C     		Make sure matrix 0 has been initialized.
-      undef0 = mhead(mblank, n1)
-      do 415 i = 1, numtot
-         if (mdata(i+istart-1) .ne. undef0) then
-            mdata(i+istart-1) = mdata(i+istart-1) * sfact
-         endif
- 415  continue
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-c		MBIAS
-c------------------------------------------------------------------------
- 420  continue
-      if (sp .lt. 1) call oerror(n112, m1, 'MBIAS: One needed')
-c
-      sfact = v(sp)
-      sp = sp - 1
-c
-      istart = long(n1-is1)*mdatasize/mnumarrays + l1
-      numx = nint(mhead(mnaxis1,n1))
-      numy = nint(mhead(mnaxis2,n1))
-      numtot = numx * numy
-c
-      if (istart .le. 0 .or. istart .gt. mdatasize .or. numx .le. 0 .or.
-     .	  numy .le. 0 .or. numtot .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MBIAS')
-C     		Make sure matrix 0 has been initialized.
-      undef0 = mhead(mblank, n1)
-      do 425 i = 1, numtot
-         if (mdata(i+istart-1) .ne. undef0) then
-            mdata(i+istart-1) = mdata(i+istart-1) + sfact
-         endif
- 425  continue
-c
-      goto 99
-c
-c------------------------------------------------------------------------
-98    continue
-      call place(n0, n780 - n25*(inline-n1))
-      call pchar('',n0)
-99    continue
-      RETURN
-      END
-c
diff -uNr 3.5/source/conline/condar/au6.F unipops-3.6/source/conline/condar/au6.F
--- 3.5/source/conline/condar/au6.F	2000-03-16 11:36:27.000000000 -0700
+++ unipops-3.6/source/conline/condar/au6.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,486 +0,0 @@
-      SUBROUTINE AU6 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au6.F	5.4 04/14/96
-C-------------------------------------------------------------------------------
-c
-c      au6 - Gmodel, Gparts, Residual, Gdisplay, Gauss
-c
-C---------------------------------------------------------------------
-c
-      integer*2 mmax
-      parameter (mmax=80)
-      integer*2 j, iptwh, i, istrt, istp, jj,  sclc,
-     .          kount, ierr, ix, iystrt, iy, ier,  ipixel, lxa1
-      integer*2 m2, m3, n0, n1, n80, n120, n225, n289, n290, n298
-      integer*2 n25, n780, n272, n295, n282, n33
-      logical isfirst, okarray, okreal4
-      REAL hw, cnt, s, ajj,covar(mmax,mmax),lcoef(mmax),
-     .	   alph(mmax,mmax), chisq, alamda, alamda1, chisq1, constant
-      real*8 chantox
-      integer*4 ndata, ma, mfit, nca, mhold, lista(mmax)
-c
-      external fgauss
-      external fgauss0
-c
-      parameter (constant = 2.35482004504)
-c     Conversion factor from rms width to FWHM
-c
-      include 'core.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      INCLUDE 'cio.inc'
-      INCLUDE 'rip.inc'
-c
-      data m2, m3, n0, n1, n80, n120, n225, n272, n289, n290, n295,
-     .     n282, n298
-     .    /-2, -3, 0, 1, 80, 120, 225, 272, 289, 290, 295, 282, 298/
-      data n25, n780, n33 /25, 780, 33/
-C
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-C
-C=======================================================================
-c
-      IPTWH=1
-      iystrt = iym - sclchar*60
-c
-      ING=nint(NGAUSS)
-c
-      JJ=J
-      GO TO (161,163,164,165,170), JJ
-      call oerror(n120, m3, 'AU6')
-C--------------------------------------------------------------------
-C							 GMODEL
-C--------------------------------------------------------------------
- 161  CONTINUE
-      if (ing.lt.1 .or. ing.gt.2*maxmrk) call oerror(n289,m2,'GMODEL')
-      do 179 i = 1, ing
-	if(hwidth(i).le.0.) call oerror(n290, m2, 'GMODEL')
-179	continue
-c
-      ISTRT = DTWH(C12SPN,IPTWH)
-      ISTP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH) - 1
-c
-      if (istrt .ge. istp) call oerror(n225, m2, 'GMODEL')
-c
-      DO 60 I=ISTRT,ISTP
-         S=0.0
-         DO 61 JJ=1,ING
-            S=S+HEIGHT(JJ)*EXP(max(-85., 
-     .             -2.772*((float(i)-center(jj))/HWIDTH(JJ))**2))
-   61       CONTINUE
-         TWH(I+idatoff,IPTWH)=S
-   60    CONTINUE
-c
-      GO TO 99
-C------------------------------------------------------------------
-C							GPARTS
-C--------------------------------------------------------------------
-  163 CONTINUE
-      if (showplot(numplots) .ne. 0) call oerror(n289, m2, 'GPARTS')
-      if (ing.lt.1 .or. ing.gt.2*maxmrk) call oerror(n289,m2,'GPARTS')
-      do 209 i = 1, ing
-	if(hwidth(i).le.0.)  call oerror(n290, m2, 'GPARTS')
-209	continue
-c
-c
-      ISTRT = DTWH(C12SPN,IPTWH)
-      ISTP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH) - 1
-c
-      if (istrt .ge. istp) call oerror(n225, m2, 'GPARTS')
-c
-      lxa1 = lxa
-      if (.not. okarray(lxa, dtwh(1,iptwh)) ) then
-         call oerror(n272, n0, 
-     .		'GPARTS: Units of X-axis will be channels or samples')
-	 lxa1 = 1
-      endif
-c
-      if (slabel .gt. 0.0) then
-	 if (sclchar .ne. 1.) call charsize(sclchar)
-         DO 1650 I=1,ING
-	    cnt = chantox(lxa1, dtwh(1,iptwh), center(i), ierr)
-	    hw=dabs(chantox(lxa1,dtwh(1,iptwh),center(i)+hwidth(i)/2,ierr)
-     .       - chantox(lxa1,dtwh(1,iptwh),center(i)-hwidth(i)/2,ierr) )
-            WRITE (CPUF,9601,IOSTAT=IER) HEIGHT(I), HW,  CNT
-	    call place(ix0,iystrt - (i-n1)*sclc(n25))
-	    call pchar(ipuf, n80)
- 1650       CONTINUE
-c
-         WRITE (CPUF,9603,IOSTAT=IER) SUMSQ
-         call place(ix0,iystrt - ing*sclc(n25))
-	 call pchar(ipuf, n80)
-	 if (sclchar .ne. 1.) call charsize(1.)
-      endif
-c
-      DO 171 I = 1,ING
-         isfirst = .true.
-         DO 172 ix = ix0, ixm, 2
-	    ajj = (float(ix)-bx(numplots)) / ax(numplots)
-            S=HEIGHT(I)*EXP(max(-85.,
-     .                -2.772*((ajj-center(i))/HWIDTH(I))**2))
-            IY=min(max(iy0,nint(AY(numplots)*s+BY(numplots))), iym)
-            if (nint(ajj) .ge. isbg) then
-               if (isfirst) then
-	          call placewp(ix, iy, n33)
-                  isfirst = .false.
-               else
-	          CALL vctrwp(IX, IY, n33, sclchar, 0.)
-               endif
-	    endif
-  172    continue
-  171 CONTINUE
-c
-      call place(n0,n780 - n25*(inline-n1))
-      call pchar('',n0)
-c
-      GO TO 99
-C--------------------------------------------------------------------
-C							RESIDUAL
-C--------------------------------------------------------------------
-  164 CONTINUE
-      if (ing .lt. 1 .or. ing .gt. 2*maxmrk) 
-     .		call oerror(n289,m2,'RESIDUAL')
-      do 189 i = 1, ing
-	if(hwidth(i).le.0.) call oerror(n290, m2, 'RESIDUAL')
-189	continue
-c
-      ISTRT = DTWH(C12SPN,IPTWH)
-      ISTP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH) - 1
-c
-      if (istrt .ge. istp) call oerror(n225, m2, 'RESIDUAL')
-c
-      DO 181 I = ISTRT,ISTP
-         S=0.0
-         DO 182 JJ = 1,ING
-            S=S+HEIGHT(JJ)*EXP(max(-85.,
-     .          -2.772*((float(i)-center(jj))/HWIDTH(JJ))**2))
-  182       CONTINUE
-         if (okreal4(TWH(I+idatoff,IPTWH)))
-     .		TWH(I+idatoff,IPTWH)=TWH(I+idatoff,IPTWH)-S
- 181     continue
-c
-      GO TO 99
-C-------------------------------------------------------------------
-C                                     GDISPLAY
-C-------------------------------------------------------------------
-  165 CONTINUE
-      if (showplot(numplots) .ne. 0) call oerror(n298, m2, 'GDISPLAY')
-      if (ing .lt. 1 .or. ing .gt. 2*maxmrk) 
-     .		call oerror(n289,m2,'GDISPLAY')
-      do 199 i = 1, ing
-	if(hwidth(i).le.0.) call oerror(n290, m2, 'GDISPLAY')
-199	continue
-c
-c
-      ISTRT = DTWH(C12SPN,IPTWH)
-      ISTP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH) - 1
-c
-      if (istrt .ge. istp) call oerror(n225, m2, 'GDISPLAY')
-c
-      lxa1 = lxa
-      if (.not. okarray(lxa, dtwh(1,iptwh)) ) then
-         call oerror(n272, n0, 
-     .		'GDISPLAY: Units of X-axis will be channels or samples')
-	 lxa1 = 1
-      endif
-c
-      if (slabel .gt. 0.0) then
-	 if (sclchar .ne. 1.) call charsize(sclchar)
-         DO 1654 I=1,ING
-	    cnt = chantox(lxa1, dtwh(1,iptwh), center(i), ierr)
-	    hw=dabs(chantox(lxa1,dtwh(1,iptwh),center(i)+hwidth(i)/2,ierr)
-     .	     - chantox(lxa1,dtwh(1,iptwh),center(i)-hwidth(i)/2,ierr) )
-            WRITE (CPUF,9601,IOSTAT=IER) HEIGHT(I), HW,  CNT
-	    call place(ix0,iystrt - (i-n1)*sclc(n25))
-	    call pchar(ipuf, n80)
- 1654    CONTINUE
-c
-         WRITE (CPUF,9603,IOSTAT=IER) SUMSQ
-         call place(ix0,iystrt - ing*sclc(n25))
-	 call pchar(ipuf, n80)
-	 if (sclchar .ne. 1.) call charsize(1.)
-      endif
-c
-      isfirst = .true.
-      DO 1651 ix = ix0, ixm, 2
-	 ajj = (float(ix)-bx(numplots)) / ax(numplots)
-         S=0.0
-	 DO 1652 JJ=1,ING
-	    S=S+HEIGHT(JJ)*EXP(max(-85.,
-     .               -2.772*((ajj-center(jj))/HWIDTH(JJ))**2))
- 1652       CONTINUE
-         IY=min(max(iy0,nint(AY(numplots)*s+BY(numplots))), iym)
-         if (nint(ajj) .ge. isbg) then
-            if (isfirst) then
-	       call placewp(ix, iy, n33)
-               isfirst = .false.
-            else
-	       CALL vctrwp(IX, IY, n33, sclchar, 0.)
-            endif
-	 endif
- 1651 CONTINUE
-c
-      call place(n0,n780 - n25*(inline-n1))
-      call pchar('',n0)
-c
-      GO TO 99
-C
-C---------------------------------------------------------------------
-C							 GAUSS
-C---------------------------------------------------------------------
-  170 CONTINUE
-c
-      if (dtwh(c12ni,iptwh) .le. 0) call oerror(n225, m2, 'GAUSS')
-c
-      if (ing .lt. 1 .or. ing .gt. 2*maxmrk) 
-     .		call oerror(n289,m2,'GAUSS')
-c
-      if (fixc .gt. 0. .and. fixhw .gt. 0. .and. fixh .gt. 0.) 
-     .	call oerror(n295, m2, 'FIXH, FIXC, and FIXHW cannot all be TRUE')
-      if (fixc .gt. 0. .and. fixrelc .gt. 0.) 
-     .	call oerror(n295, m2, 'FIXC and FIXRELC cannot both be TRUE')
-      if (fixh .gt. 0. .and. fixrelh .gt. 0.) 
-     .	call oerror(n295, m2, 'FIXH and FIXRELH cannot both be TRUE')
-      if (fixhw .gt. 0. .and. fixrelhw .gt. 0.) 
-     .	call oerror(n295, m2, 'FIXHW and FIXRELHW cannot both be TRUE')
-c
-      do 1729 i = 1, ing
-	if (hwidth(i) .le. 0.) call oerror(n290, m2, 'GAUSS')
-	if (ing .gt. 0 .and. fixrelh .gt. 0 .and. height(i) .eq. 0.) 
-     .		call oerror(n295, m2, 'HEIGHT cannot = 0 if FIXRELH is TRUE')
-	do 1719 j = i+1, ing
-	   if (center(i) .eq. center(j) .and. hwidth(i) .eq. hwidth(j))
-     .		call oerror(n295, m2, 
-     .			'Two CENTER''s and two HWIDTH''s are equal')
-1719	   continue
-1729	continue
-c	Check input parameters for errors.
-c
-      call gprep(ierr)
-      if (ierr .ne. 0) call oerror(ierr, m2, 'GAUSS')
-c
-      ndata = ibase
-      nca = mmax
-      ma = 3*ing + 3
-      do 173 i = 1, ndata
-	work(i) = 1.
-	xdata(i) = xdata(i) - idatoff
-173	continue
-c	Work willbe used to hold SIGMA of the data points all of whicg are 1.
-c	XDATA is created by GPREP with respect to start of TWH instead of in
-c	channel number -- convert XDATA back to channel number. 
-c
-      coef(1) = 1.
-      coef(2) = 0.
-      coef(3) = 1.
-      do 174 i = 1, ing
-	if (fixh .gt. 0. .or. fixrelh .gt. 0.) then
-	   coef(3*i+1) = height(i)
-	else
-	   if (center(i) .lt. 1 .or. 
-     .         center(i) .gt. (dtwh(c12ni,iptwh)+dtwh(c12spn,iptwh)-1))
-     .		call oerror(n295, m3, 'CENTER is out of range of data array')
-	   coef(3*i+1) = twh(center(i)+idatoff,iptwh)
-	endif
-	coef(3*i+2) = center(i)
-	coef(3*i+3) = hwidth(i) / constant
-174	continue
-c     Set up initial guess in COEF; use HEIGHT if FIXH or FIXRELH, else use the 
-c	value of the data at the designated channel.  COEF is in RIP.INC
-c	COEF(1-3) = H0, X0, S0
-c	COEF(4-6) = HEIGHT(1), CENTER(1), HWIDTH(1) {in units of std};
-c	COEF(7-9) = HEIGHT(2), CENTER(2), HWIDTH(2) {in units of std}; etc
-c
-c
-c--------------------
-      if (ing .gt. 1 .and. fixrelh .gt. 0 .and. fixc .gt. 0. .and. 
-     .    fixhw .gt. 0.) then
-c	Fitting linear case of just H0
-	ma = 1
-	mfit = 1
-	lista(1) = 1
-        if (mfit .ge. ndata) 
-     .		call oerror(n295, m3, 'Too few data points')
-	call lfit(xdata, ydata, work, ndata, lcoef, ma, lista, mfit, 
-     .			 covar, nca, chisq, fgauss0)
-	do 177 i = 1, ing
-	  height(i) = lcoef(1)*coef(3*i+1)
-	  hghterr(i) = coef(3*i+1) * sqrt(covar(1,1))
-	  cnterr(i) = 0.0
-	  hwerr(i) = 0.0
-177	  continue
-c--------------------
-      else if (fixc .gt. 0. .and. fixhw .gt. 0.) then
-c	Fitting height(s) of Gaussians only
-	do 178 i = 1, ing
-	  lista(i) = i
-178	  continue
-	ma = ing
-	mfit = ing
-        if (mfit .ge. ndata) 
-     .		call oerror(n295, m3, 'Too few data points')
-	call lfit(xdata, ydata, work, ndata, lcoef, ma, lista, mfit, 
-     .			 covar, nca, chisq, fgauss0)
-	do 1799 i = 1, ing
-	  height(i) = lcoef(i)*coef(1)*coef(3*i+1)
-	  hghterr(i) = coef(1)*coef(3*i+1) * sqrt(covar(i,i))
-	  cnterr(i) = 0.0
-	  hwerr(i) = 0.0
-1799	  continue
-c--------------------
-      else
-c	Non-linear case
-c
-c     LISTA indicates which COEF parameters are to be varied and which are to
-c     be help constant.  The first MFIT numbers in COEF correspond to the indices
-c     in COEF of what is to be varied.  The remaining MA-MFIT values in COEF are
-c     those things that do not vary.
-c
-        mfit = 0
-	if (ing .eq. 1) then
-	   if (fixh .le. 0) then
-	     mfit = mfit + 1
-	     lista(mfit) = 4
-	   endif
-	   if (fixc .le. 0) then
-	     mfit = mfit + 1
-	     lista(mfit) = 5
-	   endif
-	   if (fixhw .le. 0) then
-	     mfit = mfit + 1
-	     lista(mfit) = 6
-	   endif
-	else
-	   do 175 i = 1, ing
-              if (fixh .le. 0. .and. fixrelh .le. 0) then
-	        mfit = mfit + 1
-	        lista(mfit) = 3*i + 1
-	      endif
-             if (fixc .le. 0. .and. fixrelc .le. 0) then
-	        mfit = mfit + 1
-	        lista(mfit) = 3*i + 2
-	      endif
-              if (fixhw .le. 0. .and. fixrelhw .le. 0) then
-	        mfit = mfit + 1
-	        lista(mfit) = 3*i + 3
-	      endif
-175	      continue
-           if (fixrelh .gt. 0) then
-	     mfit = mfit + 1
-	     lista(mfit) = 1
-           endif
-           if (fixrelc .gt. 0) then
-	     mfit = mfit + 1
-	     lista(mfit) = 2
-           endif
-           if (fixrelhw .gt. 0) then
-	     mfit = mfit + 1
-	     lista(mfit) = 3
-           endif
-	endif
-c
-        mhold = mfit
-	if (ing .eq. 1) then
-	   lista(mhold+1) = 1
-	   lista(mhold+2) = 2
-	   lista(mhold+3) = 3
-	   mhold = mhold + 3
-	   if (fixh .gt. 0) then
-	     mhold = mhold + 1
-	     lista(mhold) = 4
-	   endif
-	   if (fixc .gt. 0) then
-	     mhold = mhold + 1
-	     lista(mhold) = 5
-	   endif
-	   if (fixhw .gt. 0) then
-	     mhold = mhold + 1
-	     lista(mhold) = 6
-	   endif
-	else
-	   do 1759 i = 1, ing
-              if (fixh .gt. 0. .or. fixrelh .gt. 0) then
-	        mhold = mhold + 1
-	        lista(mhold) = 3*i + 1
-	      endif
-             if (fixc .gt. 0. .or. fixrelc .gt. 0) then
-	        mhold = mhold + 1
-	        lista(mhold) = 3*i + 2
-	      endif
-              if (fixhw .gt. 0. .or. fixrelhw .gt. 0) then
-	        mhold = mhold + 1
-	        lista(mhold) = 3*i + 3
-	      endif
-1759	      continue
-           if (fixrelh .le. 0) then
-	     mhold = mhold + 1
-	     lista(mhold) = 1
-           endif
-           if (fixrelc .le. 0) then
-	     mhold = mhold + 1
-	     lista(mhold) = 2
-           endif
-           if (fixrelhw .le. 0) then
-	     mhold = mhold + 1
-	     lista(mhold) = 3
-           endif
-	endif
-c
-        if (mhold .ne. ma) call oerror(n120, m3, 'GAUSS')
-        if (mfit .ge. ndata) 
-     .		call oerror(n295, m3, 'Too few data points')
-c
-	alamda = -1.
-	kount = 0
-        call mrqmin(xdata, ydata, work, ndata, coef, ma, lista, mfit, 
-     .	                 covar, alph, nca, chisq, fgauss, alamda)
-c	
-180     chisq1 = chisq
-	alamda1 = alamda
-        kount = kount + 1
-	if (kount .le. niter) then
-	   call mrqmin(xdata, ydata, work, ndata, coef, ma, lista, mfit, 
-     .	                 covar, alph, nca, chisq, fgauss, alamda)
-	   if (alamda .gt. alamda1 .or. 
-     .         abs(1.-chisq1/chisq) .gt. 0.001) goto 180
-	else
-	   call oerror(n282, n0, 'GAUSS')
-	endif
-	alamda = 0.
-        call mrqmin(xdata, ydata, work, ndata, coef, ma, lista, mfit, 
-     .	                 covar, alph, nca, chisq, fgauss, alamda)
-c
-      sumsq=sqrt(chisq/(ibase-mfit))
-c
-        do 185 i = 1, ing
-	    j = 3*i + 1
-	    height(i) = coef(j) * coef(1)
-	    center(i) = coef(j+1) + coef(2)
-	    hwidth(i) = coef(j+2) * coef(3) * constant
-c	    calculate results
-c
-	    hghterr(i) = height(i) * sqrt( covar(1,1)/(coef(1)**2) + 
-     .			covar(j,j)/(coef(j)**2) + 
-     .			2.*covar(1,j)/(coef(1)*coef(j)) ) * sumsq
-c
-            cnterr(i) = sqrt( covar(2,2) + covar(j+1,j+1) + 
-     .			2.*covar(2,j+1) ) * sumsq
-c
-	    hwerr(i) = hwidth(i) * sqrt( covar(3,3)/(coef(3)**2) + 
-     .			covar(j+2,j+2)/(coef(j+2)**2) + 
-     .			2.*covar(3,j+2)/(coef(3)*coef(j+2)) ) * sumsq
-
-c	    Calculates errors
-c
-185         continue
-      endif
-c
-      GO TO 99
-C-----------------------------------------------------------------------
- 99   CONTINUE
-      RETURN
-C-----------------------------------------------------------------------
- 9601 FORMAT (F9.4,F9.4,F9.4)
- 9603 FORMAT (F14.5)
-C-----------------------------------------------------------------------
-      END
diff -uNr 3.5/source/conline/condar/au7.f unipops-3.6/source/conline/condar/au7.f
--- 3.5/source/conline/condar/au7.f	2000-03-16 11:36:29.000000000 -0700
+++ unipops-3.6/source/conline/condar/au7.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,127 +0,0 @@
-      SUBROUTINE AU7 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au7.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     au7 - FFT, IFFT, Powspec
-c
-C-----------------------------------------------------------------------
-c
-      integer*2 j, m2, m3, n2, n120, n225, n288, n268
-      integer*4 jj, iptwh, iwork, itemp, jcnt, in, i, it , ISTART,
-     .		ISTOP, ISTT, ISPT, inn
-      real rinfinity
-      logical okreal4
-      logical*4 invers
-c
-      include 'core.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      include 'cio.inc'
-c
-      DATA IWORK/1/, ITEMP/2/
-c
-      data m2, m3, n2, n120, n225, n288, n268
-     .    /-2, -3, 2, 120, 225, 288, 268/
-C
-C=======================================================================
-C
-      IPTWH=1
-c
-      JJ=J
-      GO TO (10,10,20), JJ
-      call oerror(n120, m3, 'AU7')
-C-----------------------------------------------------------------------
-C					 FFT, IFFT	  
-C-----------------------------------------------------------------------
-   10 CONTINUE
-      if (bdrop.lt.0. .or. edrop.lt.0. .or.
-     .    bdrop+edrop.gt.dtwh(c12ni,iptwh)) 
-     .		call oerror(n288,m2,'FFT/IFFT')
-c
-      ISTART = DTWH(C12SPN,IPTWH) + IDATOFF + BDROP
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH)
-     .        + IDATOFF - 1 - EDROP
-c
-      if (istart.ge.istop) call oerror(n225, m2, 'FFT/IFFT')
-c
-      if (jj .eq. 1) then
-	 invers = .false.
-	 in = (istop - istart + 1)
-         DO 15 I = 1,IN
-	    if (.not. okreal4(twh(istart+i-1,iwork)))
-     .		call oerror(n268, m2, "FFT/IFFT: Cannot proceed")
-	    xdata(i) = twh(istart+i-1,iwork)
-            YDATA(I)=0.0
-   15       CONTINUE
-      ELSE
-	 invers = .true.
-         ISTT = DTWH(c12SPN,ITEMP) + IDATOFF + BDROP
-         ISPT = DTWH(c12SPN,ITEMP) + DTWH(c12NI,ITEMP)
-     .          + IDATOFF - 1 - EDROP
-         if (istt.ge.ispt) call oerror(n288, m2, 'FFT/IFFT')
-c
-         IN = min(ISTOP-ISTART, ispt-istt) + 1
-         DO 335 I = 1,IN
-	    if (.not. okreal4(twh(istart+i-1,iwork)) .or. 
-     .		.not. okreal4(twh(istt+i-1,itemp)) ) 
-     .		call oerror(n268, m2, "FFT/IFFT: Cannot proceed")
-	    xdata(i) = twh(istart+i-1,iwork)
-	    ydata(i) = twh(istt+i-1,itemp)
-  335       CONTINUE
-      ENDIF
-c     Fill ydata with zeros if it is a fft, else fill it with what is in 
-c     array 2
-c
-      jCNT=0
-   16   jCNT=jCNT+1
-        IF (2**jcnt .lt. in) GO TO 16
-c
-      IF (2**jcnt .eq. in) THEN
-         CALL FFT(XDATA,YDATA,jCNT,INVERS)
-      ELSE
-         CALL DFT(XDATA,YDATA,IN,INVERS)
-      ENDIF
-c
-      inn = 2*in
-      call copy (idatoff*n2, itwh(1,iwork), itwh(1,itemp))
-      CALL COPY2 (INN,XDATA,TWH(ISTART,IWORK))
-      CALL COPY2 (INN,YDATA,TWH(ISTART,ITEMP))
-c
-      GO TO 99
-C----------------------------------------------------------------
-C                                POWSPEC    
-C----------------------------------------------------------------
-   20 CONTINUE
-      ISTART = DTWH(c12SPN,IWORK) + IDATOFF + BDROP
-      ISTOP = DTWH(c12SPN,IWORK) + DTWH(c12NI,IWORK)
-     .        + IDATOFF - 1 - EDROP
-      ISTT = DTWH(c12SPN,ITEMP) + IDATOFF + BDROP
-      ISPT = DTWH(c12SPN,ITEMP) + DTWH(c12NI,ITEMP)
-     .       + IDATOFF - 1 - EDROP
-c
-      if (istart.ge.istop) call oerror(n288, m2, 'POWSPEC')
-      if (istt.ge.ispt) call oerror(n288, m2, 'POWSPEC')
-c
-      DO 21 I = ISTART,ISTOP
-         IT = ISTT + I - istart
-	 if (it .le. ispt) then
-	   if (okreal4(twh(i,iwork)) .and. 
-     .	       okreal4(twh(it,itemp)) ) then
-	     TWH(I,IWORK) = TWH(I,IWORK)**2+TWH(IT,ITEMP)**2
-	   else if (defmode .ge. 0.5 .and. okreal4(twh(it,itemp))) then
-	     TWH(I,IWORK) = TWH(IT,ITEMP)**2
-	   else if (defmode .ge. 0.5 .and. okreal4(twh(i,iwork))) then
-	     TWH(I,IWORK) = TWH(i,iwork)**2
-	   else 
-	     TWH(I,IWORK) = rinfinity()
-	   endif
-	 endif
-   21    CONTINUE
-c
-      GO TO 99
-C
-C----------------------------------------------------------------
-   99 CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/conline/condar/au8.F unipops-3.6/source/conline/condar/au8.F
--- 3.5/source/conline/condar/au8.F	2000-03-16 11:36:30.000000000 -0700
+++ unipops-3.6/source/conline/condar/au8.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,378 +0,0 @@
-      SUBROUTINE AU8 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au8.F	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     au8 - Header, Table, Addstack, Delete, Empty, Sclear, Title,
-c            Doc, Thumb, Osb, Select
-c
-C---------------------------------------------------------------------
-C
-      real*8 source(2), dat, nrao12m, nrao140, nrao300, ctype(6), 
-     .       ctype2(8), dfreq, osb, b8, fshift
-      real*4 LST, sincr, sbscan, si, sescan, ra,
-     .       bw, scan, xcoord, ycoord, sa, se, decx, cosd, dco,
-     .       rrao, rdco, re, rao
-      integer*2 ier, j, iptwh, imon, iday, iyr
-      integer*4 isb, ih, im, is, k1, icor1, icdtype, jj, ian, ia, i
-      integer*2 m1, m2, m3, n0, n1, n2, n80, n90, n112, n120, n224,
-     .          n231, n239, n248, n281, n283
-#ifdef CONTINUUM
-      real*8 robsmode
-      character*8 obsmode
-#endif
-      character*100 cpuf
-      character*1 BSORCE(16)
-      integer*2 ipuf(50), rstrng(6), dstrng(6), lstrng(6)
-      integer*2 str1(4), str2(4)
-      logical okreal8
-c
-      INCLUDE 'cform.inc'
-      include 'core.inc'
-      INCLUDE 'appl.inc'
-      include 'stk.inc'
-c
-      EQUIVALENCE (CPUF,IPUF)
-      EQUIVALENCE (SOURCE,BSORCE)
-#ifdef CONTINUUM
-      equivalence (obsmode, robsmode)
-#endif
-c
-      save icor1
-c
-      DATA nrao12m/'NRAO 12M'/, nrao140/'NRAO 43M'/, nrao300/'NRAO 93M'/
-      data ctype/2*'        ','EPOCRADC','GALACTIC','AZEL    ',
-     .             'INDICATD'/
-      data ctype2/'1950RADC','EPOCRADC','MEANRADC','APPRADC','APPHADC',
-     2		  'USERDEF','2000RADC','INDRADC'/
-c
-      data icor1 /1/
-c
-      data m1, m2, m3, n0, n1, n2, n80, n90, n112, n120, n224,
-     .          n231, n239, n248, n281, n283
-     .     /-1, -2, -3, 0, 1, 2, 80, 90, 112, 120, 224, 231, 239,
-     .      248, 281, 283/
-      data osb /'OSB     '/, b8 /'        '/
-C
-C=======================================================================
-C
-      IPTWH = 1
-c
-      JJ=J
-      GO TO (10, 20, 80, 120,130,220,230,240,250,270, 280), JJ
-      call oerror(n120, m3, 'AU8')
-C---------------------------------------------------------------------
-C                                    HEADER
-C---------------------------------------------------------------------
-   10 CONTINUE
-      call header
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     TABLE    
-C-----------------------------------------------------------------------
-   20 CONTINUE
-      call table
-      GO TO 99
-C--------------------------------------------------------------------
-C                                      ADDSTACK
-C--------------------------------------------------------------------
-   80 CONTINUE
-      if (sp.lt.3) call oerror(n112, m1, 'ADDSTACK')
-c
-      sincr = v(sp)
-      sp=sp-1
-      sESCAN=V(SP)
-      SP=SP-1
-      sBSCAN=V(SP)
-      SP=SP-1
-      IF (sBSCAN.gt.sESCAN.or.sincr.lt.0.) 
-     .        call oerror(n231, m2, 'ADDSTACK')
-c
- 84   IAN=nint(ACOUNT)
-      if (ian .lt. 0 .or. ian .gt. maxstck) 
-     .      call oerror(n281, m2, 'ADDSTACK')
-      ian = ian + 1
-      DO 89 sI = sBSCAN,sESCAN,sINCR
-         if (ian.le.maxstck) then
-           ASTACK(IAN)=sI
-           ACOUNT=float(IAN)
-           IAN=IAN+1
-	 else
-           call oerror(n239, n0, 'ADDSTACK')
-	   goto 99
-	 endif
-  89     CONTINUE
-c
-      GO TO 99
-C-------------------------------------------------------------------------
-C     DELETE                                            
-C-----------------------------------------------------------------------
-  120 CONTINUE
-      IF (SP.lt.1) call oerror(n112, m1, 'DELETE')
-c
-      sBSCAN=V(SP)
-      SP=SP-1
-      IA=nint(ACOUNT)
-c
-      IF (IA.EQ.0) GO TO 99
-c
-      if (ia.lt.0 .or. ia.gt.maxstck) call oerror(n281, m2, 'DELETE')
-c
-      DO 124 I=1,IA
-         IF (ABS(ASTACK(I)).EQ.sBSCAN) GO TO 126
-  124    CONTINUE
-      GO TO 99
-c
-  126 IA=IA-1
-      DO 128 J=I,IA
-         ASTACK(J)=ASTACK(J+1)
-  128    CONTINUE
-      astack(ia+1) = 0.0
-      ACOUNT=ACOUNT-1.0
-c
-      GO TO 99
-C-------------------------------------------------------------------
-C                              EMPTY
-C-------------------------------------------------------------------
-  130 CONTINUE
-      ACOUNT=0.0
-      do 131 i = 1, maxstck
-         ASTACK(I)=0.0
-  131    CONTINUE
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                SCLEAR
-C-----------------------------------------------------------------------
-  220 CONTINUE
-      NACCUM=0
-      weight = 1.0
-      ichnext = 1
-      ichnum = 0
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                TITLE
-C-----------------------------------------------------------------------
-  230 CONTINUE
-      if (.not.okreal8(dtwh(c1sno,iptwh))) 
-     .			call oerror(n224, m2, 'TITLE')
-c
-      ih = dtwh(c3lst, iptwh)
-      im = (dtwh(c3lst, iptwh) - float(ih)) * 60.0
-      CALL RNS(LST,n0,LSTRNG)
-      DO 231 I = 1,2
-  231    SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
-      BW=abs(DTWH(C12FR,IPTWH))
-      SCAN=DTWH(C1SNO,IPTWH)
-      if(dtwh(c1tel,iptwh).eq.nrao12m) then
-         isb = int(dtwh(c9sb,iptwh))
-#ifdef CONTINUUM
-         robsmode = dtwh(c1stc, iptwh)
-         write(cpuf, 5000) scan, source, ih, im,
-     .                dtwh(c12rf, iptwh), obsmode(5:8)
- 5000    format(x,f8.2,x,2a8,' LST=',i4,':',i2,' FREQ=',f11.4,x,a4)
-#else
-         WRITE(CPUF,5000,IOSTAT=IER) SCAN,source, ih, im,
-     .               DTWH(C12RF,IPTWH),nint(bw*1000.),isb
- 5000    FORMAT(x,f8.2,x,2a8,' LST=',i4,':',i2,' FREQ=',F11.4,' RES=',
-     .          i4,' SB=',i2)
-#endif
-      else
-#ifdef CONTINUUM
-         write(cpuf,5001) scan, source, ih, im,
-     .			dtwh(c12ct,iptwh),bw
- 5001    format(x,f8.2,x,2a8,' LST=',i4,':',i2,' NT=',f11.4,
-     1       ' CALFCT=',1pg11.4)
-#else
-         write(cpuf,5001) scan, source, ih, im,
-     .			dtwh(c12rf,iptwh),bw
- 5001    format(x,f8.2,x,2a8,' LST=',i4,':',i2,' FREQ=',f11.4,
-     1       ' RES=',1pg11.4)
-#endif
-      endif
-      CALL PWRITE(IPUF,n80)
-      GO TO 99
-C-------------------------------------------------------------------
-C                                       DOC
-C-------------------------------------------------------------------
-  240 CONTINUE
-      if (.not.okreal8(dtwh(c1sno,iptwh))) 
-     .			call oerror(n224, m2, 'DOC')
-c
-      IF (PFLAG.le.0.1) then
-            WRITE (CPUF,6001,IOSTAT=IER) dtwh(c4csc, iptwh)
-
-#ifdef CONTINUUM
- 6001 	    FORMAT (' SCAN       SOURCE       DATE       ',
-     .              'X (',a8,') Y     ITIME     CALFCT')
-#else
- 6001 	    FORMAT (' SCAN       SOURCE       DATE       ',
-     .              'X (',a8,') Y     ITIME   REST FREQ')
-#endif
-c
-        CALL PWRITE (IPUF,n80)
-        PFLAG=1.0
-      endif
-c
-      SCAN=DTWH(C1SNO,IPTWH)
-c
-      im = (DTWH(C12IT,IPTWH) / 60.)
-      is = (dtwh(c12it,iptwh) - im * 60.)
-c
-#ifdef CONTINUUM
-      dfreq = dtwh(c12fr, iptwh)
-#else
-      dfreq = dtwh(c12rf,iptwh)
-#endif
-c
-      DO 242 I=1,2
-         SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
-  242    CONTINUE
-C
-      DAT=DTWH(C3DAT,IPTWH)
-      call udat(dat, imon, iday, iyr)
-c
-      xcoord = dtwh(c4sx + icor1 - 1, iptwh)
-      ycoord = dtwh(c4sx + icor1, iptwh)
-c
-      do 233 icdtype = 1, 8
-	 if (dtwh(c4csc,iptwh) .eq. ctype2(icdtype)) then
-      		CALL RNS(xcoord,n2,RSTRNG)
-        	CALL RNS(ycoord,n1,DSTRNG)
-c
-        	WRITE(CPUF,6002,IOSTAT=IER) SCAN,(BSORCE(I),I=1,12),
-     .               iyr, imon,iday,(RSTRNG(i),i=2,6),(DSTRNG(i),i=1,5),
-     .               im,is,dfreq
- 6002   	FORMAT (f8.2,x,12a1,x,i4,'-',i2.2,'-',i2.2,x,5A2,5A2,
-     .                  x,i3,':',i2.2,x,F11.4)
-c
-	   	goto 235
-	  endif
-233       continue
-c         Write out positions in HH:MM:SS DD:MM:SS form if the coordinate
-c         system of the observations is one in CDTYPE2; else print in DDD.ddd
-c         form
-c
-      WRITE(CPUF,6003,IOSTAT=IER) SCAN,(BSORCE(I),I=1,12),
-     .               iyr,imon,iday,xcoord,ycoord,im,is,dfreq
- 6003 FORMAT (f8.2,x,12a1,x,i4,'-',i2.2,'-',i2.2,x,2f10.4,
-     .                  x,i3,':',i2.2,x,F11.4)
-c
-235   CALL PWRITE(IPUF,n90)
-c
-      GO TO 99
-C----------------------------------------------------------------------
-C                                            THUMB
-C---------------------------------------------------------------------
-  250 CONTINUE
-      if (.not.okreal8(dtwh(c1sno,iptwh))) 
-     .			call oerror(n224, m2, 'THUMB')
-c
-      if (dtwh(c1tel,iptwh).eq.nrao12m) then
-        SA=DTWH(C2UXP,IPTWH)
-        SE=DTWH(C2UYP,IPTWH)
-        DECX=DTWH(C4EDC,IPTWH)
-        COSD=COS(DECX/57.29578)
-        RAO=(DTWH(C4SX,IPTWH)-DTWH(C4ERA,IPTWH))*COSD*3600.0
-        DCO=(DTWH(C4SY,IPTWH)-DTWH(C4EDC,IPTWH))*3600.0
-        RRAO=DTWH(C9SRO+2,IPTWH)
-        RDCO=DTWH(C9SRO+3,IPTWH)
-        RA=DTWH(C9RAO,IPTWH)
-        RE=DTWH(C9REO,IPTWH)
-        CALL RN1(SA,STR1)
-        CALL RN1(RA,STR2)
-        WRITE(CPUF,7000,IOSTAT=IER)
- 7000   FORMAT (10X,'MAIN',8X,'REF')
-        CALL PWRITE(IPUF,n80)
-        WRITE(CPUF,7001,IOSTAT=IER) STR1,STR2
- 7001   FORMAT (4X,'AZ',1X,4A2,3X,4A2)
-        CALL PWRITE(IPUF,n80)
-        CALL RN1(SE,STR1)
-        CALL RN1(RE,STR2)
-        WRITE(CPUF,7002,IOSTAT=IER) STR1,STR2
- 7002   FORMAT (4X,'EL',1X,4A2,3X,4A2)
-        CALL PWRITE(IPUF,n80)
-        CALL RN1(RAO,STR1)
-        CALL RN1(RRAO,STR2)
-        WRITE (CPUF,7003,IOSTAT=IER) STR1,STR2
- 7003   FORMAT (4X,'RA',1X,4A2,3X,4A2)
-        CALL PWRITE (IPUF,n80)
-        CALL RN1(DCO,STR1)
-        CALL RN1(RDCO,STR2)
-        WRITE(CPUF,7004,IOSTAT=IER) STR1,STR2
- 7004   FORMAT (3X,'DEC',1X,4A2,3X,4A2)
-        CALL PWRITE(IPUF,n80)
-c
-      else if (dtwh(c1tel,iptwh).eq.nrao140 .or.
-     1         dtwh(c1tel,iptwh).eq.nrao300 ) then
-c
-	write(cpuf,9901) (dtwh(c2pc+k1-1,iptwh),k1=1,3)
-9901    format(' PVLS: ',1p3g15.6,' Arcmin')
-	call pwrite(ipuf,n80)
-	write(cpuf,9902) dtwh(c2uxp,iptwh), dtwh(c2uyp,iptwh)
-9902	format(' LPCS: ',1p2g15.6,15x,' Arcsec')
-        call pwrite(ipuf,n80)
-c
-      else
-	call oerror(n283, m2, 'THUMB')
-      endif
-      GO TO 99
-C----------------------------------------------------------------
-C                                        OSB
-C----------------------------------------------------------------
-  270 CONTINUE
-      if (dtwh(c1tel,iptwh).eq.nrao12m) then
-c				flip sign of c12fr, and c12dx
-         dtwh(c12fr, iptwh) = - dtwh(c12fr, iptwh)
-         dtwh(c12dx, iptwh) = - dtwh(c12dx, iptwh)
-c			recalculate the frequencies, first the shift
-         if (nint(dtwh(c9sb, iptwh)) .eq. 0 .or. 
-     .       nint(dtwh(c9sb, iptwh)) .eq. 2) then
-c				USB -> LSB
-            fshift = - 2*dtwh(c9fif, iptwh)
-         else
-c				LSB -> USB
-            fshift = 2*dtwh(c9fif, iptwh)
-         endif
-c			then the rest freq, depends on orig value for cf
-c			this change in rest freq. preserves the velocity
-c			axis reference position
-         if (dtwh(c12cf, iptwh) .ne. 0.0) then
-            dtwh(c12rf, iptwh) = dtwh(c12rf, iptwh) * 
-     .                        (1.0 + fshift / dtwh(c12cf, iptwh))
-         else
-            dtwh(c12rf, iptwh) = dtwh(c12rf, iptwh) + fshift
-         endif
-c			then the center freq, which is just a straight shift
-         dtwh(c12cf, iptwh) = dtwh(c12cf, iptwh) + fshift
-c			reset the sideband value
-         if (nint(dtwh(c9sb, iptwh)) .eq. 0) then
-            dtwh(c9sb, iptwh) = 1
-         else if (nint(dtwh(c9sb, iptwh)) .eq. 1) then
-            dtwh(c9sb, iptwh) = 0
-         else if (nint(dtwh(c9sb, iptwh)) .eq. 2) then
-            dtwh(c9sb, iptwh) = 3
-         else 
-            dtwh(c9sb, iptwh) = 2
-         endif
-c			and set/unset a flag in class 10
-         if (dtwh(c10pv, iptwh) .eq. osb) then
-            dtwh(c10pv, iptwh) = b8
-         else if (dtwh(c10pv, iptwh) .eq. b8 .or. 
-     .       dtwh(c10pv, iptwh) .eq. 0) then
-            dtwh(c10pv, iptwh) = osb
-         endif
-      else
-         call oerror(n248, m2, 'OSB')
-      endif
-      GO TO 99
-C----------------------------------------------------------------
-C                                        SELECT
-C----------------------------------------------------------------
-  280 continue
-      call select
-      go to 99
-c
-   99 CONTINUE
-      RETURN
-C---------------------------------------------------------------------
-      END
diff -uNr 3.5/source/conline/condar/au9.f unipops-3.6/source/conline/condar/au9.f
--- 3.5/source/conline/condar/au9.f	2000-03-16 11:36:32.000000000 -0700
+++ unipops-3.6/source/conline/condar/au9.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,111 +0,0 @@
-      SUBROUTINE AU9 (J)
-C-------------------------------------------------------------------------------
-C  @(#)au9.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     au9 - Ripple, Rmodel, Rshow
-c
-C---------------------------------------------------------------------
-c
-      INTEGER*4  ISTART, ISTOP
-      integer*2 j, iptwh, jj, ix, iy, ierr
-      integer*2 m2, m3, n0, n120, n225, n284, n298
-      integer*2 n1, n25, n780, n33
-      logical isfirst, okreal4
-      real*4 rampltde, rphase, rperiod, ajj, twopi
-c
-      include 'core.inc'
-      include 'cio.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-c
-      data m2, m3, n0, n33, n120, n225, n284, n298
-     .     /-2, -3, 0, 33, 120, 225, 284, 298/
-      data n1, n25, n780 /1, 25, 780/
-c
-      parameter (twopi = 6.283185)
-C
-C=======================================================================
-C
-      IPTWH = 1
-c
-      JJ=J
-      GO TO (70,80,85,90), JJ
-      call oerror(n120, m3, 'AU9')
-C---------------------------------------------------------------------
-C							 RIPPLE	 
-C---------------------------------------------------------------------
-  70  CONTINUE
-c
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART - 1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'RIPPLE')
-c
-      call rshape2 (ierr)
-      if (ierr .ne. 0) call oerror(ierr, m2, 'RIPPLE')
-c
-      DO 73 JJ=ISTART,ISTOP
-            if (okreal4(TWH(JJ,IPTWH))) TWH(JJ,IPTWH)=TWH(JJ,IPTWH) - 
-     .        rampltde*COS( (float(jj-istart) + rphase)*twopi/rperiod)
-  73	    CONTINUE
-      GO TO 99
-C---------------------------------------------------------------------
-C							 RMODEL	 
-C---------------------------------------------------------------------
-  80  CONTINUE
-      ISTART = DTWH (C12SPN,IPTWH) + IDATOFF
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART-1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'RMODEL')
-c
-      DO 83 JJ=ISTART,ISTOP
-            TWH(JJ,IPTWH)=
-     .        rampltde*COS( (float(jj-istart) + rphase)*twopi/rperiod)
-  83	    CONTINUE
-      GO TO 99
-C---------------------------------------------------------------------
-C							 RSHAPE	 
-C---------------------------------------------------------------------
-  85  CONTINUE
-c
-      call rshape2 (ierr)
-      if (ierr .ne. 0) call oerror(ierr, m2, 'RSHAPE')
-c
-      goto 99
-C---------------------------------------------------------------------
-C							 RSHOW	 
-C---------------------------------------------------------------------
-  90  CONTINUE
-      if (showplot(numplots) .ne. 0) call oerror(n298, m2, 'RSHOW')
-c	
-      ISTART = DTWH (C12SPN,IPTWH)
-      ISTOP = DTWH (C12NI,IPTWH) + ISTART - 1
-c
-      if (istop .lt. istart) call oerror(n225, m2, 'RSHOW')
-      isfirst = .true.
-c
-      DO 66 ix = ix0, ixm, 2
-         ajj = (float(ix)-bx(numplots))/ax(numplots)
-         IY=max(iy0, min(iym, 
-     .    nint(AY(numplots)*rampltde*
-     .          COS( (ajj-float(istart) + rphase)*twopi/rperiod) +
-     .		BY(numplots))))
-         if (nint(ajj) .ge. isbg) then
-            if (isfirst) then
-	       call placewp(ix, iy, n33)
-               isfirst = .false.
-            else
-	       CALL vctrwp(IX, IY, n33, sclchar, 0.)
-            endif
-	 endif
-   66 CONTINUE
-      call place(n0,n780 - n25*(inline-n1))
-      call pchar('',n0)
-      goto 99
-c----------------------------------------------------------------------
-C
-  99  CONTINUE
-      RETURN
-      END
-c
diff -uNr 3.5/source/conline/condar/aua.F unipops-3.6/source/conline/condar/aua.F
--- 3.5/source/conline/condar/aua.F	2000-03-16 11:36:33.000000000 -0700
+++ unipops-3.6/source/conline/condar/aua.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,236 +0,0 @@
-       subroutine aua(j)
-C-------------------------------------------------------------------------------
-C  @(#)aua.F	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c      aua - FV, FF, VC, CV, FC, CF, CC, FF, VV, Line, Histogram, Points, Rline,
-c             Rhist, Rpoints, Freey, Holdy, Range, Spread, Saxis
-c
-C-------------------------------------------------------------------------------
-c
-      integer*2 j, iptwh, jj, ierr, i1, i2
-      integer*2 m1, m2, m3, n0, n112, n120, n245, n272
-      real*4 zmin, zmax, v1, v2, ch1, ch2, z1, z2
-      real*8 xtochan
-      logical okarray, okreal4, okreal8
-c
-      include 'cform.inc'
-      include 'appl.inc'
-      include 'core.inc'
-      include 'stk.inc'
-c
-      data m1, m2, m3, n0, n112, n120, n272, n245
-     .     /-1, -2, -3, 0, 112, 120, 272, 245/
-c
-      iptwh = 1
-c
-      JJ=J
-      GO TO (130,131,140,141,142,143,144,145,146,160,170,180,190,200,
-     .       210,149,150,220,270,280), JJ
-      call oerror(n120, m3, 'AUA')
-C-------------------------------------------------------------------------
-C                                      FV   
-C-----------------------------------------------------------------------
-  130 CONTINUE
-      LXA=2
-      UXA=3
-      GO TO 99
-C-------------------------------------------------------------------------
-C                                      VF  
-C-----------------------------------------------------------------------
-  131 CONTINUE
-      LXA=3
-      UXA=2
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     VC 
-C-----------------------------------------------------------------------
-  140 CONTINUE
-      LXA=3
-      UXA=1
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     CV 
-C-----------------------------------------------------------------------
-  141 CONTINUE
-      LXA=1
-      UXA=3
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     FC
-C-----------------------------------------------------------------------
-  142 CONTINUE
-      LXA=2
-      UXA=1
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     CF
-C-----------------------------------------------------------------------
-  143 CONTINUE
-      LXA=1
-      UXA=2
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     CC  
-C-----------------------------------------------------------------------
-  144 CONTINUE
-      LXA=1
-      UXA=1
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     FF 
-C-----------------------------------------------------------------------
-  145 CONTINUE
-      LXA=2
-      UXA=2
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                     VV 
-C-----------------------------------------------------------------------
-  146 CONTINUE
-      LXA=3
-      UXA=3
-      GO TO 99
-C---------------------------------------------------------------------
-C                                     LINE
-C---------------------------------------------------------------------
-  160 CONTINUE
-      SPLT=0
-      GO TO 99
-C---------------------------------------------------------------------
-C                                     HISTOGRAM
-C---------------------------------------------------------------------
-  170 CONTINUE
-      SPLT=1
-      GO TO 99
-C---------------------------------------------------------------------
-C                                     POINTS
-C---------------------------------------------------------------------
-  180 CONTINUE
-      SPLT=2
-      GO TO 99
-C----------------------------------------------------------------------
-C                                RLINE
-C----------------------------------------------------------------------
-  190 CONTINUE
-      RPLT=0
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                RHIST
-C-----------------------------------------------------------------------
-  200 CONTINUE
-      RPLT=1
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                RPOINTS
-C-----------------------------------------------------------------------
-  210 CONTINUE
-      RPLT=2
-      GO TO 99
-C---------------------------------------------------------------------
-C					FREEY
-C---------------------------------------------------------------------
- 149  YLMIN=-9.0E4
-      GO TO 99
-C---------------------------------------------------------------------
-C					HOLDY
-C---------------------------------------------------------------------
- 150  YLMIN=-9.0E10
-      GO TO 99
-C-------------------------------------------------------------------
-C                             YRANGE    
-C-----------------------------------------------------------------
-  220 CONTINUE
-      IF (SP.lt.2) call oerror(n112, m1, 'YRANGE')
-c
-      z1=V(SP)
-      SP=SP-1
-      z2=V(SP)
-      SP=SP-1
-
-      if (.not. okreal4(z1) .or. .not. okreal4(z2) ) 
-     .		call oerror(n112, m1, 'YRANGE')
-c
-      zmin=min(z1,z2)
-      zmax=max(z1,z2)
-c
-      if (zmin.ge.zmax) call oerror(n112, m2, 'YRANGE')
-c
-      YLMIN=ZMIN
-      YLINCR=(ZMAX-ZMIN)/5.0
-      GO TO 99
-C---------------------------------------------------------------------
-C							  XRANGE
-C---------------------------------------------------------------------
- 270  CONTINUE
-c
-      IF (SP.lt.2) call oerror(n112, m1, 'XRANGE')
-c
-      V2=V(SP)
-      SP=SP-1
-      V1=V(SP)
-      SP=SP-1
-c
-      if (.not. okarray(lxa, dtwh(1,iptwh)) )
-     .			call oerror(n272, m2, 'XRANGE')
-c
-      if (.not. okreal4(v1) .and. .not. okreal4(v2) ) then
-	v1 = DTWH(C12SPN,IPTWH) - 1
-	v2 = DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-      else if (.not. okreal4(v1) ) then 
-	v1 = DTWH(C12SPN,IPTWH) - 1
-        v2 = xtochan(lxa, dtwh(1,iptwh), v2, ierr)
-      else if (.not. okreal4(v2) ) then 
-        v1 = xtochan(lxa, dtwh(1,iptwh), v1, ierr)
-	v2 = DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-      else
-        ch1 = xtochan(lxa, dtwh(1,iptwh), v1, ierr)
-        ch2 = xtochan(lxa, dtwh(1,iptwh), v2, ierr)
-        v1 = min(ch1, ch2)
-        v2 = max(ch1, ch2)
-      endif
-c
-      BDROP = v1 - DTWH(C12SPN,IPTWH)
-      EDROP = DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH) - 1 - v2
-c
-      if(edrop.lt.0) then
-	edrop = 0
-	call oerror(n245, n0, 'XRANGE: Setting EDROP to zero')
-      endif
-      if(bdrop.lt.0) then
-	bdrop = 0.
-	call oerror(n245, n0, 'XRANGE: Setting BDROP to zero')
-      endif
-      if(bdrop+edrop.ge.dtwh(c12ni,iptwh)) then	
-	bdrop=0.
-	edrop=0.
-	call oerror(n245, n0, 'XRANGE: Setting BDROP and EDROP to zero')
-      endif
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							  SAXIS
-C---------------------------------------------------------------------
- 280  CONTINUE
-c
-      IF (SP.lt.2) call oerror(n112, m1, 'SAXIS')
-c
-      if (.not. okreal8(v(sp)) ) v(sp) = 3
-      if (.not. okreal8(v(sp-1)) ) v(sp-1) = 2
-c
-      i2=nint(V(SP))
-      SP=SP-1
-      i1=nint(V(SP))
-      SP=SP-1
-c
-      if (i1 .lt. 1 .or. i1 .gt. 11) call oerror(n112, m1, 'SAXIS')
-      if (i2 .lt. 1 .or. i2 .gt. 11) call oerror(n112, m1, 'SAXIS')
-c
-      lxa = i1
-      uxa = i2
-c
-      goto 99
-c
-C --------------------------------------------------------------
-99    return
-      end
diff -uNr 3.5/source/conline/condar/caub.f unipops-3.6/source/conline/condar/caub.f
--- 3.5/source/conline/condar/caub.f	2000-03-16 11:36:33.000000000 -0700
+++ unipops-3.6/source/conline/condar/caub.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,987 +0,0 @@
-      SUBROUTINE AUB (J)
-C-------------------------------------------------------------------------------
-C  @(#)caub.f	5.2 11/09/94
-C-------------------------------------------------------------------------------
-c
-c     caub - Caldbe, Fixdbe, Zero, Switched, TotalPwr, Avgd, Ons,
-c		Avg, Temps, Solvetip
-c
-c	For 12-m versions of these verbs (most of the contents here),
-c	the following should be helpful:
-c	There are three classes of verbs here:
-c		(I) Verbs designed to work with "raw" continuum data.
-c		    These verbs are CALDBE, FIXDBE, ZERO, SWITCHED,
-c		    and TOTALPWR.  These verbs all expect the data to
-c		    be in groups of 4, with the 4 values being in the
-c		    the following order:
-c			(1) Source + Cal
-c			(2) Reference + Cal
-c			(3) Source
-c			(4) Reference
-c		(II) Verbs designed to work with On/Off pairs after
-c		     the data has been reduced by one of the above.
-c		     These verbs are AVGD, ONS, AVG, and TEMPS.
-c		     At this stage, the data STILL come in groups of
-c		     4 values, with the following interpretation of
-c		     those values:
-c			(1) Off
-c			(2) On
-c			(3) On
-c			(4) Off
-c		(III) The SOLVETIP verb.  This verb expects there to
-c		      to be 2*ntpts-1 (ntpts is parameter defined below) values
-c		      These are really pairs (ntpts-1) values at a given
-c		      airmass centered (in terms of location in the
-c		      data vector) around a single value at airmass(ntpts).
-c
-c*********************************
-c
-      integer*2 ipuf(40), ier, j, iptwh, jj, istart, istop, nopt, i,
-     .		nt, ns, itip, idbe, ich, iy, num, nlast, 
-     .		nfirst, iend, kk, npairs, npts, npt, itype, ix, novcvg
-      integer*4 ntpts
-      parameter (ntpts = 6)
-c
-c		ntpts is the number of distict airmasses for 12-m
-c		tips, used by solvetip.   If you change this number,
-c		remember to update the airmass data statement below
-c		to reflect all ntpts aipsmasses.  For GB, the number
-c		of airmasses are stored in SECZ and are 2,3,4,5,6,7
-c		and are defined in the data statement below.
-c
-      real*4 sinel, el, tsrc(ntpts), atm, tau, ph1, ph2, ph3, 
-     .       ph4, tc, cal, ascale, exarg, t
-     .       ypscn, ts, smean, srms, rjz, rjx, rjy, scl,
-     .	     xmean, xrms, tp, tmp, tcal, tamb, tvan, frq, taug,
-     .	     sumx, sumxy, sumx2, sumy2, tpsn, diff,
-     .	     sumy, tm, try, yy, tsbr, ym, apscale,
-     .	     tsky(ntpts), yi(ntpts), airmass(ntpts), eb, ea, deltau, 
-     .       rs1, rs2, rs, zx, zy, a1, a0, deleta, chisqr, ysbr, yvalue
-c
-      integer*2 m3, m2, m1, n1, n5, n80, n112, n120, n225, n234, n248,
-     .       n250, n265, n283, n298, n268
-c
-      real*8 nrao140, nrao300, t12m, digital, holograf, tipping, 
-     .	     tip(3*ntpts), secz(ntpts), tau8, trx8 
-      CHARACTER*80 CPUF
-      logical okreal4
-c
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      include 'stk.inc'
-      include 'core.inc'
-c
-      EQUIVALENCE (CPUF,IPUF)
-c
-      data digital/'DIGITAL '/, holograf/'HOLOGRAF'/
-      data tipping/'CONTSTIP'/
-      data t12m/'NRAO 12M'/,nrao140/'NRAO 43M'/,nrao300/'NRAO 93M'/
-      data airmass / 2.6, 2.3, 2.0, 1.7, 1.4, 1.1 /
-      data secz / 2.d0, 3.d0, 4.d0, 5.d0, 6.d0, 7.d0 /
-c
-      data m3, m2, m1, n1, n5, n80, n112, n120, n225, n234, n248,
-     .       n250, n265, n283, n298, n268
-     .   /-3, -2, -1, 1, 5, 80, 112, 120, 225, 234, 248, 250, 265,
-     .    283, 298, 268/
-c
-C=======================================================================
-C
-      IPTWH = 1
-c
-      JJ=J
-      GO TO (70, 80, 90, 100, 120, 180, 40, 110, 130, 170, 
-     .       190), JJ
-      call oerror(n120, m3, 'AUB')
-c
-C----------------------------------------------------------
-C                                                  CALDBE
-C-----------------------------------------------------------------------
-   70 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'CALDBE')
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'CALDBE')
-c
-      NOPT=DTWH(C12NI,IPTWH)
-      DO 71 I = 1,NOPT
-	 if (.not. okreal4(TWH(I+istart-1,IPTWH)))
-     .		call oerror(n268, m2, "CALDBE: Cannot proceed")
-         XDATA(I)=TWH(I+istart-1,IPTWH)
-   71    CONTINUE
-c
-      J=istart
-      CALVAL=0.
-      NS=NOPT/4
-c			get value of Tcal and noise tube
-      TC=DTWH(C12CT,IPTWH)
-      NT=DTWH(C12FR,IPTWH)
-c
-      DO 72 I = 1,NOPT,4
-         PH1=XDATA(I)
-         PH2=XDATA(I+1)
-         PH3=XDATA(I+2)
-         PH4=XDATA(I+3)
-         TWH(J,IPTWH)=(PH1-PH3+PH2-PH4)*0.5
-         if (nt .eq. 1) CALVAL=CALVAL+TWH(J,IPTWH)
-         J=J+1
-   72    CONTINUE
-c
-      IF (NT.LT.1) then
-         CALVAL=DTWH(C12RF,IPTWH)
-      else if (nt .eq. 1) then
-         CALVAL=CALVAL/float(NS)
-      endif
-c		special VANE cal case (nt = 2)
-      if (nt .eq. 2) then
-         cal = dtwh(c12rst,iptwh)
-      else
-         CAL=TC/CALVAL
-      endif
-c
-      DTWH(C12NI,IPTWH)=DTWH(C12NI,IPTWH)/4.
-c
-      WRITE (CPUF,2789,IOSTAT=IER) CAL, TC, CALVAL
- 2789 FORMAT (' CAL FACTOR, NOISE TUBE, CALVAL',3F10.4)
-      CALL PWRITE (IPUF,n80)
-c
-      GO TO 99
-C-------------------------------------------------------------------
-C                                       FIXDBE
-C-----------------------------------------------------------------------
-   80 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'FIXDBE')
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'FIXDBE')
-c
-      NOPT=DTWH(C12NI,IPTWH)
-      DO 81 I = 1,NOPT
-	 if (.not. okreal4(TWH(I+istart-1,IPTWH)))
-     .		call oerror(n268, m2, "FIXDBE: Cannot proceed")
-         XDATA(I)=TWH(I+istart-1,IPTWH)
-   81    CONTINUE
-c
-      NT = DTWH(C12FR,IPTWH)
-      if (nt .ne. 2) then
-         EL=DTWH(C4EL,IPTWH)/57.295779
-         SINEL=SIN(EL)
-         IF (EL.GT.0.) THEN
-            ATM=1./SINEL
-         ELSE
-            ATM=0.
-         ENDIF
-         TAU=DTWH(C12WO,IPTWH)
-         EXARG=TAU*ATM
-         ASCALE=EXP(EXARG)
-      else
-         ascale = 1.0
-      endif
-c
-      J=istart
-      CALVAL=0.
-      NS=NOPT/4
-c
-      DO 82 I = 1,NOPT,4
-         PH1=XDATA(I)
-         PH2=XDATA(I+1)
-         PH3=XDATA(I+2)
-         PH4=XDATA(I+3)
-         TWH(J,IPTWH)=(PH1-PH4+PH3-PH2)*ASCALE*0.5
-         TWH(J+NS,IPTWH)=(PH1+PH2+PH3+PH4)*ASCALE*0.25
-         TWH(J+NS*2,IPTWH)=(PH1-PH3+PH2-PH4)*0.5
-         CALVAL=CALVAL+TWH(J+NS*2,IPTWH)
-         TWH(J+NS*3,IPTWH)=(PH1-PH2+PH4-PH3)*ASCALE
-         J=J+1
-   82    CONTINUE
-c
-      CALVAL=CALVAL/float(NS)
-c
-      GO TO 99
-C------------------------------------------------------------------
-C                                                 ZERO
-C------------------------------------------------------------------
-   90 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'ZERO')
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'ZERO')
-c
-      NOPT=DTWH(C12NI,IPTWH)
-      DO 91 I = 1,NOPT
-	 if (.not. okreal4(TWH(I+istart-1,IPTWH)))
-     .		call oerror(n268, m2, "ZERO: Cannot proceed")
-         XDATA(I)=TWH(I+istart-1,IPTWH)
-   91    CONTINUE
-c
-      NT = DTWH(C12FR,IPTWH)
-      if (nt .ne. 2) then
-         EL=DTWH(C4EL,IPTWH)/57.295779
-         SINEL=SIN(EL)
-         IF (EL.GT.0.) THEN
-            ATM=1./SINEL
-         ELSE
-            ATM=0.
-         ENDIF
-         TAU=DTWH(C12WO,IPTWH)
-         EXARG=TAU*ATM
-         ASCALE=EXP(EXARG)
-      else
-         ascale = 1.0
-      endif
-c
-      CALVAL=0.
-      NS=NOPT/4
-c
-      sumy = 0.
-      sumy2 = 0.
-      ns = dtwh(c12ni,iptwh) / 4.0
-      DO 92 I = 1,NOPT,4
-         PH1=XDATA(I)
-         PH2=XDATA(I+1)
-         PH3=XDATA(I+2)
-         PH4=XDATA(I+3)
-         yvalue=(PH1-PH2+PH4-PH3)*ASCALE*0.5
-         sumy = sumy + yvalue
-         sumy2 = sumy2 + yvalue*yvalue
-   92    CONTINUE
-c
-      VRMS=SQRT((sumy2 - sumy*sumy/ns)/float(ns-1))
-c
-      WRITE (CPUF,1087,IOSTAT=IER) VRMS
- 1087 FORMAT (' ZERO RMS=',F10.4)
-      CALL PWRITE (IPUF,n80)
-c
-      GO TO 99
-C------------------------------------------------------------------
-C                                               SWITCHED
-C Modified 890110 [PPM] Changes for vane calibrate...
-C------------------------------------------------------------------
-  100 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'SWITCHED')
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'SWITCHED')
-c
-      NOPT = DTWH(C12NI,IPTWH)
-      DO 101 I = 1, NOPT
-	 if (.not. okreal4(TWH(I+istart-1,IPTWH)))
-     .		call oerror(n268, m2, "SWITCHED: Cannot proceed")
-         XDATA(I) = TWH(I+istart-1, IPTWH)
-  101 CONTINUE
-C
-      TYPSCN = 2.0
-      TC = DTWH(C12CT,IPTWH)
-      NT = DTWH(C12FR,IPTWH)
-      if (nt .ne. 2) then
-         EL = DTWH(C4EL,IPTWH)/57.295779
-         SINEL = SIN(EL)
-         IF (EL.GT.0.) THEN
-            ATM = 1./SINEL
-         ELSE
-            ATM = 0.
-         ENDIF
-         TAU = DTWH(C12WO,IPTWH)
-         EXARG = TAU*ATM
-         ASCALE = EXP(EXARG)
-      else
-         ascale = 1.0
-      endif
-c
-      J = istart
-      CALVAL = 0.
-      TS = 0.0
-      TPSN = 0.0
-      NS = NOPT/4
-C
-C     Sequence of data is (Sig+Cal, Ref+Cal, Sig, Ref) so get Sig-Ref
-C     (stored in place in XDATA) and total Cal signal (in CALVAL)
-C
-      DO 102 I = 1, NOPT, 4
-         PH1 = XDATA(I)
-         PH2 = XDATA(I+1)
-         PH3 = XDATA(I+2)
-         PH4 = XDATA(I+3)
-         TWH(J,IPTWH) = (PH1-PH4+PH3-PH2)*ASCALE*0.5
-         if (nt .eq. 1) then
-            CALVAL = CALVAL+(PH1-PH3+PH2-PH4)*0.5
-            TS = TS+(PH4/(PH2-PH4))
-         endif
-         TPSN = TPSN+((PH1-PH2+PH3-PH4)/(PH3+PH4))
-         J = J+1
-  102    CONTINUE
-c
-      VRMS = TPSN/float(NS)
-      DTWH(C12NI,IPTWH) = DTWH(C12NI,IPTWH)/4.
-C
-C     Check if noise tube was firing; if so, change system temperature
-C
-      if (nt .lt. 1) then
-         calval = dtwh(c12rf, iptwh)
-      else IF (NT.EQ.1) THEN
-         CALVAL = CALVAL/float(NS)
-         TS = (TS/float(NS))*TC
-         DTWH(C12SST,IPTWH) = TS
-      ENDIF
-c		special case for VANE cal, NT = 2
-      if (nt .eq. 2) then
-         cal = dtwh(c12rst, iptwh)
-      else
-         CAL = TC/CALVAL
-      endif
-c               finally, scale the data
-      DO 103 I = 1,NS
-         TWH(I+istart-1,IPTWH) = TWH(I+istart-1,IPTWH)*CAL
-  103    CONTINUE
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C                                             TOTALPWR
-C---------------------------------------------------------------------
- 120  CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'TOTALPWR')
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'TOTALPWR')
-c
-      NOPT=DTWH(C12NI,IPTWH)
-      DO 121 I = 1,NOPT
-	 if (.not. okreal4(TWH(I+istart-1,IPTWH)))
-     .		call oerror(n268, m2, "TOTALPWR: Cannot proceed")
-         XDATA(I)=TWH(I+istart-1,IPTWH)
-  121    CONTINUE
-c
-      TYPSCN = 1.0
-      IF (DTWH(C1STC,IPTWH) .EQ. TIPPING)THEN 
-             ITIP=1
-      ELSE
-             ITIP=0
-      ENDIF
-c
-      TC=DTWH(C12CT,IPTWH)
-      NT=DTWH(C12FR,IPTWH)
-      if (nt .ne. 2) then
-         EL=DTWH(C4EL,IPTWH)/57.295779
-         SINEL=SIN(EL)
-         IF (EL.GT.0.) THEN
-            ATM=1./SINEL
-         ELSE
-            ATM=0.
-         ENDIF
-         TAU=DTWH(C12WO,IPTWH)
-         EXARG=TAU*ATM
-         ASCALE=EXP(EXARG)
-      else
-         ascale = 1.0
-      endif
-c
-      J=istart
-      CALVAL=0.
-      TS=0.0
-      TPSN=0.0
-c                  ns is used here to count the number of values going into
-c                  quantities which will be averaged (TS, CALVAL, and TPSN)
-      NS=0
-c
-      DO 122 I = 1,NOPT,4
-         PH1=XDATA(I)
-         PH2=XDATA(I+1)
-         PH3=XDATA(I+2)
-         PH4=XDATA(I+3)
-         IF (ITIP .EQ. 0)  THEN
-               TWH(J,IPTWH)=(PH1+PH2+PH3+PH4)*ASCALE*0.25
-               IF (NT.EQ.1) then
-                  TS=TS+(PH4/(PH2-PH4))
-                  CALVAL=CALVAL+(PH1-PH3+PH2-PH4)*0.5
-               endif
-               TPSN=TPSN+((PH1-PH2+PH3-PH4)/(PH3+PH4))
-               ns = ns + 1
-         ELSE
-               JJ=MOD(J,2)
-               TWH(J,IPTWH)=(PH1+PH2+PH3+PH4)*0.25
-               IF (JJ .EQ. 0) THEN
-                  IF (NT .EQ. 1) then
-                     TS=TS+(PH4/(PH2-PH4))
-                     CALVAL=CALVAL+(PH1-PH3+PH2-PH4)
-                  endif
-                  TPSN=TPSN+((PH1-PH2+PH3-PH4)/(PH3+PH4))
-                  ns = ns + 1
-               ENDIF
-         ENDIF
-         J=J+1
-  122    CONTINUE
-c
-      VRMS=TPSN/float(NS)
-      DTWH(C12NI,IPTWH)=DTWH(C12NI,IPTWH)/4.
-c			check on status of noise tube
-      if (nt .lt. 1) then
-         calval = dtwh(c12rf, iptwh)
-      else IF (NT.EQ.1) THEN
-         CALVAL=CALVAL/float(NS)
-         TS=(TS/float(NS))*TC
-         DTWH(C12SST,IPTWH)=TS
-      ENDIF
-c			special VANE cal case, NT = 2
-      if (nt .eq. 2) then
-         cal = dtwh(c12rst, iptwh)
-      else
-         CAL=TC/CALVAL
-      endif
-c                      scale the data
-      DO 123 I = 1, nopt/4
-         TWH(I+istart-1,IPTWH)=TWH(I+istart-1,IPTWH)*CAL
-  123    CONTINUE
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C                                         AVGD
-C---------------------------------------------------------------------
- 180  CONTINUE
-c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'AVGD')
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'AVGD')
-c
-      DO 181 I = ISTART,ISTOP
-         XDATA(I-istart+1)=TWH(I,IPTWH)
-  181    CONTINUE
-c
-      if (dtwh(c1bke,iptwh) .eq. digital .or. 
-     .    dtwh(c1bke,iptwh).eq.holograf) then
-	IDBE=-1
-      else
-	idbe=0
-      endif
-c
-      CALL MEAN (n1, istop-istart+n1,XDATA,IDBE,TYPSCN,SMEAN,SRMS)
-c
-      DTWH(C12ST,IPTWH)=SMEAN
-      DTWH(C12RMS,IPTWH)=SRMS
-      DTWH(C7OSN,IPTWH)=0           
-c     Now appears as an analog scan
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					ONS   166
-C---------------------------------------------------------------------
-  40  CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'ONS')
-c
-      if (showplot(numplots) .ne. 0) call oerror(n298, m2, 'ONS')
-c
-c
-      if(dtwh(c1tel,iptwh) .eq. nrao140 .or. 
-     .        dtwh(c1tel,iptwh) .eq. nrao300) then
-         ich = istop - istart + 1 - 3
-	 kk = 2
-      else if (dtwh(c1tel,iptwh) .eq. t12m) then
-	 ich =  ISTOP-istart+1
-	 kk = 4
-      else
-	 call oerror(n283, m2, 'ONS')
-      endif
-c
-      DO 398 I = 2,ich, kk
-         if (dtwh(c1tel,iptwh) .eq. t12m) then
-	   if (okreal4(TWH(I+istart-1,IPTWH)) .and.
-     .         okreal4(TWH(I+istart,IPTWH))) then
-        	IX=nint(I*AX(numplots)+bx(numplots))
-        	IY=nint(TWH(I+istart-1,IPTWH)*AY(numplots)+by(numplots))
-         	CALL PLACE (IX-n5,IY)
-         	CALL VCTR (IX+n5,IY)
-         	CALL PLACE (IX,IY-n5)
-         	CALL VCTR(IX,IY+n5)
-         	IX=nint( (I+1)*AX(numplots)+bx(numplots))
-         	IY=nint(TWH(I+istart,IPTWH)*AY(numplots)+by(numplots))
-         	CALL PLACE (IX-n5,IY)
-         	CALL VCTR (IX+n5,IY)
-         	CALL PLACE (IX,IY-n5)
-         	CALL VCTR(IX,IY+n5)
-	   endif
-	 else
-	   if (okreal4(TWH(I+istart-1,IPTWH))) then
-        	IX=nint(I*AX(numplots)+bx(numplots))
-        	IY=nint(TWH(I+istart-1,IPTWH)*AY(numplots)+by(numplots))
-         	CALL PLACE (IX-n5,IY)
-         	CALL VCTR (IX+n5,IY)
-         	CALL PLACE (IX,IY-n5)
-         	CALL VCTR(IX,IY+n5)
-	   endif
-	 endif
-  398    CONTINUE
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C							    AVG
-C---------------------------------------------------------------------
- 110  CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH) + ISTART -1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'AVG')
-c
-      DO 111 I = 1,ISTOP-istart+1
-         XDATA(I)=TWH(I+istart-1,IPTWH)
-  111    CONTINUE
-c
-      if(dtwh(c1tel,iptwh) .eq. nrao140 .or. 
-     .        dtwh(c1tel,iptwh) .eq. nrao300) then
-c
-	 if (.not.okreal4(TWH(ISTOP-1,IPTWH)) .or.
-     .	     .not.okreal4(TWH(ISTOP-2,IPTWH)) .or.
-     .	     .not.okreal4(TWH(ISTOP,IPTWH)))
-     .		call oerror(n268, m2, "AVG: Cannot proceed")
-         TMP = TWH(ISTOP-1,IPTWH)-(TWH(ISTOP-2,IPTWH)+
-     .      TWH(ISTOP,IPTWH))/2.
-         SCL = dtwh(c12ct,IPTWH) / TMP
-c
-	 call gbmean(xdata, ISTOP-istart+n1, smean, srms)
-c
-	 smean = scl * smean
-	 srms = scl * srms
-c
-         WRITE (CPUF,1002,IOSTAT=IER) SMEAN,SRMS
- 1002    FORMAT (' MEAN=',F10.5,' K  RMS=',F10.5)
-         CALL PWRITE (IPUF,n80)
-c
-      else if (dtwh(c1tel,iptwh) .eq. t12m) then 
-c
-         if (dtwh(c1bke,iptwh) .eq. digital .or. 
-     .    dtwh(c1bke,iptwh).eq.holograf) then
-	   IDBE=-1
-         else
-	   idbe=0
-         endif
-c
-         CALL MEAN (n1,istop-istart+n1,XDATA,IDBE,typscn,SMEAN,SRMS)
-c			get noise tube value
-         NT=DTWH(C12FR,IPTWH)
-c			in the following 24.41 = 2 * k / (pi * (6**2))
-c			where k = boltzman = 1.381 * 10**3 Jy m**2 / K
-         if (nt .ne. 2) then
-            RJY=SMEAN*(24.41/DTWH(C8AAE,IPTWH))
-            RJZ=SRMS*(24.41/DTWH(C8AAE,IPTWH))
-         else
-c			vane calibration is slightly more complicated
-            apscale = dtwh(c8aae,iptwh) / 
-     .                    (dtwh(c8el,iptwh) * dtwh(c8ef,iptwh))
-            RJY=SMEAN*(24.41/apscale)
-            RJZ=SRMS*(24.41/apscale)
-         endif
-c
-         IF (RJZ.EQ.0.0) then
-           RJX=1.0
-         else
-           RJX=RJY/RJZ
-         endif
-c
-         WRITE (CPUF,1001,IOSTAT=IER) SMEAN,SRMS,RJY,RJZ,RJX
- 1001    FORMAT (' MEAN=',F10.5,' K  RMS=',F10.5,F11.5,' JY',
-     .		 F11.5,' S/N',F9.3)
-         CALL PWRITE (IPUF,n80)
-c
-      else
-	call oerror(n283, m2, 'AVG')
-      endif
-c
-      DTWH(C12ST,IPTWH)=SMEAN
-      DTWH(C12RMS,IPTWH)=SRMS
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					SEDITS
-C---------------------------------------------------------------------
-  130 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH)+ ISTART-1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'SEDITS')
-c
-      IF (SP.lt.2) call oerror(n112, m1, 'SEDITS')
-c
-      if(dtwh(c1tel,iptwh) .eq. nrao140 .or. 
-     .        dtwh(c1tel,iptwh) .eq. nrao300) then
-c
-         nfirst=2*nint(V(SP-1))+istart-2
-         nlast=2*nint(V(SP))+istart-1 
-         SP=SP-2
-c
-	 if (nlast .le. nfirst .or. nlast .ge. istop-2 .or. 
-     .	     nfirst .lt. istart .or. nlast-nfirst+4 .ge. istop-istart+1)
-     .		 call oerror(n112, m2, 'SEDITS')
-c
-	 if (.not.okreal4(TWH(ISTOP-1,IPTWH)) .or.
-     .	     .not.okreal4(TWH(ISTOP-2,IPTWH)) .or.
-     .	     .not.okreal4(TWH(ISTOP,IPTWH)))
-     .		call oerror(n268, m2, "SEDITS: Cannot proceed")
-         TMP = TWH(ISTOP-1,IPTWH)-(TWH(ISTOP-2,IPTWH)+
-     .      TWH(ISTOP,IPTWH))/2.
-         SCL = dtwh(c12ct,IPTWH) / TMP
-c
-         NUM=nlast-nfirst+1
-         IEND=ISTOP-NUM
-         DO 133 I = nfirst,IEND
-            TWH(I,IPTWH)=TWH(I+NUM,IPTWH)
-  133       CONTINUE
-c
-         DO 134 I = 1,ISTOP-ISTART+1-num
-            XDATA(I)=TWH(I+istart-1,IPTWH)
-  134       CONTINUE
-c
-	 call gbmean(xdata, ISTOP-ISTART+n1-num, xmean, xrms)
-c
-	 xmean = scl * xmean
-	 xrms = scl * xrms
-c
-      else if (dtwh(c1tel,iptwh) .eq. t12m) then
-c          order of arguments: V(SP-1) is the first group number
-c                              V(SP) is the last group number
-c          SEDITS eliminates all the data from the first group through
-c                 the last group.  Each group is 4 values long.
-c
-c          First, translate the group number into indicies in the data array
-c
-         nfirst=4*nint(V(SP-1))+istart-4
-         nlast=4*nint(V(SP))+istart-1 
-         SP=SP-2
-c
-	 if (nlast .le. nfirst .or. nfirst .lt. istart .or.
-     .	     nlast-nfirst+1 .ge. istop-istart+1) 
-     .		call oerror(n112, m2, 'SEDITS')
-c
-         NUM=nlast-nfirst+1
-         IEND=ISTOP-NUM
-         DO 131 I = nfirst,IEND
-            TWH(I,IPTWH)=TWH(I+NUM,IPTWH)
-  131       CONTINUE
-c
-         DO 132 I = 1,ISTOP-ISTART+1-num
-            XDATA(I)=TWH(I+istart-1,IPTWH)
-  132       CONTINUE
-c
-         CALL MEAN (n1,ISTOP-ISTART+n1-num,XDATA,IDBE,typscn,XMEAN,XRMS)
-c
-      else
-	call oerror(n283, m2, 'SEDITS')
-      endif
-c
-c
-      DTWH(C12NI,IPTWH)=DTWH(C12NI,IPTWH)-NUM
-      DTWH(C12ST,IPTWH)=XMEAN
-      DTWH(C12RMS,IPTWH)=XRMS
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C						TEMPS
-C----------------------------------------------------------------------
-  170 CONTINUE
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH)+ ISTART-1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'TEMPS')
-c
-      if (dtwh(c1tel,iptwh) .eq. t12m) then
-c
-         KK=0
-         DO 171 I = ISTART,ISTOP,4
-            if (okreal4(TWH(I+1,IPTWH)) .and.
-     .           okreal4(TWH(I+2,IPTWH)) .and.
-     .           okreal4(TWH(I+3,IPTWH)) .and.
-     .           okreal4(TWH(I,IPTWH))) then
-               TP=(TWH(I+1,IPTWH)+TWH(I+2,IPTWH)-TWH(I,IPTWH)
-     .              -TWH(I+3,IPTWH))/2.
-               kk = kk + 1
-               TSRC(kk) = TP
-               if (mod(kk,6) .eq. 0) then
-                  write(cpuf,233,iostat=ier) tsrc
- 233              format(1x,1p6g12.5)
-                  call pwrite(ipuf,n80)
-                  kk = 0
-               endif
-            endif
- 171     CONTINUE
-c                     clean up in case kk is non-zero
-         if (kk .ne. 0) then
-            write(cpuf,233,iostat=ier) (tsrc(i), i=1,kk)
-            call pwrite(ipuf, n80)
-         endif
-c     
-      else if(dtwh(c1tel,iptwh) .eq. nrao140 .or. 
-     .        dtwh(c1tel,iptwh) .eq. nrao300) then
-c
-	npairs = istop - istart - 2
-	if (.not.okreal4(TWH(ISTOP-1,IPTWH)) .or.
-     .	    .not.okreal4(TWH(ISTOP-2,IPTWH)) .or.
-     .	    .not.okreal4(TWH(ISTOP,IPTWH)))
-     .		call oerror(n268, m2, "TEMPS: Cannot proceed")
-        TMP = TWH(ISTOP-1,IPTWH)-(TWH(ISTOP-2,IPTWH)+
-     .      TWH(ISTOP,IPTWH))/2.
-        SCL = dtwh(c12ct,IPTWH) / TMP
-        kk = 0
-        DO 231 I = 2,NPAIRS,2
-          if (okreal4(TWH(ISTART+I-1,IPTWH)) .and.
-     .        okreal4(TWH(ISTART+I-2,IPTWH)) .and.
-     .        okreal4(TWH(ISTART+I,IPTWH))) then
-		DIFF = TWH(ISTART+I-1,IPTWH)-(TWH(ISTART+I-2,IPTWH)+
-     .              TWH(ISTART+I,IPTWH))/2.
-	  	kk = kk + 1
-          	TSRC(kk) = DIFF*SCL
-	  	if (mod(kk,6) .eq. 0) then
-		   write(cpuf,233,iostat=ier) tsrc
-		   call pwrite(ipuf,n80)
-		   kk = 0
-		endif
-	  endif
- 231    CONTINUE
-c
-        if (kk .ne. 0) then
-	   write(cpuf,233,iostat=ier) (tsrc(i), i = 1, kk)
-	   call pwrite(ipuf,n80)
-        endif
-c
-      else
-	call oerror(n283, m2, 'TEMPS')
-      endif
-c
-        GO TO 99
-C------------------------------------------------------------------------
-C							SOLVETIP
-C-----------------------------------------------------------------------
-  190 CONTINUE
-c
-c
-      ISTART=DTWH(C12SPN,IPTWH) + idatoff
-      ISTOP=DTWH(C12NI,IPTWH)+ ISTART-1
-c
-      if (istart .gt. istop .or. istart .le. 0) 
-     .		call oerror(n225, m2, 'SOLVETIP')
-c
-      if(dtwh(c1tel,iptwh) .eq. nrao140 .or. 
-     .        dtwh(c1tel,iptwh) .eq. nrao300) then
-c
-         tcal = dtwh(c12ct, iptwh)
-         tamb = dtwh(c5at,iptwh) + 273.16
-         npts = nint(dtwh(c12ni, iptwh))
-   	 if (mod(npts,3) .ne. 0 .or. npts .gt. 3*ntpts) 
-     .			call oerror(n250, m2, 'SOLVETIP')
-c
-         DO 165 J = 1, npts
-	    if (.not. okreal4(TWH(istart - 1 + J,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-            TIP(J) = DBLE (TWH(istart - 1 + J, IPTWH))
-  165       CONTINUE
-c
-         WRITE (unit=cpuf,fmt=90000) npts, tamb, tcal
-90000    FORMAT ('NPTS, TAMB, TCAL:', 1X,  I5, 2G14.7)
-         call pwrite(ipuf,n80) 
-c     
-         CALL TIPSLV (NPTS,dble(TAMB),dble(TCAL),TIP,secz,tau8,trx8)
-	 tau0 = tau8
-	 trcvr = trx8
-c
-      else if (dtwh(c1tel,iptwh) .eq. t12m) then 
-c
-         npt = (nint(dtwh(c12ni,iptwh)) + 1) / 2
-         if (npt .ne. ntpts) call oerror(n265, m2, 'SOLVETIP')
-c			verify that there are the correct number of pts
-c	
-        TAMB=DTWH(C5AT,IPTWH)
-        TVAN=TVANE
-        IF (TVANE .LE. 0.0) TVAN=TAMB
-        FRQ=DTWH(C12CF,IPTWH)*0.001
-        TAUG=TAU0
-        SUMX=0.
-        SUMY=0.
-        SUMXY=0.
-        SUMX2=0.
-        SUMY2=0.
-        ITYPE=IFIX(TYPETIP)
-        IF (ITYPE .EQ. 1) THEN
-           TM=FTM*(TAMB+273.15)
-           TSBR=FTSBR*(TAMB+273.15)
-           YSBR=(1.0-ETA)*TSBR
-           YM=ETA*TM
-           IF (TRCVR.le.0.0) then
-             TRY=0.9187*DTWH(C12SST,IPTWH)
-	   else
-             TRY=TRCVR
- 	   endif
- 	   DO 191 I=1,npt-1
-	      if (.not. okreal4(TWH(istart-1+I,IPTWH)) .or.
-     .		  .not. okreal4(TWH(istart-1+2*npt-I,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-              TSKY(I)=(TWH(istart-1+I,IPTWH)
-     .           + TWH(istart-1+2*npt-I,IPTWH))/2.-TRY
-  191         CONTINUE
-	   if (.not. okreal4(TWH(istart-1+npt,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-           TSKY(npt)=TWH(istart-1+npt,IPTWH)-TRY
-           DO 192 I=1,npt
-              YI(I)=1.0-(TSKY(I)-YSBR)/YM
-              IF (YI(I).lt.0.0) call oerror(n234, m2, 'SOLVETIP')
-192	      continue
-           DO 193 I=1,npt
-               YY=YI(I)
-               SUMXY=SUMXY+AIRMASS(I)*ALOG(YY)
-               SUMX=SUMX+AIRMASS(I)
-               SUMY=SUMY+ALOG(YY)
-               SUMX2=SUMX2+AIRMASS(I)*AIRMASS(I)
-               SUMY2=SUMY2+ALOG(YY)**2
-  193          CONTINUE
-            EB=-((SUMXY-(SUMX*SUMY)/float(npt))/
-     .           (SUMX2-(SUMX*SUMX)/float(npt)))
-            EA=EXP(SUMY/float(npt)+EB*(SUMX/float(npt)))
-            RS1=(SUMXY-(1./float(npt))*SUMX*SUMY)**2
-            RS2=(SUMX2-(SUMX*SUMX)/float(npt))*
-     .          (SUMY2-(SUMY*SUMY)/float(npt))
-            RS=RS1/RS2
-            DO 194 I=1,11
-               JJ=I
-               IF (JJ.GT.npt) JJ=2*npt-JJ
-               TWH(istart-1+I,IPTWH)=TRY+YM*
-     .                    (1.0-EXP(-EB*AIRMASS(JJ)))+YSBR
-  194          CONTINUE
-            TAU=EB
-            DELTAU=RS
-c
-        endif
-        IF (ITYPE .EQ. 2 .OR. (ITYPE .EQ. 3 .AND. TAU0 .LE. 0.)) THEN
-c
-            DO 197 I = 1, npt-1
-	      if (.not. okreal4(TWH(istart-1+I,IPTWH)) .or.
-     .		  .not. okreal4(TWH(istart-1+2*npt-I,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-              YI(I)=(TWH(istart-1+I,IPTWH)+
-     .               TWH(istart-1+2*npt-I,IPTWH))/2.
-              IF (ITYPE .EQ. 3) YI(I)=LOG(YI(I))
-  197         CONTINUE
-	    if (.not. okreal4(TWH(istart-1+npt,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-            YI(npt)=TWH(istart-1+npt,IPTWH)
-            IF (ITYPE .EQ. 3) YI(npt)=LOG(YI(npt))
-            DO 198 I = 1,npt
-               SUMXY=SUMXY+AIRMASS(I)*YI(I)
-               SUMX=SUMX+AIRMASS(I)
-               SUMY=SUMY+YI(I)
-               SUMX2=SUMX2+AIRMASS(I)*AIRMASS(I)
-               SUMY2=SUMY2+YI(I)*YI(I)
-  198          CONTINUE
-            ZX=SUMX/float(npt)
-            ZY=SUMY/float(npt)
-            A1=(SUMXY-(SUMX*SUMY)/float(npt))/
-     .         (SUMX2-(SUMX*SUMX)/float(npt))
-            A0=ZY-A1*ZX
-            RS1=SUMXY-(SUMX*SUMY)/float(npt)
-            RS2=(SUMX2-(SUMX*SUMX)/float(npt))*
-     .          (SUMY2-(SUMY*SUMY)/float(npt))
-            RS=(RS1*RS1)/RS2
-            IF (ITYPE .EQ. 2) THEN
-               DO 199 I = 1,npt
-                  TWH(I+istart-1,IPTWH)=A0+A1*AIRMASS(I)
-  199             CONTINUE
-               DO 299 I = npt+1,2*npt - 1
-                  TWH(I+istart-1,IPTWH)=TWH(2*npt-I+istart-1,IPTWH)
-  299             CONTINUE
-            ENDIF
-            EB=ABS(A1)
-            TAUG=EB
-            TAU=EB
-            DELTAU=RS
-	 else if (itype .eq. 3 .and. tau0 .gt. 0.) then
-c	    Now, take care of the case the user wants to use the supplied value
-c	    of adverb TAU0 as a first guess for the non-linear fit.
-	    taug = tau0
-	    tau =  tau0
-	    deltau = 0.0
-         endif
-         IF (ITYPE.EQ.3) THEN
-           DO 195 I = 1,npt-1
-	      if (.not. okreal4(TWH(istart-1+I,IPTWH)) .or.
-     .		  .not. okreal4(TWH(istart-1+2*npt-I,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-              YI(I)=(TWH(istart-1+I,IPTWH)+
-     .               TWH(istart-1+2*npt-I,IPTWH))/2.
-  195         CONTINUE
-	   if (.not. okreal4(TWH(istart-1+npt,IPTWH)))
-     .		call oerror(n268, m2, "SOLVETIP: Cannot proceed")
-           YI(npt)=TWH(istart-1+npt,IPTWH)
-           CALL VSNTIP(AIRMASS,YI,NPT,FRQ,TAMB,TVAN,FTSBR,FTM,TAU,
-     .               DELTAU,ETA,DELETA,ETAFREE,NOVCVG,CHISQR)
-           DO 196 I = 1,npt
-              TWH(istart-1+I,IPTWH)=YI(I)
-  196         CONTINUE
-           DO 1903 I = npt+1,2*npt - 1
-              TWH(I+istart-1,IPTWH)=TWH(2*npt-I+istart-1,IPTWH)
- 1903         CONTINUE
-        ENDIF
-        IF (ITYPE .EQ. 1) THEN
-           WRITE (CPUF,2000,IOSTAT=IER) TAU,DELTAU
- 2000      FORMAT (16X,'TAU=',F6.4,' (',F6.4,')')
-           CALL PWRITE (IPUF,n80)
-           WRITE (CPUF,2001,IOSTAT=IER) trcvr, ETA
- 2001 	   FORMAT (16X,'TRCVR = ', f7.2, '  ETAL=',F6.4)
-           CALL PWRITE (IPUF,n80)
-        else IF (ITYPE .EQ. 2) THEN
-           WRITE (CPUF,2002,IOSTAT=IER) TAU, DELTAU
- 2002      FORMAT (16X,'TAU=',F6.4,' (',F6.4,')')
-           CALL PWRITE (IPUF,n80)
-        else IF (ITYPE .EQ. 3) THEN
-           WRITE (CPUF,2003,IOSTAT=IER) TAU,DELTAU,TAUG
- 2003      FORMAT (16X,'TAU=',F6.4,' (',F6.4,')',26X,'TAU0=',F6.4)
-           CALL PWRITE (IPUF,n80)
-           WRITE (CPUF,2004,IOSTAT=IER) ETA,DELETA,ETAFREE
- 2004      FORMAT (15X,'ETAL=',F6.4,' (',F6.4,')',26X,'ETAFREE=',F2.0)
-           CALL PWRITE (IPUF,n80)
-           WRITE (CPUF,2005,IOSTAT=IER) CHISQR
- 2005      FORMAT (15X,'CHISQR=',F10.2)
-           CALL PWRITE (IPUF,n80)
-        ENDIF
-c
-      else
-	call oerror(n283, m2, 'SOLVETIP')
-      endif
-C
-      GO TO 99
-C------------------------------------------------------------------------c
-
-  99  CONTINUE
-C-----------------------------------------------------------------------
-C
-      RETURN
-      END
-c
-
diff -uNr 3.5/source/conline/condar/chantox.F unipops-3.6/source/conline/condar/chantox.F
--- 3.5/source/conline/condar/chantox.F	2000-03-16 11:37:50.000000000 -0700
+++ unipops-3.6/source/conline/condar/chantox.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,189 +0,0 @@
-      double precision function chantox(unittype, array, v1, ierr)
-c
-c     @(#)chantox.F	5.1 06/22/94
-c
-c     Converts X1 from channel number to units specified by UNITTYPE.
-c	for array ARRAY.
-c
-c     UNITTYPE = (I*2) Units of V1.
-c  
-c		Continuum     	   	   Spectral Line
-c		-------------------------------------------
-c		-2 = matrix -x	   	    -2 = matrix -x
-c		-1 = matrix -y	   	    -1 = matrix -y
-c		1 = channel	   	    1 = channel
-c		2 = time offset	   	    2 = frequency offset
-c		3 = pos. offset (header)    3 = velocity (header)
-c		4 = pos. offset-x   	    4 = velocity (Radio)
-c		5 = pos. offset-y  	    5 = velocity (Optical)
-c		6 = position x	  	    6 = velocity (Relativity)
-c		7 = position y	  	    7 = velocity (Linear)
-c		8 = LST			    8 = rest frequency  (sig)
-c		9 = UT	 	    	    9 = sky frequency (sig)
-c			  		    *10 = rest frequency  (imag)
-c					    *11 = sky frequency (imag) 
-c
-c     Those items preceeded with a * have been implemented for 12m data only
-c
-c     IERR = (I*2) If conversion is not possible, ierr will be 1, else
-c	it will be 0.
-c     V1 = value to be converted.         
-c	
-      integer*2 unittype, ierr
-      real*8 array(*), lstut
-      real*4 v1
-      logical okreal8
-c
-#ifdef CONTINUUM
-#else
-      integer isb
-      double precision chantovel, dveldef, fshift, nrao12m
-      character*8 veldef, cnrao12m
-      equivalence (dveldef, veldef), (nrao12m, cnrao12m)
-c
-      data cnrao12m /'NRAO 12M'/
-c
-#endif
-c
-      include 'cform.inc'
-      include 'mform.inc'
-c
-      data lstut/1.002737908d0/
-c
-      ierr = 0
-c
-      if (unittype .eq. -2  .and. okreal8(array(mrval1)) .and. 
-     .	       okreal8(array(mdelt1)) .and. okreal8(array(mpix1)) ) then
-	chantox = (v1-array(mpix1))*array(mdelt1) + array(mrval1)
-c-----------------------
-c
-      else if (unittype .eq. -1  .and. okreal8(array(mrval2)) .and. 
-     .	       okreal8(array(mdelt2)) .and. okreal8(array(mpix2)) ) then
-	chantox = (v1-array(mpix2))*array(mdelt2) + array(mrval2)
-c-----------------------
-c
-      else if (unittype .eq. 1) then
-	chantox = v1
-c-----------------------
-c
-#ifdef CONTINUUM
-      else if (unittype .eq. 2 .and. okreal8(array(c3srt)) .and. 
-     .         okreal8(array(c12rp)) ) then
-	chantox = (v1-array(c12rp))*array(c3srt)
-c-----------------------
-c
-      else if (unittype .eq. 3 .and. okreal8(array(c12dx)) .and.
-     .      okreal8(array(c12x0)) .and.
-     .      okreal8(array(c12rp)) )  then
-        chantox = (v1-array(c12rp))*array(c12dx) + array(c12x0)
-c-----------------------
-c
-      else if (unittype .eq. 4 .and. 
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp)) * array(c6dx) * array(c3srt)/ 3600.
-c-----------------------
-c
-      else if (unittype .eq. 5 .and. 
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp)) * array(c6dy) * array(c3srt)/ 3600.
-c-----------------------
-c
-      else if (unittype .eq. 6 .and. 
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c4sx)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp)) * array(c6dx) * array(c3srt)/ 3600.
-     .		 + array(c4sx)
-c-----------------------
-c
-      else if (unittype .eq. 7 .and.
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c4sy)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp))*array(c6dy) * array(c3srt) / 3600.
-     .		+ array(c4sy)
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3lst)) ) then 
-     	chantox = (v1 - array(c12rp))*array(c3srt)*lstut / 3600. +
-     .			array(c3lst)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3ut)) ) then 
-     	chantox = (v1 - array(c12rp))*array(c3srt)/ 3600. +
-     .			  + array(c3ut)
-c-----------------------
-c
-#else
-      else if (unittype .eq. 2 .and. okreal8(array(c12fr)) .and.
-     .	  okreal8(array(c12rp)) ) then
-	  chantox = (v1-array(c12rp))*array(c12fr)
-c-----------------------
-c
-      else if (unittype .eq. 3) then
-	  dveldef = array(c7vrd)
- 	  chantox = chantovel(v1, array, veldef(1:4), ierr)
-c-----------------------
-c
-      else if (unittype .eq. 4) then
-	chantox = chantovel(v1, array, 'RADI',ierr)
-c----------------------- 
-c
-      else if (unittype .eq. 5) then
-	chantox = chantovel(v1, array, 'OPTL',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 6) then
-	chantox = chantovel(v1, array, 'RELV',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 7) then
-	chantox = chantovel(v1, array, '    ',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. okreal8(array(c12rf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	chantox = (v1 - array(c12rp))*array(c12fr) + array(c12rf)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. okreal8(array(c12cf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	chantox = (v1 - array(c12rp))*array(c12fr) + array(c12cf)
-c-----------------------
-c
-      else if ((array(c1tel) .eq. nrao12m) .and. 
-     .        ((unittype .eq. 10) .or. (unittype .eq. 11))) then
-         if (okreal8(array(c9fif)) .and. okreal8(array(c9sb)) .and.
-     .       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) .and.
-     .       okreal8(array(c12cf))) then
-C
-            isb = ifix(array(c9sb))
-            if ((isb .eq. 0) .or. (isb .eq. 2)) then
-               fshift = -2.0 * array(c9fif) / 1000.0
-            else
-               fshift = 2.0 * array(c9fif) / 1000.0
-            endif
-c
-            if (unittype .eq. 10 .and. okreal8(array(c12rf)) .and.
-     .          array(c12cf) .ne. 0.0) then
-               chantox = (v1 - array(c12rp))*(-1.0*array(c12fr)) +
-     .                   (array(c12rf) * (1 + fshift/array(c12cf)))
-            else if (unittype .eq. 11) then
-               chantox = (v1 - array(c12rp)) * (-1.0 * array(c12fr)) +
-     .                   (array(c12cf) + fshift)
-            else
-               ierr = 1
-               chantox = v1
-            endif
-         endif
-#endif
-c
-      else
-	ierr = 1
-	chantox = v1
-c
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/cheader.f unipops-3.6/source/conline/condar/cheader.f
--- 3.5/source/conline/condar/cheader.f	2000-03-16 11:36:39.000000000 -0700
+++ unipops-3.6/source/conline/condar/cheader.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,90 +0,0 @@
-      subroutine cheader
-c
-c     @(#)cheader.f	5.2 05/04/98
-c
-c     Lists out the contents of the header of the current cube
-c
-      integer*2 istch(40), ierr, n, iinitp, n1
-      integer*2 n80
-      integer*4 n24, nchar
-      character*80 stch
-      character*24 sdate
-c
-      include 'cio.inc'
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      equivalence(istch, stch)
-c
-      data n24, n80 /24, 80/
-c
-      write(stch,10)
-10    format(72('-'))
-      call pwrite(istch,n80)
-c
-      stch = 'Filename: ' // ccube 
-      call pwrite(istch,n80)
-c
-      stch = 'Object: ' // cchead(cobject) //  
-     .                     cchead(cobject+1)
-      call pwrite(istch,n80)
-      call fromdate(n24, nchar, chead(cdate), sdate)
-      stch = 'Date: ' // sdate //  
-     .	     '       Origin: ' //cchead(corigin) 
-      call pwrite(istch,n80)
-c
-      write(stch,12)
-12    format(' ')
-      call pwrite(istch,n80)
-c
-      write(stch,15)
-15    format('Axis',2x,'Num pixels',3x,'Units',6x,'Ref. value',10x,
-     .		'Delta',5x,'Ref. pixel')
-      call pwrite(istch,n80)
-c
-      write(stch,20,iostat=ierr) ' X: ', nint(chead(cnaxis1)), 
-     .		cchead(ctype1), chead(crval1), chead(cdelt1), chead(cpix1)
-20    format(a4, 7x, i5, 3x, a8, 2x, 1p3g15.6)
-      call pwrite(istch,n80)
-c
-      write(stch,20,iostat=ierr) ' Y: ', nint(chead(cnaxis2)), 
-     .		cchead(ctype2), chead(crval2), chead(cdelt2), chead(cpix2) 
-      call pwrite(istch,n80)
-c
-      write(stch,20,iostat=ierr) ' Z: ', nint(chead(cnaxis3)), 
-     .		cchead(ctype3), chead(crval3), chead(cdelt3), chead(cpix3) 
-      call pwrite(istch,n80)
-c     X, Y and Z axis parameters
-c
-      write(stch,12)
-      call pwrite(istch,n80)
-c			display equinox if non-zero
-      if (chead(cequinox) .ne. 0) then
-         write(stch,21,iostat=ierr) chead(cequinox)
- 21      format('Equinox: ',1pg15.6)
-         call pwrite(istch,n80)
-         write(stch,12)
-         call pwrite(istch,n80)
-      endif
-c
-      write(stch,25,iostat=ierr) cchead(cbunit)
-25    format('Units of data values: ', a8)
-      call pwrite(istch,n80)
-c
-      write(stch,35,iostat=ierr) chead(ctmin), cchead(ctmax)
-35    format('Min/Max values: ',1p2g15.6)
-      call pwrite(istch,n80)
-c
-      stch = 'Comment:  '
-      n = 4*min(7,(cheadsize-ccomment+1))
-      n1 = iinitp(ccomment)
-      call copy(n, chead(ccomment), istch(6))
-      call pwrite(istch,n80)
-c     Takes care of comments      
-c
-      write(stch,10)
-      call pwrite(istch,n80)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/checkbyloc.f unipops-3.6/source/conline/condar/checkbyloc.f
--- 3.5/source/conline/condar/checkbyloc.f	2000-03-16 11:36:39.000000000 -0700
+++ unipops-3.6/source/conline/condar/checkbyloc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,37 +0,0 @@
-      subroutine checkbyloc(iloc,iunit, filename, scanno, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)checkbyloc.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Checks whether a scan exists at a certain location within a data file
-c
-c     filename is ignored
-c
-      character*(*) filename
-      integer*2 iloc, iunit, ierr
-      integer*4 lloc, lunit, lrtn
-      real scanno
-c
-      scanno = -1
-      lunit = iunit
-      lloc = iloc
-      ierr = 0
-c
-c		get the index at iloc
-c
-      call scanloc(lunit, lloc, scanno, lrtn)
-c
-      if (lrtn .ne. 0) then
-         if (lrtn .eq. 1) ierr = -370
-         if (lrtn .eq. 2) ierr = -357
-         if (lrtn .eq. 3) ierr = -359
-         if (lrtn .eq. 4) ierr = 371
-         scanno = -1
-      endif
-c	retrieves the scan number 
-c
-99    continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/chgres.f unipops-3.6/source/conline/condar/chgres.f
--- 3.5/source/conline/condar/chgres.f	2000-03-16 11:36:40.000000000 -0700
+++ unipops-3.6/source/conline/condar/chgres.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,168 +0,0 @@
-      SUBROUTINE CHGRES(TOLD,NCHAN,OLDRES,NEWRES)
-C-------------------------------------------------------------------------------
-C  @(#)chgres.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-C
-C  THIS SUBROUTINE SMOOTHS SPECTRAL LINE DATA FROM ITS INITIAL
-C  RESOLUTION TO A LOWER RESOLUTION SPECIFIED BY THE ADVERB
-C  'NEWRES'.  THE ROUTINE WORKS BY STEPPING A GAUSSIAN OF
-C  APPROPRIATE FWHM THROUGH THE EXISTING SPECTRUM AND PERFORMING
-C  A CONVOLUTION AT EACH POSITION.  THE ROUTINE ASSUMES THAT
-C  THERE ARE AN EVEN NUMBER OF CHANNELS IN THE INITIAL SPECTRUM
-C  AND THAT THE CENTER FREQENCY IN THE SCAN HEADER CORRESPONDS
-C  TO CHANNEL N/2 + 0.5, E.G., 64.5, 128.5, ETC.  EACH INDIVIDUAL
-C  CONVOLUTION IS PERFORMED OUT TO A SPECIFIED NUMBER OF STANDARD
-C  DEVIATIONS OF THE CONVOLVING GAUSSIAN, SAY 5 OR 6 SIGMA.  THE
-C  SMOOTHING IS TERMINATED WHEN THE CONVOLVING GAUSSIAN IS WITHIN
-C  A SPECIFIED NUMBER OF SIGMAS OF THE ENDS OF THE INITIAL SPECTRUM
-C  SO THAT THE END POINTS OF THE NEW SPECTRUM REPRESENT VALID 
-C  INFORMATION (2 OR 3 SIGMA IS A REASONABLE LIMIT).  THE REMAINING
-C  POINTS IN THE NEW SPECTRUM ARE SET EQUAL TO ZERO;  THE USER CAN
-C  DROP THESE POINTS FROM THE DISPLAYED SPECTRUM.
-c
-c  The center freq./reference channel need not be N/2 + 0.5, the
-c   reference channel is corrected in au2 after chgres returns
-C
-C ** WRITTEN BY P. R. JEWELL AND E. B. STOBIE  7 NOV 1985 **
-C ** LAST MODIFIED BY P.R.J. AND E.B.S. 9 NOV 1985 **
-c   Modified 8903 [RJM] See CHANGES.DOC
-C
-      include 'params.inc'
-c
-      real*4 TOLD(*), TNEW(MAX_DATA_POINTS)
-      REAL*4 NEWRES, oldres, conres, a2, rta2, conlim, conend,
-     .       freqend, bord, conbord, cchan, chstep, chpos, xarg, xnorm,
-     .       freqlc, chlim, xdist, arg, rinfinity
-      integer*2 n120, n243, m2, m3, n269
-      integer*2 nchan, ncon, i, j, ichan, istart, istop
-      logical okreal4
-c
-      include 'cio.inc'
-c
-      data n120, n243, m2, m3 /120, 243, -2, -3/
-      data n269 /269/
-C
-C  KEY TO VARIABLE NAMES:
-C     	OLDRES = ORIGINAL FREQ. RESOLUTION OF THE SPECTRUM
-C	NCHAN = TOTAL NUMBER OF CHANNELS IN THE SPECTRUM
-C	NEWRES = DESIRED NEW FREQ. RESOLUTION OF THE SPECTRUM
-c              = FWHM of convolving gaussian
-C	CONRES = RESOLUTION OF THE CONVOLVING GAUSSIAN
-C	CONLIM = NUMBER OF SIGMAS OF THE CONVOLVING GAUSSIAN TO
-C                  CARRY AN INDIVIDUAL CONVOLUTION OUT TO.
-C	CONEND = NUMBER OF SIGMAS OF THE CONVOLVING GAUSSIAN TO
-C                  ALLOW AS A BORDER AT THE 2 ENDPOINTS OF THE SPEC.
-C
-c		newres must be > oldres
-      IF(NEWRES .lt. OLDRES .or. min(newres,oldres).le.0.0) 
-     .    call oerror(n243, m2, 'CHNGRES')
-c		NCHAN must be even
-      if (mod(nchan,2) .ne. 0) call oerror(n269, m2, 'CHNGRES')
-c
-      if (nchan .lt. 1 .or. nchan .gt. MAX_DATA_POINTS)
-     .   call oerror(n120, m3, 'CHNGRES')
-      CCHAN = NCHAN / 2. + 0.5
-C
-C  THE FWHM'S OF CONVOLVING GAUSSIANS ADD QUADRATICALLY:
-C      CONRES = SQRT( NEWRES*NEWRES - OLDRES*OLDRES )
-c			I don't understand why the below is preferred over
-c                       the above - rwg.
-      CONRES = NEWRES
-      A2 = 4.0 * ALOG( 2. )
-      RTA2 = SQRT( A2 )
-      XARG = RTA2 * OLDRES / CONRES
-      CONLIM = 4.
-      CONEND = 1.
-C  A STANDARD DEVIATION SIGMA = 0.4248 * FWHM
-c			0.4248 = 1 / sqrt(8 ln(2))
-C  CALCULATE THE NUMBER OF CONVOLUTIONS PERFORMED ON EITHER SIDE OF THE
-C    CENTER POINT
-      FREQEND = ( NCHAN - CCHAN ) * OLDRES
-      CONBORD = CONEND * .4248 * CONRES
-      NCON = FREQEND / NEWRES
-      FREQLC = NCON * NEWRES
-      BORD = FREQEND - FREQLC
-      IF(BORD .LT. CONBORD) NCON = NCON - 1
-C
-C  IN THE LOOPS BELOW, THE OUTER LOOP STEPS THE CONVOLVING GAUSSIAN
-C  THROUGH THE SPECTRUM WITH STEPSIZES = NEWRES;  THE INNER LOOP
-C  PERFORMS THE INDIVIDUAL CONVOLUTIONS.  TWO SETS OF LOOPS ARE USED,
-C  THE FIRST WORKING FROM THE CENTER TO HIGHER CHANNELS AND THE
-C  SECOND FROM THE CENTER TO LOWER CHANNELS.
-C
-C  COMPUTE THE STEPSIZE, THE LIMIT OF THE CONVOLUTION, AND THE POSITION
-C  OF THE CENTER OF THE CONV. GAUSSIAN IN FRACTIONAL CHANNEL NUMBERS.
-C
-      CHSTEP = NEWRES / OLDRES
-      CHLIM = CONLIM * .4248 * CHSTEP
-      CHPOS = CCHAN + 0.5 * CHSTEP
-C
-C  INITIALIZE THE NEW SPECTRUM TO ZERO
-      DO 30 I = 1, NCHAN
-        TNEW(I) = 0.0
-  30  CONTINUE
-C
-C  DO THE CONVOLUTION FOR THE UPPER HALF OF THE SPECTRUM:
-C
-      ICHAN = CCHAN
-      DO 60 I = 1, NCON
-        ICHAN = ICHAN + 1
-        ISTART = CHPOS - CHLIM + 0.5
-        ISTOP = CHPOS + CHLIM + 0.5
-        IF(ISTART .LT. 1) ISTART = 1
-        IF(ISTOP .GT. NCHAN) ISTOP = NCHAN
-	xnorm = 0.0
-        DO 55 J = ISTART, ISTOP
-          XDIST = CHPOS - J
-          ARG = -XARG * XDIST * XARG * XDIST
-          if (okreal4(told(j))) then
-          	TNEW(ICHAN) = TOLD(J) * EXP(ARG) + TNEW(ICHAN)
-		xnorm = xnorm + exp(arg)
-	  endif
-  55    CONTINUE
-        if (xnorm .gt. 0.0) then
-	   TNEW(ICHAN) = TNEW(ICHAN)/xnorm
-	else
-	   tnew(ichan) = rinfinity()
-	endif
-        CHPOS = CHPOS + CHSTEP
-  60  CONTINUE
-C
-C  DO THE CONVOLUTION FOR THE LOWER HALF OF THE SPECTRUM:
-C
-      CHPOS = CCHAN - 0.5 * CHSTEP
-      ICHAN = CCHAN + 1.
-      DO 70 I = 1, NCON
-        ICHAN = ICHAN - 1
-        ISTART = CHPOS - CHLIM + 0.5
-        ISTOP = CHPOS + CHLIM + 0.5
-        IF(ISTART .LT. 1) ISTART = 1
-        IF(ISTOP .GT. NCHAN) ISTOP = NCHAN
-	xnorm = 0.0
-        DO 65 J = ISTART, ISTOP
-          XDIST = CHPOS - J
-          ARG = -XARG * XDIST * XARG * XDIST
-          if (okreal4(told(j))) then
-          	TNEW(ICHAN) = TOLD(J) * EXP(ARG) + TNEW(ICHAN)
-		xnorm = xnorm + exp(arg)
-	  endif
-  65    CONTINUE
-        if (xnorm .gt. 0.0) then
-	   TNEW(ICHAN) = TNEW(ICHAN)/xnorm
-	else
-	   tnew(ichan) = rinfinity()
-	endif
-        CHPOS = CHPOS - CHSTEP
-  70  CONTINUE
-C  
-C  REPLACE THE OLD SPECTRUM AND HEADER VALUES WITH THE NEW VALUES:
-C
-      DO 80 I = 1, NCHAN
-	if (i .lt. cchan-ncon .or. i .gt. cchan+ncon) then
-          TOLD(I) = rinfinity()
-	else
-          TOLD(I) = TNEW(I)
-	endif
-  80  CONTINUE
-  99  RETURN
-      END
diff -uNr 3.5/source/conline/condar/chngol.F unipops-3.6/source/conline/condar/chngol.F
--- 3.5/source/conline/condar/chngol.F	2000-03-16 11:36:40.000000000 -0700
+++ unipops-3.6/source/conline/condar/chngol.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine chngol(iftype, iver)
-c------------------------------------------------------------------------
-c @(#)chngol.F	5.1 06/22/94
-c
-c     This subroutine is the fortran frontend to the on-line function
-c     chngonline, which changes both the online file type and the version.
-c     The validity of the version is checked in chngonline but the
-c     appropriateness of the file type is checked here.  
-c------------------------------------------------------------------------
-c
-      integer*4 iftype, iver
-      integer*2 m1, m2, n300, ier
-c
-      include 'cio.inc'
-      include 'core.inc'
-c
-      data m1 /-1/ , m2 /-2/, n300 /300/
-c
-#ifdef CONTINUUM
-      if (iftype .ne. 3) call oerror(n300, m1, 'CHNGONLINE')
-#else
-      if (iftype .ne. 1 .and. iftype .ne. 2) 
-     .   call oerror(n300, m1, 'CHNGONLINE')
-#endif
-c
-      call chngonline(iftype, iver, projcode, ier)
-      if (ier .ne. 0) call oerror(ier, m2, 'CHNGONLINE')
-c                   set pointer appropriate pointer adverb
-      if (iftype .eq. 1) hcver = iver
-      if (iftype .eq. 2) fbver = iver
-      if (iftype .eq. 3) conver = iver
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/chngver.F unipops-3.6/source/conline/condar/chngver.F
--- 3.5/source/conline/condar/chngver.F	2000-03-16 11:36:41.000000000 -0700
+++ unipops-3.6/source/conline/condar/chngver.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,59 +0,0 @@
-      subroutine chngver(iftype)
-c-----------------------------------------------------------------------
-c @(#)chngver.F	5.1 06/22/94
-c
-c  Fortran front end to changever on-line function
-c  Currently this only works for TUCSON data, but the check for that happens
-c  in stores.  This routine exists only to check that iftype is appropriate
-c  for the program currently being used (line or condar).
-c------------------------------------------------------------------------
-c
-      integer*2 m1, n300, ier
-      integer*4 iftype, iver
-#ifdef CONTINUUM
-#else
-      character*80 cans, uans
-#endif
-      character*2 fb, hc
-c
-      include 'cio.inc'
-      include 'core.inc'
-c
-      data m1, n300 /-1, 300/
-      data fb /'FB'/, hc /'HC'/
-c
-#ifdef CONTINUUM
-      if (iftype .eq. -1) iftype = 3
-      if (iftype .ne. 3) call oerror(n300, m1, 'CHNGVER')
-#else
-      if (iftype .eq. -1) then
- 100     write(istdout,1000)
- 1000    format(' Type of on-line file ',
-     .          '(FB=filterbank, HC=hybrid correlator) : ',$)
-         read(istdin, 1010) cans
- 1010    format(a80)
-         call uppercase(cans, uans)
-         if (uans(1:2) .eq. fb) then
-            iftype = 2
-         else if (uans(1:2) .eq. hc) then
-            iftype = 1
-         else
-            write(istdout, 1020) cans(1:2)
- 1020       format(' Unrecognized file type : ',a2)
-            goto 100
-         endif
-      endif
-c
-      if (iftype .ne. 1 .and. iftype .ne. 2) 
-     .   call oerror(n300, m1, 'CHNGVER')
-#endif
-c
-      call changever(iftype, iver, projcode, ier)
-      if (ier .ne. 0) call oerror(ier, m1, 'CHNGVER')
-c				set apropriate pointer adverb
-      if (iftype .eq. 1) hcver = iver
-      if (iftype .eq. 2) fbver = iver
-      if (iftype .eq. 3) conver = iver
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/conversion2.f unipops-3.6/source/conline/condar/conversion2.f
--- 3.5/source/conline/condar/conversion2.f	2000-03-16 11:36:41.000000000 -0700
+++ unipops-3.6/source/conline/condar/conversion2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,119 +0,0 @@
-      subroutine conversion2(input, output, ier)
-C-------------------------------------------------------------------------------
-C  @(#)conversion2.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Converts from SDD #1 format to internal format of UniPOPS
-c
-      include 'params.inc'
-      integer*4 maxclass, i, nextout, inclasses, ifirst, j, ilast,
-     .		i1, i2, headsize, datalen, noint, spn, 
-     .           maxperclass(20), bootsize
-      double precision input(*), output(*)
-c
-      integer*2 iindat(16), ioutdat(16), ier
-      double precision dindat(4), doutdat(4)
-c
-      equivalence (dindat, iindat), (doutdat, ioutdat)
-c
-      include 'cform.inc'
-c
-      data maxclass/14/
-      data maxperclass/25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-     .                 66, 25, 25, 25,  0,  0,  0,  0,  0,  0/
-c     MAXCLASS = max. number of classes
-c     MAXPERCLASS = max. number of R*8 entries in each class
-c
-      ier = 0
-      bootsize = (maxclass+5)/4
-      do 10 i = 1, bootsize
-	dindat(i) = input(i)
-10	continue
-c     Move class descriptors into DINDAT
-c
-      nextout = bootsize + 1
-c     nextout = location in OUTPUT where next class starts
-c
-      headsize = input(iindat(2))/8.d0
-      if (headsize*8 .ne. nint(input(iindat(2)))) 
-     .		headsize = headsize + 1
-c     headsize = num. R*8 words in input header
-c
-      inclasses = min(maxclass,iindat(1))
-      ioutdat(1) = inclasses
-      ioutdat(2) = (inclasses+5)/4 + 1
-c     Find max number of classes needed, up to above limit and
-c     start puting new class descriptors into DOUTDAT
-c
-      do 100 i = 1, inclasses
-	ifirst = iindat(i+1)
-	if (ifirst .lt. 0) then
-	   ier = -1
-	   goto 99
-	endif
-	ilast = ifirst + min(maxperclass(i), iindat(i+2)-ifirst) - 1
-        if (i .eq. inclasses .and. ilast .lt. ifirst) then
-	    ilast = min(ifirst+maxperclass(i), headsize )
-	else if (i .ne. inclasses .and. ilast .lt. ifirst) then
-	    ier = -1
-	    goto 99
-	endif
-	ioutdat(i+2) = ioutdat(i+1) + ilast - ifirst + 1
-	if (i .ne. 1) nextout = nextout + maxperclass(i-1)
-        do 50 j = ifirst, ilast
-	   output(j-ifirst+nextout) = input(j)
-50	   continue
-c	Move header items from INPUT to OUTPUT at their correct locations
-c
-100	continue
-c
-      do 200 i = inclasses+1, maxclass
-	ioutdat(i+2) = 0
-	nextout = nextout + maxperclass(i-1)
-200	continue
-      nextout = nextout + maxperclass(maxclass)
-c     Zero out any unused class descriptors in DOUTDAT.
-c     Bump nextout pointer to end of output header.
-c
-      do 250 i = 1, ioutdat(2) - 1
-	output(i) = doutdat(i)
-250	continue
-c	Move class descriptors in DOUTDAT back to OUTPUT
-c
-      datalen = output(c1dln)
-      if (datalen .gt. MAX_DATA_POINTS * 4) 
-     .     datalen = MAX_DATA_POINTS * 4
-      if (datalen .lt. 0) datalen = 0
-      noint = output(c12ni)
-      spn = output(c12spn)
-      if (noint .lt. 0) noint = 0
-      if (spn .lt. 1) spn = 1
-      if (noint + spn - 1 .gt. MAX_DATA_POINTS) then
-         if (spn .gt. MAX_DATA_POINTS) spn = MAX_DATA_POINTS
-         noint = MAX_DATA_POINTS - spn + 1
-      endif
-c		make sure header values won't point to invalid array elements
-      i1 = output(c1hln)/8 + 1
-      i2 = i1 + datalen/8 - 1
-      if (mod(datalen, 8) .ne. 0) i2 = i2 + 1
-      if (i1 .lt. 0) then
-	ier = -1
-	goto 99
-      endif
-c     Find where the data is in INPUT give up if no header info
-c
-      if (i2 .ge. i1) then
-c	Move the data from INPUT to OUTPUT
-c		only do this if there really is some data there
-c		this isn't strictly necessary, but I think its clearer
-         do 300 i = i1, i2
-	    output(i-i1+nextout) = input(i)
-300	 continue
-      endif
-c
-      output(c1hln) = (nextout - 1) * 8
-c     Changes the Header Length in the OUTPUT array to its new value.
-c   
-99    return
-      end
-c
diff -uNr 3.5/source/conline/condar/conversion3.f unipops-3.6/source/conline/condar/conversion3.f
--- 3.5/source/conline/condar/conversion3.f	2000-03-16 11:36:42.000000000 -0700
+++ unipops-3.6/source/conline/condar/conversion3.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,91 +0,0 @@
-      subroutine conversion3(input, output, ier)
-C-------------------------------------------------------------------------------
-C  @(#)conversion3.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Converts from internal format of UniPOPS to SDD #1 format
-c
-      include 'params.inc'
-c
-      integer*2 maxclass, i, k1, maxclasses, ifirst, j, ilast, i1, i2,
-     .		ier
-      double precision input(*), output(*)
-c
-      integer*2 maxperclass(20), iindat(16), ioutdat(16)
-      double precision dindat(4), doutdat(4)
-c
-      equivalence (dindat, iindat), (doutdat, ioutdat)
-c
-      data maxclass/14/
-      data maxperclass/25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-     .                 66, 25, 25, 25,  0,  0,  0,  0,  0,  0/
-c     MAXCLASS = max. number of classes
-c     MAXPERCLASS = max. number of R*8 entries in each class
-c
-      ier = 0
-      do 10 i = 1, (maxclass+5)/4
-	dindat(i) = input(i)
-10	continue
-c     Move class descriptors into DINDAT
-c
-      k1 = (maxclass+5)/4 + 1
-c     K1 = location in OUTPUT where next class starts
-c
-      maxclasses = iindat(1)
-      if (maxclasses .le. 0 .or. maxclasses .gt. maxclass) then
-	ier = -1
-	goto 99
-      endif
-      ioutdat(1) = maxclasses
-      ioutdat(2) = (maxclasses+5)/4 + 1
-c     Find max number of classes needed, up to above limit and
-c     start puting new class descriptors into DOUTDAT
-c
-      do 100 i = 1, maxclasses
-	ifirst = iindat(i+1)
-	ilast = ifirst + iindat(i+2)-iindat(i+1) - 1
-	if (ifirst .gt. ilast .or. (ilast-ifirst+1) .gt.
-     .		maxperclass(i)) then
-	    ier = -1
-	    goto 99
-	endif
-	ioutdat(i+2) = ioutdat(i+1) + ilast - ifirst + 1
-	if (i .ne. 1) k1 = k1 + maxperclass(i-1)
-        do 50 j = ifirst, ilast
-	   output(j) = input(j-ifirst+k1)
-50	   continue
-c	Move header items from INPUT to OUTPUT at their correct locations
-c
-100	continue
-c
-      do 200 i = maxclasses+1, maxclass+1
-	k1 = k1 + maxperclass(i-1)
-200	continue
-c	Bump k1 pointer to end of header
-c
-      do 250 i = 1, (maxclasses+5)/4
-	output(i) = doutdat(i)
-250	continue
-c	Move class descriptors in DOUTDAT back to OUTPUT
-c
-      output( (maxclasses+5)/4 + 1) = (ioutdat(maxclasses+2) - 1) * 8
-c     Changes the Header Length in the OUTPUT array to its new value.
-c
-      i1 = iindat(maxclasses+2)
-      i2 = i1 + input( (maxclasses+5)/4 + 2)/8 - 1
-      if (mod( nint(input( (maxclasses+5)/4+2)),8) .ne. 0) i2 = i2 + 1
-c     Find where the data is in INPUT
-c
-      if (i1 .gt. i2 .or. i1 .le. 0 .or. 
-     .     (i2 - i1 + 1) .gt. MAX_DATA_POINTS) then
-	ier = -1
-	goto 99
-      endif
-      do 300 i = i1, i2
-	output(i) = input(i-i1+k1)
-300	continue
-c	Move the data from INPUT to OUTPUT
-c
-99    return
-      end
-c
diff -uNr 3.5/source/conline/condar/cpdoc.f unipops-3.6/source/conline/condar/cpdoc.f
--- 3.5/source/conline/condar/cpdoc.f	2000-03-16 11:37:19.000000000 -0700
+++ unipops-3.6/source/conline/condar/cpdoc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,373 +0,0 @@
-      subroutine pdoc
-C-------------------------------------------------------------------------------
-C  @(#)cpdoc.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-C
-      INTEGER*2 LSTRNG(6),DSTRNG(5),GSTRNG(5),STR1(4),STR2(4),
-     .          STR5(4), STR6(4),STR7(4),STR8(4), ier, icn, icf, iptwh, 
-     .          iscan, imon, iday, iyear, i, im, is, nn, ibw, jm, js, 
-     .          ihp, ipos, jpos, ichsize, lastblnk, plen
-      integer*2 m2, n0, n1, n3, n80, n234, n352, n355, n356
-      integer*2 n50, n75, n100, n150, n175, n200, n250, n275, n300,
-     .          n425, n450, n475, n600, n625, n650, n675, 
-     .          n700, n725, n775, n800
-      REAL LST,MBMA, MBME, MBAOF, MBEOF, S4(4), eps, factor, time, hp, 
-     .	   az, el, pbma, pbaof, pbme, pbeof, azof, azo, elo, elof, ff,
-     .     g1, r1, g5, g2, g4, r5, r2, r4, g3, r3, php, s2, x0l, x0, t1,
-     .     t2, t3, wg(4), cg(4), hg(4), a, dt1dx0, dt2dx0, dt3dx0, 
-     .	   dadx0, e, dedx0, daz, pjy, del, caz, acaz, cel, acel, bw1,
-     .	   bw2, frq, ut, azchg, elchg, totchg, s_to_n, ln2, nt,
-     .     apscale
-      character*1 IPL,IMU,IPR,JPR
-      character*1023 pfile
-      REAL*8 SOURCE(2), OBSOPR, UDATE, rx_info(2), pt_model
-      character*16 crx_info
-      character*8 cpt_model
-      INTEGER*4 IFEED, IOBSOPR(2)
-c
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      INCLUDE 'cio.inc'
-c
-      EQUIVALENCE (OBSOPR,IOBSOPR)
-      EQUIVALENCE (SOURCE,S4)
-      equivalence (cpt_model, pt_model)
-      equivalence (crx_info, rx_info)
-c
-      DATA EPS/0.0001/
-      DATA IPL/'+'/, IMU/'-'/, IPR/' '/, JPR/' '/
-      DATA ICN/'N '/, ICF/'F '/
-      data ichsize /14/
-c
-      data m2, n0, n1, n3, n80, n234, n352, n355, n356
-     .    /-2, 0, 1, 3, 80, 234, 352, 355, 356/
-      data n50, n75, n100, n150, n175, n200, n250, n275, n300
-     .     /50, 75, 100, 150, 175, 200, 250, 275, 300/, 
-     .     n425, n450, n475, n600, n625, n650, n675
-     .     /425, 450, 475, 600, 625, 650, 675/,
-     .     n700, n725, n775, n800
-     .     /700, 725, 775, 800/
-C
-C=======================================================================
-C
-      ln2 = log(2.)
-      factor = sqrt(8. * ln2)
-c
-      WRITE(CPUF,4000,IOSTAT=IER)
-      call pfixchar(n1,n800,ipuf,n80,n0,ichsize)
-c
-      IPTWH = 1
-      ISCAN=DTWH(C1SNO,IPTWH)
-      IFEED = ifix ((dtwh(c1sno,iptwh) - float(iscan)) * 100. + 0.5)
-      UDATE=DTWH(C3DAT,IPTWH)
-      CALL UDAT(UDATE,IMON,IDAY,IYEAR)
-      LST=DTWH(C3LST,IPTWH)
-      CALL RNS(LST,0,LSTRNG)
-      DO 231 I = 1,2
-         SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
-  231    CONTINUE
-      TIME=DTWH(C3SRT,IPTWH)*DTWH(C12NI,IPTWH)
-      IM=IFIX(TIME/60.)
-      IS=IFIX(TIME-FLOAT(IM)*60.0+0.5)
-      HP=DTWH(C7FW,IPTWH)
-c
-      WRITE(CPUF,4001,IOSTAT=IER) ISCAN,IFEED,IYEAR,IMON,IDAY,
-     .               (LSTRNG(I), I=1,5), (S4(NN),NN=1,3),
-     .               DTWH(C3SRT,IPTWH),IM,IS,DTWH(C12SST,IPTWH),
-     .               DTWH(C5AT,IPTWH),HP
-      call pfixchar(n1,n775,ipuf,n80,n0,ichsize)
-c
-      WRITE(CPUF,4002,IOSTAT=IER)
-      call pfixchar(n1,n725,ipuf,n80,n0,ichsize)
-c
-      AZ=DTWH(C4AZ,IPTWH)
-      CALL RNS(AZ,n3,DSTRNG)
-      EL=DTWH(C4EL,IPTWH)
-      CALL RNS(EL,n1,GSTRNG)
-      PBMA=DTWH(C9PBM,IPTWH)
-      PBAOF=PBMA+SIGN(0.49,PBMA)
-      CALL RN1(PBAOF,STR5)
-      PBME=DTWH(C9PBM+1,IPTWH)
-      PBEOF=PBME+SIGN(0.49,PBME)
-      CALL RN1 (PBEOF,STR6)
-c
-      WRITE(CPUF,4003,IOSTAT=IER) DSTRNG,GSTRNG,STR5,STR6
-      call pfixchar(n1,n700,ipuf,n80,n0,ichsize)
-c
-      AZO = DTWH(C2UXP,IPTWH)
-      AZOF=AZO + SIGN(0.49,AZO)
-      CALL RN1(AZOF,STR1)
-      ELO = DTWH(C2UYP,IPTWH)
-      ELOF=ELO + SIGN(0.49,ELO)
-      CALL RN1(ELOF,STR2)
-      MBMA=DTWH(C9MBM,IPTWH)
-      MBAOF=MBMA+SIGN(0.49,MBMA)
-      CALL RN1 (MBAOF,STR7)
-      MBME=DTWH(C9MBM+1,IPTWH)
-      MBEOF=MBME+SIGN(0.49,MBME)
-      CALL RN1 (MBEOF,STR8)
-c
-      WRITE(CPUF,4004,IOSTAT=IER) STR1,STR2,STR7,STR8
-      call pfixchar(n1,n675,ipuf,n80,n0,ichsize)
-c
-      WRITE(CPUF,3000,IOSTAT=IER)
-      call pfixchar(n1,n650,ipuf,n80,n0,ichsize)
-c			get the noise tube value
-      NT=DTWH(C12FR,IPTWH)
-c                       in the following 24.41 = 2 * k / (pi * (6**2)) 
-c                       where k = boltzman = 1.381 * 10**3 Jy m**2 / K 
-      if (nt .ne. 2) then 
-         FF=24.41/DTWH(C8AAE,iptwh)
-      else 
-c                       vane calibration is slightly more complicated 
-         apscale = dtwh(c8aae,iptwh) / 
-     .                    (dtwh(c8el,iptwh) * dtwh(c8ef,iptwh))
-         FF=24.41/apscale
-      endif 
-c
-      G1=TWH(IDATOFF+1,IPTWH)*FF
-c
-      WRITE(CPUF,3002,IOSTAT=IER) G1
-      call pfixchar(n1,n625,ipuf,n80,n0,ichsize)
-c
-      R1=TWH(IDATOFF+6,IPTWH)*FF
-c
-      WRITE(CPUF,3002,IOSTAT=IER) R1
-      call pfixchar(n1,n600,ipuf,n80,n0,ichsize)
-c
-      WRITE(CPUF,3001,IOSTAT=IER)
-      call pfixchar(n1,n475,ipuf,n80,n0,ichsize)
-c
-      G5=TWH(IDATOFF+4,IPTWH)*FF
-      G2=TWH(IDATOFF+3,IPTWH)*FF
-      G4=TWH(IDATOFF+5,IPTWH)*FF
-c
-      WRITE(CPUF,3003,IOSTAT=IER) G5,G2,G4
-      call pfixchar(n1,n450,ipuf,n80,n0,ichsize)
-c
-      R5=TWH(IDATOFF+9,IPTWH)*FF
-      R2=TWH(IDATOFF+8,IPTWH)*FF
-      R4=TWH(IDATOFF+10,IPTWH)*FF
-c
-      WRITE(CPUF,3003,IOSTAT=IER) R5,R2,R4
-      call pfixchar(n1,n425,ipuf,n80,n0,ichsize)
-c
-      WRITE(CPUF,3000,IOSTAT=IER)
-      call pfixchar(n1,n300,ipuf,n80,n0,ichsize)
-c
-      G3=TWH(IDATOFF+2,IPTWH)*FF
-c
-      WRITE(CPUF,3002,IOSTAT=IER) G3
-      call pfixchar(n1,n275,ipuf,n80,n0,ichsize)
-c
-      R3=TWH(IDATOFF+7,IPTWH)*FF
-c
-      WRITE(CPUF,3002,IOSTAT=IER) R3
-      call pfixchar(n1,n250,ipuf,n80,n0,ichsize)
-c
-      IF (G1.le.0.0.or.G2.le.0.0.or.G3.le.0.0.or.
-     .    G4.le.0.0.or.G5.le.0.0) call oerror(n234, m2, 'PDOC')
-C
-      PHP=1.
-      X0=(PHP/2.)*ALOG(G3/G1)/ALOG(G2**2/(G1*G3))
-      S2=PHP*(2.*X0+PHP)/(2.*ALOG(G2/G1))
-c
-      IF (S2.lt.0.0) call oerror(n234, m2, 'PDOC')
-
-      WG(1)=FACTOR*SQRT(S2)
-      HG(1)=G2*EXP(X0**2/(2.*S2))
-      CG(1)=X0+2.
-      S2=(2.*PHP/FACTOR)**2
-C
-   25   X0L=X0
-        T1=EXP(-(PHP+X0)**2/(2.*S2))
-        T2=EXP(-X0**2/(2.*S2))
-        T3=EXP(-(PHP-X0)**2/(2.*S2))
-        A=(G1+G2+G3)/(T1+T2+T3)
-        E=(PHP+X0)*T1*(G1-A*T1)+X0*T2*(G2-A*T2)-(PHP-X0)*T3
-     .   *(G3-A*T3)
-        DT1DX0=-2.*(PHP+X0)*T1/(2.*S2)
-        DT2DX0=-2.*X0*T2/(2.*S2)
-        DT3DX0=2.*(PHP-X0)*T3/(2.*S2)
-        DADX0=-A*(DT1DX0+DT2DX0+DT3DX0)/(T1+T2+T3)
-        DEDX0=T1*(G1-A*T1)+(PHP+X0)*DT1DX0*(G1-A*T1)
-     .      -(PHP+X0)*T1*(DADX0*T1+A*DT1DX0)
-        DEDX0=DEDX0+T2*(G2-A*T2)+X0*DT2DX0*(G2-A*T2)
-     .      -X0*T2*(DADX0*T2+A*DT2DX0)
-        DEDX0=DEDX0+T3*(G3-A*T3)+(X0-PHP)*DT3DX0*(G3-A*T3)
-     .      -(X0-PHP)*T3*(DADX0*T3+A*DT3DX0)
-        X0=X0-E/DEDX0
-      IF (ABS(X0-X0L).GT.EPS) GO TO 25
-c
-      HG(2)=A
-      WG(2)=2.
-      CG(2)=X0+2.
-      X0=(PHP/2.)*ALOG(G5/G4)/ALOG(G2**2/(G5*G4))
-      S2=PHP*(2.*X0+PHP)/(2.*ALOG(G2/G4))
-c
-      IF (S2.lt.0.0) call oerror(n234, m2, 'PDOC')
-c
-      WG(4)=FACTOR*SQRT(S2)
-      HG(4)=G2*EXP(X0**2/(2.*S2))
-      CG(4)=X0+5.
-      S2=(2.*PHP/FACTOR)**2
-c
-   35    X0L=X0
-         T1=EXP(-(PHP+X0)**2/(2.*S2))
-         T2=EXP(-X0**2/(2.*S2))
-         T3=EXP(-(PHP-X0)**2/(2.*S2))
-         A=(G4+G2+G5)/(T1+T2+T3)
-         E=(PHP+X0)*T1*(G4-A*T1)+X0*T2*(G2-A*T2)-(PHP-X0)*T3
-     .   *(G5-A*T3)
-         DT1DX0=-2.*(PHP+X0)*T1/(2.*S2)
-         DT2DX0=-2.*X0*T2/(2.*S2)
-         DT3DX0=2.*(PHP-X0)*T3/(2.*S2)
-         DADX0=-A*(DT1DX0+DT2DX0+DT3DX0)/(T1+T2+T3)
-         DEDX0=T1*(G4-A*T1)+(PHP+X0)*DT1DX0*(G4-A*T1)
-     .      -(PHP+X0)*T1*(DADX0*T1+A*DT1DX0)
-         DEDX0=DEDX0+T2*(G2-A*T2)+X0*DT2DX0*(G2-A*T2)
-     .      -X0*T2*(DADX0*T2+A*DT2DX0)
-         DEDX0=DEDX0+T3*(G5-A*T3)+(X0-PHP)*DT3DX0*(G5-A*T3)
-     .      -(X0-PHP)*T3*(DADX0*T3+A*DT3DX0)
-         X0=X0-E/DEDX0
-      IF (ABS(X0-X0L).GT.EPS) GO TO 35
-c
-      WRITE(CPUF,4006,IOSTAT=IER)
-      call pfixchar(n1,n200,ipuf,n80,n0,ichsize)
-c
-      DAZ=(5.0-CG(4))*HP
-      PJY=HG(4)*EXP(((2.0-CG(1))**2)*4*ln2/WG(1)**2)
-      BW1=WG(4)*HP
-c
-      WRITE(CPUF,4007,IOSTAT=IER) DAZ,PJY,BW1
-      call pfixchar(n1,n175,ipuf,n80,n0,ichsize)
-c
-      DEL=(2.0-CG(1))*HP
-      PJY=HG(1)*EXP(((5.0-CG(4))**2)*4*ln2/WG(4)**2)
-      BW2=WG(1)*HP
-c
-      IPR=IPL
-      AZO = DTWH(C2UXP,IPTWH)
-c			follows change of 19 jun 91 in old tuc pops
-      azof = azo
-c			CAZ is the tot. corrected Az. offset in (")
-      CAZ=AZOF+(5.0-CG(4))*HP
-      ACAZ=ABS(CAZ)
-      IF (CAZ.LT.0.0) IPR=IMU
-      IM=IFIX(ACAZ/60.)
-      IS=IFIX(ACAZ-FLOAT(IM)*60.0+0.5)
-c
-      JPR=IPL
-      ELO = DTWH(C2UYP,IPTWH)
-c			follows change of 19 jun 91 in old tuc pops
-      elof = elo
-c			CEL is the tot. corrected El. offset in (")
-      CEL=ELOF+(2.0-CG(1))*HP
-      ACEL=ABS(CEL)
-      IF (CEL.LT.0.0) JPR=IMU
-      JM=IFIX(ACEL/60.0)
-      JS=IFIX(ACEL-FLOAT(JM)*60.0+0.5)
-c      		Compute the total change in new pointing correction
-c		from the initial guess (follows 19jun91 change in old pops)
-      azchg = caz - azof
-      elchg = cel - elof
-      totchg = sqrt(azchg*azchg + elchg*elchg)
-c
-c
-      WRITE(CPUF,4008,IOSTAT=IER) DEL,PJY,BW2,IPR,IM,IS,JPR,JM,JS
-      call pfixchar(n1,n150,ipuf,n80,n0,ichsize)
-c
-      IBW=IFIX(HP*2.0+0.5)
-c
-      WRITE(CPUF,4010,IOSTAT=IER) IBW
-      call pfixchar(n1,n100,ipuf,n80,n0,ichsize)
-c
-      CG(3)=X0+5.
-      DAZ=(5.0-CG(3))*HP
-      HG(3)=A
-      PJY=HG(3)*EXP((2.0-CG(2))**2*ln2)
-c
-      WRITE(CPUF,4011,IOSTAT=IER) DAZ,PJY
-      call pfixchar(n1,n75,ipuf,n80,n0,ichsize)
-c
-      DEL=(2.0-CG(2))*HP
-      PJY=HG(2)*EXP((5.0-CG(3))**2*ln2)
-c
-      WRITE(CPUF,4012,IOSTAT=IER) DEL,PJY
-      call pfixchar(n1,n50,ipuf,n80,n0,ichsize)
-c
-      call getenv('POPSPOINTDAT',pfile)
-      plen = lastblnk(pfile)
-      if (plen .le. 0) then
-         pfile = 'point.dat'
-         plen = lastblnk(pfile)
-      endif
-      write(cpuf,4013,iostat=ier) pfile(max(1,plen-71):plen)
-      call pwrite(cpuf, n80)
-      open(unit=iiotmp,file=pfile, status='old', fileopt='eof', 
-     .     iostat=ier)
-      if (ier .ne. 0) then 
-         call oerror(n352, n0, 'POINT.DAT')
-c
-      else
-         OBSOPR = DTWH(C1OBS,IPTWH)
-         FRQ=DTWH(C12CF,IPTWH)*0.001
-         UT=DTWH(C3UT,IPTWH)
-         CALL RNS (UT,n0,LSTRNG)
-         IHP=IFIX(HP+0.5)
-c		Let signal-to-noise value be 0.0 for now
-         s_to_n = 0.0
-         rx_info(1) = dtwh(c12rxi,iptwh)
-         rx_info(2) = dtwh(c12rxi+1,iptwh)
-         pt_model = dtwh(c2ptm, iptwh)
-         WRITE (iiotmp,4015,IOSTAT=IER) ISCAN,SOURCE,IYEAR,IMON,
-     .                   IDAY,FRQ, IOBSOPR(1),IFEED, az, el, caz,
-     .                   cel, IHP, BW1, BW2, PJY, 
-     .                   ut, DTWH(C5AT, IPTWH), totchg, s_to_n,
-     .                   cpt_model, crx_info
-c
-c
-         if (ier .ne. 0) call oerror(n355, n0, 'POINT.DAT : PDOC')
-         close(iiotmp,iostat=ier)
-         if (ier .ne. 0) call oerror(n356, n0, 'POINT.DAT : PDOC')
-      endif
-c
-      IPOS=510+IFIX((5.0-CG(3))*182.+0.5)
-      JPOS=475+IFIX((2.0-CG(2))*175.+0.5)
-      call pfixchar(ipos,jpos,icf,n1,n0,ichsize)
-      IPOS=510+IFIX((5.0-CG(4))*182.+0.5)
-      JPOS=475+IFIX((2.0-CG(1))*175.+0.5)
-      call pfixchar(ipos,jpos,icn,n1,n0,ichsize)
-c		flush the graphics
-      call gpflush()
-c
-      return
-c
- 3000 FORMAT (36X,'+')
- 3001 FORMAT (23X,'+',12X,'+',12X,'+')
- 3002 FORMAT (29X,F11.2)
- 3003 FORMAT (16X,F11.2,2X,F11.2,2X,F11.2)
- 4000 FORMAT (' SCAN',2X,'#CH',4X,'DATE',5X,'LST',
-     .        6X,'SOURCE',8X,'SEC',3X,'TIME',3X,'TS',2X,'TAMB',2X,'HP')
- 4001 FORMAT (I5,I3,I5,'-',I2.2,'-',I2.2,1X,5A2,2X,3A4,1X,
-     .        F4.1,I4,':',I2,F6.0,F5.1,F5.0)
- 4002 FORMAT(27X,'AZ',9X,'EL')
- 4003 FORMAT(1X,' TELESCOPE COMMANDED:',5A2,1X,5A2,4X,'+BEAM:'4A2,
-     .       2X,4A2)
- 4004 FORMAT(9X,'POINTING OFF:',2X,4A2,3X,4A2,4X,'-BEAM:',4A2,2X,4A2)
- 4006 FORMAT(1X,' FIT WITH NO RESTRICTIONS  (SYMBOL=N)',15x,
-     .       'CORRECTED OFFSETS')
- 4007 FORMAT(1X,' DAZ=',F5.1,2X,'PEAK(JY)=',F7.2,2X,'BW=',F5.1,
-     .       18X,'AZ',4X,'EL')
- 4008 FORMAT(1X,' DEL=',F5.1,2X,'PEAK(JY)=',F7.2,2X,'BW=',F5.1,
-     .       15x,A1,I2.2':',I2.2,1X,A1,I2.2,':',I2.2)
- 4010 FORMAT('  FIT WITH AZBW=ELBW=',I3,4X,'(SYMBOL=F)')
- 4011 FORMAT(1X,' DAZ=',F5.1,2X,'PEAK(JY)=',F7.2)
- 4012 FORMAT(1X,' DEL=',F5.1,2X,'PEAK(JY)=',F7.2)
- 4013 format('PDOC: writing result to ',a)
- 4015 FORMAT (I5,1X,2A8,I4,'-',I2.2,'-',I2.2,F10.5,1X,A4,I2,F8.3,F7.3,
-     .        F7.1,F7.1,I4,F6.1,F6.1,F9.2,F8.4,F6.1,F7.1,F7.1,
-     .        1x,a7,1x,a6)
-C
-      end
-c
diff -uNr 3.5/source/conline/condar/craz.f unipops-3.6/source/conline/condar/craz.f
--- 3.5/source/conline/condar/craz.f	2000-03-16 11:36:42.000000000 -0700
+++ unipops-3.6/source/conline/condar/craz.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,55 +0,0 @@
-      subroutine craz
-c
-c     @(#)craz.f	5.3 05/04/98
-c
-c     Initializes the cube header
-c
-      integer*4 i, i12, iarray(3), n0
-      real*4 rmaxnorm, rmaxnormal
-      real*8 dinfinity
-      character*12 date1
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      data n0, i12 /0, 12/
-c
-      rmaxnorm = rmaxnormal()
-      call idate( iarray)
-      call makedate(i12, date1, iarray)
-c     Gets the system date and the value of infinity
-c
-      do 10 i = 1, mstrings - 1
-	chead(i) = rmaxnorm
-10	continue
-      do 20 i = cstrings, cheadsize
-	cchead(i) = '  '
-20	continue
-c     Initialize real and strings in cube header
-c
-c     The following sets up default header values
-c
-      chead(cblank) = dinfinity()
-      chead(cnaxis1) = 1.0
-      chead(cnaxis2) = 1.0
-      chead(cnaxis3) = 1.0
-      chead(cpix1) = 1.0
-      chead(cpix2) = 1.0
-      chead(cpix3) = 1.0
-      chead(crval1) = 1.0
-      chead(crval2) = 1.0
-      chead(crval3) = 1.0
-      chead(cdelt1) = 1.0
-      chead(cdelt2) = 1.0
-      chead(cdelt3) = 1.0
-      chead(cequinox) = 0.0
-      chead(cbitpix) = 16.0
-      cchead(ctype1) = 'PIXEL'
-      cchead(ctype2) = 'PIXEL'
-      cchead(ctype3) = 'PIXEL'
-      call todate(i12, date1, chead(cdate), n0)
-c
-      return
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/cube.f unipops-3.6/source/conline/condar/cube.f
--- 3.5/source/conline/condar/cube.f	2000-03-16 11:36:43.000000000 -0700
+++ unipops-3.6/source/conline/condar/cube.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,109 +0,0 @@
-      real function cube(ii,jj,kk)
-c
-c     @(#)cube.f	5.4 05/04/98
-c
-c     Returns the value of the (II,JJ,KK) pixel in the CUBE on device IDEV.
-c
-      integer*2 ii, jj, kk, nwrds4, nwrds2, nwrds, nwrds1, nwrds8
-c
-      parameter (nwrds1 = 2880)
-      parameter (nwrds2 = 1440)
-      parameter (nwrds4 = 720)
-      parameter (nwrds8 = 360)
-c
-      integer*2 oldrec, record, ldata2(nwrds2), blankfits2, ierr
-      character*1 cdata1(nwrds1)
-      real rdata4(nwrds4)
-      double precision rdata8(nwrds8)
-      integer*2 m1, n357, n365
-      integer*4 l1, long, ldata4(nwrds4)
-      integer*4 iloc, position, blankfits1, blankfits4
-      logical okreal4, okreal8
-c
-      parameter (blankfits4 = -2147483647)
-      parameter (blankfits2 = -32767)
-      parameter (blankfits1 = 0)
-cc
-      include 'mappl.inc'
-      include 'mform.inc'
-      include 'cio.inc'
-c
-      data m1, n357, n365 / -1, 357, 365/
-      data l1 /1/
-c
-      data oldrec/0/
-c     OLDREC = value of last record read in
-c
-      iloc = long(ii) + nint(chead(cnaxis1))* ( long(jj-1) 
-     .           + nint(chead(cnaxis2))* long(kk-1) )
-c
-      if ( abs(nint(chead(cbitpix))) .eq. 16) then
-	nwrds = nwrds2
-      else if ( abs(nint(chead(cbitpix))) .eq. 32) then
-	nwrds = nwrds4
-      else if ( abs(nint(chead(cbitpix))) .eq. 8) then
-	nwrds = nwrds1
-      else if ( abs(nint(chead(cbitpix))) .eq. 64) then
-	nwrds = nwrds8
-      else
-	call oerror(n365, m1, 'Bad FITS header: Bad BITPIX')
-      endif
-c
-      record = cnumhead + (iloc-l1) / nwrds + l1
-c
-      if (oldrec .ne. record) then
-	if (nint(chead(cbitpix)) .eq. 16) then
-	    read(icube,rec=record,iostat=ierr) ldata2
-	else if (nint(chead(cbitpix)) .eq. 32) then
-	    read(icube,rec=record,iostat=ierr) ldata4
-	else if (nint(chead(cbitpix)) .eq. -32) then
-	    read(icube,rec=record,iostat=ierr) rdata4
-	else if (nint(chead(cbitpix)) .eq. -64) then
-	    read(icube,rec=record,iostat=ierr) rdata8
-	else if (nint(chead(cbitpix)) .eq. 8) then
-	    read(icube,rec=record,iostat=ierr) cdata1
-	else
-	    call oerror(n365, m1, 'Bad FITS header: Bad BITPIX')
-	endif
-	if (ierr .ne. 0) call oerror(n357, m1, 'Cannot read from FITS file')
-	oldrec = record
-      endif
-c
-      position = mod(iloc-l1, nwrds) + l1
-      if (nint(chead(cbitpix)) .eq. 16) then
-	if (ldata2(position) .eq. fcblank) then
-	   cube = chead(cblank)
-      	else
-	   cube = float(ldata2(position))*chead(ctscale) + chead(ctzero)
-      	endif
-      else if (nint(chead(cbitpix)) .eq. 32) then
-	if (ldata4(position) .eq. fcblank) then
-	   cube = chead(cblank)
-      	else
-	   cube = float(ldata4(position))*chead(ctscale) + chead(ctzero)
-      	endif
-      else if (nint(chead(cbitpix)) .eq. 8) then
-	if (ichar(cdata1(position)) .eq. fcblank) then
-	   cube = chead(cblank)
-      	else
-	   cube = float(ichar(cdata1(position)))*chead(ctscale) + chead(ctzero)
-      	endif
-      else if (nint(chead(cbitpix)) .eq. -32) then
-	if ( .not. okreal4(rdata4(position))) then
-	   cube = chead(cblank)
-      	else
-	   cube = rdata4(position)*chead(ctscale) + chead(ctzero)
-      	endif
-      else if (nint(chead(cbitpix)) .eq. -64) then
-	if ( .not. okreal8(rdata8(position))) then
-	   cube = chead(cblank)
-      	else
-	   cube = rdata8(position)*chead(ctscale) + chead(ctzero)
-      	endif
-      else
-	   call oerror(n365, m1, 'Bad FITS header: Bad BITPIX')
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/curfit.f unipops-3.6/source/conline/condar/curfit.f
--- 3.5/source/conline/condar/curfit.f	2000-03-16 11:36:44.000000000 -0700
+++ unipops-3.6/source/conline/condar/curfit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,112 +0,0 @@
-      SUBROUTINE CURFIT(X,Y,SIGMAY,NPTS,NTERMS,MODE,A,DELTAA,SIGMAA,
-     +FLAMDA,YFIT,CHISQR,CHISQ1,CONST,MDERIV,MODFIT)
-c
-C-----------------------------------------------------------------------
-C @(#)curfit.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C  THIS SUBROUTINE MAKES A NON-LINEAR LEAST-SQUARES FIT USING
-C  MARQUARDT'S METHOD.
-C  DESCRIPTION OF VARIABLES:
-C    X - ARRAY OF DATA POINTS FOR INDEPENDENT VARIABLE
-C    Y - ARRAY OF DATA POINTS FOR DEPENDENT VARIABLE
-C    SIGMAY - ARRAY OF STANDARD DEVIATIONS OF Y DATA POINTS
-C    NPTS - NUMBER OF PAIRS OF DATA POINTS
-C    NTERMS - NUMBER OF PARAMETERS OF THE FIT
-C    MODE - DETERMINES THE METHOD OF WEIGHTING THE LEAST-SQUARES FIT
-C            +1 (INSTRUMENTAL) WEIGHT(I) = 1./SIGMAY(I)**2
-C             0 (NO WEIGHTING) WEIGHT(I) = 1.
-C            -1 (STATISTICAL)  WEIGHT(I) = 1./Y(I)
-C    A - ARRAY OF PARAMETERS TO BE FIT
-C    DELTAA - ARRAY OF INCREMENTS FOR PARAMETERS A
-C    SIGMAA - ARRAY OF STANDARD DEVIATIONS FOR PARAMETERS A
-C    FLAMDA - PROPORTION OF GRADIENT SEARCH INCLUDED
-C    YFIT - ARRAY OF CALCULATED VALUES OF Y
-C    CHISQR - REDUCED CHI SQUARE FOR FIT
-C
-C  SUROUTINES AND FUNCTION SUBPROGRAMS REQUIRED:
-C    FUNCTN(X,I,A,CONST,MODFIT)
-C      EVALUATES THE FITTING FUNCTION FOR THE ITH TERM
-C    FCHISQ (Y,SIGMAY,NPTS,NFREE,MODE,YFIT)
-C      EVALUATES REDUCED CHI-SQUARE FOR FIT TO DATA
-C    FDERIV(X,I,A,CONST,DELTAA,NTERMS,DERIV,MDERIV)
-C      EVALUATES THE DERIVATIVES OF THE FITTING FUNCTION FOR
-C      THE ITH TERM WITH RESPECT TO EACH PARAMETER.
-C    MATINV(ARRAY,NTERMS,DET)
-C      INVERTS A SYMMETRIC TWO-DIMENSIONAL MATRIX OF DEGREE
-C      NTERMS AND CALCULATES ITS DETERMINANT
-C
-C    COMMENTS:
-C      DIMENSION STATEMENT VALID FOR NTERMS UP TO 25
-C      SET FLAMDA = 0.001 AT BEGINNING OF SEARCH
-C
-      real x(*), y(*), SIGMAY(*), YFIT(*), WEIGHT(1000),
-     .	   A(25), SIGMAA(*), DELTAA(*), CONST(25), ALPHA(25,25),
-     .	   BETA(25),DERIV(25),ARRAY(25,25),B(25), chisqr, chisq1,
-     .	   const, beta, alpha, deriv, functn, fchisq, flamda, det
-      integer*2 npts, nterms, mode, mderiv, modfit, nfree, i, j, k
-c
-      NFREE = NPTS - NTERMS
-C
-C  EVALUATE WEIGHTS
-C
-   20 DO 30 I=1,NPTS
-   21 IF(MODE) 22,27,29
-   22 IF(Y(I)) 25,27,23
-   23 WEIGHT(I) = 1./Y(I)
-      GO TO 30
-   25 WEIGHT(I) = 1./(-Y(I))
-      GO TO 30
-   27 WEIGHT(I) = 1.
-      GO TO 30
-   29 WEIGHT(I) = 1./SIGMAY(I)**2
-   30 CONTINUE
-C
-C  EVALUATE ALPHA AND BETA MATRICES
-C
-   31 DO 34 J=1,NTERMS
-      BETA(J) = 0.
-      DO 34 K=1,J
-   34 ALPHA(J,K) = 0.
-   41 DO 50 I=1,NPTS
-      CALL FDERIV(X,I,A,CONST,DELTAA,NTERMS,DERIV,MDERIV,MODFIT)
-      DO 46 J=1,NTERMS
-      BETA(J) = BETA(J) + WEIGHT(I)*(Y(I)-FUNCTN(X,I,A,CONST,MODFIT))
-     +*DERIV(J)
-      DO 46 K=1,J
-   46 ALPHA(J,K) = ALPHA(J,K) + WEIGHT(I)*DERIV(J)*DERIV(K)
-   50 CONTINUE
-   51 DO 53 J=1,NTERMS
-      DO 53 K=1,J
-   53 ALPHA(K,J) = ALPHA(J,K)
-C
-C  INVERT MODIFIED CURVATURE MATRIX TO FIND NEW PARAMETERS:
-C
-   71 DO 74 J=1, NTERMS
-      DO 73 K=1, NTERMS
-   73 ARRAY(J,K) = ALPHA(J,K) / SQRT(ALPHA(J,J) * ALPHA(K,K))
-   74 ARRAY(J,J) = 1. + FLAMDA
-   80 CALL MATINV(ARRAY, NTERMS, DET)
-   81 DO 84 J=1, NTERMS
-      B(J) = A(J)
-      DO 84 K=1,NTERMS
-   84 B(J) = B(J) + BETA(K)*ARRAY(J,K)/SQRT(ALPHA(J,J)*ALPHA(K,K))
-C
-C  IF CHI SQUARE INCREASED, INCREASE FLAMDA AND TRY AGAIN
-C
-   91 DO 92 I=1,NPTS
-   92 YFIT(I) = FUNCTN(X,I,B,CONST,MODFIT)
-   93 CHISQR = FCHISQ(Y,SIGMAY,NPTS,NFREE,MODE,YFIT)
-      IF(CHISQ1 - CHISQR) 95, 101, 101
-   95 FLAMDA = 10.*FLAMDA
-      GO TO 71
-C
-C  EVALUATE PARAMETERS AND UNCERTAINTIES:
-C
-  101 DO 103 J=1,NTERMS
-      A(J) = B(J)
-  103 SIGMAA(J) = SQRT(ARRAY(J,J) / ALPHA(J,J))
-      FLAMDA = FLAMDA/10.
-  110 RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/dft.f unipops-3.6/source/conline/condar/dft.f
--- 3.5/source/conline/condar/dft.f	2000-03-16 11:36:44.000000000 -0700
+++ unipops-3.6/source/conline/condar/dft.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,64 +0,0 @@
-      subroutine dft(re,im,n,invers)
-C-------------------------------------------------------------------------------
-C  @(#)dft.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c  Fourier Transforms an array of arbitrary length n.
-c   Normalizes by n**(-1/2) so that forward followed by inverse
-c   transform yields original array
-c
-c  External variables
-c
-      real re(*),im(*)
-      integer*4 n
-      integer*2 n120, m3
-      logical*4 invers
-c
-      include 'cio.inc'
-      include 'params.inc'
-c
-c  Internal variables
-c
-      integer*4 j,k,indx
-      real*8 clut(0:MAX_DATA_POINTS),slut(0:MAX_DATA_POINTS)
-      real*8 zr(MAX_DATA_POINTS),zi(MAX_DATA_POINTS)
-      real*8 dang,ang,div
-c
-      data n120, m3 /120, -3/
-c
-      if (n.gt.MAX_DATA_POINTS) call oerror(n120, m3, 'DFT')
-c
-      dang=2.0d0*3.1415926536d0/dble(n)
-      do 100 k = 1, n
-       zr(k)=0.d0
-       zi(k)=0.d0
-       ang=dang*dble(k)
-       clut(k)=dcos(ang)
-       slut(k)=dsin(ang)
-100    continue
-c
-      if (invers) then
-      do 200 k = 1, n
-        slut(k)=-slut(k)
-200     continue
-      endif
-c
-      clut(0)=clut(n)
-      slut(0)=slut(n)
-c
-      do 400 k = 1, n
-       do 300 j = 1, n
-        indx=mod(j*k,n)
-        zr(k)=zr(k)+dble(re(j))*clut(indx)+dble(im(j))*slut(indx)
-        zi(k)=zi(k)+dble(im(j))*clut(indx)-dble(re(j))*slut(indx)
-300     continue
-400   continue
-c
-      div=dsqrt(dble(n))
-      do 500 k = 1, n
-       re(k)=sngl(zr(k)/div)
-       im(k)=sngl(zi(k)/div)
- 500   continue
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/drawcntr.f unipops-3.6/source/conline/condar/drawcntr.f
--- 3.5/source/conline/condar/drawcntr.f	2000-03-16 11:36:45.000000000 -0700
+++ unipops-3.6/source/conline/condar/drawcntr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,255 +0,0 @@
-      subroutine drawcntr(savevec, nseg, undefwp,  
-     .			  z, isize, jsize, ictr)
-c
-c     @(#)drawcntr.f	5.1 06/22/94
-c
-c     Draws contours found by TRACER
-c
-      real z(isize,jsize)
-      integer*2 nseg, ictr, sclc, ipixel, jseg1, curcur
-      integer*2 ixtmp, iytmp, n1, n2, n8, n14
-      real savevec(4,*), undefwp
-      integer*4 isize, jsize
-c
-      include 'mappl.inc'
-      include 'appl.inc'
-      include 'core.inc'
-c
-      logical bothways, found
-      character*8 stch
-      character*10 fmt, getformat
-      real alabel,xold,yold,xfst,yfst,rad,direc,alength,
-     .	   xlst,ylst, ep4 
-      integer*2 kseg, jseg, lseg, ierr
-c
-      data n1, n2, n8, n14 /1, 2, 8, 14/
-c
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-c
-      data rad /57.29577951/, ep4/0.0001/
-c
-      jseg = 0
-c
-      alabel = min( 100./ax(curcur()), 100./bx(curcur()) )
-c     Contours will be labeled if they are longer than 100 pixels.
-c 
-601   continue
-c
-      do 610 kseg = jseg+1, nseg
-	if (savevec(1,kseg) .gt. 0.0) then
-c
-c         We have found a starting point so initialize variables
-          xold = savevec(1,kseg)
-          yold = savevec(2,kseg)
-          xfst = xold
-          yfst = yold
-          bothways = .false.
-          jseg = kseg
-	  jseg1 = kseg
-          alength = 0.0
-c         ALENGTH = square of the length of the current drawn contour
-c         XOLD, YOLD = pixels where we are to search for a continuation
-c         XFRST, YFRST = pixels at which current contour started
-c         BOTHWAYS = true if we have looked in both directions from XFST,YFST
-c	    = false if we haven't tried the second direction.
-c         JSEG = location in SAVEVEC where we should start looking for new
-c	    starting points for a contour
-c         JSEG1 = location in SAVEVEC where we should start looking for 
-c	    continuation from XOLD,YOLD
-c
-          ixtmp = nint(xold*ax(curcur())+bx(curcur()))
-          iytmp = nint(yold*ay(curcur())+by(curcur()))
-          call placewp(ixtmp,iytmp,ictr)
-	  xlst = xold
-	  ylst = yold
-c         Move the pen to starting position.
-c
-500       found = .false.
-c  	  FOUND = whether or not any new vectors were found starting from
-c	  	XOLD,YOLD
-c
-603       do 600 lseg = jseg1, nseg
-c
-c	     Start looking for vectors that continue from (XOLD,YOLD)
-c	     FORWARD SEARCH
-c
-	     if (savevec(2,lseg)-yold .ge. 2) then
-		if (.not. found) goto 620
-		jseg1 = lseg - 1
-		found = .false.
-		goto 605
-	     endif
-c	     Since SAVEVEC is in almost sorted order in Y, if YOLD is > than
-c		current SAVEVEC, we have gone beyond where any possible
-c		continuations can be found.  Jump out of loop and restart
-c		REVERSE search.
-c
-  	     if (abs(xold-savevec(1,lseg)) .lt. ep4 .and.
-     .	         abs(yold-savevec(2,lseg)) .lt. ep4) then
-	        if (alength .lt. alabel) alength = alength + 
-     .		     (xold-savevec(3,lseg))**2 + 
-     .		     (yold-savevec(4,lseg))**2 
-	        xold = savevec(3,lseg)
-	        yold = savevec(4,lseg)
-  	     else if (savevec(1,lseg) .gt. 0.0 .and. 
-     .	  	      abs(xold-savevec(3,lseg)) .lt. ep4 .and.
-     .	    	      abs(yold-savevec(4,lseg)) .lt. ep4) then
-	        if (alength .lt. alabel) alength = alength + 
-     .		     (xold-savevec(1,lseg))**2 + 
-     .		     (yold-savevec(2,lseg))**2 
-	        xold = savevec(1,lseg)
-	        yold = savevec(2,lseg)
-	     else
-		goto 600
-  	     endif
-c	     Look for vectors which continue on from XOLD and YOLD
-c
-	     if ( mod(xold,1.) .lt. ep4) then
-		direc = sign(90., z(nint(xold),int(yold+ep4))- 
-     .		     		  z(nint(xold),1+int(yold+ep4)))
-	     else if (mod(yold,1.) .lt. ep4) then
-		direc = sign(180., z(int(xold+ep4),nint(yold))- 
-     .		     		   z(1+int(xold+ep4),nint(yold)))
-		if (direc .gt. 170.) direc = 0.
-	     else if (mod(xlst,1.) .lt. ep4) then
-		direc = sign(90., z(nint(xlst),int(ylst+ep4))- 
-     .		     		  z(nint(xlst),1+int(ylst+ep4)))
-	     else
-		direc = sign(180., z(int(xlst+ep4),nint(ylst))- 
-     .		     		   z(1+int(xlst+ep4),nint(ylst)))
-		if (direc .gt. 170.) direc = 0.
-	     endif
-	     direc = direc / rad
-c            Finds the direction in which the contours are decreasing in height.
-c
-             ixtmp = nint(xold*ax(curcur())+bx(curcur()))
-             iytmp = nint(yold*ay(curcur())+by(curcur()))
-     	     call vctrwp(ixtmp,iytmp,ictr,sclchar,direc)
-	     xlst = xold
-	     ylst = yold
-	     savevec(1,lseg) = -1
-	     found = .true.
-c  	     If such vectors exist, plot them, store away new end points
-c
-600  	     continue
-c
-	  if (.not. found) goto 620
-	  jseg1 = nseg
-	  found = .false.
-c
-605       do 609 lseg = jseg1, jseg, -1
-c
-c	     Start looking for vectors that continue from (XOLD,YOLD)
-c		REVERSE SEARCH
-c
-	     if (yold - savevec(2,lseg) .ge. 2) then
-		if (.not. found) goto 620
-		jseg1 = lseg + 1
-		found = .false.
-		goto 603
-	     endif
-c	     Since SAVEVEC is in almost sorted order in Y, if YOLD is > than
-c		current SAVEVEC, we have gone beyond where any possible
-c		continuations can be found.  Jump out of loop and restart
-c		FORWARD SEARCH.
-c
-  	     if (abs(xold-savevec(1,lseg)) .lt. ep4 .and.
-     .	         abs(yold-savevec(2,lseg)) .lt. ep4) then
-	        if (alength .lt. alabel) alength = alength + 
-     .		     (xold-savevec(3,lseg))**2 + 
-     .		     (yold-savevec(4,lseg))**2 
-	        xold = savevec(3,lseg)
-	        yold = savevec(4,lseg)
-  	     else if (savevec(1,lseg) .gt. 0.0 .and. 
-     .	  	      abs(xold-savevec(3,lseg)) .lt. ep4 .and.
-     .	    	      abs(yold-savevec(4,lseg)) .lt. ep4) then
-	        if (alength .lt. alabel) alength = alength + 
-     .		     (xold-savevec(1,lseg))**2 + 
-     .		     (yold-savevec(2,lseg))**2 
-	        xold = savevec(1,lseg)
-	        yold = savevec(2,lseg)
-	     else
-		goto 609
-  	     endif
-c	     Look for vectors which continue on from XOLD and YOLD
-c
-	     if ( mod(xold,1.) .lt. ep4) then
-		direc = sign(90., z(nint(xold),int(yold+ep4))- 
-     .		     		  z(nint(xold),1+int(yold+ep4)))
-	     else if (mod(yold,1.) .lt. ep4) then
-		direc = sign(180., z(int(xold+ep4),nint(yold))- 
-     .		     		   z(1+int(xold+ep4),nint(yold)))
-		if (direc .gt. 170.) direc = 0.
-	     else if (mod(xlst,1.) .lt. ep4) then
-		direc = sign(90., z(nint(xlst),int(ylst+ep4))- 
-     .		     		  z(nint(xlst),1+int(ylst+ep4)))
-	     else
-		direc = sign(180., z(int(xlst+ep4),nint(ylst))- 
-     .		     		   z(1+int(xlst+ep4),nint(ylst)))
-		if (direc .gt. 170.) direc = 0.
-	     endif
-	     direc = direc / rad
-c            Finds the direction in which the contours are decreasing in height.
-c
-             ixtmp = nint(xold*ax(curcur())+bx(curcur()))
-             iytmp = nint(yold*ay(curcur())+by(curcur()))
-     	     call vctrwp(ixtmp,iytmp,ictr,sclchar,direc)
-	     xlst = xold
-	     ylst = yold
-	     savevec(1,lseg) = -1
-	     found = .true.
-c  	     If such vectors exist, plot them, store away new end points
-c
-609  	     continue
-c
-	  if (found) then
-	    jseg1 = jseg
-	    found = .false.
-	    goto 603
-	  endif
-c
-620       if (bothways) then
-            if (conline(ictr) .lt. 0 .and. alength .gt. alabel) then
-               ixtmp = nint(xfst*ax(curcur())+bx(curcur())) - 
-     .			sclc(n8*n14/n2)
-               iytmp = nint(yfst*ay(curcur())+by(curcur()))
-	       if (sclchar .ne. 1.) call charsize(sclchar)
-               call place(ixtmp, iytmp)
-	       fmt = getformat(levs(ictr), levs(ictr), n8)
-	       write(stch,fmt,iostat=ierr) levs(ictr)
-	       call pchar(stch, n8)
-	       if (sclchar .ne. 1.) call charsize(1.)
-            endif  
-c	    Label contour (if desired and it is long enough)
-c   
-	    goto 601
-c           You have already looked from the starting point in both 
-c           directions.  Look for another starting point.
-c
-          else
-	    xold = xfst
-	    yold = yfst
-	    bothways = .true.
-            ixtmp = nint(xold*ax(curcur())+bx(curcur()))
-            iytmp = nint(yold*ay(curcur())+by(curcur()))
-            call placewp(ixtmp, iytmp, ictr)
-	    xlst = xold
-	    ylst = yold
-	    jseg1 = kseg
-  	    goto 500
-          endif
-c         Finished following all vectors which started from original 
-c         (XOLD,YOLD).  Now try to look for any more positions in the
-c         reverse direction from original point.  
-c
-        endif
-c
-610     continue
-c
-      return
-c     No more vectors in SAVEVEC so we can go back and get some more.
-c     Next contour level if FINISH is true, else continue with old level.
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/fchisq.f unipops-3.6/source/conline/condar/fchisq.f
--- 3.5/source/conline/condar/fchisq.f	2000-03-16 11:36:46.000000000 -0700
+++ unipops-3.6/source/conline/condar/fchisq.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-      real FUNCTION FCHISQ(Y,SIGMAY,NPTS,NFREE,MODE,YFIT)
-C-----------------------------------------------------------------------
-C @(#)fchisq.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C  THIS FUNCTION SUBPROGRAM EVALUATES THE REDUCED CHI-SQUARE FOR A
-C  FIT TO THE DATA WITH A GIVEN SET OF FIT PARAMETERS.  THE REDUCED
-C  CHI-SQUARE FUNCTION IS
-C      FCHISQ = SUM ((Y - YFIT)**2 / SIGMA**2) / NFREE
-C
-C  VARIABLES HAVE BEEN DESCRIBED IN THE OTHER SUBROUTINES.
-C
-      real Y(*), SIGMAY(*), YFIT(*), chisq, weight, free
-      integer*2 npts, nfree, mode, i  
-c
-   11 CHISQ = 0.
-   12 IF(NFREE) 13, 13, 20
-   13 FCHISQ = 0.
-      GO TO 40
-C
-C  ACCUMULATE CHI SQUARE
-C
-   20 DO 30 I=1,NPTS
-   21 IF(MODE) 22, 27, 29
-   22 IF(Y(I)) 25, 27, 23
-   23 WEIGHT = 1. / Y(I)
-      GO TO 30
-   25 WEIGHT = 1. / (-Y(I))
-      GO TO 30
-   27 WEIGHT = 1.
-      GO TO 30
-   29 WEIGHT = 1. / SIGMAY(I)**2
-   30 CHISQ = CHISQ + WEIGHT*(Y(I) - YFIT(I))**2
-C
-C  DIVIDE BY NUMBER OF DEGREES OF FREEDOM
-C
-   31 FREE = NFREE
-   32 FCHISQ = CHISQ/FREE
-   40 RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/fderiv.f unipops-3.6/source/conline/condar/fderiv.f
--- 3.5/source/conline/condar/fderiv.f	2000-03-16 11:36:47.000000000 -0700
+++ unipops-3.6/source/conline/condar/fderiv.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,74 +0,0 @@
-      SUBROUTINE FDERIV(X,I,A,CONST,DELTAA,NPARMS,DERIV,MDERIV,MODFIT)
-C-----------------------------------------------------------------------
-C @(#)fderiv.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C  THIS SUBROUTINE CALCULATES THE PARTIAL DERIVATIVES OF THE FITTING
-C  FUNCTION WRT EACH PARAMETER OF THE FIT.  THE USER MAY CHOOSE
-C  THROUGH THE ARGUMENT 'MDERIV' WHETHER ANALYTIC OR NUMERICAL
-C  CALCULATIONS ARE TO BE MADE.
-C  (*** THE ARRAY OF PARAMETER INCREMENTS DELTAA MUST BE CALCULATED
-C  (AND SUPPLIED BY THE CALLING PROGRAM;  THIS IS NOT PRESENTLY
-C  (IMPLEMENTED (1/84) ***)
-C
-C  THE PRESENT ROUTINE CALCULATES THE PARTIAL DERIVATIVES OF THE
-C  ATMOSPHERIC OPTICAL DEPTH EQUATION
-C    F = RTCHOP - ETAL*RTM*(1 - EXP(-TAU0*X)) - (1 - ETAL)*RTSBR
-C         - ETAL*RTBG*EXP(-TAU0*X)
-C
-C  DESCRIPTION OF THE VARIABLES:
-C    X - INDEPENDENT VARIABLE (AIR MASS) ARRAY.
-C    I - INDEX OF DATA POINTS
-C    A - ARRAY OF PARAMETERS OF THE FIT
-C    DELTAA - ARRAY OF PARAMETER INCREMENTS (NEEDED FOR NUMERICAL CALC)
-C    NPARMS - NUMBER OF PARAMETERS
-C    DERIV - ARRAY OF PARTIAL DERIVATIVES OF THE FUNCTION.
-C
-      real X(*), A(*), DELTAA(*), DERIV(*), CONST(*), tau0, rtm, rtsbr,
-     .     rtbg, rtchop, ex, etal, petal, ptau0, aj, delta, yfit,
-     .     functn, xi
-      integer*2 ideriv, i, nparms, mderiv, modfit, j, nterms
-      character*2 cderiv
-c
-      equivalence (cderiv, ideriv)
-c
-      ideriv = mderiv
-      IF(cderiv.EQ.'N') GO TO 440
-      XI = X(I)
-      TAU0 = A(1)
-      RTM = CONST(5)
-      RTSBR = CONST(8)
-      RTBG = CONST(10)
-      RTCHOP = CONST(14)
-C
-C  CALCULATE PARTIAL DERIVATIVES ACCORDING TO THE FIT-MODE FLAG, MODFIT.
-C
-      EX = EXP(-TAU0*XI)
-      GO TO (410,415) MODFIT
-  410 CONTINUE
-      ETAL = CONST(15)
-      GO TO 430
-  415 CONTINUE
-      ETAL = A(2)
-      PETAL = -RTM*(1. - EX) + RTSBR - RTBG*EX
-      DERIV(2) = PETAL
-  430 CONTINUE
-      PTAU0 = -XI*ETAL*RTM*EX + XI*ETAL*RTBG*EX
-      DERIV(1) = PTAU0
-      GO TO 499
-C
-  440 CONTINUE
-C  CALCULATE PARTIAL DERIVATIVES BY THE NUMERICAL OPTION.
-      DO 450 J = 1,NTERMS
-      AJ = A(J)
-      DELTA = DELTAA(J)
-      A(J) = AJ + DELTA
-      YFIT = FUNCTN(X,I,A,CONST,MODFIT)
-      A(J) = AJ - DELTA
-      DERIV(J) = (YFIT - FUNCTN(X,I,A,CONST,MODFIT))/(2.*DELTA)
-      A(J) = AJ
-  450 CONTINUE
-C
-  499 RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/fft.f unipops-3.6/source/conline/condar/fft.f
--- 3.5/source/conline/condar/fft.f	2000-03-16 11:36:47.000000000 -0700
+++ unipops-3.6/source/conline/condar/fft.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,93 +0,0 @@
-      subroutine fft(re,im,ln,invers)
-C-------------------------------------------------------------------------------
-C  @(#)fft.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c  Fast Fourier Transform for array of n = 2**ln complex values.
-c   Normalized by n**(-1/2) so that forward followed by inverse
-c   transform yields original array.
-c
-c  External variables
-c
-      include 'params.inc'
-      real re(*),im(*)
-      integer*4 ln
-      logical*4 invers
-c
-      include 'cio.inc'
-c
-c  Parameter settings
-c
-      real*8 pi
-      parameter (pi=3.1415926536)
-c
-c  Internal variables
-c
-      complex*16 data(MAX_DATA_POINTS)
-      integer*4 n,nv2,nm1
-      complex*16 u,w,keep
-      integer*4 l,le,le2
-      integer*4 i,j,k,ip
-      real rootn
-c
-      integer*2 n120, m3
-      data n120, m3 /120, -3/
-c
-      n=2**ln
-      if (n.gt.MAX_DATA_POINTS) call oerror(n120, m3, 'FFT')
-      nv2=n/2
-      nm1=n-1
-      j=1
-c
-c  Load internal buffers
-c
-      do 100 i = 1, n
-       data(i)=dcmplx(re(i),im(i))
-100    continue
-c
-c  Apply bit-reversal
-c
-      do 200 i = 1, nm1
-       if (i.lt.j) then
-        keep=data(j)
-        data(j)=data(i)
-        data(i)=keep
-       endif
-       k=nv2
-10     if (k.lt.j) then
-        j=j-k
-        k=k/2
-        goto 10
-       endif
-       j=j+k
-200    continue
-c
-c  Apply in-place FFT
-c
-      do 300 l = 1, ln 
-       le=2**l
-       le2=le/2
-       u=dcmplx(1.0,0.0)
-       w=dcmplx(dcos(pi/le2),-dsin(pi/le2))
-       if (invers) w=dconjg(w)
-       do 500 j = 1, le2
-        do 400 i = j, n, le
-         ip=i+le2
-         keep=data(ip)*u
-         data(ip)=data(i)-keep
-         data(i)=data(i)+keep
-400      continue
-        u=u*w
-500     continue
-300   continue
-c
-c  Unload the internal buffers and normalize
-c
-      rootn=sqrt(float(n))
-      do 600 i = 1, n
-       re(i)=dreal(data(i))/rootn
-       im(i)=sngl(dimag(data(i)))/rootn
-600    continue
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/fgauss.f unipops-3.6/source/conline/condar/fgauss.f
--- 3.5/source/conline/condar/fgauss.f	2000-03-16 11:37:51.000000000 -0700
+++ unipops-3.6/source/conline/condar/fgauss.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,111 +0,0 @@
-      subroutine fgauss(x, a, y, dyda, na)
-c
-c     @(#)fgauss.f	5.1 06/22/94
-c
-c     Calculates sum of (NA-3)/3 gaussians Y using parameters A(NA).
-c     Calculates partial derivatives DYDA(NA) of Y with respect to each A(I)
-c
-c     Equation to be calculated:
-c	
-c	 N
-c	____
-c	\      	
-c	 \       		        x - x(i) - X0 
-c	 /   H0 * h(i) *   exp  { - [  ---------------- ]**2 }
-c	/        		       1.41 * s(i) * S0
-c	----
-c	i = 1
-c
-c       where:	A(1) = H0
-c		A(2) = X0
-c		A(3) = S0
-c		A[3*i+1] = h(i)
-c		A[3*i+2] = x(i)
-c		A[3*i+3] = s(i)
-c		N = (NA-3)/3
-c
-c----------------------------------------------------------------
-c
-      real x, y, a(*), dyda(*)
-      integer*4 na
-c
-      real constant, ex, denom, fact, dy
-      integer*4 i
-      integer*2 n120, m3
-c
-      parameter (constant = 1.41421356237)
-      parameter (n120 = 120)
-      parameter (m3 = -3)
-c
-      if ( mod(na,3) .ne. 0 .or. na. lt. 3) 
-     .		call oerror(n120, m3, 'FGAUSS: Wrong number of coefficients')
-c
-      dyda(1) = 0.
-      dyda(2) = 0.
-      dyda(3) = 0.
-      y = 0.
-c
-      do 11 i = 4, na-1, 3
-	denom = constant*a(i+2)*a(3)
-	fact = ( x-a(i+1)-a(2) ) / denom
-	ex = exp( -fact*fact )
-	dy = a(i)*a(1)*ex
-	y = y + dy
-  	dyda(i) = a(1) * ex
-	dyda(i+1) = 2. * dy * fact / denom
-	dyda(i+2) = 2. * dy * fact*fact / a(i+2) 
-  	dyda(1) = dyda(1) + a(i)*ex
-	dyda(2) = dyda(2) + 2. * dy * fact / denom  
-	dyda(3) = dyda(3) + 2. * dy * fact*fact / a(3)   
-11	continue
-c
-      return
-      end
-c
-c------------------------------------------------------------------
-c
-      subroutine fgauss0(x, afunc, na)
-c
-c     Calculates AFUNC(NA) values for NA Gaussians at X.
-c
-c     Equation to be calculated:
-c	      	
-c	        	          x - x(i) - X0 
-c	  h(i)* H0 * exp  { - [  ---------------- ]**2 }
-c	        	         1.41 * s(i) * S0
-c
-c
-c       where:	COEF(1) = H0
-c		COEF(2) = X0
-c		COEF(3) = S0
-c		COEF[3*i+1] = h(i)
-c		COEF[3*i+2] = x(i)
-c		COEF[3*i+3] = s(i)
-c		I = 1,2,...,NA
-c
-c----------------------------------------------------------------
-c
-      real x, afunc(*)
-      integer*4 na
-c
-      real constant, xi, si
-      integer*4 i
-      integer*2 n120, m3
-c
-      include 'rip.inc'
-c
-      parameter (constant = 1.41421356237)
-      parameter (n120 = 120)
-      parameter (m3 = -3)
-c
-      if (na .gt. ing .or. na .lt. 1) 
-     .		call oerror(n120, m3, 'FGAUSS: Wrong number of coefficients')
-c
-      do 11 i = 1, na
-	xi = x - coef(3*i+2) - coef(2)
-	si = constant * coef(3*i+3) * coef(3)
-	afunc(i) = coef(1) * coef(3*i+1) * exp(- ( xi / si)**2 )
-11	continue
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/fitfoc.f unipops-3.6/source/conline/condar/fitfoc.f
--- 3.5/source/conline/condar/fitfoc.f	2000-03-16 11:37:53.000000000 -0700
+++ unipops-3.6/source/conline/condar/fitfoc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,223 +0,0 @@
-      subroutine fitfoc(nyqrate, dishdia, focalpt)
-c
-c     @(#)fitfoc.f	5.2 09/10/98
-c
-c     Finds the best location of the focus from the phase information
-c     Prints out results.  Subtracts fit from the data in Matrix 0 and
-c     places the model into Matrix 1.
-c
-      real nyqrate, dishdia, focalpt
-c
-      integer*2 m2, n256, mat0x, mat0y, i, j, n120, n0, istch(40),
-     .		iblank, niter, n282, kount, lastblnk
-      character*80 stch
-      character*2 blank
-      integer*4 NCA, kin, ndata, MFIT, MA, ilct
-c
-      parameter (NCA = 7)
-c
-      integer*4 lista(NCA)
-      real coef(NCA), covar(NCA,NCA), dx, dy, theta, thetamax, alamda,
-     .     alamda1, chisq, chisq1, alph(NCA,NCA), value, dyda(NCA), xc,
-     .	   yc, PRCERR
-      character*32 clab(NCA)
-c
-      external holfunc
-
-      parameter (MA = 7)
-      parameter (MFIT = 6)
-      parameter (PRCERR = 0.01)
-      parameter (M2 = -2)
-      parameter (N0 = 0)
-      parameter (N256 = 256)
-      parameter (N282 = 282)
-      parameter (N120 = 120)
-      parameter (NITER = 12)
-c
-      equivalence (blank,iblank), (stch,istch)
-c
-      INCLUDE 'appl.inc'
-      INCLUDE 'mappl.inc'
-      INCLUDE 'mform.inc'
-      INCLUDE 'cform.inc'
-c
-      data blank/'  '/
-      data clab/'Bias in Phase',
-     .          'Y Pointing Offset',
-     .          'X Pointing Offset',
-     .		'Lateral Focus Offset',
-     .		'Angle of Lat. Offset',
-     .		'Radial Focus Offset',
-     .		'Focal Length'/
-c
-      mat0x = nint(mhead(mnaxis1,1))
-      mat0y = nint(mhead(mnaxis2,1))
-      xc = float(mat0x) / 2. + 0.5
-      yc = float(mat0y) / 2. + 0.5
-c
-      if  (mat0x .le. 0 .or. mat0y .le. 0 .or. mat0x*mat0y .gt.
-     .     mdatasize/mnumarrays) call oerror(n256, m2, 'HOLFITFOC')
-c     Make sure the input matrix has been initialized
-c
-      do 43 i = 1, mheadsize
-	mhead(i,2) = mhead(i,1)
-43	continue
-c     Copy header
-c
-      dx = dishdia / (nyqrate*mat0x)
-      dy = dishdia / (nyqrate*mat0y)
-      thetamax = 2. * atan( dishdia / (4.*focalpt) )
-c
-      kin = idatoff + 1
-c
-      do 100 i = 1, mat0x
-	do 50 j = 1, mat0y
-	   if (mdata(ilct(i,j,1)) .ne. sngl(mhead(mblank,1)) ) then
-		twh(kin,1) = dx * (i-xc)
-		twh(kin,2) = dy * (j-yc)
-		theta = 2. * atan ( sqrt(twh(kin,1)**2 + twh(kin,2)**2 ) /
-     .				(2. * focalpt) )
-		if (theta .le. thetamax) then
-		   work(kin-idatoff) = 1.0
-		   xdata(kin-idatoff) = kin
-		   ydata(kin-idatoff) = mdata(ilct(i,j,1))
-		   kin = kin + 1
-		   if (kin .ge. MAX_DATA_POINTS) goto 101
-		endif
-	   endif
-50	   continue
-100	continue
-c
-101   ndata = kin - idatoff - 1
-c
-      if (ndata .le. MFIT) call oerror(n120, m2, 'HOLFITFOC')
-c
-      if (ndata .eq. MAX_DATA_POINTS) call oerror(n120, n0, 'HOLFITFOC')
-c
-      do 102 i = 1, MFIT
-	coef(i) = 0
-	lista(i) = i
-102	continue
-      coef(4) = 1.
-      coef(NCA) = focalpt
-c
-      alamda = -1
-      kount  = 0
-c
-      call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, MFIT, 
-     .	                 covar, alph, NCA, chisq, holfunc, alamda)
-c
-180     chisq1 = chisq
-	alamda1 = alamda
-        kount = kount + 1
-	if (kount .le. niter) then
-	   call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, MFIT, 
-     .	                 covar, alph, NCA, chisq, holfunc, alamda)
-	   if (alamda .gt. alamda1 .or. 
-     .         abs(1.-chisq1/chisq) .gt. PRCERR) goto 180
-	else
-	   call oerror(n282, n0, 'HOLFITFOC')
-	endif
-	alamda = 0.
-        call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, MFIT, 
-     .	                 covar, alph, NCA, chisq, holfunc, alamda)
-c
-      stch = 'Covariant Matrix:         1    2    3    4    5    6'
-      call pwrite(istch, 80)
-c
-      do 502 i =1, MFIT
-	   write(stch,209) i, (nint(100.*
-     .		(covar(i,j)/sqrt(covar(i,i)*covar(j,j)))),j=1,i)
-209	   format(17x,i4,':',20i4)
-	   call pwrite(istch,80)
-502	   continue
-      call pwrite(iblank,1)
-c
-      do 4999 i = 1, MFIT
-          write(stch,500) clab(i)(1:lastblnk(clab(i))), coef(i),
-     .			  sqrt(covar(i,i))
-500	  format(a,':', t32, 1pg15.6, ' +/-', g15.6)
-	  call pwrite(istch, 80)
-4999	  continue
-      call pwrite(iblank,1)
-c
-      write(stch,410) kount, chisq, ndata
-410   format('Iterations:',i4, 5x,  'Chi Square:',1pg12.5, 5x,
-     .	     'No. Points:',i6)
-      call pwrite(istch, 80)
-      call pwrite(iblank,1)
-c
-      do 600 i = 1, mat0x
-	do 550 j = 1, mat0y
-		twh(1+idatoff,1) = dx * (i-xc)
-		twh(1+idatoff,2) = dy * (j-yc)
-		call holfunc(float(idatoff+1),coef, value, dyda, ma)
-c
-		mdata(ilct(i,j,1)) = mdata(ilct(i,j,1)) - value
-		mdata(ilct(i,j,2)) = value
-c
-550		continue
-600	continue
-c
-      return
-      end
-c
-      subroutine holfunc (xindex, a, value, dyda, na)
-c
-c     Describes Non-linear equation for phase variations across a
-c     dish due to feed position error (From Godwin et al., 1978
-c     Electronics Letters, Vol. 14, p. 134,)
-c
-c     xindex  = index to independent variables
-c     a = array of parameters
-c	  a(1) = a
-c	  a(2) = b
-c	  a(3) = c
-c	  a(4) = (2*pi/lambda)*deltat
-c	  a(6) = (2*pi/lambda)*deltaz
-c	  a(5) = phi prime
-c	  a(7) = focal length ( a convenient way of passing the focal
-c			length ).
-c     value = value of function at x
-c     dyda = partial derivitives of y with respect to a's
-c     na = number of parameters (= 6 here)
-c
-      integer*4 na
-      real value, a(na), dyda(na), xindex
-c
-      real x, y, theta, sinr, cosr, r
-      integer*2 n120, m3
-      integer*4 ix
-c
-      parameter (n120 = 120)
-      parameter (m3 = 3)
-c
-      include 'appl.inc'
-c
-      if (na .lt. 1 .or. na .gt. 7) call oerror(n120, m3, 'HOLFUNC')
-c
-      ix = nint(xindex)
-      x = twh(ix,1)
-      y = twh(ix,2)
-      theta = atan2(y,x)
-      r = 2 * atan( sqrt(x**2 + y**2)/(2*a(7)) )
-      sinr = sin(r)
-      cosr = cos(r)
-c
-      value = a(1) + a(2)*x + a(3)*y + a(4)*sinr*cos(theta-a(5))
-     .		 + a(6)*cosr
-c
-      dyda(1) = 1.
-      dyda(2) = x
-      dyda(3) = y
-      dyda(4) = sinr * cos(theta - a(5))
-      dyda(5) = a(4)*sinr*sin(theta-a(5))
-      dyda(6) = cosr
-      dyda(7) = 0.0
-c
-      return
-c
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/funct.F unipops-3.6/source/conline/condar/funct.F
--- 3.5/source/conline/condar/funct.F	2000-03-16 11:36:48.000000000 -0700
+++ unipops-3.6/source/conline/condar/funct.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,1101 +0,0 @@
-      SUBROUTINE  FUNCT	(LFLAG,J)
-C-------------------------------------------------------------------------------
-C  @(#)funct.F	5.2 05/04/98
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C FUNCT contains frequently used fortran builtin functions
-C---------------------------------------------------------------------
-c
-      integer*2 jj, lflag, j, iptwh2, icnum, istop, i1, loc, isize,
-     .		isize2, iwpr, irealp, itype, numi2, numi4,
-     .		i, lastblnk, i2, i3, itag, isize1, ierr, ier,  
-     .		iwpc, openmode, rwmode, exmode, posmode, SCR, NEW, OLD,
-     .		UNK, EOF, REW, RO, WO, RW, iused
-      integer*2 m1, m2, m3, n1, n30, n112, n120, n272, n225, n245, 
-     .		n28, n352, n370, n299
-      real*4 cube, rcompar2(30), rcompar1(30), rchan
-      integer*4 ilct, index, ioget, iunit, slen, sused
-      logical string
-      character*60 compar1, compar2
-      character*1023 fullname
-      real*8 nrao140, nrao300, proto12m, x1, x2, dinfinity
-      character*8 stat
-      double precision chantox, xtochan
-c
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      include 'stk.inc'
-      include 'core.inc'
-      include 'cio.inc'
-      INCLUDE 'mform.inc'
-      INCLUDE 'mappl.inc'
-c
-      equivalence (compar1, rcompar1), (compar2, rcompar2)
-c
-      data m1, m2, m3, n1, n28, n30, n112, n120, n272, n225, n245, n352
-     .     /-1, -2, -3, 1, 28, 30, 112, 120, 272, 225, 245, 352/
-      data n370, n299 /370, 299/
-      data nrao140/'NRAO 43M'/, nrao300/'NRAO 93M'/
-      data proto12m /'PROTO12M'/
-c
-      parameter (UNK = 0)
-      parameter (OLD = 1)
-      parameter (NEW = 2)
-      parameter (SCR = 3)
-      parameter (REW = 0)
-      parameter (EOF = 1)
-      parameter (RW = 0)
-      parameter (WO = 1)
-      parameter (RO = 2)
-c
-C=======================================================================
-C
-      JJ=J
-      GO TO (36,58,37,59,38,39,40,41,42,43,44,45,46,47,48,49,60,
-     1       61,62,63,64,65,135,111,112,113,114,115,116,117,118,
-     .	     119,120,121,122,123,124,125,126,127,128,129,130,200,
-     .       201,202,203,210,211,212,213,220,230,140,150,160,240,
-     .	     250,260,170,180,190,270, 280, 290, 300, 310), JJ
-      call oerror(n120, m3, 'FUNCT')
-c
-c----------------------------------------
-C		   SIN,	COS, TAN, ATAN,	ATAN2	  
-c----------------------------------------
-  36  CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'SIN : One needed')
-      XX=SIN(V(SP))
-      GO TO 5001
-   37 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'COS : One needed')
-      XX=COS(V(SP))
-      GO TO 5001
-   38 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'TAN : One needed')
-      XX=TAN(V(SP))
-      GO TO 5001
-   39 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'ATAN : One needed')
-      XX=ATAN(V(SP))
-      GO TO 5001
-   40 CONTINUE
-      if (sp.lt.2) call oerror(n112, m1, 'ATAN2 : Two needed')
-      X1=V(SP)
-      X2=V(SP-1)
-      XX=ATAN2(X2,X1)
-      GO TO 5000
-c----------------------------------------
-C                      SQRT, LN, LOG10, EXP
-c----------------------------------------
-   41 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'SQRT : One needed')
-      XX=SQRT(V(SP))
-      GO TO 5001
-   42 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'LOG : One needed')
-      XX=LOG(V(SP))
-      GO TO 5001
-   43 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'LOG10 : One needed')
-      XX=LOG10(V(SP))
-      GO TO 5001
-   44 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'EXP : One needed')
-      XX=EXP(V(SP))
-      GO TO 5001
-c----------------------------------------
-C                                 ABS, IFIX, MAX, MIN, MOD
-c----------------------------------------
-   45 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'ABS : One needed')
-      XX=ABS(V(SP))
-      GO TO 5001
-   46 CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'IFIX : One needed')
-      XX=FLOAT(IFIX(V(SP)))
-      GO TO 5001
-   47 CONTINUE
-      if (sp.lt.2) call oerror(n112, m1, 'MAX : Two needed')
-      x1 = v(sp)
-      x2 = v(sp-1)
-      xx = max(x1,x2)
-      goto 5000
-   48 CONTINUE
-      if (sp.lt.2) call oerror(n112, m1, 'MIN : Two needed')
-      x1 = v(sp)
-      x2 = v(sp-1)
-      xx = min(x1,x2)
-      goto 5000
-   49 CONTINUE
-      if (sp.lt.2) call oerror(n112, m1, 'MOD : Two needed')
-      x1 = v(sp)
-      x2 = v(sp-1)
-      xx = mod(x2,x1)
-      goto 5000
-c----------------------------------------
-c                                   asin, acos
-c----------------------------------------
- 58   continue
-      if (sp.lt.1) call oerror(n112, m1, 'ASIN : One needed')
-      xx = asin(v(sp))
-      goto 5001
- 59   continue
-      if (sp.lt.1) call oerror(n112, m1, 'ACOS : One needed')
-      xx = acos(v(sp))
-      goto 5001
-c----------------------------------------
-c				anint, sign, dim
-c----------------------------------------
-60    continue
-      if (sp.lt.1) call oerror(n112, m1, 'NINT : One needed')
-      xx = anint(v(sp))
-      goto 5001
-61    continue
-      if (sp.lt.2) call oerror(n112, m1, 'SIGN : Two needed')
-      x1 = v(sp)
-      x2 = v(sp-1)
-      xx = sign(x2,x1)
-      goto 5000
-62    continue
-      if (sp.lt.2) call oerror(n112, m1, 'DIM : Two needed')
-      x1 = v(sp)
-      x2 = v(sp-1)
-      xx = dim(x2,x1)
-      goto 5000
-c----------------------------------------
-c				sinh, cosh, tanh
-c----------------------------------------
-63    continue
-      if (sp.lt.1) call oerror(n112, m1, 'SINH : One needed')
-      xx = sinh(v(sp))
-      goto 5001
-64    continue
-      if (sp.lt.1) call oerror(n112, m1, 'COSH : One needed')
-      xx = cosh(v(sp))
-      goto 5001
-65    continue
-      if (sp.lt.1) call oerror(n112, m1, 'TANH : One needed')
-      xx = tanh(v(sp))
-      goto 5001
-c----------------------------------
-c     D0
-c----------------------------------
-  111 iptwh2 = 1
-      goto 1119
-c----------------------------------
-c     D1
-c----------------------------------
-  112 iptwh2 = 2
-      goto 1119
-c----------------------------------
-c     D2
-c----------------------------------
-  113 iptwh2 = 3
-      goto 1119
-c----------------------------------
-c     D3
-c----------------------------------
-  114 iptwh2 = 4
-      goto 1119
-c----------------------------------
-c     D4
-c----------------------------------
-  115 iptwh2 = 5
-      goto 1119
-c----------------------------------
-c     D5
-c----------------------------------
-  116 iptwh2 = 6
-      goto 1119
-c----------------------------------
-c     D6
-c----------------------------------
-  117 iptwh2 = 7
-      goto 1119
-c----------------------------------
-c     D7
-c----------------------------------
-  118 iptwh2 = 8
-      goto 1119
-c----------------------------------
-c     D8
-c----------------------------------
-  119 iptwh2 = 9
-      goto 1119
-c----------------------------------
-c     D9
-c----------------------------------
-  120 iptwh2 = 10
- 1119 if (sp .ge. 1) then
-         icnum = nint(v(sp))
-         istop = nint(dtwh(c12spn,iptwh2) + dtwh(c12ni,iptwh2)) - 1
-         if (icnum .gt. istop .or. icnum .le. 0) then
-	    call oerror(n245, m2, 'D0/D9')
-	 else
-            xx = twh(idatoff+icnum,iptwh2)
-	 endif
-      else
-         call oerror(n112, m1, 'D0/D9: One needed')
-      endif
-      goto 5001
-c----------------------------------
-c     H0
-c----------------------------------
-  121 iptwh2 = 1
-      goto 1149
-c----------------------------------
-c     H1
-c----------------------------------
-  122 iptwh2 = 2
-      goto 1149
-c----------------------------------
-c     H2
-c----------------------------------
-  123 iptwh2 = 3
-      goto 1149
-c----------------------------------
-c     H3
-c----------------------------------
-  124 iptwh2 = 4
-      goto 1149
-c----------------------------------
-c     H4
-c----------------------------------
-  125 iptwh2 = 5
-      goto 1149
-c----------------------------------
-c     H5
-c----------------------------------
-  126 iptwh2 = 6
-      goto 1149
-c----------------------------------
-c     H6
-c----------------------------------
-  127 iptwh2 = 7
-      goto 1149
-c----------------------------------
-c     H7
-c----------------------------------
-  128 iptwh2 = 8
-      goto 1149
-c----------------------------------
-c     H8
-c----------------------------------
-  129 iptwh2 = 9
-      goto 1149
-c----------------------------------
-c     H9
-c----------------------------------
-  130 iptwh2 = 10
-c
- 1149 if (sp .ge. 1) then
-c
-  	 i1 = nint(v(sp))
-c
-   	 string = .false.
-	 do 1150 i = 1, numastrings
-	    if (i1 .eq. astrings(i)) string = .true.
-1150	    continue
-c	 Find out if it is a string header word
-c	 Deal with class 9 and class 11 special cases
-	 if (i1 .eq. c9cff .and. dtwh(c1tel,iptwh2) .ne. nrao140 .and.
-     .		dtwh(c1tel,iptwh2) .ne. nrao300) string = .false.		
-         if (i1 .gt. c11ovv(1) .and. i1 .lt. c12fr .and. string) then
-            string = .false.
-            if (dtwh(c3typ11,iptwh2) .eq. proto12m) then
-               do 1240 i = 1, 10
-                  if (i1 .eq. c11pvd(i) .or. i1 .eq. c11ppt(i))
-     .                        string = .true.
- 1240          continue
-            else
-               do 1241 i = 1, 22
-                  if (i1 .eq. c11ovd(i) .or. i1 .eq. c11opt(i))
-     .                        string = .true.
- 1241          continue
-            endif
-         endif
-c
-         if (string) then
-c
-c	    Strings
-c
-            sp = sp - 1
-	    if (i1 .eq. c1ona .or. i1 .eq. c1sna .or.
-     .          i1 .eq. c12rxi) then
-		numi2 = 8
-	    else if (i1 .eq. c9cff) then
-		numi2 = 12
-	    else
-		numi2 = 4
-                do 1242 i = 1, 10
-                   if (i1 .eq. c11ppt(i)) numi2 = 16
- 1242           continue
-	    endif
-	    call runtag(numi2, itag)
-	    call copy(numi2, dtwh(i1,iptwh2), c(itag))
-c	    Store contents of header word into K
-c
-c	    Update stack pointers so that proper K location will be
-c	    on the stack
-	    sp = sp + 4
-	    stack(sp-3) = 14
-	    stack(sp-2) = numi2
-	    stack(sp-1) = itag
-	    stack(sp) = 3
-	    v(sp-3) = c(7)
-	    v(sp-2) = c(4)
-	    v(sp-1) = c(itag)
-	    v(sp) = c(2)
-	    goto 1000
-c
-	 else if (i1 .gt. 0 .and. i1 .lt. idatoff/2) then
-c
-c	    Reals
-c
-            xx = dtwh(i1,iptwh2)
-            goto 5001
-c
-	 else
-	    call oerror(n245, m2, 'H0/H9')
-	 endif
-      else
-         call oerror(n112, m1, 'H0/H9: One needed')
-      endif
-c
-c----------------------------------------
-c                                   astack
-c----------------------------------------
-135   continue
-c
-      if (sp .lt. 1) call oerror(n112, m1, 'ASTACK')
-c
-      i1 = nint(v(sp))
-      if (i1 .lt. 1 .or. i1 .gt. maxstck) 
-     .		call oerror(n112, m2, 'ASTACK')
-c
-      xx = astack(i1)
-c
-      goto 5001
-c
-c----------------------------------------
-c                                   compar
-c----------------------------------------
-140   continue
-c
-      if (sp .lt. 8) 
-     .		call oerror(n112, m1, 'COMPARE : Two strings needed')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'COMPARE')
-      if (stack(sp-4) .ne. 3) call oerror(n112, m1, 'COMPARE')
-c
-c     First string first
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize1 = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize1 = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'COMPARE')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      compar1 = ' '
-      do 141 i = 1, isize1
-	rcompar1(i) = c(loc+i-1)
-141	continue
-c
-c     Now for 2nd string
-c
-      LOC=STACK(SP-5)
-      itype = stack(sp-7)
-      if  (itype .eq. 14) then
-	isize2 = irealp(stack(sp-6))
-      else if (itype .eq. 7) then
-	isize2 = stack(sp-6)
-      else 
-	call oerror(n112, m1, 'COMPARE')
-      endif
-      compar2 = ' '
-      do 142 i = 1, isize2
-	rcompar2(i) = c(loc+i-1)
-142	continue
-c
-      sp = sp - 7
-      if (compar1 .eq. compar2) then
-	xx = 1.0
-      else
-	xx = -1.0
-      endif
-      goto 5001
-c
-c----------------------------------------
-c                                   lnblnk
-c----------------------------------------
-150   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'LNBLNK')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'LNBLNK')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'LNBLNK')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      compar1 = ' '
-      do 151 i = 1, isize
-	rcompar1(i) = c(loc+i-1)
-151	continue
-c
-      sp = sp - 3
-      xx = lastblnk(compar1)
-c
-      goto 5001
-c
-c----------------------------------------
-c                                   length
-c----------------------------------------
-160   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'LENGTH')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'LENGTH')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	xx = 2*stack(sp-2)
-      else if (itype .eq. 7) then
-	xx = 4*stack(sp-2)
-      else 
-	call oerror(n112, m1, 'LENGTH')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      sp = sp - 3
-      goto 5001
-c
-C-----------------------------------------------------------------------
-C					CHANTOX   
-C-----------------------------------------------------------------------
-170   CONTINUE
-c
-      if (dtwh(c12ni,1) .eq. 0) call oerror(n225, m2, 'CHANTOX')
-c
-      rchan=V(SP)
-c
-      xx = chantox(lxa, dtwh(1,1), rchan, ierr)
-      if (ierr .ne. 0) call oerror(n272, m2, 'CHANTOX')
-
-      goto 5001
-c
-C-----------------------------------------------------------------------
-C					XTOCHAN   
-C-----------------------------------------------------------------------
-180   CONTINUE
-c
-      if (dtwh(c12ni,1) .eq. 0) call oerror(n272, m2, 'CHANTOX')
-c
-      rchan=V(SP)
-c
-      xx = xtochan(lxa, dtwh(1,1), rchan, ierr)
-      if (ierr .ne. 0) call oerror(n272, m2, 'XTOCHAN')
-
-      goto 5001
-c
-C-----------------------------------------------------------------------
-C					FOPEN   
-C-----------------------------------------------------------------------
-190   CONTINUE
-c
-      if (sp .lt. 5) call oerror(n112, m1, 
-     .				'FOPEN: Two needed')
-c
-      if (stack(sp-1) .ne. 3) call oerror(n112, m1, 'FOPEN')
-c
-c     mode first
-      if (v(sp) .eq. dinfinity() ) then
-	openmode = 0
-      else
-        openmode = nint(v(sp))
-      endif
-      if (openmode .lt. 0) 
-     .	   call oerror(n112, m1, 'FOPEN: Bad open parameter')
-c
-c     Filename next
-      LOC=STACK(SP-2)
-      itype = stack(sp-4)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-3))
-      else if (itype .eq. 7) then
-	isize = stack(sp-3)
-      else 
-	call oerror(n112, m1, 'FOPEN')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      compar1 = ' '
-      do 191 i = 1, isize
-	rcompar1(i) = c(loc+i-1)
-191	continue
-c
-      sp = sp - 4
-c
-      do 192 i = 1, nfiles
-	if (ffile(i,1) .eq. 0) goto 193
-192	continue
-      call oerror(n28, m1, 'FOPEN')
-c
-193   rwmode = mod(openmode,10)
-      posmode = mod(openmode/10, 10)
-      exmode = mod(openmode/100, 10)
-      if (rwmode .gt. 2 .or. posmode .gt. 1 .or. exmode .gt. 3)
-     .		call oerror(n112, m1, 'FOPEN: Bad open parameter')
-c
-      if (exmode .eq. SCR) then
-	if (lastblnk(compar1) .ne. 0) call oerror(n352, m1, 
-     .		'FOPEN: Scratch file cannot have a name')
-	if (rwmode .eq. RO) call oerror(n352, m1, 
-     .		'FOPEN: Scratch file cannot be opened for reading')
-        iunit = ioget()
-        if (iunit .lt. 0) call oerror(n28, m1, 'FOPEN')
-	open(unit=iunit, access='sequential', form='print', iostat=ier,
-     .		status='scratch')
-c
-      else if (exmode .eq. NEW) then
-	if (lastblnk(compar1) .eq. 0) call oerror(n352, m1, 
-     .		'FOPEN: New file must have a name')
-	if (rwmode .eq. RO) call oerror(n352, m1, 
-     .		'FOPEN: New file cannot be opened for reading')
-        iunit = ioget()
-        if (iunit .lt. 0) call oerror(n28, m1, 'FOPEN')
-        call filecomp(compar1, fullname)
-	open(unit=iunit, access='sequential', form='print', iostat=ier,
-     .		status='new', file = fullname)
-c
-      else if (exmode .eq. OLD .or. exmode .eq. UNK) then
-	if (lastblnk(compar1) .eq. 0) call oerror(n352, m1, 
-     .		'FOPEN: Must supply a file name')
-	if (exmode .eq. OLD) then
-	   stat = 'old'
-	else
-	   stat = 'unknown'
-	endif
-        iunit = ioget()
-        if (iunit .lt. 0) call oerror(n28, m1, 'FOPEN')
-        call filecomp(compar1, fullname)
-	if (posmode .eq. EOF) then
-	   open(unit=iunit, access='sequential', form='print', iostat=ier,
-     .		status= stat, file = fullname, fileopt='eof')
-	else
-	   open(unit=iunit, access='sequential', form='print', iostat=ier,
-     .		status= stat, file = fullname)
-	endif
-c
-      else
-        call oerror(n112, m1, 'FOPEN: Bad open parameter')
-      endif
-c
-      if (ier .ne. 0) then
-	call ioput(iunit)
-	call oerror(n352, m1, 'FOPEN')
-      endif
-c
-      ffile(i,1) = iunit
-      ffile(i,2) = rwmode
-      ffile(i,3) = posmode
-      ffile(i,4) = exmode
-      cfile(i) = compar1
-      xx = iunit
-c
-      goto 5001
-c
-c----------------------------------
-c     MD0
-c----------------------------------
-  200 iptwh2 = 1
-      goto 209
-c----------------------------------
-c     MD1
-c----------------------------------
-  201 iptwh2 = 2
-      goto 209
-c----------------------------------
-c     MD2
-c----------------------------------
-  202 iptwh2 = 3
-      goto 209
-c----------------------------------
-c     MD3
-c----------------------------------
-  203 iptwh2 = 4
-c
- 209  if (sp .ge. 2) then
-  	 i2 = nint(v(sp))
-  	 i1 = nint(v(sp-1))
-         sp = sp - 1
-         if (i1 .le. 0 .or. i1 .gt. mhead(mnaxis1,iptwh2)) then
-	    call oerror(n245, m2, 'MD0/D9')
-         else if (i2 .le. 0 .or. i2 .gt. mhead(mnaxis2,iptwh2)) then
-	    call oerror(n245, m2, 'MD0/D9')
-	 else
-            xx = mdata(ilct(i1,i2,iptwh2))
-         endif
-      else
-         call oerror(n112, m1, 'MD0/D9: Two needed')
-      endif
-      goto 5001
-c
-c----------------------------------
-c     MH0
-c----------------------------------
-  210 iptwh2 = 1
-      goto 219
-c----------------------------------
-c     MH1
-c----------------------------------
-  211 iptwh2 = 2
-      goto 219
-c----------------------------------
-c     MH2
-c----------------------------------
-  212 iptwh2 = 3
-      goto 219
-c----------------------------------
-c     MH3
-c----------------------------------
-  213 iptwh2 = 4
-c
-219   if (sp .ge. 1) then
-  	 i1 = nint(v(sp))
-c
-         if (i1 .ge. mstrings .and. i1 .le. mheadsize) then
-c
-c	    Strings
-c
-            sp = sp - 1
-	    if (i1 .eq. mcomment) then
-		numi2 = 4*min(7,(mheadsize-mcomment+1))
-            else if (i1 .eq. mobject) then
-                numi2 = 8
-	    else
-		numi2 = 4
-	    endif
-	    call runtag(numi2, itag)
-c                    date is stored as a double but it behaves as a string
-            if (i1 .ne. mdate) then
-               call copy(numi2, mhead(i1,iptwh2), c(itag))
-            else
-               slen = 24
-               call fromdate(slen, sused, mhead(i1, iptwh2), c(itag))
-c
-               iused = sused
-               numi2 = iwpc(iused)
-            endif
-c           Store contents of header word into K
-c
-c	    Update stack pointers so that proper K location will be
-c	    on the stack
-	    sp = sp + 4
-	    stack(sp-3) = 14
-	    stack(sp-2) = numi2
-	    stack(sp-1) = itag
-	    stack(sp) = 3
-	    v(sp-3) = c(7)
-	    v(sp-2) = c(4)
-	    v(sp-1) = c(itag)
-	    v(sp) = c(2)
-	    goto 1000
-c
-	 else if (i1 .gt. 0 .and. i1. lt. mstrings) then
-c
-c	    Reals
-c
-            xx = mhead(i1, iptwh2)
-            goto 5001
-c
-	 else
-	    call oerror(n245, m2, 'MH0/MH9')
-	 endif
-      else
-         call oerror(n112, m1, 'MH0/MH9: One needed')
-      endif
-c
-c----------------------------------
-c     CD0
-c----------------------------------
- 220  continue
-c
-      if (sp .ge. 3) then
-  	 i3 = nint(v(sp))
-  	 i2 = nint(v(sp-1))
-  	 i1 = nint(v(sp-2))
-         sp = sp - 2
-         if (i1 .le. 0 .or. i1 .gt. chead(cnaxis1)) then
-	    call oerror(n245, m2, 'CD0')
-         else if (i2 .le. 0 .or. i2 .gt. chead(cnaxis2)) then
-	    call oerror(n245, m2, 'CD0')
-         else if (i3 .le. 0 .or. i3 .gt. chead(cnaxis3)) then
-	    call oerror(n245, m2, 'CD0')
-	 else
-            xx = cube(i1,i2,i3)
-         endif
-      else
-         call oerror(n112, m1, 'CD0: Three needed')
-      endif
-      goto 5001
-c
-c----------------------------------
-c     CH0
-c----------------------------------
- 230  continue
-c
-      if (sp .ge. 1) then
-  	 i1 = nint(v(sp))
-c
-         if (i1 .ge. cstrings .and. i1 .le. cheadsize) then
-c
-c	    Strings
-c
-            sp = sp - 1
-	    if (i1 .eq. ccomment) then
-		numi2 = 4*min(7,(cheadsize-ccomment+1))
-            else if (i1 .eq. cobject) then
-                numi2 = 8
-	    else
-		numi2 = 4
-	    endif
-	    call runtag(numi2, itag)
-c                    date is stored as a double but it behaves as a string
-            if (i1 .ne. mdate) then
-               call copy(numi2, chead(i1), c(itag))
-            else
-               call fromdate(slen, sused, chead(i1), c(itag))
-c
-               iused = sused
-               numi2 = iwpc(iused)
-            endif
-c	    Store contents of header word into K
-c
-c	    Update stack pointers so that proper K location will be
-c	    on the stack
-	    sp = sp + 4
-	    stack(sp-3) = 14
-	    stack(sp-2) = numi2
-	    stack(sp-1) = itag
-	    stack(sp) = 3
-	    v(sp-3) = c(7)
-	    v(sp-2) = c(4)
-	    v(sp-1) = c(itag)
-	    v(sp) = c(2)
-	    goto 1000
-c
-	 else if (i1 .gt. 0 .and. i1 .lt. cstrings) then
-c
-c	    Reals
-c
-            xx = chead(i1)
-            goto 5001
-c
-	 else
-	    call oerror(n245, m2, 'CH0')
-	 endif
-      else
-         call oerror(n112, m1, 'CH0: One needed')
-      endif
-c
-c----------------------------------------
-c                                   concat
-c----------------------------------------
-240   continue
-c
-      if (sp .lt. 8) call oerror(n112, m1, 
-     .				'CONCAT: Two strings needed')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'CONCAT')
-      if (stack(sp-4) .ne. 3) call oerror(n112, m1, 'CONCAT')
-c
-c     First string first
-c
-      LOC=STACK(SP-5)
-      itype = stack(sp-7)
-      if  (itype .eq. 14) then
-	isize1 = irealp(stack(sp-6))
-      else if (itype .eq. 7) then
-	isize1 = stack(sp-6)
-      else 
-	call oerror(n112, m1, 'CONCAT')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      compar1 = ' '
-      do 241 i = 1, isize1
-	rcompar1(i) = c(loc+i-1)
-241	continue
-c
-c     Now for 2nd string
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize2 = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize2 = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'CONCAT')
-      endif
-c
-      numi4 = min(15, isize1 + isize2)
-      do 242 i = isize1+1, numi4
-	rcompar1(i) = c(loc+i-isize1-1)
-242	continue
-c
-      numi2 = iwpr(numi4)
-      call runtag(numi2, itag)
-      call copy(numi2, rcompar1(1), c(itag))
-c     Store contents of header word into K
-c
-c     Update stack pointers so that proper K location will be
-c     on the stack
-      sp = sp - 4
-      stack(sp-3) = 14
-      stack(sp-2) = numi2
-      stack(sp-1) = itag
-      stack(sp) = 3
-      v(sp-3) = c(7)
-      v(sp-2) = c(4)
-      v(sp-1) = c(itag)
-      v(sp) = c(2)
-c
-      goto 1000
-c
-c----------------------------------------
-c                                   substr
-c----------------------------------------
-250   continue
-c
-      if (sp .lt. 6) call oerror(n112, m1, 
-     .				'SUBSTR: Three needed')
-c
-      if (stack(sp-2) .ne. 3) call oerror(n112, m1, 'SUBSTR')
-c
-c     String indices first
-      i2 = nint(v(sp))
-      i1 = nint(v(sp-1))
-c
-c     String next
-      LOC=STACK(SP-3)
-      itype = stack(sp-5)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-4))
-      else if (itype .eq. 7) then
-	isize = stack(sp-4)
-      else 
-	call oerror(n112, m1, 'SUBSTR')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      compar1 = ' '
-      do 251 i = 1, isize
-	rcompar1(i) = c(loc+i-1)
-251	continue
-c
-      if (i1 .le. 0 .or. i1 .gt. i2) call oerror(n112, m2, 'SUBSTR')
-      if (i2 .gt. 4*isize) call oerror(n112, m2, 'SUBSTR')
-c 
-      compar2 = compar1(i1:i2)
-      numi2 = min(n30, iwpc(i2-i1+n1))
-c
-      call runtag(numi2, itag)
-      call copy(numi2, rcompar2(1), c(itag))
-c     Store contents of header word into K
-c
-c     Update stack pointers so that proper K location will be
-c     on the stack
-      sp = sp - 2
-      stack(sp-3) = 14
-      stack(sp-2) = numi2
-      stack(sp-1) = itag
-      stack(sp) = 3
-      v(sp-3) = c(7)
-      v(sp-2) = c(4)
-      v(sp-1) = c(itag)
-      v(sp) = c(2)
-c
-      goto 1000
-c
-c----------------------------------------
-c                                   index
-c----------------------------------------
-260   continue
-c
-      if (sp .lt. 8) call oerror(n112, m1, 'INDEX: Two strings needed')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'INDEX')
-      if (stack(sp-4) .ne. 3) call oerror(n112, m1, 'INDEX')
-c
-c     First string first
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize1 = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize1 = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'INDEX')
-      endif
-c     Get the correct size which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      compar1 = ' '
-      do 261 i = 1, isize1
-	rcompar1(i) = c(loc+i-1)
-261	continue
-c
-c     Now for 2nd string
-c
-      LOC=STACK(SP-5)
-      itype = stack(sp-7)
-      if  (itype .eq. 14) then
-	isize2 = irealp(stack(sp-6))
-      else if (itype .eq. 7) then
-	isize2 = stack(sp-6)
-      else 
-	call oerror(n112, m1, 'INDEX')
-      endif
-      compar2 = ' '
-      do 262 i = 1, isize2
-	rcompar2(i) = c(loc+i-1)
-262	continue
-c
-      sp = sp - 7
-c
-      xx = index(compar2, compar1(1:max(1,lastblnk(compar1))))
-c
-      goto 5001
-c---------------------------------------------------------------------
-c              FNAME
-c---------------------------------------------------------------------
-270   continue
-      if (sp .ge. 1) then
-         i1 = nint(v(sp))
-         sp = sp - 1
-c			value is file type (<= 12) or unit # >= 50
-         compar1 = ' '
-         if (i1 .gt. 0 .and. i1 .le. 12) then
-            if (i1 .le. 10) then
-               if (iounit(i1) .gt. 0) compar1 = ciounit(i1)
-            else if (i1 .eq. 11) then
-               if (iprtout .gt. 0) compar1 = cprtout
-            else
-               if (ilogout .gt. 0) compar1 = clogout
-            endif
-         else if (i1 .ge. 50) then
-c			see if this unit number is open
-            do 271 i2 = 1, 10
-               if (ffile(i2,1) .eq. i1) compar1 = cfile(i2)
- 271        continue
-         endif
-c			how long is the string, result on stack must be mult of 4
-         isize1 = lastblnk(compar1)
-         if (isize1 .eq. 0) call oerror(n370, m2, 'FNAME')
-         if (mod(isize1, 4)  .ne. 0) isize1 = (ifix(isize1/4) + 1) * 4
-c			store contents of string into K array
-         numi2 = min(n30, iwpc(isize1))
-         call runtag(numi2, itag)
-         call copy(numi2, rcompar1, c(itag))
-c			update the stack pointers so that proper K loc 
-c			will be on the stack
-         sp = sp + 4
-         stack(sp-3) = 14
-         stack(sp-2) = numi2
-         stack(sp-1) = itag
-         stack(sp) = 3
-         v(sp-3) = c(7)
-         v(sp-2) = c(4)
-         v(sp-1) = c(itag)
-         v(sp) = c(2)
-         goto 1000
-      else
-         call oerror(n112, m1, 'FNAME: One needed')
-      endif
-c
-c--------------------------------------------------------
-C		   XPIX2C, YPIX2T, C2XPIX, T2YPIX	  
-c--------------------------------------------------------
- 280  CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'XPIX2C : One needed')
-      if (numplots .le. 0) call oerror(n299, m2, 'XPIX2C')
-c
-      xx = (v(sp)-bx(numplots))/ax(numplots)
-      if (showplot(numplots) .eq. 1 .and. xlog .gt. 0.5) xx = 10**xx
-c
-      GOTO 5001
-c-----------------
- 290  CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'YPIX2T : One needed')
-      if (numplots .le. 0) call oerror(n299, m2, 'YPIX2T')
-c
-      xx = (v(sp)-by(numplots))/ay(numplots)
-      if (showplot(numplots) .eq. 1 .and. ylog .gt. 0.5) xx = 10**xx
-c
-      GOTO 5001
-c-----------------
- 300  CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'C2XPIX : One needed')
-      if (numplots .le. 0) call oerror(n299, m2, 'C2XPIX')
-c
-      if (showplot(numplots) .eq. 1 .and. xlog .gt. 0.5) then
-	xx = log10(v(sp))*ax(numplots) + bx(numplots)
-      else
-        xx = v(sp)*ax(numplots) + bx(numplots)
-      endif
-c
-      GOTO 5001
-c-----------------
- 310  CONTINUE
-      if (sp.lt.1) call oerror(n112, m1, 'T2YPIX : One needed')
-      if (numplots .le. 0) call oerror(n299, m2, 'T2YPIX')
-c
-      if (showplot(numplots) .eq. 1 .and. ylog .gt. 0.5) then
-	xx = log10(v(sp))*ay(numplots) + by(numplots)
-      else
-        xx = v(sp)*ay(numplots) + by(numplots)
-      endif
-c
-      GOTO 5001
-C---------------------------------------------------------------------
-C	       E    X	 I    T
-C---------------------------------------------------------------------
-1000  LFLAG=2
-      GO TO 10000
-5000  lflag=4
-      goto 10000
-5001  LFLAG=5
-      GO TO 10000
-c
-10000 CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/functn.f unipops-3.6/source/conline/condar/functn.f
--- 3.5/source/conline/condar/functn.f	2000-03-16 11:36:52.000000000 -0700
+++ unipops-3.6/source/conline/condar/functn.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,49 +0,0 @@
-      real FUNCTION FUNCTN(X,I,PARMS,CONST,MODFIT)
-C-----------------------------------------------------------------------
-C @(#)functn.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C  THIS FUNCTION SUBPROGRAM CALCULATES THE SYSTEM TEMPERATURE FOR
-C  A GIVEN ATMOSPHERIC OPTICAL DEPTH, RECEIVER NOISE TEMP,
-C  AMBIENT TEMPERATURE, MEAN ATMOSPHERIC TEMPERATURE, AND SKY
-C  EFFICIENCY.
-C
-C  DESCRIPTION OF PARAMETERS:
-C    X - ARRAY OF DATA POINTS FOR INDEPENDENT VARIABLE (AIR MASS);
-C    I - INDEX OF DATA POINTS;
-C    PARMS - ARRAY OF PARAMETERS;
-C    CONST - ARRAY OF CONSTANTS;
-C    MODFIT - FIT MODE, I.E., WHICH VARIABLES ARE TO BE FREE OF FIXED.
-C
-      real X(*), PARMS(*), CONST(*), tau0, rtm, rtsbr, rtchop, etal, xi,
-     .     ex, rtbg
-      integer*2 modfit, i
-c
-C  DEFINE PARAMETERS AS TRANSFERRED FROM THE MAIN PROGRAM:
-      TAU0 = PARMS(1)
-      RTM = CONST(5)
-      RTSBR = CONST(8)
-      RTBG = CONST(10)
-      RTCHOP = CONST(14)
-C
-C  DEFINE CONSTANTS AND FREE PARAMETERS ACCORDING TO MODFIT:
-C
-      GO TO (310,315) MODFIT
-  310 CONTINUE
-      ETAL = CONST(15)
-      GO TO 330
-  315 CONTINUE
-      ETAL = PARMS(2)
-  330 CONTINUE
-C
-C  FUNCTION IS TCAL = RTCHOP - ETAL*RTM*(1 - EXP(-TAU0 * X))
-C          - (1 - ETAL)*RTSBR - ETAL*RTBG*EXP(-TAU0 * X)
-C
-      XI = X(I)
-      EX = EXP(-TAU0*XI)
-      FUNCTN = RTCHOP - ETAL*RTM*(1. - EX)
-      FUNCTN = FUNCTN - (1. - ETAL)*RTSBR - ETAL*RTBG*EX
-      RETURN
-      END
-C
-
diff -uNr 3.5/source/conline/condar/funfunct.F unipops-3.6/source/conline/condar/funfunct.F
--- 3.5/source/conline/condar/funfunct.F	2000-03-16 11:36:52.000000000 -0700
+++ unipops-3.6/source/conline/condar/funfunct.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,230 +0,0 @@
-      subroutine funfunct (lflag, J)
-C-------------------------------------------------------------------------------
-C  @(#)funfunct.F	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     lcursors - Flag, Ccur, Vcur, Tcur, Fcur, Mcur
-c
-C-------------------------------------------------------------------------------
-c
-      integer*2 ichar, ix, jj, iptwh, lflag, j, iy, ii, kk, ierr,
-     .		nplot, itemp(8), numi2, itag
-      integer*2 m2, m3, n120, n255, n264, n294, n299, n3,
-     .		n2, n270, n271, n273, m1, n244
-      real*4 rand
-      integer*4 izero, ilct
-      double precision chantox
-      logical okarray
-      character*8 ztime
-      character*16 zdate, ctemp
-c
-      include 'stk.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'mform.inc'
-      INCLUDE 'appl.inc'
-c
-      double precision dtmphdr(PADDED_HDR_SIZE)
-c
-      equivalence (itemp, ctemp)
-c
-      INCLUDE 'mappl.inc'
-      include 'core.inc'
-c
-      data m2, m3, n120, n255, n264, n294, n299, n2, n3,
-     .	    n270, n271, n273, n244, m1
-     .     /-2, -3, 120, 255, 264, 294, 299, 2, 3, 270,
-     .	    271, 273, 244, -1/
-c
-      IPTWH = 1
-c
-      JJ=J
-      GO TO (66,67,68,60,70,80,90,100,110,120), JJ
-      call oerror(n120, m3, 'FUNFUNCT')
-c-------------------------
-C                                   XCUR, YCUR
-c-------------------------
- 66   ichar = 0
-      CALL CURSOR (ichar,IX,IY)
-      SP = SP +	1
-      xx = FLOAT(IX)
-      GO TO 99
-c-------------------------
- 67   ichar = 0
-      CALL CURSOR (ichar,IX,IY)
-      SP = SP +	1
-      xx = FLOAT(IY)
-      GO TO 99
-c----------------------------------------
-c				rand
-c----------------------------------------
- 68   SP = SP +	1
-      izero = 0
-      xx = 2*rand(izero) - 1
-      GO TO 99
-C----------------------------------------------------------------------
-C					CCUR   
-C----------------------------------------------------------------------
-   60 CONTINUE
-      if (numplots .le. 0) call oerror(n299, m2, 'CCUR')
-c
-      ichar = 0
-      CALL CURSOR (ICHAR,IX,IY)
-      SP = SP +	1
-c
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) call oerror(n244, m2, 'CCUR')
-c
-      XX = (FLOAT(IX)-bx(nplot))/AX(nplot)
-      if (showplot(nplot) .eq. 1 .and. dtmphdr(5) .gt. 0.5) xx = 10**xx
-c 
-      GO TO 99
-C-----------------------------------------------------------------------
-C					VCUR   
-C-----------------------------------------------------------------------
- 70   CONTINUE
-      if (numplots .le. 0) call oerror(n299, m2, 'VCUR')
-c
-      ichar = 0
-      CALL CURSOR (ICHAR,IX,IY)
-      SP=SP+1
-
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) call oerror(n244, m2, 'VCUR')
-c
-      if (showplot(nplot) .eq. 1) call oerror(n294, m2, 'VCUR')
-c
-      if (showplot(nplot) .eq. 0) then
-        if (.not. okarray(n3, dtmphdr) ) call oerror(n270, m2, 'VCUR')
-      else
-        if (.not. okarray(m2, dtmphdr) ) call oerror(n273, m2, 'VCUR')
-      endif
-c
-      XX=(FLOAT(IX)-bx(nplot))/AX(nplot)
-      if (showplot(nplot) .eq. 0) then
-        xx = chantox(n3, dtmphdr, sngl(xx), ierr)
-      else
-	xx = chantox(m2, dtmphdr, sngl(xx), ierr)
-      endif
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C					TCUR   
-C-----------------------------------------------------------------------
- 80   CONTINUE
-      if (numplots .le. 0) call oerror(n299, m2, 'TCUR')
-c
-      ichar = 0
-      CALL CURSOR (ICHAR,IX,IY)
-      SP=SP+1
-c
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) call oerror(n244, m2, 'TCUR')
-c
-      XX=(FLOAT(IY)-BY(nplot))/AY(nplot)
-      if (showplot(nplot) .eq. 1 .and. dtmphdr(6) .gt. 0.5) xx = 10**xx
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C					FCUR   
-C-----------------------------------------------------------------------
- 90   CONTINUE
-      if (numplots .le. 0) call oerror(n299, m2, 'FCUR')
-c
-      ichar = 0
-      CALL CURSOR (ICHAR,IX,IY)
-      SP=SP+1
-c
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) call oerror(n244, m2, 'FCUR')
-c
-      if (showplot(nplot) .eq. 1) call oerror(n294, m2, 'FCUR')
-c
-      if (showplot(nplot) .eq. 0) then
-        if (.not. okarray(n2, dtmphdr) ) call oerror(n271, m2, 'FCUR')
-      else
-        if (.not. okarray(m1, dtmphdr) ) call oerror(n273, m2, 'FCUR')
-      endif
-c
-      if (showplot(nplot) .eq. 0) then
-        XX=(FLOAT(IX)-bx(nplot))/AX(nplot)
-        xx = chantox(n2, dtmphdr, sngl(xx), ierr)
-      else
-        XX=(FLOAT(iy)-by(nplot))/ay(nplot)
-        xx = chantox(m1, dtmphdr, sngl(xx), ierr)
-      endif
-c
-      goto 99
-c
-C-----------------------------------------------------------------------
-C					MCUR   
-C-----------------------------------------------------------------------
-100   CONTINUE
-      if (numplots .le. 0) call oerror(n299, m2, 'MCUR')
-      if (showplot(numplots) .le. 1) call oerror(n264, m2, 'MCUR')
-c
-      ichar = 0
-      CALL CURSOR (ICHAR,IX,IY)
-      SP=SP+1
-c
-      call rtrn4cur(ix, iy, nplot, dtmphdr, ierr)
-      if (ierr .ne. 0) call oerror(n244, m2, 'MCUR')
-c
-      if (numplots .ne. nplot) call oerror(n264, m2, 'MCUR')
-c
-      ii=nint(FLOAT(IX)-bx(1))/AX(1)
-      kk=nint(float(iy)-by(1))/ay(1)
-c
-      if (ii .ge. 1 .and. ii .le. mhead(mnaxis1,iptwh) .and.
-     .    kk .ge. 1 .and. kk .le. mhead(mnaxis2,iptwh) ) then      
-         xx = mdata(ilct(ii,kk,iptwh))
-      else
-	 xx = default
-      endif
-c
-      GO TO 99
-c
-C-----------------------------------------------------------------------
-C					DATE   
-C-----------------------------------------------------------------------
-110   continue
-      ctemp = zdate()
-      numi2 = 8
-      call runtag(numi2, itag)
-      call copy(numi2, itemp, c(itag))
-      sp = sp + 4
-      stack(sp-3) = 14
-      stack(sp-2) = numi2
-      stack(sp-1) = itag
-      stack(sp) = 3
-      v(sp-3) = c(7)
-      v(sp-2) = c(4)
-      v(sp-1) = c(itag)
-      v(sp) = c(2)
-      goto 1000
-C-----------------------------------------------------------------------
-C					TIME   
-C-----------------------------------------------------------------------
-120   continue
-      ctemp = ztime()
-      numi2 = 4
-      call runtag(numi2, itag)
-      call copy(numi2, itemp, c(itag))
-      sp = sp + 4
-      stack(sp-3) = 14
-      stack(sp-2) = numi2
-      stack(sp-1) = itag
-      stack(sp) = 3
-      v(sp-3) = c(7)
-      v(sp-2) = c(4)
-      v(sp-1) = c(itag)
-      v(sp) = c(2)
-      goto 1000
-C --------------------------------------------------------------
-99    lflag = 5
-      go to 10000
-1000  lflag=2
-      go to 10000
-c
-10000 continue
-      return
-      end
diff -uNr 3.5/source/conline/condar/gbmean.f unipops-3.6/source/conline/condar/gbmean.f
--- 3.5/source/conline/condar/gbmean.f	2000-03-16 11:36:53.000000000 -0700
+++ unipops-3.6/source/conline/condar/gbmean.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,52 +0,0 @@
-      subroutine gbmean(xdata, npts, smean, srms)
-c
-c     @(#)gbmean.f	5.1 06/22/94
-c
-c     Calculates the mean and rms for a Green Bank on-off scan
-c
-c     xdata = array containing data points
-c     npts = number of data points to use from array
-c     smean = returns the mean value
-c     srms = return the rms fluctuations
-c
-      real*4 xdata(*), smean, srms
-      integer*2 npts
-      logical okreal4
-c
-      integer*2 i, npairs
-      real*4 offs
-c
-      offs = 0.0
-      npairs = 0
-      do 111 i = 1, npts-2, 2
-	 if (okreal4(xdata(i))) then
-	   offs = offs +  xdata(i)
-           npairs = npairs + 1
-	 endif
-111	 continue
-      if (npairs .gt. 0) offs = offs / npairs
-c
-      smean = 0.0
-      npairs = 0
-      do 112 i = 2, npts-3,  2
-	  if (okreal4(xdata(i))) then
-		smean = smean + xdata(i)
-                npairs = npairs + 1
-	  endif
-112	  continue
-      if (npairs .gt. 0) smean = smean / npairs - offs
-c
-      srms = 0.0
-      npairs = 0
-      do 113 i = 2, npts-3,  2
-	 if (okreal4(xdata(i))) then
-		srms = srms + (xdata(i) - offs - smean)**2
-                npairs = npairs + 1
-	 endif
-113	 continue
-      if (npairs .gt. 1) srms = sqrt(srms / (npairs*(npairs-1)))
-c
-      return
-      end
-c
-
diff -uNr 3.5/source/conline/condar/gbrecio.c unipops-3.6/source/conline/condar/gbrecio.c
--- 3.5/source/conline/condar/gbrecio.c	2000-03-16 11:37:55.000000000 -0700
+++ unipops-3.6/source/conline/condar/gbrecio.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,126 +0,0 @@
-
-/* @(#)gbrecio.c	5.1 06/22/94 */
-
-/*		ensure that this uses the unpadded sddformat */
-#undef USEPAD
-#include <sdd.h>
-#include <sp_hdr.h>
-
-/*  Get an  AC scan, feed, phase, and record  */
-void getacrec_(ostruct,ind,phase,rec,errcode)
-	sddformat *ostruct;
-	int *ind, *phase, *rec, *errcode;
-
-#define out ostruct->header
-{
-	int i, j, infeed, scanno;
-	MiniHDR mini_hdr;
-
-	   scanno = out.scan_number;
-	   infeed = *ind;
-
-	   gacir_(&scanno, &infeed, phase, rec, &mini_hdr, errcode);
-
-	   if (*errcode != 0) { 
-		*errcode = 5; return;
-		}
-
-	   for (i=0;i<out.nb_integrations;i++) 
-		ostruct->data[i] = mini_hdr.data[i];
-
-	   out.data_length = 4*out.nb_integrations;
-	   out.source_syst_temp = mini_hdr.t_sys;
-	   out.std_deviation_mean = mini_hdr.t_rms;
-	   out.effint = mini_hdr.eff_int;
-	   out.tot_integ_time = mini_hdr.t_dur;
-	   out.ref_sys_temp = mini_hdr.t_ref;
-	   out.nb_phases = mini_hdr.no_phases;	   
-	   out.nb_records = mini_hdr.num_rec;	   
-	   out.phase_id = mini_hdr.phase_id;	   
-	   out.record_id = mini_hdr.record_id;	   
-}
-
-/*  Get an  SP scan, feed, phase, and record  */
-void getsprec_(ostruct,ind,phase,rec,errcode)
-	sddformat *ostruct;
-	int *ind, *phase, *rec, *errcode;
-
-#define out ostruct->header
-{
-	int i, j, infeed, scanno;
-	MiniHDR mini_hdr;
-
-	   infeed = *ind - 1;
-	   scanno = out.scan_number;
-
-	   if (*phase == 0 && *rec == 0) 
-		gspscan_(&scanno, &infeed, &mini_hdr, errcode);
-	   else
-		gspir_(&scanno, &infeed, phase, rec, &mini_hdr, errcode);
-
-	   if (*errcode != 0) { 
-		*errcode = 5; return;
-		}
-	   out.nb_integrations = mini_hdr.no_int;
-	   out.data_length = 4*out.nb_integrations;
-
-	   /* May need to flip sense of data  */
-
-	   if (mini_hdr.freq_res < 0.) {  
-	     out.ref_point_nb = (out.nb_integrations / 2) + 1;
-	     out.freq_resolution = mini_hdr.freq_res; 
-	     for (i=0;i<out.nb_integrations;i++) 
-		ostruct->data[i] = out.calibration_temp*mini_hdr.data[i];
-	     }
-	   else {
-	     out.ref_point_nb = (out.nb_integrations / 2);
-	     out.freq_resolution = -mini_hdr.freq_res; 
-	     for (i=0, j=out.nb_integrations-1; i<out.nb_integrations; i++, j--) 
-		ostruct->data[i] = out.calibration_temp*mini_hdr.data[j];
-	     }
-
-	   /* NOTE:  All temperatures must be scaled by TCAL; Assume that some
-		frequency information is correct in Modcomp and SP header -- no
-		consistency checking!  */
-
-	   out.std_deviation_mean = out.calibration_temp*mini_hdr.t_rms;
-	   out.la = mini_hdr.iff;
-	   out.lb = mini_hdr.iff;
-	   out.lc = mini_hdr.iff;
-	   out.ld = mini_hdr.iff;
-	   out.bandwidth = mini_hdr.bandwidth;
-	   out.source_syst_temp = out.calibration_temp*mini_hdr.t_sys;
-	   out.ref_sys_temp = out.calibration_temp*mini_hdr.t_ref;
-	   out.tot_integ_time = mini_hdr.t_dur;
-	   out.effint = mini_hdr.eff_int;
-	   out.length_sample = mini_hdr.int_time;
-	   out.length_cycle = mini_hdr.phase_time;	   
-	   out.nb_receiv_channels = mini_hdr.no_rchan;
-	   out.nb_phases = mini_hdr.no_phases;	   
-	   out.phase_id = mini_hdr.phase_id;	   
-	   out.nb_records = mini_hdr.num_rec;	   
-	   out.record_id = mini_hdr.record_id;	   
-}
-
-/*	getrecio_ chooses the correct one of the above to call */
-/*	using the information in ostruct */
-
-#include <string.h>
-void getrecio_(phase, record, feed, ostruct, irtn)
-	int *phase, *record, *feed, *irtn;
-	sddformat *ostruct;
-
-#define out ostruct->header
-{
-        void getacrec_(), getsprec_();
-
-        if (strncmp(out.back_end_desc,"1024ACIV", 8) == 0) {
-           getacrec_(ostruct, feed, phase, record, irtn);
-           if (*irtn != 0) *irtn = -360;
-	}else if (strncmp(out.back_end_desc,"SPECPROC", 8) == 0) {
-           getsprec_(ostruct, feed, phase, record, irtn);
-           if (*irtn != 0) *irtn = -360;
-        } else {
-           *irtn = -241;
-        }
-}
diff -uNr 3.5/source/conline/condar/getbyloc.f unipops-3.6/source/conline/condar/getbyloc.f
--- 3.5/source/conline/condar/getbyloc.f	2000-03-16 11:36:54.000000000 -0700
+++ unipops-3.6/source/conline/condar/getbyloc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,62 +0,0 @@
-      subroutine getbyloc(array, iloc, imagic, iunit, filename, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getbyloc.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Retrieves the array ARRAY from the ILOC location in file FILENAME
-c     which is attached to IO unit IUNIT.  
-c
-c     All of the work is now done by getascan.
-c     The filename is ignored.
-c
-      include 'params.inc'
-c
-      integer*4 lunit, flag, maxsize, lrtn
-c
-      parameter (maxsize = HDU_FLOAT_SIZE/2)
-      parameter (flag = 0)
-      character*(*) filename
-      character*80 stch
-      double precision array(*), xdata(maxsize)
-      integer*2 iloc, iunit, ierr, imagic, ier
-      integer*2 n80, n120, m3
-c
-      real location
-c
-      data n80, n120, m3 /80, 120, -3/
-c
-      ierr = 0
-c
-      lunit = iunit
-      location = iloc
-      call getascan(lunit,location,flag,xdata,maxsize,lrtn)
-      if (lrtn .eq. 0) then
-         call raz(array)
-         call conversion2(xdata, array, ier)
-         if (ier .ne. 0) ierr = 360
-         imagic = 2
-      else
-         imagic = -1
-         if (lrtn .eq. 1) then
-            ierr = -370
-         else if (lrtn .eq. 2) then
-            ierr = -357
-         else if (lrtn .eq. 3) then
-            ierr = -359
-         else if (lrtn .eq. 4) then
-            ierr = 368
-         else if (lrtn .eq. 5) then
-            ierr = 371
-         else
-c				unknown error, a real bug
-            write(stch, 20) lrtn
-            call oerror(n120, m3, stch)
-         endif
-      endif
-c
-      return
-c
- 20   format('Unknown disk error code ', i)
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/getbynum.f unipops-3.6/source/conline/condar/getbynum.f
--- 3.5/source/conline/condar/getbynum.f	2000-03-16 11:36:54.000000000 -0700
+++ unipops-3.6/source/conline/condar/getbynum.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,61 +0,0 @@
-      subroutine getbynum(array, scan, imagic, iunit, filename, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getbynum.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Retrieves the array ARRAY from the ILOC location in file FILENAME
-c     which is attached to IO unit IUNIT.  
-c
-c     All of the work is done in getascan.
-c     The filename is ignored.
-c
-      include 'params.inc'
-c
-      integer*4 lunit, flag, maxsize, lrtn
-c
-      parameter (maxsize = HDU_FLOAT_SIZE/2)
-      parameter (flag = 1)
-      character*(*) filename
-      character*80 stch
-      double precision array(*), xdata(maxsize)
-      integer*2 iunit, ierr, imagic, ier
-      integer*2 n80, n120, m3
-      real scan, location
-c
-      data n80, n120, m3 /80, 120, -3/
-c
-      ierr = 0
-c
-      lunit = iunit
-      location = scan
-      call getascan(lunit,location,flag,xdata,maxsize,lrtn)
-      if (lrtn .eq. 0) then
-         call raz(array)
-         call conversion2(xdata, array, ier)
-         if (ier .ne. 0) ierr = 360
-         imagic = 2
-      else
-         imagic = -1
-         if (lrtn .eq. 1) then
-            ierr = -370
-         else if (lrtn .eq. 2) then
-            ierr = -357
-         else if (lrtn .eq. 3) then
-            ierr = -359
-         else if (lrtn .eq. 4) then
-            ierr = 362
-         else if (lrtn .eq. 5) then
-            ierr = 371
-         else
-c				an unknown error, a real problem
-            write(stch, 20) lrtn
-            call oerror(n120, m3, stch)
-         endif
-      endif
-c
-      return
-c
- 20   format('Unknown disk error code ', i)
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/getcurrent.F unipops-3.6/source/conline/condar/getcurrent.F
--- 3.5/source/conline/condar/getcurrent.F	2000-03-16 11:36:54.000000000 -0700
+++ unipops-3.6/source/conline/condar/getcurrent.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,51 +0,0 @@
-      subroutine getcurrent(ifeed, iptwh, ier2)
-C-------------------------------------------------------------------------------
-C  @(#)getcurrent.F	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Gets the mostcurrent scan and places it in TWH(1,iptwh)
-c
-      include 'appl.inc'
-      integer*4 irtn, if4, deffeed
-      integer*2 ifeed, iptwh, ier2
-      real*8 xtemp(HDU_FLOAT_SIZE/2)
-c
-#ifdef CONTINUUM
-      integer*4 iactual, if5
-#else
-#endif
-c
-      include 'cio.inc'
-c
-      if4 = ifeed
-      ier2 = 0
-      if(if4.eq.0 .or. if4.gt.99) if4 = deffeed()
-c
-      if (online) then
-#ifdef CONTINUUM
-	iactual = MAX_DATA_POINTS
-	if (if4 .eq. 99) then
-	   if5 = -1
-	else if (if4 .eq. 98) then
-	   if5 = 0
-	else
-	   if5 = if4
-	endif
-	call glcont(if5, iactual, MAX_DATA_POINTS, xtemp, irtn)
-#else
-	call gcscan(xtemp, if4, irtn)
-#endif
-        if (irtn .ne. 0) then
-	  ier2 = 361
-        else
-	  call raz(dtwh(1,iptwh))
-          call conversion2(xtemp, dtwh(1,iptwh), ier2)
-          if (ier2 .ne. 0) ier2 = 360
-        endif
-      else
-	ier2 = 361
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/getlist.f unipops-3.6/source/conline/condar/getlist.f
--- 3.5/source/conline/condar/getlist.f	2000-03-16 11:36:55.000000000 -0700
+++ unipops-3.6/source/conline/condar/getlist.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,33 +0,0 @@
-      subroutine getlist(scans, max, number, iunit, filename, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getlist.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Returns in SCANS the scan numbers in file FILENAME attached to
-c     unit IUNIT.  NUMBER is the number of scans in the file.  Only MAX
-c     number of scans will be loaded into SCANS.
-c
-c     Filename is now ignored, file must already be open via the c sdd routines
-c      
-      character*(*) filename
-      real scans(*)
-      integer*2 number, iunit, max, ierr
-      integer*4 lunit, lmax, lnumber, lrtn
-c
-      number = 0
-      ierr = 0
-c
-      lunit = iunit
-      lmax = max
-      lnumber = 0
-c
-      call getslist(lunit, scans, lnumber, lmax, lrtn)
-      number = lnumber
-c
-      if (lrtn .eq. 1) ierr = 370
-      if (lrtn .eq. 2) ierr = 357
-      if (lrtn .eq. 3) ierr = 359
-c
- 99   continue
-      return
-      end
diff -uNr 3.5/source/conline/condar/getscan.F unipops-3.6/source/conline/condar/getscan.F
--- 3.5/source/conline/condar/getscan.F	2000-03-16 11:36:55.000000000 -0700
+++ unipops-3.6/source/conline/condar/getscan.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,124 +0,0 @@
-      subroutine getscan(scanno, iptwh, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getscan.F	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'cio.inc'
-#ifdef CONTINUUM
-      integer*4 iactual, if5
-#endif
-c
-      integer*4 is4, if4, irtn, deffeed
-      integer*2 iptwh, irtn2, ierr, ier
-      real*4 scanno, ascanno, bscanno
-      real*8 xtemp(HDU_FLOAT_SIZE/2)
-c
-      ierr = 0
-      ascanno = abs(scanno)
-      is4 = int(ascanno+0.001)
-      if4 = mod(100.*ascanno+0.5,100.)
-      if(if4.eq.0 .or. if4.gt.99) if4 = deffeed()
-      bscanno = is4 + float(if4) / 100.0
-c     Find the abs value of scan number (IS4) and feed number (IF4)
-c
-      irtn = -1
-c     Set up irtn with a 'scan not found' flag in case online file or
-c     ofline file doesn't exist.  IRTN will only be cleared when a scan
-c     is found and correctly converted to SDD.
-c
-      if (scanno .gt. 0) then
-c       First search on-line file and then the offline file in the user's 
-c	directory if scan number > 0.
-c
-	if (online) then
-c       Try to get from online file first, then offline
-c
-#ifdef CONTINUUM
-	   iactual = MAX_DATA_POINTS
-	   if (if4 .eq. 99) then
-		if5 = -1
-	   else if (if4 .eq. 98) then
-		if5 = 0
-	   else
-		if5 = if4
-	   endif
-	   call gcont(is4, if5, iactual, MAX_DATA_POINTS, xtemp, irtn)
-#else
-	   call gscan(is4, if4, xtemp, irtn)
-#endif
-c
-           if (irtn .eq. 0) then 
-              call raz(dtwh(1,iptwh))
-              call conversion2(xtemp, dtwh(1,iptwh), ier)
-              if (ier .ne. 0) then
-                 ierr = 360
-                 goto 99
-              endif
-	   endif
-        endif
-c       If scan was found, expand it to padded SDD format 
-c	ier is zero if everything goes well.
-c 
-        if (irtn .ne. 0 .and. iounit(1) .gt. 0) then
-c	    Scan wasn't in online and offline file exists so...
-c
-     	    call getbynum(dtwh(1,iptwh), bscanno, irtn2, iounit(1), 
-     1                    ciounit(1),ier)
-	    if (ier .ne. 0) then
-		ierr = ier
-		goto 99
-	    endif
-	    if (irtn2 .ge. 0) irtn = 0
-	endif
-c	Gets scan from user's data file in SDD format; irtn = 0 if
-c	all goes well.
-c
-      else 
-c       Try offline first of scan < 0.
-c
-	if (iounit(1) .gt. 0) then
-            call getbynum(dtwh(1,iptwh), bscanno, irtn2, iounit(1), 
-     1                    ciounit(1),ier)
-	    if (ier .ne. 0) then
-		ierr = ier
-		goto 99
-	    endif
-	    if (irtn2 .ge. 0) irtn = 0
-	endif
-c	Gets scan from user's data file in SDD format; irtn = 0 if
-c	all goes well.
-c
-        if (irtn .lt. 0 .and. online) then
-c	    Scan wasn't in offline and online file exists so...
-c
-#ifdef CONTINUUM
-	   call gcont(is4, if4, iactual, MAX_DATA_POINTS, xtemp, irtn)
-#else
-	   call gscan(is4, if4, xtemp, irtn)
-#endif
-c
-           if (irtn .eq. 0) then 
-              call raz(dtwh(1,iptwh))
-              call conversion2(xtemp, dtwh(1,iptwh), ier)
-              if (ier .ne. 0) then
-                 ierr = 360
-                 goto 99
-              endif
-	   endif
-c             If scan was found, convert it to SDD format; irtn should be
-c	      zero if everything goes well.
-c 
-         endif
-      endif
-c
-c     At this point, irtn = 0 if scan was found and the scan is in SDD
-c     format.  If not found, irtn is not zero.
-c
-      if (irtn .ne. 0) ierr = 362
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/gget.f unipops-3.6/source/conline/condar/gget.f
--- 3.5/source/conline/condar/gget.f	2000-03-16 11:36:56.000000000 -0700
+++ unipops-3.6/source/conline/condar/gget.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,129 +0,0 @@
-      subroutine gget(scanno, iptwh, icur, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)gget.f	5.1 06/22/94
-C   Get a GAINS scan
-C      scanno = scan_number + [rec_number/100]
-C      iptwh = which array to put it in
-C      icur = 0 => by scan number
-C             1 => get current scan from on-line file
-C      ierr = return error value
-C-------------------------------------------------------------------------------
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'cio.inc'
-      integer*4 isize
-      parameter (isize = 11200)
-c
-      integer*4 is4, if4, irtn, deffeed 
-      integer*4 icur
-      integer*2 iptwh, irtn2, ierr, ier
-      real*4 scanno, ascanno, bscanno
-      real*8 xtemp(isize/8)
-c
-      ierr = 0
-      ascanno = abs(scanno)
-      is4 = int(ascanno+0.001)
-      if4 = mod(100.*ascanno+0.5,100.)
-      if(if4.eq.0 .or. if4.gt.99) if4 = deffeed()
-      bscanno = is4 + float(if4) / 100.0
-c     Find the abs value of scan number (IS4) and feed number (IF4)
-c
-      irtn = -1
-c     Set up irtn with a 'scan not found' flag in case online file or
-c     ofline file doesn't exist.  IRTN will only be cleared when a scan
-c     is found and correctly converted to SDD.
-c
-      if (scanno .gt. 0 .or. icur .eq. 1) then
-c       First search on-line file and then the offline file in the user's 
-c	directory if scan number > 0 
-c	if icur = 1 then just check the online file
-c
-	if (online) then
-c       Try to get from online file first, then offline
-c
-           if (icur .eq. 0) then
-	      call ggscan(is4, if4, xtemp, irtn)
-           else
-              if4 = int(scanno+0.001)
-              call glgscan(xtemp, if4, irtn)
-           endif
-c
-c          get gains/zero scan from on_line file this will fail unless
-c	   this is from tucson so there is no need to check onlinesite.
-c
-           if (irtn .eq. 0) then 
-c	if current scan requested, then scanno is REALLY a receiver number
-c	so we need to set if4 appropriately in that case
-              call raz(dtwh(1,iptwh))
-              call conversion2(xtemp, dtwh(1,iptwh), ier)
-              if (irtn .ne. 0) then
-                 ierr = 360
-                 goto 99
-              endif
-	   endif
-        endif
-c       If scan was found, convert it to SDD format; irtn should be
-c	zero if everything goes well.
-c 
-        if (irtn .ne. 0 .and. iounit(4) .gt. 0 .and. icur .eq. 0) then
-c	    Scan wasn't in online and offline file exists and the current
-c           scan wasn't requested so ....
-c
-     	    call getbynum(dtwh(1,iptwh), bscanno, irtn2, iounit(4), 
-     1                    ciounit(4),ier)
-	    if (ier .ne. 0) then
-		ierr = ier
-		goto 99
-	    endif
-	    if (irtn2 .ge. 0) irtn = 0
-	endif
-c	Gets scan from user's data file in SDD format; irtn = 0 if
-c	all goes well.
-c
-      else 
-c       Try offline first of scan < 0.
-c
-	if (iounit(4) .gt. 0) then
-            call getbynum(dtwh(1,iptwh), bscanno, irtn2, iounit(4), 
-     1                    ciounit(4),ier)
-	    if (ier .ne. 0) then
-		ierr = ier
-		goto 99
-	    endif
-	    if (irtn2 .ge. 0) irtn = 0
-	endif
-c	Gets scan from user's data file in SDD format; irtn = 0 if
-c	all goes well.
-c
-        if (irtn .lt. 0 .and. online) then
-c	    Scan wasn't in offline and online file exists so...
-c	    we don't want current scan either
-           icur = 0
-c
-	   call ggscan(is4, if4, xtemp, irtn)
-c          get scan from on_line file,  must be from tucson
-c
-           if (irtn .eq. 0) then 
-              call raz(dtwh(1,iptwh))
-              call conversion2(xtemp, dtwh(1,iptwh), ier)
-              if (irtn .ne. 0) then
-                 ierr = 360
-                 goto 99
-              endif
-	   endif
-c             If scan was found, convert it to SDD format; irtn should be
-c	      zero if everything goes well.
-c 
-         endif
-      endif
-c
-c     At this point, irtn = 0 if scan was found and the scan is in SDD
-c     format.  If not found, irtn is not zero.
-c
-      if (irtn .ne. 0) ierr = 362
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/gnextindex.c unipops-3.6/source/conline/condar/gnextindex.c
--- 3.5/source/conline/condar/gnextindex.c	2000-03-16 11:36:56.000000000 -0700
+++ unipops-3.6/source/conline/condar/gnextindex.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,181 +0,0 @@
-
-/* @(#)gnextindex.c	5.1 06/22/94 */
-
-/* gnextindex_ sets feed_number in index (1st i*2 value) as follows :
- *      -100 if a problem occured
- *      -(feed_number) if feed_number exists but is identical to prev index
- *      +(feed_number) if index has changed or first call
- *   first call is assumed if feed_number is initially zero
- *
- *  idata : the data, in unpadded sdd format (returned via gshead or gchead) 
- *  index : the index to be filled from the info in idata
- */
-
-#include <math.h>
-#include <sdd.h>
-
-struct in {
-      short feed_number;
-      short dummy[3];
-      float sourcex;
-      float sourcey;
-      char source_name[16];
-      float scan_number;
-      float freq_resolution;
-      double rest_freq;
-      float lst;
-      float ut_date;
-      short obsmode, zero1, position_code, zero2;
-   };
-
-void gnextindex_(idata, index)
-   char *idata;
-   struct in *index;
-
-{
-   int i;
-   struct in test;
-   int site, irtn4, i8 = 8, ifeed, i4 = 4, iscan;
-   double temp, temp2;
-   short irtn;
-   sddformat tmpdata;
-#define SDD (tmpdata.header)
-   int onlinesite_();
-   char csc[8];
-   short int id;
-   void modeid_();
-
-   site = onlinesite_();
-
-/*	verify that site is either gb (0) or tuc (1)   */
-
-   if (site < 0 || site > 1) {
-      index->feed_number = -100;
-      return;
-   }
-
-   if (index->feed_number < 0) index->feed_number = - index->feed_number;
-   ifeed = index->feed_number;
-#ifdef CONTINUUM
-#else
-   if (site == 0 && ifeed != 0) {
-/*		green bank online data		*/
-/*		If this is not the first pass (i.e. feed_number is */
-/*		non-zero, we need to do a gshead for line data to get */
-/*		the NEXT feed number if available */
-      index->feed_number++;
-/*		the max feed is 4 */
-      if (index->feed_number > 4) {
-         index->feed_number = -100;
-         return;
-      }
-      ifeed = index->feed_number;
-      iscan = index->scan_number + 0.5;
-      gshead_(&iscan, &ifeed, idata, &irtn4);
-      if (irtn4 != 0) {
-         index->feed_number = -100;
-         return;
-      }
-   } 
-#endif
-/*    convert the data to the internal, padded SDD format */
-   raz_(&tmpdata);
-   conversion2_(idata, &tmpdata, &irtn);
-   if (irtn !=  0) {
-      index->feed_number = -100;
-      return;
-   }
-
-/*	if feed_number is the default first feed number, just load the index */
-
-   if (ifeed == deffeed_() || ifeed == 0) {
-      index->position_code = -1;
-      strncpy(csc,SDD.coord_sys_code,i8);
-      if (strncmp(csc,"GALACTIC",i8) == 0) index->position_code=1;
-      if (strncmp(csc,"1950RADC",i8) == 0) index->position_code=2;
-      if (strncmp(csc,"EPOCRADC",i8) == 0) index->position_code=3;
-      if (strncmp(csc,"MEANRADC",i8) == 0) index->position_code=4;
-      if (strncmp(csc,"APPRADC ",i8) == 0) index->position_code=5;
-      if (strncmp(csc,"APPHADC ",i8) == 0) index->position_code=6;
-      if (strncmp(csc,"1950ECL ",i8) == 0) index->position_code=7;
-      if (strncmp(csc,"EPOCECL ",i8) == 0) index->position_code=8;
-      if (strncmp(csc,"MEANECL ",i8) == 0) index->position_code=9;
-      if (strncmp(csc,"APPECL  ",i8) == 0) index->position_code=10;
-      if (strncmp(csc,"AZEL    ",i8) == 0) index->position_code=11;
-      if (strncmp(csc,"USERDEF ",i8) == 0) index->position_code=12;
-      if (strncmp(csc,"2000RADC",i8) == 0) index->position_code=13;
-      if (strncmp(csc,"INDRADC ",i8) == 0) index->position_code=14;
-      if (strncmp(csc,"        ",i8) == 0) index->position_code=2;
-      if (index->position_code < 0) {
-         index->feed_number = -100;
-         return;
-      }
-      index->sourcex = SDD.sourcex;
-      index->sourcey = SDD.sourcey;
-      for (i=0;i<16;i++) index->source_name[i] = SDD.source_name[i];
-      index->scan_number = SDD.scan_number;
-      iscan = index->scan_number + 0.5;
-      if (ifeed == 0) {
-         index->feed_number = (SDD.scan_number - iscan)*100.0 + 0.5;
-      }
-      index->lst = SDD.lst;
-      index->ut_date = SDD.ut_date;
-
-      if (strncmp(SDD.type_data, "CONT", i4) == 0) {
-         index->obsmode = 256;
-         temp = SDD.deltax_rate * cos(SDD.sourcey * M_PI / 180.0);
-         temp2 = SDD.deltay_rate;
-         index->freq_resolution = hypot(temp, temp2);
-         index->rest_freq = SDD.length_sample;
-      } else if (strncmp(SDD.type_data, "LINE", i4) == 0) {
-         index->obsmode = 512;
-         index->freq_resolution = fabs(SDD.freq_resolution);
-         index->rest_freq = SDD.rest_freq;
-      } else {
-         index->obsmode = 0;
-         index->freq_resolution = fabs(SDD.freq_resolution);
-         index->rest_freq = SDD.rest_freq;
-      }
-
-      modeid_(((SDD.type_data)+4), &id, &irtn);
-      index->obsmode = index->obsmode + id;
-   } else {
-
-/*	put feed dependant info into a test index */
-/*	in tucson, only rest_freq and freq_resolution are liable to change */
-/*	but put sourcex and sourcey in for compatability with gb side */
-
-      test.sourcex = SDD.sourcex;
-      test.sourcey = SDD.sourcey;
-      if (strncmp(SDD.type_data, "CONT", i4) == 0) {
-         temp = SDD.deltax_rate * cos(SDD.sourcey * M_PI / 180.0);
-         temp2 = SDD.deltay_rate;
-         test.freq_resolution = hypot(temp, temp2);
-         test.rest_freq = SDD.length_sample;
-      } else if (strncmp(SDD.type_data, "LINE", i4) == 0) {
-         test.freq_resolution = fabs(SDD.freq_resolution);
-         test.rest_freq = SDD.rest_freq;
-      } else {
-         test.freq_resolution = fabs(SDD.freq_resolution);
-         test.rest_freq = SDD.rest_freq;
-      }
-
-/*	ok, now check for any differences   */
-
-
-      if (test.sourcex != index->sourcex || 
-          test.sourcey != index->sourcey ||
-          test.freq_resolution != index->freq_resolution ||
-          test.rest_freq != index->rest_freq) {
-
-         index->sourcex = test.sourcex;
-         index->sourcey = test.sourcey;
-         index->freq_resolution = test.freq_resolution;
-         index->rest_freq = test.rest_freq;
-      } else {
-/*			else this is the same as the last time */
-         index->feed_number = -(index->feed_number);
-      }
-   }
-   return;
-}
diff -uNr 3.5/source/conline/condar/gprep.f unipops-3.6/source/conline/condar/gprep.f
--- 3.5/source/conline/condar/gprep.f	2000-03-16 11:36:57.000000000 -0700
+++ unipops-3.6/source/conline/condar/gprep.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,126 +0,0 @@
-      SUBROUTINE GPREP (ierr) 
-C-------------------------------------------------------------------------------
-C  @(#)gprep.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-      integer*2 iptwh, istart, ieg, ibg, j, istop, i, is, ie, ierr
-      integer*2 greg(48), gregtmp(48)
-      integer*4 nseg, tseg, xtmp, jj
-      logical okreal4
-c
-      INCLUDE 'cform.inc'
-      include 'core.inc'
-      INCLUDE 'appl.inc'
-C
-C=======================================================================
-C
-      IPTWH = 1
-      IBASE=0
-      ierr = 0
-c
-      istart = dtwh(c12spn, iptwh)
-      istop = istart + dtwh(c12ni, iptwh) - 1
-      if (istart .ge. istop) then
-	ierr = 225
-	goto 99
-      endif
-c
-      do 160 i = 1,maxmrk*4
-         greg(i) = 0
-         gregtmp(i) = 0
- 160  continue
-c
-      IF (gregon(1) .eq. 0.) then
-         IEG=nint(EGAUSS)
-         IBG=nint(BGAUSS)
-         if (ieg.gt.istop .or. ibg.lt.istart .or. ibg.ge.ieg) then
-	   ierr = 285
-	   goto 99
-	 endif
-         DO 10 J = IBG,IEG
-	    if (okreal4(TWH(J+idatoff,IPTWH))) then
-			IBASE=IBASE+1
-	        	XDATA(IBASE)=J + idatoff
-	        	YDATA(IBASE)=TWH(J+idatoff,IPTWH) 
-	    endif
-   10       CONTINUE
-      else 
-c			how man regions are there, order each one to greg
-        nseg = 0
-        do 180 i = 1, maxmrk*4, 2
-           if (gregon(i).ne.0.) then
-              nseg = nseg + 1
-              if (gregon(i+1) .lt. gregon(i)) then
-                 greg(nseg*2-1) = nint(gregon(i+1))
-                 greg(nseg*2) = nint(gregon(i))
-              else if (gregon(i+1) .gt. gregon(i)) then
-                 greg(nseg*2-1) = nint(gregon(i))
-                 greg(nseg*2) = nint(gregon(i+1))
-              else
-                 ierr = 286
-                 goto 99
-              endif
-              if (greg(nseg*2-1) .lt. istart .or. 
-     .            greg(nseg*2) .gt. istop .or.
-     .            greg(nseg*2-1) .eq. greg(nseg*2)) then
-                 ierr = 286
-                 goto 99
-              endif
-           endif
- 180    continue
-c			sort the sections so we can check for overlap
-        gregtmp(1) = greg(1)
-        gregtmp(2) = greg(2)
-        tseg = 1
-        if (nseg .ge. 2) then
-           do 181 i = 2, nseg
-              xtmp = greg(i*2-1)
-              do 182 j = 1, tseg
-                 if (xtmp .lt. gregtmp(j*2-1)) goto 183
- 182          continue
-c			it belongs at location j, insert it
- 183          if (tseg .ge. j) then
-                 do 184 jj = tseg, j, -1
-                    gregtmp(jj*2+1) = gregtmp(jj*2-1)
-                    gregtmp(jj*2+2) = gregtmp(jj*2)
- 184             continue
-              endif
-              gregtmp(j*2-1) = greg(i*2-1)
-              gregtmp(j*2) = greg(i*2)
-              tseg = tseg + 1
- 181       continue
-        endif
-c			check for overlap
-        do 185 i = 2, nseg*2
-           if (gregtmp(i) .le. gregtmp(i-1)) then
-              ierr = 286
-              goto 99
-           endif
- 185    continue
-c			and finally, use them
-        do 18 i = 1, maxmrk*4, 2
-	   IF (gregtmp(i).ne.0.0) then
-	     is = gregtmp(i)
-	     ie = gregtmp(i+1)
-	     if (is.lt.istart .or. ie.gt.istop .or. is.ge.ie) then
-		ierr = 286
-		goto 99
-	     endif
-	     DO 19 J=IS,IE
-	        if (okreal4(TWH(J+idatoff,IPTWH))) then
-			IBASE=IBASE+1
-	        	XDATA(IBASE)=J + idatoff
-	        	YDATA(IBASE)=TWH(J+idatoff,IPTWH) 
-		endif
-   19	        CONTINUE
-c
-	   endif
-  18	   CONTINUE
-      endif
-c
-  99  CONTINUE
-c
-      if (ibase .eq. 0) ierr = 268
-c
-      RETURN
-      END
diff -uNr 3.5/source/conline/condar/header.F unipops-3.6/source/conline/condar/header.F
--- 3.5/source/conline/condar/header.F	2000-03-16 11:36:58.000000000 -0700
+++ unipops-3.6/source/conline/condar/header.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,586 +0,0 @@
-      subroutine header
-C-------------------------------------------------------------------------------
-C  @(#)header.F	5.3 09/10/98
-C-------------------------------------------------------------------------------
-c 
-c     Prints either GB or 12M header
-c
-c************************************
-      INTEGER*4 ISTC(2), IOBSOPR(2), ivdef(2), bsp
-      INTEGER*2 STR1(4), STR2(4), STR5(4), STR6(4), STR7(4), STR8(4),
-     .		RSTRNG2(6), DSTRNG3(6), estrng(6), lstrng(6), ipuf(40),
-     .		imon, iday, iyear, ier, imonth, rrstr(6), rdstr(6)
-      integer*2 m2, n0, n1, n2, n3, n80, n283
-      integer*4 iptwh, i, j, icdtype 
-      real*8  T03, ctype(8), t12m, nrao140, nrao300, vdef, SOURCE(2), 
-     .	      OBSNAME(2), STC, OBSOPR, UDATE, digit, dfform(3), 
-     .	      dcoordcode
-      real*4 lst, ut, ra, dec, az, el, sx, sy, rx, ry
-      character*80 cpuf
-      character*24 cfform
-      character*12 crstrng2, cdstrng3 , crrstr, crdstr
-      character*8 coordcode
-      character*4 estr, estr2, xhdr, yhdr
-c
-#ifdef CONTINUUM
-      real*4 atm, pbma, pbaof, pbme, pbeof, eff, mbma, mbaof, mbme,
-     .	     mbeof, azo, azof, elo, elof, time, tsys, noiset 
-      integer*2 isamps, im, is, imm, iss, ieff, nch, gstrng(6)
-      real*8 bw
-#else
-      integer*2 STR3(4), STR4(4), lastblnk
-      integer*4 ns, iosb(2)
-      real*4 rxoff, ryoff, sxoff, syoff, gb, gl, tintg, cosd, 
-     .	     rrao, rdco, pbm(2), mbm(2), rao, dco, effint
-      real*8 l0, l1, l2, if0, dinfinity, dosb
-      character*5 vstr
-      logical okreal8
-      equivalence(iosb, dosb)
-#endif
-c
-      include 'cform.inc'
-      include 'appl.inc'
-      include 'core.inc'
-c
-      equivalence (ivdef,vdef), (cfform,dfform), (dcoordcode, coordcode)
-      equivalence (cpuf, ipuf), (stc,istc), (obsopr,iobsopr)
-      equivalence (rstrng2, crstrng2), (dstrng3, cdstrng3)
-      equivalence (rrstr, crrstr), (rdstr, crdstr)
-c
-      DATA BSP/'BSP '/
-      data nrao140/'NRAO 43M'/,nrao300/'NRAO 93M'/,t12m/'NRAO 12M'/
-      data T03 /0.001d0/, digit/'DIGITAL '/
-c
-      data ctype/'1950RADC','EPOCRADC','MEANRADC','APPRADC','APPHADC',
-     2		 'USERDEF','2000RADC','INDRADC'/
-c
-      data m2, n0, n1, n2, n3, n80, n283
-     .     /-2, 0, 1, 2, 3, 80, 283/
-c
-      iptwh = 1
-c
-      if(dtwh(c1tel,iptwh).eq.nrao140 .or. 
-     .		dtwh(c1tel,iptwh).eq.nrao300) goto 20
-      if(dtwh(c1tel,iptwh).ne.t12m) call oerror(n283, m2, 'HEADER')
-c
-      DO 11 I = 1,2
-         SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
-         OBSNAME(I)=DTWH(C1ONA+I-1,IPTWH)
-   11    CONTINUE
-      stc = dtwh(c1stc, iptwh)
-      obsopr = dtwh(c1obs,iptwh)
-c
-      WRITE(CPUF,1000,IOSTAT=IER)
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,1001,IOSTAT=IER) dtwh(c1sno,iptwh),DTWH(C1TEL,IPTWH),
-     .                     SOURCE,IOBSOPR(1)
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,1000,IOSTAT=IER)
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,1002,IOSTAT=IER)
-      CALL PWRITE(IPUF,n80)
-c
-      UDATE=DTWH(C3DAT,IPTWH)
-      CALL UDAT(UDATE,IMON,IDAY,IYEAR)
-      LST  = DTWH (C3LST,IPTWH)
-      CALL RNS (LST,n0,LSTRNG)
-      UT   = DTWH (C3UT,IPTWH)
-      CALL RNS (UT,n0,ESTRNG)
-c
-      WRITE(CPUF,1003,IOSTAT=IER) IYEAR,IMON,IDAY,LSTRNG,ESTRNG,
-     .                     ISTC(2),IOBSOPR(2)
-      CALL PWRITE(IPUF,n80)
-c
-      dcoordcode = dtwh(c4csc,iptwh)
-      estr = coordcode(1:4)
-      if (coordcode(1:3) .eq. "GAL") estr = 'GAL '
-      if (coordcode(1:3) .eq. "APP") estr = 'APP '
-      if (coordcode(1:3) .eq. "IND") estr = 'IND '
-      estr2 = estr
-      sx = dtwh(c4sx, iptwh)
-      sy = dtwh(c4sy, iptwh)
-      rx = dtwh(c4rx, iptwh)
-      ry = dtwh(c4ry, iptwh)
-      do 100 icdtype = 1, 8
-         if (dcoordcode .eq. ctype(icdtype)) goto 110
- 100  continue
- 110  if (coordcode .eq. 'USERDEF ' .or. icdtype .gt. 8 .and.
-     .    coordcode .ne. 'GALACTIC') then
-         if (coordcode .eq. 'AZEL    ') then
-c			AZEL gets displayed elswhere, be creative
-            sx = dtwh(c4era, iptwh)
-            sy = dtwh(c4edc, iptwh)
-            xhdr = ' RA '
-            yhdr = ' DEC'
-            estr = 'EPOC'
-            if (sx .lt. 0) sx = sx + 360.0
-            if (sx .ge. 360) sx = sx - 360.0
-            call rns(sx, n2, rstrng2)
-            call rns(sy, n1, dstrng3)
-         else
-            xhdr = '  X '
-            yhdr = '  Y '
-            write(crstrng2,1100) sx
-            write(cdstrng3,1105) sy
-         endif
-         write(crrstr,1100) rx
-         write(crdstr,1105) ry
-      else
-         xhdr = ' RA '
-         yhdr = ' DEC'
-         if (coordcode .eq. 'GALACTIC') then
-#ifdef CONTINUUM
-            xhdr = 'GLON'
-            yhdr = 'GLAT'
-            estr = '    '
-            if (sx .lt. 0) sx = sx + 360.0
-            if (sx .ge. 360) sx = sx - 360.0
-            call rns(sx, n3, rstrng2)
-#else
-c			galactic is displayed later, be creative
-            sx = dtwh(c4era, iptwh)
-            sy = dtwh(c4edc, iptwh)
-            estr = 'EPOC'
-            if (sx .lt. 0) sx = sx + 360.0
-            if (sx .ge. 360) sx = sx - 360.0
-            call rns(sx, n2, rstrng2)
-            write(crrstr,1100) rx
-            write(crdstr,1105) ry
-#endif
-         else
-            if (coordcode .eq. 'APPHADC ') xhdr = ' HA '
-            if (sx .lt. 0) sx = sx + 360.0
-            if (sx .ge. 360) sx = sx - 360.0
-            call rns(sx, n2, rstrng2)
-            if (rx .lt. 0) rx = rx + 360.0
-            if (rx .ge. 360) rx = rx - 360.0
-            call rns(rx, n2, rrstr)
-            call rns(ry, n1, rdstr)
-         endif
-         call rns(sy, n1, dstrng3)
-      endif
-c
-#ifdef CONTINUUM
-      AZ=DTWH(C4AZ,IPTWH)
-      CALL RNS(AZ,n3,GSTRNG)
-      EL=DTWH(C4EL,IPTWH)
-      CALL RNS(EL,n1,ESTRNG)
-c
-      WRITE(CPUF,1005,IOSTAT=IER) xhdr, estr, yhdr
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,2000,IOSTAT=IER) RSTRNG2,(DSTRNG3(i),i=1,5),
-     .				(GSTRNG(i),i=1,5),(ESTRNG(I),I=1,5)
-      CALL PWRITE (IPUF,n80)
-c
-      WRITE(CPUF,2001,IOSTAT=IER)
-      CALL PWRITE(IPUF,n80)
-c
-      ATM=1./SIN(EL/57.29578)
-      ISAMPS = DTWH(C12NI,IPTWH)
-      TIME=DTWH(C3SRT,IPTWH)*isamps
-      IM=TIME/60.
-      IS=TIME-FLOAT(IM)*60.
-      IMM=DTWH(C9OT,IPTWH)/60.
-      ISS=DTWH(C9OT,IPTWH)-FLOAT(IMM)*60.
-c
-      WRITE(CPUF,2002,IOSTAT=IER) DTWH(C12SST,IPTWH),DTWH(C12CT,IPTWH),
-     . 		 DTWH(C12WO,IPTWH),ATM,DTWH(C5AT,IPTWH),ISAMPS,
-     .		 DTWH(C3SRT,IPTWH), IM,IS,IMM,ISS
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,2003,IOSTAT=IER)
-      CALL PWRITE(IPUF,n80)
-c
-      PBMA=DTWH(C9PBM,IPTWH)
-      PBAOF=PBMA+SIGN(0.49,PBMA)
-      CALL RN1(PBAOF,STR5)
-      PBME=DTWH(C9PBM+1,IPTWH)
-      PBEOF=PBME+SIGN(0.49,PBME)
-      CALL RN1(PBEOF,STR6)
-      IM=DTWH(C7FW,IPTWH)/60.
-      IS=DTWH(C7FW,IPTWH)-FLOAT(IM)*60.
-      EFF=DTWH(C8AAE,IPTWH)*100.
-      IEFF=IFIX(EFF+0.5)
-c
-      WRITE(CPUF,2004,IOSTAT=IER) STR5,STR6,im,is, ieff, 
-     .		nint(DTWH(C12FR,IPTWH)), nint(DTWH(C12RF,IPTWH)), 
-     .		DTWH(C2FR,IPTWH)
-      CALL PWRITE(IPUF,n80)
-c
-      MBMA=DTWH(C9MBM,IPTWH)
-      MBAOF=MBMA+SIGN(0.49,MBMA)
-      CALL RN1(MBAOF,STR7)
-      MBME=DTWH(c9mbm+1,IPTWH)
-      MBEOF=MBME+SIGN(0.49,MBME)
-      CALL RN1(MBEOF,STR8)
-c
-      WRITE(CPUF,2005,IOSTAT=IER) STR7,STR8
-      CALL PWRITE(IPUF,n80)
-c
-      AZO = DTWH(C2UXP,IPTWH)
-      AZOF=AZO + SIGN(0.49,AZO)
-      CALL RN1(AZOF,STR1)
-      ELO = DTWH(C2UYP,IPTWH)
-      ELOF=ELO + SIGN(0.49,ELO)
-      CALL RN1(ELOF,STR2)
-c
-      WRITE (CPUF,2006,IOSTAT=IER) STR1,STR2
-      CALL PWRITE (IPUF,n80)
-#else
-      SXOFF= DTWH (C2UXP,IPTWH)
-      CALL RN1 (SXOFF,STR1)
-      SYOFF= DTWH (C2UYP,IPTWH)
-      CALL RN1 (SYOFF,STR2)
-      RXOFF= DTWH (C9RAO,IPTWH)
-      CALL RN1 (RXOFF,STR3)
-      RYOFF= DTWH (C9REO,IPTWH)
-      CALL RN1 (RYOFF,STR4)
-      PBM(1)=DTWH(C9PBM,IPTWH)
-      CALL RN1 (PBM(1),STR5)
-      PBM(2)=DTWH(C9PBM+1,IPTWH)
-      CALL RN1 (PBM(2),STR6)
-      MBM(1)=DTWH(C9MBM,IPTWH)
-      CALL RN1 (MBM(1),STR7)
-      MBM(2)=DTWH(C9MBM+1,IPTWH)
-      CALL RN1 (MBM(2),STR8)
-c
-      WRITE(CPUF,1004,IOSTAT=IER) xhdr, yhdr
-      CALL PWRITE(IPUF,n80)
-c
-      IF (ISTC(2) .EQ. BSP) THEN
-            WRITE (CPUF,3000,IOSTAT=IER)
-            CALL PWRITE (IPUF,n80)
-            WRITE (CPUF,3001,IOSTAT=IER) estr, RSTRNG2,
-     .                   (DSTRNG3(i),i=1,5), STR1,STR5,STR7
-            CALL PWRITE (IPUF,n80)
-            WRITE (CPUF,3002,IOSTAT=IER) estr2, RRSTR,
-     .                   (RDSTR(i),i=1,5), STR2,STR6,STR8
-      ELSE
-            WRITE (CPUF,3003,IOSTAT=IER)
-            CALL PWRITE (IPUF,n80)
-            WRITE (CPUF,3001,IOSTAT=IER) estr, RSTRNG2,
-     .                   (DSTRNG3(i),i=1,5), STR1,STR5,STR3
-            CALL PWRITE (IPUF,n80)
-            WRITE (CPUF,3002,IOSTAT=IER) estr2, RRSTR,
-     .                   (RDSTR(i),i=1,5), STR2,STR6,STR4
-      ENDIF
-      CALL PWRITE (IPUF,n80)
-c
-      COSD=COS(dtwh(c4edc,iptwh)/57.296778)
-      GL=DTWH(C4GL,IPTWH)
-      GB=DTWH(C4GB,IPTWH)
-      RAO=(DTWH(C4SX,IPTWH)-DTWH(C4ERA,IPTWH))*COSD*3600.0
-      CALL RN1 (RAO,STR1)
-      RRAO=DTWH(C9SRO+2,IPTWH)
-      CALL RN1 (RRAO,STR3)
-c
-      WRITE (CPUF,3004,IOSTAT=IER) GL,GB,STR1,STR3
-      CALL PWRITE (IPUF,n80)
-c
-      AZ=DTWH(C4AZ,IPTWH)
-      EL=DTWH(C4EL,IPTWH)
-      DCO=(DTWH(C4SY,IPTWH)-DTWH(C4EDC,IPTWH))*3600.0
-      CALL RN1 (DCO,STR2)
-      RDCO=DTWH(C9SRO+3,IPTWH)
-      CALL RN1 (RDCO,STR4)
-c
-      WRITE (CPUF,3005,IOSTAT=IER) AZ,EL,STR2,STR4
-      CALL PWRITE (IPUF,n80)
-c
-      WRITE(CPUF,3006,IOSTAT=IER)
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,3007,IOSTAT=IER) DTWH(C12SST,IPTWH),DTWH(C12CT,IPTWH),
-     .                 abs(DTWH(C12FR,IPTWH)*1000.0),DTWH(C12RF,IPTWH), 
-     .		       dtwh(c12cf,iptwh),DTWH(C9LOI,IPTWH),
-     .                 DTWH(C9SB,IPTWH)
-      CALL PWRITE(IPUF,n80)
-c
-      WRITE(CPUF,3008,IOSTAT=IER) DTWH(C9SYN,IPTWH)*T03,
-     .                            DTWH(C9FIF,IPTWH)
-      CALL PWRITE(IPUF,n80)
-c
-      vdef = dtwh(c7vrd, iptwh)
-      write(vstr,3011) ivdef(2)
-      if (vstr(2:2) .eq. ' ') then
-         do 120 i = 2, 4
-            vstr(i:i) = vstr(i+1:i+1)
- 120     continue
-         vstr(5:5) = ' '
-      endif
-      j = lastblnk(vstr)
-      do 130 i = 5, (6-j), -1
-         vstr(i:i) = vstr(i-5+j:i-5+j)
- 130  continue
-      do 140 i = (5-j),1,-1
-         vstr(i:i) = ' '
- 140  continue
-      WRITE(CPUF,3009,IOSTAT=IER) vstr
-      CALL PWRITE(IPUF,n80)
-c
-      ns = dtwh(c12it,iptwh)/dtwh(c3srt,iptwh)
-      dosb = dtwh(c10pv, iptwh)
-      WRITE(CPUF,3010,IOSTAT=IER) DTWH(C12IT,IPTWH)/60.,
-     .	  ns, DTWH(C3SRT,IPTWH),
-     .    DTWH(C12X0,IPTWH), DTWH(C7VC,IPTWH),DTWH(C12DX,IPTWH),
-     .    DTWH(C9OT,IPTWH),DTWH(C2FR,IPTWH), iosb(1)
-      CALL PWRITE(IPUF,n80)
-#endif
-c
-      GO TO 99
-c
- 1000 FORMAT(1X,68('-'))
- 1001 FORMAT(1X,' SCAN',f8.2, 10X,A8,10X, 2A8, 10X, A4)
- 1002 FORMAT(1X,'YYYY-MM-DD',12X,'LST',13X,'UTC',12X,'MODE',3X,' OPR')
- 1003 FORMAT (1X,I4,'-',I2.2,'-',I2,7X,6A2,4X,6A2,8X,A4,4X,A4)
- 1004 FORMAT(14X,a4,7X,a4,20X,'OFFSETS')
- 1005 FORMAT(15X,a4,3x,a4,2x,a4,13X,'AZ',11x,'EL')
-c
- 1100 format(3x,f9.4)
- 1105 format(1x,f9.4,2x)
-c
- 2000 FORMAT (2X,'COMMANDED',6A2,1X,5A2,6X,5A2,3X,5A2)
- 2001 FORMAT (3X,'TS',5X,'TC',4X,'ATTN',3X,'ATM',2X,2X,'T(AMB)',
-     .        2X,'SAMPLES',4X,'SEC',4X,'TIME',3X,'TOL')
- 2002 FORMAT (1X,F6.0,F7.1,F7.3,F6.2,1X,F8.2,I8,F10.1,2X,I2,':',I2,
-     .        1X,I2,':',I2)
- 2003 FORMAT (11X,'AZ',6X,'EL',6X,'HP',5X,'%EFF',4X,'NT',
-     .        5X,'DSF',4X,'F0')
- 2004 FORMAT (1X,'+BEAM:',4A2,4A2,I4,':',I2,I8,2I7,F7.1)
- 2005 FORMAT (1X,'-BEAM:',4A2,4A2)
- 2006 FORMAT (1X,'POINT:',4A2,4A2)
-c
- 3000 FORMAT (41X,'POINTING',3X,'+BEAM',4X,'-BEAM')
- 3001 FORMAT(1X,a4,4X,6A2,1X,5A2,4X,'AZ:',4A2,2X,4A2,2X,4A2)
- 3002 FORMAT (1X,a4,' REF',6A2,1X,5A2,4X,'EL:',4A2,2X,4A2,2X,4A2)
- 3003 FORMAT (41X,'POINTING',3X,'+BEAM',5X,'REF')
- 3004 FORMAT (1X,'GALACTIC',4X,F8.4,3X,F8.4,4X,'RA:',4A2,12X,4A2)
- 3005 FORMAT (1X,'AZ/EL',7X,F8.4,3X,F8.4,3X,'DEC:',4A2,12X,4A2)
- 3006 FORMAT(2X,'TSYS',4X,'TC',4X,'RCVRS',3X,'BW/CHAN',3X,'REST FREQ',
-     .       3X,'DOP FREQ',4X,'IFS',4X,'SB')
- 3007 FORMAT(1X,F6.0,F7.1,4X,'1',5X,F7.1,2X,F10.3,2X,F10.3,
-     .       3X,F5.0,F4.0)
- 3008 FORMAT(33X,F10.8,15X,F5.0)
- 3009 FORMAT(2X,'TIME',3X,'NS',4X,'SEC',7X,'VEL',4X,a5,'/VR',3X,
-     .       'VEL/CHAN',3X,'TOL',5X,'F0')
- 3010 FORMAT(1X,F5.1,I5,F9.1,F11.2,F9.3,F10.3,F7.0,F7.1,x,a4)
- 3011 format('V',a4)
-c
-c
-c---------------------------------------------------------------------------
-c					GB line header
-c---------------------------------------------------------------------------
-20    continue
-c
-      write(unit=cpuf,fmt=253,iostat=ier)
-  253 format (72('-'))
-      call pwrite(ipuf,n80)
-c
-      write (unit=cpuf,fmt=252,iostat=ier) dtwh(c1sno,iptwh), 
-     .              (dTWH(J,IPTWH),J=c1ona,c1ona+1),
-     .              dtwh(c1obs,iptwh),
-     .              (dTWH(J,IPTWH),J=c1sna,c1sna+1), dtwh(c1pid,iptwh)
-  252 format ('Scan:',f8.2,4x,2a8,2x,a8,2x,2a8,3x,a8)
-      call pwrite(ipuf,n80)
-c
-      LST  =  dTWH (c3lst,IPTWH)
-      CALL RNS (LST,n0,LSTRNG)
-      UT  =  dTWH (c3ut,IPTWH)
-      CALL RNS (ut,n0,ESTRNG)
-      udate = dtwh(c3dat,iptwh)
-      call udat(udate,imonth,iday,iyear)
-c
-#ifdef CONTINUUM
-      write (unit=cpuf,fmt=254,iostat=ier) iyear, imonth, iday,
-     .				(estrng(i),i=2,6),
-     .			        (lstrng(i),i=2,6)
-  254 format (13x,'    Date:',i4,'-',i2.2,'-',i2.2,'    UT:',
-     .	      5a2,'    LST:',5a2)
-#else
-      write (unit=cpuf,fmt=254,iostat=ier) dtwh(c7osn,iptwh),
-     .				 iyear, imonth, iday,
-     .				(estrng(i),i=2,6),
-     .			        (lstrng(i),i=2,6)
-  254 format (' Off:',f8.2,'    Date:',i4,'-',i2.2,'-',i2.2,'    UT:',
-     .        5a2,'    LST:',5a2)
-#endif
-      call pwrite(ipuf,n80)
-c
-c
-#ifdef CONTINUUM
-      write (unit=cpuf,fmt=255,iostat=ier) dtwh(c1stc,iptwh),  
-     .          dTWH(c2ori,IPTWH), dTWH (c2fr,IPTWH)
-  255 format ('Type:',a8,'    Rotation:',f6.1,'    Focus:',f6.1)
-#else
-      if (dtwh(c12eit,iptwh) .eq. dinfinity) then
-	effint  =  dTWH (c12it,IPTWH) / (60.*60.)
-      else
-	effint  =  dTWH (c12eit,IPTWH) / (60.*60.)
-      endif
-      CALL RNS (effint,n0,LSTRNG)
-      write (unit=cpuf,fmt=255,iostat=ier) dtwh(c1stc,iptwh),  
-     .          dTWH(c2ori,IPTWH), dTWH (c2fr,IPTWH), (lstrng(i),i=2,5)
-  255 format ('Type:',a8,'   Rotation:',f6.1,'   Focus:',f6.1, 5x,
-     .		'Eff. Int: ',4a2)
-#endif
-      call pwrite(ipuf,n80)
-c
-#ifdef CONTINUUM
-#else
-      if(okreal8(dtwh(c1recid,iptwh)) .and.
-     .   okreal8(dtwh(c3phsid,iptwh)) .and. 
-     .   (nint(dtwh(c1recid,iptwh)).ne.0 .or. 
-     .    nint(dtwh(c3phsid,iptwh)).ne.0) ) then
-	write(cpuf,609) nint(dtwh(c1recid,iptwh)), 
-     .			nint(dtwh(c3phsid,iptwh))
-609	format(' Rec:', i5, '      Phase:', i5)
-        call pwrite(ipuf,n80)
-       endif 
-#endif
-      write(unit=cpuf,fmt=271,iostat=ier)
-  271 format(' ')
-      call pwrite(ipuf,n80)
-C
-      RA   =  dTWH (c4ix,IPTWH)
-      CALL RNS ( RA,n2,RSTRNG2)
-      DEC  =  dTWH (c4iy,IPTWH)
-      CALL RNS (DEC,n1,DSTRNG3)
-      write (unit=cpuf,fmt=2545,iostat=ier) rstrng2,
-     .			 (dstrng3(i),i=1,5),
-     .			 dtwh(c4gl,iptwh), dtwh(c4gb,iptwh)
- 2545 format ('Ind Pos:  ',11a2,'     Galactic: ',f7.3,f8.3)
-      call pwrite(ipuf,n80)
-c
-      dcoordcode = dtwh(c4csc,iptwh)
-      if (coordcode .eq. 'GALACTIC' .or. coordcode .eq. 'AZEL    ') then
-	coordcode = 'EPOCRADC'
-	RA = dtwh(c4era,iptwh)
-	DEC = dtwh(c4edc,iptwh)
-      else
-	RA = dTWH(c4sx,IPTWH)
-        DEC = dTWH(c4sy,IPTWH)
-      endif
-c     Don't repeat a coordinate that will already be on the output
-c
-      do 233 icdtype = 1, 8
-	if (dcoordcode .eq. ctype(icdtype)) then
-            CALL RNS ( RA,n2,RSTRNG2)
-            CALL RNS (DEC,n1,DSTRNG3)
-            write (unit=cpuf,fmt=2547,iostat=ier) coordcode,
-     .			 rstrng2,(dstrng3(i),i=1,5),
-     .			 dtwh(c4az,iptwh), dtwh(c4el,iptwh)
- 2547       format (a8,': ',11a2,'     Az/El:    ',f7.3,f8.3)
-	    goto 235
-	endif
-233	continue
-      write (unit=cpuf,fmt=2548,iostat=ier) dtwh(c4csc,iptwh),
-     .			 ra, dec, dtwh(c4az,iptwh), dtwh(c4el,iptwh)
- 2548       format (a8,': ',2x,f7.3,f8.3,5x,'     Az/El: ',f7.3,f8.3)
-235   call pwrite(ipuf,n80)
-c
-      write(unit=cpuf,fmt=271,iostat=ier)
-      call pwrite(ipuf,n80)
-C
-#ifdef CONTINUUM
-      write(unit=cpuf,fmt=257)
-  257 format('Chan  Intg       Rates("/sec)  #Pts   BW    TSYS',
-     .       '  N.Tube  (Counts/K)')
-      call pwrite(ipuf,n80)
-c
-      if (dtwh(c1bke,iptwh) .eq. digit) then
-	TSYS   = dTWH(c12sst,IPTWH)
-        bw  = dTWH(c12bw,IPTWH)
-      else
-	tsys = 0.0
-	bw = 0.0
-      endif
-      NOISET = dTWH(c12ct, IPTWH)
-      nch = nint(100.*dmod(dtwh(c1sno,iptwh),1.d0))
-c
-      WRITE (unit=cpuf,fmt=256)  nch, dtwh(c12it,iptwh), 
-     .		dtwh(c6dx,iptwh),dtwh(c6dy,iptwh), nint(dtwh(c12ni,iptwh)),
-     .          nint(bw), tsys, noiset, dtwh(c12fr,iptwh)
-  256 FORMAT (I4,1x,F5.2,2(1x,F9.3),2(1x,i4),2F8.2,1pg14.5)
-      call pwrite(ipuf,n80)
-c
-#else
-      VDEF = dTWH (c7vrd,IPTWH)
-      write (unit=cpuf,fmt=261,iostat=ier)  ivdef
-  261 FORMAT ('   Cntr Freq   Rest Freq  Band Width CV(',a4,')',
-     .       '      Delta V   Vsys(',a4,')')
-      call pwrite(ipuf,n80)
-c
-      WRITE (unit=cpuf,fmt=270, iostat=ier)  DTWH(c12CF,IPTWH), 
-     .		DTWH(c12rf,IPTWH), dTWH(c12bw,IPTWH),
-     $          dTWH(c12x0,IPTWH), dTWH(c12dx,IPTWH), dTWH(c7vc,IPTWH)
-  270 FORMAT (2f12.5,2x,f10.3,1p3g13.4)
-      call pwrite(ipuf,n80)
-c
-      write(unit=cpuf,fmt=271,iostat=ier)
-      call pwrite(ipuf,n80)
-c
-      dfform(1) = dtwh(c9cff,iptwh)
-      dfform(2) = dtwh(c9cff+1,iptwh)
-      dfform(3) = dtwh(c9cff+2,iptwh)
-      if (cfform(15:15) .eq. 'L') cfform = '        ' // cfform(1:16)
-c
-      TINTG   = dTWH(c12it,IPTWH) / (60.*60.)
-      call rns(tintg, n0, lstrng)
-c
-      write(unit=cpuf,fmt=272,iostat=ier) cfform(7:24), 
-     .			abs(dtwh(c12fr,iptwh)),(lstrng(i),i=2,5)
-272   format('CF Formula:', a18,' Delta F:',1pg13.4,
-     .       '  Int.: ',4a2)
-      call pwrite(ipuf,n80)
-c
-      write(unit=cpuf,fmt=271,iostat=ier)
-      call pwrite(ipuf,n80)
-c
-      write (unit=cpuf,fmt=281,iostat=ier) cfform(15:15),cfform(15:15),
-     .					   cfform(15:15),cfform(24:24)
-  281 FORMAT ('    L',a1,'F0       L',a1,'F1       L',a1,
-     .	      'F2        L',a1,'       Tsig   Tref   N.Tube')
-      call pwrite(ipuf,n80)
-c
-      if (cfform(15:15) .eq. '1') then
-	l0 = dtwh(c9l1,iptwh)
-	l1 = dtwh(c9l1f1,iptwh)
-	l2 = dtwh(c9l1f2,iptwh)
-      else
-	l0 = dtwh(c9l2,iptwh)
-	l1 = dtwh(c9l2f1,iptwh)
-	l2 = dtwh(c9l2f2,iptwh)
-      endif
-      if (cfform(24:24) .eq. 'A') then
-	if0 = dtwh(c9la,iptwh)
-      else if (cfform(24:24) .eq. 'B') then
-	if0 = dtwh(c9lb,iptwh)
-      else if (cfform(24:24) .eq. 'C') then
-	if0 = dtwh(c9lc,iptwh)
-      else 
-	if0 = dtwh(c9ld,iptwh)
-      endif
-c
-      write(unit=cpuf,fmt=2335,iostat=ier) l0, l1, l2, if0,
-     .			 dTWH(c12sst,IPTWH), dTWH(c12rst,IPTWH), 
-     .			 dTWH(c12ct, IPTWH)
- 2335 FORMAT (4f11.6,3F7.2,' K')
-      call pwrite(ipuf,n80)
-#endif
-C
-      write(unit=cpuf,fmt=253,iostat=ier)
-      call pwrite(ipuf,n80)
-c
-      GO TO 99
-c------------------------------------------------------------------
-99    continue
-      return
-c
-c
-      end
-c
- 
diff -uNr 3.5/source/conline/condar/hlftne.f unipops-3.6/source/conline/condar/hlftne.f
--- 3.5/source/conline/condar/hlftne.f	2000-03-16 11:37:01.000000000 -0700
+++ unipops-3.6/source/conline/condar/hlftne.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,103 +0,0 @@
-      subroutine hlftne (z, isize, jsize, vals, hlevel, nvals, undefwp)
-c
-c     @(#)hlftne.f	5.1 06/22/94
-c
-c     Produces a half-tone grayscale image of the array z.
-c
-c     z (isize, jsize) = (R*4) Array to be gray-scaled.
-c     isize = (I*4) First dimension limit of z.
-c     jsize = (I*4) Second dimension limit of z.
-c     vals (nvals) = (R*4) Array containing the z-values at which a break
-c     			   in the gray-scale should occur.
-c     hlevel (nvals) = (R*4) Density of gray-scale levels. (Values must 
-c			     lie between 0. = empty and 1. = full)
-c     nvals = (I*4) Number of gray-scale levels.  
-c
-c
-c     Notes: Vals must be in ascending order.  Ignores any point with an
-c    	     undefined value (see UNDEF).  
-c
-c     If z(i,j) <= vals(1), where i = imin, imax and j =jmin, jmax (set in
-c     COMMON / MAPPL / ), then the area on the page occupied by z(i,j) is
-c     hlevel(1) filled .  If vals(i) < z(i,j) <= vals(i+1), then the area is 
-c     filled by the fraction specified by hlevel(i+1).  If z(i,j) >= vals(nval-1), 
-c     then the fraction filled is hlevel(nval).  The value of vals(nval) is not
-c     used for anything and is ignored.
-c
-      integer*4 isize, jsize
-      integer*2 nvals
-      real*4 z(isize, jsize), vals(nvals), hlevel(nvals), undefwp
-c
-      include 'mappl.inc'
-      include 'appl.inc'
-c
-      integer*2 nx, ny, ival, k, ixl, iyb, ixr, iyt, curcur
-      integer*2 m2, m3, n1, n120, n259, n260
-      integer*4 i, j
-      real xl0, yb0, xlmin, xlmax, ybmin, ybmax 
-c
-      data m2, m3, n1, n120, n259, n260
-     .     /-2, -3, 1, 120, 259, 260/
-c       
-      if (nvals .le. 0) 
-     .		call oerror(n259,m2, 'HLFTNE: All LEVS < -999999')
-      if (isize .lt. 0 .or. jsize .lt. 0) 
-     .		call oerror(n120, m3, 'HLFTNE: bad array dimensions')
-c
-      do 20 k = 1, nvals-1
-	if(vals(k) .ge. vals(k+1) ) 
-     .		call oerror(n259, m2, 'HLFTNE: Not in ascending order')
-20	continue
-c
-      do 30 k = 1, nvals
-	if(hlevel(k) .lt. 0. .or. hlevel(k) .gt. 1.) 
-     .		call oerror(n120, m3, 'HLFTNE:  Bad hlevel')
-30	continue
-c     Check input parameters
-c
-      nx = nint(ax(curcur()))
-      ny = nint(ay(curcur()))
-c
-      if (nx*ny .gt. 16384) 
-     .		call oerror(n260, m2, 'HLFTHE: Box size too big')
-c     Calculate size of cell; error if too big
-c
-      xlmin = float(imin)*ax(curcur())+bx(curcur())
-      xlmax = float(imax)*ax(curcur())+bx(curcur())
-      ybmin = float(jmin)*ay(curcur())+by(curcur())
-      ybmax = float(jmax)*ay(curcur())+by(curcur())
-c     Find corners of plot
-c
-      do 800 i = imin, imax
-	 do 700 j = jmin, jmax
-c
-	   if (z(i,j) .ne. undefwp) then
-c
-	     do 140 k = 1, nvals-1
-			ival = k
-			if (z(i,j) .lt. vals(k) ) goto 150
-140			continue
-	     ival = nvals
-c	     Find out what level of grayness is to be used for the
-c		current cell.
-c
-150	     xl0 = float(i)*ax(curcur())+bx(curcur())
-	     yb0 = float(j)*ay(curcur())+by(curcur())
-	     ixl = nint ( max(xl0-float(nx)/2.,xlmin))
-	     iyb = nint ( max(yb0-float(ny)/2.,ybmin))
-	     ixr = nint ( min(xl0+float(nx)/2.,xlmax))
-	     iyt = nint ( min(yb0+float(ny)/2.,ybmax))
-	     call dither(ixl, iyb, ixr - ixl + n1, iyt - iyb + n1, hlevel(ival))
-c	     Find pixel at lower left of cell and fill that cell up
-c		with appropriate half-tone pattern
-c
-           endif
-c	 
-700	   continue
-800	 continue
-c
-      return
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/initappl.f unipops-3.6/source/conline/condar/initappl.f
--- 3.5/source/conline/condar/initappl.f	2000-03-16 11:37:01.000000000 -0700
+++ unipops-3.6/source/conline/condar/initappl.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,112 +0,0 @@
-      SUBROUTINE initappl
-C---------------------------------------------------------------------
-C  @(#)initappl.f	5.2 09/10/98
-C
-C	 INITAPPL initializes appl.inc and mappl.inc common areas.
-C
-C---------------------------------------------------------------------
-      INCLUDE 'appl.inc'
-      INCLUDE 'mappl.inc'
-      INCLUDE 'mform.inc'
-C
-C
-      integer*4 inf, iiappl
-      integer*2 i
-      logical*2 first
-      real*4 rinf, rinfinity
-      real*8 dinf, dinfinity
-c
-      equivalence (rinf, inf)
-c
-      data first/.true./
-c
-      rinf = rinfinity()
-      dinf = dinfinity()
-      if (first) then
-	numappl = inf
-	iiappl = 1
-10	if (Rappl(iiappl) .eq. inf) then
-	   numappl = iiappl
-	else
-	   iiappl = iiappl + 1
-	   goto 10
-	endif
-	first = .false.
-      endif
-c     Finds out the number of I*4 words in APPL common block
-c
-      call resetcur
-c
-      XORG0=1
-      YORG0=1
-      IX0=XORG(1) + 140
-      IY0=YORG(1) + 150
-      IXM=XMAX(1) - 40
-      IYM=YMAX(1) - 60
-      XMAX0=1024
-      YMAX0=800
-      NACCUM = 0
-      ibase = 0
-      ires = 0
-      lit = 0
-      isbg = 0
-      LXA=2
-      UXA=3
-      SPLT=1
-      RPLT=0
-      limx = 0
-      limy = 0
-      maxstck = 5120
-      maxregn = 32
-      maxmrk = 12
-      ichnext = 1
-      ichnum = 0
-C
-      do 911 i = 1, maxregn
-	rixt(i) = 0
-	riyt(i) = 0
-	breg(i) = 0 
-911	continue
-      DO 11 I = 1,maxstck
-         astack(I)=0.
-         chshifts(i,1) = 0.
-         chshifts(i,2) = 0.
-   11    CONTINUE
-c
-      sumsq = 0.0
-      sclfctx = 1.0
-      sclfcty = 1.0
-      sclchar = 1.0
-c
-      call resetcolor
-c
-      do 901 i = 1, 10
-	call raz(dtwh(1,i))
-901	continue
-      call raz(daccum)
-c
-      do 902 i = 1, MAX_DATA_POINTS
-	xdata(i) = 0.0
-	ydata(i) = 0.0
-	work(i) = 0.0
-902	continue
-c
-      do 903 i = 1, 101
-	daindex(i) = 0
-903	continue
-c
-      mheadsize = 40
-      cheadsize = 40
-      mdatasize = 409600
-      mnumarrays = 4
-      imin = 0
-      imax = 0
-      jmin = 0
-      jmax = 0
-      do 904 i = 1, mnumarrays
-	call mraz(i)
-904	continue
-      call craz
-c
-      RETURN
-      END
diff -uNr 3.5/source/conline/condar/itfits.F unipops-3.6/source/conline/condar/itfits.F
--- 3.5/source/conline/condar/itfits.F	2000-03-16 11:37:02.000000000 -0700
+++ unipops-3.6/source/conline/condar/itfits.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,133 +0,0 @@
-      logical*2 function itfits(idat)
-c
-c @(#)itfits.F	5.1 06/22/94
-c
-c      function used by select to see if the values of the various
-c      index fields fit the selection criteria stored in core
-c
-      integer*2 idat(1)
-      integer*2 index(32), i4pc, i8pc, i16pc, ii, iobsmode, obs, mode
-      integer*2 is_mode, irtn, lastblnk
-      integer*2 n1, n2, n4, n5, n7, n8, n9, n17, n19, n21, n25, n27
-      integer*4 i1, inrange, inrange8
-      real*4 rindex(16), scanno, feedno, sourcex, sourcey, lst, ut_date
-#ifdef CONTINUUM
-      real*4 rate
-      real*8 inttime, dit_min, dit_max
-#else
-      real*4 bw
-      real*8 rest_freq, df_min, df_max
-#endif
-      real*8 dindex(8), ddefault
-      character*2 pname(2), curprog
-      character*16 cindex(4), sname, upcs_object
-      logical*2 localfit
-c
-      data n1, n2, n4, n5, n7, n8, n9, n17, n19, n21, n25, n27
-     .     /1, 2, 4, 5, 7, 8, 9, 17, 19, 21, 25, 27/
-c
-      include 'core.inc'
-c
-      data pname / 'Cc', 'Ll'/
-c
-      equivalence (index, rindex, dindex, cindex)
-c
-      i4pc(ii) = (ii-n1)/n2 + n1
-      i8pc(ii) = (ii-n1)/n4 + n1
-      i16pc(ii) = (ii-n1)/n8 + n1
-c
-      do 10 i1 = 1, 32
-         index(i1) = idat(i1)
- 10   continue
-c				default is true
-      localfit = .true.
-c				check obs mode, make sure matches program
-      iobsmode = index(29)
-      if (iobsmode .ne. 0 .and. localfit) then
-         obs = iobsmode / 256
-         if (obs .ne. 0 .and. localfit) then
-            call progname(curprog)
-            localfit = localfit .and.
-     .         ((curprog .eq. pname(1) .and. obs .eq. 1) .or.
-     .          (curprog .eq. pname(2) .and. obs .eq. 2)) 
-         end if
-         mode = iobsmode - obs*256
-         call modeid(cs_mode, is_mode, irtn)
-         if (mode .ne. 0 .and. localfit .and. is_mode .ne. 0) 
-     .         localfit = localfit .and. (mode .eq. is_mode)
-      endif
-c				scan and feed number
-c				scan number is just truncated but
-c				feed number needs to be nearest int
-      scanno = int(rindex(i4pc(n17)))
-      feedno = nint((rindex(i4pc(n17)) - scanno) * 100.0)
-c
-      if (localfit) localfit = localfit .and. 
-     .     (inrange(scan_min, scan_max, scanno, default) .eq. 1)
-      if (localfit) localfit = localfit .and. 
-     .     (inrange(feed_min, feed_max, feedno, default) .eq. 1)
-c				sourcex and y position
-      if (localfit) then
-         sourcex = rindex(i4pc(n5))
-         localfit = localfit .and. 
-     .     (inrange(x_min, x_max, sourcex, default) .eq. 1)
-      end if
-      if (localfit) then
-         sourcey = rindex(i4pc(n7))
-         localfit = localfit .and. 
-     .     (inrange(y_min, y_max, sourcey, default) .eq. 1)
-      end if
-c				source name
-      if (localfit .and. lastblnk(cs_object) .ne. 0 .and.
-     .                    s_object(1) .ne. 0.0) then
-         call uppercase(cs_object, upcs_object)
-         call uppercase(cindex(i16pc(n9)), sname)
-         localfit = localfit .and. (sname .eq. upcs_object)
-      end if
-c				lst and ut_date
-      if (localfit) then
-         lst = rindex(i4pc(n25))
-         localfit = localfit .and. 
-     .     (inrange(lst_min, lst_max, lst, default) .eq. 1)
-      end if
-      if (localfit) then
-         ut_date = rindex(i4pc(n27))
-         localfit = localfit .and. 
-     .     (inrange(ut_min, ut_max, ut_date, default) .eq. 1)
-      end if
-c
-#ifdef CONTINUUM
-c				integration time and rate
-      if (localfit) then
-         rate = rindex(i4pc(n19))
-         localfit = localfit .and. 
-     .     (inrange(rate_min, rate_max, rate, default) .eq. 1)
-      endif
-      if (localfit) then
-         inttime = dindex(i8pc(n21))
-         dit_min = it_min
-         dit_max = it_max
-         ddefault = default
-         localfit = localfit .and. 
-     .     (inrange8(dit_min, dit_max, inttime, ddefault) .eq. 1)
-      endif
-#else
-c				bw and rest_freq
-      if (localfit) then
-         bw = rindex(i4pc(n19))
-         localfit = localfit .and. 
-     .      (inrange(bw_min, bw_max, bw, default) .eq. 1)
-      endif
-      if (localfit) then
-         rest_freq = dindex(i8pc(n21))
-         df_min = f_min
-         df_max = f_max
-         ddefault = default
-         localfit = localfit .and. 
-     .      (inrange8(df_min, df_max, rest_freq, ddefault) .eq. 1)
-      endif
-#endif
-c			thats it
-      itfits = localfit
-      return
-      end
diff -uNr 3.5/source/conline/condar/jdtodate.f unipops-3.6/source/conline/condar/jdtodate.f
--- 3.5/source/conline/condar/jdtodate.f	2000-03-16 11:37:02.000000000 -0700
+++ unipops-3.6/source/conline/condar/jdtodate.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,49 +0,0 @@
-      subroutine jdtodate(jd, iyear, imonth, day)
-C-------------------------------------------------------------------------------
-C  @(#)jdtodate.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Converts from JD to Calender date
-c     jd = (R*8) Julian date
-c     iyear, imonth, day = (I*4) , (I*4), (R*8)
-c                    Calculated year, month, and day
-c
-      double precision jd, day, z, f, a, alpha, b, c, d, e
-      integer*4 iyear, imonth
-c 
-      if (jd .lt. 0) then
-	stop
-      endif
-c
-      z = aint(jd + 0.5d0)
-      f = mod(jd + 0.5d0, 1.d0)
-c
-      if (z .lt. 229161.d0) then
-	a = z
-      else
-	alpha = aint ((z - 1867216.25d0) / 36524.25d0)
-	a = z + 1.d0 + alpha - aint(alpha / 4.d0)
-      endif
-c
-      b = a + 1524.d0
-      c = aint((b - 122.1d0)/365.25d0)
-      d = aint(365.25d0*c)
-      e = aint((b - d) / 30.6001d0)
-c
-      day = b - d - aint(30.6001*e) + f
-c
-      if (e .lt. 13.5) then
-	imonth = int(e - 1.d0)
-      else
-	imonth = int(e - 13d0)
-      endif
-c
-      if (imonth .ge. 3) then
-	iyear = int(c - 4716.d0)
-      else
-	iyear = int(c - 4715.d0)
-      endif
-c
-      return
-      end
-
diff -uNr 3.5/source/conline/condar/lchkdate.f unipops-3.6/source/conline/condar/lchkdate.f
--- 3.5/source/conline/condar/lchkdate.f	2000-03-16 11:37:03.000000000 -0700
+++ unipops-3.6/source/conline/condar/lchkdate.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,30 +0,0 @@
-      logical function lchkdate(iyr,imth,iday)
-c
-c     @(#)lchkdate.f	5.1 06/22/94
-c
-c     Returns a TRUE if the date make sense
-c
-c     iyr, imth, ... = (I*4) date
-c
-      integer*4 iyr, imth, iday
-c
-      integer*2 imonth(12)
-c
-      data imonth/31,28,31,30,31,30,31,31,30,31,30,31/
-c
-      lchkdate = .true.
-c
-      if ( (iyr .le. 1582 .and. mod(iyr,4) .eq. 0) .or. (iyr .gt. 1582 
-     1     .and. mod(iyr,100) .ne. 0 .and. mod(iyr,4) .eq. 0) ) then
-           imonth(2) = 29
-      else
-	   imonth(2) = 28
-      endif
-c     Checks for whether it is leap year
-c
-      if (imth .le. 0 .or. imth .gt. 12 .or. iday .le. 0 .or. 
-     1    iday .gt. imonth(imth)) lchkdate = .false.
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/linetype.f unipops-3.6/source/conline/condar/linetype.f
--- 3.5/source/conline/condar/linetype.f	2000-03-16 11:37:03.000000000 -0700
+++ unipops-3.6/source/conline/condar/linetype.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,325 +0,0 @@
-      subroutine linetype(ltype, lindex)
-c
-c     @(#)linetype.f	5.1 06/22/94
-c
-c     Changes the line type specified by LTYPE for lines of index
-c     LINDEX.  
-c
-c     LTYPE is specified as a 3 digit number: ADT
-c		A = Arrow type
-c		D = Dot-Dash type
-c		T = Thickness
-c
-c     If LTYPE = 000, use default line type; up to 9 types of
-c	arrows, dot-dash, thickness lines can be supported.  The
-c	abs. value of LTYPE is used.
-c
-c     LINDEX = 33 for PLOT and SHOW types of graphs while it
-c     is 1-32 for contour plots.
-c
-      integer*2 ltype, lindex
-      integer*2 m2, n10, n112, n262
-      real*4 direc, scl, xold, yold
-      integer*2 ix, iy, index
-      logical lflip
-c
-      logical logtick(33), logdash(33)
-      integer*2 dash0(33,10),tick0(33,10),noangl0(33),notick0(33),
-     .		deltaline(33,10), numline(33), nodash0(33)
-      real delta10(33,10),delta20(33,10), sinangle0(33,10),
-     .	   cosangle0(33,10)
-c
-      integer*2 i, ltype2, itick, idash, x3, y3, x4, y4, x5, y5, 
-     .		xc, yc, xd, yd, iangle, ix0, iy0, ix1, iy1
-      real olddirec, dlength, tlength, theta, cost, sint, dist,
-     .	   rtlft, dt, rad, alength, sinta, costa
-c
-      integer*2 multi, maxmulti, Mdeltaline(5,6), Mnumline(6)
-      integer*2 dashi, maxdashi, Mdash0(6,10), Mnumdash(10)
-      integer*2 ticki, maxticki, Mtick0(2,10), Mnumtick(10),
-     .		Mnoangle(10)
-      real angle(2,10),delta1(2,10),delta2(2,10)
-c
-      save dash0, tick0, sinangle0, delta10, delta20, nodash0, tlength,
-     1	   noangl0, logtick, logdash, notick0, dlength,
-     2     cosangle0, deltaline, numline, xold, yold
-c
-      save ix1, iy1, ix0, iy0, lflip, itick, idash, olddirec,
-     .	   rtlft, dt 
-c
-      data logdash/33*.false./, logtick/33*.false./, lflip /.true./,
-     .     numline/33*1/, deltaline/330*0/, rad /57.29577951/
-c
-      data maxmulti/6/,Mnumline/1,1,2,3,4,5/
-      data Mdeltaline/5*0,
-     .		      5*0,
-     .		      0,1,3*0,
-     .		      0,1,-1,2*0,
-     .		      0,1,-1,2,0,
-     .		      0,1,-1,2,-2/
-c     Specifications for the multiple lines to draw of each type
-c
-      data maxdashi/10/,Mnumdash/1,2,2,2,4,6,2,2,2,4/
-      data Mdash0/6*0,
-     .		 2*60,4*0,
-     .		 2*30,4*0,
-     .		 40,20,4*0,
-     .		 35,5,5,5,2*0,
-     .		 35,5,5,5,5,5,
-     .		 5,5,4*0,
-     .		 5,25,4*0,
-     .		 5,55,4*0,
-     .		 1,21,80,21,2*0/
-c     Specifications for the dot-dashed lines to draw of each type
-c
-      data maxticki/10/,Mnumtick/1,1,1,1,1,1,1,1,2,1/
-      data Mtick0/2*0,
-     .		  60,0,
-     .		  30,0,
-     .		  60,0,
-     .		  30,0,
-     .		  60,0,
-     .		  30,0,
-     .		  60,0,
-     .		  50,10,
-     .		  123,0/
-      data Mnoangle/0,1,1,1,1,2,2,2,2,2/
-      data angle /2*0.,
-     .		  -90.,0.,
-     .		  -90.,0.,
-     .		  90.,0.,
-     .		  90.,0.,
-     .		  -135.,-225.,
-     .		  -135.,-225.,
-     .		  -45.,-315.,
-     .		  -135.,-225.,
-     .		  45.,135./
-      data delta1/2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  2*0.,
-     .		  -6.,-6./
-      data delta2/2*0.,
-     .		  20.,0.,
-     .		  10.,0.,
-     .		  20.,0.,
-     .		  10.,0.,
-     .		  20.,20.,
-     .		  10.,10.,
-     .		  10.,10.,
-     .		  10.,10.,
-     .		  14.1,14.1/
-c
-      data m2, n10, n112, n262 /-2, 10, 112, 262/
-c     Specifications for the tick lines to draw of each type
-c
-      ltype2 = abs(ltype)
-c
-      if (ltype .gt. 999) call oerror(n262, m2, '')
-c
-      multi = mod(ltype2,n10)+1
-      if (multi .gt. maxmulti) 
-     .		call oerror(n112,m2,'Line Thickness specification')
-      numline(lindex) = Mnumline(multi)
-      do 10 i = 1, numline(lindex)
-	deltaline(lindex,i) = Mdeltaline(i,multi)
-10	continue
-c
-      dashi = mod(ltype2,100)/10 + 1
-      if (dashi .gt. maxdashi) 
-     .		call oerror(n262,m2,'Dot-Dash specification')
-      if (dashi .gt. 1) then
-	logdash(lindex) = .true.
-	nodash0(lindex) = Mnumdash(dashi)
-	do 20 i = 1, nodash0(lindex)
-	   dash0(lindex,i) = Mdash0(i,dashi)
-20	   continue
-      else
-	logdash(lindex) = .false.
-      endif
-c
-      ticki = mod(ltype2,1000)/100 + 1
-      if (ticki .gt. maxticki) 
-     .		call oerror(n262,m2,'Tick specification')
-      if (ticki .gt. 1) then
-	logtick(lindex) = .true.
-	notick0(lindex) = Mnumtick(ticki)
-	do 30 i = 1, notick0(lindex)
-	   tick0(lindex,i) = Mtick0(i,ticki)
-30	   continue
-	noangl0(lindex) = Mnoangle(ticki)
-	do 40 i = 1, noangl0(lindex)
-	   cosangle0(lindex,i) = cos (angle(i,ticki) / rad)
-	   sinangle0(lindex,i) = sin (angle(i,ticki) / rad)
-           delta10(lindex,i) = delta1(i,ticki)
-	   delta20(lindex,i) = delta2(i,ticki)
-40	   continue
-      else
-	logtick(lindex) = .false.
-      endif
-c
-      return
-c
-      entry placewp(ix, iy, index)
-c
-c     Places the pen for the next VCTRWP call.
-c
-c     (IX,IY) = coords to move penb to
-c     INDEX = what index line type to use
-c     DIREC = direction to increasing contour level.
-c
-      ix0 = ix
-      iy0 = iy
-c
-      olddirec = 1.e30
-      lflip = .not. lflip
-c
-      dlength = 1.e30
-      tlength = 1.e30
-      if (logdash(index) ) then
-        if (lflip) then 
-      		idash = nodash0(index) 
-	else
-      		idash = 1 
-	endif
-	dlength = dash0(index,idash)
-      endif
-      if (logtick(index) ) then
-        if (lflip) then 
-      		itick = notick0(index) 
-		tlength = tick0(index,itick)-1
-	else
-      		itick = 1 
-		tlength = tick0(index,itick)
-	endif
-      endif
-c
-      call place(ix0,iy0)
-c
-      return
-c
-      entry vctrwp(ix, iy, index, scl, direc)
-c
-c     Actually does the drawing of a vector with a certain line type.
-c
-c     (IX,IY) = coords to move penb to
-c     INDEX = what index line type to use
-c     SCL = scale factor to multiply distances by.
-c
-      ix1 = ix
-      iy1 = iy
-      xold = 1.e34
-      yold = 1.e34
-c
-      alength = sqrt ( float(ix1-ix0)**2 + float(iy1-iy0)**2)
-      if (alength .eq. 0.) then
-	return
-      else
-	theta = atan2 (float(iy1 - iy0), float(ix1 - ix0))
-	cost = float(ix1-ix0) / alength
-	sint = float(iy1-iy0) / alength
-      endif
-c
-1 	dist = min (alength, scl*dlength, scl*tlength) + 0.1
-c
-	if (dist .lt. alength) then
-	   x3 = ix0 + nint(dist*cost)
-	   y3 = iy0 + nint(dist*sint)
-        else
-	   x3 = ix1
-	   y3 = iy1
-        endif
-c
-	if ( (dist .gt. 0. .and. .not. logdash(index)) .or. 
-     .	     (logdash(index) .and. mod(idash,2).ne.0 .and. 
-     2	      dist.gt.0.) )  then
-	    do 60 i = 1, numline(index)
-	      xc = ix0 + nint(float(deltaline(index,i)) * sint)
-	      yc = iy0 - nint(float(deltaline(index,i)) * cost)
-	      xd = x3 + nint(float(deltaline(index,i)) * sint)
-	      yd = y3 - nint(float(deltaline(index,i)) * cost)
-	      if (xc .ne. xold .or. yc .ne. yold) call place (xc, yc)
-	      call vctr(xd, yd)
-	      xold = xd
-	      yold = yd
-60	      continue
-	endif
-c	And thats's dashes
-c
-	if ( logtick(index) .and. dist .ge. scl*tlength) then
-c
-	   if (olddirec .ne. direc) then
-		rtlft = 1.
-		dt = (direc - theta) * rad
-		if ( (dt .gt. 0. .and. dt .le. 180.) .or.
-     1	   	     (dt .lt. -180.) ) rtlft = -1.
-		olddirec = direc
-	   endif
-c
-	   do 50 iangle = 1, noangl0(index)
-		sinta = sinangle0(index,iangle) * cost + 
-     1			   cosangle0(index,iangle) * sint
-		costa = cosangle0(index,iangle) * cost -
-     1			   sinangle0(index,iangle) * sint
-		x4 = x3 - nint(rtlft*scl*delta10(index,iangle)*sint)
-		y4 = y3 + nint(rtlft*scl*delta10(index,iangle)*cost)
-		x5 = x4 + nint(rtlft*scl*delta20(index,iangle)*costa)
-		y5 = y4 + nint(rtlft*scl*delta20(index,iangle)*sinta)
-	        do 45 i = 1, numline(index)
-	          xc = x4 + nint(float(deltaline(index,i)) * sinta)
-	          yc = y4 - nint(float(deltaline(index,i)) * costa)
-	          xd = x5 + nint(float(deltaline(index,i)) * sinta)
-	          yd = y5 - nint(float(deltaline(index,i)) * costa)
-	          if (xc .ne. xold .or. yc .ne. yold) call place (xc, yc)
-	          call vctr(xd, yd)
-		  xold = xd
-		  yold = yd
-45	          continue
-50		continue
-c
-	endif
-c	That takes care of tick marks
-c
-         dlength = dlength - dist/scl
-	 alength = alength - dist
-	 tlength = tlength - dist/scl
-	 ix0 = x3
-	 iy0 = y3
-c
-	 if (logtick(index) .and. tlength.le.0. .and. .not.lflip) then
-		itick = itick + 1
-		if (itick .gt. notick0(index)) itick = 1
-		tlength = tick0(index,itick)
-   	 endif
-c
-	 if (logtick(index) .and. tlength .le. 0. .and. lflip) then
-		itick = itick - 1
-		if (itick .lt. 0) itick = notick0(index)
-		tlength = tick0(index,itick) - 1
-   	 endif
-c
-	 if (logdash(index) .and. dlength.le.0. .and. .not.lflip) then
-		idash = idash + 1
-		if (idash .gt. nodash0(index) ) idash = 1
-		dlength = dash0(index,idash)
-	 endif
-c
-	 if (logdash(index) .and. dlength .le. 0. .and. lflip) then
-		idash = idash - 1
-		if (idash .lt. 0) idash = nodash0(index)
-		dlength = dash0(index,idash)
-	 endif
-c
-	 if (alength .gt. 0.) goto 1
-c
-      olddirec = 1.e30
-      return
-c
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/matinv.f unipops-3.6/source/conline/condar/matinv.f
--- 3.5/source/conline/condar/matinv.f	2000-03-16 11:37:05.000000000 -0700
+++ unipops-3.6/source/conline/condar/matinv.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,88 +0,0 @@
-      SUBROUTINE MATINV(ARRAY,NORDER,DET)
-C-----------------------------------------------------------------------
-C @(#)matinv.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C  THIS SUBROUTINE INVERTS A SYMMETRIC MATRIX AND CALCULATES ITS
-C  DETERMINANT.
-C  DESCRIPTION OF VARIABLES:
-C    ARRAY - INPUT MATRIX WHICH IS REPLACED BY ITS INVERSE.
-C    NORDER - DEGREE OF MATRIX (ORDER OF DETERMINANT)
-C    DET - DETERMINANT OF INPUT MATRIX
-C  COMMENT:
-C    DIMENSION STATEMENT VALID FOR NORDER UP TO 25 (CAN BE RAISED).
-C
-      REAL ARRAY(25,25), IK(25), JK(25), det, amax, save
-      integer k, norder, i, j, l
-c
-   10 DET = 1.
-   11 DO 100 K=1, NORDER
-C
-C  FIND LARGEST ELEMENT ARRAY(I,J) IN REST OF MATRIX
-C
-      AMAX = 0.
-   21 DO 30 I=K, NORDER
-      DO 30 J=K, NORDER
-   23 IF(ABS(AMAX) - ABS(ARRAY(I,J))) 24, 24, 30
-   24 AMAX = ARRAY(I,J)
-      IK(K) = I
-      JK(K) = J
-   30 CONTINUE
-C
-C  INTERCHANGE ROWS AND COLUMNS TO AMAX IN ARRAY(K,K)
-C
-   31 IF(AMAX) 41, 32, 41
-   32 DET = 0.
-      GO TO 140
-   41 I = IK(K)
-      IF(I - K) 21, 51, 43
-   43 DO 50 J=1, NORDER
-      SAVE = ARRAY(K,J)
-      ARRAY(K,J) = ARRAY(I,J)
-   50 ARRAY(I,J) = -SAVE
-   51 J = JK(K)
-      IF(J-K) 21, 61, 53
-   53 DO 60 I=1, NORDER
-      SAVE = ARRAY(I,K)
-      ARRAY(I,K) = ARRAY(I,J)
-   60 ARRAY(I,J) = -SAVE
-C
-C  ACCUMULATE ELEMENTS OF INVERSE MATRIX
-C
-   61 DO 70 I=1, NORDER
-      IF(I-K) 63, 70, 63
-   63 ARRAY(I,K) = -ARRAY(I,K) / AMAX
-   70 CONTINUE
-   71 DO 80 I=1, NORDER
-      DO 80 J=1, NORDER
-      IF(I-K) 74, 80, 74
-   74 IF(J-K) 75, 80, 75
-   75 ARRAY(I,J) = ARRAY(I,J) + ARRAY(I,K)*ARRAY(K,J)
-   80 CONTINUE
-   81 DO 90 J=1, NORDER
-      IF(J-K) 83, 90, 83
-   83 ARRAY(K,J) = ARRAY(K,J) / AMAX
-   90 CONTINUE
-      ARRAY(K,K) = 1. / AMAX
-  100 DET = DET * AMAX
-C
-C  RESTORE ORDERING OF MATRIX:
-C
-  101 DO 130 L=1, NORDER
-      K = NORDER - L + 1
-      J = IK(K)
-      IF(J - K) 111, 111, 105
-  105 DO 110 I=1, NORDER
-      SAVE = ARRAY(I,K)
-      ARRAY(I,K) = -ARRAY(I,J)
-  110 ARRAY(I,J) = SAVE
-  111 I = JK(K)
-      IF(I-K) 130, 130, 113
-  113 DO 120 J=1, NORDER
-      SAVE = ARRAY(K,J)
-      ARRAY(K,J) = -ARRAY(I,J)
-  120 ARRAY(I,J) = SAVE
-  130 CONTINUE
-  140 RETURN
-      END
-
diff -uNr 3.5/source/conline/condar/mean.f unipops-3.6/source/conline/condar/mean.f
--- 3.5/source/conline/condar/mean.f	2000-03-16 11:37:05.000000000 -0700
+++ unipops-3.6/source/conline/condar/mean.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,45 +0,0 @@
-      SUBROUTINE MEAN (ISTART,ISTOP,XDATA,IDBE,TYPSCN,XMEAN,XRMS)
-c--------------------------------------------
-c   @(#)mean.f	5.4 04/07/95
-c
-c     This is designed exclusively for 12-m On/Off continuum data.
-c     It expects the data to be in groups of 4 values: Off, On, On, Off
-c     Each set of 4 from ISTART to ISTOP in XDATA is combined into a
-c     single (On - Off) which is then used to calculate the mean (On-Off)
-c     and the rms around the mean.
-c
-c--------------------------------------------
-c
-      real xdata(*), typscn, xmean, xrms, sumy, sumy2, yvalue, rpt
-      integer*2 istart, istop, idbe
-      integer*4 i
-      logical okreal4
-c
-      RPT=0
-      sumy=0.0
-      sumy2=0.0
-      DO 122 I = ISTART,ISTOP,4
-	 if (okreal4(xdata(i)) .and. okreal4(xdata(i+1)) .and.
-     .       okreal4(xdata(i+2)) .and. okreal4(xdata(i+3))) then
-            yvalue=(-XDATA(I)+XDATA(I+1)+XDATA(I+2)-XDATA(I+3))/2.0
-            sumy = sumy + yvalue
-            sumy2 = sumy2 + yvalue*yvalue
-	    rpt = rpt + 1.0
-	 endif
-  122    CONTINUE
-      xmean = 0.0
-      xrms = 0.0
-      if (rpt .gt. 0) then
-         XMEAN=sumy/rpt
-         if (rpt .gt. 1) then
-            xrms = sqrt( (sumy2-sumy*sumy/rpt)/(rpt*(rpt-1)) )
-         endif
-      endif
-c             I don't understand why the following is necessary - rwg
-      if (idbe .lt. 0 .and. typscn .gt. 0) then
-         xmean = xmean / typscn
-         xrms = xrms / typscn
-      endif
-c
-      RETURN
-      END
diff -uNr 3.5/source/conline/condar/mfill.f unipops-3.6/source/conline/condar/mfill.f
--- 3.5/source/conline/condar/mfill.f	2000-03-16 11:37:06.000000000 -0700
+++ unipops-3.6/source/conline/condar/mfill.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,106 +0,0 @@
-      subroutine mfill (z, z2, isize, jsize, irad, undefwp)
-c
-c     @(#)mfill.f	5.1 06/22/94
-c
-c     To fill in undefined areas of the z-array.  This routine finds 
-c     points in the z-array that are undefined and if there are any
-c     defined points within irad of it in the x and y directions and
-c     in a direction at 45 degrees from these axis.  
-c
-c     z(isize, jsize) = (R*4) Input array.
-c     z2(isize, jsize) = (R*4) Output array.
-c     isize = (I*4) First dimension limit of z
-c     jsize = (I*4) Second dimension limit of z
-c     irad = (I*2) Distance in units of array steps within which to look
-c                  for defined points to average (irad >= 1).
-c     undefwp = (R*4) Undefined data value
-c
-c     Caution:  IMIN, IMAX, JMIN, JMAX must be set in COMMON /MAPPL/
-c		MFILL only works on that part of the array defined by
-c		IMIN, IMAX, JMIN, and JMAX.
-c
-      integer*4 isize, jsize
-      integer*2 irad, m2, n112
-      real z(isize, jsize), z2(isize,jsize), undefwp
-c
-      include 'mappl.inc'
-c
-      real sq2, weight, sum 
-      integer*4 i, j, k, l
-c
-      data m2, n112 / -2, 112/
-c
-      if (irad .le. 0) call oerror(n112, m2, 'MFILL: distance < 1')
-c
-      sq2 = sqrt(2.)
-c
-      do 600 i = imin, imax
-	do 500 j = jmin, jmax
-c
-	   z2(i,j) = z(i,j)
-	   if(z(i,j) .eq. undefwp) then
-c
-		weight = 0.
-		sum = 0.
-c
-		do 150 l = -1, 1, 2
-		   do 100 k = l, l*irad, l
-		      if (k+i .gt. imax .or. k+i .lt. imin) goto 150
-		      if (z(k+i, j) .ne. undefwp) then
-			   sum = sum + z(k+i, j) / float(iabs(k))
-			   weight = weight + 1./float(iabs(k))
-			   goto 150
-		      endif
-100		      continue
-150		   continue
-c		Looks along X direction
-c
-		do 250 l = -1, 1, 2
-		   do 200 k = l, l*irad, l
-		      if (k+j .gt. jmax .or. k+j .lt. jmin) goto 250
-		      if (z(i, k+j) .ne. undefwp) then
-			   sum = sum + z(i, k+j) / float(iabs(k))
-			   weight = weight + 1./ float(iabs(k))
-			   goto 250
-		      endif
-200		      continue
-250		   continue
-c		Looks along Y direction
-c
-		do 350 l = -1, 1, 2
-		   do 300 k = l, l*irad, l
-		      if (k+i .gt. imax .or. k+i .lt. imin) goto 350
-		      if (k+j .gt. jmax .or. k+j .lt. jmin) goto 350
-		      if (z(k+i, k+j) .ne. undefwp) then
-			   sum = sum + z(k+i, k+j) / abs(sq2*float(k))
-			   weight = weight + 1./ abs(sq2*float(k))
-			   goto 350
-		      endif
-300		      continue
-350		   continue
-c		Looks along one diagnal
-c
-		do 450 l = -1, 1, 2
-		   do 400 k = l, l*irad, l
-		      if (k+i .gt. imax .or. k+i .lt. imin) goto 450
-		      if (k-j .gt. jmax .or. k-j .lt. jmin) goto 450
-		      if (z(k+i, k-j) .ne. undefwp) then
-			   sum = sum + z(k+i, k-j) / abs(sq2*float(k))
-			   weight = weight + 1./ abs(sq2*float(k))
-			   goto 450
-		      endif
-400		      continue
-450		   continue
-c		Looks along other diagnal
-c
-		if (weight .gt. 0.0) z2(i,j) = sum / weight
-c		Update interpolated value
-c
-	   endif
-c
-500	   continue
-600	continue
-c   
-      return
-c
-      end
diff -uNr 3.5/source/conline/condar/mheader.f unipops-3.6/source/conline/condar/mheader.f
--- 3.5/source/conline/condar/mheader.f	2000-03-16 11:37:07.000000000 -0700
+++ unipops-3.6/source/conline/condar/mheader.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,90 +0,0 @@
-      subroutine mheader(iptwh)
-c
-c     @(#)mheader.f	5.2 05/04/98
-c
-c     Lists out the contents of the header of the IPTWH matrix
-c
-      integer*2 iptwh, istch(40), ierr, n, iinitp, n1
-      integer*2 m2, n80, n112
-      integer*4 n24, nchar
-      character*80 stch
-      character*24 sdate
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      equivalence(istch, stch)
-c
-      data m2, n24, n80, n112 /-2, 24, 80, 112/
-c
-      if (iptwh .lt. 1 .or. iptwh .gt. mnumarrays) 
-     .		call oerror(n112, m2, 'MHEADER')
-c     Check that the user has specified a legitimate matrix
-c
-      write(stch,10)
-10    format(72('-'))
-      call pwrite(istch,n80)
-c
-      stch = 'Object: ' // cmhead(mobject, iptwh) // 
-     +                     cmhead(mobject+1,iptwh)
-      call pwrite(istch,n80)
-      call fromdate(n24, nchar, mhead(mdate, iptwh), sdate)
-      stch = 'Date: ' // sdate //
-     +       '       Origin: ' // cmhead(morigin, iptwh)
-      call pwrite(istch,n80)
-c
-      write(stch,12)
-12    format(' ')
-      call pwrite(istch,n80)
-c
-      write(stch,15)
-15    format('Axis',2x,'Num pixels',3x,'Units',6x,'Ref. value',10x,
-     .		'Delta',5x,'Ref. pixel')
-      call pwrite(istch,n80)
-c
-      write(stch,20,iostat=ierr) ' X: ', nint(mhead(mnaxis1,iptwh)), 
-     .		cmhead(mtype1,iptwh), mhead(mrval1,iptwh), 
-     .		mhead(mdelt1,iptwh), mhead(mpix1,iptwh)
-20    format(a4, 7x, i5, 3x, a8, 2x, 1p3g15.6)
-      call pwrite(istch,n80)
-c
-      write(stch,20,iostat=ierr) ' Y: ', nint(mhead(mnaxis2,iptwh)), 
-     .		cmhead(mtype2,iptwh), mhead(mrval2,iptwh), 
-     .		mhead(mdelt2,iptwh), mhead(mpix2,iptwh) 
-      call pwrite(istch,n80)
-c     X and Y axis parameters
-c
-      write(stch,12)
-      call pwrite(istch,n80)
-c			Equinox if appropriate
-      if (cmhead(mtype1,iptwh)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype2,iptwh)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype1,iptwh)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype2,iptwh)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype1,iptwh)(1:4) .eq. 'DEC-' .or.
-     .    cmhead(mtype2,iptwh)(1:4) .eq. 'DEC-') then
-         if (mhead(mequinox,iptwh) .eq. 0) mhead(mequinox,iptwh)=1950.0
-         write(stch,21,iostat=ierr) mhead(mequinox,iptwh)
- 21      format('Equinox: ',1pg15.6)
-         call pwrite(istch,n80)
-         write(stch,12)
-         call pwrite(istch,n80)
-      endif
-c
-      write(stch,25,iostat=ierr) cmhead(mbunit,iptwh)
-25    format('Units of data values: ',a8)
-      call pwrite(istch,n80)
-c
-      stch = 'Comment:  '
-      n = 4*min(7,(mheadsize-mcomment+1))
-      n1 = iinitp(mcomment)
-      call copy(n, mhead(mcomment,iptwh), istch(6))
-      call pwrite(istch,n80)
-c     Takes care of comments      
-c
-      write(stch,10)
-      call pwrite(istch,n80)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/minit.f unipops-3.6/source/conline/condar/minit.f
--- 3.5/source/conline/condar/minit.f	2000-03-16 11:37:07.000000000 -0700
+++ unipops-3.6/source/conline/condar/minit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,287 +0,0 @@
-      subroutine minit(iptwh, reset)
-c
-c     @(#)minit.f	5.2 05/04/98
-c
-c     Asks the user for input values for the header of the IPTWH matrix
-c     RESET = true if the IPTWH matrix is to be initialized first
-c
-      integer*2 iptwh
-      integer*2 m2, n112, n1900, n6
-      logical reset
-c
-      include 'cio.inc'
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      integer*2 i,lastblnk,ierr, nx, ny, j1
-      integer*4 n0, n24, n80, nchars, datestyle
-      character*80 input, fmts, fmtf, fmtd1, fmtd2
-      character*24 sdate
-      real*8 ddate
-      real value
-c
-      data m2, n6, n24, n80, n112, n1900 / -2, 6, 24, 80, 112, 1900/
-      data n0 /0/
-c
-      if (iptwh .lt. 1 .or. iptwh .gt. mnumarrays) 
-     .		call oerror(n112, m2, 'MINIT')
-c     Check that the user has specified a legitimate matrix
-c
-      write(istdout,*) ' '
-      if (reset) then
-	call mraz(iptwh)
-	fmtf = '(1x,a,'' [default='',1pg15.6,''] -> '',$)'
-	fmts = '(1x,a,'' [default='',a,''] -> '',$)'
-        fmtd1= '(1x,a)'
-        fmtd2= '('' [default='',a,''] -> '',$)'
-	write(istdout,*) '[Enter carriage returns to get default values]'
-      else
-	fmtf = '(1x,a,'' [current value='',1pg15.6,''] -> '',$)'
-	fmts = '(1x,a,'' [current value='',a,''] -> '',$)'
-        fmtd1= '(1x,a)'
-        fmtd2= ''' [current value='',a,''] -> '',$)'
-	write(istdout,*) '[Enter carriage returns to get current values]'
-      endif
-      write(istdout,*) ' '
-c
-1	write(istdout,fmtf) 'Enter number of x-axis pixels', mhead(mnaxis1,iptwh)
-	read(istdin,991) input
-991     format(a)
-        if (lastblnk(input) .gt. 0) then
-	  read(input,*,iostat=ierr) nx
-	  if (ierr .gt. 0 .or. nx .lt. 1) then
-	     write(istdout,*) 'Bad entry... Try again...'
-	     goto 1
-	  else
-	     mhead(mnaxis1,iptwh) = nx
-	  endif
-	endif
-2	write(istdout,fmtf) 'Enter number of y-axis pixels', mhead(mnaxis2,iptwh)
-	read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then
-          read(input,*,iostat=ierr) ny
-	  if (ierr .gt. 0 .or. ny .lt. 1) then
-	     write(istdout,*) 'Bad entry... Try again...'
-	     goto 2
-	  else
-	     mhead(mnaxis2,iptwh) = ny
-	  endif
-	endif
-	if (mhead(mnaxis1,iptwh)*mhead(mnaxis2,iptwh) 
-     .	        .gt. mdatasize/mnumarrays ) then
-	   write(istdout,*) 'Too many pixels... Try again...'
-	   goto 1
-        endif
-        write(istdout,*) ' '
-c     That's it for MNAXIS1 and MNAXIS2
-c
-      write(istdout,*) 'What is the coordinate system of the x-axis?',
-     .		       ' (e.g., VELO, RA, GLONG, TIME, etc.)'
-      write(istdout,fmts) 'Enter SYSTEM (8 chars max)', 
-     .				cmhead(mtype1,iptwh)
-      read(istdin,991) input
-      if (lastblnk(input) .gt. 0) cmhead(mtype1,iptwh) = input
-      write(istdout,*) 'What is the coordinate system of the y-axis?',
-     .		       ' (e.g., VELO, DEC, GLAT, TIME, etc.)'
-      write(istdout,fmts) 'Enter SYSTEM (8 chars max)',
-     .				cmhead(mtype2,iptwh)
-      read(istdin,991) input
-      if (lastblnk(input).gt. 0) cmhead(mtype2,iptwh) = input
-      write(istdout,*) ' '
-c     Takes care of CTYPE1  and CTYPE2
-c
-      write(istdout,*) 'Enter an x and y reference pixel and the',
-     .		      ' values of the x and y axis at these'
-      write(istdout,*) 'pixels.  The specified pixel need not be in',
-     .		        ' the matrix nor need it be an'
-      write(istdout,*) 'integer.'
-      write(istdout,*) ' '
-c
-5       write(istdout,fmtf) 'Enter x-axis ref. pixel number',
-     .				mhead(mpix1,iptwh)
-        read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then
-	  read(input,*,iostat=ierr) value
-          if (ierr .ne. 0) then
-	    write(istdout,*) 'Bad entry... Try again...'
-	    goto 5
-	  else
-	    mhead(mpix1,iptwh) = value
-          endif
-        endif
-6       write(istdout,fmtf) 'Enter y-axis ref. pixel number', 
-     .				mhead(mpix2,iptwh)
-        read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then 
-	  read(input,*,iostat=ierr) value
-          if (ierr .ne. 0) then
-	    write(istdout,*) 'Bad entry... Try again...'
-	    goto 6
-	  else
-	    mhead(mpix2,iptwh) = value
-          endif
-        endif
-        write(istdout,*) ' '
-c       Takes care of MPIX1 and MPIX2
-c
-7       write(istdout,103) 'What is the x-axis value at pixel ',
-     .			mhead(mpix1,iptwh), '?'
-103	format(1x,a,1pg12.4,a)
-        write(istdout,fmtf) 'Enter x-axis value', mhead(mrval1,iptwh)
-        read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then
-	  read(input,*,iostat=ierr) value
-          if (ierr .ne. 0) then
-	    write(istdout,*) 'Bad entry... Try again...'
-	    goto 7
-	  else
-	    mhead(mrval1,iptwh) = value
-          endif
-        endif
-8       write(istdout,103) 'What is the y-axis value at pixel ',
-     .			mhead(mpix2,iptwh), '?'
-        write(istdout,fmtf) 'Enter y-axis value', mhead(mrval2,iptwh)
-        read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then
-	  read(input,*,iostat=ierr) value
-          if (ierr .ne. 0) then
-	    write(istdout,*) 'Bad entry... Try again...'
-	    goto 8
-	  else
-	    mhead(mrval2,iptwh) = value
-          endif
-        endif
-        write(istdout,*) ' '
-c       Takes care of MRVAL1 and MRVAL2
-c
-9        write(istdout,*) 'What is the resolution of x and y axis ',
-     .			' (i.e., distance between pixels)?'
-        write(istdout,fmtf) 'Enter x-axis resolution', 
-     .			mhead(mdelt1,iptwh)
-        read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then
-	  read(input,*,iostat=ierr) value
-          if (ierr .ne. 0) then
-	    write(istdout,*) 'Bad entry... Try again...'
-	    goto 9
-	  else
-	    mhead(mdelt1,iptwh) = value
-          endif
-        endif
-10      write(istdout,fmtf) 'Enter y-axis resolution',
-     .			 mhead(mdelt2,iptwh)
-        read(istdin,991) input
-        if (lastblnk(input) .gt. 0) then 
-	  read(input,*,iostat=ierr) value
-          if (ierr .ne. 0) then
-	    write(istdout,*) 'Bad entry... Try again...'
-	    goto 10
-	  else
-	    mhead(mdelt2,iptwh) = value
-          endif
-        endif
-        write(istdout,*) ' '
-c       Takes care of MDELT1 and MDELT2
-      if (cmhead(mtype1,iptwh)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype2,iptwh)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype1,iptwh)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype2,iptwh)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype1,iptwh)(1:4) .eq. 'DEC-' .or.
-     .    cmhead(mtype2,iptwh)(1:4) .eq. 'DEC-') then
-         if (reset .or. mhead(mequinox,iptwh) .eq. 0) 
-     .           mhead(mequinox,iptwh) = 1950.0
- 11      write(istdout,fmtf) 
-     .       'Enter the EQUINOX of the coordinate system', 
-     .        mhead(mequinox,iptwh)
-         read(istdin,991) input
-         if (lastblnk(input) .gt. 0) then
-            read(input,*,iostat=ierr) value
-            if (ierr .ne. 0) then
-               write(istdout,*) 'Bad entry... Try again...'
-               goto 11
-            else
-               mhead(mequinox,iptwh) = value
-            endif
-         endif
-         write(istdout,*) ' '
-      endif
-c			Takes care of EQUINOX for standard RA-- DEC-- coords
-      write(istdout,*)
-c
-      write(istdout,*) 'What is the OBJECT name that describes the',
-     .			' data?'
-      write(istdout,fmts) 'Enter name (16 char max)',
-     .		cmhead(mobject,iptwh) // cmhead(mobject+1,iptwh)
-      read(istdin,991) input
-      if (lastblnk(input) .gt. 0) then
-         cmhead(mobject,iptwh) = input(1:8)
-         cmhead(mobject+1,iptwh) = input(9:16)
-      endif
-      write(istdout,*) ' '
-c     Takes care of OBJECT
-c
-12    write(istdout,*) 'What DATE describes the data?'
-      call fromdate(n24, nchars, mhead(mdate,iptwh), sdate)
-      if (datestyle(n0) .eq. 1) then
-         write(istdout,fmtd1) 
-     .        'Enter date (YYYY-MM-DD[Thh:mm:ss[.sss]] format)'
-         write(istdout,fmtd2) sdate(1:lastblnk(sdate))
-      else
-         write(istdout, fmts)
-     .        'Enter date (DD/MM/YY format)', sdate(1:lastblnk(sdate))
-      endif
-      read(istdin,991) input
-      if (lastblnk(input) .gt. 0) then
-         call todate(n24, input, ddate, n0)
-         if (ddate .lt. 0.0) then
-            write(istdout,*) 'Bad entry... Try again...'
-            goto 12
-         endif
-         mhead(mdate,iptwh) = ddate
-      endif
-      write(istdout,*) ' '
-c     Takes care of DATE
-c
-      write(istdout,*) 'What PLACE OF ORIGIN describes the data?'
-      write(istdout,fmts) 'Enter ORIGIN (8 chars max)', 
-     .				cmhead(morigin,iptwh)
-      read(istdin,991) input
-      if (lastblnk(input) .gt. 0) cmhead(morigin,iptwh) = input
-      write(istdout,*) ' '
-c     Takes care of ORIGIN
-c
-      write(istdout,*) 'What UNITS are the data in? (M/SEC, K, JY/PIX,',
-     .		       ' DEGREES,... -- use SI units)'
-      write(istdout,fmts) 'Enter UNITS (8 chars max)', 
-     .			cmhead(mbunit,iptwh)
-      read(istdin,991) input
-      if (lastblnk(input) .gt. 0) cmhead(mbunit,iptwh) = input
-      write(istdout,*) ' '
-c     Takes care of UNITS
-c
-c       MBLANK is always NaN, there is no reason to set it here
-c
-      write(istdout,*) 'Enter any comment you may want to add to',
-     .			' the header (56 chars max)'
-      
-      if (reset) then
-	write(istdout,*) 'Default = blanks'
-      else
-	write(istdout,*) 'Current value = ', 
-     .      (cmhead(i,iptwh),i=mcomment,min(mheadsize,mcomment+7))
-      endif
-      read (istdin,991) input
-      if (lastblnk(input) .gt. 0) then
-        do 100 i = mcomment, min(mheadsize,mcomment+7)
-	  j1 = 8*(i-mcomment) + 1
-	  cmhead(i,iptwh) = input(j1:j1+8)
-100       continue
-      endif
-      write(istdout,*) ' '
-c     And that's the comment
-c
-      return
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/mlabel.f unipops-3.6/source/conline/condar/mlabel.f
--- 3.5/source/conline/condar/mlabel.f	2000-03-16 11:37:10.000000000 -0700
+++ unipops-3.6/source/conline/condar/mlabel.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,330 +0,0 @@
-      SUBROUTINE mlabel(itype)
-C
-C  @(#)mlabel.f	5.2 05/04/98
-C
-c     Draws a labeled and anotated box for the previous 2-dim map
-c
-      integer*2 itype, ix, iy, sclc, ipixel, istch(40), i, j, ier, 
-     .		numlevs, ierr, idelx, idely, ilen, lastblnk, short,
-     .		imintmp, imaxtmp, jmintmp, jmaxtmp, curcur
-      integer*2 n1, n8, m2, m1
-      integer*2 n2, n5, n10, n12, n14, n18, n20, n30, n38, n40,
-     .          n55, n90, n100, n125, n272
-      integer*4 l2, l34, l80
-      integer*4 iby, ibx, nchars
-      real xlft, xrght, ybot, ytop, xf, xl, dx, yf, yl, dy, xz, yz,
-     .	   percents(34), value, aindex, blah(2,34), axtmp, aytmp, 
-     .     bxtmp, bytmp, hues(34), shds(34), sats(34)
-      double precision chantox, xtochan
-      logical okarray
-      character*10 format, getformat
-      character*80 stch
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      equivalence (istch, stch)
-      data m1, n1, n2, n5, n8, n10, n12, n14, n18, n20, n30,
-     .           n38, n40, n55, n90, n100, n125, n272, m2
-     .     /-1, 1, 2, 5, 8, 10, 12, 14, 18, 20, 30, 38, 40, 55, 90,
-     .      100, 125, 272, -2/
-      data l2/2/, l34/34/, l80/80/
-c
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-c
-      imintmp = imin
-      imaxtmp = imax
-      jmintmp = jmin
-      jmaxtmp = jmax
-      axtmp = ax(curcur())
-      bxtmp = bx(curcur())
-      aytmp = ay(curcur())
-      bytmp = by(curcur())
-c
-      if (.not. okarray(m2, mhead(1,1)) .or. 
-     .    .not. okarray(m1, mhead(1,1))) call oerror(n272, m2, 'LABEL')
-c  
-c     Draw Box
-      CALL PLACE(ix0,iy0)
-      CALL VCTR(ixm,iy0)
-      CALL VCTR(ixm,iym)
-      CALL VCTR(ix0,iym)
-      CALL VCTR(ix0,iy0)
-c
-C     X TICKS AND ANNOTATION
-c
-      xlft = chantox(m2, mhead(1,1), float(imin), ierr)
-      xrght = chantox(m2, mhead(1,1), float(imax), ierr)
-      call tickmrk(xlft, xrght, n10, xf, xl, dx, limx)
-c     Gets the tick mark parameters for lower axis labelling
-c
-      idelx = 1
-29    if ( idelx*(ixm - ix0 + 1)/(limx+1) .le. sclchar*10*14 .and. 
-     .     idelx .lt. limx-1) then
-	idelx = idelx * 2
-	goto 29
-      endif
-c     Prevents overlapping x labels
-c
-      do 334 j = 1, limx
-	    xz = (j-1)*dx + xf
-	    aindex = xtochan(m2, mhead(1,1), xz, ierr)
-	    ix = nint(aindex*ax(curcur()) + bx(curcur()))
-c
-	    rixt(j) = ix
-c	    Finds the pixel number where the tick mark is to be drawn
-c
-            CALL PLACE (IX,iym)
-            CALL VCTR  (IX,iym - sclc(n12))
-            CALL PLACE (IX,iy0)
-            CALL VCTR  (IX,iy0 + sclc(n12))
-c	    Draw tick marks
-c
-	    if (slabel .gt. 0.0 .and. sclchar .ne. 1.) 
-     .			call charsize(sclchar) 
-	    if (slabel .gt. 0.0 .and. mod(j-1,idelx) .eq. 0) then
-c	    Label tick mark if desired and label wont overlap previous one.
-c
-               CALL PLACE (IX,iym)
-               CALL VCTR  (IX,iym - sclc(n20))
-               CALL PLACE (IX,iy0)
-               CALL VCTR  (IX,iy0 + sclc(n20))
-	       call place(ix - sclc(n8*n14/n2), iy0 - sclc(n30))
-               format = getformat(xz, 2.*xz, n8)
-	       write(stch, format,iostat=ier) xz
-	       call pchar(istch, n8)
-            endif
-c
-  334       CONTINUE
-c
-C     Y TICKS AND ANNOTATION
-c
-      ybot = chantox(m1, mhead(1,1), float(jmin), ierr)
-      ytop = chantox(m1, mhead(1,1), float(jmax), ierr)
-      call tickmrk(ybot, ytop, n10, yf, yl, dy, limy)
-c     Gets the tick mark parameters  for y axis labelling
-c
-      idely = 1
-39    if ( idely*(iym - iy0 + 1)/(limy+1) .le. sclchar*25 .and. 
-     .     idely .lt. limy-1) then
-	idely = idely * 2
-	goto 39
-      endif
-c     Prevent overlapping y labels
-c
-      do 335 j = 1, limy
-	    yz = (j-1)*dy + yf
-	    aindex = xtochan(m1, mhead(1,1), yz, ierr)
-	    iy = nint(aindex*ay(curcur()) + by(curcur()))
-c
-	    riyt(j) = iy
-c	    Finds the pixel number where the tick mark is to be drawn
-c
-            CALL PLACE (IX0,iy)
-            CALL VCTR  (ix0 + sclc(n12),iy)
-            CALL PLACE (IXM,iy)
-            CALL VCTR  (ixm - sclc(n12),iy)
-c	    Draw tick marks
-c
-	    if (slabel .gt. 0.0 .and. mod(j-1,idely) .eq. 0) then
-               CALL PLACE (IX0,iy)
-               CALL VCTR  (ix0 + sclc(n20),iy)
-               CALL PLACE (IXM,iy)
-               CALL VCTR  (ixm - sclc(n20),iy)
-               format = getformat(yz,2.*yz, n8)
-	       write(stch, format,iostat=ier) yz
-	       call place(ix0 - sclc(n8*n14), iy - sclc(n12))
-	       call pchar(istch, n8)
-  	    endif
-c	    Draw tick marks and y-axis labels
-c
-  335       CONTINUE
-c
-c     Add Documentation
-c
-      if (slabel .gt. 0.0) then
-	stch = cmhead(mtype1, 1)
-	ilen = lastblnk(stch)
-	call place((ixm+ix0)/n2 - sclc(ilen*n14/n2), iy0 - sclc(n55))
-        call pchar( istch, ilen)
-c	X-axis label
-C	
-	ilen = lastblnk(cmhead(mtype2,1))
- 	stch = cmhead(mtype2,1)
-	ilen = lastblnk(stch)
-	call place(ix0 - sclc(n8*n14), (iy0+iym-sclc(n14*ilen))/n2)
-        CALL vchar (istch,ilen, .true.)
-c	Y-axis label
-c
-        stch = cmhead(mobject,1) // cmhead(mobject+1,1)
-	ilen = lastblnk(stch)
-	call place( ix0, iy0 - sclc(n100))
-        CALL PCHAR(istch,ilen)
-c	Object name
-c
-        stch = cmhead(morigin,1)
-	ilen = lastblnk(stch)
-	call place(ix0 + sclc(n20*n14), iy0 - sclc(n100))
-        CALL PCHAR(istch,ilen)
-c	Origin 
-c
-        call fromdate(l80, nchars, mhead(mdate, 1), stch)
-	ilen = nchars
-	call  place(ix0 + sclc(n38*n14), iy0 - sclc(n100))
-        CALL PCHAR(istch,ilen)
-c	Date
-c
-        stch = 'Comment:'
-	do 91 j = mcomment, min(mheadsize, mcomment+7)
-	   ilen = 8 + (j-mcomment)*8
-	   stch = stch(1:ilen) // cmhead(j,1)
-91	   continue
-	ilen = lastblnk(stch)
-	call place(ix0, iy0 - sclc(n125))
-        CALL PCHAR(istch,ilen)
-c	Comment
-c
-	CALL PLACE(ixm,iym + sclc(n5))
-	ilen = lastblnk(cmhead(mbunit,1))
-c
-        if (itype .ne. 5) then
-c	Skip the LEVELS printing part for type 5 plots
-c
-	  if (ilen .gt. 0) then
-	     stch = 'Levels: (' // cmhead(mbunit,1)(1:ilen) // ')'
-	  else
-	     stch = 'Levels'
-	  endif
-	  ilen = lastblnk(stch)
-          CALL PCHAR(istch,ilen)
-c
-	  do 133 numlevs = 1, maxregn-1
-               IF (LEVS(numlevs+1).le.-999999.) goto 134
-133	       continue
-	  numlevs = maxregn
-c		
-134       call charsize(0.75*sclchar)
-	  format = getformat(levs(1), levs(min(2,numlevs)), n8)
-          DO 135 I=1, numlevs
-               WRITE  (stch,format,IOSTAT=IER) LEVS(I)
-               CALL PLACE(ixm + sclc(n90), iym - sclc(i*n18))
-               CALL PCHAR (istch,n8)
-  135          CONTINUE
-c
-          if (itype .eq. 2 .or. itype .eq. 3) then
-c
-	    imin = 1
-	    imax = 2
-	    jmin = 1
-	    jmax = numlevs + 2
-	    ax(curcur()) = sclc(n40)
-	    bx(curcur()) = ixm
-	    ay(curcur()) = float(sclc(n18))
-	    by(curcur()) = float(iym-sclc(n18)*(numlevs+1)) - ay(curcur())/2.
-c
-            value = mhead(mblank,1)
-      	    if (itype .eq. 2) then
-                blah(1,1) = value
-                blah(2,1) = value
-    	    	do 93 i = 1, numlevs
-		    percents(i) = (float(i-1)/float(numlevs-1))**2
-		    blah(1,i+1) = levs(numlevs-i+1)
-		    blah(2,i+1) = levs(numlevs-i+1)
-93		    continue
-                blah(1,numlevs+2) = value
-                blah(2,numlevs+2) = value
-            	call hlftne(blah,l2,l34,levs,percents,numlevs,value)
-	    else
-                blah(1,1) = value
-                blah(2,1) = value
-    	    	do 94 i = 1, numlevs
-		    hues(i) = clut(1,i)
-		    shds(i) = clut(2,i)
-		    sats(i) = clut(3,i)
-		    blah(1,i+1) = levs(numlevs-i+1)
-		    blah(2,i+1) = levs(numlevs-i+1)
-94		    continue
-                blah(1,numlevs+2) = value
-                blah(2,numlevs+2) = value
-		call raster(blah,l2,l34,levs,hues,shds,sats,
-     .                      numlevs,value)
-	    endif
-c
-        endif
-c
-        endif
-c
-      endif	  
-c
-      imin = imintmp
-      imax = imaxtmp
-      jmin = jmintmp
-      jmax = jmaxtmp
-      ax(curcur()) = axtmp
-      bx(curcur()) = bxtmp
-      ay(curcur()) = aytmp
-      by(curcur()) = bytmp
-c
-      call charsize(1.)
-c 
-      IF (ZLLINE.ge.1.0) then
-	 aindex = (0.-mhead(mrval2,1))/mhead(mdelt2,1) + 
-     .			mhead(mpix2,1)
-	 iby = aindex*ay(curcur()) + by(curcur()) + 0.5
-	 if (iby .ge. iy0 .and. iby .le. iym) then
-	    CALL PLACE (IX0,short(IBY))
-	    CALL VCTR  (IXM,short(IBY))
-	 endif
-      endif
-c     Draw y=0 line
-c
-      DO 400 I = 1, maxmrk
-	if (hmark(i) .le. -999999.0) goto 401
-	 IbY = hmark(i)*ay(curcur()) + by(curcur()) + 0.5
-	 if (iby .ge. iy0 .and. iby .le. iym) then
-            CALL PLACE(IX0,short(IbY))
-            CALL VCTR(IXM,short(IbY))
-	 endif
-400	 continue
-c        Draw temperature markers
-c
-401   DO 402 I = 1, maxmrk
-	if (cmark(i) .le. -999999.0) goto 403
-	 Ibx = cmark(i)*ax(curcur()) + bx(curcur()) + 0.5
-	 if (ibx .ge. ix0 .and. ibx .le. ixm) then
-	    CALL PLACE (short(Ibx),IYM)
-	    CALL VCTR  (short(Ibx),IY0)
-	 endif
-402	 continue
-c        Draw channel markers
-c
-403   DO 404 I = 1, maxmrk
-	if (xmark(i) .le. -999999.0) goto 405
-	 xz = xtochan(m2, mhead(1,1), xmark(i), ierr)
-	 Ibx = xz*ax(curcur()) + bx(curcur()) + 0.5
-	 if (ibx .ge. ix0 .and. ibx .le. ixm) then
-	    CALL PLACE (short(Ibx),IYM)
-            CALL VCTR(short(Ibx),IY0)
-	 endif
-404	 continue
-c        VMARKs
-c
-405   DO 406 I = 1, maxmrk
-	if (fmark(i) .le. -999999.0) goto 407
-	 yz = xtochan(m1, mhead(1,1), fmark(i), ierr)
-	 IbY = yz*ay(curcur()) + by(curcur()) + 0.5
-	 if (iby .ge. iy0 .and. iby .le. iym) then
-            CALL PLACE(IX0,short(IbY))
-            CALL VCTR(IXM,short(IbY))
-	 endif
-406	 continue
-c        FMARKSs
-c
-407   continue
-c
-      RETURN
-      END
-
- 
diff -uNr 3.5/source/conline/condar/mraz.f unipops-3.6/source/conline/condar/mraz.f
--- 3.5/source/conline/condar/mraz.f	2000-03-16 11:37:13.000000000 -0700
+++ unipops-3.6/source/conline/condar/mraz.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,66 +0,0 @@
-      subroutine mraz(iptwh)
-c
-c     @(#)mraz.f	5.3 05/04/98
-c
-c     Initializes the IPTWH matrix
-c
-      integer*2 iptwh
-      integer*2 m2, n112, i1
-      integer*4 l1, long, l0
-      integer*4 i, n1, n2, n3, iarray(3), i12
-      real*4 rmaxnorm, rmaxnormal
-      real*8 dinfinity
-      character*12 date1
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      data m2, i1, i12, n112 /-2, 1, 12, 112/
-      data l0, l1 /0, 1/
-c
-      if (iptwh .lt. 1 .or. iptwh .gt. mnumarrays) 
-     .		call oerror(n112, m2, ' ')
-c     Check that the user has specified a legitimate matrix
-c
-      rmaxnorm = rmaxnormal()
-      call idate( iarray)
-      call makedate(i12, date1, iarray)
-c     Gets the system date and the value of infinity
-c
-      do 10 i = 1, mstrings - 1
-	mhead(i,iptwh) = rmaxnorm
-10	continue
-      do 20 i = mstrings, mheadsize
-	cmhead(i,iptwh) = '  '
-20	continue
-c     Initialize real and strings in matrix header
-c
-c     The following sets up default header values
-c
-      mhead(mblank,iptwh) = dinfinity()
-      mhead(mnaxis1,iptwh) = 1.0
-      mhead(mnaxis2,iptwh) = 1.0
-      mhead(mpix1,iptwh) = 1.0
-      mhead(mpix2,iptwh) = 1.0
-      mhead(mrval1,iptwh) = 1.0
-      mhead(mrval2,iptwh) = 1.0
-      mhead(mdelt1,iptwh) = 1.0
-      mhead(mdelt2,iptwh) = 1.0
-      mhead(mequinox,iptwh) = 0.0
-      mhead(mbitpix,iptwh) = 16.0
-      cmhead(mtype1,iptwh) = 'PIXEL'
-      cmhead(mtype2,iptwh) = 'PIXEL'
-      call todate(i12, date1, mhead(mdate, iptwh), l0)
-c
-      n1 = mdatasize/mnumarrays
-      n2 = long(iptwh-i1)*n1 + l1
-      n3 = n2 + n1 - l1
-      do 30 i = n2, n3
-	mdata(i) = mhead(mblank,iptwh)
-30	continue
-c     Initialize data section for IPTWH matrix
-c
-      return
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/mread.f unipops-3.6/source/conline/condar/mread.f
--- 3.5/source/conline/condar/mread.f	2000-03-16 11:37:13.000000000 -0700
+++ unipops-3.6/source/conline/condar/mread.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,349 +0,0 @@
-      subroutine mread(filename)
-c
-c     @(#)mread.f	5.7 05/06/98
-c
-c     Reads in 2-dim FITS image file into matrix 0
-c
-      character*(*) filename
-c
-      character*80 head(36), hmask(36), stch
-      character*1023 headname, fullname
-      character*1 quote
-      logical lend, inquirefile, okreal4, okreal8
-      integer*4 n1, n2, long, i4, nwrds1, nwrds2, nwrds4, nwrds8, nwrds,
-     +          l80, nchars, oldfits
-c
-      parameter (nwrds1 = 2880)
-      parameter (nwrds2 = 1440)
-      parameter (nwrds4 = 720)
-      parameter (nwrds8 = 360)
-c
-      integer*2 ierr, j, i, k, lastblnk, ilen, irec, nv, numhead, kmax, 
-     .		maxrec, mleft, ldata2(nwrds2), istch(40)
-      integer*4 ldata4(nwrds4), iblank, ii
-      integer*2 m1, m2, n80, n352, n357, n365
-      character*1 cdata1(nwrds1)
-      real tzero, tscale, rdata4(nwrds4), fblank, r_quiet_nan
-      real*8 rmax2, rmax4, rdata8(nwrds8)
-c
-      parameter (rmax2 = 32767.0d0)
-      parameter (rmax4 = 2147483647.0d0)
-c
-      include 'mappl.inc'
-      include 'cio.inc'
-      include 'mform.inc'
-c
-      equivalence (istch,stch)
-c
-      data m1, m2, n80, n352, n357, n365 / -1, -2, 80, 352, 357, 365/
-      data quote /''''/
-      data l80 /80/
-c
-      fblank = r_quiet_nan()
-c
-      call filecomp(filename, fullname)
-c
-      ilen = lastblnk(dirprefix(1))
-      headname = dirprefix(1)(1:ilen) // '/sunbin/twodim.mask'
-c     Get the file name of FITS template file
-c
-      open(unit=iiotmp,file=headname,access='sequential',
-     .		form='formatted',status='old',iostat=ierr)
-      if (ierr .ne. 0) 
-     .	call oerror(n352, m1, 'MREAD: Template FITS-file not found')
-c
-      rewind(iiotmp,iostat=ierr)
-      read(iiotmp,10,iostat=ierr) hmask
-10    format(a)
-      if (ierr .ne. 0) 
-     .	call oerror(n357, m1, 'MREAD: Template FITS-file cannot be read')
-      close (iiotmp,iostat=ierr)
-c     Reads in FITS header template.  Program must know of any changes to
-c     template.
-c
-      if (.not. inquirefile(fullname)) 
-     .	call oerror(n352,m2, 'MREAD: FITS file does not exist')
-c
-      open(unit=iiotmp, file=fullname, access='direct', 
-     .	form='unformatted', status='old',iostat=ierr,recl=2880)
-      if (ierr .ne. 0) 
-     .		call oerror(n352, m2, 'MREAD: FITS file cannot be opened')
-c
-      lend = .false.
-c
-      mhead(mrval1,1) = 1.
-      mhead(mrval2,1) = 1.
-      mhead(mnaxis1,1) = 0.
-      mhead(mnaxis2,1) = 0.
-      mhead(mdelt1,1) = 1.
-      mhead(mdelt2,1) = 1.
-      mhead(mpix1,1) = 1.
-      mhead(mpix2,1) = 1.
-      mhead(mequinox,1) = 0.
-      cmhead(mtype1,1) = '        '
-      cmhead(mtype2,1) = '        '
-      mhead(mdate,1) = -1.
-      cmhead(mobject,1) = '        '
-      cmhead(mobject+1,1) = '        '
-      cmhead(morigin,1) = '        '
-      cmhead(mbunit,1) = '        '
-      do 1011 i = 1, mheadsize-mcomment+1
-	cmhead(i-1+mcomment,1) = '        '
-1011	continue
-c     Sets up defaults if the header doesn't contain the necessary
-c     information.  No gaurentees if one of the above is not in the header
-c
-      irec = 0
-c
-1       irec = irec + 1
-	write(stch,fmt="(a,i5,a)") 'Reading the ', irec, 
-     .			' header record from FITS file'
-	call pwrite(istch,n80)
-      	read(iiotmp,rec=irec,iostat=ierr) head
-	if (ierr .ne. 0) call oerror(n357, m2, 'Cannot read from FITS file')
-c
- 	stch = ' '
-	call pwrite(istch,n80) 
-	do 2 i = 1, 24
-	   stch = head(i)
- 	   call pwrite(istch,n80)
-2	   continue
- 	stch = ' '
-	call pwrite(istch,n80)
-c	Echo out the header record 
-c
-	if (irec .eq. 1) then
-c	Certain things MUST be in the first record of the header.  Test that
-c	those things have the proper value.
-c
-	if (head(1)(1:30) .ne. hmask(1)(1:30)) 
-     .     call oerror(n365, m2, 'MREAD: ----> '// head(1)(1:30))
-c
-	if (head(2)(1:10) .ne. hmask(2)(1:10)) then 
-     	   call oerror(n365, m2, 'READCUBE: ----> '// head(2)(1:30))
-	else
-	   read(unit=head(2) (11:30), fmt=20, iostat=ierr) nv
-	   mhead(mbitpix,1) = nv
-	endif
-c
-	if (nint(mhead(mbitpix,1)) .eq. 16) then
-	    nwrds = nwrds2
-	else if (nint(mhead(mbitpix,1)) .eq. 32) then
-	    nwrds = nwrds4
-	else if (nint(mhead(mbitpix,1)) .eq. 8) then
-	    nwrds = nwrds1
-	else if (nint(mhead(mbitpix,1)) .eq. -32) then
-	    nwrds = nwrds4
-	else if (nint(mhead(mbitpix,1)) .eq. -64) then
-	    nwrds = nwrds8
-	else
-     	   call oerror(n365, m2, 'MREAD: ----> '// head(2)(1:30))
-	endif
-c
-	if (head(3)(1:30) .ne. hmask(3)(1:30)) 
-     .	   call oerror(n365, m2, 'MREAD: ----> '// head(3)(1:30))
-c       Checks for SIMPLE, BITPIX, NAXIS=2
-c
-	if (head(4)(1:10) .ne. hmask(4)(1:10)) then
-     	   call oerror(n365, m2, 'MREAD: ----> '// head(4)(1:30))
-	else
-	   read(unit=head(4) (11:30),fmt=20, iostat=ierr) nv
-20    	   format(i20)
-	   mhead(mnaxis1,1) = nv
-	endif
-	if (head(5)(1:10) .ne. hmask(5)(1:10)) then 
-     	   call oerror(n365, m2, 'MREAD: ----> '// head(5)(1:30))
-	else
-	   read(unit=head(5) (11:30),fmt=20, iostat=ierr) nv
-	   mhead(mnaxis2,1) = nv
-	endif
-c       Checks NAXIS1,NAXIS2
-c
-        endif
-c             try and see if this is an old style unipops header
-c             this had the DATE keyword with the order of mm/dd reversed
-        oldfits = 0
-        if (head(1)(32:32) .eq. '/' .and.
-     +       head(1)(73:79) .eq. 'UniPops') then
-           oldfits = 1
-        endif
-c
-	do 50 j = 36, 1, -1
-	   if (hmask(36)(1:10) .eq. head(j)(1:10) ) then
-		stch = 'Last header record found'
-		call pwrite(istch, n80)
-		numhead = irec
-		kmax = j - 1
-		lend = .true.
-		goto 60
-	   endif
-50	   continue
-        kmax = 36
-c       Checks if this is the last header record
-c
-60      continue
-c
-        do 200 i = 1, 36
-	   do 100 j = 1, kmax
-	      if (hmask(i) (1:10) .eq. head(j) (1:10) ) then
-                if (i .eq. 6) cmhead(mtype1,1) = head(j) (12:19)
-		if (i .eq. 10) cmhead(mtype2,1) = head(j) (12:19)
-		if (i .eq. 14) then
-                   cmhead(mobject,1) = head(j) (12:19) 
-                   if (head(j) (20:20) .ne. quote) 
-     .                cmhead(mobject+1,1) = head(j) (20:27)
-                endif
-		if (i .eq. 15) cmhead(morigin,1) = head(j) (12:19) 
-		if (i .eq. 16) then
-                   call fitskeyvalue(nchars, head(j), stch)
-                   call todate(nchars, stch, mhead(mdate, 1), oldfits)
-                endif
-		if (i .eq. 20) cmhead(mbunit,1) = head(j) (12:19) 
-c
-      		if (i.eq.7) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							mhead(mrval1,1)
-      		if (i.eq.8) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							mhead(mdelt1,1)
-		if (i.eq.9) read(unit=head(j)(11:30),40) mhead(mpix1,1)
-      		if (i .eq. 11) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							mhead(mrval2,1)
-      		if (i .eq. 12) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							mhead(mdelt2,1)
-		if (i .eq. 13) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							mhead(mpix2,1)
-      		if (i .eq. 17) then
-c                           look for bad unipops BLANK values which are
-c                           floating point values, just watch for
-c                           "."
-                   do 405 ii=11,30
-                      if (head(j)(ii:ii) .eq. '.') goto 410
- 405               continue
- 410               if (ii .le. 30) then
-                      read(unit=head(j)(11:30),40,iostat=ierr) fblank
-                   else
-                      read(unit=head(j)(15:30),45,iostat=ierr) iblank
-                      fblank = iblank
-                   endif
-                endif
-      		if (i .eq. 18) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							tscale
-      		if (i .eq. 19) read(unit=head(j)(11:30),40,iostat=ierr)
-     .							tzero
-      		if (i .eq. 23) read(unit=head(j) (11:30),40,iostat=ierr) 
-     .							mhead(mequinox,1)
- 40             format(1p1g20.0)
- 45             format(i16)
-c
-      		if (i .eq. 24) then
-		    do 101 k = 1, min(7,mheadsize-mcomment+1)
-		       cmhead(k-1+mcomment,1) = head(j) (11+(k-1)*8:10+k*8)
-101		       continue
-		endif
-c
-	      endif
-100           continue
-200	   continue
-c	Stuffs the FITS header parameters into the matrix header parameters
-c
-        if ( .not. lend) goto 1
-c
-      stch = 'Checking input FITS header parameters'
-      call pwrite(istch,n80)
-      stch = ' '
-      call pwrite(istch,n80)
-c
-      n1 = nint(mhead(mnaxis1,1))
-      n2 = nint(mhead(mnaxis2,1))
-      if (n1 .le. 0 .or. n2 .le. 0 .or. n1*n2 .gt. mdatasize/mnumarrays) 
-     .		call oerror(n365, m2, 'MREAD: Too many data points in matrix')
-c     Make sure that data can fit in matrix 0
-c
-      maxrec = (n1*n2) / nwrds + numhead
-      mleft = mod(n1*n2, nwrds)
-      if (mleft .ne. 0) maxrec = maxrec + 1
-      write(stch,fmt="(i5,a)") maxrec, ' records in FITS file'
-      call pwrite(istch,n80)
-c     Calculates how many records the data will occupy and how much of the
-c	last record the data will fill.
-c
-      if (tscale .eq. 0.) 
-     .		call oerror(n365, m2, 'MREAD: Bad BSCALE')
-c			set equinox if not set during read and RA/DEC coord
-      if (mhead(mequinox,1) .eq. 0 .and.
-     .    cmhead(mtype1,1)(1:4) .eq. 'RA--' .or. 
-     .    cmhead(mtype2,1)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype1,1)(1:4) .eq. 'HA--' .or. 
-     .    cmhead(mtype2,1)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype1,1)(1:4) .eq. 'DEC-' .or. 
-     .    cmhead(mtype2,1)(1:4) .eq. 'DEC-') mhead(mequinox,1) = 1950.
-c
-      do 92 irec = numhead+1, maxrec
-	if (nint(mhead(mbitpix,1)) .eq. 16) then
-		read(iiotmp,rec=irec,iostat=ierr) ldata2
-	else if (nint(mhead(mbitpix,1)) .eq. 32) then
-		read(iiotmp,rec=irec,iostat=ierr) ldata4
-	else if (nint(mhead(mbitpix,1)) .eq. -32) then
-		read(iiotmp,rec=irec,iostat=ierr) rdata4
-	else if (nint(mhead(mbitpix,1)) .eq. -64) then
-		read(iiotmp,rec=irec,iostat=ierr) rdata8
-	else if (nint(mhead(mbitpix,1)) .eq. 8) then
-		read(iiotmp,rec=irec,iostat=ierr) cdata1
-	else
-	    call oerror(n365, m1, 'Bad FITS header: Bad BITPIX')
-	endif
-	if (ierr .ne. 0) 
-     .	   call oerror(n357,m2,'MREAD: Cannot read FITS file')
-	if (irec .eq. maxrec) then
-	   j = mleft
-	else
-	   j = nwrds
-	endif
-c	If it is the last record, reset the number of data values to read
-c	into the matrix.
-c
-	do 91 i = 1, j
-	   i4 = long(i) + nwrds*long(irec-numhead-1)
-	   if (nint(mhead(mbitpix,1)) .eq. 16) then
-	   	if (ldata2(i) .eq. fblank) then
-			mdata(i4) = mhead(mblank,1)
-	   	else
-	        	mdata(i4) = float(ldata2(i))*tscale + tzero
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. 32) then
-	   	if (ldata4(i) .eq. fcblank) then
-			mdata(i4) = mhead(mblank,1)
-	   	else
-	        	mdata(i4) = float(ldata4(i))*tscale + tzero
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. 8) then
-	   	if (ichar(cdata1(i)) .eq. fblank) then
-			mdata(i4) = mhead(mblank,1)
-	   	else
-	        	mdata(i4) = float(ichar(cdata1(i)))*tscale + tzero
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. -32) then
-	   	if ( .not. okreal4(rdata4(i))) then
-			mdata(i4) = mhead(mblank,1)
-	   	else
-	        	mdata(i4) = rdata4(i)*tscale + tzero
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. -64) then
-	   	if ( .not. okreal8(rdata8(i))) then
-			mdata(i4) = mhead(mblank,1)
-	   	else
-	        	mdata(i4) = rdata8(i)*tscale + tzero
-	   	endif
-	   else
-	        call oerror(n365, m1, 'Bad FITS header: Bad BITPIX')
-	   endif
-91	   continue
-92	continue
-c	Scale the data (if it is DEFINED) from I*2/4 to R*4 and store in
-c	 matrix
-c
-      close(iiotmp,iostat=ierr)
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/mrqmin.f unipops-3.6/source/conline/condar/mrqmin.f
--- 3.5/source/conline/condar/mrqmin.f	2000-03-16 11:37:51.000000000 -0700
+++ unipops-3.6/source/conline/condar/mrqmin.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,179 +0,0 @@
-      subroutine mrqmin(x, y, sig, ndata, a, ma, lista, mfit, 
-     .	                 covar, alpha, nca, chisq, funcs, alamda)
-c
-c      @(#)mrqmin.f	5.1 06/22/94
-c
-c     Levenberg-Marquardt method from Press et al "Numerical Recipes"
-c     The following is directly from Press et al:
-c     
-c	Attempts to reduce the value of chi**2 of a fit between a set
-c	of NDATA points X(I), Y(I) woth individual standard deviations
-c	SIG(I), and a nonlinear function dependent on MA coeficiaents
-c	A.  The array LISTA numbers the parameters A such that the
-c	first MFIT elements corespond to values actually being
-c	adjusted; the remaining MA-MFIT parameters are held fixed at
-c	their input value.  The program returns current best-fit values
-c	for the MA fit parameters A and chi**2, CHISQ. The arrays
-c	COVAR(NCA,NCA), ALPHA(NCA,NCA) with physical dimensions NCA (>=
-c	MFIT) are used as working space during most iterations.  Supply
-c	a subroutine FUNCS(X,A,YFIT,DYDA,MA) that evaluates the fitting
-c	function YFIT and its derivatives DYDA with respect to the
-c	fitting parameters A at X.  On the first call provide an
-c	initial guess for the parameters A, and set ALAMDA < 0 for
-c	initialization (which then sets ALAMDA to 0.001).  If a step
-c	succeeds, CHISQ becomes smaller and ALAMDA decreases by a
-c	factor of 10.  If a step fails ALAMDA grows by a factor of 10.
-c	You must call this routine repeatedly until convergence is
-c	achieved.  Then, make one final call with ALAMDA=0 so that
-c	COVAR(I,J) returns the covarience matrix and ALPHA(I,J) the
-c	curvature matrix.  
-c
-      real x(*), y(*), sig(*), a(*), covar(nca, nca), alpha(nca, nca),
-     .	   chisq, alamda
-      integer*4 nca, ndata, ma, lista(*), mfit
-c
-      integer*4 mmax, kk, j, ihit, k, n1
-      integer*2 n120, m3
-c
-      parameter (mmax=80)
-      parameter (n120=120)
-      parameter (m3=-3)
-      parameter (n1=1)
-c
-      real atry(mmax), beta(mmax), da(mmax), ochisq
-c
-      save atry, beta, da, ochisq
-c
-      external funcs
-c
-      if (mmax .lt. ma) 
-     .		call oerror(n120, m3, 'MRQMIN: Too many parameters to fit')
-c
-      if (alamda .lt. 0) then
-c	Initialization
-c
-	kk = mfit + 1
-	do 12 j = 1, ma
-	    ihit = 0
-	    do 11 k = 1, mfit
-		if (lista(k) .eq. j) ihit = ihit + 1
-11		continue
-	    if (ihit .eq. 0) then
-		lista(kk) = j
-		kk = kk + 1
-	    else if (ihit .gt. 1) then
-		call oerror(n120, m3, 'MRQMIN: Improper permutation in LISTA')
-	    endif
-12	    continue
-c	    Does LISTA containa proper permutation of the coefficiants.
-c
-	if (kk .ne. ma+1) call oerror(n120, m3, 'MRQMIN: Improper permutation in LISTA')
-	alamda = 0.001
-	call mrqcof(x ,y, sig, ndata, a, ma, lista, mfit, alpha, beta,
-     .		    nca, chisq, funcs)
-	ochisq = chisq
-c
-	do 13 j = 1, ma
-	   atry(j) = a(j)
-13	   continue
-c
-      endif
-c
-      do 15 j = 1, mfit
-	do 14 k = 1, mfit
-	   covar(j,k) = alpha(j,k)
-14	   continue
-	covar(j,j) = alpha(j,j)*(1.+alamda)
-	da(j) = beta(j)
-15	continue
-c	Alter linearized fitting matrix by augmenting diagnol elements
-c
-      call gaussj(covar, mfit, nca, da, n1, n1)
-c     Matrix solution
-c
-      if (alamda .eq. 0) then
-	call covsrt(covar, nca, ma, lista, mfit)
-	return
-      endif
-c     Once converged, evaluate covariance with ALAMDA=0
-c
-      do 16 j = 1, mfit
-	atry(lista(j)) = a(lista(j)) + da(j)
-16	continue
-c
-      call mrqcof(x, y, sig, ndata, atry, ma, lista, mfit, covar, da,
-     .	          nca, chisq, funcs)
-c
-      if (chisq .lt. ochisq) then
-c	Trial succedded.. attempt the new solution.
-	alamda = 0.1*alamda
-	ochisq = chisq
-	do 18 j = 1, mfit
-	   do 17 k = 1, mfit
-		alpha(j,k) = covar(j,k)
-17		continue
-	   beta(j) = da(j)
-	   a(lista(j)) = atry(lista(j))
-18	   continue
-      else
-c	 Failure, increase ALAMDA and return.
-	 alamda = 10.*alamda
-	 chisq = ochisq
-      endif
-c
-      return
-      end
-c
-c----------------------------------------------------
-c
-      subroutine mrqcof(x, y, sig, ndata, a, ma, lista, mfit, alpha, 
-     .		        beta, nalp, chisq, funcs)
-c
-c     Used by MRQMIN to evaluate the linearized fitting matrix ALPHA and vector BETA.
-c
-      integer*4 ndata, ma, lista(*), mfit, nalp
-      real x(*), y(*), sig(*), a(*), alpha(nalp,nalp), beta(*)
-c
-      integer*4 mmax, i, j, k
-      integer*2 n120, m3
-c
-      parameter (mmax=80)
-c
-      real dyda(mmax), sig2i, dy, wt, ymod, chisq
-c
-      external funcs
-c
-      if (mmax .lt. ma) 
-     .		call oerror(n120, m3, 'MRQCOF: Too many parameters to fit')
-c
-      do 12 j = 1, mfit
-	do 11 k = 1, j
-	   alpha(j,k) = 0.
-11	   continue
-	beta(j) = 0.
-12	continue
-      chisq = 0.
-c
-      do 15 i = 1, ndata
-	call funcs(x(i), a, ymod, dyda, ma)
-	sig2i = 1/(sig(i)*sig(i))
-	dy = y(i)-ymod
-	do 14 j = 1, mfit
-	   wt = dyda(lista(j))*sig2i
-	   do 13 k = 1, j
-		alpha(j,k) = alpha(j,k) + wt*dyda(lista(k))
-13		continue
-	   beta(j) = beta(j) + dy*wt
-14	   continue
-	chisq = chisq + dy*dy*sig2i
-15	continue
-c
-      do 17 j = 2, mfit
-	do 16 k = 1, j-1
-	   alpha(k,j) = alpha(j,k)
-16	   continue
-17	continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/msmooth.f unipops-3.6/source/conline/condar/msmooth.f
--- 3.5/source/conline/condar/msmooth.f	2000-03-16 11:37:16.000000000 -0700
+++ unipops-3.6/source/conline/condar/msmooth.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,61 +0,0 @@
-      subroutine msmooth (c, z, z2, isize, jsize, undefwp)
-c
-c     @(#)msmooth.f	5.1 06/22/94
-c
-c     To smooth the z-array by adjusting each z point with respect to its 
-c     four neighboring z points.  This is desirable for course data which would
-c     otherwise result in a plot that has few smooth contour lines and many 
-c     unwanted centers.
-c
-c     c = (R*4) Smoothing factor (see below)
-c     z (isize, jsize) = (R*4) Input Array.
-c     z2 (isize, jsize) = (R*4) Output array
-c     isize = (I*4) First dimension limit of z
-c     jsize = (I*4) Second dimension limit of z
-c     undefwp = (R*4) Undefined data value
-c
-c     Note: The Z array is smoothed by the following:
-c     z(i,j) = c*z(i,j) + (1-c)*(z(i-1,j) + z(i+1,j) + z(i,j-1) + z(i,j+1))/4
-c     where each neighboring z must be defined.  (Each new z is equal to
-c     c times the old z plus (1-c) times the average of its four neighboring
-c     z's.)  A smaller z results in more smoothing.  Subsequent call to MSMOOTH
-c     will result in even more smotthing.
-c
-c     Caution:  IMIN, IMAX, JMIN, JMAX must be set in COMMON /MAPPL/
-c		MSMOOTH only works on that part of the array defined by
-c		IMIN, IMAX, JMIN, and JMAX.
-c
-c               C must be > 0. but less than 1.
-c
-      integer*2 m2, n112
-      integer*4 isize, jsize
-      real z(isize,jsize), c, z2(isize, jsize), undefwp
-c
-      include 'mappl.inc'
-c
-      integer*4 i, j
-c
-      data m2, n112 / -2, 112/
-c
-      if (c .le. 0. .or. c .ge. 1.) 
-     .		call oerror(n112,m2, 'MSMOOTH: Bad smoothing factor')
-c
-      do 200 i = imin, imax
-	do 100 j = jmin, jmax
-                z2(i,j) = z(i,j)
-		if (i-1 .lt. imin .or. j-1 .lt. jmin .or. 
-     .		    i+1 .gt. imax .or. j+1 .gt. jmax) goto 100
-		if (z(i,j) .eq. undefwp) goto 100
-		if (z(i-1,j) .eq. undefwp) goto 100
-		if (z(i+1,j) .eq. undefwp) goto 100
-		if (z(i,j-1) .eq. undefwp) goto 100
-		if (z(i,j+1) .eq. undefwp) goto 100
-		z2(i,j) = c*z(i,j) + (1.-c)*
-     1               (z(i-1,j) + z(i+1,j) + z(i,j-1) + z(i,j+1))/4.
-100		continue
-200	continue
-c
-      return
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/msmoth2.f unipops-3.6/source/conline/condar/msmoth2.f
--- 3.5/source/conline/condar/msmoth2.f	2000-03-16 11:37:16.000000000 -0700
+++ unipops-3.6/source/conline/condar/msmoth2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,66 +0,0 @@
-      subroutine msmoth2 (c, z, z2, isize, jsize, undefwp)
-c
-c     @(#)msmoth2.f	5.1 06/22/94
-c
-c     MSMOTH2 is similar to MSMOOTH except that each z point is adjusted by a
-c     factor of its eight neighboring z points.  This should be used in 
-c     preference to MSMOOTH when more smoothing is desired.
-c
-c     c = (R*4) Smoothing factor (see below)
-c     z (isize, jsize) = (R*4) Input Array.
-c     z2 (isize, jsize) = (R*4) Output array
-c     isize = (I*4) First dimension limit of z
-c     jsize = (I*4) Second dimension limit of z
-c     undefwp = (R*4) Undefined data value
-c
-c     Note: The Z array is smoothed by the following:
-c     z(i,j) = c*z(i,j) + (1-c)*(z(i-1,j-1) + z(i-1,j) + z(i-1,j+1) + z(i,j-1)
-c                         + z(i,j+1) + z(i+1,j-1) + z(i+1,j) + z(i+1,,j+1))/8
-c     where each neighboring z must be defined.  (Each new z is equal to
-c     c times the old z plus (1-c) times the average of its eight neighboring
-c     z's.)  A smaller z results in more smoothing.  Subsequent call to MSMOTH2
-c     will result in even more smotthing.
-c
-c     Caution:  IMIN, IMAX, JMIN, JMAX must be set in COMMON /MAPPL/
-c		MSMOTH2 only works on that part of the array defined by
-c		IMIN, IMAX, JMIN, and JMAX.
-c
-c               C must be > 0. but less than 1.
-c
-      integer*4 isize, jsize
-      integer*2 m2, n112
-      real z(isize,jsize), c, z2(isize, jsize), undefwp
-c
-      include 'mappl.inc'
-c
-      integer*4 i, j
-c
-      data m2, n112 /-2, 112/
-c
-      if (c .le. 0. .or. c .ge. 1.) 
-     .		call oerror(n112, m2, 'MSMOOTH: Bad smoothing factor')
-c
-      do 200 i = imin, imax
-	do 100 j = jmin, jmax
-                z2(i,j) = z(i,j)
-		if (i-1 .lt. imin .or. j-1 .lt. jmin .or. 
-     .		    i+1 .gt. imax .or. j+1 .gt. jmax) goto 100
-		if (z(i,j) .eq. undefwp) goto 100
-		if (z(i-1,j-1) .eq. undefwp) goto 100
-		if (z(i-1,j) .eq. undefwp) goto 100
-		if (z(i-1,j+1) .eq. undefwp) goto 100
-		if (z(i,j-1) .eq. undefwp) goto 100
-		if (z(i,j+1) .eq. undefwp) goto 100
-		if (z(i+1,j-1) .eq. undefwp) goto 100
-		if (z(i+1,j) .eq. undefwp) goto 100
-		if (z(i+1,j+1) .eq. undefwp) goto 100
-		z2(i,j) = c*z(i,j) + (1.-c)*
-     1               (z(i-1,j-1) + z(i-1,j) + z(i-1,j+1) + z(i,j-1) +
-     2		      z(i,j+1) + z(i+1,j-1) + z(i+1,j) + z(i+1,j+1))/8.
-100		continue
-200	continue
-c
-      return
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/mtable.f unipops-3.6/source/conline/condar/mtable.f
--- 3.5/source/conline/condar/mtable.f	2000-03-16 11:37:17.000000000 -0700
+++ unipops-3.6/source/conline/condar/mtable.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,85 +0,0 @@
-      subroutine mtable (z, isize, jsize)
-c
-c     @(#)mtable.f	5.1 06/22/94
-c
-c     Print the Z matrix in a readable form which is arranged so
-c     that the x and y directions correspond to the contour plot.  
-c     Ten columns are printed per page from IMIN to IMAX and each
-c     column is printed from JMAX to JMIN.  Above the first column
-c     on each page is printed the column numbers.  The output is
-c     written via PWRITE.
-c
-c     Z(isize,jsize) = (R*4) Array to be listed
-c     ISIZE,JSIZE  = I*2 dimensions of Z
-c
-c     CAUTION:  IMIN, IMAX, JMIN, and JMAX must be set in 
-c		COMMON/ MAPPL/.
-c
-c
-      real z(isize,jsize)
-      integer*4 isize, jsize
-c
-      include 'mappl.inc'
-c
-      integer*2 m2, n80, n254
-      integer*2 npages, n1, n2, np, j, j1, istch(40), ierr, i
-      character*80 stch
-c
-      equivalence(istch, stch)
-c
-      data m2, n80, n254 /-2, 80, 254/
-c
-      if (imin .gt. imax .or. imin .le. 0 .or. imax .gt. isize)
-     .		call oerror(n254, m2, 'MTABLE')
-      if (jmin .gt. jmax .or. jmin .le. 0 .or. jmax .gt. jsize)
-     .		call oerror(n254, m2, 'MTABLE')
-c     Check IMIN, IMAX, JMIN, JMAX
-c
-      npages = 1 + iabs(imax - imin + 1) / 6
-      if (mod (imax - imin + 1, 6) .eq. 0) npages = npages - 1
-c     NPAGES = number of pages along x axis
-c
-      n1 = imin
-      n2 = min (n1 + 5, imax)
-c
-      do 100 np = 1, npages
-        j1 = 0
-        do 50 j = jmax, jmin, -1
-c
-	   if (mod(j1,35) .eq. 0) then
-	   	write(stch,4,iostat=ierr)
-4	   	format(80('-'))
-	   	call pwrite(istch, n80)
-c
-		write(stch,5,iostat=ierr) (i,i=n1,n2)
-5          	format ('  J', 6(i6,6x))
-	   	call pwrite(istch, n80)
-c
-	   	write(stch,4,iostat=ierr)
-	  	call pwrite(istch, n80)
-   	   endif
-c	   Write out header lines every 35 output lines
-c
-           write(stch, 10, iostat=ierr) j, (z(i,j), i = n1, n2)
-10	   format (1x, i5, 1p6g12.4)
-	   call pwrite(istch, n80)
-c	   Write out data values
-c
-           j1 = j1 + 1
-50	   continue
-c
-	n1 = n1 + 6
-        n2 = min (n1 + 5, imax)
-        if (imin .gt. imax) n2 = max (n1 - 5, imax)
-c
-100	continue
-c
-      write (stch, 105)
-105   format (' ')
-      call pwrite(istch, n80)
-c
-      return
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/mwrite.f unipops-3.6/source/conline/condar/mwrite.f
--- 3.5/source/conline/condar/mwrite.f	2000-03-16 11:37:17.000000000 -0700
+++ unipops-3.6/source/conline/condar/mwrite.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,306 +0,0 @@
-      subroutine mwrite(filename)
-c
-c     @(#)mwrite.f	5.5 05/06/98
-c
-c     Writes 2-dim FITS image file from matrix 0 to file FILENAME
-c
-      character*(*) filename
-c
-      character*24 sdate
-      character*80 hmask(36), stch
-      character*1023 headname, fullname
-      integer*4 n1, n2, unlink, nwrds2, i4, long, hcmt, nwrds4, nwrds,
-     .          nwrds1, nwrds8, n24, nchars, nend
-c
-      parameter (nwrds1 = 2880)
-      parameter (nwrds2 = 1440)
-      parameter (nwrds4 = 720)
-      parameter (nwrds8 = 360)
-c
-      integer*2 ierr, ilen, lastblnk, i, j, ldata2(nwrds2), maxrec,  
-     .		mleft, irec, istch(40), ixmin, iymin, ixmax, iymax, 
-     .		blankfits2, blankfits1
-      integer*4 ldata4(nwrds4), blankfits4
-      integer*2 m1, m2, n0, n80, n255, n273, n352, n355, n357, n366
-      real value, zmin, zmax, tscale, tzero, rdata4(nwrds4),
-     .     rnan, r_quiet_nan
-      logical inquirefile
-      character*1 answr, cdata1(nwrds1)
-      real*8 rmax2, rmax4, rmax1, rdata8(nwrds8), dnan, d_quiet_nan
-c
-      parameter (rmax1 = 255.0d0)
-      parameter (rmax2 = 32767.0d0)
-      parameter (rmax4 = 2147483647.0d0)
-      parameter (blankfits4 = -2147483647)
-      parameter (blankfits2 = -32767)
-      parameter (blankfits1 = 0)
-c
-      include 'cio.inc'
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      equivalence (istch,stch)
-c
-      data m1, m2, n0, n80, n255, n273, n352, n355, n357, n366
-     .     /-1, -2, 0, 80, 255, 273, 352, 355, 357, 366/
-      data n24 /24/
-c
-      rnan = r_quiet_nan()
-      dnan = d_quiet_nan()
-c
-      call filecomp(filename, fullname)
-c
-      n1 = nint(mhead(mnaxis1,1))
-      n2 = nint(mhead(mnaxis2,1))
-      if (n1 .le. 0 .or. n2 .le. 0 .or. n1*n2 .gt. mdatasize/mnumarrays) 
-     .		call oerror(n255, m2, 'MWRITE')
-c     Make sure that data exists in matrix 0
-c
-      if (abs(nint(mhead(mbitpix,1))) .eq. 16) then
-	nwrds = nwrds2
-      else if (abs(nint(mhead(mbitpix,1))) .eq. 32) then
-	nwrds = nwrds4
-      else if (abs(nint(mhead(mbitpix,1))) .eq. 8) then
-	nwrds = nwrds1
-      else if (abs(nint(mhead(mbitpix,1))) .eq. 64) then
-	nwrds = nwrds8
-      else
-	call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
-      endif
-c
-      ilen = lastblnk(dirprefix(1))
-      headname = dirprefix(1)(1:ilen) // '/sunbin/twodim.mask'
-c     Get the file name of FITS template file
-c
-      open(unit=iiotmp,file=headname,access='sequential',
-     .		form='formatted',status='old',iostat=ierr)
-      if (ierr .ne. 0) 
-     .	call oerror(n352, m1, 'MWRITE: Template FITS-file not found')
-c
-      rewind(iiotmp,iostat=ierr)
-      read(iiotmp,10,iostat=ierr) hmask
-10    format(a)
-      if (ierr .ne. 0) 
-     .	call oerror(n357, m1, 'MWRITE: FITS header-file cannot be read')
-      close (iiotmp,iostat=ierr)
-c     Reads in FITS header template.  Program must know of any changes to
-c     template.
-c
-      if (inquirefile(fullname)) then
-	write(istderr,*) 'File ',filename,' exists....'
-	write(istderr,109) 'Do you want to overwrite (y or n [default = n] )? '
-109	format(1x,a,$)
-	read(istdin,11) answr
-11      format(a)
-	if (answr .eq. 'n' .or. answr .eq. 'N' .or. answr .eq. ' ') then
-	    goto 99
-	else
-	    ierr = unlink(fullname)
-	    if (ierr .ne. 0) call oerror(n366, m2, 'MWRITE')
-	endif
-      endif
-c     Don't overwrite file unless user wants to
-c
-      open(unit=iiotmp, file=fullname, access='direct', 
-     .	form='unformatted',status='new',iostat=ierr,recl=2880)
-      if (ierr .ne. 0) 
-     .	call oerror(n352, m2, 'MWRITE: FITS file cannot be created')
-c
-      value = mhead(mblank,1)
-      call zlimit(mdata(1), n1, n2, zmin, ixmin, iymin, zmax, ixmax, 
-     .		  iymax, value)
-      if (nint(mhead(mbitpix,1)) .eq. 16) then
-	tscale = (zmax - zmin)/(2*rmax2)
-      	tzero = zmin + rmax2*tscale
-      else if (nint(mhead(mbitpix,1)) .eq. 32) then
-	tscale = (zmax - zmin)/(2*rmax4)
-      	tzero = zmin + rmax4*tscale
-      else if (nint(mhead(mbitpix,1)) .eq. 8) then
-	tscale = (zmax - zmin)/rmax1
-      	tzero = zmin
-      else if (nint(mhead(mbitpix,1)) .eq. -32 .or.
-     .         nint(mhead(mbitpix,1)) .eq. -64) then
-	tscale = 1.
-      	tzero = 0.
-      else
-	call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
-      endif
-c     Calculate max,min, and scale factors from min/max in matrix 0.
-c
-      write(unit=hmask(2) (24:30),20,iostat=ierr) nint(mhead(mbitpix,1))
-      write(unit=hmask(4) (24:30),20,iostat=ierr) nint(mhead(mnaxis1,1))
-      write(unit=hmask(5) (24:30),20,iostat=ierr) nint(mhead(mnaxis2,1))
-20    format(i7)
-c
-      hmask(6) (12:19) = cmhead(mtype1,1)
-      hmask(10) (12:19) = cmhead(mtype2,1)
-      hmask(14) (12:19) = cmhead(mobject,1)
-      hmask(14) (20:27) = cmhead(mobject+1,1)
-      hmask(15) (12:19) = cmhead(morigin,1)
-      call fromdate(n24, nchars, mhead(mdate, 1), sdate)
-      hmask(16) (11:11) = '\''
-      nend = nchars + 11
-      hmask(16) (12:nend) =  sdate(1:nchars)
-      nend = nend + 1
-      hmask(16) (nend:nend) = '\''
-      hmask(20) (12:19) = cmhead(mbunit,1)
-c
-      write(unit=hmask(7) (15:30),40,iostat=ierr) mhead(mrval1,1)
-      write(unit=hmask(8) (15:30),40,iostat=ierr) mhead(mdelt1,1)
-      write(unit=hmask(9) (15:30),40,iostat=ierr) mhead(mpix1,1)
-      write(unit=hmask(11) (15:30),40,iostat=ierr) mhead(mrval2,1)
-      write(unit=hmask(12) (15:30),40,iostat=ierr) mhead(mdelt2,1)
-      write(unit=hmask(13) (15:30),40,iostat=ierr) mhead(mpix2,1)
-      if (nint(mhead(mbitpix,1)) .eq. 16) then
-        write(unit=hmask(17) (15:30),42,iostat=ierr) (blankfits2-1)
-      else if (nint(mhead(mbitpix,1)) .eq. 32) then
-        write(unit=hmask(17) (15:30),42,iostat=ierr) (blankfits4-1)
-      else if (nint(mhead(mbitpix,1)) .eq. 8) then
-        write(unit=hmask(17) (15:30),42,iostat=ierr) blankfits1
-      else if (nint(mhead(mbitpix,1)) .lt. 0) then
-        write(unit=hmask(17), 45,iostat=ierr) ' '
-      else
-	call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
-      endif
-      write(unit=hmask(18) (15:30),40,iostat=ierr) tscale
-      write(unit=hmask(19) (15:30),40,iostat=ierr) tzero
-      write(unit=hmask(21) (15:30),40,iostat=ierr) zmin
-      write(unit=hmask(22) (15:30),40,iostat=ierr) zmax
-      if (cmhead(mtype1,1)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype2,1)(1:4) .eq. 'RA--' .or.
-     .    cmhead(mtype1,1)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype2,1)(1:4) .eq. 'HA--' .or.
-     .    cmhead(mtype1,1)(1:4) .eq. 'DEC-' .or.
-     .    cmhead(mtype2,1)(1:4) .eq. 'DEC-') then
-         if (mhead(mequinox,1) .eq. 0) mhead(mequinox,1) = 1950.0
-         write(unit=hmask(23) (15:30),40,iostat=ierr) mhead(mequinox,1)
-         hcmt = 24
-      else
-         do 102 i = 23, 34
-            hmask(i) = hmask(i+1)
- 102     continue
-         hmask(35)(9:9) = 'C'
-         hcmt = 23
-      endif
- 40   format(1pe16.9)
- 42   format(i16)
- 45   format(80a1)
-c
-      do 101 i = 1, min(7,mheadsize-mcomment+1)
-	       hmask(hcmt) (11+(i-1)*8:10+i*8) = cmhead(i-1+mcomment,1) 
-101	       continue
-c     Prepare the header using the template as a mask.
-c
-      stch = ' '
-      call pwrite(istch,n80)
-      stch ='Header = '
-      call pwrite(istch,n80)
-      do 2 i = 1, hcmt
-	stch = hmask(i)
-	call pwrite(istch,n80)
-2	continue
-      stch = ' '
-      call pwrite(istch,n80)
-c     Echo out the header record
-c
-      write(iiotmp,rec=1,iostat=ierr) hmask
-      if (ierr .ne. 0) 
-     .	call oerror(n355, m2, 'MWRITE: FITS file cannot be written to')
-c     Write the header first
-c	
-      maxrec = (n1*n2) / nwrds + 1
-      mleft = mod(n1*n2, nwrds)
-      if (mleft .ne. 0) maxrec = maxrec + 1
-      write(stch,fmt="(i5,a)") maxrec, ' records in FITS file'
-      call pwrite(istch,n80)
-c     Calculates how many records the data will occupy and how much of the
-c	last record the data will fill.
-c
-      do 92 irec = 2, maxrec
-	if (irec .eq. maxrec) then
-	   j = mleft
-	   do 901 i = mleft+1, nwrds
-		if (nint(mhead(mbitpix,1)) .eq. 16) then
-		   ldata2(i) = blankfits2 - 1
-		else if (nint(mhead(mbitpix,1)) .eq. 32) then
-		   ldata4(i) = blankfits4 - 1
-		else if (nint(mhead(mbitpix,1)) .eq. 8) then
-		   cdata1(i) = char(blankfits1)
-		else if (nint(mhead(mbitpix,1)) .eq. -32) then
-		   rdata4(i) = rnan
-		else if (nint(mhead(mbitpix,1)) .eq. -64) then
-		   rdata8(i) = dnan
-      		else
-	   	   call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
-		endif
-901		continue
-	else
-	   j = nwrds
-	endif
-c	If it is the last record, reset the number of data values to use
-c	from the matrix as well as zeroing out unused portion of the
-c	last record.
-c
-	do 91 i = 1, j
-	   i4 = long(i) + nwrds*long(irec-2)
-	   if (nint(mhead(mbitpix,1)) .eq. 16) then
-	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
-			ldata2(i) = blankfits2 - 1
-	   	else
-	        	ldata2(i) = (mdata(i4) - tzero)/tscale
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. 32) then
-	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
-			ldata4(i) = blankfits4 - 1
-	   	else
-	        	ldata4(i) = (mdata(i4) - tzero)/tscale
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. 8) then
-	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
-			cdata1(i) = char(blankfits1)
-	   	else
-	        	cdata1(i) = char((mdata(i4)-tzero)/tscale)
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. -32) then
-	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
-			rdata4(i) = rnan
-	   	else
-	        	rdata4(i) = (mdata(i4)-tzero)/tscale
-	   	endif
-	   else if (nint(mhead(mbitpix,1)) .eq. -64) then
-	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
-			rdata8(i) = dnan
-	   	else
-	        	rdata8(i) = (mdata(i4)-tzero)/tscale
-	   	endif
-      	   else
-	   	call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
-	   endif
-91	   continue
-c	Scale the data (if it is DEFINED) from R*4 to I*2/4 and store in
-c	 output buffer
-c
-	if (nint(mhead(mbitpix,1)) .eq. 16) then
-		write(iiotmp,rec=irec,iostat=ierr) ldata2
-	else if (nint(mhead(mbitpix,1)) .eq. 32) then
-		write(iiotmp,rec=irec,iostat=ierr) ldata4
-	else if (nint(mhead(mbitpix,1)) .eq. 8) then
-		write(iiotmp,rec=irec,iostat=ierr) cdata1
-	else if (nint(mhead(mbitpix,1)) .eq. -32) then
-		write(iiotmp,rec=irec,iostat=ierr) rdata4
-	else if (nint(mhead(mbitpix,1)) .eq. -64) then
-		write(iiotmp,rec=irec,iostat=ierr) rdata8
-      	else
-	   	call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
-	endif
-	if (ierr .ne. 0)
-     .	   call oerror(n355,m2,'MWRITE: Cannot write to FITS file')
-92	continue
-c     Write the records out.
-c
-      close(iiotmp,iostat=ierr)
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/plot.f unipops-3.6/source/conline/condar/plot.f
--- 3.5/source/conline/condar/plot.f	2000-03-16 11:37:22.000000000 -0700
+++ unipops-3.6/source/conline/condar/plot.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,385 +0,0 @@
-      subroutine plot(nchan)
-c
-c     @(#)plot.f	5.2 08/21/96
-c
-c     Plots YDATA versus XDATA for NCHAN values of XDATA and YDATA
-c
-c
-      include 'core.inc'
-      include 'appl.inc'
-c
-      integer*2 nchan, iplt, ix, i, ipuf(4), ilen, lastblnk, ier, iy,
-     .		short, mint, idely, nxl, nyl, itemp, ipixel, sclc, idelx
-      integer*2 m2, n1, n2, n5, n8, n12, n14, n20, n30, n33, 
-     .          n55, n219, n220, n10, curcur, npp1
-      character*10 getformat, format
-      integer*4 ibx, iby, ix4, iy4
-      character*8 cpuf
-      character*2 ctemp
-      real*4 ybtm, ytop, ylog, yval, dy, ymax1, ylow2, fupy, xmx, xmn,
-     .	     fy1, dfy1, ymax2, ymin1, fy2, dfy2, ymin2, yf, yl
-      real*4 xlft, xrght, xlog, xval, dx, xmax1,xlow2, fupx, ymn, ymx,
-     .	     fx1, dfx1, xmax2, xmin1, fx2, dfx2, xmin2, xf, xl, aa
-      logical okreal4, placenxt
-c
-      data m2, n1, n2, n5, n8, n12, n14, n20, n30, n33, 
-     .          n55, n219, n220, n10
-     .     /-2, 1, 2, 5, 8, 12, 14, 20, 30, 33, 55, 219, 220, 10/
-c
-      equivalence (cpuf, ipuf), (itemp, ctemp)
-c
-      mint(aa) = nint(aa-0.4999999)
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-c     Truncation and scaling functions
-c
-      npp1 = curcur()
-      IX0=XORG(npp1) + sclfctx*140
-      IY0=YORG(npp1) + sclfcty*150
-      IXM=XMAX(npp1) - sclfctx*40
-      IYM=YMAX(npp1) - sclfcty*60
-c     Plot limits
-c
-      IPLT=SPLT
-c     iplt = plot type (LINE or POINTS)
-c
-c     Plot Border
-c
-      CALL PLACE (IX0,IY0)
-      CALL VCTR	 (IXM,IY0)
-      CALL VCTR	 (IXM,IYM)
-      CALL VCTR	 (IX0,IYM)
-      CALL VCTR	 (IX0,IY0)
-c
-c     Calculate and Draw X - tick marks
-c
-      xlft = xmnp
-      xrght = xmxp  
-      if (xlft .eq. xrght) then
-	  xlft = 1.e34
-	  xrght = -1.e34
-	  do 802 i = 1, nchan
-	     if (okreal4(xdata(i))) then
-	 	 xlft = min(xlft, xdata(i))
-	 	 xrght = max(xrght, xdata(i))
-	     endif
-802	     continue
-      endif
-c     XLFT, XRGHT = The minimum and maximum plot limits either specified
-c     by the user or calculated from the min/max of the values of XDATA.
-c
-      if (xlog .gt. 0.5) then
-	xmax1 = max(xlft, xrght)
-	xmin1 = min(xlft, xrght)
-	if(xmin1 .lt. 0) call oerror(n220, m2, 'PLOT')
-	nxl = 9
-	fx1 = 10.**(mint(alog10(xmax1)))
-	fx2 = 10.**(mint(alog10(xmin1)))
-c
-8019	  continue
-	  dx = 9.0 / nxl
-	  dfx1 = fx1 * dx
-	  dfx2 = fx2 * dx
-	  xmax2 = xmax1 - mod(xmax1-fx1, dfx1)
-	  if (xmax2 .lt. xmax1) xmax2 = xmax2 + dfx1
-	  xmin2 = xmin1 - mod(xmin1 - fx2, dfx2)
-	  limx = nxl * nint( alog10(fx1/fx2)) + nint( (xmax2-fx1)/dfx1) -
-     .		nint( (xmin2-fx2)/dfx2)
-	  if (limx .lt. 3) then
-	     nxl = 2 * nxl
-	     goto 8019
-	  else if (limx .gt. 10 .and. nxl .gt. 1) then
-	     nxl = nxl / 3
-	     goto 8019
-	  endif
-c
-	if (xlft .gt. xrght) then
-	   xrght = xmin2
-	   xlft = xmax2
-	else
-	   xrght = xmax2
-	   xlft = xmin2
-	endif
-c
-        xlow2 = min(xlft, xrght)
-	xmx = alog10(xrght)
-	xmn = alog10(xlft)
-	fupx = fx2*10.
-	limx = min(maxregn, limx)
-c
-      else
-c
-	call tickmrk( xlft, xrght, n10, xf, xl, dx, limx)
-	xmx = xrght
-	xmn = xlft
-c
-      endif
-c
-      ax(npp1) = float(ixm-ix0)/(xmx - xmn)
-      bx(npp1) = ix0 - xmn*ax(npp1)
-c     Store away AX, BX, etc. for use by other routines.
-c
-      idelx = 1
-29    if ( idelx*(ixm - ix0 + 1)/(limx+1) .le. sclchar*10*14 .and. 
-     .     idelx .lt. limx-1) then
-	idelx = idelx * 2
-	goto 29
-      endif
-c     Prevents overlapping x labels
-c
-      do 805 i = 1, limx
-	if (xlog .gt. 0.5) then
-	   xlow2 = xlow2 + dfx2
-	   if (abs(fupx-xlow2) .lt. 0.5*dfx2) then
-		xlow2 = fupx
-		fupx = fupx*10.
-		dfx2 = dfx2*10.
-	   endif
-	   ix = nint(alog10(xlow2)*ax(npp1)+bx(npp1))
-	else
-	   xlow2 = xf + dx*(i-1)
-	   ix = nint(xlow2*ax(npp1)+bx(npp1))
-	endif
-c	Bump up the value for XLOW2 for next tick mark
-c
-	rixt(i) = ix
-	call place(ix, iy0)
-	call vctr(ix, iy0+sclc(n12))
-	call place(ix, iym)
-	call vctr(ix, iym - sclc(n12))
-c
-	if (slabel .gt. 0.0 .and. sclchar .ne. 1.) call charsize(sclchar) 
-c
-	if (slabel .gt. 0.0 .and. mod(i-1,idelx) .eq. 0) then
-c	   Label tick mark if desired and label wont overlap previous one.
-c
-	   call place(ix, iy0)
-	   call vctr(ix, iy0+sclc(n20))
-	   call place(ix, iym)
-	   call vctr(ix, iym - sclc(n20))
-           format = getformat(xlow2, 2.*xlow2, n8)
-	   write(cpuf, format,iostat=ier) xlow2
-	   call place(ix-sclc(n8*n14/n2), iy0-sclc(n30))
-	   call pchar(ipuf, n8)
-        endif
-c	Draw tick marks and x-axis labels
-c
-805     continue
-c
-c     Calculate and Draw Y - tick marks
-c
-      ybtm = ymnp
-      ytop = ymxp  
-      if (ybtm .eq. ytop) then
-	  ybtm = 1.e34
-	  ytop = -1.e34
-	  do 801 i = 1, nchan
-	     if (okreal4(ydata(i))) then
-	 	 ybtm = min(ybtm, ydata(i))
-	 	 ytop = max(ytop, ydata(i))
-	     endif
-801	     continue
-      endif
-c     Do the same for the y-axis
-c
-      if (ylog .gt. 0.5) then
-	ymax1 = max(ybtm, ytop)
-	ymin1 = min(ybtm, ytop)
-	if(ymin1 .lt. 0) call oerror(n219, m2, 'PLOT')
-	nyl = 9
-	fy1 = 10.**(mint(alog10(ymax1)))
-	fy2 = 10.**(mint(alog10(ymin1)))
-c
-8020	  continue
-	  dy = 9.0 / nyl
-	  dfy1 = fy1 * dy
-	  dfy2 = fy2 * dy
-	  ymax2 = ymax1 - mod(ymax1-fy1, dfy1)
-	  if (ymax2 .lt. ymax1) ymax2 = ymax2 + dfy1
-	  ymin2 = ymin1 - mod(ymin1 - fy2, dfy2)
-	  limy = nyl * nint( alog10(fy1/fy2)) + nint( (ymax2-fy1)/dfy1) -
-     .		nint( (ymin2-fy2)/dfy2)
-	  if (limy .lt. 3) then
-	     nyl = 2 * nyl
-	     goto 8020
-	  else if (limy .gt. 10 .and. nyl .gt. 1) then
-	     nyl = nyl / 3
-	     goto 8020
-	  endif
-c
-	if (ybtm .gt. ytop) then
-	   ytop = ymin2
-	   ybtm = ymax2
-	else
-	   ytop = ymax2
-	   ybtm = ymin2
-	endif
-c
-        ylow2 = min(ybtm, ytop)
-	ymx = alog10(ytop)
-	ymn = alog10(ybtm)
-	fupy = fy2*10.
-	limy = min(maxregn, limy)
-c
-      else
-c
-	call tickmrk( ybtm, ytop, n10, yf, yl, dy, limy)
-	ymx = ytop
-	ymn = ybtm
-c
-      endif
-c
-      ay(npp1) = float(iym-iy0)/(ymx - ymn)
-      by(npp1) = iy0 - ymn*ay(npp1)
-c     Store away AY, BY, etc. for use by other routines.
-c
-      idely = 1
-39    if ( idely*(iym - iy0 + 1)/(limy+1) .le. sclchar*25 .and. 
-     .     idely .lt. limy-1) then
-	idely = idely * 2
-	goto 39
-      endif
-c     Prevent overlapping y labels
-c
-      do 806 i = 1, limy
-	if (ylog .gt. 0.5) then
-	   ylow2 = ylow2 + dfy2
-	   if (abs(fupy-ylow2) .lt. 0.5*dfy2) then
-		ylow2 = fupy
-		fupy = fupy*10.
-		dfy2 = dfy2*10.
-	   endif
-	   iy = nint(alog10(ylow2)*ay(npp1)+by(npp1))
-	else
-	   ylow2 = yf + dy*(i-1)
-	   iy = nint(ylow2*ay(npp1)+by(npp1))
-	endif
-c	Bump up the value for YLOW2 for next tick mark
-c
-	riyt(i) = iy
-	call place(ix0, iy)
-	call vctr(ix0+sclc(n12), iy)
-	call place(ixm, iy)
-	call vctr(ixm-sclc(n12), iy)
-c
-	if (slabel .gt. 0.0 .and. mod(i-1,idely) .eq. 0) then
-	   call place(ix0, iy)
-	   call vctr(ix0+sclc(n20), iy)
-	   call place(ixm, iy)
-	   call vctr(ixm-sclc(n20), iy)
-           format = getformat(ylow2,2.*ylow2, n8)
-	   write(cpuf, format,iostat=ier) ylow2
-	   call place(ix0-sclc(n8*n14), iy-sclc(n12))
-	   call pchar(ipuf, n8)
-  	endif
-c	Draw tick marks and y-axis labels
-c
-806     continue
-c
-C     Plot Spectra
-c
-      placenxt = .true.
-      do 803 i = 1, nchan
-	xval = xdata(i)
-	yval = ydata(i)
-	if (.not. okreal4(xval) .or. .not. okreal4(yval)) then
-		placenxt = .true.
-		goto 803
-	endif
-	if (xlog .gt. 0.5) xval = alog10(xval)
-	if (ylog .gt. 0.5) yval = alog10(yval)
-	ix4 = xval*ax(npp1)+bx(npp1)
-	iy4 = yval*ay(npp1)+by(npp1)
-	if (ix4 .ge. ix0 .and. ix4 .le. ixm .and. iy4 .ge. iy0
-     .	    .and. iy4 .le. iym) then
-           ix = ix4
-           iy = iy4
-	   if (iplt .eq. 0) then
-	      if (placenxt) then
-		call placewp(ix, iy, n33)
-	      else
-		call vctrwp(ix, iy, n33, sclchar, 0.)
-	      endif
-	   else
-		call place(ix-sclc(n5), iy)
-		call vctr(ix+sclc(n5), iy)
-		call place(ix, iy-sclc(n5))
-		call vctr(ix, iy+sclc(5))
-	   endif
-	else
-           ix = max(ix0,min(ix4, float(ixm)))
-           iy = max(iy0,min(iy4, float(iym)))
-	   call placewp(ix, iy, n33)
-	endif
-      	placenxt = .false.
-803	continue
-c
-      if (slabel .gt. 0.0) then
-	ilen = lastblnk(ctitle)
-        if (ilen .gt.0) then
-	  call place( (ixm+ix0)/n2-sclc(ilen*n14/n2), iym+sclc(n5))
-	  call pchar(ctitle, ilen)
-        endif
-        ilen = lastblnk(cxtitle)
-        if (ilen .gt. 0) then	
-	  call place( (ixm+ix0)/n2-sclc(ilen*n14/n2), iy0-sclc(n55))
-	  call pchar(cxtitle, ilen)
-        endif
-        ilen = lastblnk(cytitle)
-        if (ilen .gt. 0) then
-	    call place(ix0-sclc(n8*n14), (iy0+iym-sclc(n14*ilen))/n2)
-	    call vchar(cytitle, ilen, .true.)
-807	    continue
-        endif
-	if (sclchar .ne. 1.) call charsize(1.)
-      endif
-c     Write out X, Y and plot labels.
-c
-      IF (ZLLINE.ge.1.0 .and. ylog .lt. 0.5) then
-	 IBY=nint(by(npp1))
-	 if (iby .ge. iy0 .and. iby .le. iym) then
-	   CALL PLACE (IX0,short(IBY))
-	   CALL VCTR  (IXM,short(IBY))
-	 endif
-      endif
-c     Draw y=0 line
-c
-      DO 40 I = 1, maxmrk
-	if (hmark(i) .le. -999999.0) goto 401
-	 if (ylog .lt. 0.5) then
-	     IbY = hmark(i)*ay(npp1)+by(npp1) + 0.5
-	 else
-	     if (hmark(i) .gt. 0.) then
-		iby = alog10(hmark(i))*ay(npp1)+by(npp1) + 0.5
-	     else
-		iby = 0
-	     endif
-	 endif
-	 if (iby .ge. iy0 .and. iby .le. iym) then
-            CALL PLACE(IX0,short(IbY))
-            CALL VCTR (IXM,short(IbY))
-	 endif
-  40     CONTINUE
-c        Draw temperatue markers
-c
-401    DO 41 I = 1, maxmrk
-	 if (cmark(i) .le. -999999.0) goto 411
-	 if (xlog .lt. 0.5) then
-	     IbX = cmark(i)*ax(npp1)+bx(npp1) + 0.5
-	 else
-	     if (cmark(i) .gt. 0.) then
-		ibx = alog10(cmark(i))*ax(npp1)+bx(npp1) + 0.5
-	     else
-		ibx = 0
-	     endif
-	 endif
-	 if (ibx .ge. ix0 .and. ibx .le. ixm) then
-	    CALL PLACE (short(IbX),IYM)
-	    CALL VCTR  (short(IbX),IY0)
-	 endif
-  41     CONTINUE
-c        Draw channel markers
-c
-411   continue
-c
-99    return
-      end
diff -uNr 3.5/source/conline/condar/pltdots.f unipops-3.6/source/conline/condar/pltdots.f
--- 3.5/source/conline/condar/pltdots.f	2000-03-16 11:37:24.000000000 -0700
+++ unipops-3.6/source/conline/condar/pltdots.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,69 +0,0 @@
-      subroutine pltdots (z, isize, jsize, type, undefwp)
-c
-c     @(#)pltdots.f	5.1 06/22/94
-c
-c     Draws a symbol wherever in array z there is a defined or
-c     undefined data point.
-c
-c     z (isize, jsize) = (R*4) Array to be gray-scaled.
-c     isize = (I*4) First dimension limit of z.
-c     jsize = (I*4) Second dimension limit of z.
-c     types = (I*2) = 0 or 1 for a dot at undefined points, 2 for +
-c		    = -1 for a dot at defined point, -2 for a + 
-c     undefwp = (R*4) Undefined data value
-c
-c     Only works on the area of the plot defined by (imin,imax), (jmin,jmax)
-c     (set in COMMON / MAPPL / ).
-c
-      integer*4 isize, jsize
-      integer*2 type, curcur
-      real*4 z(isize, jsize), undefwp
-c
-      include 'mappl.inc'
-      include 'appl.inc'
-c
-      integer*4 i, j
-      integer*2 xl0, yb0, ipixel, sclc
-      integer*2 m3, n1, n5, n120
-c
-      data m3, n1, n5, n120 /-3, 1, 5, 120/
-c       
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-c
-      if (isize .lt. 0 .or. jsize .lt. 0) 
-     .		call oerror(n120, m3, 'PLTDOTS: bad array dimensions')
-c
-      do 800 i = imin, imax
-	 do 700 j = jmin, jmax
-c
-	   if ( (z(i,j) .ne. undefwp .and. type .lt. 0) .or. 
-     .		(z(i,j) .eq. undefwp .and. type .ge. 0) ) then
-c
-	     xl0 = nint(float(i)*ax(curcur())+bx(curcur()))
-	     yb0 = nint(float(j)*ay(curcur())+by(curcur()))
-c
-	     if (abs(type) .le. 1) then
-		call place(xl0,yb0)
-		call vctr(xl0,yb0)
-c    		Draw a dot
-c
-	     else
-c
-      		CALL PLACE (xl0-sclc(n5),yb0)
-      		CALL VCTR (xl0+sclc(n5),yb0)
-      		CALL PLACE (xl0,yb0-sclc(n5))
-     		CALL VCTR(xl0,yb0+sclc(n5))
-c    		Draw plus sign
-c
-	     endif
-c
-           endif
-c	 
-700	   continue
-800	 continue
-c
-      return
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/posstring.f unipops-3.6/source/conline/condar/posstring.f
--- 3.5/source/conline/condar/posstring.f	2000-03-16 11:37:25.000000000 -0700
+++ unipops-3.6/source/conline/condar/posstring.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,60 +0,0 @@
-      subroutine posstring (pos, iflag, string)
-c---------------------------------------------------------------
-c @(#)posstring.f	5.1 06/22/94
-c
-c             Writes position POS assumed to be
-c             decimal degrees in string STRING according to IFLAG.
-c
-c        IFLAG:
-c               1    RA
-c               2    DEC
-c               3    galactic az-ell
-c----------------------------------------------------------------
-      integer*2 iflag, idd, imm, iss
-      real*4 pos, dd, ss, mm
-      character*12 string
-      character*1 minus
-      data minus /'-'/
-c
-c				Types 1 and 2, pull out mins and seconds
-      if (iflag .lt. 3) then
-         dd = abs(pos)
-         if (iflag .eq. 1) dd = dd / 15.0
-c
-         idd = ifix(dd)
-         mm = (dd - float(idd)) * 60.0
-         imm = ifix(mm)
-         ss = (mm - float(imm)) * 60.0
-         iss = nint(ss)
-         if (iflag .eq. 1 .and. ss .ge. 59.95) then
-            ss = 0.0
-            imm = imm + 1
-         else if (iflag .eq. 2 .and. iss .ge. 60) then
-            iss = 0
-            imm = imm + 1
-         end if
-         if (imm .ge. 60) then
-            imm = 0
-            idd = idd + 1
-         end if
-c				write it out
-         if (iflag .eq. 1) then
-            if (ss .lt. 9.95) write(string,1000) idd, imm, ss
-            if (ss .ge. 9.95) write(string,1005) idd, imm, ss
-         else
-            write(string,1010) idd, imm, iss
-         end if
-         if (pos .lt. 0) write(string(2:2), 1020) minus
-      else
-c				galactic and az-el, just write them out
-         write(string,1030) pos
-      end if
-c
-      return
-C---------------------------------------------------------------
- 1000 format(2x,i2.2,x,i2.2,x,'0',f3.1)
- 1005 format(2x,i2.2,x,i2.2,x,f4.1)
- 1010 format(2x,i2.2,x,i2.2,x,i2.2,2x)
- 1020 format(a1)
- 1030 format(x,f8.4,3x)
-      end
diff -uNr 3.5/source/conline/condar/prep.f unipops-3.6/source/conline/condar/prep.f
--- 3.5/source/conline/condar/prep.f	2000-03-16 11:37:25.000000000 -0700
+++ unipops-3.6/source/conline/condar/prep.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,125 +0,0 @@
-      SUBROUTINE PREP (ierr)
-C-------------------------------------------------------------------------------
-C  @(#)prep.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C
-      integer*2 iptwh, i, nleft, is, ie, j, ierr, bregtmp(32)
-      INTEGER*4 ISTART, ISTOP, nseg, tseg, xtmp, jj
-      logical okreal4
-c
-      INCLUDE 'cform.inc'
-      include 'core.inc'
-      INCLUDE 'appl.inc'
-      include 'cio.inc'
-C
-C=======================================================================
-C
-      IPTWH = 1
-      ierr = 0
-c
-      istart = dtwh(c12spn,iptwh)
-      istop = istart + dtwh(c12ni,iptwh) - 1
-      if (istart .ge. istop) then
-	ierr = 225
-	goto 99
-      endif
-c
-      do 10 i = 1, maxregn
-   10    BREG(I)=0
-c
-      IF (NREGON(1).eq.0) then
-	 nleft = istop-istart-edrop-bdrop+1
-	 if (bdrop.lt.0 .or. edrop.lt.0 .or. nleft.le.0) then
-	   ierr = 288
-	   goto 99
-	 endif 
-	 nleft = nleft - bbase - ebase
-	 if(bbase.lt.0. .or. ebase.lt.0 .or. nleft.lt.0) then
-	   ierr = 287
-	   goto 99
-	 endif 
-         BREG(1) = nint(DTWH(C12SPN,IPTWH) + BDROP)
-         BREG(2) = BREG(1) + nint(BBASE) - 1
-         BREG(4)=nint(DTWH(C12SPN,IPTWH) +  DTWH(C12NI,IPTWH)) - 
-     .           EDROP - 1
-         BREG(3)=BREG(4)-nint(EBASE) + 1
-      else
-         nseg = 0
-         do 15 i = 1, maxregn, 2
-	    if (nregon(i).ne.0.0) then
-              nseg = nseg + 1
-              IF (NREGON(I+1).lt.NREGON(I)) then
-                 breg(nseg*2-1) = nint(nregon(i+1))
-                 breg(nseg*2) = nint(nregon(i))
-              else if (nregon(i+1) .gt. nregon(i)) then
-                 breg(nseg*2-1) = nint(nregon(i))
-                 breg(nseg*2) = nint(nregon(i+1))
-              else
-                 ierr = 233
-                 goto 99
-	      endif
-	      if (breg(nseg*2-1).lt.istart.or.
-     .             breg(nseg*2).gt.istop) then
-	   	ierr = 233
-	   	goto 99
-	      endif 
-	    endif
-15	 continue
-      endif
-c			the individual regions are correct, now sort
-c			the regions so they are increasing order
-c			use a bridge hand sort
-      bregtmp(1) = breg(1)
-      bregtmp(2) = breg(2)
-      tseg = 1
-      if (nseg .ge. 2) then
-         do 160 i = 2, nseg
-            xtmp = breg(i*2-1)
-            do 161 j = 1, tseg
-               if (xtmp .lt. bregtmp(j*2-1)) goto 162
- 161        continue
-c				it belongs at location j, insert it
- 162        if (tseg .ge. j) then
-               do 163 jj = tseg, j, -1
-                  bregtmp(jj*2+1) = bregtmp(jj*2-1)
-                  bregtmp(jj*2+2) = bregtmp(jj*2)
- 163           continue
-            endif
-            bregtmp(j*2-1) = breg(i*2-1)
-            bregtmp(j*2) = breg(i*2)
-            tseg = tseg + 1
- 160     continue
-      endif
-c			copy it back to breg, checking for overlap
-      breg(1) = bregtmp(1)
-      do 164 i = 2, nseg*2
-         breg(i) = bregtmp(i)
-         if (breg(i) .le. breg(i-1)) then
-c			an overlap is present, quit
-            ierr = 236
-            goto 99
-         endif
- 164  continue
-c
-      IBASE=0
-      do 18 i = 1, maxregn, 2
-	 if (breg(i).eq.0) goto 18
-	 is = breg(i)
-	 ie = breg(i+1) 
-	 DO 19 J=IS,IE
-	    if (okreal4(TWH(J+idatoff,IPTWH))) then
-		IBASE=IBASE+1
-	    	XDATA(IBASE)=FLOAT(J + idatoff)
-	    	YDATA(IBASE)=TWH(J+idatoff,IPTWH)
-	    endif
-   19	    CONTINUE
-  18	 CONTINUE
-c
-      goto 999
-c
-  99  CONTINUE
-      do 90 i = 1, maxregn
-   90    BREG(I)=0
- 999  if (ibase .eq. 0) ierr = 268
-      RETURN
-      END
diff -uNr 3.5/source/conline/condar/progname.F unipops-3.6/source/conline/condar/progname.F
--- 3.5/source/conline/condar/progname.F	2000-03-16 11:37:26.000000000 -0700
+++ unipops-3.6/source/conline/condar/progname.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      subroutine progname(char2)
-C-------------------------------------------------------------------------------
-C  @(#)progname.F	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Returns the initial for the program being run (e.g., L, C, or G)'
-c
-      character*2 char2
-c
-#ifdef CONTINUUM
-      char2 = 'Cc'
-#else
-      char2 = 'Ll'
-#endif
-c
-      return
-      end
-c
-
diff -uNr 3.5/source/conline/condar/raster.f unipops-3.6/source/conline/condar/raster.f
--- 3.5/source/conline/condar/raster.f	2000-03-16 11:37:26.000000000 -0700
+++ unipops-3.6/source/conline/condar/raster.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,112 +0,0 @@
-      subroutine raster (z, isize, jsize, vals, hues, shds, 
-     .			 sats, nval, undefwp)
-c
-c     @(#)raster.f	5.1 06/22/94
-c
-c     Color raster graphing of array z.  Only works for the graphics screen.
-c
-c     z(isize, jsize) = (R*4) Array to be colored in
-c     isize = (I*4) First dimension of Z
-c     jsize = (I*4) Second dimension of Z
-c     vals(nval) = (R*4) Array containing the z-values at which a break
-c		   in color should occur
-c     hues(nval) = (R*4) Array containing the hues to be given (see below).
-c     shds(nval) = (R*4) Array containing the shades to be given
-c     sats(nval) = (R*4) Array containing the saturations to be given.
-c     nval = (I*4) Number of colors (1 < nval < 255)
-c
-c     If z(i,j) <= vals(1), where i = imin, imax and j = jmin, jmax (set in
-c     COMMON / MAPPL/ ), then the pixels representing the position of
-c     z(i, j) are set to the color defined by hues(1), shds(1), sats(1).
-c
-c     If vals(i) < z(i,j) <= vals(i+1), then the pixels are set to the color
-c     defined by hues(i+1), shds(i+1), sats(i+1).
-c
-c     If z(i,j) > vals(nval - 1) then the color hues(nval), shds(nval), 
-c     sats(nval) is used.  The actually value for vals(nval) is never used
-c     and can be arbitrary.
-c
-c     The scheme by which colors are chosen is described in COLOR.  Since
-c     RASTER calls COLOR nval times, 127-nval open color slots remain for
-c     the user to do the rest of graphing before or after calling RASTER.
-c
-c     CAUTION: vals(i+1) must be greater than vals(i)
-c 
-      integer*2 nval 
-      integer*4 isize, jsize
-      real z(isize, jsize), vals(nval), undefwp, hues(nval), 
-     .     shds(nval), sats(nval)
-c
-      include 'mappl.inc'
-      include 'appl.inc'
-c
-      real xl0, yb0, xlmin, xlmax, ybmin, ybmax
-      integer*2 k, i, j, nx, ny, ixl, iyb, ixr, iyt, idm, color, curcur
-      integer*2 m3, m2, n120, n259
-c
-      data m3, m2, n120, n259 /-3, -2, 120, 259/
-c
-      if (nval .le. 0) 
-     .		call oerror(n259,m2, 'RASTER: All LEVS < -999999')
-      if (isize .lt. 0 .or. jsize .lt. 0) 
-     .		call oerror(n120, m3, 'RASTER: bad array dimensions')
-c
-      do 20 k = 2, nval-1
-	if(vals(k-1) .ge. vals(k) ) 
-     .		call oerror(n259, m2, 'RASTER: Not in ascending order')
-20	continue
-c
-      do 30 k = 1, nval
-	idm = color(hues(k),shds(k),sats(k))
-30	continue
-c     Set up color table
-c
-      nx = nint(ax(curcur()))
-      ny = nint(ay(curcur()))
-c     Calculate size of cell
-c
-      xlmin = float(imin)*ax(curcur())+bx(curcur())
-      xlmax = float(imax)*ax(curcur())+bx(curcur())
-      ybmin = float(jmin)*ay(curcur())+by(curcur())
-      ybmax = float(jmax)*ay(curcur())+by(curcur())
-c     Find corners of plot
-c
-      do 500 i = imin, imax
-	do 450 j = jmin, jmax
-c
-	 if (z(i,j) .ne. undefwp) then
-c
-	   if (z(i,j) .le. vals(1) ) then 
-		k = 0
-	   else
-	        do 300 k = 1, nval-2
-	           if (z(i,j) .gt. vals(k) .and. 
-     .		       z(i,j) .le. vals(k+1)) goto 400
-300	           continue
-		k = nval - 1
-	   endif
-c	   Find out what colors to use for current cell
-c
-400	   idm = color(hues(k+1), shds(k+1), sats(k+1) )
-	   xl0 = float(i)*ax(curcur())+bx(curcur())
-	   yb0 = float(j)*ay(curcur())+by(curcur())
-	   ixl = nint ( max(xl0-float(nx)/2.,xlmin))
-	   iyb = nint ( max(yb0-float(ny)/2.,ybmin))
-	   ixr = nint ( min(xl0+float(nx)/2.,xlmax)) + 1
-	   iyt = nint ( min(yb0+float(ny)/2.,ybmax)) + 1
-	   call box(ixl, iyb, ixr, iyt)
-c	   Find pixel at lower left of cell and fill that cell up
-c		with appropriate color.
-c
-	   endif
-c
-450	 continue
-500	continue
-c
-      call revertcolor
-c     Return to the currently defined color
-c
-      return
-c    
-      end
-c
diff -uNr 3.5/source/conline/condar/raz.c unipops-3.6/source/conline/condar/raz.c
--- 3.5/source/conline/condar/raz.c	2000-03-16 11:37:27.000000000 -0700
+++ unipops-3.6/source/conline/condar/raz.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,262 +0,0 @@
-
-/* @(#)raz.c	5.2 08/12/98 */
-
-/* For non-USETUC use : */
-/* If USEPAD is definied before compilation, raz_ results */
-/* If USEPAD is UNDEFINIED -> unpadraz_ results */
-
-/* For USETUC use : */
-/* USETUC implies NO padding (USEPAD undefined) */
-/* tucraz_ is generated */
-
-/* undefine USEPAD if USETUC is definied, if necessary */
-
-#ifdef USETUC
-#  undef USEPAD
-#endif
-
-#include <sdd.h>
-
-#ifdef USETUC
-void tucraz_(ostruct)
-#else
-#  ifdef USEPAD 
-void raz_(ostruct)
-#  else
-void unpadraz_(ostruct)
-#  endif
-#endif
-sddformat *ostruct;
-
-{
-#define O ostruct->header
-int i,j;
-double dinf;
-float rinf;
-
-long int *xx;
-long int *yy;
-xx = (long *) &dinf;
-xx[0] = 0x7FF00000;
-xx[1] = 0x00000000; 
-/* xx[0] = 0x7FFFFFFF;
-xx[1] = 0x00000001; */
-yy = (long *) &rinf;
-yy[0] = 0x7F800000; 
-/* yy[0] = 0x7FFFFFFF; */
-
-O.number_header_class = NUMBER_HEADER_CLASS;
-O.class_location[0] = CLASS_0 + 1;
-O.class_location[1] = O.class_location[0] + CLASS_1;
-O.class_location[2] = O.class_location[1] + CLASS_2;
-O.class_location[3] = O.class_location[2] + CLASS_3;
-O.class_location[4] = O.class_location[3] + CLASS_4;
-O.class_location[5] = O.class_location[4] + CLASS_5;
-O.class_location[6] = O.class_location[5] + CLASS_6;
-O.class_location[7] = O.class_location[6] + CLASS_7;
-O.class_location[8] = O.class_location[7] + CLASS_8;
-#ifdef USEPAD
-O.class_location[9] = O.class_location[8] + CLASS_9 + SPARE_9;
-#else
-O.class_location[9] = O.class_location[8] + CLASS_9;
-#endif
-O.class_location[10] = O.class_location[9] + CLASS_10;
-O.class_location[11] = O.class_location[10] + CLASS_11;
-O.class_location[12] = O.class_location[11] + CLASS_12;
-O.class_location[13] = O.class_location[12] + CLASS_13;
-O.class_location[14] = O.class_location[13] + CLASS_14;
-
-O.header_length = (O.class_location[14] + CLASS_15  - 1) * 8;
-O.data_length = 0;
-O.scan_number = dinf;
-for (i=0;i<8;O.observer_initials[i++]=' ');
-for (i=0;i<16;O.observer_name[i++]=' ');
-for (i=0;i<8;O.telescope[i++]=' ');
-for (i=0;i<8;O.project_ident[i++]=' ');
-for (i=0;i<16;O.source_name[i++]=' ');
-for (i=0;i<8;O.type_data[i++]=' ');
-for (i=0;i<8;O.front_end_desc[i++]=' ');
-for (i=0;i<8;O.back_end_desc[i++]=' ');
-O.data_precision[0]='R';
-O.data_precision[1]='*';
-O.data_precision[2]='4';
-for (i=3;i<8;O.data_precision[i++]=' ');
-O.save_bin = dinf;
-O.nb_records = dinf;
-O.record_id = 0.;
-
-O.tot_azra_pointing = dinf;
-O.tot_eldec_pointing = dinf;
-O.user_azra_pointing= dinf;
-O.user_eldec_pointing = dinf;
-for (i=0;i<4;O.pointing_constant[i++]=dinf);
-O.orient_angle = dinf;
-O.radial_focus = dinf;
-O.north_south_focus = dinf;
-O.east_west_focus = dinf;
-for (i=0;i<8;O.pt_model[i++]=' ');
-
-O.ut_date = dinf;
-O.utime = dinf;
-O.lst = dinf;
-O.nb_receiv_channels = dinf;
-O.nb_sw_variables = dinf;
-O.nb_phases = dinf;
-O.length_cycle = dinf;
-O.length_sample = dinf;
-for (i=0;i<8;O.class11_type[i++]=' ');
-O.phase_id = 0.;
-
-O.epoch = dinf;
-O.sourcex = dinf;
-O.sourcey = dinf;
-O.referencex = dinf;
-O.referencey = dinf;
-O.epoch_ra = dinf;
-O.epoch_dec = dinf;
-O.galactic_l = dinf;
-O.galactic_b= dinf;
-O.azimuth = dinf;
-O.elevation = dinf;
-O.xposition = dinf;
-O.yposition = dinf;
-for (i=0;i<3;O.desc_origin[i++]=dinf);
-for (i=0;i<8;O.coord_sys_code[i++]=' ');
-
-O.amb_temp = dinf;
-O.pressure = dinf;
-O.relative_humidity = dinf;
-O.index_refraction = dinf;
-O.dew_point = dinf;
-O.mm_h2o = dinf;
-
-O.map_scan_angle = dinf;
-O.xposition_zero = dinf;
-O.yposition_zero = dinf;
-O.deltax_rate = dinf;
-O.deltay_rate = dinf;
-O.nb_grid_pt = dinf;
-O.x_grid_pt = dinf;
-O.y_grid_pt = dinf;
-O.x_grid_cell_nb = dinf;
-O.y_grid_cell_nb = dinf;
-for (i=0;i<8;O.xy_ref_frame_code[i++] = ' ');
-
-O.beam=dinf;
-O.off_scan_nb = dinf;
-O.bad_channel_value = dinf;
-O.velocity_correct = dinf;
-O.velocity_ref = dinf;
-for (i=0;i<8;O.velocity_def_ref[i++]=' ');
-for (i=0;i<8;O.type_calibration[i++]=' ');
-
-O.antenna_aperature_eff = dinf;
-O.antenna_beam_eff = dinf;
-O.antenna_gain = dinf;
-O.etal = dinf;
-O.etalfss = dinf;
-
-#ifdef USETUC
-   O.synth_freq = dinf;
-   O.lo_factor = dinf;
-   O.harmonic = dinf;
-   O.lo_if = dinf;
-   O.first_if = dinf;
-   O.ref_AZ_offset = dinf;
-   O.ref_EL_offset = dinf;
-   O.beam_throw = dinf;
-   O.beam_orient = dinf;
-   O.bl_offset = dinf;
-   O.obs_tol = dinf;
-   O.sideband = dinf;
-   O.wavelength = dinf;
-   O.gain_scan = dinf;
-   for (i=0;i<2;O.p_beam[i++] = dinf);
-   for (i=0;i<2;O.m_beam[i++] = dinf);
-   for (i=0;i<4;O.RA_DEC_offsets[i++] = dinf);
-   O.freq_off_signal = dinf;
-   O.freq_off_ref_1 = dinf;
-   O.freq_off_ref_2 = dinf;
-#else
-   O.l1 = dinf;
-   O.l1f1 = dinf;
-   O.l1f2= dinf;
-   O.l2 = dinf;
-   O.l2f1 = dinf;
-   O.l2f2 = dinf;
-   O.la = dinf;
-   O.lb = dinf;
-   O.lc = dinf;
-   O.ld = dinf;
-   O.level_correct = dinf;
-   for (i=0;i<2;O.pointing_fudge[i++] = dinf);
-   O.rho = dinf;
-   O.theta = dinf;
-   for (j=0;j<24;j++)
-   O.center_freq_formula[j]=' ';
-#endif
-
-for (i=0;i<80;O.open_param_values[i++]=' ');
-
-/*	the original class 11 is the default */
-
-for (j=0;j<22;j++) {
-   O.cl11.orig.ent[j].variable_value = dinf;
-   for (i=0;i<8;O.cl11.orig.ent[j].variable_desc[i++]=' ');
-   for (i=0;i<8;O.cl11.orig.ent[j].phase_table[i++]=' ');
-}
-
-O.obs_freq = dinf;
-O.rest_freq = dinf;
-O.freq_resolution = dinf;
-O.bandwidth = dinf;
-O.receiver_temp = dinf;
-O.calibration_temp = dinf;
-O.source_syst_temp = dinf;
-O.ref_sys_temp = dinf;
-O.source_temp = dinf;
-O.std_deviation_mean = dinf;
-O.ref_point_nb= 0.;
-O.xvalue_ref_pt = 0.;
-O.deltax = 0.;
-O.tot_integ_time = dinf;
-O.nb_integrations = 0.;
-O.starting_pt_nb = 1.;
-O.h2o_opacity = dinf;
-O.h2o_temp= dinf;
-O.o2_opacity = dinf;
-O.o2_temp = dinf;
-for (i=0;i<8;O.polarization[i++]=' ');
-O.effint = dinf;
-for (i=0;i<16;O.receiver_info[i++]=' ');
-
-O.nb_scans_stacked = 0.;
-O.f_scan_stack = dinf;
-O.l_scan_stack = dinf;
-O.line_amplitude = dinf;
-O.line_width = dinf;
-O.integrated_line_int = dinf;
-O.rms_noise = dinf;
-
-for (i=0;i<MAX_DATA_POINTS;ostruct->data[i++] = rinf); 
-
-#ifdef USEPAD
-for (i=0;i<SPARE_1;O.spares_1[i++]=dinf);
-for (i=0;i<SPARE_2;O.spares_2[i++]=dinf);
-for (i=0;i<SPARE_3;O.spares_3[i++]=dinf);
-for (i=0;i<SPARE_4;O.spares_4[i++]=dinf);
-for (i=0;i<SPARE_5;O.spares_5[i++]=dinf);
-for (i=0;i<SPARE_6;O.spares_6[i++]=dinf);
-for (i=0;i<SPARE_7;O.spares_7[i++]=dinf);
-for (i=0;i<SPARE_8;O.spares_8[i++]=dinf);
-#ifndef USETUC
-for (i=0;i<SPARE_9;O.spares_9[i++]=dinf);
-#endif
-for (i=0;i<SPARE_10;O.spares_10[i++]=dinf);
-for (i=0;i<SPARE_12;O.spares_12[i++]=dinf);
-for (i=0;i<SPARE_13;O.spares_13[i++]=dinf);
-for (i=0;i<SPARE_14;O.spares_14[i++]=dinf);
-#endif
-
-return;
-}
diff -uNr 3.5/source/conline/condar/readcube.f unipops-3.6/source/conline/condar/readcube.f
--- 3.5/source/conline/condar/readcube.f	2000-03-16 11:37:28.000000000 -0700
+++ unipops-3.6/source/conline/condar/readcube.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,323 +0,0 @@
-      subroutine readcube(filename)
-c
-c     @(#)readcube.f	5.5 05/06/98
-c
-c     Opens the FITS CUBE file with the name FILENAME and reads in the header.
-c
-      character*(*) filename
-c
-      character*80 head(36), hmask(36), stch
-      character*1023 headname, fullname
-      character*1 quote
-      logical lend, inquirefile
-      integer*2 ierr, j, i, ilen, irec, nv, kmax, maxrec, mleft, 
-     .		istch(40), lastblnk, k, blankfits2, blankfits1
-      integer*2 m1, m2, n80, n352, n357, n365
-      integer*4 n1, n2, n3, nwrds2, nwrds4, nwrds1, nwrds8, blankfits4
-      integer*4 nchars, oldfits, bp, iblank, ii
-      real*8 rmax1, rmax2, rmax4
-      real r_quiet_nan
-c
-      include 'mappl.inc'
-      include 'cio.inc'
-      include 'mform.inc'
-c
-      equivalence (istch,stch)
-c
-      parameter (rmax1 = 255.0d0)
-      parameter (rmax2 = 32767.0d0)
-      parameter (rmax4 = 2147483647.0d0)
-      parameter (nwrds1 = 2880)
-      parameter (nwrds2 = 1440)
-      parameter (nwrds4 = 720)
-      parameter (nwrds8 = 360)
-      parameter (blankfits4 = -2147483647)
-      parameter (blankfits2 = -32767)
-      parameter (blankfits1 = 1)
-c
-      data m1, m2, n80, n352, n357, n365 /-1, -2, 80, 352, 357, 365/
-      data quote /''''/
-c
-      call filecomp(filename, fullname)
-c
-      fcblank = r_quiet_nan
-c
-      ilen = lastblnk(dirprefix(1))
-      headname = dirprefix(1)(1:ilen) // '/utilities/head.mask'
-c     Get the file name of cube FITS template file
-c
-      open(unit=iiotmp,file=headname,access='sequential',
-     .		form='formatted',status='old',iostat=ierr)
-      if (ierr .ne. 0) 
-     .	call oerror(n352, m1, 'READCUBE: Template FITS-file not found')
-c
-      rewind(iiotmp,iostat=ierr)
-      if (ierr .eq. 0) read(iiotmp,10,iostat=ierr) hmask
-10    format(a)
-      if (ierr .ne. 0) 
-     .	 call oerror(n357,m1,
-     .          'READCUBE: Template FITS-file cannot be read')
-      close (iiotmp,iostat=ierr)
-c     Reads in cube FITS header template.  Program must know of any 
-c     changes to template.
-c
-      if (.not. inquirefile(fullname)) 
-     .	call oerror(n352,m2, 'READCUBE: FITS file does not exist')
-c
-      close(icube,iostat=ierr)
-      open(unit=icube, file=fullname, access='direct', 
-     .	form='unformatted', status='old',iostat=ierr,recl=2880)
-      if (ierr .ne. 0) 
-     .		call oerror(n352, m2, 'READCUBE: FITS file cannot be opened')
-c
-      lend = .false.
-      chead(ctzero) = 0.
-      chead(ctscale) = 1.
-c
-      chead(crval1) = 1.
-      chead(crval2) = 1.
-      chead(crval3) = 1.
-      chead(cnaxis1) = 0.
-      chead(cnaxis2) = 0.
-      chead(cnaxis3) = 0.
-      chead(cdelt1) = 1.
-      chead(cdelt2) = 1.
-      chead(cdelt3) = 1.
-      chead(cpix1) = 1.
-      chead(cpix2) = 1.
-      chead(cpix3) = 1.
-      chead(cequinox) = 0.0
-      chead(ctype1) = '        '
-      chead(ctype2) = '        '
-      chead(ctype3) = '        '
-      chead(cdate) = -1.0
-      chead(cobject) = '        '
-      chead(cobject+1) = '        '
-      chead(corigin) = '        '
-      chead(cbunit) = '        '
-      do 1011 i = 1, cheadsize-ccomment+1
-	cchead(i-1+ccomment) = '        '
-1011	continue
-c     Sets up defaults if the header doesn't contain the necessary
-c     information.  No gaurentees if one of the above is not in the header
-c
-      irec = 0
-c
-1       irec = irec + 1
-	write(stch,fmt="(a,i5,a)") 'Reading the ', irec, 
-     .			' header record from cube FITS file'
-	call pwrite(istch,n80)
-      	read(icube,rec=irec,iostat=ierr) head
-	if (ierr .ne. 0) call oerror(n357, m2, 'Cannot read from FITS file')
-c
- 	stch = ' '
-	call pwrite(istch,n80) 
-	do 2 i = 1, 33
-	   stch = head(i)
- 	   call pwrite(istch,n80)
-2	   continue
- 	stch = ' '
-	call pwrite(istch,n80)
-c	Echo out the header record 
-c
-	if (irec .eq. 1) then
-c	Certain things MUST be in the first record of the header.  Test that
-c	those things have the proper value.
-c
-	if (head(1)(1:30) .ne. hmask(1)(1:30)) 
-     .     call oerror(n365, m2, 'READCUBE: ----> '// head(1)(1:30))
-c
-	if (head(2)(1:10) .ne. hmask(2)(1:10)) then
-     	   call oerror(n365, m2, 'READCUBE: ----> '// head(2)(1:30))
-	else
-	   read(unit=head(2) (11:30), fmt=20, iostat=ierr) nv
-	   chead(cbitpix) = nv
-	endif
-c
-        bp = nint(chead(cbitpix))
-        if (bp .ne. 16 .and. bp .ne. 32 .and. bp .ne. 8 .and.
-     .       bp .ne. -32 .and. bp .ne. -64) then
-     	    call oerror(n365, m2, 'READCUBE: ----> '// head(2)(1:30))
-	endif
-c
-	if (head(3)(1:30) .ne. hmask(3)(1:30)) 
-     .	   call oerror(n365, m2, 'READCUBE: ----> '// head(3)(1:30))
-c       Checks for SIMPLE, BITPIX, NAXIS=2
-c
-	if (head(4)(1:10) .ne. hmask(4)(1:10)) then
-     	   call oerror(n365, m2, 'READCUBE: ----> '// head(4)(1:30))
-	else
-	   read(unit=head(4) (11:30),fmt=20, iostat=ierr) nv
-20    	   format(i20)
-	   chead(cnaxis1) = nv
-	endif
-	if (head(5)(1:10) .ne. hmask(5)(1:10)) then 
-     	   call oerror(n365, m2, 'READCUBE: ----> '// head(5)(1:30))
-	else
-	   read(unit=head(5) (11:30),fmt=20, iostat=ierr) nv
-	   chead(cnaxis2) = nv
-	endif
-	if (head(6)(1:10) .ne. hmask(6)(1:10)) then 
-     	   call oerror(n365, m2, 'READCUBE: ----> '// head(6)(1:30))
-	else
-	   read(unit=head(6) (11:30),fmt=20, iostat=ierr) nv
-	   chead(cnaxis3) = nv
-	endif
-c       Checks NAXIS1,NAXIS2,NAXIS3
-c
-        endif
-c             try and see if this is an old style unipops header
-c             this had the DATE keyword with the order of mm/dd reversed
-        oldfits = 0
-        if (head(2)(32:32) .eq. '/' .and.
-     +      head(2)(53:59) .eq. 'UniPops') then
-           oldfits = 1
-        endif
-c
-	do 50 j = 36, 1, -1
-	   if (hmask(36)(1:10) .eq. head(j)(1:10) ) then
-		stch = 'Last header record found'
-		call pwrite(istch, n80)
-		cnumhead = irec
-		kmax = j - 1
-		lend = .true.
-		goto 60
-	   endif
-50	   continue
-        kmax = 36
-c       Checks if this is the last header record
-c
-60      continue
-c
-        do 200 i = 1, 36
-	   do 100 j = 1, kmax
-	      if (hmask(i) (1:10) .eq. head(j) (1:10) ) then
-                if (i .eq. 7) cchead(ctype1) = head(j) (12:19)
-		if (i .eq. 12) cchead(ctype2) = head(j) (12:19)
-		if (i .eq. 17) cchead(ctype3) = head(j) (12:19)
-		if (i .eq. 23) then
-                   cchead(cobject) = head(j) (12:19) 
-                   if (head(j) (20:20) .ne. quote) 
-     .                 cchead(cobject+1) = head(j) (20:27)
-                endif
-		if (i .eq. 24) cchead(corigin) = head(j) (12:19) 
-		if (i .eq. 25) then 
-                   call fitskeyvalue(nchars, head(j), stch)
-                   call todate(nchars, stch, chead(cdate), oldfits)
-                endif
-		if (i .eq. 29) cchead(cbunit) = head(j) (12:19) 
-c
-      		if (i.eq.8) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(crval1)
-      		if (i.eq.9) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(cdelt1)
-		if (i.eq.10) read(unit=head(j)(11:30),40) chead(cpix1)
-      		if (i .eq. 13) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(crval2)
-      		if (i .eq. 14) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(cdelt2)
-		if (i .eq. 15) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(cpix2)
-      		if (i .eq. 18) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(crval3)
-      		if (i .eq. 19) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(cdelt3)
-		if (i .eq. 20) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(cpix3)
-      		if (i .eq. 26) then 
-c                       look for bad unipops BLANK values which may be
-c                       floating point values, watch for a "."
-                   do 405 ii=11,30
-                      if (head(j)(ii:ii) .eq. '.') goto 410
- 405               continue
- 410               if  (ii .le. 30) then
-                      read(unit=head(j)(11:30),45,iostat=ierr) fcblank
-                   else
-                      read(unit=head(j)(15:30),45,iostat=ierr) iblank
-                      fcblank = iblank
-                   endif
-                endif
-      		if (i .eq. 27) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(ctscale)
-      		if (i .eq. 28) read(unit=head(j)(11:30),40,iostat=ierr)
-     .							chead(ctzero)
-      		if (i .eq. 30) read(unit=head(j)(11:30),40,iostat=ierr) 
-     .							chead(ctmin)
-      		if (i .eq. 31) read(unit=head(j) (11:30),40,iostat=ierr) 
-     .							chead(ctmax)
-      		if (i .eq. 32) read(unit=head(j) (11:30),40,iostat=ierr) 
-     .							chead(cequinox)
- 40             format(1g20.0)
- 45             format(i16)
-c
-      		if (i .eq. 33) then
-		    do 101 k = 1, min(7,cheadsize-ccomment+1)
-		       cchead(k-1+ccomment) = head(j) (11+(k-1)*8:10+k*8)
-101		       continue
-		endif
-c
-	      endif
-100           continue
-200	   continue
-c	Stuffs the FITS header parameters into the matrix header parameters
-c
-        if ( .not. lend) goto 1
-c
-      stch = 'Checking input FITS header parameters'
-      call pwrite(istch,n80)
-      stch = ' '
-      call pwrite(istch,n80)
-c
-      n1 = nint(chead(cnaxis1))
-      n2 = nint(chead(cnaxis2))
-      n3 = nint(chead(cnaxis3))
-      if ( abs(nint(chead(cbitpix))) .eq. 16) then
-	maxrec = (n1*n2*n3) / nwrds2 + cnumhead
-        mleft = mod(n1*n2*n3, nwrds2)
-      else if ( abs(nint(chead(cbitpix))) .eq. 32) then
-	maxrec = (n1*n2*n3) / nwrds4 + cnumhead
-        mleft = mod(n1*n2*n3, nwrds4)
-      else if ( abs(nint(chead(cbitpix))) .eq. 64) then
-	maxrec = (n1*n2*n3) / nwrds8 + cnumhead
-        mleft = mod(n1*n2*n3, nwrds8)
-      else if ( abs(nint(chead(cbitpix))) .eq. 8) then
-	maxrec = (n1*n2*n3) / nwrds1 + cnumhead
-        mleft = mod(n1*n2*n3, nwrds1)
-      else
-     	call oerror(n365, m2, 'READCUBE: ----> CBITPIX')
-      endif
-      if (mleft .ne. 0) maxrec = maxrec + 1
-      write(stch,fmt="(i5,a)") maxrec, ' records in FITS file'
-      call pwrite(istch,n80)
-c     Calculates how many records the data will occupy and how much of the
-c	last record the data will fill.
-c			make sure equinox is set appropriately
-         if (chead(cequinox) .eq. 0 .and.
-     .       (cchead(ctype1)(1:4) .eq. 'DEC-' .or.
-     .        cchead(ctype2)(1:4) .eq. 'DEC-')) 
-     .      chead(cequinox) = 1950.0
-c
-      if (chead(ctscale) .eq. 0.) 
-     .		call oerror(n365, m2, 'READCUBE: Bad BSCALE')
-c
-      if ( nint(chead(cbitpix)) .eq. 16) then
-	chead(ctmin) = chead(ctzero) - rmax2*chead(ctscale)
-      	chead(ctmax) = chead(ctscale)*(2.*rmax2) + chead(ctmin)
-      else if ( nint(chead(cbitpix)) .eq. 32) then
-	chead(ctmin) = chead(ctzero) - rmax4*chead(ctscale)
-      	chead(ctmax) = chead(ctscale)*(2.*rmax4) + chead(ctmin)
-      else if ( nint(chead(cbitpix)) .eq. 8) then
-	chead(ctmin) = chead(ctzero)
-      	chead(ctmax) = chead(ctscale)*rmax1 + chead(ctmin)
-      else if ( nint(chead(cbitpix)) .ne. -32 .and. 
-     .          nint(chead(cbitpix)) .ne. -64) then
-     	call oerror(n365, m2, 'READCUBE: ----> CBITPIX')
-      endif
-c     Recalculate TMIN and TMAX from TSCALE and TZERO
-c
-      ccube = filename
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/rotate.f unipops-3.6/source/conline/condar/rotate.f
--- 3.5/source/conline/condar/rotate.f	2000-03-16 11:37:30.000000000 -0700
+++ unipops-3.6/source/conline/condar/rotate.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,94 +0,0 @@
-      subroutine rotate (z, z2, isize, jsize, invertxy, flipx, flipy)
-c
-c     @(#)rotate.f	5.1 06/22/94
-c
-c     Rotates and flips the matrix Z and places the results into
-c     matrix Z2.
-c
-c     z (isize, jsize) = (R*4) Input Array.
-c     z2 (isize, jsize) = (R*4) Output array
-c     isize = (I*4) First dimension limit of z
-c     jsize = (I*4) Second dimension limit of z
-c     flipx = (L) if TRUE, Flip X-axis
-c     flipy = (L) if TRUE, Flip Y-axis
-c     invertxy = (L) if TRUE, exchange X and Y axis
-c
-c     NOTE:  Flipping the x and y axis is performed before the exchanging of
-c	     X and Y axis.
-c
-      integer*4 isize, jsize
-      logical flipx, flipy, invertxy
-      real z(isize,jsize), z2(*)
-c
-      include 'mappl.inc'
-c
-      integer*4 i, j, inv, ninv, k, l
-c
-      inv(k,l) = l + jsize*(k-1)
-      ninv(k,l) = k + isize*(l-1)
-c
-      if (invertxy) then
-c
-	if (flipx .and. .not. flipy) then
-	  do 120 i = 1, isize
-	    do 110 j = 1, jsize
-		z2( inv(i,j) ) = z(i,jsize-j+1)
-110	        continue
-120	    continue
-	else if (flipy .and. .not. flipx) then
-	  do 140 i = 1, isize
-	    do 130 j = 1, jsize
-		z2( inv(i,j) ) = z(isize-i+1,j)
-130	        continue
-140	    continue
-        else if (.not. flipx .and. .not. flipy) then
-	  do 160 i = 1, isize
-	    do 150 j = 1, jsize
-		z2( inv(i,j) ) = z(i,j)
-150	        continue
-160	    continue
-        else
-c	  Flipping x and y
-	  do 180 i = 1, isize
-	    do 170 j = 1, jsize
-		z2( inv(i,j) ) = z(isize-i+1,jsize-j+1)
-170	        continue
-180	    continue
-	endif
-c
-      else
-c
-	if (flipx .and. .not. flipy) then
-	  do 20 i = 1, isize
-	    do 10 j = 1, jsize
-		z2( ninv(i,j) ) = z(isize-i+1,j)
-10	        continue
-20	    continue
-	else if (flipy .and. .not. flipx) then
-	  do 40 i = 1, isize
-	    do 30 j = 1, jsize
-		z2( ninv(i,j) ) = z(i,jsize-j+1)
-30	        continue
-40	    continue
-        else if (.not. flipx .and. .not. flipy) then
-	  do 60 i = 1, isize
-	    do 50 j = 1, jsize
-		z2( ninv(i,j) ) = z(i,j)
-50	        continue
-60	    continue
-        else
-c	  Flipping x and y
-	  do 80 i = 1, isize
-	    do 70 j = 1, jsize
-		z2( ninv(i,j) ) = z(isize-i+1,jsize-j+1)
-70	        continue
-80	    continue
-	endif
-c
-      endif  
-c     Copy data to Z2; invert x/y if required.
-c
-      return
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/rshape2.f unipops-3.6/source/conline/condar/rshape2.f
--- 3.5/source/conline/condar/rshape2.f	2000-03-16 11:37:31.000000000 -0700
+++ unipops-3.6/source/conline/condar/rshape2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,473 +0,0 @@
-      subroutine rshape2(ierr)
-c
-c     @(#)rshape2.f	5.1 06/22/94
-c
-c     Fits a sinusoid to Array (0).
-c
-c     IERR = 0 if all goes OK, else it will be an error code.
-c
-c     If RFIXPER > 0, the period is held fixed to the value in RPERIOD
-c		= 0, not allowed
-c 		< 0, uses the guess supplied in RPERIOD
-c     If RFIXAMP > 0, the amplitude is held fixed to the value in RAMPLTDE
-c		= 0, the algorithm will try to find a guess for RAMPLTDE
-c 		< 0, uses the guess supplied in RAMPLTDE
-c     If RFIXPHA > 0, the phase is held fixed to the value in RPHASE
-c		= 0, the algorithm will try to find a guess for RPHASE
-c 		< 0, uses the guess supplied in RPHASE
-c
-      integer*2 ierr
-c
-      integer*4 nca, ma
-      parameter (nca = 3)
-      parameter (ma = 3)
-c
-      real covar(NCA,NCA), alph(NCA,NCA), chisq, alamda, alamda1, 
-     .     chisq1, lcoef(MA), twopi
-      integer*4 ndata, numfit, numfit1, lista(MA), lista1(MA), i,
-     .		linfit
-      integer*2  fixper, fixamp, fixpha, kount
-c
-      external frip, fripa, fripab
-c
-      include 'cform.inc'
-      include 'appl.inc'
-      include 'core.inc'
-      include 'rip.inc'
-c
-      parameter (twopi = 6.283185)
-c
-      ierr = 0
-c
-      fixper = nint(rfixper)
-      fixamp = nint(rfixamp)
-      fixpha = nint(rfixpha)
-c
-c     Let us check for errors in input conditions
-c
-      if (fixper .gt. 0 .and. fixamp .gt. 0 .and. fixpha .gt. 0) then
-	ierr = 284
-	goto 99
-      endif
-c     Cannot fix all three fitted parameters since nothing would be fit.
-c
-      if (rperiod .le. 0. .or. fixper .eq. 0) then
-	ierr = 284
-	goto 99
-      endif
-c     User must always supply an initial guess for rperiod.
-c
-      if ( abs(fixamp) .gt. 0 .and. rampltde .le. 0.) then
-	ierr = 	284
-	goto 99
-      endif
-      if ( abs(fixper) .gt. 0 .and. rperiod .le. 0.) then
-	ierr = 	284
-	goto 99
-      endif
-c     Must supply a guess or value if holding a parameter constant (rfix* = 1)
-c	or if using the value of the adverb as an initial guess (rfix* = -1).
-c       Phase can be < = 0 but amp and period cannot.  The second check should
-c	never be reached due to the check above.
-c
-      CALL PREP (ierr)
-      if (ierr .ne. 0) goto 99
-c     Store in XDATA and YDATA the channels and data points set by either
-c     BBASE,EBASE or by NREGION.
-c
-      ndata = ibase
-      if ( ndata .lt. 4 ) then
-	ierr = 	236
-	goto 99
-      endif
-c     Make sure we have enough data points for a fit.
-c
-      do 173 i = 1, ndata
-	work(i) = 1.
-	xdata(i) = xdata(i) - idatoff
-173	continue
-c	Work willbe used to hold SIGMA of the data points all of which are 1.
-c	XDATA is created by PREP with respect to start of TWH instead of in
-c	channel number -- convert XDATA back to channel number. 
-c
-      linfit = 0
-c     Number of parameters to fit for the two possible linear
-c	least-square fits.  If zero, no linear fit is needed.
-c
-      numfit = 0
-      numfit1 = 0
-c     Number of parameters to fit for the two possible non-linear
-c	least-square fits.  If zero, no non-linear fit is needed.
-c
-      coef(1) = rampltde
-      coef(3) = twopi  / rperiod
-      coef(2) = coef(3) * (rphase - 1)
-c     The coefficients actually fitted for by the algorithms
-c
-      lista(1) = 1
-      lista(2) = 2
-      lista(3) = 3
-      lista1(1) = 1
-      lista1(2) = 2
-      lista1(3) = 3
-c     Default order of things to be fitted -- these will change as the user
-c	picks various things to hold fixed or to fit.
-c
-      rpererr = 0.0
-      ramperr = 0.0
-      rphaerr = 0.0
-      covar(1,1) = 0.0
-      covar(2,2) = 0.0
-      covar(3,3) = 0.0
-c     Zero out the errors and the error part of the covariance matrix used by the
-c	algorithms.
-c
-c-----------------------------
-c
-c     NOW!!!!  Check on the values of rfix* to determine how to go about doing
-c	the fit.  If a linear LSQ fit is needed, set LFIT.  If
-c	a non-linear fit is needed, prepare arrays and variables and perform
-c	the fit below.  The array coef(1-3) corresponds to alpha, beta, and gamma
-c	in the fitting function:  YDATA = alpha*cos(XDATA*gamma + beta)
-c
-c	Either we will have one linear, a linear followed by a non-linear,
-c	or two non-linear fits.  No other combinations will be found.
-c
-c-----------------------------
-      if (fixper .eq. 0) then
-c	Fit with fixper = 0 is illegal.  This check should never be reached because
-c	of the above error checks.
-c
-	ierr = 284
-	goto 99
-c
-      else if (fixper .gt. 0) then
-        if (fixamp .eq. 0) then
-c
-	  if (fixpha .eq. 0) then
-c	     Fit with fixamp, phase, per = 0, 0, 1.
-c	     Linear fit for alpha and beta.
-c
-	     linfit = 2
-c
-          else if (fixpha .gt. 0) then
-c	     Fit with fixamp, phase, per = 0, 1, 1.
-c	     Linear fit for alpha.
-c
-	     linfit = 1
-c
-	  else if (fixpha .lt. 0) then 
-c	     Fit with fixamp, phase, per = 0, -1, 1.
-c	     Linear fit for alpha and beta.  This is the same as 
-c	     fixamp, phase, per = 0, 0, 1.
-c
-	     linfit = 2
-c 
-	  endif
-c
-        else if (fixamp .gt. 0) then
-c
-	  if (fixpha .eq. 0) then
-c	     Fit with fixamp, phase, per = 1, 0, 1.
-c	     Prepare for non-linear fit for beta using zero as an initial guess for
-c	     beta.
-c
-	     numfit = 1
-	     lista(1) = 2
-	     lista(2) = 1
-	     coef(2) = 0.0
-c
-          else if (fixpha .gt. 0) then
-c	     Fit with fixamp, phase, per = 1, 1, 1 is illegal.  This check should 
-c	     never be reached because of the above error checks.
-c
-	     ierr = 284
-	     goto 99
-c
-	  else if (fixpha .lt. 0) then 
-c	     Fit with fixamp, phase, per = 1, -1, 1.
-c	     Preapre for non-linear fit for beta using the value of RPHASE as an
-c	     initial guess.
-c
-	     numfit = 1
-	     lista(1) = 2
-	     lista(2) = 1
-c
-	  endif
-c
-        else if (fixamp .lt. 0) then
-c
-	  if (fixpha .eq. 0) then
-c	     Fit with fixamp, phase, per = -1, 0, 1.
-c	     Linear fit for alpha and beta.  This is the same as 
-c	     fixamp, phase, per = 0, 0, 1.
-c
-	     linfit = 2
-c
-          else if (fixpha .gt. 0) then
-c	     Fit with fixamp, phase, per = -1, 1, 1.
-c	     Linear fit for alpha.  This is the same as 
-c	     fixamp, phase, per = 0, 1, 1.
-c
-	     linfit = 1
-c
-	  else if (fixpha .lt. 0) then 
-c	     Fit with fixamp, phase, per = -1, -1, 1.
-c	     Linear fit for alpha and beta.  This is the same as 
-c	     fixamp, phase, per = 0, 0, 1.
-c
-	     linfit = 2
-c
-	  endif
-c
-	endif
-c
-      else if (fixper .lt. 0) then
-c
-        if (fixamp .eq. 0) then
-c
-	  if (fixpha .eq. 0) then
-c	     Fit with fixamp, phase, per = 0, 0, -1.
-c	     First, find initial guess for alpha and beta using linear fit. 
-c	     Then, prepare for non-linear fit for alpha, beta, and gamma. 
-c
-	     linfit = 2
-	     numfit = 3
-c 
-          else if (fixpha .gt. 0) then
-c	     Fit with fixamp, phase, per = 0, 1, -1.
-c	     First, find initial guess for alpha using linear fit. 
-c	     Then, prepare for non-linear fit for alpha and gamma. 
-c
-	     linfit = 1
-	     numfit = 2
-	     lista(2) = 3
-	     lista(3) = 2
-c
-	  else if (fixpha .lt. 0) then 
-c	     Fit with fixamp, phase, per = 0, -1, -1.
-c	     First, find initial guess for alpha using linear fit. 
-c	     Then, prepare for non-linear fit for alpha, beta, and gamma.
-c 
-	     linfit = 1
-	     numfit = 3
-c
-	  endif
-c
-        else if (fixamp .gt. 0) then
-c
-	  if (fixpha .eq. 0) then
-c	     Fit with fixamp, phase, per = 1, 0, -1.
-c	     First, prepare first non-linear fit to find initial guess for beta. 
-c	     Then, prepare for second non-linear fit for beta and gamma.
-c 
-	     numfit = 1
-	     lista(1) = 2
-	     lista(2) = 1
-	     lista(3) = 3
-	     coef(2) = 0.0
-	     numfit1 = 2
-	     lista1(1) = 2
-	     lista1(2) = 3
-	     lista1(3) = 1
-c
-          else if (fixpha .gt. 0) then
-c	     Fit with fixamp, phase, per = 1, 1, -1.
-c	     Prepare  for non-linear for for gamma.
-c 
-	     numfit = 1
-	     lista(1) = 3
-	     lista(3) = 1
-c
-	  else if (fixpha .lt. 0) then 
-c	     Fit with fixamp, phase, per = 1, -1, -1.
-c	     Prepare  for non-linear for for beta and gamma.
-c 
-	     numfit = 2
-	     lista(1) = 2
-	     lista(2) = 3
-	     lista(3) = 1
-c
-	  endif
-c
-        else if (fixamp .lt. 0) then
-c
-	  if (fixpha .eq. 0) then
-c	     Fit with fixamp, phase, per = -1, 0, -1.
-c	     First, prepare first non-linear fit to find initial guess for beta. 
-c	     Then, prepare for second non-linear fit for alpha, beta, and gamma.
-c 
-	     numfit = 1
-	     lista(1) = 2
-	     lista(2) = 1
-	     lista(3) = 3
-	     coef(2) = 0.0
-	     numfit1 = 3
-c
-          else if (fixpha .gt. 0) then
-c	     Fit with fixamp, phase, per = -1, 1, -1.
-c	     Prepare  for non-linear for alpha and gamma.
-c 
-	     numfit = 2
-	     lista(2) = 3
-	     lista(3) = 2
-c
-	  else if (fixpha .lt. 0) then 
-c	     Fit with fixamp, phase, per = -1, -1, -1.
-c	     Prepare  for non-linear for alpha, beta, and gamma.
-c 
-	     numfit = 3
-c
-	  endif
-c
-	endif
-      endif
-c
-c     Perform linear LSQ fit, if called for.
-c
-      if (linfit .eq. 1) then
-	call lfit(xdata, ydata, work, ndata, lcoef, linfit, lista, linfit, 
-     .	          covar, NCA, chisq, fripa)
-	coef(1) = lcoef(1)
-      else if (linfit .eq. 2) then
-	call lfit(xdata, ydata, work, ndata, lcoef, linfit, lista, linfit, 
-     .	          covar, NCA, chisq, fripab)
-	coef(1) = sqrt( lcoef(1)**2 + lcoef(2)**2 )
-	coef(2) = -atan2(lcoef(2), lcoef(1) )
-      endif
-c
-c     Perform first non-linear LSQ fit, if called for.
-c
-      if (numfit .gt. 0) then
-	alamda = -1.
-        kount = 0
-        call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, 
-     .		    numfit, covar, alph, NCA, chisq, frip, alamda)
-c	
-170     chisq1 = chisq
-	alamda1 = alamda
-        kount = kount + 1
-	if (kount .le. niter) then
-	   call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, 
-     .		       numfit, covar, alph, NCA, chisq, frip, alamda)
-	   if ( (alamda .gt. 0. .and. alamda .lt. 1.e10) .and.
-     .	       (alamda .gt. alamda1 .or. 
-     .         abs(1.-chisq1/chisq) .gt. 0.001) ) goto 170
-	else
-	   ierr = 282
-	endif
-        alamda = 0.
-        call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, 
-     .		    numfit, covar, alph, NCA, chisq, frip, alamda)
-      endif
-c
-c     Perform second non-linear LSQ fit, if called for.
-c
-      if (numfit1 .gt. 0) then
-	ierr = 0
-	alamda = -1.
-        kount = 0
-        call mrqmin(xdata, ydata, work, ndata, coef, MA, lista1, 
-     .		    numfit1, covar, alph, NCA, chisq, frip, alamda)
-c	
-180     chisq1 = chisq
-	alamda1 = alamda
-        kount = kount + 1
-	if (kount .le. niter) then
-	   call mrqmin(xdata, ydata, work, ndata, coef, MA, lista1, 
-     .		       numfit1, covar, alph, NCA, chisq, frip, alamda)
-	   if ( (alamda .gt. 0. .and. alamda .lt. 1.e10) .and.
-     .	       (alamda .gt. alamda1 .or. 
-     .         abs(1.-chisq1/chisq) .gt. 0.001) ) goto 180
-	else
-	   ierr = 282
-	endif
-        alamda = 0.
-        call mrqmin(xdata, ydata, work, ndata, coef, MA, lista1, 
-     .		    numfit1, covar, alph, NCA, chisq, frip, alamda)
-      endif
-c
-c     Update adverbs and their errors but ONLY if they were fitted for.
-c
-      if (fixamp .le. 0) then
-	rampltde = coef(1)
-      	ramperr = sqrt(covar(1,1))
-      endif
-      if (fixpha .le. 0) then
-	rphase = coef(2) / coef(3) + 1
-        rphaerr = sqrt(covar(2,2)) / coef(3)
-      endif
-      if (fixper .le. 0) then
-	rperiod = twopi / coef(3)
-        rpererr = twopi * sqrt(covar(3,3)) / (coef(3)**2)
-      endif
-c
-99    return
-      end
-c
-c----------------------------------------------
-      subroutine fripa(x, y, np)
-c
-c     Used by LFIT for finding alpha in:
-c
-c          alpha * cos(gamma*x + beta)
-c
-      real y(*), x
-      integer*4 np
-c
-      include 'rip.inc'
-c
-      y(1) = cos( x*coef(3) + coef(2) ) 
-      return
-      end
-c
-c
-c----------------------------------------------
-      subroutine fripab(x, y, np)
-c
-c     Used by LFIT for finding alpha and beta in:
-c
-c          alpha * cos(gamma*x + beta), or
-c
-c	   alpha*cos(gamma*x)*sin(beta) + alpha*sin(gamma*x)*cos(beta)
-c
-      real y(*), x
-      integer*4 np
-c
-      include 'rip.inc'
-c
-      y(1) = cos( x*coef(3) ) 
-      y(2) = sin( x*coef(3) )
-c 
-      return
-      end
-c
-c
-c----------------------------------------------
-      subroutine frip(x, a, y, dyda, na)
-c
-c     Used by MRQMIN for finding alpha, beta, or gamma in:
-c
-c          alpha * cos(gamma*x + beta), or
-c
-      real x, y, a(*), dyda(*)
-      integer*4 na
-c
-      integer*2 n120, m3
-c
-      parameter (m3 = -3)
-      parameter (n120 = 120)
-c
-      if ( na. ne. 3) 
-     .	call oerror(n120, m3, 'FRIP: Wrong number of coefficients')
-c
-c
-      y = a(1) * cos( a(3)*x + a(2) )
-c
-      dyda(1) = cos( a(3)*x + a(2) )
-      dyda(2) = -sin( a(3)*x + a(2) )
-      dyda(3) = -x*sin( a(3)*x + a(2) )
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/rt.f unipops-3.6/source/conline/condar/rt.f
--- 3.5/source/conline/condar/rt.f	2000-03-16 11:37:32.000000000 -0700
+++ unipops-3.6/source/conline/condar/rt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      real FUNCTION RT(FREQ,T)
-C
-C-----------------------------------------------------------------------
-C @(#)rt.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C  THIS FUNCTION SUBPROGRAM CALCULATES THE EFFECTIVE RADIATION TEMP.
-C  OF A BLACKBODY AT TEMP. T AND FREQUENCY FREQ.
-c
-      real freq, t, hkghz, xx
-c
-      HKGHZ = 0.04799275
-      XX = HKGHZ*FREQ
-      RT = XX/(EXP(XX/T) - 1.)
-      RETURN
-      END
-
-
diff -uNr 3.5/source/conline/condar/savebyloc.f unipops-3.6/source/conline/condar/savebyloc.f
--- 3.5/source/conline/condar/savebyloc.f	2000-03-16 11:37:32.000000000 -0700
+++ unipops-3.6/source/conline/condar/savebyloc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,93 +0,0 @@
-      subroutine savebyloc (array, iloc, imagic, iunit, filename, 
-     1                      overwrite, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)savebyloc.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Saves the array ARRAY into the ILOC location in file FILENAME
-c     which is attached to IO unit IUNIT.  
-c     If data exists at the specified location, then, if OVERWRITE is
-c     true, the old data is overwritten by the new.
-c
-c     All of the work is now done in saveascan.
-c     The filename is ignored.
-c
-      integer*4 flag
-      parameter (flag=0)
-      character*(*) filename
-      character*80 stch
-      character*1 cobsmode(8)
-      logical*2 overwrite
-      integer*2 imagic, iunit, ierr, n0, n80, n120, n355, m3, ier, iloc
-      integer*4 lunit, loverwrite, lrtn, j
-      double precision array(*), location, obsmode, ydata(2786)
-c
-      equivalence (obsmode, cobsmode)
-c
-      data n0, n80, n120, n355, m3 /0, 80, 120, 355, -3/
-c
-      include 'cform.inc'
-c
-      lunit = iunit
-      location = iloc
-      loverwrite = 0
-      if (overwrite) loverwrite = 1
-      ierr = 0
-c			make sure data_length is large enough
-      if (array(c1dln).lt.(array(c12ni) + array(c12spn) - 1) * 4.0) then
-         array(c1dln) = (array(c12ni) + array(c12spn) - 1) * 4.0
-      endif
-c			convert, pass address of array and ydata to saveascan
-      call conversion3(array, ydata, ier)
-      if (ier .lt. 0) then
-         ierr = 360
-         goto 99
-      endif
-c
-      call saveascan(lunit, location, flag, array, ydata, 
-     .               loverwrite, lrtn)
-      if (lrtn .ne. 0) then
-         if (lrtn .eq. 1) then
-            ierr = -370
-         else if (lrtn .eq. 2) then
-            ierr = -357
-         else if (lrtn .eq. 3) then
-            ierr = -359
-         else if (lrtn .eq. 4) then
-            ierr = -355
-         else if (lrtn .eq. 5) then
-            ierr = 371
-         else if (lrtn .eq. 6) then
-            ierr = 355
-         else if (lrtn .eq. 7) then
-            obsmode = array(c1stc)
-            write(stch, 40) (cobsmode(j),j=5,8)
-            call pwrite(stch, n80)
-         else if (lrtn .eq. 8) then
-            ierr = -363
-         else if (lrtn .eq. 9) then
-            write(stch, 60) iloc
-            call pwrite(stch, n80)
-         else if (lrtn .eq. 10) then
-            write(stch, 60) iloc
-            call pwrite(stch, n80)
-            obsmode = array(c1stc)
-            write(stch, 40) (cobsmode(j),j=5,8)
-            call pwrite(stch, n80)
-c			errno 10 means errors 7 and 9 both occured
-c			only these 2 warning messages will occur
-c			at the same time
-         else
-c				an internal error, should never happen 
-            write(stch, 50) lrtn
-            call oerror(n120, m3, stch)
-         endif
-      endif
-c
- 99   return
-c
- 40   format('Unrecognized observing mode ',4a1)
- 50   format('Unknown error code ', i)
- 60   format('Data exists at ', i,' .... Overwriting!')
-c
-      end
diff -uNr 3.5/source/conline/condar/savebynum.f unipops-3.6/source/conline/condar/savebynum.f
--- 3.5/source/conline/condar/savebynum.f	2000-03-16 11:37:33.000000000 -0700
+++ unipops-3.6/source/conline/condar/savebynum.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,93 +0,0 @@
-      subroutine savebynum (array, scan, imagic, iunit, filename, 
-     1                      overwrite, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)savebynum.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Saves the array ARRAY into the ILOC location in file FILENAME
-c     which is attached to IO unit IUNIT.  
-c     If data exists at the specified location, then, if OVERWRITE is
-c     true, the old data is overwritten by the new.
-c
-c     All of the work is now done in saveascan.
-c     The filename is ignored.
-c
-      integer*4 flag
-      parameter (flag=1)
-      character*(*) filename
-      character*80 stch
-      character*1 cobsmode(8)
-      logical*2 overwrite
-      integer*2 imagic, iunit, ierr, n0, n80, n120, n355, m3, ier
-      integer*4 lunit, loverwrite, lrtn, j
-      double precision array(*), scan, location, obsmode, ydata(2786)
-c
-      equivalence (obsmode, cobsmode)
-c
-      data n0, n80, n120, n355, m3 /0, 80, 120, 355, -3/
-c
-      include 'cform.inc'
-c
-      lunit = iunit
-      location = scan
-      loverwrite = 0
-      if (overwrite) loverwrite = 1
-      ierr = 0
-c                       make sure data_length is large enough
-      if (array(c1dln).lt.(array(c12ni) + array(c12spn) - 1) * 4.0) then 
-         array(c1dln) = (array(c12ni) + array(c12spn) - 1) * 4.0 
-      endif 
-c
-      call conversion3(array, ydata, ier)
-      if (ier .lt. 0) then
-         ierr = 360
-         go to 99
-      endif
-c
-      call saveascan(lunit, location, flag, array, ydata, 
-     .               loverwrite, lrtn)
-      if (lrtn .ne. 0) then
-         if (lrtn .eq. 1) then
-            ierr = -370
-         else if (lrtn .eq. 2) then
-            ierr = -357
-         else if (lrtn .eq. 3) then
-            ierr = -359
-         else if (lrtn .eq. 4) then
-            ierr = -355
-         else if (lrtn .eq. 5) then
-            write(stch, 10) lrtn
-            call oerror(n120, m3, stch)
-         else if (lrtn .eq. 6) then
-            ierr = 355
-         else if (lrtn .eq. 7) then
-            obsmode = array(c1stc)
-            write(stch, 40) (cobsmode(j),j=5,8)
-            call pwrite(stch, n80)
-         else if (lrtn .eq. 8) then
-            ierr = -363
-         else if (lrtn .eq. 9) then
-            write(stch, 60) scan
-            call pwrite(stch, n80)
-         else if (lrtn .eq. 10) then
-            write(stch, 60) scan
-            call pwrite(stch, n80)
-            obsmode = array(c1stc)
-            write(stch, 40) (cobsmode(j),j=5,8)
-            call pwrite(stch, n80)
-c				10 means 7 and 9 both occured
-         else
-c				an internal error, should never happen 
-            write(stch, 50) lrtn
-            call oerror(n120, m3, stch)
-         endif
-      endif
-c
- 99   return
-c
- 10   format('Unexpected error code ',i)
- 40   format('Unrecognized observing mode ',4a1)
- 50   format('Unknown error code ', i)
- 60   format('Scan ',f12.2,' exists .... Overwriting!')
-c
-      end
diff -uNr 3.5/source/conline/condar/sddcopy.f unipops-3.6/source/conline/condar/sddcopy.f
--- 3.5/source/conline/condar/sddcopy.f	2000-03-16 11:37:33.000000000 -0700
+++ unipops-3.6/source/conline/condar/sddcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-      subroutine sddcopy (tmpbuf, twhbuf, isize, irtn)
-c----------------------------------------------------------------------
-c @(#)sddcopy.f	5.1 06/22/94
-c
-c    just copies tmpbuf to twhbuf
-c    isize = size in bytes
-c
-c-----------------------------------------------------------------------
-      real*8 tmpbuf(*), twhbuf(*)
-      integer*4 irtn, isize, i, nelem
-c
-c
-      nelem = isize / 8
-      if (nelem*8 .lt. isize) nelem = nelem + 1
-      do 100 i = 1, nelem
-         twhbuf(i) = tmpbuf(i)
- 100  continue
-c
-      irtn = 0
-      return
-      end
diff -uNr 3.5/source/conline/condar/select.F unipops-3.6/source/conline/condar/select.F
--- 3.5/source/conline/condar/select.F	2000-03-16 11:37:34.000000000 -0700
+++ unipops-3.6/source/conline/condar/select.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,418 +0,0 @@
-      subroutine select
-c------------------------------------------------------------------------
-c @(#)select.F	5.1 06/22/94
-c------------------------------------------------------------------------
-c
-c        select puts scan numbers into astack if the index values for 
-c        that scan fit the selection criteria.  select can alse be used
-c        to examine the selection criteria.
-c
-c        select dscans or offline selects scans from the offline file
-c        select sscans selects from the save file
-c        select rscans selects from the records file
-c        select online selects from the online data
-c        select info summarizes the selection criteria.
-c
-c	 Scan number are added to astack at the end (i.e after any
-c        values currently there as indicated by ACOUNT.
-c                                        
-c------------------------------------------------------------------------
-c
-      integer*4 idatsize
-      parameter (idatsize = 1024)
-      integer*2 idat(idatsize), ierr, index(32), is_mode, lastblnk
-      integer*2 m3, m2, m1, n1, n2, n80, n112, n120, n281
-      logical*2 itfits, lusescanno, skipscan
-      integer*4 ifun, ifile, irec, i1, i4pc, i, lastindex, lastrecord,
-     .          loopmax, ii, ind, l16, l17, maxadd, actno
-      integer*4 imax, irtn, iacount, iacstart, iadded, i4, oldscan, 
-     .          RECORDS, lunit, lrtn, number, numheadrecs, 
-     .          numindexperrec, numdatarecs, ibytperrec, 
-     .          ibytperheaditem, lastindexitem
-      real*4 scanno, rdat(idatsize/2), rindex(16), sscale
-      real*8 ddat(idatsize/4), dindex(8), params(24), dpar(2)
-      character*2 curprog
-      character*4 ucs_mode, c4par(4)
-      character*16 cdat(idatsize/8), c16par
-      character*32 mode_desc, crshfle
-c
-      include 'core.inc'
-      include 'appl.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-c
-      external qcomphi, qcomplow
-c
-      equivalence (idat, rdat, ddat, cdat), (index, dindex, rindex)
-      equivalence (dpar, c16par, c4par)
-c
-      data imax /32767/
-      data i4 /4/
-      data m3, m2, m1, n1, n2, n80, n112, n120, n281
-     .     /-3, -2, -1, 1, 2, 80, 112, 120, 281/
-      data l16, l17 /16, 17/
-c
-      parameter (RECORDS=5)
-c
-      i4pc(ii) = (ii-1)/n2 + n1
-c
-c------------------------------------------------------------------------
-c
-c		Make sure there is something present on the stack.
-      ifun = 0
-      if (sp .lt. 1) call oerror(n112, m1, 'SELECT')
-      ifun = nint(v(sp))
-      sp = sp - 1
-c		is it likely to be appropriate
-      if (ifun .lt. 1 .or. ifun .gt. 18) call oerror(n112, m1, 'SELECT')
-c		check ACOUNT and remember current status
-      iacount = nint(acount)
-      if (iacount .lt. 0 .or. iacount .gt. maxstck) 
-     .     call oerror (n281, m2, 'SELECT')
-      iacount = iacount + 1
-      iacstart = iacount
-c		force cs_mode to be upper case
-      call uppercase(cs_mode, ucs_mode)
-      cs_mode = ucs_mode
-      oldscan = -32767
-c
-      if (ifun .le. 3) go to (10, 25, 20) ifun
-      if (ifun .eq. 5) goto 45
-      if (ifun .gt. 15) go to (10, 30, 40) (ifun - 15)
-      call oerror(n112, m1, 'SELECT')
-c------------------------------------------------------------------------
-c			DSCANS or OFFDATA
-c------------------------------------------------------------------------
- 10   continue
-      ifile = 1
-      lusescanno = .true.
-      sscale = -1.0
-      go to 100
-c------------------------------------------------------------------------
-c			KSCANS
-c------------------------------------------------------------------------
- 25   continue
-       ifile = 2
-       lusescanno = .true.
-       sscale = 1.0
-       goto 100
-c------------------------------------------------------------------------
-c			RSCANS
-c------------------------------------------------------------------------
- 45   continue
-       ifile = 5
-       lusescanno = .true.
-       sscale = 1.0
-       goto 100
-c------------------------------------------------------------------------
-c			SSCANS
-c------------------------------------------------------------------------
- 20   continue
-      ifile = 3
-      lusescanno = .false.
-      go to 100
-c------------------------------------------------------------------------
-c                       ONDATA
-c------------------------------------------------------------------------
- 30   continue
-      if (online) then
-         write(cpuf, 1030) 'Select : choosing scans from online data.'
-         call pwrite(ipuf, n80)
-c			This all happens on the on-line side
-c			put the relevant values into the params array
-         params(1) = default
-         c16par = cs_object
-         params(2) = dpar(1)
-         params(3) = dpar(2)
-#ifdef CONTINUUM
-         c4par(1) = 'CONT'
-#else
-         c4par(1) = 'LINE'
-#endif
-         c4par(2) = cs_mode
-         params(4) = dpar(1)
-         params(5) = scan_min
-         params(6) = scan_max
-         params(7) = feed_min
-         params(8) = feed_max
-         params(9) = x_min 
-         params(10) = x_max
-         params(11) = y_min 
-         params(12) = y_max
-         params(13) = lst_min 
-         params(14) = lst_max
-         params(15) = ut_min 
-         params(16) = ut_max
-         params(17) = bw_min 
-         params(18) = bw_max
-         params(19) = f_min 
-         params(20) = f_max
-         params(21) = rate_min 
-         params(22) = rate_max
-         params(23) = it_min 
-         params(24) = it_max
-c			call gselect, which does all the work
-         maxadd = maxstck - iacount + 1
-         call gselect(params, actno, maxadd, astack(iacount), irtn)
-         if (irtn .eq. 0) then
-            iacount = iacount + actno
-            acount = iacount - 1
-         else
-            write(cpuf, 1030) 
-     .         'Select: On-line data file is empty or unavailable.'
-            call pwrite(ipuf, n80)
-         endif
-      else
-         write(cpuf, 1030) 'Select: On-line data is not available.'
-         call pwrite(ipuf, n80)
-      endif
-c
-      go to 990
-c------------------------------------------------------------------------
-c				INFO
-c------------------------------------------------------------------------
- 40   continue
-      write(cpuf, 1030) ' '
-         call pwrite(ipuf, n80)
-      write(cpuf, 1030) 
-     .   ' SELECT INFO : Status of adverbs used by SELECT verb.'
-         call pwrite(ipuf, n80)
-      write(cpuf, 1030) ' '
-         call pwrite(ipuf, n80)
-      if (lastblnk(cs_object) .ne. 0 .and. s_object(1) .ne. 0.0) then
-         write(cpuf, 1040) cs_object
-            call pwrite(ipuf, n80)
-      else
-         write(cpuf, 1030) '   Object : All Objects (S_OBJECT)'
-            call pwrite(ipuf, n80)
-      endif
-      call modeid(cs_mode, is_mode, irtn)
-      if (is_mode .ne. 0 .and. irtn .eq. 0) then
-         call modedesc(is_mode, mode_desc, irtn)
-         if (irtn .eq. 0) then
-            write(cpuf, 1047) cs_mode, mode_desc
-         else
-            write(cpuf, 1041) cs_mode
-         endif
-         call pwrite(ipuf, n80)
-      else if (irtn .ne. 0) then
-         write(cpuf, 1044) cs_mode
-            call pwrite(ipuf, n80)
-      else
-         write(cpuf, 1030) '   Mode   : All modes (S_MODE)'
-            call pwrite(ipuf, n80)
-      endif
-      call progname(curprog)
-      if (curprog .eq. 'Cc') then
-         write(cpuf, 1042) 'CONT'
-            call pwrite(ipuf, n80)
-      else
-         write(cpuf, 1042) 'LINE'
-            call pwrite(ipuf, n80)
-      endif
-      write(cpuf, 1030) ' '
-         call pwrite(ipuf, n80)
-      write(cpuf, 1050)
-         call pwrite(ipuf, n80)
-      write(cpuf, 1030) ' '
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Scan Number      ', 'SCAN_MIN, SCAN_MAX'
-      if (scan_min .ne. default) write(cpuf(22:37), 1045) int(scan_min)
-      if (scan_max .ne. default) write(cpuf(39:54), 1045) int(scan_max)
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Subscan Number   ', 'FEED_MIN, FEED_MAX'
-      if (feed_min .ne. default) write(cpuf(22:37), 1045) int(feed_min)
-      if (feed_max .ne. default) write(cpuf(39:54), 1045) int(feed_max)
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Source X Position', 'X_MIN, X_MAX'
-      if (x_min .ne. default) write(cpuf(22:37), 1046) x_min
-      if (x_max .ne. default) write(cpuf(39:54), 1046) x_max
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Source Y Position', 'Y_MIN, Y_MAX'
-      if (y_min .ne. default) write(cpuf(22:37), 1046) y_min
-      if (y_max .ne. default) write(cpuf(39:54), 1046) y_max
-         call pwrite(ipuf, n80)
-      write(cpuf, 1030) '   (decimal degrees)'
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'LST (hours)      ', 'LST_MIN, LST_MAX'
-      if (lst_min .ne. default) write(cpuf(22:37), 1046) lst_min
-      if (lst_max .ne. default) write(cpuf(39:54), 1046) lst_max
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Univ. Time Date  ', 'UT_MIN, UT_MAX'
-      if (ut_min .ne. default) write(cpuf(22:37), 1046) ut_min
-      if (ut_max .ne. default) write(cpuf(39:54), 1046) ut_max
-         call pwrite(ipuf, n80)
-      write(cpuf, 1030) '   (years)'
-         call pwrite(ipuf, n80)
-#ifdef CONTINUUM
-      write(cpuf, 1043) 'Rate ("/s)       ', 'RATE_MIN, RATE_MAX'
-      if (rate_min .ne. default) write(cpuf(22:37), 1046) rate_min
-      if (rate_max .ne. default) write(cpuf(39:54), 1046) rate_max
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Int. Time (s)    ', 'IT_MIN, IT_MAX'
-      if (it_min .ne. default) write(cpuf(22:37), 1046) it_min
-      if (it_max .ne. default) write(cpuf(39:54), 1046) it_max
-         call pwrite(ipuf, n80)
-#else
-      write(cpuf, 1043) 'Rest Freq. (MHz) ', 'F_MIN, F_MAX'
-      if (f_min .ne. default) write(cpuf(22:37), 1046) f_min
-      if (f_max .ne. default) write(cpuf(39:54), 1046) f_max
-         call pwrite(ipuf, n80)
-      write(cpuf, 1043) 'Bandwidth (MHz)  ', 'BW_MIN, BW_MAX'
-      if (bw_min .ne. default) write(cpuf(22:37), 1046) bw_min 
-      if (bw_max .ne. default) write(cpuf(39:54), 1046) bw_max
-         call pwrite(ipuf, n80)
-#endif
-      write(cpuf, 1030) ' '
-         call pwrite(ipuf, n80)
-      write(cpuf, 1048) (nint(acount) + 1)
-         call pwrite(ipuf, n80)
-      if (s_sort .gt. 0) write(cpuf, 1049) 'ascending'
-      if (s_sort .lt. 0) write(cpuf, 1049) 'descending'
-      if (s_sort .eq. 0) 
-     .      write(cpuf, 1030) '   Additions will not be sorted (S_SORT)'
-         call pwrite(ipuf, n80)
-      write(cpuf, 1030) ' '
-         call pwrite(ipuf, n80)
-      go to 999
-c------------------------------------------------------------------------
-c				bad argument list
-c------------------------------------------------------------------------
- 90   continue
-      call oerror(n112, m2, 'SELECT')
-      go to 990
-c------------------------------------------------------------------------
-c			This section handles SDD files
-c			ifile set above
-c------------------------------------------------------------------------
- 100  continue
-c			check that the file is available
-      lunit = iounit(ifile)
-c			
-      write(cpuf, 1030) 'Select: choosing scans from ' // 
-     .       crshfle(ciounit(ifile))
-      call pwrite(ipuf, n80)
-c				get the bootstrap information
-      call getsddbs(lunit, numheadrecs, numdatarecs, ibytperrec,
-     .              ibytperheaditem, lastindexitem, lrtn)
-      if (lrtn .ne. 0) then
-         if (lrtn .eq. 1) then
-            write(cpuf, 1030) 'Select: ' //
-     .         crshfle(ciounit(ifile)) // ' is unavailable.'
-            call pwrite(ipuf, n80)
-         endif
-         if (lrtn .eq. 2) ierr = 357
-         if (lrtn .ge. 3) ierr = 359
-         goto 990
-      endif
-c      			is idat large enough to hold ibytperheaditem?
-      if (idatsize*2 .lt. ibytperheaditem) then
-         ierr = 359
-         goto 990
-      endif
-c
-      numindexperrec = ibytperrec / ibytperheaditem
-      lastrecord = ((lastindexitem-1)/numindexperrec) + 1
-      lastindex = lastindexitem - (lastrecord-1)*numindexperrec
-      if (lastrecord+1 .gt. numheadrecs) then
-         lastrecord = numheadrecs - 1
-         lastindex = numindexperrec
-      endif
-      loopmax = numindexperrec
-c			process the index and select the scans
-      if (lastindexitem .gt. 0 .and. numheadrecs .ge. 2) then
-         do 110 irec = 1, lastrecord
-c			read a record in
-            ind = (irec - 1) * numindexperrec + 1
-            if (irec .eq. lastrecord) loopmax = lastindex
-            number = loopmax
-            call getnindex(lunit, ind, idat, number, lrtn)
-            if (lrtn .ne. 0 .or. number .ne. loopmax) then
-               ierr = 357
-               goto 990
-            endif
-c
-            do 120 i = 1, loopmax
-               i1 = (i-1)*ibytperheaditem/2 + 1
-               scanno = rdat(i4pc(i1+l16))
-	       if (ifile .eq. RECORDS) then
-		  if (nint(scanno) .ne. oldscan ) then
-		     oldscan = nint(scanno)
-		     skipscan = .false.
-		  else
-		     if ( nint(100.*(scanno-oldscan)) .le. 1.) skipscan = .true.
-		     if (skipscan) goto 120
-		  endif
-	       endif
-               if (scanno .ne. 0) then
-                  if (itfits(idat(i1))) then
-                     if (iacount .le. maxstck) then
-                        if (lusescanno) then
-                           astack(iacount) = scanno * sscale
-                        else
-                           astack(iacount) = 
-     .                        (irec-1)*numindexperrec + i
-                        end if
-                        acount = float(iacount)
-                        iacount = iacount + 1
-                     else
-c				ascack is full, end now
-                        go to 990
-                     endif
-                  endif
-               endif
- 120        continue
- 110     continue
-c
-      end if
-c
-      go to 990
-c------------------------------------------------------------------------
-c				Finish up
-c------------------------------------------------------------------------
- 990  continue
-c				any errors?
-      if (ierr .ne. 0) then
-         call oerror(ierr, m2, 'SELECT')
-      end if
-c				how many were added?
-      
-      iadded = (iacount - iacstart)
-      if (iadded .eq. 0) then
-         write(cpuf, 1030) 'Select: No scans were added to ASTACK'
-      else if (iadded .eq. 1) then
-         write(cpuf, 1030) 'Select: 1 scan was added to ASTACK'
-      else
-         write(cpuf, 1990) iadded
-      end if
-      call pwrite(ipuf, n80)
-c				do we sort it?
-      if (s_sort .ne. 0 .and. iadded .gt. 2) then
-         write(cpuf, 1030) 'Select: sorting additions to ASTACK'
-         call pwrite(ipuf, n80)
-c				uses sun qsort routine
-         if (s_sort .gt. 0) 
-     .       call qsort(astack(iacstart),iadded,i4,qcomplow)
-         if (s_sort .lt. 0) 
-     .       call qsort(astack(iacstart),iadded,i4,qcomphi)
-c
-      endif
-c			done
- 999  return
-c------------------------------------------------------------------------  
- 1030 format(a)
- 1040 format(3x,'Object : "',a16,'" (S_OBJECT)')
- 1041 format(3x,'Mode   : "',a4,'" (S_MODE)')
- 1042 format(3x,'Program: ',a4)
- 1043 format(3x,a17,6x,'DEFAULT',8x,'DEFAULT',6x,a)
- 1044 format(3x,'Mode   : "',a4,'" is an invalid mode (S_MODE)')
- 1045 format(4x,i5,6x)
- 1046 format(1PG15.7)
- 1047 format(3x,'Mode   : "',a4,'" (S_MODE) ',a)
- 1048 format(3x,'Additions to ASTACK will begin at location ',i4,
-     .          ' (ACOUNT + 1)')
- 1049 format(3x,'Additions will be sorted in ',a,' order (S_SORT)')
- 1050 format(9x,'Field',13x,'From',12x,'To',16x,'Adverbs')
- 1990 format('Select: ',i4,' scans were added to ASTACK')
-c
-      end
diff -uNr 3.5/source/conline/condar/setunits.f unipops-3.6/source/conline/condar/setunits.f
--- 3.5/source/conline/condar/setunits.f	2000-03-16 11:37:35.000000000 -0700
+++ unipops-3.6/source/conline/condar/setunits.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,51 +0,0 @@
-      subroutine setunits(freq, funits, flimit, ifreq, litchanged)
-c--------------------------------------------------------------------------
-c @(#)setunits.f	5.1 06/22/94
-c
-c        this is a really bad way to get the units in the header to agree
-c        with the units that the frequency is in
-c
-c        freq = the frequency found in the header - this is assumed to be MHz
-c        funits = 3 element array which is just the other units (GHz, MHz and
-c                 kHz in terms of MHz, i.e. 1000, 1, and .001)
-c        flimit = limit used in test.  If freq/funits(ifreq) is larger than
-c                 or equal to flimit, then ifreq is the correct units to use.
-c        ifreq = current value of the pointer to funits which indicates
-c                what was last printed out in the header
-c        litchanged = a logical which is set to true of the new ifreq
-c                     that is appropriate to freq is different from the
-c                     the ifreq that the program was called with.
-c                     i.e. if litchanged is true, then a new header needs to
-c                     be printed.
-c
-c---------------------------------------------------------------------------
-      real*8 freq, funits(3), ftest, flimit
-      integer*4 ifreq, nfreq
-      logical litchanged
-c
-      litchanged = .false.
-c
-c                this assumes first that funits(3) goes from a large number
-c                to a small number and second that the desired units are
-c                reached either when the resulting freq is greater than flimit 
-c		 or the choices are exhausted.
-c
-      if (freq .eq. 0) then
-         nfreq = 2
-         ftest = 0.0
-      else
-         do 100 nfreq = 1, 3
-            ftest = abs(freq / funits(nfreq))
-            if (ftest .ge. flimit) go to 200
- 100     continue
-c
-         nfreq = 3
-c
- 200     continue
-      end if
-c
-      if (ifreq .ne. nfreq) litchanged = .true.
-      ifreq = nfreq
-      freq = freq / funits(ifreq)
-      return
-      end
diff -uNr 3.5/source/conline/condar/show.F unipops-3.6/source/conline/condar/show.F
--- 3.5/source/conline/condar/show.F	2000-03-16 11:37:36.000000000 -0700
+++ unipops-3.6/source/conline/condar/show.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,596 +0,0 @@
-      subroutine show(ishow, iplt)
-c
-C-------------------------------------------------------------------------------
-C  @(#)show.F	5.3 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Draws a scan plot.
-c
-c     If ISHOW = 1, then must rescale plot and draw border
-c        else use previous scaling, draw plot, but don't draw border
-c     If IPLT = 0, plot using continuous line; = 1 plot using histogram;
-c	= 2 plot using points.
-c
-      INTEGER*2  RSTR(6), DSTR(6), RRSTR(6), RDSTR(6), npp1, curcur
-      CHARACTER*3  MON(12)
-      character*24 cfform, vellbl
-      character*12 xlabels(11)
-      INTEGER*2  ISOURC(8), iptwh, iplt, ishow, istop, iy, istart, ixr, 
-     .		 ixl, ix, ier, ilow, ihi, iy1, iy2, imon, iday, iyr, 
-     .           short, ixlabels(6,11), sclc, limx2, ierr, lxa1, uxa1,
-     .		 ivelcnt, lastblnk, ivellbl(12)
-      integer*2 m2, n0, n1, n2, n5, n7, n8, n9, n10, n12, n14, n20, n25, 
-     .          n30, n33, n35, n55, n72, n74, n75, n100, n125, n150, 
-     .          n225, n288, n3, n270, n271, n272
-      integer*4 iby, ibx, idelx, nchan, i, ilast, nch,
-     .          ibe, isb, nac, icdtype, ipixel, idely
-      REAL*4 dvel, bw, tsys, tim, ra, dec, rra, rdc, tcal, ymin, 
-     .	     yincr, val, xz, av, ch, scn1, scn2, xf, xl, dx, xf1,
-     .	     xf2
-      real*8 nrao12m, nrao140, nrao300, dfform(3), chantox, xtochan
-      real*8 rf, d03, udate, cf, rif, SOURCE(2), ctype(8)
-      character*10 format, getformat
-      logical okarray, okreal4, placenxt, okreal8
-c
-#ifdef CONTINUUM
-#else
-      integer*2 osb(4)
-      real*4 vcnt
-      character*8 veldef
-      real*8 syn, dosb, dveldef
-      equivalence (osb(1), dosb), (dveldef, veldef)
-#endif
-c
-      INCLUDE 'cform.inc'
-      INCLUDE 'appl.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-      include 'core.inc'
-c
-      EQUIVALENCE (SOURCE,ISOURC), (cfform,dfform)
-      EQUIVALENCE (ixlabels, xlabels), (ivellbl, vellbl)
-c
-      data m2, n0, n1, n2, n5, n7, n8, n9, n10, n12, n14, n20, n25, 
-     .     n30, n33, n35, n55, n72, n74, n75, n100, n125, n150, n225, 
-     .     n288, n3, n270, n271, n272
-     .     /-2, 0, 1, 2, 5, 7, 8, 9, 10, 12, 14, 20, 25, 30, 33, 35, 
-     .     55, 72, 74, 75, 100, 125, 150, 225, 288, 3, 270, 271, 272/
-c
-      sclc(ipixel) = max(n1, nint(sclchar*float(ipixel))) 
-c
-      DATA D03/0.001D0/
-      DATA MON/'JAN','FEB','MAR','APR','MAY','JUN',
-     .         'JUL','AUG','SEP','OCT','NOV','DEC'/
-      data nrao12m/'NRAO 12M'/, nrao300/'NRAO 93M'/, 
-     1     nrao140/'NRAO 43M'/
-c
-      data ctype/'1950RADC','EPOCRADC','MEANRADC','APPRADC','APPHADC',
-     2		 'USERDEF','2000RADC','INDRADC'/
-c
-#ifdef CONTINUUM
-      data xlabels/'SAMPLES',
-     .             'TIME(SEC)',
-     .             'POS (DEG)',
-     .             'X-POS (DEG)',
-     .             'Y-POS (DEG)',
-     .             'X-POS (DEG)',
-     .             'Y-POS (DEG)',
-     .             'LST (HOURS)',
-     .             'UT (HOURS)',
-     .		   ' ',
-     .		   ' '/
-#else
-      data xlabels/'CHANNELS ',
-     .		   'FREQUENCY',
-     .             'VELOCITY',
-     .             'VEL. (RADI)',
-     .             'VEL. (OPTI)',
-     .             'VEL. (RELV)',
-     .             'VELOCITY',
-     .		   'REST FREQ.',
-     .		   'SKY FREQ.',
-     .		   'IMAGE REST F',
-     .		   'IMAGE SKY F'/
-#endif
-c
-      IPTWH = 1
-      npp1 = curcur()
-      IX0=XORG(npp1) + sclfctx*140
-      IY0=YORG(npp1) + sclfcty*150
-      IXM=XMAX(npp1) - sclfctx*40
-      IYM=YMAX(npp1) - sclfcty*60
-c    
-      if (ishow .eq. 1) then
-	if(bdrop.lt.0.or.edrop.lt.0.or.
-     1     (bdrop+edrop+1.ge.dtwh(c12ni,iptwh))) 
-     2		call oerror(n288,m2,'SHOW')
-c
-      	ISTART=DTWH(C12SPN,IPTWH)+IDATOFF+BDROP
-      	ISTOP=DTWH(C12SPN,IPTWH)+DTWH(C12NI,IPTWH)
-     .      + IDATOFF - 1 - EDROP
-     	ISBG=ISTART-IDATOFF
-      	ILAST = istop - idatoff
-      	NCHAN=ISTOP-ISTART+1
-c    
-      	if(istart .ge. istop) call oerror(n225, m2, 'SHOW')
-C							Y - SCALING
-      	limy = 5
-c     	5 = number of Y tick marks desired and produced by YSCALE
-c
-      	IF (YLMIN.gt.-9.E09) then
-           IF (YLMIN.gt.-9999.) then
-	     YMIN = YLMIN
-	     YINCR = YLINCR
-           else
-             CALL YSCALE (TWH(1,IPTWH),ISTART,ISTOP,YMIN,YINCR)
-           endif
-	endif
-c
-        AY(npp1)=float(iym-iy0)/(float(limy)*YINCR)
-        BY(npp1)=IY0-YMIN*AY(npp1)
-        AX(npp1)=FLOAT(IXM-IX0)/FLOAT(nchan)
-	bx(npp1)=ix0 - (float(isbg)-0.5)*ax(npp1)
-C							PLOT SPECTRA
-      endif
-c
-      placenxt = .true.
-c     PLACENXT = TRUE if the next point to plot should start off with a PLACE.
-c
-      DO 100 I=1, nchan
-         VAL=TWH(I+istart-1,IPTWH)
-	 if (.not.okreal4(val)) then
-		placenxt = .true.
-		goto 100
-	 endif
-c	 Skip undefined points
-c
-         IY = max(anint(min(AY(npp1)*VAL+BY(npp1),float(iym))),
-     .                  float(iy0))
-	 ix = max(anint(min(float(i+isbg-1)*ax(npp1) + bx(npp1),float(ixm))),
-     .                  float(ix0))
-	 if (iplt .eq. 0) then
-	    if (placenxt) then
-		call placewp(ix, iy, n33)
-	    else
-	    	call vctrwp(ix, iy, n33, sclchar, 0.)
-	    endif
-	 else if (iplt .eq. 1) then
-	    if (placenxt) then
-		call place(ix0, iy)
-	    else
-		call vctr(ixl, iy)
-	    endif
-	    ixr = max(nint(min((float(i+isbg-1)+.5)*
-     .                            ax(npp1) + bx(npp1),float(ixm))),ix0)
-	    call vctr(ixr, iy)
-	    ixl = ixr
-         else IF (IPLT.ge.2) then
-            CALL PLACE(IX-sclc(n5),IY)
-            CALL VCTR(IX+sclc(n5),IY)
-            CALL PLACE(IX,IY-sclc(n5))
-	    call vctr(ix, iy+sclc(n5))
-	 endif
-	 placenxt = .false.
-  100    CONTINUE
-c
-      if (slabel .gt. 0 .and. sclchar .ne. 1.) call charsize(sclchar)
-c
-      IF (SLABEL.gt.1.0 .and. okreal8(dtwh(c1sno,iptwh)))  then
-        NCH=nint(100.0/AX(npp1))
-        IBE=max(istart,ISTOP-NCH)
-        AV=0.0
-        DO 200 I = IBE,ISTOP
-           AV=AV+TWH(I,IPTWH)
- 200      CONTINUE
-        AV=AV/FLOAT(NCH+1)
-        IBY=nint((AV-YMIN)*AY(npp1))+IY0-sclc(n25)
-        WRITE (CPUF,219,IOSTAT=IER) DTWH(C1SNO,IPTWH)
-  219   FORMAT(F8.2)
-        CALL PLACE(IXM-sclc(n8*n14),short(IBY))
-        CALL PCHAR(IPUF,n8)
-      endif
-c     Labels plots wih scan number along the right-hand side of plot.
-c     Only if SLABEL > 1 and a scan is being plotted.
-c
-      IF (ISHOW.EQ.0) GO TO 99
-c     Don't do anything more if this is a RESHOW
-c
-C							BORDER
-      CALL PLACE (IX0,IY0)
-      CALL VCTR	 (IXM,IY0)
-      CALL VCTR	 (IXM,IYM)
-      CALL VCTR	 (IX0,IYM)
-      CALL VCTR	 (IX0,IY0)
-c
-C					       X TICKS AND ANNOTATION
-
-      lxa1 = lxa
-      if (.not. okarray(lxa, dtwh(1,iptwh)) ) then
-         call oerror(n272, n0, 
-     .		'SHOW: Units of lower X-axis will be channels or samples')
-	 lxa1 = 1
-      endif
-      uxa1 = uxa
-      if (.not. okarray(uxa, dtwh(1,iptwh)) ) then
-         call oerror(n272, n0, 
-     .		'SHOW: Units of upper X-axis will be channels or samples')
-	 uxa1 = 1
-      endif
-c
-      xf1 = chantox(lxa1, dtwh(1,iptwh), float(isbg), ierr)
-      xf2 = chantox(lxa1, dtwh(1,iptwh), float(ilast), ierr)
-      call tickmrk(xf1, xf2, n10, xf, xl, dx, limx)
-c     Gets the tick mark parameters for lower axis labelling
-c
-      idelx = 1
-250   if ( idelx*(ixm - ix0 + 1)/(limx+1) .le. sclchar*10*14 .and. 
-     .     idelx .lt. limx-1) then
-	idelx = idelx * 2
-	goto 250
-      endif
-c     Prevents overlapping x labels
-c
-      do 300 i = 1, limx
-	    xz = float(i-1)*dx + xf
-	    ch = xtochan(lxa1, dtwh(1,iptwh), xz, ierr)
-	    ix = nint( ch*ax(npp1) + bx(npp1))
-c	    Finds the pixel number where the tick mark is to be drawn; ch
-c	    is the channel number where the tick has been drawn.
-c
-	    rixt(i) = ix
-c	    Store away location of tick marks into RIXT for use by FULLGRID
-c 
-            CALL PLACE (IX,IY0)
-            CALL VCTR  (IX,IY0+sclc(n12))
-            CALL PLACE (IX,IYM)
-            CALL VCTR  (IX,IYM-sclc(n12))
-c	    Draw tick marks
-c
-	    if (slabel .gt. 0.0 .and. mod(i-1,idelx) .eq. 0) then
-c	    Label tick mark if desired and label wont overlap previous one.
-c
-              CALL PLACE (IX,IY0)
-              CALL VCTR  (IX,IY0+sclc(n20))
-              CALL PLACE (IX,IYM)
-              CALL VCTR  (IX,IYM-sclc(n20))
-	      format = getformat(xz, 2.*xz, n8)
-	      write(cpuf, format, iostat=ier) xz
-	      CALL PLACE (IX-sclc(n10*n14/n2),IY0-sclc(n30))
-              CALL PCHAR (IPUF,n8)
-c	      Label lower axis.
-c
-	    endif
-c
-  300       CONTINUE
-c
-      if (slabel .gt. 0.0) then
-#if CONTINUUM
-        vellbl = xlabels(lxa1)
-#else
-	dveldef = dtwh(c7vrd,iptwh)
-	if (lxa1 .eq. 3 .and. veldef .ne. '        ') then
-	      vellbl = xlabels(lxa1) // '(' // veldef // ')'
-	else
-	      vellbl = xlabels(lxa1)
-	endif
-#endif
-	ivelcnt = lastblnk(vellbl)
-        call place( (ixm+ix0)/n2-sclc(ivelcnt*n14/n2), iy0 - sclc(n55))
-	call pchar(ivellbl,ivelcnt)
-      endif
-c
-      if (uxa1 .eq. lxa1) goto 440
-c
-      xf1 = chantox(uxa1, dtwh(1,iptwh), float(isbg), ierr)
-      xf2 = chantox(uxa1, dtwh(1,iptwh), float(ilast), ierr)
-      call tickmrk(xf1, xf2, n10, xf, xl, dx, limx2)
-c     Gets the tick mark parameters for lower axis labelling
-c
-      idelx = 1
-350   if ( idelx*(ixm - ix0 + 1)/(limx2+1) .le. sclchar*10*14 .and. 
-     .     idelx .lt. limx2-1) then
-	idelx = idelx * 2
-	goto 350
-      endif
-c     Prevents overlapping x labels
-c
-      do 400 i = 1, limx2
-	    xz = float(i-1)*dx + xf
-	    ch = xtochan(uxa1, dtwh(1,iptwh), xz, ierr)
-	    ix = nint( ch*ax(npp1) + bx(npp1))
-c	    Finds the pixel number where the tick mark is to be drawn; ch
-c	    is the channel number where the tick has been drawn.
-c
-            CALL PLACE (IX,IYM)
-            CALL VCTR  (IX,IYM+sclc(n5))
-c	    Draw tick marks
-
-	    if (slabel .gt. 0.0 .and. mod(i-1,idelx) .eq. 0) then
-c	    Label tick mark if desired and label wont overlap previous one.
-c
-              CALL PLACE (IX,IYM)
-              CALL VCTR  (IX,IYM+sclc(n10))
-	      format = getformat(xz, 2.*xz, n8)
-	      write(cpuf, format, iostat=ier) xz
-	      call place(ix-sclc(n10*n14/n2),iym+sclc(n12))
-	      call pchar(ipuf, n8)
-c	      Label upper x-axis
-c
-	    endif
-c
-  400       CONTINUE
-c
-      if (uxa1 .ne. lxa1 .and. slabel .gt. 0.0) then
-#if CONTINUUM
-        vellbl = xlabels(uxa1)
-#else
-	dveldef = dtwh(c7vrd,iptwh)
-	if (uxa1 .eq. 3 .and. veldef .ne. '        ') then
-	      vellbl = xlabels(uxa1) // '(' // veldef // ')'
-	else
-	      vellbl = xlabels(uxa1)
-	endif
-#endif
-	ivelcnt = lastblnk(vellbl)
-        call place( (ixm+ix0)/n2-sclc(ivelcnt*n14/n2), iym + sclc(n35))
-	call pchar(ivellbl,ivelcnt)
-      endif
-C					       Y TICKS AND ANNOTATION
-c
-440   idely = 1
-450   if ( idely*(iym - iy0 + 1)/(limy+1) .le. sclchar*25 .and. 
-     .     idely .lt. limy-1) then
-	idely = idely * 2
-	goto 450
-      endif
-c     Prevent overlapping y labels
-c
-      DO 500 I=1,limy+1
-	 XZ=ymin+float(i-1)*yincr
-	 IY=nint( xz*ay(npp1)+by(npp1))
-	 riyt(i) = iy
-	 CALL PLACE (IX0,IY)
-	 CALL VCTR  (IX0+sclc(n12),IY)
-	 CALL PLACE (IXM,IY)
-  	 CALL VCTR  (IXM-sclc(n12),IY)
-c
-	 if (slabel .gt. 0.0 .and. mod(i-1,idely) .eq. 0) then
-	      CALL PLACE (IX0,IY)
-	      CALL VCTR  (IX0+sclc(n20),IY)
-	      CALL PLACE (IXM,IY)
-  	      CALL VCTR  (IXM-sclc(n20),IY)
-	      format = getformat(xz, 2.*xz, n8)
-	      write(cpuf, format, iostat=ier) xz
-	      CALL PLACE (IX0-sclc(n8*n14),IY-sclc(n12))
-              CALL PCHAR (IPUF,n8)
-	 endif
-  500    CONTINUE
-c
-C					       ZERO LINE
-c
-      IF (ZLLINE.ge.1.0) then
-	 IBY=nint(BY(npp1))
-	 if (iby .ge. iy0 .and. iby .le. iym) then
-	    CALL PLACE (IX0,short(IBY))
-	    CALL VCTR  (IXM,short(IBY))
-	 endif
-      endif
-c
-      DO 560 I = 1,maxmrk
-	  if (cmark(i) .le. -999999.0) goto 561
-	    IbX = CMARK(I) * AX(npp1) + bx(npp1) + 0.5
-	    if (ibx .ge. ix0 .and. ibx .le. ixm) then
-	       CALL PLACE (short(IbX),IYM)
-	       CALL VCTR  (short(IbX),IY0)
-	    endif
-560	    continue
-C           CHANNEL MARKERS
-c
-561   DO 562 I = 1,maxmrk
-	  if (xmark(i) .le. -999999.0) goto 563
-	    xz = xtochan(n3, dtwh(1,iptwh), xmark(i), ierr)
-            if (ierr .ne. 0) call oerror(n270, n0, 'SHOW')
-	    IbX = xz*ax(npp1) + bx(npp1) + 0.5
-	    if (ibx .ge. ix0 .and. ibx .le. ixm) then
-	       CALL PLACE (short(IbX),IYM)
-               CALL VCTR  (short(IbX),IY0)
-	    endif
-562	    continue
-C           VELOCITY MARKERS
-c
-563   DO 564 I = 1,maxmrk
-	  if (fmark(i) .le. -999999.0) goto 565
-	    xz = xtochan(n2, dtwh(1,iptwh), fmark(i), ierr)
-            if (ierr .ne. 0) call oerror(n271, n0, 'SHOW')
-	    IbX = xz*ax(npp1) + bx(npp1) + 0.5
-	    if (ibx .ge. ix0 .and. ibx .le. ixm) then
-               CALL PLACE(short(IbX),IY0)
-               CALL VCTR (short(IbX),IYM)
-	    endif
-564	    continue
-C           Frequency MARKERS
-c
-565   DO 566 I = 1,maxmrk
-	  if (hmark(i) .le. -999999.0) goto 567
-            IbY = HMARK(I)*AY(npp1)+by(npp1) + 0.5
-	    if (iby .ge. iy0 .and. iby .le. iym) then
-               CALL PLACE(IX0,short(IbY))
-               CALL VCTR( IXM,short(IbY))
-	    endif
-566	    continue
-c           Temperature Markers
-C						BASELINE MARKERS
-567   IF (BMARK.ge.1.0) then 
-         DO 580 I=1,maxregn,2
-	    IF ((BREG(I).ne.0)) then
-	       IBY=nint(BY(npp1))
-	       ILOW=min(max(BREG(I)*AX(npp1)+bx(npp1),ix0),ixm)
-	       IHI =min(max(BREG(I+1)*AX(npp1)+bx(npp1),ix0),ixm)
-	       IY1=min(max(short(IBY)+sclc(n75),iy0),iym)
-	       IY2=min(max(short(IBY)-sclc(n75),iy0),iym)
-	       CALL PLACE(ILOW,IY1)
-	       CALL VCTR (ILOW,IY2)
-	       CALL VCTR (IHI ,IY2)
-	       CALL VCTR (IHI, IY1)
-	       CALL VCTR (ILOW,IY1)
-	    endif
- 580	    CONTINUE
-      endif
-c
-C                                                DOCUMENTATION
-      if (.not.okreal8(dtwh(c1sno,iptwh)) .or. slabel .ne. 1.0) goto 99
-c     Don't document plot if the array doesn't contain telescope data
-c
-#ifdef CONTINUUM
-#else
-      if(dtwh(c1tel,iptwh).ne.nrao12m .and.
-     .   (nint(dtwh(c1recid,iptwh)).ne.0 .or. 
-     .    nint(dtwh(c3phsid,iptwh)).ne.0) ) then
-	write(cpuf,609) nint(dtwh(c1recid,iptwh)), 
-     .			nint(dtwh(c3phsid,iptwh))
-609	format('Rec:', i5, ' Phase:', i5)
-        call place(ix0-sclc(n7*n14), iy0-sclc(n75))
-        CALL pchar(IPUF,n72)
-       endif 
-#endif
-      cpuf = ' '
-      DO 600 I = 1,2
-         SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
- 600     CONTINUE
-      DO 610 I = 1,6
-         IPUF(I)=ISOURC(I)
- 610     CONTINUE
-c
-      NAC=DTWH(C13NS,IPTWH)
-      IF (NAC.GT.0.) THEN
-         SCN1=DTWH(C13FS,IPTWH)
-         SCN2=DTWH(C13LS,IPTWH)
-         WRITE (CPUF(14:40),619,IOSTAT=IER) NAC,SCN1,SCN2
- 619     FORMAT (I3,' SCANS:',f8.2,'-',f8.2)
-      ELSE
-	 write(cpuf(14:21),219,iostat=ier) dtwh(c1sno,iptwh)
-      endif
-c
-      UDATE=DTWH(C3DAT,IPTWH)
-      CALL UDAT(UDATE,IMON,IDAY,IYR)
-c
-#ifdef CONTINUUM
-      TIM=DTWH(C12IT,IPTWH)
-      WRITE (CPUF(42:73),629,IOSTAT=IER) tim,IDAY,MON(IMON),IYR
-  629 FORMAT (' INT=',f8.2,' DATE:',1x,i2.2,1x,a3,1x,i4)
-#else
-      TIM=DTWH(C12IT,IPTWH)/(60.0*60.0)
-      call rns(tim, n0, rstr)
-      WRITE (CPUF(42:73),629,IOSTAT=IER) (rstr(i),i=2,5),IDAY,
-     .					  MON(IMON),IYR
-  629 FORMAT (' INT=',1x,4a2,' DATE:',1x,i2.2,1x,a3,1x,i4)
-#endif
-
-c
-      call place(ix0-sclc(n7*n14), iy0-sclc(n100))
-      CALL pchar(IPUF,n74)
-      cpuf = ' '
-c
-      RA=DTWH(c4sx,IPTWH)
-      DEC=DTWH(c4sy,IPTWH)
-      RRA=DTWH(C4RX,IPTWH)
-      IF (RRA .LT. 0.0 .OR. RRA .GT. 360.0) RRA=0.0
-      RDC=DTWH(C4RY,IPTWH)
-      IF (ABS(RDC) .GT. 90.0) RDC=0.0
-      do 680 icdtype = 1, 8
-	 if (dtwh(c4csc,iptwh) .eq. ctype(icdtype)) then
-           CALL RNS(RA,n2,RSTR)
-           CALL RNS(DEC,n1,DSTR)
-           WRITE (CPUF(1:29),639,IOSTAT=IER) dtwh(c4csc,iptwh),
-     .				(RSTR(I),I=2,6),(DSTR(I),I=1,5)
-  639      FORMAT (a8,'=',5A2,5A2)
-           CALL RNS (RRA,n2,RRSTR)
-           CALL RNS (RDC,n1,RDSTR)
-           IF (RRA.GT.0.1 .or. abs(rdc) .gt. 0.1) 
-     .      WRITE (CPUF(31:52),649,IOSTAT=IER) (RRSTR(I),I=2,6),
-     .      				        (RDSTR(I),I=1,5)
-649        FORMAT ('(',5A2,5A2,')')
-	   goto 700
-	 endif
-680      continue
-c        If the coor. code is RA, HA, etc, must convert coordinates into
-c	 hh:mm:ss DD:MM:SS format before printing
-c
-         write(cpuf(1:29),689,iostat=ier) dtwh(c4csc,iptwh), ra, dec
-689      format(a8,'='2f10.4)
-         IF (RRA.GT.0.1 .or. abs(rdc) .gt. 0.1) 
-     .       WRITE (CPUF(31:52),699,IOSTAT=IER) rra, rdc
-699      FORMAT ('(',2f10.4,')')
-c        Else if the coord. code is anything else, use DDD.dddd format
-c
-700   tcal=DTWH(C12CT,IPTWH)
-      TSYS=DTWH(C12SST,IPTWH)
-c
-#ifdef CONTINUUM
-      write(cpuf(54:72),719,iostat=ier) tcal
-719   format('CAL=',f7.2)
-#else
-      write(cpuf(54:73),719,iostat=ier) tcal, tsys
-719   format('CAL=',f6.1,' TS=',f6.0)
-#endif
-c
-      call place(ix0-sclc(n7*n14), iy0-sclc(n125))
-      CALL pchar(IPUF,n74)
-      cpuf = ' '
-c
-      RF=DTWH(C12RF,IPTWH)
-      DVEL=DTWH(C12DX,IPTWH)
-      bw = abs(dtwh(c12fr,iptwh))
-      if(dtwh(c1tel,iptwh).eq.nrao12m) then
-        isb = dtwh(c9sb, iptwh)
-#ifdef CONTINUUM
-        write(cpuf, 729, iostat = ier) dtwh(c12cf, iptwh), 
-     .        dtwh(c1stc, iptwh), isb
- 729    format('FREQ = ', f9.2, 20x, a8,10x, 'SB ',i2)
-#else
-        VCNT=DTWH(C12X0,IPTWH)
-	SYN=DTWH(C9SYN,IPTWH)*D03
-        dosb = dtwh(c10pv, iptwh)
-	WRITE (CPUF,759,IOSTAT=IER) RF,SYN,VCNT,DVEL,nint(bw*1000),ISB,
-     .         osb(1), osb(2)
- 759    FORMAT ('FREQ=',F9.2,' SYN=',F10.8,' VEL=',F8.1,' DV=',
-     .        F6.2,' FR=',I4,' SB=',I1, x, 2a2)
-#endif
-      else 
-        cf = dtwh(c12cf,iptwh)
-        dfform(1) = dtwh(c9cff,iptwh)
-        dfform(2) = dtwh(c9cff+1,iptwh)
-        dfform(3) = dtwh(c9cff+2,iptwh)
-        if (cfform(15:15) .eq. 'L') cfform = '        ' // cfform(1:16)
-c
-        if (cfform(24:24) .eq. 'A') then
-	  rif = dtwh(c9la,iptwh)
-        else if (cfform(24:24) .eq. 'B') then
-	  rif = dtwh(c9lb,iptwh)
-        else if (cfform(24:24) .eq. 'C') then
-	  rif = dtwh(c9lc,iptwh)
-        else 
-	  rif = dtwh(c9ld,iptwh)
-        endif
-c
-#ifdef CONTINUUM
-	write(cpuf,739,iostat=ier) 3600.*dvel/dtwh(c12it,iptwh), 
-     .				    bw, dvel, 
-     .		nint(dtwh(c12ni,iptwh))
-  739   format('RATE=',f11.3,'  CAL FCTR=',f11.5,'  DELTA=',f11.6,
-     1   '  SMPLS',i5)
-#else
-	write(cpuf,749,iostat=ier) rf, cf, rif, bw, dvel
-  749   format('REST=',f11.5,' SKY=',f11.5,' IF=',f6.2,
-     1   ' DFREQ=',1pg10.3,' DV=',g9.2)
-#endif
-c
-      endif
-      call place(ix0-sclc(n7*n14),iy0-sclc(n150))
-      CALL pchar(IPUF,n72)
-c
-99    if (sclchar .ne. 1.) call charsize(1.)
-c
-      return
-c
-      end
diff -uNr 3.5/source/conline/condar/slice.f unipops-3.6/source/conline/condar/slice.f
--- 3.5/source/conline/condar/slice.f	2000-03-16 11:37:39.000000000 -0700
+++ unipops-3.6/source/conline/condar/slice.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,219 +0,0 @@
-      subroutine slice(face, x1, x2)
-c
-c     @(#)slice.f	5.4 05/04/98
-c
-c     Slices a 3-d FITS image file (cube) to produce a matrix; stores results
-c	in Matrix (0).  
-c
-c     FACE = face of the cube perpendicular to which the cibe will be
-c	integrated and parralled to whic the slice will be made.  It's
-c	value must be 1, 2, or 3.
-c     X1, X2 = lower and upper pixel numbers away from the specified face
-c	overwhich integration is to occur.  Must be within the
-c	bounds of the cube
-c
-      integer*4 x1, x2, r1, r2, d1, d2, v1, v2, mloc, i, j, numtrig,
-     .		iloc, ii, jj, numcells, numdone, istch(40),
-     .		iarray(3), time0, time1
-      integer*2 face, ilen, lastblnk, r, v, d, ierr
-      integer*4 l1, l2, l6, l15, l24, l60 
-      integer*2 m2, n112, n80
-      real*4 cube, cval, factor
-      real*8 dinfinity
-      character*80 stch
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      equivalence (istch, stch)
-c
-      data m2, n112, n80
-     .    /-2, 112, 80/
-      data l1, l2, l6, l15, l24, l60
-     .   /1, 2, 6, 15, 24, 60/
-c
-      mloc(ii,jj) = ii + mhead(mnaxis1,1)*(jj-1)
-c     Function which return the location in matrix of a specified pixel.
-c
-      if (face .lt. 1 .or. face .gt. 3) 
-     .	call oerror (n112, m2, 'SLICE:  Bad FACE argument')
-c     Gets the face and checks up on it
-c
-      if (face .eq. 1) then
-	if (x1 .lt. 1 .or. x2 .lt. x1 .or. x2 .gt. chead(cnaxis1)  )
-     .		call oerror(n112, m2, 'SLICE: Bad X1 or X2 argument')
-	v1 = x1
-	v2 = x2
-	r1 = 1
-	r2 = chead(cnaxis2)
-	d1 = 1
-	d2 = chead(cnaxis3)
-	mhead(mnaxis1,1) = chead(cnaxis2)
-	mhead(mnaxis2,1) = chead(cnaxis3)
-	mhead(mrval1,1) = chead(crval2)
-	mhead(mrval2,1) = chead(crval3)
-	mhead(mdelt1,1) = chead(cdelt2)
- 	mhead(mdelt2,1) = chead(cdelt3)
-	mhead(mpix1,1) = chead(cpix2)
-	mhead(mpix2,1) = chead(cpix3)
-	cmhead(mtype1,1) = cchead(ctype2)
-	cmhead(mtype2,1) = cchead(ctype3)
-      	ilen = lastblnk(cchead(cbunit))
-     	cmhead(mbunit,1) = cchead(cbunit)(1:ilen) // '*' // cchead(ctype1)
-	factor = chead(cdelt1)
-      else if (face .eq. 2) then
-	if (x1 .lt. 1 .or. x2 .lt. x1 .or. x2 .gt. chead(cnaxis2) )
-     .		call oerror(n112, m2, 'SLICE: Bad X1 or X2 argument')
-	v1 = 1
-	v2 = chead(cnaxis1)
-	r1 = x1
-	r2 = x2
-	d1 = 1
-	d2 = chead(cnaxis3)
-	mhead(mnaxis1,1) = chead(cnaxis1)
-	mhead(mnaxis2,1) = chead(cnaxis3)
-	mhead(mrval1,1) = chead(crval1)
-	mhead(mrval2,1) = chead(crval3)
-	mhead(mdelt1,1) = chead(cdelt1)
- 	mhead(mdelt2,1) = chead(cdelt3)
-	mhead(mpix1,1) = chead(cpix1)
-	mhead(mpix2,1) = chead(cpix3)
-	cmhead(mtype1,1) = cchead(ctype1)
-	cmhead(mtype2,1) = cchead(ctype3)
-      	ilen = lastblnk(cchead(cbunit))
-     	cmhead(mbunit,1) = cchead(cbunit)(1:ilen) // '*' // cchead(ctype2)
-	factor = chead(cdelt2)
-      else if (face .eq. 3) then
-	if (x1 .lt. 1 .or. x2 .lt. x1 .or. x2 .gt. chead(cnaxis3) ) 
-     .		call oerror(n112, m2, 'SLICE: Bad X1 or X2 argument')
-	v1 = 1
-	v2 = chead(cnaxis1)
-	r1 = 1
-	r2 = chead(cnaxis2)
-	d1 = x1
-	d2 = x2
-	mhead(mnaxis1,1) = chead(cnaxis1)
-	mhead(mnaxis2,1) = chead(cnaxis2)
-	mhead(mrval1,1) = chead(crval1)
-	mhead(mrval2,1) = chead(crval2)
-	mhead(mdelt1,1) = chead(cdelt1)
- 	mhead(mdelt2,1) = chead(cdelt2)
-	mhead(mpix1,1) = chead(cpix1)
-	mhead(mpix2,1) = chead(cpix2)
-	cmhead(mtype1,1) = cchead(ctype1)
-	cmhead(mtype2,1) = cchead(ctype2)
-      	ilen = lastblnk(cchead(cbunit))
-     	cmhead(mbunit,1) = cchead(cbunit)(1:ilen) // '*' // cchead(ctype3)
-	factor = chead(cdelt3)
-      endif
-c     Set up loop indices; check that input params do not go beyond
-c     edge of cube; set up some matrix header parameters
-c
-      if (mhead(mnaxis1,1)*mhead(mnaxis2,1) .lt. 1 .or. 
-     .    mhead(mnaxis1,1)*mhead(mnaxis2,1) .gt. mdatasize/mnumarrays) 
-     .	call oerror(n112, m2, 'SLICE:  Resulting matrix is too big')
-c
-      mhead(mdate,1) = chead(cdate)
-      cmhead(mobject,1) = cchead(cobject)
-      cmhead(mobject+1,1) = cchead(cobject+1)
-      cmhead(morigin,1) = cchead(corigin)
-      do 101 i = 1, min(7,cheadsize-ccomment+1,mheadsize-mcomment+1)
-	cmhead(i-1+mcomment,1) = cchead(i-1+ccomment)
-101	continue
-      mhead(mequinox,1) = chead(cequinox)
-      mhead(mblank,1) = dinfinity()
-      mhead(mbitpix,1) = chead(cbitpix)
-c     Fill in rest of matrix header
-c
-      do 110 j = 1, mhead(mnaxis1,1)
-	do 100 i = 1, mhead(mnaxis2,1)
-	   mdata(mloc(j,i)) = 0.0
-100	   continue
-110	continue
-c      Initialize matrix
-c
-      if (x1 .eq. x2) then
-	factor = 1
-	cmhead(mbunit,1) = cchead(cbunit)
-      endif
-c     Alter the conversion factor from pixel to units of intergration in case
-c	no integration is desired.
-c 
-      numcells = (d2 - d1 +1)*(r2 - r1 + 1)*(v2 - v1 + 1)
-      numdone = 0
-      numtrig = 32767
-      call itime(iarray)
-      time0 = iarray(3) + l60*(iarray(2) + l60*iarray(1))
-c
-      do 220 d = d1, d2
-	do 210 r = r1, r2
-	   do 200 v = v1, v2
-c
-c	   	Step thru the CUBE, most rapidly varying axis first
-c
-		cval = cube(v,r,d)
-c		Assign to CVAL the value of the cube at pixel (V,R,D)
-c
-		if (face .eq. 1) then
-		   iloc = mloc(r,d)
-		else if (face .eq. 2) then
-		   iloc = mloc(v,d)
-		else if (face .eq. 3) then
-		   iloc = mloc(v,r)
-		endif
-c		Finds the location in the matrix of the current pixel.
-c
-		if (cval .ne. chead(cblank)) then
-c
-c		Assign values to the MATRIX if the CUBE has a data value
-c		at the current pixel and the MATRIX also has.
-c
-		   if (mdata(iloc) .ne. mhead(mblank,1)) then
-			mdata(iloc) = mdata(iloc) + cval*factor
-c		        Scale data by delta of intergration axis.
-c
-		   endif
-c		   Performs integration along proper face if the matrix
-c		   already has a data value at the current pixel; else
-c		   don't put any value there.
-c
-		else
-c
-	   	   mdata(iloc) = mhead(mblank,1)
-c		   If any CUBE pixel along the integration is blank, then
-c			the matrix must have a blank value as well
-c
-		endif
-c
-		numdone = numdone + l1
-		if ( mod(numdone, numtrig) .eq. 0 ) then
-		   write(stch,205,iostat=ierr) 100.*float(numdone)/float(numcells)
-205		   format('SLICE: ' f5.1, '% completed.')
-		   call pwrite(istch, n80)
-		   call itime(iarray)
-      		   time1 = iarray(3) + l60*(iarray(2) + l60*iarray(1))
-		   if (time1 .lt. time0) time1 = time1 + l24*l60*l60
-c		   Take care of going tru midnight
-c
-		   if (time1-time0 .gt. l15) then
-			numtrig = max(l1,numtrig / l2)
-		   else if (time1-time0 .lt. l6) then
-			numtrig = l2*numtrig
-		   endif
-		   time0 = time1
-c		   Update NUMTRIG depending upon how long it has been since
-c		   the last time a notice was posted.
-c
-	 	endif
-c		Assures user how much more needs to be done for the slice.
-c
-200		continue
-210	     continue
-220	continue
-c	We are now finished updating the matrix and should now write it to
-c	disk.
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/solve.f unipops-3.6/source/conline/condar/solve.f
--- 3.5/source/conline/condar/solve.f	2000-03-16 11:37:41.000000000 -0700
+++ unipops-3.6/source/conline/condar/solve.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,99 +0,0 @@
-      SUBROUTINE SOLVE (NPTS, SECZ, T, TAMB, TCAL, tau, trcvr)
-C-----------------------------------------------------------------------
-C @(#)solve.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-c
-c     Used by TIPSLV for fitting a simple extinction curve; used for
-c     Green Bank data alone
-C-----------------------------------------------------------------------
-c
-      real*8 tau, trcvr, tamb, tcal, eps, xtamb, xtau, xsecz, der,
-     .       flnpts, sumfnc, sumcrx, dfdtau, res1, fnc, dftau, dftrc, 
-     .	     ftrcvr, deltau, deltrc, sumder, sumdsq, sumrsq, sumres,
-     .	     fexp, res2, res, det, dtau, dtrcvr, ftau, SECZ(*), T(*)
-      character*80 stch
-      integer*2 istch(40), iter, j, npts, nptsm1, n80
-C
-      equivalence (istch, stch)
-c
-      DATA EPS /1.D-6/
-      data n80 /80/
-C
-C:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-C
-      FEXP (XTAU, XSECZ) = DEXP (-XTAU * XSECZ)
-      DFDTAU (XTAMB, XTAU, XSECZ) = XSECZ * XTAMB * FEXP (XTAU, XSECZ)
-C
-      NPTSM1 = NPTS - 1
-      FLNPTS = DBLE (FLOAT (NPTS))
-      TAU = 0.D0
-      TRCVR = T(1)
-C
-      do 100 iter = 1, 60
-c
-         SUMFNC = 0.D0
-         SUMCRX = 0.D0
-         SUMDER = 0.D0
-         SUMDSQ = 0.D0
-         SUMRSQ = 0.D0
-C
-         DO 10 J = 3, NPTS, 3
-            FNC = TAMB * (1.D0 - FEXP (TAU, SECZ(J / 3))) + TRCVR
-            DER = DFDTAU (TAMB, TAU, SECZ(J / 3))
-C
-            RES1 = T(J) - FNC
-            RES2 = T(J - 2) - FNC
-            SUMRES = RES1 + RES2
-            SUMFNC = SUMFNC + SUMRES
-            SUMRSQ = SUMRSQ + RES1 ** 2 + RES2 ** 2
-            SUMCRX = SUMCRX + SUMRES * DER
-            SUMDER = SUMDER + DER + DER
-            SUMDSQ = SUMDSQ + 2.D0 * DER ** 2
- 10         CONTINUE
-C
-         DO 20 J = 2, NPTSM1, 3
-            FNC = TAMB*(1.D0 - FEXP (TAU, SECZ(J / 3 + 1)))+TRCVR+TCAL
-            DER = DFDTAU (TAMB, TAU, SECZ(J / 3 + 1))
-C
-            RES = T(J) - FNC
-            SUMFNC = SUMFNC + RES
-            SUMRSQ = SUMRSQ + RES ** 2
-            SUMCRX = SUMCRX + RES * DER
-            SUMDER = SUMDER + DER
-            SUMDSQ = SUMDSQ + DER ** 2
- 20         CONTINUE
-C
-         DET = FLNPTS * SUMDSQ - SUMDER ** 2
-         DTAU = (FLNPTS * SUMCRX - SUMDER * SUMFNC) / DET
-         DTRCVR = (SUMFNC * SUMDSQ - SUMDER * SUMCRX) / DET
-C
-         TAU = TAU + DTAU
-         TRCVR = TRCVR + DTRCVR
-C
-         FTAU = DTAU / TAU
-         FTRCVR = DTRCVR / TRCVR
-         DFTAU = DABS (FTAU)
-         DFTRC = DABS (FTRCVR)
-C
-         IF (DFTAU .lt. EPS .and. DFTRC .lt. EPS) GO TO 200
-c
- 100     CONTINUE
-c
-      WRITE (unit=stch,fmt=800)
-800   FORMAT ('*** Iteration limit exceeded ***')
-      call pwrite(istch,n80)
-C
-200   continue
-      DELTAU = .75D0 * DSQRT (2.D0 * SUMRSQ / DET)
-      DELTRC = .25D0 * DSQRT (SUMDSQ * SUMRSQ / DET)
-c
-      WRITE (unit=stch,fmt=900)  TAU, DELTAU
-900   FORMAT ('Zenith extinction:   ', f10.5, ' +/- ', f10.5)
-      call pwrite(istch,n80)
-c
-      write (unit=stch,fmt=901) trcvr, deltrc
-901   FORMAT ('Receiver temperature:', f10.2, ' +/- ', f10.2,' K')
-      call pwrite(istch,n80)
-c
-      RETURN
-      END
diff -uNr 3.5/source/conline/condar/splinecf.f unipops-3.6/source/conline/condar/splinecf.f
--- 3.5/source/conline/condar/splinecf.f	2000-03-16 11:37:41.000000000 -0700
+++ unipops-3.6/source/conline/condar/splinecf.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,52 +0,0 @@
-      subroutine splinecf( data, coef, work, num)
-c
-c     @(#)splinecf.f	5.1 06/22/94
-c
-c     Calculates spline coefficients for data in DATA and stores results
-c     in coef.  work is a temporary array and num is the number of
-c     data points. ier = 0 if all goes OK.
-c
-c     Natural cubic spline using algorithm of "Num. Recipes" as a starting
-c     point.  Algorithm suggested by Harvey Liszt. 
-c
-      real data(*), coef(*), work(*)
-      integer*2 num
-      logical okreal4
-c
-      integer*2 ier,n
-c
-      if (num .lt. 5) then
-	ier = -1
-	goto 99
-      endif
-c     Need at least 5 data points for spline fit
-c
-      work(1) = 0.0
-      coef(1) = 0.0
-c
-      do 100 n = 2, num
-	if (okreal4(data(n)) .and. okreal4(data(n+1)) .and.
-     .      okreal4(data(n-1))) then
- 	 coef(n) = 1. / (coef(n-1) + 4.0)
-         work(n) = coef(n)*(work(n-1) - 
-     .            6.*(data(n+1)-2.*data(n)+data(n-1)))
-	else
-	 coef(n) = coef(n-1)
-	 work(n) = work(n-1)
-	endif
-c	This may not be mathematically correct.
-c
-100	continue
-c
-      coef(num) = 0.0
-      do 110 n = num-1, 1, -1
-	coef(n) = coef(n)*coef(n+1)+work(n)
-110	continue
-c
-      ier = 0
-c
-99    continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/summary.F unipops-3.6/source/conline/condar/summary.F
--- 3.5/source/conline/condar/summary.F	2000-03-16 11:37:42.000000000 -0700
+++ unipops-3.6/source/conline/condar/summary.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,627 +0,0 @@
-      subroutine summary
-C---------------------------------------------------------------------------
-C @(#)summary.F	5.2 09/10/98
-C---------------------------------------------------------------------------
-C
-C        one line summary of each scan, limited by information in the SDD
-C        index block
-C
-C        SUMMARY: on-line data and then off-line data file
-C        DSCANS  SUMMARY: summarizes off-line data file
-C        KSCANS  SUMMARY: summarizes keep file
-C        SSCANS  SUMMARY: summarizes save file
-C        GSCANS  SUMMARY: summarizes gains on-line then off-line file
-C        RSCANS  SUMMARY: summarizes off-line records file
-C
-C  Format of summary line:
-C 
-C     Continuum:
-C  Scan No  Source Name        Obs Pos  (COORDSYS)    Rate         Int. Time
-C                              H coord     V coord    (AAA)         (AAA)
-CA FFFFF.FF AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA GGGGGGGGGGGG FFF.FF
-CA IIIII II AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA GGGGGGGGGGGG FFF.FF
-C     Line:
-C  Scan No  Source Name        Obs Pos  (COORDSYS)   Resolution   Rest Freq
-C                              H coord     V coord    (AAA)         (AAA)
-CA FFFFF.FF AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA GGGGGGGGGGGG GGGGGGGGGGGGG
-CA IIIII II AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA GGGGGGGGGGGG GGGGGGGGGGGGG
-C
-C  Where the first A is either 'O','D','K','S','G','g','Z','z', or 'R'
-C  depending on the file type.
-C  The lower case g and z are for the off-line files.
-C  Two AAA fields in the 2nd header line are independantly set to
-C  kHz, MHz, or GHz as appropriate.  The COORDSYS field is set to an 8
-C  character string which indicates the coordinate system of the observed
-C  position as indicated by the position code in the index.  
-C  The header lines are printed whenever any of these three fields change.  
-C  The formats of the 12 character string fields for H coord and V coord 
-C  are determined by the position code.  
-C	RA-like:       xxHHxMMxSS.S
-C	Dec-like:      xADDxMMxSSxx		A=sign
-C       Gal. AZEL:     xDDD.ddddxxx xADD.ddddxxx
-C
-C  For the on-line data, no index block exists and consequently the values
-C  must come from the full scan header - which takes time.
-C
-C  Before each block of 10 lines the following line is printed:
-C---- (IIIII) --------------------------------------------------------------
-C where IIIII is the number of the next scan location to be summarized
-C
-C  If the current scan location to be summarized does not contain an
-C  appropriate summary (its empty, the scan number could
-C  not be found [the list changed between the time it was gotten and when
-C  summary got to this scan], etc) then the following line is printed:
-C
-C     -----
-C
-C---------------------------------------------------------------------------
-      include 'params.inc'
-c
-      integer*4 idatsize
-      parameter (idatsize = 1024)
-      integer*2 i2dat(idatsize), ierr, index(32), iflag, lastblnk
-      integer*2 m3, m2, m1, n80, n112, n120
-      integer*4 ifun, ifile, numheadrecs, numindexperrec,
-     1          numdatarecs, ibytperrec, ibytperheaditem, lastindexitem,
-     2          irec, i1, ind, istart, istop, iposcode, i4pc, 
-     3          i8pc, i16pc, ii, i, lastrecord, lastindex, loopmax, 
-     4          ioldpos, irestf, iresol, imax, iactual,
-     5          iscanno, irtn, numout, l0, i4dat(idatsize/2),
-     6          number, lunit, lrtn, isubsc, oldscan, RECORDS
-      integer*4 n1, n2, n4, n5, n6, n7, n8, n9, n13, n16, n17, n18, 
-     .          n19, n20, n21
-      logical*4 skipscan
-#ifdef CONTINUUM
-      integer*4 ifeed
-#else
-      integer*4 onlinesite
-      logical lsetresol, lsetrestf
-#endif
-      logical lshowhead, lsomething, lfirst
-      integer*4 bsummary, esummary
-      real*4 coordh, coordv, scanno, rdat(idatsize/2), rindex(16)
-      real*4 rscans(32767)
-      real*8 freqresol, restfreq, funits(3), ddat(idatsize/4), 
-     1       rflimit, frlimit
-      real*8 xdata(HDU_FLOAT_SIZE/2), dindex(8)
-      character*1 filetypes(6), prefix
-      character*8 poscodes(14)
-      character*3 cunits(3)
-      character*16 sname, cdat(idatsize/8)
-      character*12 ccoordh, ccoordv, flnme(4)
-      character*32 crshfle
-c
-      include 'stk.inc'
-      include 'cio.inc'
-      include 'cform.inc'
-      include 'core.inc'
-c
-      equivalence (i2dat, i4dat, rdat, ddat, cdat)
-      equivalence (index, dindex, rindex)
-c
-#ifdef CONTINUUM
-      data cunits /'   ','sec','"/s'/
-#else
-      data cunits /'GHz','MHz','kHz'/
-#endif
-      data funits /1000.0, 1.0, 0.001/
-      data frlimit /1.0/ rflimit /10.0/
-      data imax /32767/
-      data poscodes /'GALACTIC','1950RADC','EPOCRADC','MEANRADC',
-     1               'APPRADC ','APPHADC ','1950ECL ','EPOCECL ',
-     2               'MEANECL ','APPECL  ','AZEL    ','USERDEF ',
-     3               '2000RADC','INDRADC '/
-      data l0 /0/
-      data filetypes /'O','D','K','S','g','R'/
-      data flnme /'Offline data', 'Keep', 'Save', 'Gains'/
-c
-      data m3, m2, m1, n80, n112, n120
-     .    /-3, -2, -1, 80, 112, 120/
-      data n1, n2, n4, n5, n6, n7, n8, n9, n13, n16, n17, n18, 
-     .          n19, n20, n21
-     .     /1, 2, 4, 5, 6, 7, 8, 9, 13, 16, 17, 18, 19, 20, 21/
-c
-      parameter (RECORDS=5)
-c
-      i4pc(ii) = (ii-n1)/n2 + n1
-      i8pc(ii) = (ii-n1)/n4 + n1
-      i16pc(ii)= (ii-n1)/n8 + n1
-c
-      iposcode = 2
-      ioldpos = -1
-      oldscan  = -32767
-      ierr = 0
-c			set bsummary esummary to bscan, escan
-c			just get the integer part
-c			if esummary = 0, no upper limit
-      bsummary = ifix(bscan)
-      esummary = ifix(escan)
-      if (esummary .eq. 0) esummary = 100000
-c			is anything else present on the stack?
-      ifun = 0
-      if (sp.lt.1) call oerror(n112, m1, 'SUMMARY')
-      ifun = nint(v(sp)) 
-      sp = sp - 1
-c			is it likely to be appropriate
-      if (ifun.lt.1 .or. ifun.gt.17) call oerror(n112, m1, 'SUMMARY')
-      go to (10, 50, 60, 70, 75) ifun
-      if (ifun .eq. 16) goto 20
-      if (ifun .eq. 17) goto 10
-c			if it gets here ifun was inappropriate
-      call oerror(n112, m3, 'SUMMARY')
-c---------------------------------------------------------------------------
-c 			summary
-c---------------------------------------------------------------------------
- 10   continue
-      prefix = filetypes(1)
-      if (online) then
-c				first, get the list of scans
-#ifdef CONTINUUM
-	 call gcontlist2(iactual, imax, rscans, irtn)
-#else
-	 call gscanlist2(iactual, imax, rscans, irtn)
-#endif
-c
-         if (irtn.eq.0 .and. iactual.gt.0) then
-            write(cpuf,1010) 
-            call pwrite(ipuf,n80)
-            write(cpuf, 1014) bscan, escan
-            call pwrite(ipuf, n80)
-            irestf = 0
-            iresol = 0
-            lshowhead = .false.
-            numout = 0
-c				loop through list of scans, getting each one
-            lfirst = .true.
-            do 15 i1 = 1, min(iactual, imax)
-               scanno = rscans(i1)
-               iscanno = ifix(scanno)
-               isubsc = ifix((scanno - iscanno)*100.0 + 0.5)
-c				is this scan in the appropriate range
-               if (iscanno .ge. bsummary .and. 
-     .             iscanno .le. esummary) then
-c				get scan from on-line computer
-#ifdef CONTINUUM
-		  ifeed = 1
-                  if (isubsc .ne. 0) ifeed = isubsc
-		  call gchead(iscanno, ifeed, xdata, irtn)
-#else
-                  call gshead(iscanno,isubsc,xdata,irtn)
-#endif
-                  if (irtn .gt. 0) then
-                     if (lfirst) then
-                        lfirst = .false.
-                        iresol = 3
-                        irestf = 2
-                        if (iposcode .eq. 0) iposcode = 2
-                        write (cpuf, 1110) poscodes(iposcode)
-                        call pwrite(ipuf,n80)
-                        write (cpuf, 1120) cunits(iresol),cunits(irestf)
-                        call pwrite(ipuf,n80)
-                     end if
-                     numout = numout + 1
-                     if (mod(numout,10).eq.0) then
-                        write(cpuf, 1105) numout
-                        call pwrite(ipuf,n80)
-                     end if
-                     write(cpuf,1136) iscanno
-                     call pwrite(ipuf,n80)
-c
-                  else
-                     index(1) = isubsc
-  160                call gnextindex(xdata, index)
-                     if (index(1) .lt. 0) then
-c				if its not -100 then the index hasn't changed
-c				but we need to keep making calls to gnextindex
-c				until it returns -100, i.e. no more feeds left
-c				but only if isubsc == 0
-                        if (index(1) .ne. -100 .and.
-     .                      isubsc .eq. 0) goto 160
-                     else if (index(1) .ge. 1) then
-c		  		extract the relevant fields
-                        iscanno = rindex(i4pc(n17))
-                        coordh = rindex(i4pc(n5))
-                        coordv = rindex(i4pc(n7)) 
-                        write(sname,1011) 
-     1                      dindex(i8pc(n9)), dindex(i8pc(n13))
-                        restfreq = dindex(i8pc(n21))
-                        freqresol = rindex(i4pc(n19))
-                        ioldpos = iposcode
-                        iposcode = index(31)
-c				the rest is almost just like below for output
-#ifdef CONTINUUM
-		        lshowhead = iposcode .ne. ioldpos
-			irestf = 2
-			iresol = 3
-#else
-                        call setunits(freqresol, funits, frlimit,
-     1                                iresol, lsetresol)
-                        call setunits(restfreq, funits, rflimit, 
-     1                                irestf, lsetrestf)
-                        lshowhead = lsetresol .or. lsetrestf .or.
-     1                               (iposcode .ne. ioldpos)
-#endif
-                        iflag = 1
-                        if (iposcode .eq. 0) iposcode = 2
-                        if (iposcode .eq. 1 .or. iposcode .eq. 11 .or.
-     1                           iposcode .eq. 12) iflag = 3
-                        call posstring(coordh, iflag, ccoordh)
-                        iflag = iflag + 1
-                        call posstring(coordv, iflag, ccoordv)
-                        if (lshowhead) then
-                           write(cpuf,1110) poscodes(iposcode)
-                           call pwrite(ipuf,n80)
-                           write(cpuf,1120) 
-     1                         cunits(iresol), cunits(irestf)
-                           call pwrite(ipuf,n80)
-                        end if
-                        numout = numout + 1
-                        if (mod(numout,10).eq.0) then
-                           write(cpuf, 1105) numout
-                           call pwrite(ipuf,n80)
-                        end if
-                        write(cpuf,1131) prefix, iscanno, index(1), 
-     1                    sname, ccoordh, ccoordv, freqresol, restfreq
-                        call pwrite(ipuf,n80)
-#ifdef CONTINUUM
-#else
-                        if (isubsc .eq. 0) go to 160
-#endif
-                     end if
-                  end if
-               end if
- 15         continue
-         else
-            write(cpuf,1015)
-            call pwrite(ipuf,n80)
-         end if
-      else
-         write(cpuf,1020)
-         call pwrite(ipuf,n80)
-      end if
-c
-      if (ifun .eq. 17) goto 990
-c
-c---------------------------------------------------------------------------
-c                       dscans summary, continuation of summary
-c---------------------------------------------------------------------------
- 20   continue
-      ifile = 1
-      go to 100
-c---------------------------------------------------------------------------
-c                       kscans summary
-c---------------------------------------------------------------------------
- 50   continue
-      ifile = 2
-      go to 100
-c---------------------------------------------------------------------------
-c                       records summary
-c---------------------------------------------------------------------------
- 75   continue
-      ifile = 5
-      go to 100
-c---------------------------------------------------------------------------
-c                       sscans summary
-c---------------------------------------------------------------------------
- 60   continue
-      ifile = 3
-      goto 100
-c---------------------------------------------------------------------------
-c                       gscans summary
-c---------------------------------------------------------------------------
- 70   continue
-      ifile = 4
-      prefix = 'G'
-c
-#ifdef CONTINUUM
-c		gains are line only, don't look online
-c		on the other hand, if a file is connected at
-c		ifile = 4 and the user askes for summary gscans
-c		we may as well give them the info.
-#else
-      if (online) then
-        if (onlinesite() .eq. 1) then
-
-c				first, get the list of scans
-         call ggscanlist2(iactual, imax, rscans, irtn)
-         if (irtn.eq.0 .and. iactual.gt.0) then
-            write(cpuf,1013) 
-            call pwrite(ipuf,n80)
-            write(cpuf, 1014) bscan, escan
-            call pwrite(ipuf, n80)
-            irestf = 0
-            iresol = 0
-            lshowhead = .false.
-            numout = 0
-c				loop through list of scans, getting each one
-            do 115 i1 = 1, min(iactual, imax)
-               scanno = rscans(i1)
-               iscanno = ifix(scanno)
-               isubsc = ifix((scanno - iscanno)*100.0 + 0.5)
-c			is this scan in the appropriate range
-               if (iscanno .ge. bsummary .and. 
-     .             iscanno .le. esummary) then
-c				get scan from on-line computer
-                  call ggscan(iscanno,isubsc,xdata,irtn)
-                  if (irtn .gt. 0) then
-                     if (i1 .eq. 1) then
-                        iresol = 3
-                        irestf = 2
-                        if (iposcode .eq. 0) iposcode = 2
-                        write (cpuf, 1110) poscodes(iposcode)
-                        call pwrite(ipuf,n80)
-                        write (cpuf, 1120) cunits(iresol),cunits(irestf)
-                        call pwrite(ipuf,n80)
-                     end if
-                     numout = numout + 1
-                     if (mod(numout,10).eq.0) then
-                        write(cpuf, 1105) numout
-                        call pwrite(ipuf,n80)
-                     end if
-                     write(cpuf,1136) iscanno
-                     call pwrite(ipuf,n80)
-c
-                  else
-                     index(1) = isubsc
-  260                call gnextindex(xdata, index)
-                     if (index(1) .lt. 0) then
-                        if (index(1) .ne. -100 .and. 
-     .                          isubsc .eq. 0) go to 260
-                     else if (index(1) .ge. 1) then
-c		  		extract the relevant fields
-                        iscanno = rindex(i4pc(n17))
-                        coordh = rindex(i4pc(n5))
-                        coordv = rindex(i4pc(n7)) 
-                        write(sname,1011) 
-     1                      dindex(i8pc(n9)), dindex(i8pc(n13))
-                        restfreq = dindex(i8pc(n21))
-                        freqresol = rindex(i4pc(n19))
-                        ioldpos = iposcode
-                        iposcode = index(31)
-c				the rest is almost just like below for output
-                        call setunits(freqresol, funits, frlimit,
-     1                                iresol, lsetresol)
-                        call setunits(restfreq, funits, rflimit, 
-     1                                irestf, lsetrestf)
-                        lshowhead = lsetresol .or. lsetrestf .or.
-     1                               (iposcode .ne. ioldpos)
-                        iflag = 1
-                        if (iposcode .eq. 0) iposcode = 2
-                        if (iposcode .eq. 1 .or. iposcode .eq. 11 .or.
-     1                           iposcode .eq. 12) iflag = 3
-                        call posstring(coordh, iflag, ccoordh)
-                        iflag = iflag + 1
-                        call posstring(coordv, iflag, ccoordv)
-                        if (lshowhead) then
-                           write(cpuf,1110) poscodes(iposcode)
-                           call pwrite(ipuf,n80)
-                           write(cpuf,1120) 
-     1                         cunits(iresol), cunits(irestf)
-                           call pwrite(ipuf,n80)
-                        end if
-                        numout = numout + 1
-                        if (mod(numout,10).eq.0) then
-                           write(cpuf, 1105) numout
-                           call pwrite(ipuf,n80)
-                        end if
-                        write(cpuf,1131) prefix, iscanno, index(1), 
-     1                    sname, ccoordh, ccoordv, freqresol, restfreq
-                        call pwrite(ipuf,n80)
-                        if (isubsc .eq. 0) go to 260
-                     end if
-                  end if
-               end if
- 115         continue
-         else
-            write(cpuf,1016)
-            call pwrite(ipuf,n80)
-         end if
-        else
-           write(cpuf, 1018)
-           call pwrite(ipuf,n80)
-        endif
-      else
-         write(cpuf,1020)
-         call pwrite(ipuf,n80)
-      end if
-c		Ok, that takes care of the on-line gains, now for the off-line
-c
-#endif
-c			this is what does it all
-c
- 100  continue
-c			is the file available
-      lunit = iounit(ifile)
-C
-      prefix = filetypes(ifile+1)
-      numout = 0
-      lsomething = .false.
-c
-c			first get the bootstrap information
-      call getsddbs(lunit, numheadrecs, numdatarecs, ibytperrec, 
-     .           ibytperheaditem, lastindexitem, lrtn)
-      if (lrtn .ne. 0) then
-         if (lrtn .eq. 1) then
-	    write(cpuf, 1095) flnme(ifile)(1:lastblnk(flnme(ifile))) // 
-     .                     ' file does not exist or is unavailable.'
-            call pwrite(cpuf, n80)
-         endif
-         if (lrtn .eq. 2) ierr = 357
-         if (lrtn .ge. 3) ierr = 359
-         goto 990
-      endif
-c
-      write(cpuf,1090) crshfle(ciounit(ifile))
-      call pwrite(ipuf,n80)
-      write(cpuf, 1014) bscan, escan
-      call pwrite(ipuf, n80)
-c			is idat large enough to hold ibytperheaditem
-      if (idatsize*2 .lt. ibytperheaditem) then
-         ierr = 359
-         goto 990
-      endif
-c			
-      numindexperrec = ibytperrec / ibytperheaditem
-      lastrecord = ((lastindexitem-1)/numindexperrec) + 1
-      lastindex= lastindexitem - (lastrecord-1)*numindexperrec
-      if (lastrecord+1 .gt. numheadrecs) then
-         lastrecord = numheadrecs-1
-         lastindex= numindexperrec
-      end if
-      loopmax = numindexperrec
-c				now, process the index and produce the summary
-      if (lastindexitem.gt.0 .and. numheadrecs.ge.2) then
-         irestf = 0
-         iresol = 0
-         lshowhead = .false.
-         do 200 irec = 1, lastrecord
-c				read a record in
-            ind = (irec - 1) * numindexperrec + 1
-            if (irec .eq. lastrecord) loopmax = lastindex
-            number = loopmax
-            call getnindex(lunit, ind, i2dat, number, lrtn)
-            if (lrtn .ne. 0 .or. number .ne. loopmax) then
-               ierr = 357
-               goto 990
-            endif
-c
-            do 250 i = 1, loopmax
-               i1 = (i-1)*ibytperheaditem/2 + 1
-               ind = i + numindexperrec*(irec-1)
-               scanno = rdat(i4pc(i1+n16))
-               iscanno = ifix(scanno)
-	       if (ifile .eq. RECORDS) then
-		  if (nint(scanno) .ne. oldscan ) then
-		     oldscan = nint(scanno)
-		     skipscan = .false.
-		  else
-		     if ( nint(100.*(scanno-oldscan)) .le. 1.) skipscan = .true.
-		     if (skipscan) goto 250
-		  endif
-	       endif
-               if ((ifile .ne. 3. .and. iscanno .ge. bsummary .and. 
-     1              iscanno .le. esummary) .or.
-     2             (ifile .eq. 3 .and. ind .ge. bsummary .and.
-     3              ind .le. esummary)) then
-                  istart = i4dat(i4pc(i1))
-                  istop = i4dat(i4pc(i1+2))
-                  if (istop .ge.istart .and. istart.gt.0) then
-                     ioldpos = iposcode
-                     iposcode = i2dat(i1+30)
-                     coordh = rdat(i4pc(i1+n4))
-                     coordv = rdat(i4pc(i1+n6))
-                     sname = cdat(i16pc(i1+n8))
-                     freqresol = rdat( i4pc(i1+n18) )
-                     restfreq = ddat( i8pc(i1+n20) )
-#ifdef CONTINUUM
-		     lshowhead = iposcode .ne. ioldpos
-		     irestf = 2
-		     iresol = 3
-#else
-                     call setunits(freqresol, funits, frlimit,
-     1                             iresol, lsetresol)
-                     call setunits(restfreq, funits, rflimit,
-     1                             irestf, lsetrestf)
-                     lshowhead = lsetresol .or. lsetrestf .or. 
-     1                             (iposcode .ne. ioldpos)
-#endif
-                     iflag = 1
-                     if (iposcode .eq. 1 .or. iposcode .eq. 11 .or.
-     1                   iposcode .eq. 12) iflag = 3
-                     call posstring(coordh, iflag, ccoordh)
-                     iflag = iflag + 1
-                     call posstring(coordv, iflag, ccoordv)
-                     if (lshowhead) then 
-                        if (iposcode .eq. 0) iposcode = 2
-                        write(cpuf,1110) poscodes(iposcode)
-                        call pwrite(ipuf,n80)
-                        write(cpuf,1120) cunits(iresol), cunits(irestf)
-                        call pwrite(ipuf,n80)
-                     end if
-                     if (ifile .ne. 3) then
-                        numout = numout + 1
-                        if (mod(numout,10).eq.0) then
-                           write(cpuf,1105) numout
-                           call pwrite(ipuf,n80)
-                        end if
-                     else
-                        if (mod(ind,10).eq.0 .or. (ind.eq.bsummary 
-     1                             .and. ind.ne.1)) then
-                           write(cpuf,1105) ind
-                           call pwrite(ipuf,n80)
-                        end if
-                     end if
-                     write(cpuf,1130) prefix, scanno, sname,
-     1                   ccoordh, ccoordv, freqresol, restfreq
-                     call pwrite(ipuf,n80)
-                     lsomething = .true.
-                  else if (ifile .eq. 3) then
-                     if (ind .eq. 1) then
-		        iresol = 3
-                        irestf = 2
-                        if (iposcode .eq. 0) iposcode = 2
-                        write (cpuf, 1110) poscodes(iposcode)
-                        call pwrite(ipuf,n80)
-                        write (cpuf, 1120) 
-     1                       cunits(iresol), cunits(irestf)
-                        call pwrite(ipuf,n80)
-                     end if
-                     if (mod(ind,10).eq.0 .or. (ind.eq.bsummary .and. 
-     2                               ind.ne.1)) then
-                        write(cpuf,1105) ind
-                        call pwrite(ipuf,n80)
-                     end if
-                     write(cpuf,1135)
-                     call pwrite(ipuf,n80)
-                  end if
-               end if
- 250        continue
- 200     continue
-      end if
-      if (.not. lsomething) then
-         write(cpuf,1095) 'File is empty'
-         call pwrite(ipuf,n80)
-      end if
-c
- 990  if (ierr .ne. 0) then
-c		ierr=370 is not a serious error in this instance
-c		Also, the previous output from summary should indicate
-c		that this error has come from summary.
-         if (ierr .eq. 370) then
-            call oerror(ierr, m2, 'SUMMARY')
-         else
-            call oerror(ierr, m2, 'SUMMARY')
-         endif
-      endif
-      return
-c
- 1010 format('Summary of on-line data file.')
- 1014 format('    Using bscan = ',f9.2,' escan = ',f9.2)
- 1011 format(2a8)
- 1013 format('Summary of on-line gains file')
- 1015 format('On-line data file is empty or does not exist.')
- 1016 format('On-line Gains file is empty or does not exist.')
- 1018 format('On-line data is NOT 12-m data.')
- 1020 format('Online data is not available ')
- 1090 format('Summary of file : ', a32)
- 1095 format(a)
- 1105 format('---- (',i5,') ',62('-'))
-#ifdef CONTINUUM
- 1110 format(2x,'Scan No',2x,'Source Name',8x,'Obs Pos',
-     1       2x,'(',a8,')',4x,'Rate',10x,'Int. Time')
-#else
- 1110 format(2x,'Scan No',2x,'Source Name',8x,'Obs Pos',
-     1       2x,'(',a8,')',3x,'Resolution',3x,'Rest Freq')
-#endif
- 1120 format(30x,'H coord',5x,'V coord',4x,'(',a3,')',9x,'(',a3,')')
-#ifdef CONTINUUM
- 1130 format(a1,x,f8.2,x,a16,a12,a12,x,g12.6,x,f6.2)
- 1131 format(a1,x,i5,x,i2,x,a16,a12,a12,x,g12.6,x,f6.2)
-#else
- 1130 format(a1,x,f8.2,x,a16,a12,a12,x,g12.6,x,g13.8)
- 1131 format(a1,x,i5,x,i2,x,a16,a12,a12,x,g12.6,x,g13.8)
-#endif
- 1135 format(5x,'-----')
- 1136 format(5x,'---- Scan ',i5,' not found.  May no longer exist.')
-c
-      end
diff -uNr 3.5/source/conline/condar/table.F unipops-3.6/source/conline/condar/table.F
--- 3.5/source/conline/condar/table.F	2000-03-16 11:37:44.000000000 -0700
+++ unipops-3.6/source/conline/condar/table.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,124 +0,0 @@
-      subroutine table
-C-------------------------------------------------------------------------------
-C  @(#)table.F	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c    Prints out a table of data values.
-c
-C-------------------------------------------------------------------------------
-c
-      character*80 cpuf
-      real*4 scan 
-      integer*2 iptwh, ipuf(40), ier, ierr, lxa1
-      integer*2 m2, n80, n288, n0, n272
-      integer*4 istart, istop, i, lj, lm
-      double precision chantox
-      logical okarray, okreal8
-c
-#ifdef CONTINUUM
-#else
-      real*8 fib, dosb, nrao12m
-      integer*4 iosb(2)
-      equivalence (dosb, iosb(1))
-      data nrao12m /'NRAO 12M'/
-#endif
-c
-      include 'cform.inc'
-      include 'appl.inc'
-      include 'core.inc'
-c
-      equivalence (ipuf, cpuf)
-c
-      data m2, n80, n288, n0, n272 /-2, 80, 288, 0, 272/
-c
-c*****************************************
-c
-      iptwh = 1
-c
-c
-      ISTART=DTWH(C12SPN,IPTWH)+BDROP+IDATOFF
-      ISTOP = DTWH(C12SPN,IPTWH) + DTWH(C12NI,IPTWH) + IDATOFF - 
-     1        1 - EDROP
-      if (istart .ge. istop) call oerror(n288, m2, 'TABLE')
-c
-      if (okreal8(dtwh(c1sno,iptwh))) then
-         SCAN=DTWH(C1SNO,IPTWH)
-c
-#ifdef CONTINUUM
-         WRITE(CPUF,209,IOSTAT=IER) SCAN
-209      format(10x,f8.2)
-         CALL PWRITE(IPUF,n80)
-#else
-         fib=abs(DTWH(C12FR,IPTWH))
-         if (dtwh(c1tel,iptwh) .eq. nrao12m) then
-            dosb = dtwh(c10pv, iptwh)
-            write(cpuf,2091,iostat=ier) scan, fib, iosb
-2091        format(10x,f8.2,5x,'Freq. Res.',1pg18.10,' MHz',x,a4)
-         else
-            WRITE(CPUF,209,IOSTAT=IER) SCAN,fib
-209         format(10x,f8.2,5x,'Freq. Res.',1pg18.10, ' MHz')
-         endif
-         CALL PWRITE(IPUF,n80)
-#endif
-c
-      endif
-c     Write out header if the array contains telescope data
-c
-      lxa1 = lxa
-      if (.not. okarray(lxa, dtwh(1,iptwh)) ) then
-         call oerror(n272, n0,
-     .		 'TABLE: Units of X-axis will be channels or samples')
-	 lxa1 = 1
-      endif
-c
-#ifdef CONTINUUM
-      if (lxa1 .eq. 1) then
-	 WRITE(CPUF,210,IOSTAT=IER) 
-210      format(6x, 3('Samples  Temperature ') )
-      else if (lxa1 .eq. 2 .or. lxa1 .ge. 8) then
-	 WRITE(CPUF,212,IOSTAT=IER) 
-212      format(6x, 3('  Time   Temperature ') )
-      else
-	 WRITE(CPUF,211,IOSTAT=IER) 
-211      format(6x, 3('  Pos.   Temperature ') )
-      endif
-#else
-      if (lxa1 .eq. 1) then
-	 WRITE(CPUF,210,IOSTAT=IER) 
-210      format(6x, 3('Channels Temperature ') )
-      else if (lxa1 .eq. 2 .or. lxa1 .ge. 8) then
-	 WRITE(CPUF,211,IOSTAT=IER) 
-211      format(6x, 3('  Freq.  Temperature ') )
-      else
-	 WRITE(CPUF,212,IOSTAT=IER) 
-212      format(6x, 3('  Vel.   Temperature ') )
-      endif
-#endif
-c
-      CALL PWRITE(IPUF,n80)
-c
-c
-      ierr = 0
-      do 30 i = istart, istop, 3
-	  lj = min(istop, i+2)
-c
-          if (lxa1 .eq. 1) then
-	     WRITE(CPUF,3000,IOSTAT=IER) (float(lm-idatoff), 
-     .				twh(lm, iptwh), lm = i, lj)
-3000         format(5x,':',1p6g11.3)
-	  else
-	     WRITE(CPUF,3001,IOSTAT=IER) i-idatoff, 
-     1         (chantox(lxa1, dtwh(1,iptwh), float(lm-idatoff), ierr), 
-     2         twh(lm, iptwh), lm = i, lj)
-3001         format(i5,':',1p6g11.3)
-	  endif
-c
-          CALL PWRITE(IPUF,n80)
-   30     CONTINUE
-c	  Write out data values and an appropriate x-axis value.
-c
-99    continue
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/tellout.f unipops-3.6/source/conline/condar/tellout.f
--- 3.5/source/conline/condar/tellout.f	2000-03-16 11:37:44.000000000 -0700
+++ unipops-3.6/source/conline/condar/tellout.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,82 +0,0 @@
-      subroutine tellout (scans, numscans, ldoblank, prefix,
-     +                    istype, numout)
-c-------------------------------------------------------------------------
-c @(#)tellout.f	5.1 06/22/94
-c
-c    This is the subroutine that actually formats the output for the tell
-c    command.
-c
-c   scans(*) real*4  the array holding the list of scan numbers 
-c   numscans integer*4 the number of scans in the array scans(*)
-c   ldoblank logical*2 true if scan numbers of 0 are to be represented
-c               in the output as blank space.  Used on the SAVE file.
-c		Usefull for any file where the location of the scan within
-c		the file needs to be known.
-c   prefix character*1 the initial character to put on the line 
-c   istype integer*4 if = 1 than the scans are really integers and should
-c		   be treated as such, with 10 per line
-c   numout integer*4 Return value: number of scans written out (numout)
-c--------------------------------------------------------------------------
-c
-      integer*4 numscans, numout, ifirst, ilast, i, istype,
-     1          nline, nsize, i1
-      integer*2 n72
-      logical*2 ldoblank, ldoint
-      real*4 scans(*)
-      character*1 prefix
-c
-      include 'cio.inc'
-c
-      data n72 /72/
-c			initialize things
-      numout = 0
-c			nline = number of scans per line of output
-c			nsize = size of each field
-      nline = 7
-      nsize = 9
-      ldoint = .false.
-      if (istype .eq. 1) then
-         nline = 10
-         nsize = 6
-         ldoint = .true.
-      end if
-      do 100 i = 1, numscans
-         if (scans(i) .ne. 0) then
-            numout = numout + 1
-            ifirst = mod(numout-1,nline) * nsize + 10
-            ilast = ifirst + nsize - 1
-            if (ldoint) then
-               write(cpuf(ifirst:ilast), 1005) int(scans(i))
-            else
-               write(cpuf(ifirst:ilast), 1000) scans(i)
-            end if
-         else if (ldoblank) then
-            numout = numout + 1
-            ifirst = (mod(numout-1,nline) + 1) * nsize + 1
-            ilast = ifirst + nsize - 1
-            do 110 i1 = ifirst, ilast
-               write(cpuf(i1:i1), 1010)
- 110        continue
-         end if
-         if (mod(numout,nline) .eq. 0) then
-            write(cpuf(1:9),1020) prefix, numout - nline + 1
-            call pwrite(cpuf,n72)
-         end if
- 100  continue
-c
-      if (mod(numout,nline) .ne. 0) then
-         ifirst = mod(numout,nline) * nsize + 10
-         cpuf(ifirst:72) = ' '
-         write(cpuf(1:9),1020) prefix, numout - mod(numout,nline) + 1
-         call pwrite(cpuf,n72)
-      end if
-c
-      return
- 1000 format(f9.2)
- 1005 format(i6)
- 1010 format(' ')
- 1020 format(a1,x,i6,':')
-      end
-             
-
-      
diff -uNr 3.5/source/conline/condar/tells.F unipops-3.6/source/conline/condar/tells.F
--- 3.5/source/conline/condar/tells.F	2000-03-16 11:37:45.000000000 -0700
+++ unipops-3.6/source/conline/condar/tells.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,518 +0,0 @@
-      SUBROUTINE TELLS 
-C-------------------------------------------------------------------------------
-C  @(#)tells.F	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-      INTEGER*2 iactual2, ifun, i1, i2, kp, 
-     .          ia, inonzero, ier, iacct
-c
-      real*4 scans(32767), scanno
-      integer*2 m3, m2, m1, n1, n80, n112, n120, n232, n281
-      integer*2 jmax, inonrpt
-      integer*4 numscans, numout, istype, iscanno, isubsc
-      integer*4 imax, iactual, irtn
-      logical*2 ldoblank, lastblnk
-      character*1 prefix
-C
-#ifdef CONTINUUM
-#else
-      integer*4 onlinesite
-#endif
-C
-      include 'core.inc'
-      INCLUDE 'appl.inc'
-      include 'stk.inc'
-      INCLUDE 'cform.inc'
-      INCLUDE 'cio.inc'
-c
-      data imax, jmax /32767, 32767/
-      data m3, m2, m1, n80, n112, n120, n232, n281, n1
-     .     /-3, -2, -1, 80, 112, 120, 232, 281, 1/
-c
-C=======================================================================
-C
-      IF (SP.lt.1) call oerror(n112, m1, 'TELL')
-      IFUN = nint(V(SP))
-      SP = SP-1
-      IF (IFUN.lt.1.or.IFUN.gt.19) call oerror(n112, m1, 'TELL')
-c
-      GO TO (10,40,50,70,75,80,80,80,80,80,80,80,
-     .       20,30,60,90,10,80,100), IFUN
-      call oerror(n120, m3, 'TELLS')
-c--------------------------------------------------------------------
-C                                               TELL dscans
-c--------------------------------------------------------------------
-   10 CONTINUE
-c
-      if (online) then
-c
-#ifdef CONTINUUM
-        call gcontlist2(iactual, imax, scans, irtn)
-#else
-        call gscanlist2(iactual, imax, scans, irtn)
-#endif
-c
-        if (irtn .eq. 0 .and. iactual .gt. 0) then
-           numscans = min(iactual, imax)
-           ldoblank = .false.
-           prefix = 'O'
-           istype = 1
-c		check to see if they really are integers
-           scanno = scans(1)
-           iscanno = ifix(scanno)
-           isubsc = ifix((scanno - iscanno)*100.0 + 0.5)
-           if (isubsc .ne. 0) istype = 0
-c
-           call tellout(scans,numscans,ldoblank,prefix,istype,numout)
-           if (numout .eq. 0) then
-              write(cpuf, 159) 'Online data file is empty'
-              call pwrite(cpuf, n80)
-           end if
-        else
-	  write(cpuf,159) 'Online data file may not exist or is empty'
-159       format(8a)
-	  call pwrite(ipuf,n80)
-        endif
-      else
-	write(cpuf,159) 'Online data file is not available'
-	call pwrite(ipuf,n80)
-      endif
-c
-      if (ifun .eq. 17) goto 99
-c				tell offdata
-90    if (iounit(1) .le. 0) then
-	write(cpuf,159) 'Offline Data file does not exist'
-	call pwrite(ipuf,n80)
-      else
-	call getlist(scans, jmax, iactual2, iounit(1), ciounit(1), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-	numscans = iactual2
-        ldoblank = .false.
-        prefix = 'D'
-        istype = 0
-        call tellout(scans, numscans, ldoblank, prefix, istype, numout)
-c
-	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(1)(1:lastblnk(ciounit(1))),
-     .			  ' (Offline Data) file is empty'
-	  call pwrite(ipuf,n80)
-        endif
-c
-      endif
-c
-      GO TO 99
-c--------------------------------------------------------------------
-C                                         TELL ACCMD
-c--------------------------------------------------------------------
-   20 CONTINUE
-c
-      if (nint(dtwh(c13ns,1)) .ge. 1) then
-         WRITE (CPUF,2077,IOSTAT=IER) nint(dtwh(c13ns, 1)), 
-     1				dtwh(c13fs, 1), dtwh(c13ls,1)
- 2077    FORMAT (i7, ' scans from:', f9.2, ' to ',
-     1           f9.2, ' accummed in Array(0).' )
-       	 CALL PWRITE (IPUF,n80)
-c
-      else
-	 cpuf = '      The scan in Array(0) was not produced by ACCUM !'
-         CALL PWRITE(IPUF,n80)
-      endif
-c
-      IF(NACCUM.GT.0)THEN
-	IF(NACCUM.LE.100)THEN
-		IACCT=NACCUM
-		WRITE(CPUF,2080)
-      		CALL PWRITE (IPUF,n80)
-		WRITE(CPUF,2078,IOSTAT=IER)NACCUM
- 2078		FORMAT('      The ',i7,' scans accumulated so far are :')
-	ELSE
-		IACCT=100
-		WRITE(CPUF,2080)
-      		CALL PWRITE (IPUF,n80)
-		WRITE(CPUF,2079,IOSTAT=IER)NACCUM
- 2079	FORMAT('      Of the 'i7,' scans accumed so far',
-     .					', the first 100 are :')
-	ENDIF
-      CALL PWRITE (IPUF,n80)
-      do 92 i1 = 1, iacct, 7
-	     i2 = min(i1+6,iacct)
-	     write(cpuf,9614) i1, (DAINDEX(kp),kp=i1,i2)
-9614         format(1x,i7,':',7f9.2)
-             CALL PWRITE(IPUF,n80)
-   92        CONTINUE
-      else
-	WRITE(CPUF,2080)
-	CALL PWRITE(IPUF,n80)
-	CPUF = '      No ACCUMulation of scans is taking place currently.'
-	CALL PWRITE(IPUF,n80)
-	ENDIF
-c
-      WRITE(CPUF,2080)
-      CALL PWRITE(IPUF,n80)
-      IF(NACCUM.GT.100)THEN
-	WRITE(CPUF,2081) DAINDEX(101)
- 2081   FORMAT(12x, 'The scan most recently ACCUMulated was ', f9.2)
-        CALL PWRITE(IPUF,n80)
-      ENDIF
-c
-      GO TO 99
-
- 2080 FORMAT()
-c--------------------------------------------------------------------
-C                        TELL STACK 
-c--------------------------------------------------------------------
-   30 CONTINUE
-c
-      IA=nint(ACOUNT)
-c
-      if (ia .lt. 0. .or. ia .gt. maxstck) 
-     .		call oerror(n281, m2, 'TELL')
-c
-      if (ia .eq. 0) then
-         write(cpuf, 9612)
-9612     format(1x,'ASTACK is empty.')
-         call pwrite(ipuf, n80)
-      else
-         do 91 i1 = 1, ia, 7
-	    i2 = min(i1+6,ia)
-	    write(cpuf,9613) i1, (astack(kp),kp=i1,i2)
-9613        format(1x,i7,':',7f9.2)
-            CALL PWRITE(IPUF,n80)
-   91    CONTINUE
-      endif
-c
-      GO TO 99
-c--------------------------------------------------------------------
-C                                    Tell KSCANS
-c--------------------------------------------------------------------
-   40 CONTINUE
-c
-      if (iounit(2) .le. 0) then
-	write(cpuf,159) 'Keep file does not exist'
-	call pwrite(ipuf,n80)
-      else
-        call getlist(scans, jmax, iactual2, iounit(2), ciounit(2), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        numscans = iactual2
-        ldoblank = .false.
-        prefix = 'K'
-        istype = 0
-        call tellout(scans, numscans, ldoblank, prefix, istype, numout)
-c
-	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(2)(1:lastblnk(ciounit(2))),
-     .			  ' (Keep) file is empty'
-	  call pwrite(ipuf,n80)
-        endif
-c
-      endif
-c
-      GO TO 99
-c--------------------------------------------------------------------
-C                                    Tell RSCANS
-c--------------------------------------------------------------------
-   75 CONTINUE
-c
-      if (iounit(5) .le. 0) then
-	write(cpuf,159) 'Records file does not exist'
-	call pwrite(ipuf,n80)
-      else
-        call getlist(scans, jmax, iactual2, iounit(5), ciounit(5), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-c
-        numscans = iactual2
-        ldoblank = .false.
-        prefix = 'R'
-        istype = 0
-c
-        call rmextra(scans, iactual2, n1, inonrpt)
-c
-        call tellout(scans, numscans, ldoblank, prefix, istype, numout)
-c
-	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(5)(1:lastblnk(ciounit(5))),
-     .			  ' (Records) file is empty'
-	  call pwrite(ipuf,n80)
-        endif
-c
-      endif
-c
-      GO TO 99
-c--------------------------------------------------------------------
-C                              TELL SSCANS
-c--------------------------------------------------------------------
-   50 CONTINUE
-c
-      if (iounit(3) .le. 0) then
-	write(cpuf,159) 'Save file does not exist'
-	call pwrite(ipuf,n80)
-      else
-	call getlist(scans, jmax, iactual2, iounit(3), ciounit(3), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        numscans = iactual2
-        ldoblank = .true.
-        prefix = 'S'
-        istype = 0
-        call tellout(scans, numscans, ldoblank, prefix, istype, numout)
-c           
-	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(3)(1:lastblnk(ciounit(3))),
-     . 			  ' (Save) file is empty'
-	  call pwrite(ipuf,n80)
-        endif
-c
-      endif
-c
-      GO TO 99
-c--------------------------------------------------------------------
-C                              TELL DISK
-c--------------------------------------------------------------------
-   60 CONTINUE
-c
-      if (online) then
-c
-#ifdef CONTINUUM
-        call gcontlist2(iactual, imax, scans, irtn)
-#else
-        call gscanlist2(iactual, imax, scans, irtn)
-#endif
-c
-        if (irtn .eq. 0) then
-	  write(cpuf,9611) 'online','data',iactual
-9611      format('The ', a, 1x, a, ' file contains ', i6, ' scans')
-	else
-	  write(cpuf,159) 'The on-line data file is Not Available'
-        endif
-        call pwrite(ipuf,n80)
-#ifdef CONTINUUM
-c		gains are line only
-#else
-        if (onlinesite() .eq. 1) then
-           call ggscanlist2(iactual, imax, scans, irtn)
-           if (irtn .eq. 0) then
-              write(cpuf, 9611) 'online','gains',iactual
-           else
-              write(cpuf,159) 
-     +           'The on-line gains file is Not Available'
-           endif
-           call pwrite(ipuf,n80)
-        endif
-#endif
-      else
-	write(cpuf,159) 'The on-line data file is Not Available'
-        call pwrite(ipuf,n80)
-      endif
-c     Get number of scans from On-Line data file
-c 
-      if (iounit(1) .le. 0) then
-	write(cpuf,159) 'Offline Data file does not exist'
-      else
-	call getlist(scans, jmax, iactual2, iounit(1), ciounit(1), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        inonzero = 0
-        do 360 i1 = 1, iactual2
-           if (scans(i1).ne.0) inonzero = inonzero + 1
- 360       continue
-	write(cpuf,9611) ciounit(1)(1:lastblnk(ciounit(1))),
-     . 			  '(Offline Data)', inonzero
-      endif
-      call pwrite(ipuf,n80)
-c     Get num. for off-line file
-c
-      if (iounit(2) .le. 0) then
-	write(cpuf,159) 'Keep file does not exist'
-      else
-	call getlist(scans, jmax, iactual2, iounit(2), ciounit(2), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        inonzero = 0
-        do 361 i1 = 1, iactual2
-           if (scans(i1).ne.0) inonzero = inonzero + 1
- 361       continue
-      	write(cpuf,9611) ciounit(2)(1:lastblnk(ciounit(2))),
-     . 			 '(Keep)', inonzero
-      endif
-      call pwrite(ipuf,n80)
-c     Get num. for KEEP file
-c
-      if (iounit(3) .le. 0) then
-	write(cpuf,159) 'Save file does not exist'
-      else
-	call getlist(scans, jmax, iactual2, iounit(3), ciounit(3), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        inonzero = 0
-        do 362 i1 = 1, iactual2
-           if (scans(i1).ne.0) inonzero = inonzero + 1
- 362       continue
-	write(cpuf,9611) ciounit(3)(1:lastblnk(ciounit(3))),
-     . 			 '(Save)', inonzero
-      endif
-      call pwrite(ipuf,n80)
-c     Get num. for SAVE file
-c
-#ifdef CONTINUUM
-#else
-c	for off-line gains shut up unless file is available
-      if (onlinesite() .ne. 0 .and. iounit(4) .gt. 0) then
-        call getlist(scans, jmax, iactual2, iounit(4), ciounit(4), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        inonzero = 0
-        do 363 i1 = 1, iactual2
-           if (scans(i1).ne.0) inonzero = inonzero + 1
- 363    continue
-        write(cpuf,9611) ciounit(4)(1:lastblnk(ciounit(4))),
-     . 			 '(Gains)', inonzero
-        call pwrite(ipuf,n80)
-      endif
-c     Get num. for Gains file
-c
-c	for off-line records shut up unless file is available
-      if (onlinesite() .ne. 1 .and. iounit(5) .gt. 0) then
-        call getlist(scans, jmax, iactual2, iounit(5), ciounit(5), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-        inonzero = 0
-        do 364 i1 = 1, iactual2
-           if (scans(i1).ne.0) inonzero = inonzero + 1
- 364    continue
-c
-        call rmextra(scans, iactual2, n1, inonrpt)
-c
-        write(cpuf,9615) ciounit(5)(1:lastblnk(ciounit(5))),
-     . 			 '(Records)', inonzero, inonrpt
-9615      format('The ', a, 1x, a, ' file contains ', i6, 
-     .		' records and ', i6, ' scans')
-        call pwrite(ipuf,n80)
-      endif
-c     Get num. for Records file
-c
-#endif
-      goto 99
-c--------------------------------------------------------------------
-C                              TELL GSCANS  gains
-c--------------------------------------------------------------------
-   70 CONTINUE
-c
-#ifdef CONTINUUM
-c		online gains are line only
-#else
-      if (online) then
-         if (onlinesite() .ne. 1) then
-            call oerror(n232, m2, 'TELL GSCANS')
-            goto 99
-         endif
-c
-        call ggscanlist2(iactual, imax, scans, irtn)
-        if (irtn .eq. 0 .and. iactual .gt. 0) then
-           numscans = min(iactual, imax)
-           ldoblank = .false.
-           prefix = "G"
-           istype = 1
-c		check to see if they really are integers
-           scanno = scans(1)
-           iscanno = ifix(scanno)
-           isubsc = ifix((scanno - iscanno)*100.0 + 0.5)
-           if (isubsc .ne. 0) istype = 0
-c
-           call tellout(scans,numscans,ldoblank,prefix,istype,numout)
-           if (numout .eq. 0) then
-              write(cpuf, 159) 'Online Gains file is empty'
-              call pwrite(cpuf, n80)
-           endif
-        else
-           write(cpuf,159) 
-     +       'Online Gains file may not exist or is empty'
-           call pwrite(ipuf,n80)
-        endif
-c		if online file, look at gains file if available
-      else
-	write(cpuf,159) 'Online gains file is not available'
-	call pwrite(ipuf,n80)
-      endif
-#endif
-c
-      if (iounit(4) .le. 0) then
-	write(cpuf,159) 'Offline gains file does not exist'
-	call pwrite(ipuf,n80)
-      else
-	call getlist(scans, jmax, iactual2, iounit(4), ciounit(4), ier)
-        if (ier .ne. 0) call oerror(ier, m2, 'TELLS')
-	numscans = iactual2
-        ldoblank = .false.
-        prefix = 'g'
-        istype = 0
-        call tellout(scans, numscans, ldoblank, prefix, istype, numout)
-c
-	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(4)(1:lastblnk(ciounit(4))),
-     . 			  ' (Offline Gains) file is empty'
-	  call pwrite(ipuf,n80)
-        endif
-c
-      endif
-c
-      GO TO 99
-c--------------------------------------------------------------------
-C                              TELL STAT
-c--------------------------------------------------------------------
-  100 CONTINUE
-      call tellstat(status)
-      goto 99
-c--------------------------------------------------------------------
-c			inappropriate argument (6,7,8,9,10,11,12)
-c--------------------------------------------------------------------
- 80   continue
-      call oerror(n112, m2, 'TELL')
-      goto 99
-C----------------------------------------------------------------------
-   99 CONTINUE
-      RETURN
-C-----------------------------------------------------------------------
-      END
-c
-      subroutine rmextra(list, n,  style, nrtn)
-c
-c     Removes redundent entries from LIST -- LIST is modified
-c     Style = 1 if integer comparison; else float
-c     N = Number of entrie to look through
-c     NRTN = Number found that were different
-c
-      real list(*)
-      integer*2 n, style, nrtn
-c
-      integer inonrpt, i1
-      logical skip
-c
-      skip = .false.
-c
-      if (style .eq. 1) then
-        inonrpt = 1
-        do 751 i1 = 2, n
-           if (nint(list(i1)). ne. nint(list(inonrpt))) then
-		skip = .false.
-	   else
-		if ( nint(100.*(list(i1)-nint(list(inonrpt)))) .le. 1.) 
-     .			skip = .true.
-	   endif
-	   if (.not. skip) then
-     		inonrpt = inonrpt + 1
-		list(inonrpt) = list(i1)
-	   endif
-	   if (i1 .gt. inonrpt) list(i1) = 0.
- 751    continue
-c
-      else
-        inonrpt = 1
-        do 752 i1 = 2, n
-           if (list(i1) .ne. list(inonrpt) ) skip = .false.
-	   if (.not. skip) then
-     		inonrpt = inonrpt + 1
-		list(inonrpt) = nint(list(i1))
-	   endif
-	   if (i1 .gt. inonrpt) list(i1) = 0.
- 752    continue
-c
-      endif
-c
-      nrtn = inonrpt
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/tellstat.F unipops-3.6/source/conline/condar/tellstat.F
--- 3.5/source/conline/condar/tellstat.F	2000-03-16 11:37:54.000000000 -0700
+++ unipops-3.6/source/conline/condar/tellstat.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,194 +0,0 @@
-      subroutine tellstat(status)
-c
-c     @(#)tellstat.F	5.1 06/22/94
-c
-c     Relates the meaning of the contents of the status array.
-c
-      real status(*)
-c
-      character*24 status1(11), status3(0:2), status11(5), 
-     .		   status13(6), status21(-1:5)
-      integer*2 istat13(6), istch(40), ierr, iblue, igreen, ired, i,
-     .		lnblnk
-      character*80 stch
-c
-      include 'cio.inc'
-c
-      equivalence (stch, istch)
-c
-# ifdef CONTINUUM
-      data status1 /    "Channels",
-     .			"Time Offset",
-     .			"Position Offset",
-     .			"X-Position Offset",
-     .			"Y-Position Offset",
-     .			"X-Position",
-     .			"Y-Position",
-     .			"LST",
-     .			"UT",
-     .			2*" "/
-# else
-      data status1 /    "Channels",
-     .			"Frequency Offset",
-     .			"Velocity (Header Def.)",
-     .			"Radio Velocity",
-     .			"Optical Velocity",
-     .			"Relativistic Velocity",
-     .			"Linear Velocity Scale",
-     .			"Rest Frequency",
-     .			"Sky Frequency",
-     .			"Image Rest Frequency",
-     .			"Image Sky Frequency"/
-#endif
-      data status3 /	"Line",
-     .			"Histogram",
-     .			"Points"/
-      data status11/	"No graphics",
-     .			"SunView",
-     .			"Tek 4010",
-     .			"Retrographics",
-     .			"X-Window"/
-      data status13/	"Unknown",
-     .			"Keyboard",
-     .			"Batch File",
-     .			"Setup File",
-     .			"Help File",
-     .			"Menus"/
-      data istat13/0, 5, 7, 12, 13, 15/
-      data status21/	"None",
-     .			"SHOW",
-     .			"PLOT",
-     .			"HLFTNE",
-     .			"RASTER",
-     .			"CONTOUR/QCONTOUR",
-     .			"PLOTDOTS"/
-c
-      write(stch,20)
-20    format(72('-'))
-      call pwrite(istch, 72)
-c
-      ired = ifix(status(5)/(16.*16.))
-      igreen = ifix( (status(5)-ired*16.*16.)/16.)
-      iblue = ifix(status(5)-ired*16*16 -igreen*16) 
-      write(stch,"(a, 3i4)") "Color (RGB): ", -(ired+1),-(igreen+1),
-     .				-(iblue+1)
-      write(stch(36:),fmt="(a, i5.3)",iostat=ierr) 
-     .		"Linetype (Tick,Dash,Width): ", nint(status(6))
-      call pwrite(istch, 72)
-c
-      write(stch,fmt="(a, f5.2)",iostat=ierr) "Character Size: ", 
-     .					status(7)
-      write(stch(36:),fmt="(a, i5)",iostat=ierr) 
-     .		"# of scans in on-going average: ", nint(status(8))
-      call pwrite(istch, 72)
-c
-      if (status(10) .ge. 1) then
-	stch = "Scroll Lock: ON"
-      else
-	stch = "Scroll Lock: OFF"
-      endif
-      write(stch(36:),fmt="(a, i3)",iostat=ierr)
-     .          "# of plot areas since last PAGE: ", nint(status(9))
-      call pwrite(istch, 72)
-c
-      if ( nint(status(11)) .eq. 2 .and. termtype .eq. 'xwindow') then
-         stch = "Graphics Screen: " // status11(5)
-      else
-         stch = "Graphics Screen: " // status11(nint(status(11)))
-      endif
-      do 100 i = 2, 6
-	if (nint(status(13)) .eq. istat13(i)) goto 101
-100	continue
-      i = 1
-101   stch = stch(1:35) // "Command Input: " // status13(i)
-      call pwrite(istch, 72)
-c
-      if (status(16) .gt. 0) then
-	stch = "Command Logging:  ON"
-      else
-	stch = "Command Logging: OFF"
-      endif
-      if (status(19) .gt. 0) then
-	stch = stch(1:35) // "Error Trapping:  ON"
-      else
-	stch = stch(1:35) // "Error Trapping: OFF"
-      endif
-      call pwrite(istch, 72)
-c
-      if (status(15) .gt. 0) then
-	stch = "On-line data: Available"
-      else
-	stch = "On-line data: Unavailable"
-      endif
-      if (status(22) .gt. 0) then
-	stch = stch(1:35) // "Undo Facility:  ON"
-      else
-	stch = stch(1:35) // "Undo Facility: OFF"
-      endif
-      call pwrite(istch, 72)
-c
-      stch = "Last Plot was: " // status21(nint(status(21)))
-      if (status(20) .gt. 0) then
-	stch = stch(1:35) // "Debugging:  ON"
-      else
-	stch = stch(1:35) // "Debugging: OFF"
-      endif
-      call pwrite(istch, 72)
-c
-      stch = "PLOT/SHOW type: "  // status3(nint(status(3)))
-      stch = stch(1:35) // "RESHOW type: "  // status3(nint(status(4)))
-      call pwrite(istch, 72)
-c
-      stch = "SHOW axis (Lower/Upper): " // 
-     .	status1(nint(status(1)))(1:lnblnk(status1(nint(status(1))))) //
-     .	' / ' //  status1(nint(status(2)))
-      call pwrite(istch, 72)
-c
-      if (status(17) .gt. 0) then
-	stch = "Text output is going to: Graphics Screen"
-      else
-	if (status(14) .eq. 6) then
-	    stch = "Text output is going to: Text Screen"
-	else
-	    stch = "Text output is going to: Printout File"
-	endif
-      endif
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Graphics Screen Size: (", nint(status(23)), ",",
-     .  	nint(status(24)), ")  Pixels"
-10    format(a, 4(i5, a))
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Current Graphics Page: (", nint(status(25)), ",",
-     .  	nint(status(26)), ") to (", nint(status(27)), ",",
-     .  	nint(status(28)), ") Pixels"
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Location of Graphics Cursor: (", nint(status(31)), ",",
-     .  	nint(status(32)), ") Pixels"
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Text Screen Size: (", nint(status(29)), ",",
-     .  	nint(status(30)), ") Characters"
-      call pwrite(istch, 72)
-c
-      stch = "Printer: " // printer 
-      stch = stch(1:lnblnk(stch)) // " (" // printtype 
-      stch = stch(1:lnblnk(stch)) // ")"
-      if (status(12) .lt. 0) then
-         stch = stch(1:lnblnk(stch)) // " (Copy: OFF)"
-      else
-         stch = stch(1:lnblnk(stch)) // " (Copy:  ON)"
-      endif
-      call pwrite(istch, 72)
-c
-      write(stch,20)
-      call pwrite(istch, 72)
-c
-      return
-      end
diff -uNr 3.5/source/conline/condar/tipslv.f unipops-3.6/source/conline/condar/tipslv.f
--- 3.5/source/conline/condar/tipslv.f	2000-03-16 11:37:46.000000000 -0700
+++ unipops-3.6/source/conline/condar/tipslv.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,46 +0,0 @@
-      SUBROUTINE TIPSLV (NPTS, TAMB, TCAL, T, secz, tau, trcvr)
-C-----------------------------------------------------------------------
-C @(#)tipslv.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C        This program uses telescope tipping scan data to determine
-C        zenith extinction and receiver temperature.
-C-----------------------------------------------------------------------
-C
-      character*80 stch
-      integer*2 NPTS, NANGLE, istch(40), j, nptsm1, n80
-      DOUBLE PRECISION SECZ(*), T(*), TAMB, TCAL, flnpts, sumon,
-     .		       sumoff, calfct, tau, trcvr
-C
-      equivalence (istch, stch)
-c
-      data n80 /80/
-C
-C::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-C
-      NANGLE = NPTS / 3
-      NPTSM1 = NPTS - 1
-      FLNPTS = DBLE (FLOAT (NPTS))
-c
-C                   Find counts-to-temperature conversion factor
-      SUMON = 0.D0
-      DO 2000 J = 2, NPTSM1, 3
-         SUMON = SUMON + T(J)
- 2000    CONTINUE
-      SUMOFF = 0.D0
-      DO 3000 J = 3, NPTS, 3
-         SUMOFF = SUMOFF + T(J - 2) + T(J)
- 3000    CONTINUE
-C
-C                   Convert input data to temperature scale
-      CALFCT = (2.D0 / 3.D0 * FLNPTS) * TCAL / (2.D0 * SUMON - SUMOFF)
-      DO 4000 J = 1, NPTS
-         T(J) = CALFCT * T(J)
- 4000    CONTINUE
-C
-C                   Solve for extinction and rcvr temp
-C                   using linearized least squares routine
-      CALL SOLVE (NPTS, SECZ, T, TAMB, TCAL, tau, trcvr)
-C
-99999 RETURN
-      END
diff -uNr 3.5/source/conline/condar/tracer.f unipops-3.6/source/conline/condar/tracer.f
--- 3.5/source/conline/condar/tracer.f	2000-03-16 11:37:47.000000000 -0700
+++ unipops-3.6/source/conline/condar/tracer.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,143 +0,0 @@
-       subroutine tracer (z, isize, jsize, undefwp, quick)
-c
-c      @(#)tracer.f	5.1 06/22/94
-c
-c      Produces a contour map.  
-c
-c      z (isize, jsize) = r*4 array of data values to be contoured.
-c      isize = i*4 first dimension limit of z
-c      jsize = i*4 second dimewnsion limit of z
-c      undefwp = r*4 undefined value 
-c      quick = true if a quick contour plot is desired.     
-c
-      integer*4 isize, jsize
-      real*4 z(isize, jsize), undefwp
-      logical quick
-c
-      include 'appl.inc'
-      include 'mappl.inc'
-      include 'core.inc'
-c
-      real ctr, ep, temp, xa, ya, xb, yb, VX(3),XY(3),YY(3), rl, xl,
-     .	     yl, rm, xm, ym, rs, xs, ys, savevec(4,32767), zmin, zmax
-      integer*2 ictr, i, j, index, nseg, mindex(3,6), jj, nmaxseg, i2,
-     .		ixmin, ixmax, iymin, iymax, curcur
-c
-      data ep/.001/,nmaxseg/32767/
-      DATA MINDEX/1,3,2,3,2,1,3,1,2,2,1,3,1,2,3,2,3,1/
-c
-c
-      call zlimit(z, isize, jsize, zmin, ixmin, iymin, zmax, ixmax, 
-     .		  iymax, undefwp)
-      ictr = 0
-10      ictr = ictr + 1
-        if (ictr .gt. maxregn .or. levs(ictr) .le. -999999.) return
-        ctr = levs(ictr)
-	if (ctr .lt. zmin .or. ctr .gt. zmax) goto 10
-c	Find Contour level; return if last level found
-c
-        nseg = 0
-c
-        do 399 j = jmin+1, jmax
-	  do 390 i = imin, imax-1
-	   JJ=1
-	   VX(1)=z(i,j)
-	   VX(2)=z(i+1,j)
-	   VX(3)=z(i,j-1)
-	   XY(1)=i
-	   XY(2)=i+1
-	   XY(3)=i
-	   YY(1)=j
-	   YY(2)=j
-	   YY(3)=j-1
-c	    Try one-side of box first (jj=1)
-c
-   35	   if (vx(1) .eq. undefwp .or. vx(2) .eq. undefwp .or.
-     .		vx(3) .eq. undefwp) goto 390
-c	   By pass undefined points
-c
-	   INDEX=0
-	   IF(VX(1).GT.VX(2)) INDEX=1
-	   IF(VX(3).GE.VX(1)) INDEX=INDEX+2
-	   IF(VX(2).GE.VX(3)) INDEX=INDEX+4
-	   i2=mindex(1,INDEX)
-	   RL=VX(i2)
-	   XL=XY(i2)
-	   YL=YY(i2)
-	   i2=mindex(2,INDEX)
-	   RM=VX(i2)
-	   XM=XY(i2)
-	   YM=YY(i2)
-	   i2=mindex(3,INDEX)
-	   RS=VX(i2)
-	   XS=XY(i2)
-	   YS=YY(i2)
-c	   Rearrange coords of box corners.
-c
-	   IF (ctr.le.RL.and.RL-RS.gt.EP*ctr) then
-	     IF (ctr.gt.RS) then
-	       TEMP=(ctr-RS)/(RL-RS)
-	       XA=TEMP*(XL-XS)+XS
-	       YA=TEMP*(YL-YS)+YS
-	       IF (RL-RM.LE.EP*ctr) then
-    	          TEMP=(ctr-RS)/(RM-RS)
-	          XB=TEMP*(XM-XS)+XS
-	          YB=TEMP*(YM-YS)+YS
-	       else IF ((RM-RS.LE.EP*ctr) .or. (ctr.GT.RM)) then
-   	          TEMP=(ctr-RM)/(RL-RM)
-	          XB=TEMP*(XL-XM)+XM
-	          YB=TEMP*(YL-YM)+YM
-	       else
-    	          TEMP=(ctr-RS)/(RM-RS)
-	          XB=TEMP*(XM-XS)+XS
-	          YB=TEMP*(YM-YS)+YS
-	       endif
-c		Find end-points to vector to draw
-c
-	       if (quick) then
-		  call place(nint(xa*ax(curcur())+bx(curcur())),
-     .			 nint(ya*ay(curcur())+by(curcur())))
-		  call vctr(nint(xb*ax(curcur())+bx(curcur())),
-     .			 nint(yb*ay(curcur())+by(curcur())))
-c		  Draw vectors without storing them away -- QUICK plot wanted
-c
-	       else
-		  nseg = nseg + 1
-	          savevec(1,nseg) = xa
-	          savevec(2,nseg) = ya
-	          savevec(3,nseg) = xb
-	          savevec(4,nseg) = yb
-c	          Store away moves and vectores
-c
-	          if (nseg .eq. nmaxseg) then
-		     call drawcntr(savevec, nseg, undefwp,  z, isize, jsize, ictr)
-		     nseg = 0
-	          endif
-c	          If the vector storage array is full, flush the vectors; store
-c	          variables away when we look for more vectors.   
-c
-	       endif
-	     endif
-	   endif
-c
-c
-   	   IF (JJ.eq.1) then
-	      JJ=2
-	      VX(1)=z(i+1,j-1)
-	      XY(1)=i+1
-	      YY(1)=j-1
-	      GO TO 35
-           endif
-c	   Now try other side of box of points (jj=2)
-c
-390	   continue
-399	 continue
-c
-      if (.not. quick) 
-     .	call drawcntr(savevec, nseg, undefwp,  z, isize, jsize, ictr)
-c
-      goto 10
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/condar/virfft.f unipops-3.6/source/conline/condar/virfft.f
--- 3.5/source/conline/condar/virfft.f	2000-03-16 11:37:52.000000000 -0700
+++ unipops-3.6/source/conline/condar/virfft.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,89 +0,0 @@
-      subroutine virfft (isgn)
-c
-c     @(#)virfft.f	5.2 12/15/94
-c
-c     Performs 2-dim FFT on Matrices 0 and 1 and places result in Matrices 0
-c     and 1.  ISGN determines whether the forward (false) or Inverse (true) 
-c     transforms are to be used.  
-c
-      logical isgn
-c
-      integer*2 i1, i2,  n256, m2
-      integer*4 mat0x, mat0y, mat1x, mat1y, ilct, icnt, jcnt
-      logical*4 invers
-c
-      parameter (m2 = -2)
-      parameter (n256 = 256)
-c
-      INCLUDE 'appl.inc'
-      INCLUDE 'mappl.inc'
-      INCLUDE 'mform.inc'
-c
-      invers = isgn
-c
-      mat0x = nint(mhead(mnaxis1,1))
-      mat0y = nint(mhead(mnaxis2,1))
-      mat1x = nint(mhead(mnaxis1,2))
-      mat1y = nint(mhead(mnaxis2,2))
-c
-      if  (mat0x .le. 0 .or. mat0y .le. 0 .or. mat0x .ne. mat1x .or.
-     .     mat0y .ne. mat1y .or. mat0x*mat0y .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'MFFT/MIFFT')
-c     Make sure the input matrices have been initialized
-c
-      icnt = 0
-16	icnt = icnt + 1
-	if (2**icnt .lt. mat0x) goto 16
-      jcnt = 0
-17	jcnt = jcnt + 1
-	if (2**jcnt .lt. mat0y) goto 17
-c     ICNT and JCNT will help determine if the matrix sizes are a multiple
-c	of two.
-c
-
-      do 20 i2 = 1, mat0y
-c
-	do 10 i1 = 1, mat0x
-		xdata (i1) = mdata(ilct(i1,i2,1))
-		ydata (i1) = mdata(ilct(i1,i2,2))
-10		continue
-c
-	if (2**icnt .eq. mat0x) then
-	   call fft (xdata, ydata, icnt, invers)
-	else
-	   call dft (xdata, ydata, mat0x, invers)
-	endif
-c
-	do 19 i1 = 1, mat0x
-		mdata(ilct(i1,i2,1)) = xdata (i1)
-		mdata(ilct(i1,i2,2)) = ydata (i1)
-19		continue
-c
-20	continue
-c
-c
-      do 200 i1 = 1, mat0x
-c
-	do 100 i2 = 1, mat0y
-		xdata (i2) = mdata(ilct(i1,i2,1))
-		ydata (i2) = mdata(ilct(i1,i2,2))
-100		continue
-c
-	if (2**jcnt .eq. mat0y) then
-	   call fft (xdata, ydata, jcnt, invers)
-	else
-	   call dft (xdata, ydata, mat0y, invers)
-	endif
-c
-	do 190 i2 = 1, mat0y
-		mdata(ilct(i1,i2,1)) = xdata (i2)
-		mdata(ilct(i1,i2,2)) = ydata (i2)
-190		continue
-c
-200	continue
-c
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/vsntip.f unipops-3.6/source/conline/condar/vsntip.f
--- 3.5/source/conline/condar/vsntip.f	2000-03-16 11:37:48.000000000 -0700
+++ unipops-3.6/source/conline/condar/vsntip.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,181 +0,0 @@
-      SUBROUTINE VSNTIP(X, Y, NPTS, FREQ, TAMBC, TVANE, FTSBR, FTM, 
-     &  TAU0, DELTAU, ETAL, DELETA, ETAFREE, NOCVG, CHISQR) 	
-C-----------------------------------------------------------------------
-C @(#)vsntip.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C
-C  THIS SUBROUTINE PERFORMS A NON-LINEAR LEAST-SQUARES FIT TO VANE
-C  SWITCHED TIPPING SCAN DATA.  THE FUNCTION FIT IS
-C
-C          TCAL = RTCHOP - ETAL*RTM*(1 - EXP(-TAU0 * X))
-C          - (1 - ETAL)*RTSBR - ETAL*RTBG*EXP(-TAU0 * X)
-C
-C  THE SUBROUTINE IS DERIVED FROM THE PROGRAM NLIN, WHICH PERFORMS A
-C  LEAST-SQUARES FIT OF AN ARBITRARY USER-SPECIFIED, NON-LINEAR
-C  FUNCTION.  THE FITTING SUBROUTINES WERE TAKEN FROM BEVINGTON, P. R.
-C  'DATA REDUCTION AND ERROR ANALYSIS FOR THE PHYSICAL SCIENCES' 1969,
-C  MCGRAW-HILL.  THE FITTING ROUTINE IS BASED ON MARQUARDT'S COMPROMISE
-C  AND IS DESCRIBED IN CHAP. 11 OF BEVINGTON. 
-C
-C  NLIN WAS DESIGNED TO BE AS GENERAL AS POSSIBLE.  TO CHANGE THE FITTING
-C  FUNCTION, THE FOLLOWING SUBROUTINES MUST BE CHANGED:
-C
-C    FUNCTION SUBPROGRAM FUNCTN.   SPECIFIES THE FUNCTION TO BE FITTED
-C    TO THE DATA.
-C
-C    SUBROUTINE FDERIV.   COMPUTES THE PARTIAL DERIVATIVES OF THE FITTING
-C    FUNCTION WRT EACH PARAMETER OF THE FIT.  THE USER MAY SPECIFY THE
-C    PARTIAL DERIVATIVE EXPLICITLY FOR ANALYTICAL COMPUTATION OR MAY 
-C    CHOOSE TO HAVE THE PARTIALS COMPUTED NUMERICALLY.  IN THE LATTER
-C    CASE, NO CHANGES NEED BE MADE TO THE SUBROUTINE FROM ONE FITTING
-C    FUNCTION TO ANOTHER.
-C
-C  OTHER SUBROUTINES USED BUT NOT SUBJECT TO CHANGE ARE:
-C
-C    CURFIT,  THE BASIC NON-LINEAR LEAST-SQUARES FITTING ROUTINE
-C    USING MARQUARDT'S METHOD (BEVINGTON, P. 237, PROG. 11-5);
-C
-C    FCHISQ,  WHICH CALCULATES THE REDUCED CHI-SQUARE OF THE FIT
-C    FOR A GIVEN SET OF PARAMETERS (BEVINGTON, P. 194, PROG. 10-2);
-C
-C    MATINV,  WHICH INVERTS A SQUARE MATRIX AND COMPUTES ITS 
-C    DETERMINANT (BEVINGTON, P. 302, PROG. B-2).
-C
-C  ARGUMENTS TO THE SUBROUTINE:
-C
-C    X      - THE ARRAY CONTAINING THE AIRMASS AT EACH OBSERVATION
-C    Y      - THE ARRAY CONTAINING THE VALUES OF (TA_VANE - TA_SKY) AT EACH
-C                AIRMASS 
-C    NPTS   - THE NUMBER OF DATA POINTS
-C    FREQ   - THE OBSERVING FREQUENCY IN GHZ
-C    TAMBC  - THE AMBIENT TEMPERATURE IN DEGREES CELSIUS
-C    TVANE  - THE TEMPERATURE OF THE VANE IN DEGREES CELCIUS
-C    FTSBR  - THE FRACTION (T_SPILLOVER / T_AMBIENT)
-C    FTM    - THE FRACTION (T_ATM / T_AMBIENT)
-C    TAU0   - THE ZENITH OPTICAL DEPTH (UPON THE CALL TO THE SUBROUTINE,
-C                TAU0 IS THE STARTING VALUE; UPON RETURN, THE FINAL FITTED
-C                VALUE
-C    DELTAU - THE STANDARD ERROR IN THE FITTED VALUE OF TAU0
-C    ETAL   - THE REAR SPILLOVER AND SCATTERING EFFICIENCY (STARTING OR
-C                FIXED VALUE ON THE CALL, FITTED VALUE ON THE RETURN)
-C    DELETA - THE STANDARD ERROR IN THE FITTED VALUE OF ETAL
-C    ETAFREE- SPECIFIES IF ETAL IS TO BE A FREE OF FIXED PARAMETER (0 = FIXED,
-C                1 = FREE)
-C    NOCVG  - A ERROR CONDITION PARAMETER SET TO 1 IF THE FIT DID NOT CONVERGE
-C    CHISQR - THE REDUCED CHI-SQUARED OF THE FINAL FIT
-C
-C ************************************************************************
-C    PROGRAM NLIN WAS FIRST WRITTEN BY P. R. JEWELL ON 1984 JAN 30
-C    SUBROUTINE VSNTIP LAST MODIFIED ON 9 SEP 86.
-C ************************************************************************
-C
-C
-      real X(*), Y(*), SIGMAY(1000), YFIT(1000), PARMS(25), CONST(25),
-     .     SIGPARM(25), DELTAA(25), freq, tambc, tvane, ftsbr, ftm, 
-     .     tau0, deltau, etal, deleta, etafree, chisqr, cvgcrit, rtm, 
-     .     tm, rt, rtsbr, tsbr, tbg, rtbg, rtchop, tchop, tamb, functn, 
-     .     chisq1, fchisq, flamda, abdiff
-      integer*2 npts, nocvg, niter, mode, mderiv, modfit, nparms,
-     .		nfree, iter, i 
-      LOGICAL ETAFRE
-c
-      ETAFRE = .FALSE.
-      IF (ETAFREE .EQ. 1) ETAFRE = .TRUE.
-      NOCVG = 0
-C  DEFINE FIXED INPUT PARAMETERS:
-      NITER = 20
-      CVGCRIT = 0.0005
-C  MODE = 0 MEANS NO WEIGHTING (I.E., ALL POINTS HAVE EQUAL WEIGHTING).
-      MODE = 0
-      TAMB = TAMBC + 273.15 
-      TM = FTM*TAMB
-      TSBR = FTSBR*TAMB
-      RTM = RT(FREQ,TM)
-      RTSBR = RT(FREQ,TSBR)
-      TBG = 2.7
-      RTBG = RT(FREQ,TBG)
-      TCHOP = TVANE + 273.15
-      RTCHOP = RT(FREQ,TCHOP)
-C
-C *** SET THE DERIVATIVE-CALCULATION-MODE FLAG TO 'ANALYTIC' AS
-C *** THE NUMERICAL CALCULATION MODE IS NOT FULLY IMPLEMENTED.
-      MDERIV = 'A'
-C
-C  THE FOLLOWING CONVENTION IS USED TO DETERMINE THE FIT MODE:
-C    IF ETAL IS FIXED, MODFIT = 1
-C    IF ETAL IS FREE, MODFIT = 2
-C
-      IF(.NOT.ETAFRE) MODFIT = 1
-      IF(ETAFRE) MODFIT = 2
-      CONST(1) = FREQ
-      CONST(2) = TAMB
-      CONST(3) = FTM
-      CONST(4) = TM
-      CONST(5) = RTM
-      CONST(6) = FTSBR
-      CONST(7) = TSBR
-      CONST(8) = RTSBR
-      CONST(9) = TBG
-      CONST(10) = RTBG
-      CONST(11) = 0.
-      CONST(12) = 0.
-      CONST(13) = TCHOP
-      CONST(14) = RTCHOP
-      CONST(15) = 0.
-      CONST(16) = 0.
-      PARMS(1) = TAU0
-      NPARMS = 2
-      GO TO (175,180) MODFIT
-  175 CONTINUE
-      CONST(15) = ETAL
-      NPARMS = 1
-      GO TO 191
-  180 CONTINUE
-      PARMS(2) = ETAL
-  191 CONTINUE
-      NFREE = NPTS - NPARMS
-C
-C  EVALUATE CHI-SQUARE FOR STARTING VALUES OF FIT:
-C
-      DO 20 I=1,NPTS
-      YFIT(I) = FUNCTN(X,I,PARMS,CONST,MODFIT)
-   20 CONTINUE
-      ITER = 0
-      CHISQ1 = FCHISQ(Y,SIGMAY,NPTS,NFREE,MODE,YFIT)
-C
-C  START ITERATION LOOP:
-C
-   30 CONTINUE
-      ITER = ITER + 1
-      IF(ITER.GT.NITER) GO TO 45
-      FLAMDA = 0.001
-      CALL CURFIT(X,Y,SIGMAY,NPTS,NPARMS,MODE,PARMS,DELTAA,
-     & SIGPARM,FLAMDA,YFIT,CHISQR,CHISQ1,CONST,MDERIV,MODFIT)
-C
-C  CHECK FOR CONVERGENCE:
-C
-      ABDIFF = ABS(CHISQR - CHISQ1)
-      IF(ABDIFF.LT.CVGCRIT) GO TO 40
-C
-      CHISQ1 = CHISQR
-      GO TO 30
-C
-   40 CONTINUE
-      TAU0 = PARMS(1)
-      DELTAU = SIGPARM(1)
-      IF (MODFIT .EQ. 2) THEN
-         ETAL = PARMS(2)
-         DELETA = SIGPARM(2)
-         END IF
-      DO 42 I = 1,NPTS
-         Y(I)=FUNCTN(X,I,PARMS,CONST,MODFIT)
-   42    CONTINUE
-      GO TO 555
-   45 CONTINUE
-      NOCVG = 1
-C
-  555 RETURN
-      END
-C
-C  ************************************************************************
-C
diff -uNr 3.5/source/conline/condar/window.f unipops-3.6/source/conline/condar/window.f
--- 3.5/source/conline/condar/window.f	2000-03-16 11:37:52.000000000 -0700
+++ unipops-3.6/source/conline/condar/window.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,95 +0,0 @@
-      subroutine window (iw)
-c
-c     @(#)window.f	5.1 06/22/94
-c
-c     2-Dimensional windowing subroutine (holography package)
-c       iw     = window number:
-c                  1 = rectangular
-c                  2 = bartlett
-c                  3 = hanning
-c                  4 = hamming
-c                  5 = blackman
-c                (formulas for these functions may be obtained from
-c                "Digital Signal Processing", by Oppenheim & Shafer)
-c
-c
-c     User defined functions:
-c
-c       fnbar(u,v)    = iw .eq. 2.  Function for the 2 dimensional Bartlett
-c                       window.  u is the radius and v is the total diameter
-c       fnhan(u,v)    = iw .eq. 3.  Function for the 2 dimensional Hanning
-c                       window.  u and v are defined in fnbar
-c       fnham(u,v)    = iw .eq. 4.  Function for the 2 dimensional Hamming
-c                       window.  u and v are defined in fnbar
-c       fnbla(u,v)    = iw .eq. 5.  Function for the 2 dimensional Blackman
-c                       window.  u and v are defined in fnbar
-c
-c
-c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-c
-c
-c
-      integer*2 iw
-c
-      real fnbar, fnhan, fnham, fnbla, pi, u, v, rho, dia, fn, xc, yc
-      integer*2 i, j, n120, m2, mat0x, mat0y, mat1x, mat1y, n256
-      integer*4 ilct
-c
-      parameter (pi=3.1415927)
-      parameter (m2 = -2)
-      parameter (n256 = 256)
-      parameter (n120 = 120)
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      fnbar(u,v)=2.0*(u-1.0)/(v-1.0)
-      fnhan(u,v)=.5*(1.0-cos(pi*fnbar(u,v)))
-      fnham(u,v)=.54-(.46*cos(pi*fnbar(u,v)))
-      fnbla(u,v)=.42-(.5*cos(pi*fnbar(u,v))) + 
-     1                (.08*cos(2.*pi*fnbar(u,v)))
-c
-      mat0x = nint(mhead(mnaxis1,1))
-      mat0y = nint(mhead(mnaxis2,1))
-      mat1x = nint(mhead(mnaxis1,2))
-      mat1y = nint(mhead(mnaxis2,2))
-c
-      if  (mat0x .le. 0 .or. mat0y .le. 0 .or. mat0x .ne. mat1x .or.
-     .     mat0y .ne. mat1y .or. mat0x*mat0y .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'HOLWINDOW')
-c     Make sure the input matrices have been initialized
-c
-      if (iw .lt. 1 .or. iw .gt. 5) call oerror(n120, m2, 'HOLWINDOW')
-c
-      if (iw .eq. 1) return
-c
-      xc = float(mat0x)/2 + 0.5
-      yc = float(mat0y)/2 + 0.5
-      dia = mat0x
-c
-      do 20 i=1, mat0x
-          do 10 j=1, mat0y
-c
-            rho = xc-sqrt((i-xc)**2+((j-yc)*mat0x/mat0y)**2 )/sqrt(2.)
-c
-            if (iw .eq. 2) then
-		fn = fnbar (rho, dia)
-	    else if (iw .eq. 3) then
-		fn = fnhan (rho, dia)
-	    else if (iw .eq. 4) then
-		fn = fnham (rho, dia)
-	    else if (iw .eq. 5) then
-		fn = fnbla (rho, dia)
-	    else
-		call oerror(n120, m2, 'HOLWINDOW')
-	    endif
-c
-	    mdata(ilct(i,j,1)) = mdata(ilct(i,j,1))*fn
-	    mdata(ilct(i,j,2)) = mdata(ilct(i,j,2))*fn
-c
-   10       continue
-20       continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/condar/xtochan.F unipops-3.6/source/conline/condar/xtochan.F
--- 3.5/source/conline/condar/xtochan.F	2000-03-16 11:37:49.000000000 -0700
+++ unipops-3.6/source/conline/condar/xtochan.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,234 +0,0 @@
-      double precision function xtochan(unittype, array, v1, ierr)
-c
-c     @(#)xtochan.F	5.2 07/20/94
-c
-c     Converts X1 from units specified by UNITTYPE to channel number
-c	for array ARRAY.
-c
-c     UNITTYPE = (I*2) Units of V1.
-c  
-c		Continuum     	   	   Spectral Line
-c		-------------------------------------------
-c		-2 = matrix -x	   	    -2 = matrix -x
-c		-1 = matrix -y	   	    -1 = matrix -y
-c		1 = channel	   	    1 = channel
-c		2 = time offset	   	    2 = frequency offset
-c		3 = pos. offset (header)    3 = velocity (header)
-c		4 = pos. offset-x   	    4 = velocity (Radio)
-c		5 = pos. offset-y  	    5 = velocity (Optical)
-c		6 = position x	  	    6 = velocity (Relativity)
-c		7 = position y	  	    7 = velocity (Linear)
-c		8 = LST			    8 = rest frequency  (sig)
-c		9 = UT	 	    	    9 = sky frequency (sig)
-c			  		    *10 = rest frequency  (imag)
-c					    *11 = sky frequency (imag) 
-c
-c     Those items preceeded with a * been implemented for 12m data only
-c
-c     IERR = (I*2) If conversion is not possible, ierr will be 1, else
-c	it will be 0.
-c     V1 = value to be converted.         
-c	
-      integer*2 unittype, ierr
-      real*8 array(*), lstut
-      real*4 v1
-      logical okreal8
-c
-#ifdef CONTINUUM
-#else
-      integer isb
-      double precision veltochan, dveldef, fshift, nrao12m
-      character*8 veldef, cnrao12m
-      equivalence (dveldef, veldef), (nrao12m, cnrao12m)
-c
-      data cnrao12m /'NRAO 12M'/
-c
-#endif
-c
-      include 'cform.inc'
-      include 'mform.inc'
-c
-      data lstut/1.002737908d0/
-c
-      ierr = 0
-c
-      if (unittype .eq. -2  .and. 
-     .	       array(mdelt1) .ne. 0 .and. okreal8(array(mrval1)) .and. 
-     .	       okreal8(array(mdelt1)) .and. okreal8(array(mpix1)) ) then
-	xtochan = (v1-array(mrval1))/array(mdelt1) + array(mpix1)
-c-----------------------
-c
-      else if (unittype .eq. -1  .and. array(mdelt2) .ne. 0 .and. 
-     .	       okreal8(array(mrval2)) .and. okreal8(array(mdelt2)) .and. 
-     .         okreal8(array(mpix2)) ) then
-	xtochan = (v1-array(mrval2))/array(mdelt2) + array(mpix2)
-c-----------------------
-c
-      else if (unittype .eq. 1) then
-	xtochan = v1
-c-----------------------
-c
-#ifdef CONTINUUM
-c
-      else if (unittype .eq. 2 .and. array(c3srt) .ne. 0. .and. 
-     .	    okreal8(array(c3srt))  .and. okreal8(array(c12rp)) ) then 
-     	xtochan = v1/array(c3srt) + array(c12rp)
-c-----------------------
-c
-      else if (unittype .eq. 3 .and. array(c12dx) .ne. 0 .and.
-     .	       okreal8(array(c12dx)) .and. okreal8(array(c12x0)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + (v1-array(c12x0))/array(c12dx)
-c-----------------------
-c
-      else if (unittype .eq. 4 .and. array(c6dx) .ne. 0 .and.
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*v1/(array(c6dx)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 5 .and. array(c6dy) .ne. 0 .and.
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*v1/(array(c6dy)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 6 .and. array(c6dx) .ne. 0 .and.
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c4sx)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*(v1-array(c4sx))/(array(c6dx)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 7 .and. array(c6dy) .ne. 0 .and.
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c4sy)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*(v1-array(c4sy))/(array(c6dy)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. array(c3srt) .ne. 0. .and. 
-     .	    okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3lst)) ) then 
-     	xtochan = 3600.*(v1 - array(c3lst))/(lstut*array(c3srt)) + 
-     .		array(c12rp)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. array(c3srt) .ne. 0. .and. 
-     .	    okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3ut)) ) then 
-     	xtochan = 3600.*(v1 - array(c3ut))/array(c3srt) + array(c12rp)
-c-----------------------
-c
-#else
-c 
-      else if (unittype .eq. 2  .and. array(c12fr) .ne. 0 .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	xtochan = array(c12rp) + v1/array(c12fr)
-c-----------------------
-c
-      else if (unittype .eq. 3) then
-	dveldef = array(c7vrd)
-	xtochan = veltochan(v1,array,veldef(1:4),ierr)
-c-----------------------
-c
-      else if (unittype .eq. 4) then
-	xtochan = veltochan(v1,array,'RADI',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 5) then
-	xtochan = veltochan(v1,array,'OPTL',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 6) then
-	xtochan = veltochan(v1,array,'RELV',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 7) then
-	xtochan = veltochan(v1, array, '    ',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. array(c12fr) .ne. 0 .and.
-     .	       okreal8(array(c12rf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	xtochan = array(c12rp) + (v1 - array(c12rf))/array(c12fr)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. array(c12fr) .ne. 0 .and.
-     .	       okreal8(array(c12cf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	xtochan = array(c12rp) + (v1 - array(c12cf))/array(c12fr)
-c-----------------------
-c
-      else if ((array(c1tel) .eq. nrao12m) .and.
-     .        ((unittype .eq. 10) .or. (unittype .eq. 11))) then
-         if (okreal8(array(c9fif)) .and. okreal8(array(c9sb)) .and.
-     .       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) .and.
-     .       okreal8(array(c12cf)) .and. array(c12fr) .ne. 0.0) then
-c
-            isb = ifix(array(c9sb))
-            if ((isb .eq. 0) .or. (isb .eq. 2)) then
-               fshift = -2.0 * array(c9fif) / 1000.0
-            else
-               fshift = 2.0 * array(c9fif) / 1000.0
-            endif
-c
-            if (unittype .eq. 10 .and. okreal8(array(c12rf)) .and.
-     .          array(c12cf) .ne. 0.0) then
-               xtochan = array(c12rp) + (v1 - array(c12rf)*
-     .            (1.0 + fshift / array(c12cf))) /(-1.0*array(c12fr))
-            else if (unittype. eq. 11) then
-               xtochan = array(c12rp) + 
-     .            (v1 - array(c12cf) - fshift) / (-1.0*array(c12fr))
-            else
-               ierr = 1
-               xtochan = v1
-            endif
-         endif
-#endif
-c
-      else
-	ierr = 1
-	xtochan = v1
-c
-      endif
-c
-      return
-      end
-c
-      logical function okarray(unittype, array)
-c
-c     Tests whether a following conversion with XTOCHAN or CHANTOX will
-c	produce an error.
-c
-      integer*2 unittype
-      double precision array(*)
-c
-      double precision blah, xtochan, chantox
-      integer*2 ind1, ind2, ierr
-c
-      include 'cform.inc'
-      include 'mform.inc'
-c
-      if (unittype .eq. -2) then
-	ind1 = mrval1
-	ind2 = mpix1
-      else if (unittype .eq. -1) then
-	ind1 = mrval2
- 	ind2 = mpix2
-      else 
-	ind1 = c12x0
-	ind2 = c12rp
-      endif
-c
-      blah = xtochan(unittype, array, sngl(array(ind1)), ierr)
-      if (ierr .ne. 0) then
-	   okarray = .false.
-      else
-	   blah = chantox(unittype, array, sngl(array(ind2)), ierr)
-	   if (ierr .ne. 0) then
-	   	okarray = .false.
-	   else
-	        okarray = .true.
-	   endif
-      endif
-c
-      return
-      end
-
diff -uNr 3.5/source/conline/condar/zerror.f unipops-3.6/source/conline/condar/zerror.f
--- 3.5/source/conline/condar/zerror.f	2000-03-16 11:37:48.000000000 -0700
+++ unipops-3.6/source/conline/condar/zerror.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,82 +0,0 @@
-      subroutine zerror (z, isize, jsize, undefwp, ierr)
-c
-c     @(#)zerror.f	5.1 06/22/94
-c
-c     To check COMMON / MAPPL / and the z array specifications for 
-c     parameter errors.
-c
-c     z (isize, jsize) = (R*4) Array to be contoured
-c     isize = (I*4) First dimension limit of z
-c     jsize = (I*4) Second dimension limit of z
-c     undefwp = (R*4) Undefined value in z
-c     ierr = (I*4) Returns errors as sum of the following
-c		1: IMIN < 1
-c		2: IMAX-IMIN < 2
-c		4: IMAX > ISIZE
-c		8: JMIN < 1
-c		16: JMAX-JMIN < 2
-c		32: JMAX > JSIZE
-c		256: Number of LEVS < 1
-c		512: LEVS not in ascending order
-c		1024: All LEVS < minimum of z array
-c		2048: All LEVS > maximum of z array
-c
-c     Note: Errors 1 - 32 are major errors
-c
-c     Caution: COMMON /MAPPL/ must be set
-c
-c
-      integer*4 isize, jsize
-      integer*2 ierr, i, maxlev, ixmin, ixmax, iymin, iymax
-      real z(isize,jsize), zmin, zmax, cmin, cmax, undefwp
-c
-      include 'mappl.inc'
-      include 'appl.inc'
-      include 'core.inc'
-c
-      real zmin, zmax
-c
-      ierr = 0
-c
-      if (imin .lt. 1) ierr = ierr + 1
-c
-      if (imax - imin .lt. 1) ierr = ierr + 2
-c
-      if (imax .gt. isize) ierr = ierr + 4
-c
-      if (jmin .lt. 1) ierr = ierr + 8
-c
-      if (jmax - jmin .lt. 1) ierr = ierr + 16
-c
-      if (jmax .gt. jsize) ierr = ierr + 32
-c
-      if (levs(1) .le. -999999) ierr = ierr + 256
-c
-      do 60 i = 1, maxregn-1
-	maxlev = i
-	if (levs(i+1) .le. -999999) goto 70
-	if (levs(i) .gt. levs(i+1) ) then
-	   ierr = ierr + 512
-           goto 70
-	endif
-60	continue
-      maxlev = maxregn
-c
-70    if (imin .ge. 1 .and. jmin .ge. 1 .and. jmax .le. jsize .and.
-     .	  imax .le. isize) then
-          call zlimit(z, isize, jsize, zmin, ixmin, iymin, zmax, ixmax,
-     .		      iymax, undefwp)
-	  cmin = levs(1)
-	  cmax = levs(1)
-          do 100 i = 2, maxlev
-	     cmin = min(cmin, levs(i))
-	     cmax = max(cmax, levs(i))
-100	     continue
-          if (cmax .lt. zmin) ierr = ierr + 1024
-          if (cmin .gt. zmax) ierr = ierr + 2048
-	endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/condar/zlimit.f unipops-3.6/source/conline/condar/zlimit.f
--- 3.5/source/conline/condar/zlimit.f	2000-03-16 11:37:49.000000000 -0700
+++ unipops-3.6/source/conline/condar/zlimit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,79 +0,0 @@
-      subroutine zlimit (z, isize, jsize, zmin, ixmin, iymin, zmax, 
-     .			 ixmax, iymax, undefwp)
-c
-c     @(#)zlimit.f	5.1 06/22/94
-c
-c     To find the maximum and minimum in the Z array.  I = IMIN to
-c     IMAX, J = JMIN to JMAX (set in COMMON/MAPPL/).
-c
-c     z (isize, jsize) = (R*4) array for which max-min is desired
-c     isize = (I*4) first dimension limit of Z
-c     jsize = (I*4) second dimension limit of Z
-c     zmin = (R*4) Minimum value in Z-array
-c     zmax = (R*4) Maximum value in Z-array
-c     ixmin, iymin, ixmax, iymax = (I*2) Pixels where Max/Min are located.
-c     undefwp = (R*4) undefined value
-c
-c     Note: zmin and zmax are output, all others are input only.
-c	    Undefined points will be ignored.
-c
-c     Caution: IMIN, IMAX, JMIN, JMAX must be set in COMMON/APPL/
-c
-c
-      real*4 z(isize, jsize), zmin, zmax, undefwp
-      integer*4 isize, jsize
-      integer*2 n254, m2, ixmin, ixmax, iymin, iymax
-c
-      include 'mappl.inc'
-c
-      integer*2 i, j
-c
-      data m2, n254 /-2, 254/
-c
-      if (imin .gt. imax .or. imin .le. 0 .or. imax .gt. isize)
-     .		call oerror(n254, m2, 'MLIMIT')
-      if (jmin .gt. jmax .or. jmin .le. 0 .or. jmax .gt. jsize)
-     .		call oerror(n254, m2, 'MLIMIT')
-c     Checks that IMIN, IMAX, JMIN, and JMAX are defined correctly.
-c
-      zmin = z(imin,jmin)
-      zmax = zmin
-      ixmax = imin
-      ixmin = imin
-      iymax = jmin
-      iymin = jmin
-c
-      do 200 i = imin, imax
-	   do 100 j = jmin, jmax
-c
-		if (z(i,j) .ne. undefwp) then
-                    if (zmin .eq. undefwp) then
-                       zmin = z(i,j)
-                       zmax = z(i,j)
-                       ixmin = i
-                       ixmax = i
-                       iymin = j
-                       iymax = j
-		    else 
-                       if (z(i,j) .lt. zmin) then
-			   zmin = z(i,j)
-			   ixmin = i
-			   iymin = j
-		       endif
-		       if (z(i,j) .gt. zmax) then
-			   zmax = z(i,j)
-			   ixmax = i
-			   iymax = j
-                       endif
-		    endif
-		endif
-c
-100		continue
-200	   continue
-c
-      return
-c
-c    
-      end
-c
-c
diff -uNr 3.5/source/conline/corebox.f unipops-3.6/source/conline/corebox.f
--- 3.5/source/conline/corebox.f	2000-03-16 11:32:47.000000000 -0700
+++ unipops-3.6/source/conline/corebox.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-      subroutine corebox(ix0, iy0, ix1, iy1)
-c
-c     @(#)corebox.f	5.1 06/22/94
-c
-c     Draws a filled rectangle -- SUNCORE
-c
-      integer*2 ix0, iy0, ix1, iy1, ierr
-      integer*4 l0, l15
-      character*80 string
-c
-      data l0, l15 /0, 15/
-c
-      write(string,10,iostat=ierr) ix0, ix1, ix1, ix0, iy0, iy0,
-     .				   iy1, iy1
-10    format(8i10)
-c
-      call writeshm2(l15, l0, l0, string)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/coreclose.f unipops-3.6/source/conline/coreclose.f
--- 3.5/source/conline/coreclose.f	2000-03-16 11:32:47.000000000 -0700
+++ unipops-3.6/source/conline/coreclose.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-      subroutine coreclose
-C-------------------------------------------------------------------------------
-C  @(#)coreclose.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c    
-c     Close down graphics Shared Memory and FIFOs
-c
-      integer*4 long, irtn
-c
-      include 'cio.inc'
-c
-      call writefifo(long(igraphout), irtn, 'exit')
-      call closefifo(long(igraphout), irtn)
-      call closefifo(long(igraphin), irtn)
-c     Tell graphics process to close down and close files
-c
-      call destroyshm2
-      igraphtype = 0
-c     Destroy shared memory
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/coreclrpage.f unipops-3.6/source/conline/coreclrpage.f
--- 3.5/source/conline/coreclrpage.f	2000-03-16 11:32:48.000000000 -0700
+++ unipops-3.6/source/conline/coreclrpage.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      subroutine coreclrpage
-C-------------------------------------------------------------------------------
-C  @(#)coreclrpage.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Clears graphics screen by sending clear command to graphics Fifo
-c*********************************************
-c 8904 [RJM]
-c*********************************************
-c
-      integer*4 long, irtn
-c
-      include 'cio.inc'
-c
-      call writefifo(long(igraphout),irtn, 'clear')
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/corecolor.f unipops-3.6/source/conline/corecolor.f
--- 3.5/source/conline/corecolor.f	2000-03-16 11:32:48.000000000 -0700
+++ unipops-3.6/source/conline/corecolor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      subroutine corecolor(icolor)
-c
-c     @(#)corecolor.f	5.1 06/22/94
-c
-c     Changes the color of the next piece of graphics -- SUNCORE
-c
-      integer*4 icolor
-      integer*4 l4, l0
-      character*80 string
-c
-      data l0, l4 /0, 4/
-c
-      call writeshm2(l4, icolor, l0, string)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/corecursor.f unipops-3.6/source/conline/corecursor.f
--- 3.5/source/conline/corecursor.f	2000-03-16 11:32:48.000000000 -0700
+++ unipops-3.6/source/conline/corecursor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,39 +0,0 @@
-      subroutine corecursor(irtn, ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)corecursor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Returns cursor position via graphics Fifos
-c*************************************************************************
-c 8904 [RJM]
-c*************************************************************************
-c
-c
-      include 'cio.inc'
-c
-      integer*4 long, irtn4
-      character*80 stch 
-      integer*2 irtn, ix, iy, ier
-c
-      if (irtn .eq. 1) then
-         write(istdout,*) 'Hit Button 3 to get coordinates; ',
-     1		'Button 1 to exit cursor mode'
-      else if(irtn.eq.0) then
-	 write(istdout,*) 'Hit Button 1 or 3 to get coordinates'
-      endif
-      call flush(long(istdout))
-c
-      stch = ' '
-      call coreflush
-      call writefifo(long(igraphout), irtn4, 'cursor')
-10    call readfifo(long(igraphin), irtn4, stch)
-c
-      if (stch(1:4) .eq. 'done') goto 10
-c     Watch out for a 'lingering' done from the graphics process.
-c
-      read(stch,20,iostat=ier) irtn, ix, iy 
-20    format(3i5)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/coredither.f unipops-3.6/source/conline/coredither.f
--- 3.5/source/conline/coredither.f	2000-03-16 11:32:49.000000000 -0700
+++ unipops-3.6/source/conline/coredither.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine coredither(ix, iy, nx, ny, percent)
-c
-c     @(#)coredither.f	5.1 06/22/94
-c
-c     Produces a half-tone box at the coordinates (IX,IY) with size (NX,NY)
-c	and that is PERCENT filled -- SUNCORE
-c
-      integer*2 ix, iy, nx, ny
-      real percent
-c
-      integer*2 ierr
-      integer*4 l16, lix, liy
-      character*80 string
-c
-      data l16 /16/
-c
-      write(string,10,iostat=ierr) nx, ny, percent
-10    format(i5,i5,f10.7)
-c     Box size and percent gray are stored in STRING to be passed to window
-c	process.
-c
-      lix = ix
-      liy = iy
-      call writeshm2(l16, lix, liy, string)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/coreflush.f unipops-3.6/source/conline/coreflush.f
--- 3.5/source/conline/coreflush.f	2000-03-16 11:32:49.000000000 -0700
+++ unipops-3.6/source/conline/coreflush.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine coreflush
-c
-C-------------------------------------------------------------------------------
-C  @(#)coreflush.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Flushes out the graphics shared memory  and FIFO
-c
-      include 'cio.inc'
-c
-      character*80 string
-      integer*4 long, getnextloc, irtn
-c
-      if (getnextloc() .ne. 0) then
-      	call writefifo(long(igraphout), irtn, 'flush')
-10      call readfifo(long(igraphin), irtn, string)
-c
-      	if (string(1:4) .ne. 'done') goto 10
-	if (getnextloc() .ne. 0) goto 10
-c	Watch out for a leftover 'cursor' or similar response from the graphics
-c	process
-c
-      endif
-c     Only get GRAPHICS process to flush shared memory if anything exists their
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/coreint.f unipops-3.6/source/conline/coreint.f
--- 3.5/source/conline/coreint.f	2000-03-16 11:32:49.000000000 -0700
+++ unipops-3.6/source/conline/coreint.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,72 +0,0 @@
-      subroutine coreint
-C-------------------------------------------------------------------------------
-C  @(#)coreint.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Initializes Graphics Shared memory, FIFOs, and process
-c*********************************************
-c 8904 [RJM]
-c 8911 [RJM]  
-c*********************************************
-c
-      integer*2 lastblnk
-      integer*4 irtn, system, ilen, i, j
-      character*18 blank
-      character*1 wintype
-      character*5 key
-c
-      include 'cio.inc'
-c
-      data blank/'                  '/
-c				only 4 characters can be used for the
-c				shared memory key (its a long int)
-c				So, use the last 4 digits of procid
-c				substitute 0's if less than 4 digits
-      ilen = lastblnk(procid)
-      j = 1
-      do 100 i = ilen-3, ilen
-         if (i .le. 0 .or. procid(i:i) .lt. '0' .or.
-     .            procid(i:i) .gt. '9') then
-            key(j:j) = '0'
-         else
-            key(j:j) = procid(i:i)
-         endif
-         j = j + 1
- 100  continue
-c				null terminate it
-      key(5:5) = char(0)
-c
-      call createshm2(key)
-      wintype = 'S'
-      if (termtype .eq. 'xwindow') wintype = 'X'
-      irtn = system('makegraph.exe ' // cgraphin // ' ' // cgraphout //
-     .  	     ' ' // procid // ' ' // program(1:1) // 
-     .               ' ' // wintype)
-c     Create shared memory and start up graphics process
-c
-      if (irtn .ne. 0) then
-	write(istderr,*) 'Cannot open graphics screen.... Continuing!'
-	igraphtype = 0
-	goto 99
-      endif
-c
-      call openread(irtn, cgraphin(1:lastblnk(cgraphin)) // '\0' )
-      if (irtn .lt. 0) then
-	write(istderr,*) 'Cannot open graphics screen.... Continuing!'
-	igraphtype = 0
-	goto 99
-      endif
-      igraphin = irtn
-c
-      call openwrite(irtn, cgraphout(1:lastblnk(cgraphout)) // '\0' )
-      if (irtn .lt. 0) then
-	write(istderr,*) 'Cannot open graphics screen.... Continuing!'
-	igraphtype = 0
-	goto 99
-      endif
-      igraphout = irtn
-c     Open graphics FIFO's
-c
-99    return
-      end
-c
diff -uNr 3.5/source/conline/coreplace.f unipops-3.6/source/conline/coreplace.f
--- 3.5/source/conline/coreplace.f	2000-03-16 11:32:50.000000000 -0700
+++ unipops-3.6/source/conline/coreplace.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine coreplace (ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)coreplace.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR call -- Uses Graphics shared memory
-c****************************************************
-c 8904 [RJM]
-c****************************************************
-c
-      include 'cio.inc'
-c
-      integer*2 ix, iy
-      integer*4 l1, lix, liy
-      character*80 string
-c
-      data l1 /1/
-c
-      lix = ix
-      liy = iy
-      call writeshm2(l1, lix, liy, string)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/corevctr.f unipops-3.6/source/conline/corevctr.f
--- 3.5/source/conline/corevctr.f	2000-03-16 11:32:50.000000000 -0700
+++ unipops-3.6/source/conline/corevctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-      subroutine corevctr(ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)corevctr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a line from the position last specified by
-c     move to the position ix, iy -- uses graphics shared memory
-c***************************************
-c 8904 [RJM
-c***************************************
-c
-      include 'cio.inc'
-c
-      integer*2 ix, iy
-      integer*4 l2, lix, liy
-      character*80 string
-c
-      data l2 /2/
-c
-      lix = ix
-      liy = iy
-      call writeshm2(l2, lix, liy, string)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/ctrlcintr.f unipops-3.6/source/conline/ctrlcintr.f
--- 3.5/source/conline/ctrlcintr.f	2000-03-16 11:32:50.000000000 -0700
+++ unipops-3.6/source/conline/ctrlcintr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,27 +0,0 @@
-      subroutine ctrlcintr()
-C-------------------------------------------------------------------------------
-C  @(#)ctrlcintr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Does some clean up operations if a Ctrl-C was hit
-c
-      include 'cio.inc'
-      include 'appl.inc'
-c
-      if (igraphtype .eq. 2) call resetshm
-c
-      write(istderr,10) 
-10    format(1x,10a)
-      if (iintype .eq. istdin) then
-       write(istderr,10) 'Ctrl-C Interrupt -- Use EXIT to exit properly'
-      else
-       write(istderr,10) 'Ctrl-C Interrupt'
-       call oerror2
-      endif
-c
-      call revertcolor
-c     Revert colors to its currently defined value
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/cursor.f unipops-3.6/source/conline/cursor.f
--- 3.5/source/conline/cursor.f	2000-03-16 11:32:51.000000000 -0700
+++ unipops-3.6/source/conline/cursor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine cursor(i1, i2, i3)
-C-------------------------------------------------------------------------------
-C  @(#)cursor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Displays graphics cursor
-c***************************************
-c 8904 [RJM
-c***************************************
-c
-      integer*2 i1, i2, i3
-      include 'cio.inc'
-c
-      if (igraphtype .eq. 4) then
-	call v102cursor(i1, i2, i3)
-      else if (igraphtype .eq. 3) then
-	call tekcursor(i1, i2, i3)
-      else if (igraphtype .eq. 2) then
-	call corecursor(i1, i2, i3)
-      else 
-	call nogcursor(i1, i2, i3)
-      endif
-      return
-      end
-c
diff -uNr 3.5/source/conline/cv/access.c unipops-3.6/source/conline/cv/access.c
--- 3.5/source/conline/cv/access.c	2000-03-16 11:38:05.000000000 -0700
+++ unipops-3.6/source/conline/cv/access.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,238 +0,0 @@
-
-/* @(#)access.c	5.2 07/06/94 */
-
-/* stubbed versions of data access routines for installations that don't */
-/* connect to any online data */
-
-
-/*
-** Access and attach shared memory and set the project code
-*/
-void openaccess_(anal_user_code, anal_user_name, anal_site_name, return_code)
-	double *anal_user_code, *anal_user_name, *anal_site_name;
-	int *return_code;
-{
-      *return_code = 10000;
-}
-
-/*
-** Set the output format to SDD format
-*/
-void setformat_(fmtcode, return_code)
-	int *fmtcode, *return_code;
-{
-	*return_code = 10000;
-}
-
-/*
-** Change the project code
-*/
-void chgprj_(anal_user_code, anal_user_name, anal_site_name, return_code)
-	double *anal_user_code, *anal_user_name, *anal_site_name;
-	int *return_code;
-{
-	*return_code = 10000;
-}
-
-/*
-** Get the list of scans that belongs to this project
-*/
-void gscanlist2_(actno,maxno,list,return_code)
-	int *actno, *maxno, *return_code;
-        float *list;
-{
-}
-
-/*
-** Get a particular scan
-*/
-void gscan_(scan_no,feed_no,record,return_code)
-	int *scan_no, *feed_no, *record, *return_code;
-{
-}
-
-/*
-** Get the header for a particular scan
-*/
-void gshead_(scan_no,feed_no,record,return_code)
-	int *scan_no, *feed_no, *record, *return_code;
-{
-}
-
-/*
-** ggscan, ggscanlist are for tucson data only
-*/
-
-void ggscan_(scan_no,feed_no,record,return_code)
-   int *scan_no, *feed_no, *record, *return_code;
-{
-}
-
-void glgscan_(record, feed_no, return_code)
-   float *record;
-   int *feed_no, *return_code;
-{
-}
-
-void ggscanlist2_(actno,maxno,list,return_code)
-	int *actno, *maxno, *return_code;
-        float *list;
-{
-}
-
-/*
-** Get the last completed scan that belongs to this project
-*/
-void gcscan_(record,return_code)
-	float *record;
-	int *return_code;
-{
-}
-
-/*
-** Get the Spectral Processsor scan
-*/
-void gspscan_(scan_no,feed_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-}
-
-/*
-** Get the Spectral Processsor individual record
-*/
-void gspir_(scan_no,feed_no,phase_no,rec_no,record,return_code)
-	int *scan_no, phase_no, rec_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-}
-/*
-** Get the A/C individual record
-*/
-void gacir_(scan_no,feed_no,phase_no,rec_no,record,return_code)
-	int *scan_no, phase_no, rec_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-}
-
-/*
-** Get the list of scans that belongs to this project
-*/
-void gcontlist2_(actno,maxno,list,return_code)
-	int *actno, *maxno, *return_code;
-        float *list;
-{
-}
-
-/*
-** Get a particular scan
-*/
-void gcont_(scan_no,feed_no,actualpoints,maxpoints,record,return_code)
-	int *scan_no, *feed_no, *actualpoints, *maxpoints;
-	float *record;
-	int *return_code;
-{
-}
-
-/*
-** Get the header for a particular scan
-*/
-void gchead_(scan_no,feed_no,record,return_code)
-	int *scan_no, *feed_no, *record, *return_code;
-{
-}
-
-/*
-** Get the last completed scan that belongs to this project
-*/
-void glcont_(feed_no,actualpoints,maxpoints,record,return_code)
-	int *feed_no, *actualpoints, *maxpoints;
-	float *record;
-	int *return_code;
-{
-}
-
-void gselect_(params, actno, maxno, list, return_code)
-	double *params;
-	int *actno, *maxno;
-	float *list;
-	int *return_code;
-{
-   *actno = 0;
-   *return_code = 1;
-}
-
-void closeaccess_()
-{
-}
-
-int useprojcode_()
-{
-      return(0);
-}
-
-int onlinesite_()
-{
-   return(-1);
-}
-
-void chngonline_(idtype, iver, anal_user_code, ier)
-int *idtype;
-int *iver;
-char *anal_user_code;
-short int *ier;
-{
-   *iver = -1;
-   *ier = 232;
-}
-
-
-int deffeed_()
-{
-   return(1);
-}
-
-void olfiles_()
-{
-}
-
-void changever_(idtype, iver, anal_user_code, ier)
-int *idtype;
-int *iver;
-char *anal_user_code;
-short int *ier;
-{
-   *iver = -1;
-   *ier = 232;
-}
-
-int qvers_(iftype)
-int *iftype;
-{
-/*   wants the current version of file type iftype, tuc only */
-   return(-1);
-}
-
-void gotfrec_(scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-/*   get an OTF record - 12-m data only */
-   *return_code = -1;
-}
-
-void gpzrec_(scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-/* Get a polariz. record - 12m on-line only */
-  *return_code = -1;
-}
diff -uNr 3.5/source/conline/disk/filefns.c unipops-3.6/source/conline/disk/filefns.c
--- 3.5/source/conline/disk/filefns.c	2000-03-16 11:35:59.000000000 -0700
+++ unipops-3.6/source/conline/disk/filefns.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,60 +0,0 @@
-
-/* @(#)filefns.c	5.1 06/22/94 */
-/* This contains all functions that need to know */
-/* about the files array */
-
-#include <files.h>
-
-#define NFILES 10
-sddfile file[NFILES];
-
-
-/* sddinit_ initiallizes the files array */
-/*    It should be called only once */
-
-void sddinit_()
-
-{
-   int i;
-
-   for(i=0;i<NFILES;i++) {
-      file[i].fd = -1;
-      file[i].unit = 0;
-   }
-}
-
-/* closeall_ closes all open entries in the files array */
-
-void closeall_()
-
-{
-   int i;
-   void sddclose_();
-
-   for (i=0;i<NFILES;i++) {
-      if (file[i].fd != -1) sddclose_(&file[i].unit);
-   }
-}
-
-/* getslot returns a pointer to the sddfile corresponding to the */
-/* slot in file array indicated by abs(*unit) if available, 0 if 
-/* not available */
-/* Note that if file[i].unit = 0 this means that that slot is not in use */
-/* So ... this function can also be used to return a pointer to the first */
-/* unused slot in the file array by simply calling it with *unit = 0 */
-
-sddfile *getslot(unit)
-int *unit;
-
-{
-
-   int i, iunit;
-
-   iunit = (*unit < 0) ? -(*unit) : *unit;
-   for(i=0;i<NFILES;i++) {
-      if (file[i].unit == iunit) return(&file[i]);
-   }
-
-   return(0);
-}
-
diff -uNr 3.5/source/conline/disk/getarec.c unipops-3.6/source/conline/disk/getarec.c
--- 3.5/source/conline/disk/getarec.c	2000-03-16 11:36:02.000000000 -0700
+++ unipops-3.6/source/conline/disk/getarec.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,83 +0,0 @@
-
-/* @(#)getarec.c	5.1 06/22/94 */
-
-/* Routine to fetch a record from unit and put maxsize (R*8) of it into buf */
-/* lrtn = 0 if everything went ok */
-/*      = 1 if not open */
-/*      = 2 if problem reading or positioning file */
-/*      = 3 if bootstrap block is weird */
-/*      = 4 if scan not found/ entry is empty */
-/*      = 5 if scan has a weird value or entry is out of range */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-
-void getarec_(unit, location, phase_no, rec_no, buf, maxsize, lrtn)
-int *unit, *maxsize, *lrtn, *phase_no, *rec_no;
-float *location;
-double *buf;
-
-{
-
-   int i, scan, feed, entry, size, offset, curpos;
-   long phase_rec;
-   sddfile *fptr, *getslot();
-   sindex *index;
-
-   *lrtn = 0;
-   if ((fptr=getslot(unit)) == 0) {
-      *lrtn = 1; return;
-   } 
-   if (fptr->fd == -1) {
-      *lrtn = 1; return;
-   }
-/*		not there or just not open */
-
-   if ((*lrtn = getbs(fptr)) != 0) {
-      *lrtn = *lrtn + 1; return;
-   }
-
-/*		ok, at this point the bs block has been read, checked and */
-/*		updated if necessary due to a change */
-
-/*		if this is by scan number, look for it in the index */
-
-   index = fptr->index;
-   if ((scan = *location) <= 0) {
-         *lrtn = 5; return;
-   }
-   feed = ((*location - scan) * 100.0 + 0.5);
-   phase_rec = *phase_no + *rec_no*64;
-   if (feed == 0) feed = 1;
-   for (i=0;i<fptr->bs.num_entries_used;i++) {
-      if ((scan == index->scan_number) && (feed == index->feed_number) &&
-	  (phase_rec == index->phase_rec) ) {
-         break;
-      }
-      index = index++;
-   }
-   if (i >= fptr->bs.num_entries_used) {
-      *lrtn = 4; return;
-   }
-
-/*		ok, just read it in	*/
-
-   offset = index->start_rec * fptr->bs.bytperrec;
-   curpos = lseek(fptr->fd, 0, SEEK_CUR);
-   *lrtn = 2;
-   if (curpos != -1) {
-      offset = offset - curpos;
-      curpos = lseek(fptr->fd, offset, SEEK_CUR);
-      if (curpos != -1) {
-         size = index->nb_rec * fptr->bs.bytperrec;
-         size = (size % sizeof(double)) ? size/sizeof(double) + 1:
-                                          size/sizeof(double);
-         size = (size > *maxsize) ? *maxsize : size;
-         size = size * sizeof(double);
-         if ((i = read(fptr->fd, (char *)buf, size)) == size) {
-            *lrtn = 0;
-         }
-      } 
-   }
-}
diff -uNr 3.5/source/conline/disk/getascan.c unipops-3.6/source/conline/disk/getascan.c
--- 3.5/source/conline/disk/getascan.c	2000-03-16 11:35:57.000000000 -0700
+++ unipops-3.6/source/conline/disk/getascan.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-
-/* @(#)getascan.c	5.1 06/22/94 */
-
-/* Routine to fetch a scan from unit and put maxsize (R*8) of it into buf */
-/* flag indicate whether to fetch the scan by scan number (1) or entry (0) */
-/* This is a frontend to getsddscan and is intended primarily for use by */
-/* the fortran routines in unipops */
-/* see the comments for getsddscan for a complete list of errors */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-
-void getascan_(unit, location, flag, buf, maxsize, lrtn)
-int *unit, *flag, *maxsize, *lrtn;
-float *location;
-double *buf;
-
-{
-
-   sddfile *fptr, *getslot();
-   void getsddscan();
-
-   *lrtn = 0;
-   if ((fptr=getslot(unit)) == 0) {
-      *lrtn = 1; return;
-   } 
-
-   getsddscan(fptr, location, flag, buf, maxsize, lrtn);
-   
-}
diff -uNr 3.5/source/conline/disk/getbs.c unipops-3.6/source/conline/disk/getbs.c
--- 3.5/source/conline/disk/getbs.c	2000-03-16 11:35:58.000000000 -0700
+++ unipops-3.6/source/conline/disk/getbs.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,93 +0,0 @@
-
-/* @(#)getbs.c	5.1 06/22/94 */
-
-/* getbs gets the bootstrap block and checks it agains any existing values */
-/* if values differ, reread the index */
-/* returns 0 if everything is ok */
-/*         1 if file read/positioning problems */
-/*         2 if bootstrap values are bizzare */
-
-#include <stdio.h>
-#include <malloc.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-#include <sdd.h>
-
-int getbs(fptr)
-sddfile *fptr;
-
-{
-
-   sdd_bs_block *sddbs, bs;
-   old_sdd_bs_block *oldsddbs;
-   char cbuf[SDDBUFSIZE];
-   int n, offset, makesindex();
-
-   
-/*		rewind file */
-   if ((offset = lseek(fptr->fd, 0, SEEK_SET)) != 0) {
-      return(1);
-   }
-   if ((n = read(fptr->fd, cbuf, SDDBUFSIZE)) != SDDBUFSIZE) {
-      return(1);
-   }
-/*		is it I*2 or I*4 */
-   if (((sdd_bs_block *)cbuf)->sddversion == 1) {
-/*		I*4 */
-      sddbs = (sdd_bs_block *)cbuf;
-   } else {
-/*		I*2, copy it over to sddbs */
-      sddbs = &bs;
-      oldsddbs = (old_sdd_bs_block *)cbuf;
-      sddbs->num_index_rec = oldsddbs->num_index_rec;
-      sddbs->num_data_rec = oldsddbs->num_data_rec;
-      sddbs->bytperrec = oldsddbs->bytperrec;
-      sddbs->bytperent = oldsddbs->bytperent;
-      sddbs->num_entries_used = oldsddbs->num_entries_used;
-      sddbs->counter = oldsddbs->counter;
-      sddbs->typesdd = oldsddbs->typesdd;
-      sddbs->sddversion = 0;
-   }
-
-   n = 0;
-   if ((sddbs->num_index_rec    != fptr->bs.num_index_rec) ||
-       (sddbs->num_data_rec     != fptr->bs.num_data_rec)  ||
-       (sddbs->bytperrec        != fptr->bs.bytperrec)     ||
-       (sddbs->bytperent        != fptr->bs.bytperent)     ||
-       (sddbs->num_entries_used != fptr->bs.num_entries_used) ||
-       (sddbs->counter          != fptr->bs.counter)       ||
-       (sddbs->typesdd          != fptr->bs.typesdd)       ||
-       (sddbs->sddversion       != fptr->bs.sddversion)) {
-/*		bs block has changed or was never set, first, sanity checks */
-/*		most of these are obvious, however, these routines assume */
-/*		that there are an integer number of index entries per record */
-/*		so, this checks that that assumption is true */
-      if ((sddbs->num_index_rec <= 0) ||
-          (sddbs->num_data_rec < 0) ||
-          (sddbs->bytperrec <= 0) ||
-          (sddbs->bytperent != sizeof(sdd_index_entry)) ||
-          (sddbs->num_entries_used < 0) ||
-          (sddbs->counter < 0) ||
-          (sddbs->bytperrec % sddbs->bytperent)) {
-         return(2);
-      }
-
-      fptr->bs.num_index_rec = sddbs->num_index_rec;
-      fptr->bs.num_data_rec = sddbs->num_data_rec;
-      fptr->bs.bytperrec = sddbs->bytperrec;
-      fptr->bs.bytperent = sddbs->bytperent;
-      fptr->bs.num_entries_used = sddbs->num_entries_used;
-      fptr->bs.counter = sddbs->counter;
-      fptr->bs.typesdd = sddbs->typesdd;
-      fptr->bs.sddversion = sddbs->sddversion;
-/*		the following is usefull to calculate now and keep around */
-      fptr->nb_index_elem = 
-               (sddbs->num_index_rec - 1)* sddbs->bytperrec / sddbs->bytperent;
-/*		final sanity check	*/
-      if (fptr->nb_index_elem < fptr->bs.num_entries_used) return(2);
-
-      if (makesindex(fptr)) return(1);
-   }
-   return(n);
-}
diff -uNr 3.5/source/conline/disk/getnindex.c unipops-3.6/source/conline/disk/getnindex.c
--- 3.5/source/conline/disk/getnindex.c	2000-03-16 11:35:58.000000000 -0700
+++ unipops-3.6/source/conline/disk/getnindex.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,27 +0,0 @@
-
-/* @(#)getnindex.c	5.1 06/22/94 */
-
-/* returns a pointer to nelem index entries from unit begining at entry */
-/* nelem is reset to the number actually returned */
-/* this is a front end to getnsddindex and is intended for use by the */
-/* fortran side of unipops */
-/* see getnsddindex for the full list of errors */
-
-#include <files.h>
-#include <sdd.h>
-
-void getnindex_(unit, entry, index, nelem, lrtn)
-int *unit, *entry, *nelem, *lrtn;
-sdd_index_entry *index;
-
-{
-
-   sddfile *fptr, *getslot();
-   void getnsddindex();
-
-   if ((fptr=getslot(unit)) == 0) {
-      *lrtn = 1; return;
-   } 
-
-   getnsddindex(fptr, entry, index, nelem, lrtn);
-}
diff -uNr 3.5/source/conline/disk/getnsddindex.c unipops-3.6/source/conline/disk/getnsddindex.c
--- 3.5/source/conline/disk/getnsddindex.c	2000-03-16 11:36:03.000000000 -0700
+++ unipops-3.6/source/conline/disk/getnsddindex.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,80 +0,0 @@
-
-/* @(#)getnsddindex.c	5.1 06/22/94 */
-
-/* returns a pointer to nelem index entries from fptr begining at entry */
-/* lrtn = 0 on successfull return, */
-/*      = 1 if file not open */
-/*      = 2 if a problem reading or positioning file */
-/*      = 3 if a problem with the bootstrap information */
-/*      = 4 if entry or nelem are not appropriate */
-/* nelem is reset to the number actually returned */
-/* This assumes that there are an integer number of index blocks per */
-/* file record, i.e. that bytperrec / bytperent = 0 */
-/* This assumption is checked as part of the bootstrap santity checks */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-#include <sdd.h>
-
-void getnsddindex(fptr, entry, index, nelem, lrtn)
-sddfile *fptr;
-int *entry, *nelem, *lrtn;
-sdd_index_entry *index;
-
-{
-
-   int i, size, offset, getbs();
-   old_sdd_index_entry *oldindex;
-   sdd_index_entry tmpindex;
-
-   if (fptr == NULL || fptr->fd == -1) {
-      *lrtn = 1; return;
-   } 
-/*			not there or just not open */
-/*			getbs checks the bs on disk with that stored in */
-/*			the file structure, if a difference is found, the */
-/*			index is remade from scratch, if a problem happens */
-/*			here, the file is screwed up or a read error occured */
-   
-   if ((*lrtn = getbs(fptr)) != 0) {
-      *lrtn = *lrtn + 1; return;
-   }
-   if (*entry < 1 || *nelem < 1) {
-      *lrtn = 4; return;
-   }
-
-   i = fptr->bs.num_entries_used - *entry + 1;
-   if (i < 0) i = 0;
-   *nelem = (*nelem > i) ? i : *nelem;
-
-   if (*nelem) {
-      size = *nelem * fptr->bs.bytperent;
-      offset = (*entry - 1) * fptr->bs.bytperent + 
-                         fptr->bs.bytperrec;
-
-      if (lseek(fptr->fd, offset, SEEK_SET) != offset) {
-/*				couldn't seek to start of index specified */
-         *lrtn = 2; return;
-      }
-
-      if ((i = read(fptr->fd, index, size)) != size) {
-/*				file read error */
-         *lrtn = 2; return;
-      }
-/*				If this is an I*2 index, fancy footwork */
-/*				This relys on the fact that most of the */
-/*				index hasn't changed. */
-      if (fptr->bs.sddversion == 0) {
-         for (i=0;i<*nelem;i++) {
-            oldindex = (old_sdd_index_entry *)&index[i];
-            tmpindex.start_rec = oldindex->start_rec;
-            tmpindex.end_rec = oldindex->end_rec;
-            tmpindex.pos_code = oldindex->pos_code;
-            index[i].start_rec = tmpindex.start_rec;
-            index[i].end_rec = tmpindex.end_rec;
-            index[i].pos_code = tmpindex.pos_code;
-         }
-      }
-   }
-}
diff -uNr 3.5/source/conline/disk/getsddbs.c unipops-3.6/source/conline/disk/getsddbs.c
--- 3.5/source/conline/disk/getsddbs.c	2000-03-16 11:35:59.000000000 -0700
+++ unipops-3.6/source/conline/disk/getsddbs.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,42 +0,0 @@
-
-/* @(#)getsddbs.c	5.1 06/22/94 */
-
-/* returns the bootstrap parameters, intended for use by fortran routines */
-/* that want to know what the bootstrap parameters are */
-/* ier = 0 if no error */
-/*     = 1 if file not open */
-/*     = 2 if there was a problem reading or positioning the file */
-/*     = 3 if bootstrap information is bizzare */
-
-#include <files.h>
-
-void getsddbs_(unit, num_index_rec, num_data_rec, bytperrec, 
-               bytperent, num_entries_used, ier)
-int *unit, *num_index_rec, *num_data_rec, *bytperrec, *bytperent,
-    *num_entries_used, *ier;
-
-{
-
-   int getbs();
-   sddfile *fptr, *getslot();
-
-   if ((fptr=getslot(unit)) == 0) { 
-      *ier = 1;
-   } else {
-      if (fptr->fd == -1) {
-/*		not there or just not open	*/
-         *ier = 1;
-      } else {
-         if ((*ier = getbs(fptr)) == 0) {
-            *num_index_rec = fptr->bs.num_index_rec;
-            *num_data_rec = fptr->bs.num_data_rec;
-            *bytperrec = fptr->bs.bytperrec;
-            *bytperent = fptr->bs.bytperent;
-            *num_entries_used = fptr->bs.num_entries_used;
-         } else {
-/*		translate the getbs error */
-            if (*ier > 0) *ier = *ier + 1;
-         }
-      }
-   }
-}
diff -uNr 3.5/source/conline/disk/getsddscan.c unipops-3.6/source/conline/disk/getsddscan.c
--- 3.5/source/conline/disk/getsddscan.c	2000-03-16 11:36:03.000000000 -0700
+++ unipops-3.6/source/conline/disk/getsddscan.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,90 +0,0 @@
-
-/* @(#)getsddscan.c	5.1 06/22/94 */
-
-/* Routine to fetch a scan from unit and put maxsize (R*8) of it into buf */
-/* flag indicate whether to fetch the scan by scan number (1) or entry (0) */
-/* lrtn = 0 if everything went ok */
-/*      = 1 if not open */
-/*      = 2 if problem reading or positioning file */
-/*      = 3 if bootstrap block is weird */
-/*      = 4 if scan not found/ entry is empty */
-/*      = 5 if scan has a weird value or entry is out of range */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-
-void getsddscan(fptr, location, flag, buf, maxsize, lrtn)
-sddfile *fptr;
-int *flag, *maxsize, *lrtn;
-float *location;
-double *buf;
-
-{
-
-   int i, scan, feed, entry, size, offset, curpos;
-   sindex *index;
-
-   *lrtn = 0;
-   if (fptr->fd == -1) {
-      *lrtn = 1; return;
-   }
-/*		not there or just not open */
-
-   if ((*lrtn = getbs(fptr)) != 0) {
-      *lrtn = *lrtn + 1; return;
-   }
-
-/*		ok, at this point the bs block has been read, checked and */
-/*		updated if necessary due to a change */
-
-/*		if this is by scan number, look for it in the index */
-
-   index = fptr->index;
-   if (*flag) {
-      if ((scan = *location) <= 0) {
-         *lrtn = 5; return;
-      }
-      feed = ((*location - scan) * 100.0 + 0.5);
-      if (feed == 0) feed = 1;
-      for (i=0;i<fptr->bs.num_entries_used;i++) {
-         if ((scan == index->scan_number) && (feed == index->feed_number)) {
-            break;
-         }
-         index = index++;
-      }
-      if (i >= fptr->bs.num_entries_used) {
-         *lrtn = 4; return;
-      }
-   } else {
-      entry = *location;
-      if ((entry > 0) && (entry <= fptr->bs.num_entries_used)) {
-         index = fptr->index + entry - 1;
-         if (index->scan_number == 0) {
-            *lrtn = 4; return;
-         }
-      } else {
-         *lrtn = 5; return;
-      }
-   }
-
-/*		ok, just read it in	*/
-
-   offset = index->start_rec * fptr->bs.bytperrec;
-   curpos = lseek(fptr->fd, 0, SEEK_CUR);
-   *lrtn = 2;
-   if (curpos != -1) {
-      offset = offset - curpos;
-      curpos = lseek(fptr->fd, offset, SEEK_CUR);
-      if (curpos != -1) {
-         size = index->nb_rec * fptr->bs.bytperrec;
-         size = (size % sizeof(double)) ? size/sizeof(double) + 1:
-                                          size/sizeof(double);
-         size = (size > *maxsize) ? *maxsize : size;
-         size = size * sizeof(double);
-         if ((i = read(fptr->fd, (char *)buf, size)) == size) {
-            *lrtn = 0;
-         }
-      } 
-   }
-}
diff -uNr 3.5/source/conline/disk/getsddscanlist.c unipops-3.6/source/conline/disk/getsddscanlist.c
--- 3.5/source/conline/disk/getsddscanlist.c	2000-03-16 11:36:04.000000000 -0700
+++ unipops-3.6/source/conline/disk/getsddscanlist.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,48 +0,0 @@
-
-/* @(#)getsddscanlist.c	5.1 06/22/94 */
-
-/* getsddscanlist returns in rbuf the scans numbers of whats on disk */
-/* actelem is set to the actual number of scans returned */
-/* maxelem is the maximum number of elements of rbuf */
-/* ier = 0 if everything went ok */
-/*     = 1 if file is not open */
-/*     = 2 if there was a problem reading or positioning the file */
-/*     = 3 if the bootstrap information is bizzare */
-
-#include <files.h>
-
-void getsddscanlist(fptr, rbuf, actelem, maxelem, ier)
-sddfile *fptr;
-int *actelem, *maxelem, *ier;
-float *rbuf;
-
-{
-
-   int i;
-   sindex *index;
-   float scan, feed;
-
-   *actelem = 0;
-   *ier = 0;
-   if (fptr->fd == -1) {
-/*			not there or just not open */
-      *ier = 1;
-   } else {
-      if ((*ier = getbs(fptr)) == 0) {
-         index = fptr->index;
-         for (i=0;i<*maxelem && i<fptr->bs.num_entries_used;i++) {
-            if ((index+i)->scan_number != 0) {
-               *(rbuf+i) = (index+i)->scan_number + 
-                           (index+i)->feed_number / 100.;
-            } else {
-/*			if scan_number is 0, its really empty */
-               *(rbuf+i) = 0;
-            }
-         }
-         *actelem= i;
-      } else {
-/*		translate the getbs error	*/
-         if (*ier > 0) *ier = *ier + 1;
-      }
-   }
-}
diff -uNr 3.5/source/conline/disk/getslist.c unipops-3.6/source/conline/disk/getslist.c
--- 3.5/source/conline/disk/getslist.c	2000-03-16 11:35:59.000000000 -0700
+++ unipops-3.6/source/conline/disk/getslist.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,27 +0,0 @@
-
-/* @(#)getslist.c	5.1 06/22/94 */
-
-/* getslist returns in rbuf the scans numbers of whats on disk */
-/* it is mearly a front end for getscanlist and is intended to be used */
-/* only by the fortan side of unipops */
-/* actelem is set to the number of scans returned */
-/* maxelem is the maximum number of elements of rbuf */
-/* see getsddscanlist for the list of possible errors returned via ier */
-
-#include <files.h>
-
-void getslist_(unit, rbuf, actelem, maxelem, ier)
-int *unit, *actelem, *maxelem, *ier;
-float *rbuf;
-
-{
-
-   sddfile *fptr, *getslot();
-   void getsddscanlist();
-
-   if ((fptr=getslot(unit)) == 0) {
-      *ier = 1;
-   } else {
-      getsddscanlist(fptr, rbuf, actelem, maxelem, ier);
-   }
-}
diff -uNr 3.5/source/conline/disk/makesindex.c unipops-3.6/source/conline/disk/makesindex.c
--- 3.5/source/conline/disk/makesindex.c	2000-03-16 11:36:00.000000000 -0700
+++ unipops-3.6/source/conline/disk/makesindex.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,79 +0,0 @@
-
-/* @(#)makesindex.c	5.1 06/22/94 */
-
-/* makesindex reads the full sdd index from a file and */
-/* fills the makesindex linked list appropriately */
-/* returns 0 if ok, else 1 which means there was a problem reading or */
-/* positioning the file */
-
-#include <stdio.h>
-#include <malloc.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-#include <sdd.h>
-
-int makesindex(fptr)
-sddfile *fptr;
-
-{
-
-   sindex *index;
-   sdd_index_entry sddindex;
-   old_sdd_index_entry oldsddindex;
-   int i, n, offset;
-
-   if (fptr->index) free(fptr->index);
-   fptr->index = (sindex *)calloc(fptr->nb_index_elem, sizeof(sindex));
-   index = fptr->index;
-   if (index == NULL) {
-      return(1);
-   }
-
-/* get to start of index block */
-
-   if ((offset=lseek(fptr->fd, fptr->bs.bytperrec, SEEK_SET)) != 
-          fptr->bs.bytperrec) return(1);
-
-/* read each index */
-
-   for (i=0;i<fptr->bs.num_entries_used;i++) {
-      if (fptr->bs.sddversion == 1) {
-/*		new I*4 index */
-         if ((n=read(fptr->fd, &sddindex, fptr->bs.bytperent))
-               != fptr->bs.bytperent) return(1);
-/*		bad number of blocks read */
-/*		set values from sddindex if sddindex.scan != 0 */
-         if (sddindex.scan) {
-            index->scan_number = sddindex.scan;
-            index->feed_number = 
-               (sddindex.scan - index->scan_number) * 100. + 0.5;
-            index->start_rec = sddindex.start_rec - 1;
-            index->nb_rec = sddindex.end_rec - index->start_rec;
-            index->obsmode = sddindex.obsmode;
-            index->phase_rec = sddindex.phase_rec;
-         } else {
-            index->scan_number = 0;
-         }
-      } else {
-/*		old I*2 index */
-         if ((n=read(fptr->fd, &oldsddindex, fptr->bs.bytperent))
-               != fptr->bs.bytperent) return(1);
-/*		bad number of blocks read */
-/*		set values from oldsddindex if oldsddindex.scan != 0 */
-         if (oldsddindex.scan) {
-            index->scan_number = oldsddindex.scan;
-            index->feed_number = 
-               (oldsddindex.scan - index->scan_number) * 100. + 0.5;
-            index->start_rec = oldsddindex.start_rec - 1;
-            index->nb_rec = oldsddindex.end_rec - index->start_rec;
-            index->obsmode = oldsddindex.obsmode;
-            index->phase_rec = oldsddindex.phase_rec;
-         } else {
-            index->scan_number = 0;
-         }
-      }
-      index++;
-   }
-   return(0);
-}
diff -uNr 3.5/source/conline/disk/saveascan.c unipops-3.6/source/conline/disk/saveascan.c
--- 3.5/source/conline/disk/saveascan.c	2000-03-16 11:36:00.000000000 -0700
+++ unipops-3.6/source/conline/disk/saveascan.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,388 +0,0 @@
-
-/* @(#)saveascan.c	5.1 06/22/94 */
-
-/* saves the scan found in buf at location as determined by flag and */
-/* overwrite.  if flag = 0 then location is an index entry, if flag = 1 */
-/* then location is a scan number.  If overwrite is 0, overwritting is */
-/* not allowed, else it is allowed */
-/* obuf is the compressed data, i.e. its what needs to be written */
-
-/* If an entry is occuped and it will be overwritten then there is the */
-/* potential for wasted space: if the new data does NOT fit in the old */
-/* data then the old location is zeroed out and the new data is put at */
-/* the end of the file, effectively leaving the old space unusable */
-/* Similary, if the new data is smaller than the data, the difference will */
-/* be zeroed out and remain wasted */
-
-/* lrtn = 0 if everything went ok */
-/*      = 1 if file not open */
-/*      = 2 if problems reading file or positioning file for read */
-/*	= 3 if bootstrap info is bizzare */
-/*      = 4 if file index is full, can't store any more */
-/*      = 5 if improper location specified on a savebyloc */
-/*      = 6 if overwrite is not allowed and attempted to overwrite */
-/*      = 7 if modeid returned an error */
-/*      = 8 if error writing to file or positioning file for write */
-/*	= 9 warning if overwrite happened and overwrite was allowed */
-/*	=10 both 7 and 9 occured
-/* of these, 7, 9 & 10 are warnings, all of the rest are severe and indicate */
-/* that nothing was saved to the file or the file may be corrupt */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <math.h>
-#include <files.h>
-#include <sdd.h>
-
-void saveascan_(unit, location, flag, buf, obuf, overwrite, lrtn)
-int *unit, *flag, *overwrite, *lrtn;
-double *location, *buf, *obuf;
-
-{
-
-   int i, n, scan, feed, entry, size, offset, curpos;
-   int outstart, outnum, zerostart, zeronum, outelem, getbs();
-   double temp1, temp2;
-   short int ier;
-   void modeid_();
-   static char zeros[SDDBUFSIZE] = {0};
-   sddfile *fptr, *getslot();
-   sindex *index;
-   sdd_index_entry sddindex;
-   old_sdd_index_entry oldsddindex;
-   sdd_bs_block sddbs;
-   old_sdd_bs_block oldsddbs;
-   sddheader *header, *oheader;
-   char coord_sys_code[8];
-   static struct {
-      char code[8];
-   } csc[14] = {
-      "GALACTIC",
-      "1950RADC",
-      "EPOCRADC",
-      "MEANRADC",
-      "APPRADC ",
-      "APPHADC ",
-      "1950ECL ",
-      "EPOCECL ",
-      "MEANECL ",
-      "APPECL  ",
-      "AZEL    ",
-      "USERDEF ",
-      "2000RADC",
-      "INDRADC " 
-   };
-
-   *lrtn = 0;
-   if ((fptr=getslot(unit)) == 0) {
-      *lrtn = 1; return;
-   } else {
-      if (fptr->fd == -1) {
-         *lrtn = 1; return;
-/*			not there or just not open */
-      } else {
-         if ((*lrtn = getbs(fptr)) != 0) {
-            *lrtn = *lrtn + 1; return;
-         }
-      }
-   }
-
-/*		ok, at this point the bs block has been read, checked and */
-/*		updated if necessary due to a change */
-
-/*		if this is by scan number, look for it in the index */
-
-   entry = 0;
-   if (*flag) {
-      index = fptr->index;
-      scan = *location;
-      feed = ((*location - scan) * 100.0 + 0.5);
-      if (feed == 0) feed = 1;
-      for (i=0;i<fptr->bs.num_entries_used;i++) {
-         if ((scan == index->scan_number) && (feed == index->feed_number)) {
-            entry = i + 1;
-            break;
-         }
-         index++;
-      }
-   } else {
-      entry = *location;
-   }
-
-   if ((entry <= 0) && *flag) {
-/*			need to find an available empty entry */
-      index = fptr->index;
-      for (i=0;i<fptr->bs.num_entries_used;i++) {
-         if (index->scan_number == 0) break;
-      }
-      entry = i + 1;
-   } if ((entry <= 0) && ! *flag) {
-/*			woops, there should have been an entry specified */
-      *lrtn = 5; return;
-   }
-
-   if (entry > fptr->nb_index_elem) {
-/*			file is full */
-      *lrtn = 4; return;
-   }
-
-   if (entry > fptr->bs.num_entries_used) {
-/*		someplace past the end, make sure its zero */
-      index = fptr->index + entry - 1;
-      index->scan_number = 0;
-   }
-
-   header = (sddheader *) buf;
-   oheader = (sddheader *)obuf;
-
-/*				store entry into header.save_bin */
-/*				this assumes that the compression hasn't */
-/*				affected the location of save_bin, which is */
-/*				probably true */
-   oheader->save_bin = entry;
-
-/*				recalculate outnum and outelem	*/
-   outnum = oheader->header_length + oheader->data_length;
-   outnum = (outnum % fptr->bs.bytperrec) ? 
-                   (outnum/fptr->bs.bytperrec) + 1  :
-                   (outnum/fptr->bs.bytperrec);
-   outelem = outnum * fptr->bs.bytperrec / sizeof(double);
-
-   index = fptr->index + entry - 1;
-
-   if (index->scan_number != 0) {
-      if (*overwrite) {
-/*					okay to overwrite this	*/
-         *lrtn = 9;
-         if (outnum <= index->nb_rec) {
-/*					there IS room	*/
-            outstart = index->start_rec;
-            zeronum = index->nb_rec - outnum;
-            zerostart = outstart + outnum;
-         } else {
-/*					there is NOT room */
-            outstart = fptr->bs.num_index_rec + 
-                       fptr->bs.num_data_rec;
-            zerostart = index->start_rec;
-            zeronum = index->nb_rec;
-         }
-      } else {
-/*					NOT ok to overwrite */
-         *lrtn = 6; return;
-      }
-   } else {
-/*					an empty slot, add data to end */
-      outstart = fptr->bs.num_index_rec + fptr->bs.num_data_rec;
-      zerostart = 0;
-      zeronum = 0;
-   }
-
-   sddindex.start_rec = outstart + 1;
-   sddindex.end_rec = sddindex.start_rec + outnum - 1;
-   sddindex.pos_code = 2;
-   for (i=0;i<8;i++) coord_sys_code[i] = header->coord_sys_code[i];
-   for (i=0;i<14;i++) {
-      if ((n=strncmp(coord_sys_code, csc[i].code, 8)) == 0) {
-         sddindex.pos_code = ++i; 
-         break;
-      }
-   }
-   sddindex.h_coord = header->sourcex;
-   sddindex.v_coord = header->sourcey;
-   for (i=0;i<16;i++) sddindex.source[i] = header->source_name[i];
-   sddindex.scan = header->scan_number;
-   sddindex.freq_res = header->freq_resolution;
-   sddindex.rest_freq = header->rest_freq;
-   sddindex.lst = header->lst;
-   sddindex.UT = header->ut_date;
-   modeid_((header->type_data+4),&sddindex.obsmode, &ier);
-   if (ier != 0) {
-/*				not found, set an errorcode but keep going */
-      if (*lrtn == 9) {
-         *lrtn = 10;
-      } else {
-         *lrtn = 7;
-      }
-   }
-   if ((strncmp(header->type_data,"LINE",4)) == 0) {
-      sddindex.obsmode = sddindex.obsmode + 512;
-   } else if ((strncmp(header->type_data,"CONT",4)) == 0) {
-      sddindex.obsmode = sddindex.obsmode + 256;
-      temp1 = header->deltax_rate * cos(header->sourcey * M_PI / 180.);
-      temp2 = header->deltay_rate;
-      sddindex.freq_res = hypot(temp1, temp2);
-      sddindex.rest_freq = header->length_sample;
-   }
-   for (i=0;i<INDZERO;i++) sddindex.zeros[i] = 0;
-
-/*				set bootstrap		*/
-
-   sddbs.num_index_rec = fptr->bs.num_index_rec;
-   sddbs.num_data_rec = fptr->bs.num_data_rec;
-   sddbs.num_entries_used = fptr->bs.num_entries_used;
-   sddbs.bytperrec = fptr->bs.bytperrec;
-   sddbs.bytperent = fptr->bs.bytperent;
-   sddbs.counter = (fptr->bs.counter < 32767) ? 
-                       fptr->bs.counter + 1 : 0;
-   sddbs.typesdd = fptr->bs.typesdd;
-   sddbs.sddversion = fptr->bs.sddversion;
-   for (i=0;i<BSZERO;i++) sddbs.zeros[i] = 0;
-
-/*				change any */
-
-   if (entry > sddbs.num_entries_used) sddbs.num_entries_used = entry;
-   if ((outstart + outnum) > (sddbs.num_index_rec + sddbs.num_data_rec)) {
-      sddbs.num_data_rec = (outstart + outnum) - sddbs.num_index_rec;
-   }
-
-/*				okay, write out the new stuff */
-/*				zeroing stuff as appropriate	*/
-
-/*				change outstart, etc to bytes */
-   outstart = outstart * fptr->bs.bytperrec;
-   zerostart = zerostart * fptr->bs.bytperrec;
-   outnum = outnum * fptr->bs.bytperrec;
-/* 				where we are now */
-   curpos = lseek(fptr->fd, 0, SEEK_CUR); 
-   if (outstart < zerostart) {
-      offset = outstart - curpos;
-/*				where we want to be */
-      curpos = lseek(fptr->fd, offset, SEEK_CUR);
-      if (curpos != outstart) {
-         *lrtn = 8; return;
-      }
-/*				are we actually there */
-      if ((n=write(fptr->fd,(char *)obuf,outnum)) != outnum) {
-         *lrtn = 8; return;
-      }
-      curpos = outstart + outnum;
-/*				write it out */
-/*				same with zeros */
-
-      if (zeronum) {
-         offset = zerostart - curpos;
-         curpos = lseek(fptr->fd, offset, SEEK_CUR);
-         if (curpos != zerostart) {
-            *lrtn = 8; return;
-         }
-         for (i=0;i<zeronum;i++) {
-            if ((n=write(fptr->fd,zeros,fptr->bs.bytperrec)) !=
-                   fptr->bs.bytperrec) {
-               *lrtn = 8; return;
-            }
-         }
-      }
-   } else {
-/*				write out zeros first */
-      if (zeronum) {
-         offset = zerostart - curpos;
-         curpos = lseek(fptr->fd, offset, SEEK_CUR); 
-         if (curpos != zerostart) { 
-            *lrtn = 8; return;
-         } 
-         for (i=0;i<zeronum;i++) { 
-            if ((n=write(fptr->fd,zeros,fptr->bs.bytperrec)) != 
-                   fptr->bs.bytperrec) { 
-               *lrtn = 8; return;
-            } 
-         } 
-         curpos = zerostart + fptr->bs.bytperrec * zeronum;
-      }
-/*				and then the data */
-      offset = outstart - curpos;
-      curpos = lseek(fptr->fd, offset, SEEK_CUR);
-      if (curpos != outstart) {
-         *lrtn = 8; return;
-      }   
-      if (write(fptr->fd,(char *)obuf,outnum) != outnum) {
-         *lrtn = 8; return;
-      }   
-   }
-
-/*			Ok, now the index */
-
-/*			offset here calculated relative to start of file */
-   offset = (entry-1) * fptr->bs.bytperent + fptr->bs.bytperrec;
-   if (lseek(fptr->fd, offset, SEEK_SET) != offset) {
-      *lrtn = 8; return;
-   }
-   if (fptr->bs.sddversion == 0) {
-/*			old I*2 type */
-/*			Note: there is NO check on overflow here */
-/*			It is assumed that the file was made small */
-/*			enough that this won't be a problem */
-      oldsddindex.start_rec = sddindex.start_rec;
-      oldsddindex.end_rec = sddindex.end_rec;
-      oldsddindex.magic = 2;
-      oldsddindex.pos_code = sddindex.pos_code;
-      oldsddindex.h_coord = sddindex.h_coord;
-      oldsddindex.v_coord = sddindex.v_coord;
-      for (i=0;i<16;i++) oldsddindex.source[i] = sddindex.source[i];
-      oldsddindex.scan = sddindex.scan;
-      oldsddindex.freq_res = sddindex.freq_res;
-      oldsddindex.rest_freq = sddindex.rest_freq;
-      oldsddindex.lst = sddindex.lst;
-      oldsddindex.UT = sddindex.UT;
-      oldsddindex.obsmode = sddindex.obsmode;
-      oldsddindex.phase_rec = sddindex.phase_rec;
-      for (i=0;i<OLDINDZERO;i++) oldsddindex.zeros[i]=0;
-      if (write(fptr->fd,(char *)&oldsddindex,sizeof(old_sdd_index_entry)) !=
-               sizeof(old_sdd_index_entry)) {
-         *lrtn = 8; return;
-      }
-   } else {
-/*			current type */
-      if (write(fptr->fd,(char *)&sddindex,sizeof(sdd_index_entry)) !=
-               sizeof(sdd_index_entry)) {
-         *lrtn = 8; return;
-      }
-   }
-
-/*			And finally, the bootstrap block */
-
-   if (lseek(fptr->fd, 0, SEEK_SET) != 0) {
-      *lrtn = 8; return;
-   }
-   if (fptr->bs.sddversion == 0) {
-/*			old I*2 type */
-/*			Note: there is NO check on overflow here */
-/*			It is assumed that the file was made small */
-/*			enough that this won't be a problem */
-      oldsddbs.num_index_rec = sddbs.num_index_rec;
-      oldsddbs.num_data_rec = sddbs.num_data_rec;
-      oldsddbs.bytperrec = sddbs.bytperrec;
-      oldsddbs.bytperent = sddbs.bytperent;
-      oldsddbs.num_entries_used = sddbs.num_entries_used;
-      oldsddbs.counter = sddbs.counter;
-      oldsddbs.typesdd = 0;
-      for (i=0;i<OLDBSZERO;i++) oldsddbs.zeros[i]=0;
-      if (write(fptr->fd,(char *)&oldsddbs, sizeof(old_sdd_bs_block)) !=
-               sizeof(old_sdd_bs_block)) {
-         *lrtn = 8; return;
-      }
-   } else {
-/*			current type */
-      if (write(fptr->fd,(char *)&sddbs, sizeof(sdd_bs_block)) !=
-               sizeof(sdd_bs_block)) {
-         *lrtn = 8; return;
-      }
-   }
-/*				update internal copies of index and bs */
-   index->scan_number = sddindex.scan;
-   index->feed_number = (sddindex.scan - index->scan_number) * 100 + 0.5;
-   index->start_rec = sddindex.start_rec - 1;
-   index->nb_rec = sddindex.end_rec - index->start_rec;
-   index->obsmode = sddindex.obsmode;
-
-   fptr->bs.num_index_rec = sddbs.num_index_rec;
-   fptr->bs.num_data_rec = sddbs.num_data_rec;
-   fptr->bs.num_entries_used = sddbs.num_entries_used;
-   fptr->bs.counter = sddbs.counter;
-/*		bytperent and bytperrec don't change, hopefully */
-/*		also, typesdd doesn't change */
-/*		and sddversion */
-
-/*				whew!  I think that about covers it */
-
-}
diff -uNr 3.5/source/conline/disk/scanloc.c unipops-3.6/source/conline/disk/scanloc.c
--- 3.5/source/conline/disk/scanloc.c	2000-03-16 11:36:01.000000000 -0700
+++ unipops-3.6/source/conline/disk/scanloc.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,54 +0,0 @@
-
-/* @(#)scanloc.c	5.1 06/22/94 */
-
-/* gets the scan number stored at location */
-/* lrtn = 0 if OK */
-/*        1 if file not open */
-/*        2 if problems reading from file */
-/*        3 if bootstrap info is bizzar */
-/*        4 if location is outside of full index range */
-
-#include <files.h>
-
-void scanloc_(unit, location, scan, lrtn)
-int *unit;
-int *location;
-float *scan;
-int *lrtn;
-
-{
-
-   int getbs(), i;
-   sddfile *fptr, *getslot();
-   sindex *index;
-
-   if ((fptr=getslot(unit)) == 0) {
-      *lrtn = 1; return;
-   }
-   
-   if (fptr->fd == -1) {
-      *lrtn = 1; return;
-   }
-
-/*		file not open or not there */
-
-   if ((i=getbs(fptr)) != 0) {
-      *lrtn = i + 1; return;
-   }
-
-/*		bootstrap problems */
-
-   if ((*location <= 0) || (*location > fptr->nb_index_elem)) {
-      *lrtn = 4; return;
-   }
-
-/*		*location is outside possible range for file */
-
-   *lrtn = 0;
-   if (*location <= fptr->bs.num_entries_used) {
-      index = fptr->index + *location - 1;
-      *scan = index->scan_number + index->feed_number / 100.;
-   } else {
-      *scan = -1;
-   }
-}
diff -uNr 3.5/source/conline/disk/sddclose.c unipops-3.6/source/conline/disk/sddclose.c
--- 3.5/source/conline/disk/sddclose.c	2000-03-16 11:36:01.000000000 -0700
+++ unipops-3.6/source/conline/disk/sddclose.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-
-/* @(#)sddclose.c	5.1 06/22/94 */
-
-/* closes an sdd file */
-
-#include <stdio.h>
-#include <malloc.h>
-#include <files.h>
-
-void sddclose_(unit)
-int *unit;
-
-{
-  sddfile *fptr, *getslot();
-
-  fptr = getslot(unit);
-  if (fptr != 0 && fptr->fd != -1) {
-      close(fptr->fd);
-      free(fptr->index);
-      fptr->index = 0;
-      fptr->fd = -1;
-      if (*unit > 0) fptr->unit = 0;
-  } 
-}
diff -uNr 3.5/source/conline/disk/sddopen.c unipops-3.6/source/conline/disk/sddopen.c
--- 3.5/source/conline/disk/sddopen.c	2000-03-16 11:36:02.000000000 -0700
+++ unipops-3.6/source/conline/disk/sddopen.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,136 +0,0 @@
-
-/* @(#)sddopen.c	5.2 03/07/95 */
-
-/* open an sdd file, file bs and index */
-/* ier = 0 if opened ok */
-/*     = 1 if unit = 0 */
-/*     = 2 if file can't be found/doesn't exist */
-/*     = 3 if can't access file with desired mode */
-/*     = 4 if attempt to open already open file with unit > 0 */
-/*     = 5 if files array is full, can't open any more files */
-/*     = 6 if open failed, which is bizzare if it passed the access check */
-/*     = 7 = getbs error 1, error reading or positioning file */
-/*     = 8 = getbs error 2, bootstrap parameters are bizzare */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <files.h>
-
-/*		The following are defined in unistd.h in 4.1 and later but */
-/*		are found in sys/file.h in 4.0.3, define them here if */
-/*		they have not already been defined */
-/*		If one has been defined, its probably safe to assume they all */
-/*		have been defined */
-
-#ifndef F_OK
-#define F_OK 0
-#define X_OK 1			/* not actually used here */	
-#define W_OK 2
-#define R_OK 4
-#endif
-
-void sddopen_(unit,name,mode,ier)
-int *unit;			/* reference number */
-char *name;			/* path name of file */
-char *mode;			/* "READ" or "WRIT" */
-int *ier;
-
-{
-#define NCHAR 1023
-   int i, flags, acmode, getbs(), offset, n0 = 0;
-   char *fname;
-   sddfile *fptr, *getslot();
-   void sddclose_();
-
-/* simple basic sanity check, can't open unit 0 */
-
-   *ier = 0;
-   if (*unit == 0) {
-      *ier = 1;
-      return;
-   }
-
-/* check on existance of file and access modes */
-
-   fname = strdup(name);
-/*	make sure the file name is null terminated */
-   offset =  (strchr(fname,32) - fname);
-   if (offset < 0 || offset > NCHAR) {
-      offset = ((NCHAR + 1) > (int )strlen(fname)) ? 
-	strlen(fname) : (NCHAR + 1);
-   } 
-   *(fname + offset) = 0;
-   if (access(fname, F_OK) != 0) {
-      *ier = 2;
-      return;
-   }
-
-   if (strncmp(mode,"r ",2) == 0) {
-      acmode = R_OK;
-      flags = O_RDONLY;
-   } else if (strncmp(mode,"w ",2) == 0) {
-      acmode = W_OK;
-      flags = O_WRONLY;
-   } else if (strncmp(mode,"rw",2) == 0) {
-      acmode = W_OK | R_OK;
-      flags = O_RDWR;
-   } else {
-      *ier = 3;
-      return;
-   }
-
-   if (access(fname, acmode) != 0) {
-      *ier = 3;
-       return;
-   }
-
-/*		see if there is a slot already reserved for *unit */
-
-   fptr = getslot(unit);
-   if (fptr != 0 && fptr->fd != -1) {
-/*		there is, and its currently open	*/
-      if (*unit > 0) {
-/*		oops, but we've been told to expect it to be closed, error */
-         *ier = 4;
-         return;
-      } else {
-/*		ok, close it */
-         sddclose_(unit);
-      }
-   } else if (fptr == 0) {
-/*		not there, find an empty one */
-      if ((fptr = getslot(&n0)) == 0) {
-/*		none available, error */
-         *ier = 5;
-         return;
-      }
-   }
-
-/*		OK, we have someplace to put it, and we know the file */
-/*		permissions are good, so open it	*/
-
-   fptr->fd = open(fname, flags, 0);
-   if (fptr->fd < 0) {
-/*		oops, couldn't open it, bizzare!  */
-      *ier = 6;
-   }
-
-   fptr->unit = (*unit < 0) ? -(*unit) : *unit;
-   fptr->name = strdup(fname);
-   fptr->index = 0;
-   fptr->bs.bytperrec = 0;
-
-/*		get bootstrap, this will also do the index */
-   if ((i = getbs(fptr)) != 0) {
-      *ier = 6 + i;
-/*		woops, close it */
-      sddclose_(unit);
-      return;
-   }
-
-   *ier = -(fptr->bs.typesdd);
-/*  Return code is the negative of the file-type  */
-   
-}
diff -uNr 3.5/source/conline/dither.f unipops-3.6/source/conline/dither.f
--- 3.5/source/conline/dither.f	2000-03-16 11:32:51.000000000 -0700
+++ unipops-3.6/source/conline/dither.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,90 +0,0 @@
-      subroutine dither(ix, iy, nx, ny, percent)
-c
-c     @(#)dither.f	5.1 06/22/94
-c
-c     Draws a half-tone pattern of size (NX,NY) with corner (IX,IY) that is
-c	PERCENT filled.
-c
-      include 'cio.inc'
-c
-      integer*2 ix, iy, nx, ny
-      real percent
-c
-      integer*2 nxold, nyold, ixdt(16384), iydt(16384), ixdt4, iydt4,
-     .		matset(16384), i, ii3
-      integer*4 levmax, l16384, l0, lnx, lny
-      real rand
-c
-      save nxold, nyold
-c
-      data nxold/0/, nyold/0/
-      data l16384, l0 /16384, 0/
-c
-      if (igraphtype .eq. 2) call coredither(ix,iy,nx,ny,percent)
-c
-      if (igraphtype .le. 2 .and. iprinttype .le. 1) return
-c     If SUNCORE or NO printer or graphics, then do nothing else.
-c
-      if (nx .ne. nxold .or. ny .ne. nyold) then
-c	If a previous box was filled with the same size, then use the
-c	old matrices; else fill in a new one
-c 
-         lnx = nx
-         lny = ny
-         levmax = lnx * lny
-         levmax = min(l16384,levmax)
-c	 LEVMAX = number of pixels in a cell
-c
-         do 100 i = 1, levmax
-	   matset(i) = 0
-100	   continue
-c          Clear out set matrix
-c
-         do 130 i = 1, levmax
-120	   ii3 = nint(rand(l0)*float(levmax-1)+1.0)
-	   if (matset(ii3) .eq. 1) goto 120
-	   matset(ii3) = 1
-           ixdt(i) = ifix(ii3/ny) + 1
-	   iydt(i) = ii3 - (ixdt(i)-1)*ny
-130	   continue
-      endif
-c     Fill in pixel arrays and set matrix.
-c
-      ii3 = nint(rand(l0)*float(levmax-1)+1.0)
-      do 310 i = 1, nint(percent*levmax)
-		ii3 = ii3 + 1
-		if (ii3 .gt. levmax) ii3 = 1
-		ixdt4 = ix + ixdt(ii3) - 1
-		iydt4 = iy + iydt(ii3) - 1
-      	        if (igraphtype .eq. 4) then
-			call v102place(ixdt4,iydt4)
-			call v102vctr(ixdt4,iydt4)
-      	        else if (igraphtype .eq. 3) then
-			call tekplace(ixdt4, iydt4)
-			call tekvctr(ixdt4, iydt4)
-		endif
-      		if (iprinttype .eq. 5) then
-        		call quichardplace(ixdt4, iydt4)
-        		call quichardvctr(ixdt4, iydt4)
-      		else if (iprinttype .eq. 4) then
-			call hphardplace(ixdt4, iydt4)
-			call hphardvctr(ixdt4, iydt4)
-      		else if (iprinttype .eq. 3) then
-			call posthardplace(ixdt4, iydt4)
-			call posthardvctr(ixdt4, iydt4)
-      		else if (iprinttype .eq. 2) then
-			call qmshardplace(ixdt4, iydt4)
-			call qmshardvctr(ixdt4, iydt4)
-		endif
-310		continue
-c		Draws the correct number of pixels in the box defined by
-c		the above set limits.
-c
-      nxold = nx
-      nyold = ny
-c     You don't want to redo the matrices the next time through for the
-c	same size box so store away box size.
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/donemenu.f unipops-3.6/source/conline/donemenu.f
--- 3.5/source/conline/donemenu.f	2000-03-16 11:32:52.000000000 -0700
+++ unipops-3.6/source/conline/donemenu.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,39 +0,0 @@
-      subroutine donemenu
-c
-c     @(#)donemenu.f	5.1 06/22/94
-c
-c     Closes down menus
-c
-      integer*2 istat, irtn2, irtn3, irtn4
-      integer*2 m1, n351
-      integer*4 istat4, unlink, long
-c
-      include 'cio.inc'
-c
-      data n351, m1 /351, -1/
-c
-      if (iintype .eq. imenuin) then
-c
-	write(imenuout,fmt="(1x,a)",iostat=istat) 'DONEMENU'
-c       Send 'donemenu' message to menus's program
-c
-	call closefifo(long(iinunit),istat4)
-	close(imenuout,iostat=irtn2)
-      	irtn3 = unlink(cmenuin)
-      	irtn4 = unlink(cmenuout)
-C
-        iinptr = max(1, iinptr - 1)
-        iinunit = iinlist(iinptr, 1)
-        iintype = iinlist(iinptr, 2)
-c
-c       Return the input pointer etc to what they were before MENUS was called
-c
-     	 if (istat4 .ne. 0 .or. irtn2 .ne. 0 .or. irtn3 .ne. 0
-     .      .or. irtn4 .ne. 0 .or. istat .ne. 0) 
-     .	    call oerror(n351,m1, 'DONEMENU')
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/execcomp.f unipops-3.6/source/conline/execcomp.f
--- 3.5/source/conline/execcomp.f	2000-03-16 11:34:04.000000000 -0700
+++ unipops-3.6/source/conline/execcomp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,59 +0,0 @@
-      integer*2 function execcomp(string)
-c-------------------------------------------------------------------------
-c     @(#)execcomp.f	5.1 06/22/94
-c-------------------------------------------------------------------------
-c     compiles string, copies the result to a safe place in
-c     K (runktag) and returns that location for use by execintp
-c
-      integer*2 lastblnk, ilen, iwpc, ktag, nt, finish, i
-      integer*2 n1, n17, n21, np
-      character string*(*)
-c
-      include 'smstuf.inc'
-      include 'core.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-c
-      data n1, n17, n21 /1, 17, 21/
-c-------------------------------------------------------------------------
-c		Put string into cbuff and karbuf 
-      cbuff = ' '
-      ilen = lastblnk(string)
-      do 100 i = 1, ilen
-         cbuff(i:i) = string(i:i)
- 100  continue 
-      nbytes = min(ilen+1, karlim)
-      call unpack(iwpc(nbytes), cbuff, karbuf)
-c		compile it using execpol, special version of polish
-      kbptr = 1
-      errcode = 0.0
-      call execpol
-c		double check that mode is 0
-      if (mode .ne. 0) call oerror(n17, n1, 'Line Ignored')
-c		Do something only if something is there
-      ktag = 0
-      if (ap .ne. 0) then
-c		Use runktag to get someplace safe to copy atmp
-         np = ap + 2
-         call runktag(np, ktag)
-c		runtag is what checks to make sure np I*2 words fit
-c		ktag is a location in the C array that is safe
-c		copy A array over to c array
-         k(ktag) = 0
-         k(ktag+1) = 0
-         call copy(ap, a(1), k(ktag+2))
-      endif
-c		use finish to clean up any if, while, for constructs
-         nt = finish(k, ktag, .true.)
-         if (nt .eq. 1) then
-            call oerror(n21,n1,'Too many IF, WHILE, or FOR constructs')
-         else if (nt .eq. 2) then
-            call oerror(n21,n1,'Too many END, THEN, or ELSE statements')
-         else if (nt .eq. 3) then
-            call oerror(n21, n1, 'No closing END statement')
-         endif
-c	
-      execcomp = ktag
-      return
-c
-      end
diff -uNr 3.5/source/conline/execpol.f unipops-3.6/source/conline/execpol.f
--- 3.5/source/conline/execpol.f	2000-03-16 11:34:04.000000000 -0700
+++ unipops-3.6/source/conline/execpol.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,94 +0,0 @@
-      SUBROUTINE  execpol
-C-------------------------------------------------------------------------------
-C  @(#)execpol.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C--------------------------------------------------------------------
-C   Specialized polish scanner
-C      Parses the character string in KARBUF, translating to polish
-C  postfix notation.  Result is a sequence of integers, representing
-C  code for the POPS interpreter.  Negative tokens are operand pointers
-C  while positive tokens are operation codes.  The array, A, holds
-C  these; AP points to the last entry.
-C      Specialized from the standard polish.f : pseudo operators are
-C  not allowed and mode MUST be 0.  Used by the EXEC verb as well as
-C  other verbs that execute strings (called by execcomp.f).
-c      Does NOT call gpflush().
-C--------------------------------------------------------------------
-      integer*2 nothing, i, savel
-      integer*2 n1, n17, n34, n43, n44
-c
-      logical isreturn
-c
-      INCLUDE 'smstuf.inc'
-      include 'stk.inc'
-c
-      include 'tags.inc'
-c
-      data nothing/0/
-      data n1, n17, n34, n43, n44 / 1, 17, 34, 43, 44/
-C
-C=======================================================================
-c
-      LEVEL=0
-      AP=0
-      BP=0
-      IFFLAG=0
-      LAST=nothing
-C					Parse tokens.
-c			save and restore value of l
- 10   savel = l
-      CALL COMPIL
-      l = savel
-C					   Pseudo operators not allowed.
-      IF (TYPE.eq.5) then
-c
-         call oerror(n43, n1, 'Line Ignored')
-c
-      else
-C					Line finished.	-  Clean up.
-         NEXTP=0
-         CALL BCLEAN
-c					Add a return only if there is none.
-         isreturn = .false.
-         do 20 i = 1, ap
-            if (a(i) .eq. ireturn) isreturn = .true.
- 20      continue
-	 if (.not. isreturn) call push(a, ap, ireturn)
-c
-	 i = 1
-c
-52	 if (i .le. ap) then
-c
-	    IF (A(I) .le. 0) then
-c
-		i = i + 1
-		goto 52
-c		Keep on looking for an operator
-c
-	    endif
-c
-	 else if (ap .ne. 0) then
-c
-     	    CALL oerror(n44, n1,'')
-C           NO OPERATOR ON LINE
-c
-	 endif
-c
-c	 Add OMEGA operator.
-	 CALL PUSH(A,AP,iomega)
-c
-C        UNBALANCED PARENTHESES?
-         IF (LEVEL.ne.0)  CALL oerror(n34, n1,'Line Ignored')
-c
-c
-      endif
-c			mode must be 0
-      IF (MODE.NE.0) then
-         call oerror(n17, n1, 'Line Ignored')
-      endif
-c
-99    continue
-c
-      RETURN
-c
-      END
diff -uNr 3.5/source/conline/exitpops.f unipops-3.6/source/conline/exitpops.f
--- 3.5/source/conline/exitpops.f	2000-03-16 11:32:52.000000000 -0700
+++ unipops-3.6/source/conline/exitpops.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,160 +0,0 @@
-      subroutine exitpops(iexit4)
-C-------------------------------------------------------------------------------
-C  @(#)exitpops.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Does some housecleaning before stopping POPS
-c     iexit4 = exit status
-c     0 = normal termination through EXIT
-c     1 = end of STDIN in PREAD
-c     2 = Unable to open sun window
-c     3 = Bad project code in INITONLINE
-c     4 = Existing LOCK file
-c     5 = Bad file specification in initfiles
-c     6 = Ctrl-C interrupt at start up
-c     7 = Bad recovery file
-c     8 = error in initlog (bad open or read)
-c
-      integer*2 istat, ierr
-      real*4 memvers
-c
-      include 'cio.inc'
-      include 'appl.inc'
-      include 'core.inc'
-      include 'lsf.inc'
-c
-      character*8 oobs2, site2, time2, procid2
-      character*10 date2
-      character*1023 fullname
-      character*24 zdatetime
-      character*1 answr
-c
-      integer*4 irtn, chmod, iexit4, unlink, i4, long, i
-      logical*2 opened, inquirefile
-      integer*4 nummax, lunit, ioput
-c
-      equivalence (memvers, kx(13))
-c
-      data nummax /32766/
-c
-      call ignorectrlc()
-c
-      write(istdout,*) ' '
-      if(iexit4 .eq. 0) then
-	write(istdout,*) 'Normal Termnination...'
-21	write(istdout,*) ' '
-	write(istdout,*) 'Do you want to update the RECOVER file?'
-	write(istdout,20) '(Y or N): '
-20	format(1x,a,$)
-        call flush(long(istdout))
-	read(istdin,22) answr
-22      format(a)
-	if (answr .eq. 'y' .or. answr .eq. 'Y') then
-	  write(istdout,*) ' '
-	  write(istdout,*) 'Creating RECOVER file'
-          call flush(long(istdout))
-	  open(unit=irecover,file=crecover,status='unknown',
-     1       form='unformatted',access='sequential')
-	  rewind (irecover)
-c			make sure VERS stored with value of version
-          vers = version
-c
-	  write(irecover) version, numcio, numappl, nummax, nummax, 
-     .			  nummax
- 	  write(irecover) (Rio(i4),i4=1,numcio)
-	  write(irecover) (Rappl(i4),i4=1,numappl)
-	  write(irecover) (k(i4),i4=1,nummax)
-	  write(irecover) (kx(i4),i4=1,nummax)
-	  write(irecover) (listf(i4),i4=1,nummax)
-	  close (irecover)
-	else if (answr .eq. 'n' .or. answr .eq. 'N') then
-	  write(istdout,*) ' '
-	  write(istdout,*) 'RECOVER file has not been updated'
-          call flush(long(istdout))
-	else
-	  goto 21
-	endif
-      else
-	write(istderr,*) 'Abnormal Termination ... Error code ', iexit4
-      endif
-c
-      call donemenu
-c     Close down menu application, if it is running
-c
-      call gpclose
-c     Close down graphics screens
-c
-      call closeall
-c     Close down all opened data files
-c
-c					close any opened batch files
-      do 100 i = 1, iinptr
-         if (iinlist(iinptr, 2) .eq. ibatchin) then
-            call filecomp(cinlist(iinptr), fullname)
-            if (opened(fullname)) then
-               close (iinlist(iinptr,1),iostat=istat)
-               lunit = iinlist(iinptr, 1)
-               lunit = ioput(lunit)
-c			ignore ioput errors, we don't really care
-            endif
-         endif
- 100  continue
-c
-      do 110 i = 1, nfiles
-	if (ffile(i,1) .gt. 0) close(ffile(i,1),iostat=istat)
-110	continue
-c
-      if (opened(csetupin)) close(isetupin,iostat=istat)
-      if (opened(cmemory)) call closms(imemory, istat)
-      if (opened(coutgrph)) close(ioutgrph,iostat=istat)
-      if (inquirefile(coutgrph)) irtn = unlink(coutgrph)
-      if (opened(couttxt)) close(iouttxt,iostat=istat)
-      close(ishelpin,iostat=istat)
-      close(iiotmp,iostat=istat)
-      if (inquirefile(couttxt)) irtn = unlink(couttxt)
-      call filecomp(clogout,fullname)
-      if (dolog) write(ilogout, 1030, iostat=istat)
-     .		'# Command logging OFF -- ', zdatetime()
- 1030 format(2a)
-      if (opened(fullname)) close(ilogout,iostat=istat)
-      call filecomp(ccube,fullname)
-      if (opened(fullname)) close(icube,iostat=istat)
-      call filecomp(cprtout,fullname)
-      if (opened(fullname)) close(iprtout,iostat=istat)
-c     Close down all opened input/output/ etc files
-c
-      if (iexit4 .ne. 4) then
-        if (iexit4 .eq. 0) call closeaccess
-        open(unit=iiotmp, file=program(1:1)//'LOCKFILE',status='old',
-     1     iostat=ierr)
-        if (ierr .eq. 0) then
-	 rewind(iiotmp,iostat=ierr)
-         if(ierr.eq.0) read(iiotmp,10,iostat=ierr) oobs2, site2, date2, 
-     1					      time2, procid2
-10       format(1x,a8,1x,a8,1x,a10,1x,a8,1x,a8)
-	 if (ierr .eq. 0) close(iiotmp,iostat=istat)
-	 if (ierr.eq.0 .and. procid2.eq.procid) then
-	      irtn = chmod(program(1:1) // 'LOCKFILE', 'u+w')
-      	      irtn = unlink(program(1:1) // 'LOCKFILE')
-	 else
-	      write(istderr,*) ' '
-	      write(istderr,*) 'WARNING: Bad lockfile?!? ',
-     .			'Someone may be using this directory!!'
-	 endif
-        else
-	 write(istderr,*) ' '
-         write(istderr,*) 'WARNING: your lockfile could not be opened.'
-         write(istderr,*) 
-     .      'Someone has been and may still be using this directory!!'
-        endif
-      endif
-c     Clear lock file
-c
-      write(istdout,*) ' '
-      write(istdout,*) 'Goodbye ', oobs
-      write(istdout,*) ' '
-      call flush(long(istdout))
-c
-      call exit(iexit4)
-c
-      end
diff -uNr 3.5/source/conline/fcioget.f unipops-3.6/source/conline/fcioget.f
--- 3.5/source/conline/fcioget.f	2000-03-16 11:32:54.000000000 -0700
+++ unipops-3.6/source/conline/fcioget.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-      integer*4 function fcioget(string)
-C
-C @(#)fcioget.f	5.2 31 Jan 1995
-C
-C   reads from istdin (in cio.inc) a string.  Returns the length of the string
-C   and null terminates the string
-C
-      character*120 string
-      integer*2 lastblnk, len
-c
-      include 'cio.inc'
-c
-      read(istdin, 1000) string
-      len = lastblnk(string)
-c
-      if (len .ge. 0) then
-         string(len+1:len+1) = "\0"
-      else
-         string(1:1) = "\0"
-      endif
-c
-      fcioget = len
-      return
-c
- 1000 format(a)
-      end
diff -uNr 3.5/source/conline/filecomp.f unipops-3.6/source/conline/filecomp.f
--- 3.5/source/conline/filecomp.f	2000-03-16 11:32:54.000000000 -0700
+++ unipops-3.6/source/conline/filecomp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,62 +0,0 @@
-      subroutine filecomp(filename, fullname)
-c------------------------------------------------------------
-c
-c @(#)filecomp.f	5.1 4
-c
-c   filename is what the user sees/enters and
-c   fullname is what the program should use
-c
-c------------------------------------------------------------
-c
-      character*20 tmpname
-      character*(*) filename
-      character*1023 fullname
-      character*4 pidtag
-      integer*4 lenpid, i, ii, irtn, system, unlink
-      integer*2 lastblnk, m1, n376
-      logical lexpand
-c
-      include 'cio.inc'
-c
-      data pidtag /'----'/
-      data m1, n376 /-1, 376/
-c		scan filename for ~, * or $, expand only if found
-      lexpand = .false.
-      if (index(filename,'~') .eq. 1) lexpand = .true.
-c			~ only special to csh if it is first
-      if (index(filename,'*') .ne. 0) lexpand = .true.
-      if (index(filename,'$') .ne. 0) lexpand = .true.
-      if (.not. lexpand) then
-         write(fullname,fmt="(a)") filename
-         return
-      endif
-c			if we get here, then we should expand filename
-      if (pidtag .eq. '----') then
-        lenpid = lastblnk(procid)
-        do 10 i = 1, 4
-          ii = lenpid - 4 + i
-          pidtag(i:i) = '0'
-          if (ii .gt. 0) then
-            if (procid(ii:ii) .ge. '0' .and. procid(i:i) .le. '9') then
-               pidtag(i:i) = procid(ii:ii)
-            endif
-          endif
- 10     continue
-      endif
-c		make sure that pidtag is set to last 4 chars of procid
-      tmpname = "/tmp/filecomp" // pidtag
-      irtn = system("filecomp.exe " // filename // " " // tmpname)
-      if (irtn .eq. 0) then
-         open(file=tmpname, unit=iiotmp)
-         read(iiotmp,1000) fullname
-         close(iiotmp)
-         irtn = unlink(tmpname)
-      else
-         call oerror(n376, m1, filename)
-      endif
-c
-      return
-c
- 1000 format(A)
-c
-      end
diff -uNr 3.5/source/conline/files.f unipops-3.6/source/conline/files.f
--- 3.5/source/conline/files.f	2000-03-16 11:32:53.000000000 -0700
+++ unipops-3.6/source/conline/files.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,188 +0,0 @@
-      subroutine files
-C-------------------------------------------------------------------------------
-C  @(#)files.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Lists data files and checks for their existence.
-c
-c     RJM December, 1989
-c
-      include 'cio.inc'
-c
-      integer*4 access, liounit, lrtn, onlinesite
-      integer*2 istch(40), i, istat, GAINS, RECORDS
-      integer*2 n80
-      logical*2 opened
-      character*4 modes(12)
-      character*32 notavail, crshfle
-      character*15 types(12), oldata
-      character*18 verbs(12)
-      character*80 stch
-      character*1023 fullname, fullname1
-c
-      equivalence (istch, stch)
-c
-      data n80 /80/
-      data notavail/'Not Available'/
-      data modes/'r ','rw ','rw ','r ','r ',5*' ','w ','w '/
-      data types/'Data (offline)','Keep','Save',
-     1           'Gains','Records', 5*' ',
-     2           'Printer','Command logging'/
-      data oldata/'Data (online)'/
-      data verbs/
-     1  'GET, ON, OFF',
-     2  'KEEP, KGET  ',
-     3  'SAVE, RECALL',
-     4  'GGET',
-     5  'GETIR',
-     6  5*' ',
-     7  'PRINTER,CRT,OUTPUT',
-     8  'LOGON, LOGOFF'/
-c
-      parameter (GAINS=4)
-      parameter (RECORDS=5)
-c
-c    modes = array containing neccessary privelages for various files;
-c	r = read, w = write, blank = exists
-c    types = array containing the 'type' of the various files
-c    verbs = array containing the name of verbs which use these files as
-c       well as miscellaneos notes
-c    The first ten entries in these arrays refer to to files described
-c       printout, and memory files, the 11th entry to the printout
-c	file, and the 12th to the log file  (see cio.inc for details)
-c
-c    Files ALWAYS closes all data files via closeall() first.
-c
-      call closeall()
-      write(stch,1) ' '
-1     format(1x,10a)
-      call pwrite(istch, n80)
-c
-      write(stch,1) ' '
-      call pwrite(istch, n80)
-      write(stch,1) 'Table of files'
-      call pwrite(istch, n80)
-      write(stch,10)
-      call pwrite(istch, n80)
-10    format(1x,71('-'))
-      write(stch,1) 
-     1   '  | File type     | Filename                       ',
-     2   '| Accessed by'
-      call pwrite(istch, n80)
-      write(stch,10)
-      call pwrite(istch, n80)
-c
-      if (online) then 
-	write(stch,19) oldata, 'Project: ' // projcode, verbs(1)
-19      format(3x,'|',a15,'|',a17,15x,'|',a18)
-      else
-	write(stch,19) oldata, notavail(1:17), verbs(1)
-      endif
-      call pwrite(istch, n80)
-c
-      do 100 i = 1,10 
-c
-         liounit = iounit(i)
-	 if (i .eq. GAINS .and. onlinesite() .eq. 0) goto 100
-	 if (i .eq. RECORDS .and. onlinesite() .gt. 0) goto 100
-c	 Skip a file type that can't be used with a particular program
-c
-         lrtn = 0
-         if (iounit(i).ne.-32767) then
-            if (iounit(i) .gt. 0) then
-               call filecomp(ciounit(i), fullname)
-               call sddopen(liounit, fullname, modes(i), lrtn)
-            else
-               lrtn = 1
-            endif
-            if ( (lrtn .eq. 0 .and. i .ne. RECORDS) .or. 
-     .		 (lrtn .eq. -1 .and. i .eq. RECORDS) ) then
-               write(stch,20) i,types(i),crshfle(fullname),verbs(i)
-            else
-	       call sddclose(liounit) 
-               write(stch,20) i, types(i),notavail,verbs(i)
-	       iounit(i) = -abs(iounit(i))
-            endif
-            call pwrite(istch, n80)
-         endif
- 100  continue
- 20   format(1x,i2,'|',a15,'|',a32,'|',a18)
-c       Checks whether general data files exist and have the proper
-c       protections.
-c
-c
-      if (iprtout .ne. -32767) then
-        call filecomp(cprtout, fullname)
-	if(iprtout.gt.0 .and. access(fullname,modes(11)).eq.0) then
-	  write(stch,20) 11, types(11),crshfle(fullname),verbs(11)
-	else
-	  write(stch,20) 11,types(11),notavail,verbs(11)
-	  if (iprtout.gt.0 .and. opened(fullname)) 
-     1		close(iprtout,iostat=istat)
-	  iprtout = -abs(iprtout)
-	endif
-      endif
-      call pwrite(istch, n80)
-c
-      if (ilogout .ne. -32767) then
-        call filecomp(clogout, fullname1)
-	if(ilogout.gt.0 .and. access(fullname1,modes(12)).eq.0) then
-	  write(stch,20) 12, types(12),crshfle(fullname1),verbs(12)
-	else
-	  write(stch,20) 12,types(12),notavail,verbs(12)
-	  if (ilogout.gt.0 .and. opened(fullname1)) 
-     1		close(ilogout,iostat=istat)
-	  ilogout = -abs(ilogout)
-	endif
-      endif
-      call pwrite(istch, n80)
-c
-      if (iprtout .gt. 0 .or. ilogout .gt. 0) then
-	write(stch,10)
-        call pwrite(istch, n80)
-      endif
-      if (iprtout .gt. 0) then
-	write(stch,1) '  Output will be appended to end of ',
-     1			   crshfle(fullname),'         '
-        call pwrite(istch, n80)
-      endif
-      if (ilogout .gt. 0) then
-	write(stch,1) '  Output will be appended to end of ',
-     1			   crshfle(fullname1),'         '
-        call pwrite(istch, n80)
-      endif
-c
-      write(stch,10)
-      call pwrite(istch, n80)
-      write(stch,1) 'It is YOUR responsibility to ensure the',
-     1		       ' files are in the correct format'
-      call pwrite(istch, n80)
-      write(stch,1) ' '
-      call pwrite(istch, n80)
-c
-      return
-      end	
-c
-      character*32 function crshfle(filename)
-c
-c     Takes the input filename string and returns the last 32 characters
-c     in the name.  If more than 32 chars in name, the first 3 chars
-c     will be '...'.  For example:
-c     if 'BLAH' is the filename than 'BLAH' is returned.  If the filename 
-c     is '/23456789/123456789/123456789/12345'  (i.e., 35 chars long), then
-c     '...789/123456789/123456789/12345' is returned.
-c
-      character*(*) filename
-c
-      integer*2 lastblnk, ilen
-c
-      ilen = lastblnk(filename)
-c
-      if (ilen .le. 32) then
-	crshfle = filename
-      else
-	crshfle = '...' // filename(ilen-28:ilen)
-      endif
-c
-      return
-      end
diff -uNr 3.5/source/conline/fitsdates.c unipops-3.6/source/conline/fitsdates.c
--- 3.5/source/conline/fitsdates.c	2000-03-16 11:30:44.000000000 -0700
+++ unipops-3.6/source/conline/fitsdates.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,239 +0,0 @@
-
-/* @(#)fitsdates.c	1.1 05/04/98 */
-
-#include <time.h>
-
-/* set and query the date style */
-/* a style of 0 is the old FITS style of dd/mm/yy */
-/* a style of 1 is the new FITS style of yyyy-mm-dd[Thh:mm:ss[.sss]] */
-/* if whichStyle is a valid pointer, sets the style to that */
-/* if whichStyle is not a valid pointer AND the style has not */
-/* been set, set the style as appropriate for today */
-/* Once the style has been set (is not -1) it can not be reset */
-/* the style is returned */
-
-int datestyle_(whichStyle)
-     int *whichStyle;
-{
-  static int style = -1;
-  time_t cltime;
-  struct tm *ltime;
-
-  if (style == -1) {
-    if (whichStyle) {
-      style = *whichStyle;
-    } else {
-      cltime = time((time_t *)0);
-      ltime = localtime(&cltime);
-      if (ltime->tm_year > 98) style = 1;
-      else style = 0;
-    }
-  }
-  return style;
-}
-
-/* The DATE fields in matrix and cube headers are stored as DOUBLES */
-/* but they behave like strings.  This was to maintain the initial  */
-/* behavior while keeping the ability to store full FITS compatable */
-/* dates of the new form YYYY-MM-DD[Thh:mm:ss.[sss]] */
-/* Since this requires more than 8 characters, the decision was made */
-/* to convert these strings to/from doubles so that they can be */
-/* stored in the same 8-character space in the header and hence */
-/* POPSDAT does not need to change */
-
-/* These are the function which do that conversion */
-
-/* the value is stored as a modified JD number */
-
-/* slen gives the max number of chars possibly in sdate */
-/* sdate contains the string */
-/* ddate will contain the result */
-/* oldfits is 1 if this is the buggy old unipops with dd/mm reversed */
-void todate_(slen, sdate, ddate, oldfits)
-     int *slen;
-     char *sdate;
-     double *ddate;
-     int *oldfits;
-{
-  static int days[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 ,31 };
-  int first, last, len;
-  int yr, mon, day, hr, min, mday, mjd, csize, tmp;
-  float secs;
-  
-  yr = mon = day = hr = min = 0;
-  secs = 0.0;
-
-  *ddate = -1.0;
-  
-  first=last=-1;
-  while (last < *slen && sdate[++last] != '\0');
-  while (last >= 0 && sdate[--last] == ' ' && last >= 0);
-  while (first <= last && sdate[++first] == ' ');
-  /* first points to the first non_blank char and last to the last */
-  len = last - first + 1;
-  /* try some forms */
-  if ((len == 8 || (len == 7 && first == 1)) && 
-      sdate[2] == '/' && sdate[5] == '/')
-  {
-    /* original fits format */
-    sscanf(sdate, "%d/%d/%d", &day, &mon, &yr);
-    if (*oldfits) {
-      tmp = day;
-      day = mon;
-      mon = tmp;
-    } 
-    yr += 1900;
-  } else if (len == 10 && sdate[4] == '-' && sdate[7] == '-') {
-    /* new format, short form */
-    sscanf(sdate, "%d-%d-%d", &yr, &mon, &day);    
-  } else if (len >= 19 && sdate[4] == '-' && sdate[7] == '-' &&
-	     sdate[10] == 'T' && sdate[13] == ':' && sdate[16] == ':') {
-    /* new format, long form */
-    sscanf(sdate, "%d-%d-%dT%d:%d:%f", &yr, &mon, &day,
-	   &hr, &min, &secs);
-  } else {
-    /* anything else is unknown */
-    return;
-  }
-
-  /* convert to decimal days if everything is ok so far */
-  if (secs >= 60.0 || min >= 60 || hr >= 24 || mon > 12) return;
-  
-  mday = days[mon-1];
-  if ((yr%400 == 0) || ((yr%4 == 0) && (yr%100 != 0))) mday++;
-
-  if (day > mday) return;
-
-  mjd = (1461*(yr+4800+(mon-14)/12))/4 + 
-    (367*(mon-2-12*((mon-14)/12)))/12 -
-    (3*((yr+4900+(mon-14)/12)/100))/4 + day-32075;
-  mjd = mjd - 2400001;
-  *ddate = mjd + (hr + (min + secs/60.0)/60.0)/24.0;
-}
-
-/* slen gives the number of available chars to set */
-/* sset gives the number of chars actually set */
-/* ddate contains the modified julian date to be turned into a string */
-/* sdate will contain the string result it is filled with blanks if necessary
-/* to pad out all slen chars */
-void fromdate_(slen, sset, ddate, sdate)
-     int *slen, *sset;
-     double *ddate;
-     char *sdate;
-{
-  double jdf;
-  int jd, l, n, i, j, day, mon, yr, hr, min, nchars, tchars;
-  float secs;
-  *sset = 0;
-  if (*ddate >= 0.0) {
-    /* .0005 seconds is the resolution of the output string */
-    double mindayfract = .0005/60.0/60.0/24.0;
-
-    jdf = *ddate - (int)(*ddate); 
-    jd = *ddate - jdf + 2400001; 
-  
-
-    l = jd+68569; 
-    n=(4*l)/146097; 
-    l=l-(146097*n+3)/4; 
-    i=(4000*(l+1))/1461001; 
-    l=l-(1461*i)/4+31; 
-    j=(80*l)/2447; 
-    day=l-(2447*j)/80; 
-    l=j/11; 
-    mon=j+2-12*l; 
-    yr = 100*(n-49)+i+l;
-    /* is there any fractional day to display */
-    /* this forces the new style output */
-    if (jdf > mindayfract) {
-      if (*slen < 24) *sset = 0;
-      else {
-	jdf *= 24.0; 
-	hr = jdf; 
-	jdf = (jdf - hr)*60.0; 
-	min = jdf ; 
-	secs = (jdf - min)*60.0; 
-	if (secs >= 59.999) { 
-	  min += 1; 
-	  secs -= 60.0;
-	} 
-	if (min >= 60) { 
-	  hr += 1; 
-	  min -= 60; 
-	}
-	if (secs < mindayfract) secs = 0.0;
-	sprintf(sdate,"%04d-%02d-%02dT%02d:%02d:%06.3f",yr, mon, day, hr, min, secs);
-	*sset = 23;
-      }
-    } else {
-      if (*slen < 10) *sset = 0;
-      else {
-	/* which style to use, new or old */
-	if (datestyle_(0) || yr >= 2000) {
-	  /* for dates over 2000, we are forced to use this */
-	  sprintf(sdate,"%04d-%02d-%02d",yr, mon, day);
-	  *sset = 10;
-	} else {
-	  sprintf(sdate,"%02d/%02d/%02d",day,mon,(yr-1900));
-	  *sset = 8;
-	}
-      }
-    }
-  }
-  /* pad with spaces */
-  for (i=*sset;i<*slen;i++) sdate[i] = ' ';
-}
-
-/* format iarr into an approprate FITS date string */
-/* iarr has 3 elements, day, month, year */
-/* the result will be padded with blanks out to nchars */
-/* there is no sanity check that nchars is long enough */
-void makedate_(nchars, sdate, iarr)
-     int *nchars;
-     char *sdate;
-     int *iarr;
-{
-  int i, nc;
-  if (datestyle_(0) || iarr[2] >= 2000) {
-    sprintf(sdate, "%04d-%02d-%02d", iarr[2], iarr[1], iarr[0]);
-    nc = 10;
-  } else {
-    sprintf(sdate, "%02d/%02d/%02d", iarr[0], iarr[1], (iarr[2]-1900));
-    nc = 8;
-  }
-  for (i=nc;i<*nchars;i++) sdate[i] = ' ';
-}
-
-/* extract a fits keyword string value from the input string */
-/* to the output string */
-/* It is assumed that the input string is at least 80 chars */
-/* long and that the output string can hold at least 80-11 chars */
-/* nchars returns the number of chars of the output string actually set */
-/* String values start after the first ' and end before the next ' or
-/* column 80, whichever appears first */
-
-void fitskeyvalue_(nchars, card, value)
-     int *nchars;
-     char *card, *value;
-{
-  int icount, ocount;
-  icount = ocount = 0;
-  /* move to the start */
-  while (*card != '\0' && *card != '\'' && icount < 80) {
-    card++;
-    icount++;
-  }
-  if (*card == '\'') {
-    card++;
-    icount++;
-    while (*card != '\0' && *card != '\'' && icount < 80) {
-      *value = *card;
-      value++;
-      card++;
-      ocount++;
-      icount++;
-    }
-  }
-  *nchars = ocount;
-}
-
diff -uNr 3.5/source/conline/fphandler.f unipops-3.6/source/conline/fphandler.f
--- 3.5/source/conline/fphandler.f	2000-03-16 11:32:56.000000000 -0700
+++ unipops-3.6/source/conline/fphandler.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-      subroutine fphandler(sig, code, sigcontext)
-c
-c     @(#)fphandler.f	5.1 06/22/94
-c
-c     Floating Point handler
-c
-      integer*4 sig, code, sigcontext(5), loc
-      integer*2 short
-c
-      include 'errors.inc'
-c
-      if (loc(code) .eq. 208) then
-	numinvalid = numinvalid + 1
-      else if (loc(code) .eq. 200) then
-	numdivision = numdivision + 1
-      else if (loc(code) .eq. 212) then
-	numoverflow = numoverflow + 1
-      else if (loc(code) .eq. 204)then
-	 numunderflow = numunderflow + 1
-      else
-	numothererr = numothererr + 1
-	loclasterr = short(loc(code))
-      endif
-c
-      return
-      end
diff -uNr 3.5/source/conline/fptfmt.f unipops-3.6/source/conline/fptfmt.f
--- 3.5/source/conline/fptfmt.f	2000-03-16 11:33:59.000000000 -0700
+++ unipops-3.6/source/conline/fptfmt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,162 +0,0 @@
-      logical function fptfmt(infmt)
-c
-c     @(#)fptfmt.f	5.1 06/22/94
-c
-c     Checks that the input format specification (INFMT) can be used
-c     as a default format specification.
-c
-      character*(*) infmt
-c
-      integer*2 i0, numchar, inum, i1, i2, fdefault, nfield, n373, m1,
-     .		ier, i3, lastblnk
-      character*1 lc1, c1, c2
-      character*6 snum
-c
-      parameter (fdefault = 15)
-      parameter (n373 = 373)
-      parameter (m1 = -1)
-c
-      fptfmt = .false.
-      i0 = 1
-      numchar = lastblnk(infmt)
-      inum = 0
-c
-10    if (i0 .gt. numchar) then
-	call oerror(n373, m1, 'Format exhausted')
-      else
-        lc1 = infmt(i0:i0)
-	call uppercase(lc1, c1)
-      endif
-c------
-      if (c1 .eq. ' ' .or. c1 .eq. ',') then
-	i0 = i0 + 1
-	goto 10
-c	Skip all blanks and commas between fields
-c
-c------
-      else if (lle(c1,'9') .and. lge(c1,'0') .or. c1 .eq. '-' ) then
-c	We have a number begining a field; parse the number until you get
-c	to a non-number and then set up INUM.  Probably a
-c	repeat count or a scale factor for 'P'.
-c
-	i1 = i0
-	i2 = i0 + 1
-20	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 20
-	  endif
-	else
-	  call oerror(n373, m1, 'Format exhausted')
-        endif
-	if (c1 .eq. '-' .and. i1+1 .eq. i2) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-c	Must have a digit after the minus sign.
-c
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i0 = i2
-	goto 10
-c
-c------
-      else if (c1 .eq. 'P') then
-c	We have a P scale factor
-c
-	write(snum,'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	inum = 0
-	i0 = i0 + 1
-	goto 10
-c
-c------
-      else if (c1 .eq. 'S') then
-c	We have a S scale factor
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'P' .or. c2 .eq. 'p' .or.
-     .	      c2 .eq. 'S' .or. c2 .eq. 's') then
-	     i2 = i2 + 1
-	  endif
-        endif
-	i0 = i2
-	goto 10
-c
-c------
-      else if (c1 .eq. 'X') then
-c	We have an 'X' format.  If no repeat count, assume 1 and then
-c	add blanks to the output string.
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	inum = 0
-	i0 = i0 + 1
-	goto 10
-c
-c------
-      else if (c1 .eq. 'F' .or. c1 .eq. 'G' .or. c1 .eq. 'E' .or. 
-     .	       c1 .eq. 'D') then	
-c	We have an 'E, F, or G' format.  
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-60	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 60
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 60
-	  endif
-        endif
-c	Parse field width
-c
-	if (i2 .eq. i1) then
-	   nfield = fdefault
-	   i3 = i2
-c	   Set default field width
-	else 
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-	   if (c2 .ne. '.') then
-	      i3 = i2
-	   else
-	      i3 = i2 + 1
-62	      if (i3 .le. numchar) then
-	  	c2 = infmt(i3:i3)
-	  	if ( (lle(c2,'9') .and. lge(c2,'0')) .or.
-     .		     c2 .eq. '.'  .or. c2 .eq. 'e' .or. c2 .eq. 'E') then
-	     	  i3 = i3 + 1
-	     	  goto 62
-	  	endif
-	      endif
-	      if (i3 .eq. i2 + 1) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	   endif
-	endif
-c	Parse field width and # sig. digits.
-c  
-	i0 = i3
-	inum = 0
-        if (i3 .le. numchar) 
-     .		call oerror(n373, m1, 'Bad format specification')
-      else
-	call oerror(n373, m1, 'Bad format specification')
-      endif
-c
-      fptfmt = .true.
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/funclev.f unipops-3.6/source/conline/funclev.f
--- 3.5/source/conline/funclev.f	2000-03-16 11:33:45.000000000 -0700
+++ unipops-3.6/source/conline/funclev.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,110 +0,0 @@
-      subroutine funclev (z, isize, jsize, undefwp, func, lmin, lmax,  
-     .			  levs, numlevs, ierr) 
-c
-c     @(#)funclev.f	5.3 09/10/98
-c
-c     Takes the contents of Matrix Z between IMIN, IMAX and JMIN, JMAX
-c     and calculates contour levels LEVS(NUMLEVS) between LMIN and LMAX such 
-c     that FUNC(1)/SUMFUNC of the matrix values are between LEVS(1) and (2), 
-c     FUNC(2)/SUMFUNC are between LEVS(2) and (3), etc. (where 
-c     SUMFUNC = summation of all values in FUNC).
-c
-c     If all NUMLEVS values of FUNC are equal, LEVS will result in an
-c     equal-histogram distribution.
-c
-c     Z(ISIZE,JSIZE) = Matrix to work on
-c     ISIZE,JSIZE = I*2 dimensions of matrix.
-c     UNDEFWP = R*4 Undefined value in Matrix
-c     FUNC(NUMLEVS) = Real*4 = Describes the percentages that will be in
-c		each LEVS.
-c     LMIN, LMAX = Real*4 = Min/Max matrix values taht will be covered
-c		by LEVS
-c     LEVS(NUMLEVS) = Real*4 = Output array containing levels
-c     NUMLEVS = Integer*2 = number of levels
-c     IERR = I*2 = return error code (0 if successful)
-c
-      real func(*), levs(*), lmin, lmax, z(isize, jsize), undefwp
-      integer*2 numlevs, ierr
-      integer*4 isize, jsize
-c
-      real sumfunc, delta, sum
-      integer*2 i, j, ii, iptwh, nxdata
-c
-      parameter (IPTWH = 1)
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-      include 'appl.inc'
-c     Note that IMIN,IMAX,JMIN,JMAX must be set in COMMON/APPL/
-c
-      if (lmin .ge. lmax .or. numlevs .le. 1) then
-	ierr = 1
-	goto 99
-      endif
-c
-      sumfunc = 0.0
-      do 100 i = 1, numlevs
-	if (func(i) .lt. 0.0) then
-	    ierr = 3
-	    goto 99
-	endif
-	sumfunc = sumfunc + func(i)
-100	continue
-      sumfunc = sumfunc * (numlevs - 1) / numlevs
-c
-      if (numlevs .eq. 2) then
-	levs(1) = lmin
-	levs(2) = lmax
-	goto 99
-      endif
-c     Take care of degenerate cases
-c
-      do 150 i = 1, MAX_DATA_POINTS
-	xdata(i) = 0.0
-150	continue
-c
-      nxdata = 0
-      delta = (lmax - lmin) / (MAX_DATA_POINTS - 1)
-      do 190 i = imin, imax
-	do 180 j = jmin, jmax
-	    if (z(i,j) .ne. undefwp) then
-	       ii = nint( (z(i,j)-lmin)/delta + 1.)
-	       if (ii .gt. 0 .and. ii .le. MAX_DATA_POINTS) then
-		   xdata(ii) = xdata(ii) + 1.
-	           nxdata = nxdata + 1
-	       endif
-	    endif
-180	    continue
-190	continue
-c     XDATA will contain the distribution of values in the matrix
-c     to a gridding of DELTA.  NXDATA pixels are used from the matrix.
-c
-      if (nxdata .eq. 0) then
-	ierr = 5
-	goto 99
-      endif
-c     Watch out if NO pixel values are between LMIN and LMAX.
-c 
-      sumfunc = sumfunc/nxdata
-      sum = 0.0
-      levs(1) = lmin
-      levs(numlevs) = lmax
-      j = 2
-      do 200 i = 1, MAX_DATA_POINTS
-	sum = sum + xdata(i)
-	if ( j .lt. numlevs .and. sum .ge. func(j)/sumfunc ) then
-		levs(j) = float (i-1)*delta + lmin
-		if (levs(j) .eq. levs(j-1)) levs(j) = levs(j) + delta/2.
-		sum = sum - func(j)/sumfunc
-		j = j + 1
-	endif
-200     continue
-c
-      if (j .ne. numlevs) then
-	ierr = 4
-	goto 99
-      endif
-c
-99    return
-      end
-c
diff -uNr 3.5/source/conline/gb/Makefile unipops-3.6/source/conline/gb/Makefile
--- 3.5/source/conline/gb/Makefile	2000-03-16 11:30:19.000000000 -0700
+++ unipops-3.6/source/conline/gb/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-# @(#)Makefile	5.3 11/02/94
-#
-ARCH = `uname -m`
-INCLUDES = $(popsdir)includes/gb/
-INCS = $(popsdir)includes/
-CCMP = cc
-CC = $(CCMP)
-CDEBOROPT = -g
-FDEBOROPT = -g
-FLOATOPT =
-FILLIB = /usr/lang/SC1.0/libm.il
-CILLIB = /usr/lib/libm.il
-FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(FILLIB)
-CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CILLIB)
-FFLAGS = -Nn1500 -i2 -DI2ON -u $(FFLOAT) -D$(ARCH)
-#	remove the -DI2ON if your remove the -i2 flag
-CFLAGS = $(CFLOAT) -I$(INCLUDES) -I$(INCS) -D$(ARCH) -DUSEPAD
-
-BINLIST = data_client.o
-
-all:	$(BINLIST)
-
-clean:
-	rm -f *.o
-	-sccs clean
-
-data_client.o: $(INCLUDES)access.h
-
diff -uNr 3.5/source/conline/gb/data_client.c unipops-3.6/source/conline/gb/data_client.c
--- 3.5/source/conline/gb/data_client.c	2000-03-16 11:30:19.000000000 -0700
+++ unipops-3.6/source/conline/gb/data_client.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,686 +0,0 @@
-
-/* @(#)data_client.c	5.3 07/08/94 */
-
-# include <sys/types.h>
-
-# include <sys/socket.h>
-
-# include <netinet/in.h>
-
-# include <netdb.h>
-
-# include <utmp.h>
-
-# include <rpc/rpc.h>
-
-# include <rpcsvc/rusers.h>
-
-# include <errno.h>
-
-# include <access.h>
-
-# include <malloc.h>
-
-#ifdef SOLARIS
-# include <string.h>
-#endif
-
-int port_number = -1;
-int port = -1;
-
-ServiceRequest req;
-ServiceReply reply;
-
-int link_to_data(server_name)
-	char *server_name;
-{
-	static struct sockaddr_in sinhim =
-	{
-	    AF_INET
-	};
-	int fd;
-	struct hostent *hp;
-	int request;
-	int n;
-	extern int errno;
-
-	/* get the port number from the server */
-	request = SEND_ANALYSIS_DATA_2;
-	if ((n = callrpc(server_name,
-		PROG,VERS,PROC,xdr_int,&request,xdr_int,&port_number)) != 0)
-	{
-	    port_number = -1;
-	    return(21); /* callrpc failed */
-	}
-	if (port_number < 0)
-	{
-	    port_number = -1;
-	    return(21);
-	}
-
-	/* connect to the port */
-	hp = gethostbyname (server_name);
-	if (!hp)
-	{
-	    port_number = -1;
-	    return(22); /* Host was not found */
-	}
-
-#ifdef SOLARIS
-	memcpy(&sinhim.sin_addr, hp->h_addr, sizeof(sinhim.sin_addr));
-#else
-	bcopy (hp->h_addr, &sinhim.sin_addr, sizeof(sinhim.sin_addr));
-#endif
-	sinhim.sin_port = port_number;
-
-	if ((port = socket(AF_INET, SOCK_STREAM, 0)) < 0)
-	{
-	    port_number = -1;
-	    return(23); /* Cannot create socket */
-	}
-
-	if (connect(port, (struct sockaddr *)&sinhim, sizeof(sinhim)) < 0)
-	{
-	    port_number = -1;
-	    return(24); /* Connect failed */
-	}
-
-	return(0);
-}
-
-int talk_to_port(addr)
-	char *addr;
-{
-	int i, n, nb;
-
-	if (write(port,&req,sizeof(req)) != sizeof(req))
-	    return(25);
-	if (read(port,&reply,sizeof(reply)) != sizeof(reply))
-	    return(26);
-	if (reply.length_data > 0)
-	{
-	    n = reply.length_data;
-	    do
-	    {
-		i = (n < PACKETSIZE) ? n : PACKETSIZE;
-		if ((nb = read(port,addr,i)) == -1)
-		    return(27);
-		addr += nb;
-		n -= nb;
-	    } while (n > 0);
-	}
-	return(0);
-}
-
-# define RETURN(N) \
-	{\
-	    *return_code = N * 10000 + errno;\
-	    return;\
-	}
-
-/*
-** Access and attach shared memory and set the project code
-*/
-void openaccess_(anal_user_code, anal_user_name, anal_site_name, return_code)
-	double *anal_user_code, *anal_user_name, *anal_site_name;
-	int *return_code;
-{
-	char *p, *q, *r;
-	int n;
-
-	if ((n = link_to_data(DATA_HOST_NAME)) != 0)
-	    RETURN(n)
-	p = (char *)anal_user_code;
-	q = (char *)anal_user_name;
-	r = (char *)anal_site_name;
-	req.request_code = OPEN;
-	strncpy(req.user_code,p,8);
-	strncpy(req.user_name,q,8);
-	strncpy(req.site_name,r,8);
-	if ((n = talk_to_port(0)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-void setformat_(fmtcode, return_code)
-	int *fmtcode, *return_code;
-{
-	int n;
-
- 	req.request_code = SETFMT;
-        req.scan_number = *fmtcode;
-	if ((n = talk_to_port(0)) != 0) RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Change the project code
-*/
-void chgprj_(anal_user_code, anal_user_name, anal_site_name, return_code)
-	double *anal_user_code, *anal_user_name, *anal_site_name;
-	int *return_code;
-{
-	char *p, *q, *r;
-	int n;
-
-	p = (char *)anal_user_code;
-	q = (char *)anal_user_name;
-	r = (char *)anal_site_name;
-	req.request_code = CHGPRJ;
-	strncpy(req.user_code,p,8);
-	strncpy(req.user_name,q,8);
-	strncpy(req.site_name,r,8);
-	if ((n = talk_to_port(0)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Front end to gscanlist, puts list into array of floats
-**  all size checking is done is gscanlist
-*/
-void gscanlist2_(actno, maxno, rlist, return_code)
-	int *actno;
-	int *maxno;
-	float *rlist;
- 	int *return_code;
-{
-	int i, size, *p, *p1;
-	float *rp;
-	void gscanlist_();
-
-	*actno = 0;
-	*return_code = 0;
-	size = *maxno * sizeof(int);
-	p = (int *) malloc(size);
-        p1 = p;
-	if (p != NULL) {
-	   gscanlist_(actno, maxno, p, return_code);
-	   for (i=0,rp=rlist;i<*actno;i++,rp++,p++) *rp = *p;
-           free(p1);
-	}
-        
-}
-
-/*
-** Get the list of scans that belongs to this project
-*/
-void gscanlist_(actno,maxno,list,return_code)
-	int *actno;
-	int *maxno;
-	int *list;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GSCANLIST;
-	req.max_data_items = *maxno;
-	if ((n = talk_to_port((char *)list)) != 0)
-	    RETURN(n)
-	*actno = reply.actual_data_items;
-	*return_code = 0;
-}
-
-/*
-** Get a particular scan
-*/
-void gscan_(scan_no,feed_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GSCAN;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the header for a particular scan
-*/
-void gshead_(scan_no,feed_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GSHEAD;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-/*
-** ggscan, ggscanlist are for tucson data only
-*/
-
-void ggscan_(scan_no,feed_no,record,return_code)
-   int *scan_no;
-   int *feed_no;
-   float *record;
-   int *return_code;
-{
-   *return_code = 232;
-}
-
-void glgscan_(record, feed_no, return_code)
-   float *record;
-   int *feed_no;
-   int *return_code;
-{
-   *return_code = 232;
-}
-
-void ggscanlist2_(actno,maxno,list,return_code)
-	int *actno;
-	int *maxno;
-	float *list;
-	int *return_code;
-{
-   *return_code = 232;
-}
-
-/*
-** Get the next scan that belongs to this project
-*/
-void gnscan_(record,return_code)
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GNSCAN;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the previous scan that belongs to this project
-*/
-void gpscan_(record,return_code)
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GPSCAN;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the last completed scan that belongs to this project
-*/
-void glscan_(record,return_code)
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GLSCAN;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the current scan in progress -- provided it belongs to this project
-*/
-void gcscan_(record,feed_no,return_code)
-	float *record;
-	int *feed_no;			/* ignored here */
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GCSCAN;
-	req.feed_number = *feed_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the Spectral Processsor scan
-*/
-void gspscan_(scan_no,feed_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GSPSCAN;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the Spectral Processsor individual record
-*/
-void gspir_(scan_no,feed_no,phase_no,rec_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	int *rec_no;
-	int *phase_no;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GSPIR;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	req.phase_number = *phase_no;
-	req.record_number = *rec_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the A/C individual record
-*/
-void gacir_(scan_no,feed_no,phase_no,rec_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	int *rec_no;
-	int *phase_no;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GACIR;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	req.phase_number = *phase_no;
-	req.record_number = *rec_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-
-/*
-** Front end to gcontlist, puts list into array of floats
-**  all size checking is done is gcontlist
-*/
-void gcontlist2_(actno, maxno, rlist, return_code)
-	int *actno;
-	int *maxno;
-	float *rlist;
- 	int *return_code;
-{
-	int i, size, *p, *p1;
-	float *rp;
-	void gcontlist_();
-
-	*actno = 0;
-	*return_code = 0;
-	size = *maxno * sizeof(int);
-	p = (int *) malloc(size);
-	p1 = p;
-	if (p != NULL) {
-	   gcontlist_(actno, maxno, p, return_code);
-	   for (i=0,rp=rlist;i<*actno;i++,rp++,p++) *rp = *p;
-           free(p1);
-	}
-        
-}
-
-/*
-** Get the list of scans that belongs to this project
-*/
-void gcontlist_(actno,maxno,list,return_code)
-	int *actno;
-	int *maxno;
-	int *list;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GCONTLIST;
-	req.max_data_items = *maxno;
-	if ((n = talk_to_port((char *)list)) != 0)
-	    RETURN(n)
-	*actno = reply.actual_data_items;
-	*return_code = 0;
-}
-
-/*
-** Get a particular scan
-*/
-void gcont_(scan_no,feed_no,actualpoints,maxpoints,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	int *actualpoints;
-	int *maxpoints;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GCONT;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	req.max_data_items = *maxpoints;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the header for a particular scan
-*/
-void gchead_(scan_no,feed_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GCHEAD;
-	req.scan_number = *scan_no;
-	req.feed_number = *feed_no;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	if (*scan_no != record[0]) 
-	{
-		if ((n = talk_to_port((char *)record)) != 0)
-	   	 RETURN(n)
-	}
-
-	*return_code = reply.service_return_code;
-}
-
-/*
-** Get the last completed scan that belongs to this project
-*/
-void glcont_(feed_no,actualpoints,maxpoints,record,return_code)
-	int *feed_no;
-	int *actualpoints;
-	int *maxpoints;
-	float *record;
-	int *return_code;
-{
-	int n;
-
-	req.request_code = GLCONT;
-	req.feed_number = *feed_no;
-	req.max_data_items = *maxpoints;
-	if ((n = talk_to_port((char *)record)) != 0)
-	    RETURN(n)
-	*return_code = reply.service_return_code;
-}
-
-void gselect_(params, actno, maxno, record, return_code)
-sel_params *params;
-int *actno, *maxno, *return_code;
-float *record;
-{
-	int n, i, nb;
-        char *cp;
-
-	req.request_code = GSELECT;
-	req.max_data_items = *maxno;
-/*		send sizeof(sel_params) via scan number */
-	req.scan_number = sizeof(sel_params);
-        if ((n = talk_to_port((char *)record)) != 0) 
-           RETURN(n)
-/*		is it OK to send more ? */
-	if (reply.service_return_code != 0) {
-           *return_code = reply.service_return_code;
-           return;
-        }
-/*		send params and get response */
-        n = sizeof(sel_params);
-        cp = (char *)params;
-        do 
-        {
-           i = (n < PACKETSIZE) ? n : PACKETSIZE;
-           if ((nb = write(port, cp, i)) == -1) RETURN(1);
-           cp += nb;
-           n -= nb;
-        } while (n > 0);
-
-        if (read(port, &reply, sizeof(reply)) != sizeof(reply))
-           RETURN(2);
-        if (reply.length_data > 0)
-        {
-	  cp = (char *)record;
-          n = reply.length_data;
-          do
-          {
-             i = (n < PACKETSIZE) ? n : PACKETSIZE;
-             if ((nb = read(port, cp, i)) == -1) RETURN(3);
-             cp += nb;
-             n -= nb;
-          } while (n > 0);
-        }
-        *actno = reply.actual_data_items;
-        *return_code = reply.service_return_code;
-}
-
-void closeaccess_()
-{
-	req.request_code = CLOSE;
-	write(port,&req,sizeof(req));
-}
-
-int useprojcode_()
-{
-      return(1);
-}
-
-int onlinesite_()
-{
-   return(0);
-}
-
-void chngonline_(idtype, iver, anal_user_code, ier)
-int *idtype;
-int *iver;
-char *anal_user_code;
-short int *ier;
-{
-   *iver = -1;
-   *ier = 232;
-}
-
-int deffeed_()
-/*		returns the default feed number for the first feed */
-{
-   return(1);
-}
-
-void olfiles_()
-{
-}
-
-void changever_(idtype, iver, anal_user_code, ier)
-int *idtype;
-int *iver;
-char *anal_user_code;
-short int *ier;
-{
-   *iver = -1;
-   *ier = 232;
-}
-
-int qvers_(iftype)
-int *iftype;
-{
-/*   wants the current version of file type iftype, tuc only */
-   return(-1);
-}
-
-void gotfrec_(scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-/*   get an OTF record - 12-m data only */
-   *return_code = -1;
-}
-
-void gpzrec_(scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-/* Get a polariz. record - 12m on-line only */
-  *return_code = -1;
-}
diff -uNr 3.5/source/conline/gcopy.f unipops-3.6/source/conline/gcopy.f
--- 3.5/source/conline/gcopy.f	2000-03-16 11:32:56.000000000 -0700
+++ unipops-3.6/source/conline/gcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine gcopy
-C-------------------------------------------------------------------------------
-C  @(#)gcopy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Makes a hard copy of the graphics screen
-c
-      integer*2 n129, n0
-      integer*4 system, istat, irtn
-      character*90 output
-c
-      include 'cio.inc'
-c
-      data n129, n0 /129, 0/
-c
-      if (iprinttype .le. 0) then
-	call oerror(n129, n0, 'GCOPY')
-	return
-      endif
-c
-      close(ioutgrph,status='keep',iostat=istat)
-c
-      output = 'printit ' // printer // ' ' // 
-     .          printtype // ' ' // coutgrph
-c
-      irtn = system(output)
-      if (istat .ne. 0) write(istderr,*) 'Internal problem with GCOPY'
-      open(unit=ioutgrph,file=coutgrph,status='unknown',fileopt='eof',
-     .     iostat=istat)
-      if (istat .ne. 0) write(istderr,*) 'Internal problem with GCOPY'
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/genop.f unipops-3.6/source/conline/genop.f
--- 3.5/source/conline/genop.f	2000-03-16 11:32:56.000000000 -0700
+++ unipops-3.6/source/conline/genop.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,1160 +0,0 @@
-      SUBROUTINE  genop(LFLAG,J)
-C-------------------------------------------------------------------------------
-C  @(#)genop.f	5.4 09/10/98
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C GENOP contains frequently used commands
-C---------------------------------------------------------------------
-      INCLUDE 'appl.inc'
-c
-      INTEGER*2 RSTRNG(6), DSTRNG(6)
-      integer*2 lflag, j, ix, iwpr, itype, irealp, blank, isize, jcnt, 
-     .          iy, inum, chngfile, iptwh2, i1, i2, ier, lastblnk
-      integer*2 n0, n1, n9, n31, n33, n72, n112, n114, n120, n245, n301, 
-     .          n352, n353, n354, n356, n370, n372, n373, m1, m2, m3,
-     .		fshort, ifont, ispace, inum4, n355, n266, n133
-      integer*4 ilct, system, jj, loc, istat, icnum, istop,
-     .          itag, i, irtn, iunit, nchars, l0
-      character*72 stch
-      character*60 string1, string2, string3
-      character*1023 fullname
-      logical*2 opened, inquirefile, string, okfile, fptfmt
-      real*4 xtime, rstring1(30), rstring2(30), testvalue
-      real*8 pi, raddeg, radsec, aaa, ddd, ahr, dsgn, ddeg, ff1, ff2, 
-     .       ff3, c62, s62, decl, cd, sd, alpha, ca, sa, sinb, cosb, 
-     .       glong, glat, twopi, cb, sb, cl, sl, sind, cosd, ra, tand, 
-     .       dec, value, amn, dmn, cterm, tanb, sterm, asec, 
-     .       dsec, ddate
-      real*8 nrao140, nrao300, proto12m
-      character*16 existence(0:3), position(0:1), access(0:2)
-      character*24 zdatetime
-c
-      INCLUDE 'cform.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-      include 'core.inc'
-      include 'errors.inc'
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      equivalence (string1, rstring1), (string2, rstring2)
-C
-      data n0, n1, n9, n31, n33, n72, n112, n114, n120, n245, n301, 
-     .     n355, n352, n353, n354, n356, n370, n372,  n373, m1, m2, m3
-     .   / 0, 1, 9, 31, 33, 72, 112, 114, 120, 245, 301, 355, 
-     .     352, 353, 354, 356, 370, 372, 373, -1, -2, -3/
-      data n266, n133 /266, 133/
-      data l0 /0/
-      data blank/'  '/, nrao140/'NRAO 43M'/, nrao300/'NRAO 93M'/
-      data proto12m /'PROTO12M'/
-      data existence /'Unknown','Old','New','Scratch'/
-      data position /'Rewind', 'End of file'/
-      data access /'Read and write', 'Write only', 'Read only'/
-C
-      JJ=J
-      GO TO (32,33,34,35,52,53,54,55,56,57,90,100,120,130,240,250,
-     .       260,270,295,141,142,143,144,145,146,147,148,149,150,151,
-     .	     152,153,154,155,156,157,158,159,160,410,411,412,413,420,
-     .	     421,422,423,280,290,291,292,293,294,310,320,330,340,350,
-     .	     351,352,353,354,355,356,357), JJ
-      call oerror(n120, m3, 'GENOP')
-c-------------------------
-C                      PLACE  VCTR  CHAR        
-c-------------------------
-   32 continue
-      if (sp .lt. 2) call oerror(n112, m1, 'PLACE : Two needed')
-      IX=V(SP-1)
-      IY=V(SP)
-      SP=SP-2
-      CALL PLACEwp (IX,IY,n33)
-      iglinex = ix
-      igliney = iy
-c     Update the position where the next 'GRAPHICS' cammand will
-c     start to write characters.
-c
-      GO TO 1000
-c-------------------------
-   33 continue
-      if (sp .lt. 2) call oerror(n112, m1, 'VCTR : Two needed')
-      IX=V(SP-1)
-      IY=V(SP)
-      SP=SP-2
-      CALL VCTRwp(IX,IY,n33,sclchar,0.)
-      iglinex = ix
-      igliney = iy
-      GO TO 1000
-c-------------------------
-   34 continue
-      if (sp .lt. 4) call oerror(n112, m1, 'CHAR')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'CHAR')
-c     Make sure we have a array, string, or literal on the stack
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	jcnt = 4*irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	jcnt = 4*stack(sp-2)
-      else 
-	call oerror(n112, m1, 'CHAR')
-      endif
-c     Get the correct JCNT which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      SP=SP-4
-      if (sclchar .ne. 1.) call charsize(sclchar)
-      CALL PCHAR (c(LOC),jcnt)
-      if (sclchar .ne. 1.) call charsize(1.)
-      GO TO 1000
-c-------------------------
-c    PAGE
-c-------------------------
-   35 CONTINUE
-      call clrpage
-      call resetcur
-      GO TO 1000
-c-------------------------
-C            EQTOGAL   -   RA, DEC TO L, B   
-c-------------------------
-  52  CONTINUE
-      if (sp .lt. 2) call oerror(n112, m1, 'EQTOGAL : Two needed')
-      PI = 4. * ATAN (1.)
-      RADDEG = PI / 180.
-      RADSEC = RADDEG / 3600.
-      FF1 = 282.25 * RADDEG
-      FF2 = 62.6 * RADDEG
-      FF3 = 33. * RADDEG
-C
-      AAA = V(SP - 1)
-      DDD = V(SP)
-      SP = SP - 2
-C
-      AHR = AINT (AAA * 1.E-4)
-      AMN = AINT (AAA * 1.E-2) - 1.E2 * AHR
-      ASEC = AAA - AHR * 1.E4 - AMN * 1.E2
-      ALPHA = (ASEC + 60. * AMN + 3600. * AHR) * 15. * RADSEC
-C
-      DSGN = 1.
-      IF (DDD .LT. 0.) DSGN = -1.
-      DDD = ABS (DDD)
-      DDEG = AINT (DDD * 1.E-4)
-      DMN = AINT (DDD * 1.E-2) - DDEG * 1.E2
-      DSEC = DDD - DDEG * 1.E4 - DMN * 1.E2
-      DECL = (DSEC + 60. * DMN + 3600. * DDEG) * DSGN * RADSEC
-C
-      C62 = COS (FF2)
-      S62 = SIN (FF2)
-      CD = COS (DECL)
-      SD = SIN (DECL)
-      CA = COS (ALPHA - FF1)
-      SA = SIN (ALPHA - FF1)
-C
-      STERM = CD * SA * C62 + SD * S62
-      CTERM = CD * CA
-      SINB = SD * C62 - CD * SA *S62
-      COSB = SQRT(1. - SINB * SINB)
-      TANB = SINB / COSB
-C
-      GLONG = (ATAN2 (STERM,CTERM) + FF3) / RADDEG
-      IF (GLONG .LT. 0.) GLONG = GLONG + 360.
-      GLAT = ATAN (TANB) / RADDEG
-      stch = '*** ERROR in EQTOGAL ***'
-      write (stch,9111,iostat=istat) GLONG, GLAT
-      call pwrite(stch, n72)
- 9111 FORMAT (10X, 2F12.4)
-C
-      GO TO 1000
-c-------------------------
-C                     GALTOEQ - L, B TO RA, DEC          
-c-------------------------
-  53  CONTINUE
-      if (sp .lt. 2) call oerror(n112, m1, 'GALTOEQ : Two needed')
-      TWOPI = 8. * ATAN (1.)
-      RADDEG = TWOPI / 360.
-      FF1 = 282.25 * RADDEG
-      FF2 = 62.6 * RADDEG
-      FF3 = 33. * RADDEG
-C
-      GLONG = V(SP - 1) * RADDEG
-      GLAT = V(SP) * RADDEG
-      SP = SP - 2
-C
-      C62 = COS (FF2)
-      S62 = SIN (FF2)
-      CB = COS (GLAT)
-      SB = SIN (GLAT)
-      CL = COS (GLONG - FF3)
-      SL = SIN (GLONG - FF3)
-C
-      STERM = CB * SL * C62 - SB * S62
-      CTERM = CB * CL
-      SIND = CB * SL * S62 + SB * C62
-      COSD = SQRT(1. - SIND * SIND)
-      TAND = SIND / COSD
-C
-      RA = ATAN2 (STERM, CTERM) + FF1
-      RA = MOD (RA, TWOPI)
-      RA = ( RA / TWOPI ) * 24.
-      DEC = ATAN (TAND)
-      DEC = ( DEC / TWOPI ) * 360.
-C
-      CALL RNS8(RA, n0, RSTRNG)
-      CALL RNS8(DEC, n1, DSTRNG)
-C
-      stch = '*** ERROR in GALTOEQ ***'
-      write(stch, 9112, iostat=istat) rstrng, dstrng
-      call pwrite(stch, n72)
- 9112 FORMAT ( 10X, 6A2, 5X, 6A2)
-C
-      GO TO 1000
-c-------------------------
-C    Dump the K array.
-c-------------------------
-   54 CONTINUE
-      if (sp .lt. 2) call oerror(n112, m1, 'DUMP : Two needed')
-      IX=V(SP-1)
-      IY=V(SP)+IX
-      SP=SP-2
-      CALL KDUMP (IX,IY,K,C)
-      GO TO 1000
-c-------------------------
-C                                          CRT,PRINTER,OUTPUT
-c-------------------------
-   55 CONTINUE
-      iout = istdout
-      graphon = .false.
-c
-      call filecomp(cprtout, fullname)
-      if (opened(fullname)) then
-	close(unit=abs(iprtout),iostat=istat)
-        if (istat .ne. 0) call oerror(n356, n0, cprtout)
-      endif
-      GO TO 1000
-C
-c-------------------------
-   56 CONTINUE
-      if (iprtout .gt. 0) then
-        call filecomp(cprtout, fullname)
-        if (.not. opened(fullname)) then
-		open(unit=iprtout, file=fullname, 
-     1		     status='unknown', fileopt = 'eof', iostat=istat)
-     		if (istat .ne. 0) call oerror(n352, m2, cprtout)
-        endif
-        iout = iprtout
-        graphon = .false.
-        GO TO 1000
-      else
-	call oerror(n353, m2, cprtout)
-      endif
-C
-c-------------------------
-   57 CONTINUE
-      call filecomp(cprtout, fullname)
-      if (opened(fullname)) then
-	CLOSE (UNIT=abs(iprtout),iostat=istat)
-	if (istat .ne. 0) call oerror(n356, n0, cprtout)
-      endif
-c     File must be closed before we can print it
-c
-      if (inquirefile(fullname) ) then
-	 IX=system('printit ' // printer // ' text ' // 
-     .               fullname(1:lastblnk(fullname)))
-         if (ix .ne. 0) call oerror(n9,n0,'OUTPUT')
-c	 Print it if it exists
-c
-         if (iout .eq. iprtout) then
-c
-	   if (iprtout .gt. 0) then
-	     open(unit=iprtout, file=fullname,status='old',
-     1            fileopt='eof',iostat = istat)
-	     if (istat .ne. 0) call oerror(n352, m2, cprtout)
-	   else
-	     call oerror(n352, m2, 'Printout file is not available')
-           endif
-c	   Reopen printout file if the output device is the file,
-c	   the file exists, and has a unit number > 0
-c
-	endif
-      else
-	call oerror(n353, m2, cprtout)
-      endif
-c
-      GO TO 1000
-c------------------------------------------------------------------------
-c     TCOPY
-c------------------------------------------------------------------------
-90    continue
-      call tcopy
-      goto 1000
-c-------------------------------------------------------------------------
-c     GCOPY
-c-------------------------------------------------------------------------
-100   continue
-      call gcopy
-      goto 1000
-c-------------------------------------------------------------------------
-c     PAUSE
-c-------------------------------------------------------------------------
-120   continue
-      if (sp .lt. 1) call oerror(n112, m1, 'PAUSE : One needed')
-      xtime = v(sp)
-      sp = sp - 1
-      call zwait(xtime)
-      goto 1000
-c-------------------------------------------------------------------------
-c     ERRON
-c-------------------------------------------------------------------------
-130   continue
-      erron = .true.
-      goto 1000
-c-------------------------------------------------------------------------
-c     ERROFF
-c-------------------------------------------------------------------------
-240   continue
-      erron = .false.
-      errcode = 0
-      goto 1000
-c-------------------------------------------------------------------------
-c    FULLON
-c-------------------------------------------------------------------------
-250   continue
-      pagefull = .true.
-      goto 1000
-c-------------------------------------------------------------------------
-c    FULLOFF
-c-------------------------------------------------------------------------
-260   continue
-      pagefull = .false.
-      goto 1000
-c
-C-------------------------------------------------------------------
-c    Graphon
-c-------------------------------------------------------------------
-270   continue
-      graphon = .true.
-      goto 1000
-c----------------------------------
-c     SETD0
-c----------------------------------
-  141 iptwh2 = 1
-      goto 1209
-c----------------------------------
-c     SETD1
-c----------------------------------
-  142 iptwh2 = 2
-      goto 1209
-c----------------------------------
-c     SETD2
-c----------------------------------
-  143 iptwh2 = 3
-      goto 1209
-c----------------------------------
-c     SETD3
-c----------------------------------
-  144 iptwh2 = 4
-      goto 1209
-c----------------------------------
-c     SETD4
-c----------------------------------
-  145 iptwh2 = 5
-      goto 1209
-c----------------------------------
-c     SETD5
-c----------------------------------
-  146 iptwh2 = 6
-      goto 1209
-c----------------------------------
-c     SETD6
-c----------------------------------
-  147 iptwh2 = 7
-      goto 1209
-c----------------------------------
-c     SETD7
-c----------------------------------
-  148 iptwh2 = 8
-      goto 1209
-c----------------------------------
-c     SETD8
-c----------------------------------
-  149 iptwh2 = 9
-      goto 1209
-c----------------------------------
-c     SETD9
-c----------------------------------
-  150 iptwh2 = 10
-c
- 1209 if (sp .ge. 2) then
-	 value = v(sp)
-         icnum = nint(v(sp-1))
-         sp = sp - 2
-         istop = nint(dtwh(c12spn,iptwh2) + dtwh(c12ni,iptwh2)) -1
-         if (icnum .gt. istop .or. icnum .le. 0) then
-	    call oerror(n245, m2, 'D0/D9')
-         else
-            twh(idatoff+icnum,iptwh2) = value
-         endif
-      else
-         call oerror(n112, m1, 'D0/D9: Two needed')
-      endif
-      goto 1000
-c----------------------------------
-c     SETH0
-c----------------------------------
-  151 iptwh2 = 1
-      goto 1239
-c----------------------------------
-c     SETH1
-c----------------------------------
-  152 iptwh2 = 2
-      goto 1239
-c----------------------------------
-c     SETH2
-c----------------------------------
-  153 iptwh2 = 3
-      goto 1239
-c----------------------------------
-c     SETH3
-c----------------------------------
-  154 iptwh2 = 4
-      goto 1239
-c----------------------------------
-c     SETH4
-c----------------------------------
-  155 iptwh2 = 5
-      goto 1239
-c----------------------------------
-c     SETH5
-c----------------------------------
-  156 iptwh2 = 6
-      goto 1239
-c----------------------------------
-c     SETH6
-c----------------------------------
-  157 iptwh2 = 7
-      goto 1239
-c----------------------------------
-c     SETH7
-c----------------------------------
-  158 iptwh2 = 8
-      goto 1239
-c----------------------------------
-c     SETH8
-c----------------------------------
-  159 iptwh2 = 9
-      goto 1239
-c----------------------------------
-c     SETH9
-c----------------------------------
-  160 iptwh2 = 10
-c
- 1239 if (sp .ge. 5 .and. stack(sp) .eq. 3) then
-c
-c	String header parametr
-c
-         itag = stack(sp-1)
-         itype = stack(sp-3)
-         if (itype .eq. 14) then
-            isize = irealp(stack(sp-2))
-         else if (itype .eq. 7) then
-            isize = stack(sp-2)
-         else 
-            call oerror(n112, m1, 'H0/H9: Bad arguments')
-         endif
-c	Get the correct isize which depends if its a literal or variable.
-c	Check to make sure that it is a literal or string variables (types
-c	7 and 14).
-c
-         i1 = nint(v(sp-4))
-         sp = sp - 5
-c       i1 = the location in DTWH in which the user wants to change the
-c       header word
-c
-         if (i1 .le. 0 .or. i1 .gt. idatoff/2) call oerror(n245, m2,
-     .		'H0/H9')
-c
-         string = .false.
-         do 1238 i = 1, numastrings
-            if (i1 .eq. astrings(i)) string = .true.
- 1238    continue
-c			deal with special cases, class 9 and 11
-         if (i1 .eq. c9cff .and. dtwh(c1tel,iptwh2) .ne. nrao140 .and.
-     .		dtwh(c1tel,iptwh2) .ne. nrao300) string = .false.		
-         if (i1 .gt. c11ovv(1) .and. i1 .lt. c12fr .and. string) then
-            string = .false.
-            if (dtwh(c3typ11,iptwh2) .eq. proto12m) then
-               do 1240 i = 1, 10
-                  if (i1 .eq. c11pvd(i) .or. i1 .eq. c11ppt(i)) 
-     .                        string = .true.
- 1240          continue
-            else
-               do 1241 i = 1, 22
-                  if (i1 .eq. c11ovd(i) .or. i1 .eq. c11opt(i))
-     .                        string = .true.
- 1241          continue
-            endif
-         endif
-c
-         if (.not. string) 
-     .		call oerror(n245, m2, 'H0/H9: String header word')
-c	Make sure we are trying to set a string header parameter.
-c
-         if (i1 .eq. c1ona .or. i1 .eq. c1sna .or.
-     .       i1 .eq. c12rxi) then
-            inum4 = 4
-          else if (i1 .eq. c9cff) then
-            inum4 = 6
-         else
-            inum4 = 2
-            do 1242 i = 1, 10
-               if (i1 .eq. c11ppt(i)) inum4 = 8
- 1242       continue
-	 endif
-c	INUM4 = the maximum number of R*4 words which can be stored in 
-c	header words
-c
-         if (isize .gt. inum4) call oerror(n114, m1, 
-     .		'H0/H9: Too many characters')
-c 	Header words can only hold inum4 R*4 words
-c
-         i1 = (i1-1)*4 + 1
-         call copy(iwpr(isize), c(itag), itwh(i1, iptwh2) )
-         if (inum4 .gt. isize) call fill(iwpr(fshort(inum4-isize)),
-     1         blank, itwh(i1+iwpr(isize),iptwh2) )
-c	Copy over the header words; fill the rest of the header word
-c	with blanks
-c
-      else if (sp .ge. 2) then
-c
-c	Real value header parametr
-c
-         value = v(sp)
-         i1 = nint(v(sp-1))
-         sp = sp - 2
-c       i1 = the location in DTWH in which the user wants to change the
-c       header word
-c
-         if (i1 .le. 0 .or. i1 .gt. idatoff/2) call oerror(n245, m2,
-     .		'H0/H9')
-c
-         string = .false.
-         do 1237 i = 1, numastrings
-            if (i1 .eq. astrings(i)) string = .true.
- 1237    continue
-c			deal with special cases, class 9 and 11
-         if (i1 .eq. c9cff .and. dtwh(c1tel,iptwh2) .ne. nrao140 .and.
-     .		dtwh(c1tel,iptwh2) .ne. nrao300) string = .false.		
-         if (string .and. i1 .gt. c11ovv(1) .and. i1 .lt. c12cf) then
-            string = .false.
-            if (dtwh(c3typ11,iptwh2) .eq. proto12m) then
-               do 1243 i = 1, 10
-                  if (i1 .eq. c11pvd(i) .or. i1 .eq. c11ppt(i)) 
-     .                       string = .true.
- 1243          continue
-            else
-               do 1244 i = 1, 22
-                  if (i1 .eq. c11ovd(i) .and. i1 .eq. c11opt(i))
-     .                       string = .true.
- 1244          continue
-            endif
-         endif
-c
-         if (string)
-     .	     call oerror(n245, m2, 'H0/H9: Real-Value header word')
-c	Make sure we are trying to set a real-value header parameter.
-c
-         if (i1 .eq. c12ni) then
-            if (value .lt. 0 .or.
-     .          value + dtwh(c12spn,iptwh2) - 1 .gt. MAX_DATA_POINTS)
-     .        call oerror(n266, m2, 'H0/H9')
-         else if (i1 .eq. c12spn) then
-            if (value .lt. 1 .or.
-     .          dtwh(c12ni,iptwh2) + value - 1 .gt. MAX_DATA_POINTS)
-     .        call oerror(n266, m2, 'H0/H9')
-         endif
-c		make sure array limit can't be exceeded
-         dtwh(i1,iptwh2) = value
-c
-      else
-c
-         call oerror(n112, m1, 'H0/H9: Two needed')
-c
-      endif
-      goto 1000
-c
-c-------------------------------------------------------------------
-c    LOGON
-c-------------------------------------------------------------------
-280   continue
-c
-      if (ilogout .gt. 0) then
-        call filecomp(clogout, fullname)
-        if (.not. opened(fullname)) then
-	   open(unit=ilogout, file=fullname, 
-     1		     status='unknown', fileopt = 'eof', iostat=istat)
-     	   if (istat .ne. 0) call oerror(n352, m2, clogout)
-	endif
-	if (.not. dolog) then
-	   dolog = .true.
-	   write(ilogout, 1030, iostat=istat)'# Command logging ON -- ', 
-     .				zdatetime()
- 1030 	   format(2a)
-           if (istat .ne. 0) call oerror(n355, m2, clogout)
-        endif
-      else
-	call oerror(n354, m2, clogout)
-      endif
-      goto 1000
-c-------------------------------------------------------------------
-c    LOGOFF
-c-------------------------------------------------------------------
-290   continue
-c
-      call filecomp(clogout, fullname)
-      if (opened(fullname)) then
-	if (dolog) write(ilogout, 1030, iostat=istat)
-     .		'# Command logging OFF -- ', zdatetime()
-	close(unit=abs(ilogout),iostat=istat)
-        if (istat .ne. 0) call oerror(n356, m2, clogout)
-      endif
-      dolog = .false.
-      goto 1000
-c-------------------------------------------------------------------
-c    UNDOON
-c-------------------------------------------------------------------
-291   continue
-      undoon = .true.
-      goto 1000
-c-------------------------------------------------------------------
-c    UNDOOFF
-c-------------------------------------------------------------------
-292   continue
-      undoon = .false.
-      goto 1000
-c-------------------------------------------------------------------
-c    AMATHON
-c-------------------------------------------------------------------
-293   continue
-      if (amath) call oerror(n133, m1, '')
-      amath = .true.
-      goto 1000
-c-------------------------------------------------------------------
-c    AMATHOFF
-c-------------------------------------------------------------------
-294   continue
-      amath = .false.
-      goto 1000
-c-------------------------------------------------------------------
-c    Z_SYSTEM
-c-------------------------------------------------------------------
-310   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'Z_SYSTEM')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'Z_SYSTEM')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'Z_SYSTEM')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      string1 = ' '
-      do 311 i = 1, isize
-	rstring1(i) = c(loc+i-1)
-311	continue
-c
-      sp = sp - 4
-c
-      irtn = system(string1(1:lastblnk(string1)))
-      if (irtn .ne. 0) call oerror(n9,n0,'Z_SYSTEM')
-c
-      goto 1000
-c
-c-------------------------------------------------------------------
-c    Z_CHNGFIL
-c-------------------------------------------------------------------
-320   continue
-      if (sp .lt. 9) call oerror(n112, m1, 'Z_CHNGFIL')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'Z_CHNGFIL')
-      if (stack(sp-5) .ne. 3) call oerror(n112, m1, 'Z_CHNGFIL')
-c
-c     First string first
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'Z_CHNGFIL')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      string1 = ' '
-      do 321 i = 1, isize
-	rstring1(i) = c(loc+i-1)
-321	continue
-c
-c     Now for file type
-c
-      inum = nint(v(sp-4))
-c
-c     Now for 2nd string
-c
-      LOC=STACK(SP-6)
-      itype = stack(sp-8)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-7))
-      else if (itype .eq. 7) then
-	isize = stack(sp-7)
-      else 
-	call oerror(n112, m1, 'Z_CHNGFIL')
-      endif
-      string2 = ' '
-      do 322 i = 1, isize
-	rstring2(i) = c(loc+i-1)
-322	continue
-c
-      sp = sp - 9
-c
-      string3 = ' '
-      i1 = lastblnk(string2)
-      call uppercase(string2(1:i1), string3)
-c
-      if (string3 .eq. 'C') then
-            call oerror(n31, m1, 'Z_CHNGFIL:  Ambiguous symbol')
-      else if (index("CHANGE", string3(1:i1)) .eq. 1) then
-	    string3 = "CHANGE"
-      else if (index("SUBTRACT", string3(1:i1)) .eq. 1) then		
-	    string3 = "SUBTRACT"
-      else if (index("CREATE", string3(1:i1)) .eq. 1) then		
-	    string3 = "CREATE"
-      else 
-            call oerror(n31, m1, 'Z_CHNGFIL')
-      endif
-c
-      irtn = chngfile(string3(1:lastblnk(string3)), inum, 
-     .		string1(1:lastblnk(string1)))
-      if (irtn .ne. 0) call oerror(n31, m1, 'Z_CHNGFIL')
-c
-      goto 1000
-c
-c-------------------------------------------------------------------
-c    Z_BATCH
-c-------------------------------------------------------------------
-330   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'Z_BATCH')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'Z_BATCH')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'Z_BATCH')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      string1 = ' '
-      do 331 i = 1, isize
-	rstring1(i) = c(loc+i-1)
-331	continue
-c
-      sp = sp - 4
-c
-      call batch(string1(1:lastblnk(string1)))
-c
-      goto 1000
-c
-c-------------------------------------------------------------------
-c    COPYON
-c-------------------------------------------------------------------
-340   continue
-      iprinttype = abs(iprinttype)
-      goto 1000
-c-------------------------------------------------------------------
-c    COPYOFF
-c-------------------------------------------------------------------
-350   continue
-      iprinttype = -abs(iprinttype)
-      goto 1000
-c-------------------------------------------------------------------
-c    FREWIND
-c-------------------------------------------------------------------
-352   continue
-c
-      iunit = nint(v(sp))
-      sp = sp - 1
-      if (iunit .le. 0) call oerror(n370, m1, 'FREWIND')
-c
-      do 3521 i = 1, nfiles
-	if (iunit .eq. ffile(i,1) ) goto 3522
-3521	continue
-      call oerror(n370, m1, 'FREWIND')
-c
-3522  rewind(iunit,iostat=ier)
-      if (ier .ne. 0) call oerror(n372, m1, 'FREWIND')
-c
-      goto 1000
-c-------------------------------------------------------------------
-c    FCLOSE
-c-------------------------------------------------------------------
-353   continue
-c
-      iunit = nint(v(sp))
-      sp = sp - 1
-      if (iunit .le. 0) call oerror(n370, m1, 'FCLOSE')
-c
-      do 3531 i = 1, nfiles
-	if (iunit .eq. ffile(i,1) ) goto 3532
-3531	continue
-      call oerror(n370, m1, 'FCLOSE')
-c
-3532  close(iunit,iostat=ier)
-      if (ier .ne. 0) call oerror(n372, m1, 'FCLOSE')
-      call ioput(iunit)
-      ffile(i,1) = 0
-      cfile(i) = ' '
-c
-      goto 1000
-c-------------------------------------------------------------------
-c    FSTATUS
-c-------------------------------------------------------------------
-354   continue
-c
-      okfile = .false.
-      do 3543 i = 1, nfiles
-	if (ffile(i,1) .gt. 0) then
-	    okfile = .true.
-	    write(stch,fmt="(a,a)",iostat=ier) 'File name = ',
-     .		cfile(i)(1:max(1,lastblnk(cfile(i))))
-	    call pwrite(stch, n72)
-	    write(stch,fmt="(a,i3,a,a)",iostat=ier) 'Unit = ', 
-     .		ffile(i,1), '     Access = ', access(ffile(i,2)) 
-	    call pwrite(stch, n72)
-	    write(stch,fmt="(4a)",iostat=ier) 'Init. Pos. = ', 
-     .			position(ffile(i,3)), 
-     .			' Existence = ', existence(ffile(i,4))
-	    call pwrite(stch, n72)
-	    write(stch,fmt="(a)",iostat=ier) ' '
-	    call pwrite(stch, n72)
-	endif
-3543	continue
-c
-      if (.not. okfile) then
-	write(stch,fmt="(a)") 'No files opened'
-	call pwrite(stch, n72)
-      endif
-c
-      goto 1000
-c-------------------------------------------------------------------
-c    PRNTFMT
-c-------------------------------------------------------------------
-355   continue
-c
-      if (sp .lt. 4) call oerror(n112, m1, 'PRNTFMT')
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'PRNTFMT')
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	isize = stack(sp-2)
-      else 
-	call oerror(n112, m1, 'PRNTFMT')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      string1 = ' '
-      do 3551 i = 1, isize
-	rstring1(i) = c(loc+i-1)
-3551	continue
-c
-      sp = sp - 4
-c
-      i = min(14,lastblnk(string1))
-      if (i .ne. 0) then
-	if (.not. fptfmt(string1(1:i)) ) call oerror(n373, m1, 'PRNTFMT')
-	string1 = '(' // string1(1:i) // ')'
-        testvalue = 1.0
-        write(string2, string1, iostat=ier) testvalue
-        if (ier .ne. 0 .or. index(string2,'*') .ne. 0) 
-     .		call oerror(n373, m1, 'PRNTFMT')
-        read(string2, '(f60.0)', iostat=ier) testvalue
-        if (ier .ne. 0 .or. testvalue .ne. 1.0) 
-     .		call oerror(n373, m1, 'PRNTFMT')
-        prntfmt = string1
-      else
-	prntfmt = '(1PG15.7.2)'
-      endif
-c
-      goto 1000
-c-------------------------------------------------------------------------
-c     FONTSET
-c-------------------------------------------------------------------------
-356   continue
-c
-      if (sp .lt. 2) call oerror(n112, m1, 'FONTSET : One needed')
-c
-      ispace = nint(v(sp))
-      ifont = nint(v(sp-1))
-      sp = sp - 2
-c
-      if (ispace .gt. 0) then
-	call fset(ifont, .true.)
-      else
-	call fset(ifont, .false.)
-      endif
-c
-      goto 1000
-c
-c-------------------------------------------------------------------------
-c     VCHAR
-c-------------------------------------------------------------------------
-357   continue
-c
-      if (sp .lt. 5) call oerror(n112, m1, 'VCHAR')
-c
-      ispace = nint(v(sp))
-      sp = sp - 1
-c     Get the spacing designation.
-c
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'VCHAR')
-c     Make sure we have a array, string, or literal on the stack
-c
-      LOC=STACK(SP-1)
-      itype = stack(sp-3)
-      if  (itype .eq. 14) then
-	jcnt = 4*irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-	jcnt = 4*stack(sp-2)
-      else 
-	call oerror(n112, m1, 'VCHAR')
-      endif
-c     Get the correct isize which depends if its a literal or variable.
-c     Check to make sure that it is a literal or string variables (types
-c     7 and 14).
-c
-      SP=SP-4
-c
-      if (sclchar .ne. 1.) call charsize(sclchar)
-      if (ispace .gt. 0) then
-	CALL VCHAR (c(LOC),jcnt,.true.)
-      else
-	CALL VCHAR (c(LOC),jcnt,.false.)
-      endif
-      if (sclchar .ne. 1.) call charsize(1.)
-c
-      GO TO 1000
-c
-C---------------------------------------------------------------------
-C					D E B U	G  <true/false>.
-C---------------------------------------------------------------------
- 351  if (sp .lt. 1) call oerror(n112, m1, 'DEBUG')
-      if (v(sp) .gt. 0) then
-	IDEBUG = 1
-      else
-	idebug = -1
-      endif
-      sp = sp - 1
-      GO TO 1000
-c-------------------------------------------------------------------
-c    SETASTACK
-c-------------------------------------------------------------------
-295   continue
-      if (sp .ge. 2) then
-	 value = v(sp)
-  	 i1 = nint(v(sp-1))
-	 sp = sp - 2
-         if (i1 .le. 0 .or. i1 .gt. maxstck) then
-	    call oerror(n112, m1, 'ASTACK')
-c	    Location of  word must be within the correct range
-c
-         else
-            astack(i1) = value
-         endif
-      else
-         call oerror(n112, m1, 'ASTACK: One needed')
-      endif
-      goto 1000
-c-------------------------------------------------------------------
-c    SETMD0
-c-------------------------------------------------------------------
-410   continue
-      iptwh2 = 1
-      goto 419
-c-------------------------------------------------------------------
-c    SETMD1
-c-------------------------------------------------------------------
-411   continue
-      iptwh2 = 2
-      goto 419
-c-------------------------------------------------------------------
-c    SETMD2
-c-------------------------------------------------------------------
-412   continue
-      iptwh2 = 3
-      goto 419
-c-------------------------------------------------------------------
-c    SETMD3
-c-------------------------------------------------------------------
-413   continue
-      iptwh2 = 4
-c
-419   if (sp .ge. 3) then
-	 value = v(sp)
-  	 i2 = nint(v(sp-1))
-  	 i1 = nint(v(sp-2))
-         sp = sp - 3
-         if (i1 .le. 0 .or. i1 .gt. mhead(mnaxis1,iptwh2)) then
-	    call oerror(n245, m2, 'MD0/D9')
-         else if (i2 .le. 0 .or. i2 .gt. mhead(mnaxis2,iptwh2)) then
-	    call oerror(n245, m2, 'MD0/D9')
-	 else
-            mdata(ilct(i1,i2,iptwh2)) = value
-         endif
-      else
-         call oerror(n112, m1, 'MD0/D9: Three needed')
-      endif
-      goto 1000
-c
-c-------------------------------------------------------------------
-c    SETMH0
-c-------------------------------------------------------------------
-420   continue
-      iptwh2 = 1
-      goto 429
-c-------------------------------------------------------------------
-c    SETMH1
-c-------------------------------------------------------------------
-421   continue
-      iptwh2 = 2
-      goto 429
-c-------------------------------------------------------------------
-c    SETMH2
-c-------------------------------------------------------------------
-422   continue
-      iptwh2 = 3
-      goto 429
-c-------------------------------------------------------------------
-c    SETMH3
-c-------------------------------------------------------------------
-423   continue
-      iptwh2 = 4
-c
-429   if (sp .ge. 5 .and. stack(sp) .eq. 3) then
-c
-c	String header parametr
-c
-	itag = stack(sp-1)
-	itype = stack(sp-3)
-	if  (itype .eq. 14) then
-	  isize = irealp(stack(sp-2))
-	else if (itype .eq. 7) then
-	  isize = stack(sp-2)
- 	else 
-	  call oerror(n112, m1, 'MH0/H3: Bad arguments')
-	endif
-c	Get the correct isize which depends if its a literal or variable.
-c	Check to make sure that it is a literal or string variables (types
-c	7 and 14).
-c
-  	i1 = nint(v(sp-4))
-	sp = sp - 5
-c       i1 = the location in DTWH in which the user wants to change the
-c       header word
-c
-	if (i1 .le. 0 .or. i1 .gt. mheadsize) call oerror(n245, m2, 
-     .		'MH0/H3')
-c
-        if (i1 .lt. mstrings) 
-     .		call oerror(n245, m2, 'MH0/MH3: String header word')
-c	Make sure we are trying to set a string header parameter.
-c
-	if (i1 .eq. mcomment) then
-	  inum4 = 2*min(7,(mheadsize-mcomment+1))
-        else if (i1 .eq. mobject) then
-          inum4 = 4
-	else
-	  inum4 = 2
-	endif
-c	INUM4 = the maximum number of R*2 words which can be stored in 
-c	header words
-c
-        if (i1 .ne. mdate) then
-           if (isize .gt. inum4) call oerror(n114, m1, 
-     .		'MH0/H3: Too many characters')
-c     Header words can only hold inum4 R*4 words
-c
-           i1 = (i1-1)*4 + 1
-           call copy(iwpr(isize), c(itag), imhead(i1, iptwh2) )
-           if (inum4 .gt. isize) call fill(iwpr(fshort(inum4-isize)),
-     1          blank, imhead(i1+iwpr(isize),iptwh2) )
-c     Copy over the header words; fill the rest of the header word
-c     with blanks
-        else
-c                  The DATE header word is handled as a string
-c                  but actually stored as a double
-           nchars = isize*4
-           call todate(isize, c(itag), ddate, l0)
-c                  watch for problems, which are signaled by ddate < 0
-           if (ddate .lt. 0.0) call oerror(n301, m1, 'MH0/H3')
-           mhead(i1, iptwh2) = ddate
-        endif
-c
-      else if (sp .ge. 2) then
-c
-c	Real value header parametr
-c
-	value = v(sp)
-  	i1 = nint(v(sp-1))
-        sp = sp - 2
-c       i1 = the location in DTWH in which the user wants to change the
-c       header word
-c
-	if (i1 .le. 0 .or. i1 .gt. mheadsize) call oerror(n245, m1, 
-     .		'MH0/H3')
-c
-        if (i1 .ge. mstrings .and. i1 .le. mheadsize) 
-     .	     call oerror(n245, m1, 'MH0/H3: Real-Value header word')
-c	Make sure we are trying to set a real-value header parameter.
-c
-        mhead(i1,iptwh2) = value
-c
-      else
-c
-         call oerror(n112, m1, 'MH0/H3: Two needed')
-c
-      endif
-      goto 1000
-c
-C----------------------------------------------------------------------
-C                   NOP   
-C----------------------------------------------------------------------
-1000  LFLAG=2
-      RETURN
-      END
-c
diff -uNr 3.5/source/conline/getformat.f unipops-3.6/source/conline/getformat.f
--- 3.5/source/conline/getformat.f	2000-03-16 11:33:01.000000000 -0700
+++ unipops-3.6/source/conline/getformat.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,96 +0,0 @@
-      character*10 function getformat(f1, f2, nchar)
-c
-c------------------------------------------------
-c @(#)getformat.f	5.1 06/22/94
-c------------------------------------------------
-c  
-c     Calculates a suggested format for tick mark labels.
-c     F1, F2 = (R*4) limits of the plot
-c     NCHAR = (I*2) Maximum number of chars for format
-c
-      real f1, f2, r2, r1, g1
-      integer*2 ifrac, nchar, ileft, ierr, iman, iman1, iman2
-      character*10 fmtout
-c
-      r1 = min(f1,f2)
-      r2 = max(f1,f2)
-c
-      if (r1 .eq. r2) then
-	if (r1 .gt. 0.0) then
-	   r2 = 1.1 * r1
-	else if (r1 .lt. 0.0) then
-	   r1 = 1.1 * r2
-	else
-	   r1 = -1.0
-	   r2 = 1.0
-	endif
-      endif
-c
-      if (r1 .eq. 0.0) r1 = -0.5*r2
-      if (r2 .eq. 0.0) r2 = -0.5*r1
-c
-      ileft = nchar - 1
-      if (r1 .lt. 0.) ileft = ileft - 1
-c     Reserve a spot for decimal point and negative sign, if needed.
-c
-      iman1 = int(alog10(abs(r1)))
-      iman2 = int(alog10(abs(r2)))
-      if (abs(iman1) .gt. abs(iman2) ) then
-	iman = iman1
-      else
-	iman = iman2
-      endif
-      if (iman .lt. 0) then
-	iman = iman - 1
-      else
-	iman = iman + 1
-      endif
-c
-      if (iman .gt. ileft .or. iman .le. -ileft) then
-c       The number can only be represented by an E format
-c
-	if (r2+r1 .ne. 0. .and. r2-r1 .ne. 0.) then
-	   ifrac = max(0, min(ileft-5,
-     1              int(1+abs(alog10(abs( (r2+r1)/(r2-r1) ) ) ) ) ) )
-	else
-	   ifrac = 0
-	endif
-	if (nchar .lt. 10 .and. ifrac .lt. 10) then
-	   write(fmtout,20,iostat=ierr) nchar, ifrac
-20	   format( '(1PE', i1, '.', i1, ')' )
-	else if (nchar .ge. 10 .and. ifrac .lt. 10) then
-	   write(fmtout,21,iostat=ierr) nchar, ifrac
-21	   format( '(1PE', i2, '.', i1, ')' )
-	else
-	   write(fmtout,22,iostat=ierr) nchar, ifrac
-22	   format( '(1PE', i2, '.', i2, ')' )
-        endif
-c
-      else
-c	The number can be represented with an F format
-c
-	g1 = mod(abs(r2-r1),1.)
-	if (g1 .ne. 0. .and. g1 .gt. 10.**(-7+iman) ) then
-	   ifrac = min(ileft-iman, max(0, int(abs(alog10(g1))+2.) ) )
-	else
-	   ifrac = 0
-	endif
-	if (nchar .lt. 10 .and. ifrac .lt. 10) then
-	   write(fmtout,30,iostat=ierr) nchar, ifrac
-30	   format( '(F', i1, '.', i1, ')' )
-	else if (nchar .ge. 10 .and. ifrac .lt. 10) then
-	   write(fmtout,31,iostat=ierr) nchar, ifrac
-31	   format( '(F', i2, '.', i1, ')' )
-	else
-	   write(fmtout,32,iostat=ierr) nchar, ifrac
-32	   format( '(F', i2, '.', i2, ')' )
-        endif
-      endif        
-c
-      getformat = fmtout
-c
-      return
-c
-      end
-c
-      
diff -uNr 3.5/source/conline/getprel.f unipops-3.6/source/conline/getprel.f
--- 3.5/source/conline/getprel.f	2000-03-16 11:33:01.000000000 -0700
+++ unipops-3.6/source/conline/getprel.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,78 +0,0 @@
-      subroutine getprel(line,printer,ptype,pcmd,tfmt,pcmnt)
-c-----------------------------------------------------------------------------
-c @(#)getprel.f	5.1 06/22/94
-c
-c   get the printer elements from line
-c-----------------------------------------------------------------------------
-      character*(*) line, printer, ptype, pcmd, tfmt, pcmnt
-      integer*4 llen, i, lplace
-c
-      if (line(1:1) .eq. '#') then
-c			ignore this line, return all blanks
-         do 100 i = 1, len(printer)
- 100        printer(i:i) = ' '
-         do 105 i = 1, len(ptype)
- 105        ptype(i:i) = ' '
-         do 110 i = 1, len(pcmd)
- 110        ptype(i:i) = ' '
-         do 115 i = 1, len(tfmt)
- 115        tfmt(i:i) = ' '
-         do 120 i = 1, len(pcmd)
- 120        pcmd(i:i) = ' '
-c
-      else
-         lplace = 1
-         call decodeit(line,printer,lplace)
-         call decodeit(line,ptype,lplace)
-         call decodeit(line,pcmd,lplace)
-         call decodeit(line,tfmt,lplace)
-c			Everything at this point is a comment
-         llen = len(line)
-         do 200 i = 1, len(pcmnt)
-            if (lplace+i-1 .gt. llen) then
-               pcmnt(i:i) = ' '
-            else
-               pcmnt(i:i) = line(lplace+i-1:lplace+i-1)
-            endif
- 200     continue
-c
-      endif
-c
-      return
-      end
-c
-      subroutine decodeit(bigstr,element,place)
-c
-      character*(*) bigstr, element
-      character*1 colon
-      integer*4 place, i, biglen
-      logical foundcol
-c
-      data colon /':'/
-c
-      biglen = len(bigstr)
-      foundcol = .false.
-      do 100 i = 1, len(element)
-         if (foundcol .or. place .gt. biglen) then
-            element(i:i) = ' '
-         else
-            if (bigstr(place:place) .eq. colon) then
-               foundcol = .true.
-               element(i:i) = ' '
-               place = place + 1
-            else
-               element(i:i) = bigstr(place:place)
-               place = place + 1
-            endif
-         endif
- 100  continue
-c
-      if (.not.foundcol .and. place .le. biglen) then
-         do 110 i = place, biglen
-            if (bigstr(i:i) .eq. colon) goto 120
- 110     continue
- 120     place = i + 1
-      endif
-c
-      return
-      end
diff -uNr 3.5/source/conline/gpclose.f unipops-3.6/source/conline/gpclose.f
--- 3.5/source/conline/gpclose.f	2000-03-16 11:33:02.000000000 -0700
+++ unipops-3.6/source/conline/gpclose.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine gpclose
-C-------------------------------------------------------------------------------
-C  @(#)gpclose.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Closes down graphics screens and text screens
-c***************************************
-c 8904 [RJM
-c***************************************
-c
-      include 'cio.inc'
-c
-      if (igraphtype .eq. 4) then
-	call v102close
-      else if (igraphtype .eq. 3) then
-	call tekclose
-      else if (igraphtype .eq. 2) then
-	call coreclose
-      else 
-	call nogclose
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/gpflush.f unipops-3.6/source/conline/gpflush.f
--- 3.5/source/conline/gpflush.f	2000-03-16 11:33:02.000000000 -0700
+++ unipops-3.6/source/conline/gpflush.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,13 +0,0 @@
-      subroutine gpflush
-c
-c     @(#)gpflush.f	5.1 06/22/94
-c
-c     Flushes out any pending graphics commands
-c
-      include 'cio.inc'
-c
-      if (igraphtype .eq. 2) call coreflush
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/gphint.f unipops-3.6/source/conline/gphint.f
--- 3.5/source/conline/gphint.f	2000-03-16 11:33:02.000000000 -0700
+++ unipops-3.6/source/conline/gphint.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,229 +0,0 @@
-      subroutine gphint
-C-------------------------------------------------------------------------------
-C  @(#)gphint.f	5.3 03/02/95
-C-------------------------------------------------------------------------------
-c
-c     Sets up graphics and output devices
-c
-      integer*2 getenv, irtn, lastblnk, iptemp
-      integer*4 long, i, ilist(100), istat, itmp
-      character*1 colon, dummy1, dummy2
-      character*64 pcomment
-      character*1024 pline, popsdir, printfile, tprinter
-      logical first, popened
-c
-      save first
-c
-      include 'cio.inc'
-c
-      data first /.true./
-      data colon /':'/
-c
-      if (first) then
-         first = .false.
-         irtn = getenv('DISPLAY',termtype)
-         if (lastblnk(termtype) .ne. 0) then
-c			This must be an X terminal
-            termtype = 'xwindow'
-            igraphtype = 2
-         else
-            irtn = getenv('TERM',termtype)
-            if (termtype(1:4) .eq. '4014') then
-               termtype = 'tek4014'
-            else if(termtype(1:3) .eq. 'sun') then
-               irtn = getenv('WINDOW_PARENT', termtype)
-            endif
-c
-            if (termtype(1:7) .eq. 'tek4014') then
-               igraphtype = 3
-            else if(termtype(1:8) .eq. '/dev/win') then
-               igraphtype = 2
-            endif
-         endif
-c
- 1       if (igraphtype .eq. 0 .or. igraphtype .eq. 1) then
- 105        write(istdout,10) ' '
-            write(istdout,10) 
-     .              'The following Graphics devices are supported:'
-            write(istdout,10) '1: None (Non-graphics terminal)'
-            write(istdout,10) '2: SUN workstation (POPSTOOL)'
-            write(istdout,10) '3: TEK4010 or emulation'
-            write(istdout,10) '4: Retrographics-like board'
-            write(istdout,10) 'X-Windows is available, however, the'
-            write(istdout,10) 'DISPLAY environment variable MUST be set'
-            write(istdout,10) 'before starting this program.  When'
-            write(istdout,10) 'DISPLAY is set, X-Windows is assumed.'
-            write(istdout,10) ' '
-            write(istdout,10) 
-     .               'Enter <cr> to use default or number to change'
-            write(istdout,12) 'GRAPHICS DEVICE (DEFAULT:1) '
- 10   format(1x,a)
- 12   format(1x,a,$)
-            call flush(long(istdout))
-            read(istdin,11,err=1) igraphtype
-	    if (igraphtype .ge. 5) goto 105
- 11   format(i1)
-         endif
-c
-         if (igraphtype .eq. 5) then
-            igraphtype = 2
-            termtype = 'xwindow'
-            call coreint
-         else if (igraphtype .eq. 4) then
-            call v102int
-         else if (igraphtype .eq. 3) then
-            call tekint
-         else if (igraphtype .eq. 2) then
-            call coreint
-         else if (igraphtype .eq. 1 .or. igraphtype .eq. 0) then
-            call nogint
-         else 
-            goto 1
-         endif
-c
-         call clrpage
-c
-         irtn = getenv('popsprinter', printer)
-         irtn = getenv('popsdir',popsdir)
-c			use ioutgrph as the unit for IO to the printer
-c			file, it should be safe since it isn't used until
-c			this is settled
-         iptemp = 0
-         printfile = popsdir(1:lastblnk(popsdir)) // 'sunbin/' 
-     .                   // 'printers'
-         popened = .false.
-         open(unit=ioutgrph,file=printfile(1:lastblnk(printfile)),
-     .        status='old',iostat=istat)
-         if (istat .eq. 0) popened = .true.
-         if (popened .and. lastblnk(printer) .ne. 0) then
-            printtype = ' '
- 100        read(unit=ioutgrph,fmt='(a)',end=200,iostat=istat) pline
-            if (istat.eq.0) then
-               call getprel(pline,tprinter,printtype,
-     .                            dummy1,dummy2,pcomment)
- 115           if (tprinter(1:lastblnk(tprinter)) .ne.
-     .              printer(1:lastblnk(printer))) goto 100
-c				we only get here if we've matched printer
-c				Ok, does printtype make sense?
-               if (printtype(1:10) .eq. 'postscript') then
-                  iptemp = 3
-               else if (printtype(1:3) .eq. 'qms') then
-                  iptemp = 2
-               else if (printtype(1:4) .eq. 'hpgl') then
-                  iptemp = 4
-               else if (printtype(1:4) .eq. 'quic') then
-                  iptemp = 5
-               else if (printtype(1:4) .eq. 'text') then
-                  iptemp = 1
-               else
-                  goto 100
-               endif
-            endif
-         endif
-c
- 200     continue
-         if (iptemp .eq. 0 .and. popened) then
- 2          rewind(unit=ioutgrph,iostat=istat)
-            write(istdout,10) ' '
-            write(istdout,10) 
-     .               'The following Hardcopy devices are supported:'
-            itmp = 1
-            write(istdout,13) itmp,': None (Non-graphics printer)'
- 13         format(x,i2,a)
-c
-            do 205 i = 1, 1000
-               read(unit=ioutgrph,fmt='(a)',end=300,
-     .                 iostat=istat) pline
-               if (istat .ne. 0) go to 300
-               call getprel(pline,tprinter,printtype,
-     .                   dummy1,dummy2,pcomment)
-               if (lastblnk(tprinter).eq.0) goto 205
-               if (tprinter .eq. "none") goto 205
-               itmp = itmp + 1
-               ilist(itmp) = i
-               write(istdout,14) itmp,
-     .                        (tprinter(1:lastblnk(tprinter))),
-     .                        (pcomment(1:lastblnk(pcomment)))
- 14            format(x,i2,': ',a,x,'(',a,')')
- 205        continue
-c
- 300        write(istdout,10) ' '
-            write(istdout,10) 
-     .               'Enter <cr> to use default or number to change'
-            write(istdout,12) 'HARDCOPY DEVICE (DEFAULT:1) '
-            call flush(long(istdout))
-            read(istdin,11,err=2) iptemp
-	    if (iptemp .eq. 0) then
-		iptemp = 1
-	    else if (iptemp .lt. 0 .or. iptemp .gt. itmp) then
-		goto 2
-	    endif
-            if (iptemp .gt. 1) then
-               itmp = iptemp
-               iptemp = 0
-               rewind(unit=ioutgrph,iostat=istat)
-               do 305 i = 1, ilist(itmp)
-                  read(unit=ioutgrph,fmt='(a)',end=400,
-     .                    iostat=istat) pline
-                  if (istat .ne. 0) goto 400
- 305           continue
-               call getprel(pline,tprinter,printtype,
-     .                    dummy1,dummy2,pcomment)
-               if (lastblnk(tprinter).eq.0) goto 400
-               printer = tprinter
-               if (printtype(1:10) .eq. 'postscript') then
-                  iptemp = 3
-               else if (printtype(1:3) .eq. 'qms') then
-                  iptemp = 2
-               else if (printtype(1:4) .eq. 'hpgl') then
-                  iptemp = 4
-               else if (printtype(1:4) .eq. 'quic') then
-                  iptemp = 5
-               else
-                  goto 400
-               endif
-            else
-               printer = 'none'
-               printtype = 'text'
-            endif
-         endif
-c			something is wrong in the printers file if we get here
-c			and iptemp = 0
- 400     if (iptemp .eq. 0) then
-            write(istdout,10) ' '
-            write(istdout,10) 
-     .          ' WARNING: printers file does not exists or is corrupt.'
-            write(istdout,10) 
-     .          ' Consult your local unipops guru for help.'
-            write(istdout,10) ' A non-graphics printer will be assumed.'
-            write(istdout,10) ' '
-            printer = 'none'
-            printtype = 'text'
-            iptemp = 1
-         endif
-c
-         if (popened) close(ioutgrph)
-	 if (iprinttype .ne. 0) then
-		iprinttype = sign(iptemp, iprinttype)
-	 else
-		iprinttype = iptemp
-	 endif
-c
-         inline=1
-         inlast=1
-         call clrpage
-c     Sets up number of line, etc. for the size of the text screen
-c
-      endif
-c		skip everything if not first time through
-c
-      numline=23
-      linelngth = 80
-      if (igraphtype .eq. 2) numline=20
-      if (igraphtype .eq. 3) numline=33
-      if (igraphtype .ge. 3) linelngth=72
-      if (igraphtype .eq. 5) linelngth=80
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/gtline.f unipops-3.6/source/conline/gtline.f
--- 3.5/source/conline/gtline.f	2000-03-16 11:33:04.000000000 -0700
+++ unipops-3.6/source/conline/gtline.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,95 +0,0 @@
-      SUBROUTINE GTLINE
-C-------------------------------------------------------------------------------
-C  @(#)gtline.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-      integer*2 ktlp, ktlpsv, llocat, ibyte, lastblnk, istat
-      integer*2 n21, n351, n355, n0, fshort, finish, nt, n1, n107
-c
-      INCLUDE 'smstuf.inc'
-      include 'core.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-c
-      data n21, n107, n351, n355, n0, n1 /21, 107, 351, 355, 0, 1/
-C
-C=======================================================================
-C
-C					Read a line, skip comments.
-1     KKT(1) = 0
-      KKT(2) = 0
-      KKT(3) = 11
-      KKT(4) = 0
-      KKT(5) = 140
-      KKT(10) = 4
-      KTLP = 2
-c
- 2    if (iintype .eq. imenuin .and. mode .eq. 0) call menus(istat)
-      if (istat .ne. 0) call oerror(n351, n0, ' ')
-c     Only update the Menusout file when the program is in menus mode
-c     and it is not in compile mode.
-c
-      call checkfperror
-c     Print out any Floating point errors generated between last input line
-c     and the one about to be read in.  
-c
-      CALL PREAD (KARBUF)
-c
-      call histparser(karbuf)
-c     Do history substitutions
-c
-c					echo karbuf out to the log file
-      if (dolog .and. mode .eq. 0 .and. 
-     .	  (iintype .eq. istdin .or. iintype .eq. isetupin) ) then
-         ibyte = lastblnk(lastline)
-	 if (ibyte .gt. 0) write(ilogout, 1110, iostat=istat) lastline(1:ibyte)
- 1110    format(a)
-         if (istat .ne. 0) call oerror(n355, n0, clogout)
-      end if
-c
-      KBPTR = 1
-      errcode = 0.0
-C					   Compile a line.
-      CALL POLISH
-c 
-      IF ((AP.EQ.0).OR.(MODE.NE.0)) then
-C					Mode 1 -> Compilation.
-	 if (mode .eq. -2) then
-	   lpgm = 2
-	   iedit = 0
-	   llit = 0
-	   mode = 0
-	 else if (mode .eq. -1) then
-	   lpgm = 2
-	   mode = iedit
-	   iedit = 0
-	 endif
-         goto 2
-c
-      else
-C					Mode 0 -> Immed. execute.
-	 KTLPSV	= KTLP
-	 L = LLOCAT(fshort(AP+2),KKT,KTLP)
-	 KKT(KTLPSV) = KKT(KTLPSV) + KT	- 1
-C					Address	relative to K array.
-	 L = L+2
-c
-	 if (ap .gt. 150-l+1) call oerror(n107, n1, 
-     .		'Too many commands on the input line') 
-	 CALL COPY (AP,A(1),KKT(L))
-c
-         nt = finish(k, kt + l - 3, .true.)
-         IF (NT .eq. 1) then
-	   call oerror(n21,n1,'Too many IF, WHILE, or FOR constructs')
-         else if (nt .eq. 2) then
-	   call oerror(n21,n1,'Too many END, THEN, or ELSE statements')
-         else if (nt .eq. 3) then
-	   call oerror(n21,n1,'No closing END statement')
-         endif
-c
-	 CALL INTERP (KKT(2))
-	 goto 1
-c
-      endif
-c
-      END
diff -uNr 3.5/source/conline/helps.f unipops-3.6/source/conline/helps.f
--- 3.5/source/conline/helps.f	2000-03-16 11:33:04.000000000 -0700
+++ unipops-3.6/source/conline/helps.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,245 +0,0 @@
-      SUBROUTINE HELPS (J)
-C-------------------------------------------------------------------------------
-C  @(#)helps.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C	 HELPS contains	the user assistance facility.
-C---------------------------------------------------------------------
-      INTEGER*2 VMSG(40), VMSG1(40), VMSG2(40), istch(80),
-     .		j, jblank, lastblnk, length, isbjct(80), itopics(5,200),
-     .		n0, n1, n2, n9, n17, n72, n80, n120, m1, m3,
-     .		n28, n29, lngth
-      logical*2 inquirefile, nmem
-      integer*4 jj, ilen, istat, i, kbp, ll, mm, ii, kbc, ilen2, ier,
-     .          ij, lp, irtn, ik
-      character*160 sbjct, stch, ucsbjct, filename
-      character*10 topics(200)
-      integer*4 n10, kbpm1, system
-      CHARACTER*80 CVMSG1, CVMSG, CVMSG2
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-c
-      equivalence (sbjct,isbjct), (itopics, topics), (istch, stch)
-      EQUIVALENCE  (VMSG, CVMSG), (VMSG1, CVMSG1), (VMSG2, CVMSG2)
-c
-      external compar
-c
-      include 'tags.inc'
-c
-      data n1/1/, n2/2/, n17/17/, n72/72/, n80/80/,
-     .	   n120/120/, m1/-1/, m3/-3/, n10/10/, n0/0/, n9/9/,
-     .     n28 /28/, n29/29/
-c
-      data jblank/'  '/
-      DATA CVMSG/'List of defined '/
-      DATA CVMSG1/
-     .'For a detailed explanation use EXPLAIN <name>.  For a summary'/
-      data cvmsg2/
-     .'explanation, use HELP <name>; <name> = item of interest'/
-C
-C=======================================================================
-C
-      if (mode .ne. 0) call oerror(n17, m1, ' ')
-c
-      JJ = J
-      GO TO (100,9909,9909,200,220), JJ
-      call oerror(n120, m3, 'HELPS')
-c
-9909  call oerror(n2, m1, 'Type HELP HELP for help on HELP')
-c
-C---------------------------------------------------------------------
-C	     H	  E    L    P
-C---------------------------------------------------------------------
- 100  continue
-c
-      CALL GETFLD
-c
-      IF (nkar .eq. 0 .or. tag .eq. ihelps) then
-	irtn = system('help.exe Help')
-        if (irtn .ne. 0) call oerror(n9,m1,'HELP')
-	GO TO 99
-      endif
-c     For HELP HELP or just HELP
-c
-      if (type .eq. 11 .or. type .eq. 14) call oerror(n29, m1, 'HELP')
-c
-      ilen = lastblnk(cvmsg)
-      type = 0
-c
-      IF (TAG .EQ. iverbs) THEN
-         write(stch,101,iostat=istat) cvmsg(1:ilen), 'VERBS'
-101	 format(a,1x,a)
-         TYPE=4
-      else if (tag .eq. iadverbs) then
-	 write(stch,101,iostat=istat) cvmsg(1:ilen), 'ADVERBS'
-	 type = -1
-      else IF (TAG .EQ. iprocedure) THEN
-	 write(stch,101,iostat=istat) cvmsg(1:ilen), 'PROCEDURES'
-         TYPE=3
-      else IF (TAG .EQ. iarray) THEN
-	 write(stch,101,iostat=istat) cvmsg(1:ilen), 'ARRAY adverbs'
-         TYPE=2
-      else IF (tag .eq. iscalar) then
-	 write(stch,101,iostat=istat) cvmsg(1:ilen), 'SCALAR adverbs'
-	 type = 1
-      else IF (tag .eq. istring) then
-	 write(stch,101,iostat=istat) cvmsg(1:ilen), 'STRING adverbs'
-	 type = 7
-      else IF (tag .eq. ipointer) then
-	 write(stch,101,iostat=istat) cvmsg(1:ilen), 
-     .			'POINTER/KEYWORD adverbs'
-	 type = 8
-      else IF (tag .eq. ialias) then
-	 write(stch,101,iostat=istat) cvmsg(1:ilen),'ALIASES'
-	 type = 6
-      endif
-c
-      if (type .ne. 0) then
-c     (i.e., PROC, SCALAR, ADVERBS, ARRAYS, etc. was specified.)
-c
-	call pwrite(jblank,n1)
-        call pwrite(istch,n80)
-        call pwrite(cvmsg1,n80)
-        call pwrite(cvmsg2,n80)
-	call pwrite(jblank,n1)
-c
-        l = 1
-	kbp = 1
-c       Reset L, which has been changed by GETFLD above, so that the search
-c       will begin from the start of core.
-c
- 110    L=K(L)
-        IF (L.ne.0) then
-          LL=K(L+1)/16
-          MM=K(L+1)-16*LL
-          if((type.eq.-1 .and. mm.ne.1 .and. mm.ne.2 .and. mm.ne.7 .and.
-     .		mm.ne.8)
-     1       .or. (type.ne.-1 .and. type.ne.mm)) goto 110 
-c         1, 2, 7, and 8 are the TYPES for ADVERBS.  This is for the case that
-c         ADVERBS are desired
-c
-C					   Copy	name.
-	  LP=L+4
-	  topics(kbp) = ' '
-          DO 111 II = 1,min(LL,5)
-            itopics(ii,kbp)=K(LP+II-1)
-  111       CONTINUE
-	  KBP=KBP+1
-	  goto 110
-c
-        else if (kbp .gt. 1) then
-c
-	  kbpm1 = kbp - 1
-          call qsort(topics, kbpm1, n10, compar)
-	  do 6230 ii = 1, kbp-1, 6
-	     sbjct = ' '
-	     do 6231 kbc = ii, min(ii+5,kbp-1)
-	       sbjct( (kbc-ii)*12+1: (kbc-ii)*12+12) = topics(kbc)
-6231	       continue
-             CALL PWRITE (isbjct,n72)
-6230	     continue
-c
-	endif
-c
-        IF (TYPE.ne.4) then
-	    call pwrite(jblank,n1)
-	    goto 99
-        else
-            type = 5
-            l = 1
-	    kbp = 1
-	    call pwrite(jblank,n1)
-	    write(stch,101,iostat=istat) 'Pseudo Verbs:'
-	    call pwrite(istch,n80)
-	    goto 110
-        endif
-c       Once type 4 verbs are done with, start on PSEUDO operators until they
-c	are all used up
-c
-      else
-c     (i.e., NOT scalar, adverb, proc, array)
-c
-        ilen2 = lastblnk(dirprefix(1))
-        sbjct = ' '
-	if (tag .gt. 0) then
-	  length = k(l+1)/16
-	  call copy(length,k(l+4),isbjct)
-	else
-	  length=(nkar+1)/2
-	  call copy(length,kpak,isbjct)
-	endif
-        filename = dirprefix(1)(1:ilen2) // 'help/' // sbjct
-c       If the user has typed HELP <name>, where name is not SCALAR, PROC,
-c       ARRAY, or VERB, but <name> is one of the entries in POPSDAT, then
-c       'filename' contains POPS commands which describe <name> and prints
-c       out ADVERB values, if needed.
-c
-        ier = -1
-        if(inquirefile(filename) ) open(unit=ishelpin,status='old',
-     1		iostat=ier,file=filename)
-        if (ier .eq. 0) rewind(ishelpin,iostat=ier)
-c
-        if(ier.eq.0) then
-          if (iinptr .ge. 50) then
-c			iinlist is FULL, OUCH
-             close(unit=ishelpin, iostat=ier)
-             call oerror(n28, m1, 'HELP')
-          else
-             iinptr = iinptr + 1
-             iinlist(iinptr, 1) = ishelpin
-             iinlist(iinptr, 2) = ishelpin
-             cinlist(iinptr) = filename
-	     iinunit = iinlist(iinptr, 1)
-	     iintype = iinlist(iinptr, 2)
-          endif
-	else
-	  call oerror(n2, m1, 'No documentation on ' // 
-     .		sbjct(1:lastblnk(sbjct)))
-        endif
-        goto 99
-c       Opens help file if it exists.  Help file consists of POPS commands
-c       which will generate the necessary information for the user
-c
-      endif
-c
-c------------------------------------------------------------------------
-c     E X P L A I N 
-c------------------------------------------------------------------------
-  200 CONTINUE
-      call nextfield(sbjct)
-      ilen = lastblnk(sbjct)
-      call uppercase(sbjct,ucsbjct)
-      irtn = system('explain2.exe ' // ucsbjct)
-      if (irtn .ne. 0) call oerror(n9,m1,'EXPLAIN')
-      goto 99
-c------------------------------------------------------------------------
-c    H I S T O R Y
-c------------------------------------------------------------------------
- 220  continue
-c
-      call getfld
-      if (nkar .eq. 0 .or. type.ne.11) then
-	nmem = maxhist
-      else
-        nmem= max(1,min(maxhist,1+nint(x(1))))
-      endif
-c
-      do 221 i = max(1, inhist-nmem+2), inhist 
-	ij = mod(i-1,maxhist) + 1
-	lngth = lastblnk(hist(ij))
-	if (lngth .le. 0) goto 221
-	do 2209 ik = 1, lngth, linelngth-6
-	   write(stch,2205,iostat=istat) i, hist(ij)(ik:min(lngth,ik+linelngth-7))
-2205       format(i5,':',a)
-	   if (ik .ne. 1) stch(1:6) = "      "
-	   call pwrite(istch,linelngth)
-2209       continue
-221     continue
-      goto 99
-   99 CONTINUE
-      RETURN
-      END
-c
diff -uNr 3.5/source/conline/history.f unipops-3.6/source/conline/history.f
--- 3.5/source/conline/history.f	2000-03-16 11:33:59.000000000 -0700
+++ unipops-3.6/source/conline/history.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,670 +0,0 @@
-      subroutine history(strng, ptr, print)
-c
-c     @(#)history.f	5.1 06/22/94
-c
-c     Does C-Shell ! history substitution using STRNG and HIST arrays
-c
-c     STRING = C*(*) String that contains history command
-c     PTR = I*2 character position in STRING of ! chracater
-c     PRINT = L*2 is true if the line is NOT to be executed but only
-c	printed.
-c
-      character*(*) strng
-      integer*2 ptr
-      logical print
-c
-      character*320 sbjct, teststr, worddes, old, new, outbuff 
-      integer*2 ilen, i1, irepeat, i0, istat, n27, m1, i3, numwords,
-     .		word1, word2, ilenwd, iw1, iw2, i4, i5, maxword,
-     .		lastblnk, i6, i, ilentst, ilenold, ilennew, word,
-     .		ilenout
-      logical global
-c
-      parameter (n27 = 27)
-      parameter (m1 = -1)
-      parameter (maxword = 400)
-c
-      integer*2 wend(maxword), wstart(maxword), wtype(maxword)
-c
-      include 'cio.inc'
-c
-      save old, ilenold, new, ilennew
-c
-      data old/' '/, ilenold/0/, new/' '/, ilennew/0/
-c
-      global = .false.
-      print = .false.
-      if (strng(ptr:ptr) .ne. '!') 
-     .		call herror(n27, m1, 'Internal error')
-c
-      sbjct = strng(ptr+1:)
-c
-      if (sbjct(1:1) .eq. '*' .or. sbjct(1:1) .eq. '^' .or.
-     .    sbjct(1:1) .eq. '$') sbjct = '-1:' // sbjct
-      if (sbjct(1:1) .eq. ':') sbjct = '-1' // sbjct
-c
-      ilen = lastblnk(sbjct)
-      if (ilen .eq. 0) call herror(n27, m1, 'No event specified')
-c
-c====================================================
-c
-c     First, parse event designator
-c
-      if (sbjct(1:1) .eq. '!') then
-	i1 = 2
-	irepeat = mod(inhist-2,maxhist) + 1
-c	Takes care of !!
-c-------
-      else if (sbjct(1:1) .eq. '-') then
-	i0 = 2
-	i1 = 2
-10	if ( lle(sbjct(i1:i1),'9') .and. lge(sbjct(i1:i1),'0') ) then
-	    i1 = i1 + 1
-	    if (i1 .le. ilen) goto 10
-	endif
-	read(sbjct(i0:i1-1),'(i9)', iostat=istat) irepeat
-	if (istat .ne. 0 .or. irepeat .eq. 0) 
-     .		call herror(n27, m1, 'Bad specified event')
-	irepeat = inhist - abs(irepeat)
-	if (irepeat .lt. inhist-maxhist+1 .or. irepeat .gt. inhist) 
-     .		call herror(n27, m1, 'Event beyond limits of history list')
-	irepeat = mod(irepeat-1,maxhist) + 1
-c	Takes care of !-n
-c-------
-      else if ( lle(sbjct(1:1),'9') .and. lge(sbjct(1:1),'0') ) then
-	i0 = 1
-	i1 = 1
-20 	if ( lle(sbjct(i1:i1),'9') .and. lge(sbjct(i1:i1),'0') ) then
-	    i1 = i1 + 1
-	    if (i1 .le. ilen) goto 20
-	endif
-	read(sbjct(i0:i1-1),'(i9)', iostat=istat) irepeat
-	if (istat .ne. 0 .or. irepeat .eq. 0) 
-     .		call herror(n27, m1, 'Bad specified event')
-	if (irepeat .lt. inhist-maxhist+1 .or. irepeat .gt. inhist) 
-     .		call herror(n27, m1, 'Event beyond limits of history list')
-	irepeat = mod(irepeat-1,maxhist) + 1
-c	Takes care of !n
-c-------
-      else if (sbjct(1:1) .eq. '?') then
-	i0 = 2
-	i1 = index(sbjct(i0:), '?') + i0 - 1
-	if (i1 .le. i0-1) call herror(n27, m1, 'Missing "?"')
-	if (i1 .eq. i0) call herror(n27, m1, 'Empty search string')
-	old = sbjct(i0:i1-1)
-	ilenold = i1 - i0
-	i1 = i1 + 1
-	do 40 i = inhist, max(1, inhist-maxhist+2), -1
-	   irepeat = mod(i-2, maxhist) + 1
-	   if (index(hist(irepeat), old(1:ilenold)) .ne. 0) goto 65
-40	   continue
-	call herror(n27, m1, 'Event not found')
-c	Takes care of !?str, !?str?, and !?str:
-c-------
-      else if (sbjct(1:1) .ne. ' ') then
-	i0 = 1
-	i1 = 1
-50	if (sbjct(i1:i1) .ne. ':' .and. sbjct(i1:i1) .ne. ' ') then
-	   i1 = i1 + 1
-	   if (i1 .le. ilen) goto 50
-	endif
-	if (i1 .eq. i0) call herror(n27, m1, 'No specified event')
-	teststr = sbjct(i0:i1-1)
-	ilentst = i1 - i0
-	do 60 i = inhist, max(1, inhist-maxhist+2), -1
-	   irepeat = mod(i-2, maxhist) + 1
-	   if (hist(irepeat)(1:ilentst) .eq. teststr(1:ilentst)) goto 65
-60	   continue
-	call herror(n27, m1, 'Event not found')
-c	Takes care of !str, !and !str:
-c-------
-      else
-	call herror(n27, m1, 'Improper event syntax')
-      endif
-c
-c====================================================
-c
-c     Do some housework
-c
-65    outbuff = hist(irepeat)
-      ilenout = lastblnk(outbuff)
-c
-      if (sbjct(i1:i1) .eq. ' ') goto 300
-c     No word designator or modifier so we can quit
-c
-      if (sbjct(i1:i1) .ne. ':') call herror(n27, m1, 'Missing :')
-c
-      call findwords(outbuff, maxword, numwords, wstart, wend, wtype)
-c     Counts the number of 'words' in OUTBUFF
-c
-      if (sbjct(i1+1:i1+1) .eq. 'S' .or. 
-     .    sbjct(i1+1:i1+1) .eq. 's' .or.
-     .    sbjct(i1+1:i1+1) .eq. 'P' .or. 
-     .    sbjct(i1+1:i1+1) .eq. 'p' .or.
-     .    sbjct(i1+1:i1+1) .eq. 'G' .or. 
-     .    sbjct(i1+1:i1+1) .eq. 'g') goto 200
-c     Modifier -- no word descripto so we can skip word descriptor
-c
-c====================================================
-c
-c     Next, proccess word descriptor
-c
-      i1 = i1 + 1
-      i0 = i1
-80    if (sbjct(i1:i1) .ne. ':' .and. sbjct(i1:i1) .ne. ' ') then
-	   i1 = i1 + 1
-	   if (i1 .le. ilen) goto 80
-      endif
-      if (i1 .eq. i0) goto 200
-      worddes = sbjct(i0:i1-1)
-      word1 = 0
-      word2 = 0
-c     Find the word descriptor; watch out for a null descriptor (::)
-c
-      if (worddes(1:1) .eq. '-') worddes = '0' // worddes
-c     A ':-n' is the same as a ':0-n'.
-c
-      ilenwd = lastblnk(worddes)
-      if (ilenwd .eq. 0) call herror(n27, m1, 'No word specified')
-c
-      if (ilenwd .eq. 1 .and. worddes(1:1) .eq. '0') then
-	   word1 = 1
-	   word2 = 1
-c	   Takes care of :0
-c------
-      else if (ilenwd .eq. 1 .and. worddes(1:1) .eq. '^')  then
-	   word1 = 2
-	   word2 = 2
-c	   Takes care of :^
-c------
-      else if (ilenwd .eq. 1 .and. worddes(1:1) .eq. '*')  then
-	   word1 = 2
-	   word2 = numwords
-	   if (word2 .lt. word1) then
-		outbuff = ' '
-	        ilenout = 1
-		goto 300
-	   endif
-c	   Takes care of :*
-c------
-      else if (ilenwd .eq. 1 .and. worddes(1:1) .eq. '%')  then
-	   if (ilenold .eq. 0) 
-     .		call herror(n27, m1, 'No previous search')
-	   iw1 = index(outbuff, old(1:ilenold))
-	   do 85 word1 = 1, numwords
-	     if (iw1 .ge. wstart(word1) .and. iw1 .le. wend(word1) ) goto 87
-85	     continue
-	   call herror(n27, m1, 'String not found in event')
-87	   word2 = word1
-c	   Takes care of :%
-c------
-      else if (ilenwd .eq. 1 .and. worddes(1:1) .eq. '$')  then
-	   word1 = numwords
-	   word2 = numwords
-c	   Takes care of :$
-c------
-      else if ( lle(worddes(1:1),'9') .and. lge(worddes(1:1),'0') ) then
-	   i0 = 1
-	   i3 = i0
-90 	   if ( lle(worddes(i3:i3),'9') .and. lge(worddes(i3:i3),'0') ) then
-	       i3 = i3 + 1
-	       if (i3 .le. ilenwd) goto 90
-	   endif
-	   read(worddes(i0:i3-1),'(i9)', iostat=istat) word1
-	   if (istat .ne. 0) call herror(n27, m1, 'Bad word description')
-	   word1 = word1 + 1
-c	   Finds starting word number (i.e., :n)
-c
-	   if (i3 .eq. ilenwd .and. worddes(i3:i3) .eq. '*') then
-		word2 = numwords
-c		Takes care of :n*
-c
-	   else if (i3 .eq. ilenwd .and. worddes(i3:i3) .eq. '-') then
-		word2 = numwords - 1
-c		Takes care of :n-
-c
-	   else if (i3 .eq. ilenwd-1 .and. worddes(i3:i3+1) .eq. '-$') then
-		word2 = numwords
-c		Takes care of :n-$
-c
-	   else if (i3 .gt. ilenwd) then
-		word2 = word1
-c		Takes care of :n
-c
-	   else if (i3 .lt. ilenwd .and. worddes(i3:i3) .eq. '-') then
-	      i0 = i3+1
-	      i3 = i0
-95 	      if ( lle(worddes(i3:i3),'9') .and. 
-     .		   lge(worddes(i3:i3),'0') ) then
-	          i3 = i3 + 1
-	          if (i3 .le. ilenwd) goto 95
-	      endif
-	      if (i3 .eq. i0 .or. i3 .lt. ilenwd) 
-     .			call herror(n27, m1, 'Bad word description')
-	      read(worddes(i0:i3-1),'(i9)', iostat=istat) word2
-	      if (istat .ne. 0) call herror(n27, m1, 'Bad word description')
-	      word2 = word2 + 1
-c	      Finds ending word number (i.e, the -m')
-c
-	   else
-	      call herror(n27, m1, 'Bad word description')
-	   endif
-c	   Takes care of :n, :n-m, n*, n-, n-$
-c------ 
-      else
-	   call herror(n27, m1, 'Bad word description')
-      endif
-c      
-c====================================================
-c
-c     Now, parse the line for the desired words
-c
-      if (word2 .lt. word1 .or. word2 .gt. numwords) 
-     .		call herror(n27, m1, 'Bad word description')
-      iw1 = wstart(word1)
-      iw2 = wend(word2)
-      if (iw2 .lt. iw1) call herror(n27, m1, 'Not enough words')
-      outbuff = outbuff(iw1:iw2)
-      ilenout = iw2 - iw1 + 1
-c
-c==================================================================     
-c
-c     Next, the modifier
-c
-200   if (sbjct(i1:i1) .eq. ' ') goto 300
-c     No modifier so we can quit
-c
-      if (sbjct(i1:i1) .ne. ':') call herror(n27, m1, 'Missing :')
-      i1 = i1 + 1
-c
-210   if (sbjct(i1:i1) .eq. 'p' .or. sbjct(i1:i1) .eq. 'P') then
-	print = .true.
-	i1 = i1 + 1
-	goto 200
-c       Takes care of :p -- must parse the next :, if any
-c----------
-c
-      else if (sbjct(i1:i1) .eq. 'g' .or. sbjct(i1:i1) .eq. 'G') then
-	global = .true.
-	i1 = i1 + 1
-        if (sbjct(i1:i1) .ne. 's' .and. sbjct(i1:i1) .ne. 'S' .and.
-     .      sbjct(i1:i1) .ne. '&') call herror(n27, m1, 'Bad modifier')
-	goto 210
-c       Takes care of :gs and :g& -- must parse the & and s next
-c----------
-c
-      else if (sbjct(i1:i1) .eq. '&') then
-	if (ilenold .eq. 0) call herror(n27, m1, 'No previous substitution')
-	i1 = i1 + 1
-c	Takes care of :g& or :& -- use existing old and new, if any
-c----------
-c
-      else if (sbjct(i1:i1) .eq. 's' .or. sbjct(i1:i1) .eq. 'S') then
-	if (sbjct(i1+1:i1+1) .ne. '/') call herror(n27, m1, 'Missing /')
-	i3 = i1 + 2
-	i4 = index(sbjct(i3:),'/') + i3 - 1
-	if (i4 .eq. i3-1) call herror(n27, m1, 'Missing /')
-	if (i4 .gt. i3) then
-	   ilenold = i4 - i3
-	   old = sbjct(i3:i4-1)
-	else if (ilenold .eq. 0) then
-	   call herror(n27, m1, 'No previous substitution')
-	endif
-c       If null 'old' string, go back and use the previous substitution, if any.
-c	If not null, use the given string as 'old'
-c	
-	i5 = index(sbjct(i4+1:),'/') + i4
-	if (i5 .eq. i4) call herror(n27, m1, 'Missing /')
-	ilennew = i5 - i4 - 1
-	if (ilennew .gt. 0) then
-	    new = sbjct(i4+1:i5-1)
-	    i0 = 1
-250	    i3 = index(new(i0:), '&') + i0 - 1
-	    if (i3 .ne. i0-1) then
-		new = new(1:i3-1) // old(1:ilenold) // new(i3+1:)
-		ilennew = ilennew - 1 + ilenold
-		i0 = i3 + ilenold
-		if (i0 .le. ilennew) goto 250
-	    endif
-c	    Substitute 'old' for '&' metacharacter
-        endif 
-        i1 = i5 + 1
-c	Takes care of :s/old/new/
-c----------
-      else
-	call herror(n27,m1, 'Bad modifier syntax')
-      endif
-c
-c     We must now do the work of the preceeding & or s
-c
-      i0 = 1
-260   i6 = index(outbuff(i0:), old(1:ilenold) ) + i0 - 1
-      if (i6 .eq. i0 - 1 .and. i0 .eq. 1) 
-     .		call herror(n27, m1, 'String not found')
-c     Must have at least one substitution
-c
-      if (i6 .eq. i0 - 1) then
-	global = .false.
-	goto 200
-      endif
-c     We're done with the current substitution
-c
-      do 270 word = 1, numwords
-	if (i6 .ge. wstart(word) .and. i6 .le. wend(word) ) goto 277
-270	continue
-	word = numwords
-c       Find the word number in which the substitution will be mase
-c
-277   if (ilennew .gt. 0) then
-	   outbuff = outbuff(1:i6-1) // new(1:ilennew) // outbuff(i6+ilenold:)
-      else
-	   outbuff = outbuff(1:i6-1) // outbuff(i6+ilenold:)
-      endif
-      ilenout = ilenout - ilenold + ilennew
-c     Do the substitution -- be carefull of a null 'new'
-c
-      wend(word) = wend(word) - ilenold + ilennew
-      do 280 i = word+1, numwords
-	wstart(i) = wstart(i) - ilenold + ilennew
-	wend(i) = wend(i) - ilenold + ilennew
-280     continue
-c     Bump wend and wstart pointers to compensate for changes to outbuff
-c
-c
-      if (global .and. word .lt. numwords) then
-	 i0 = wstart(word+1)
-	 goto 260
-c        Takes care of any desired global substitution.
-      else
-	 global = .false.
-	 goto 200
-c	 Now work on next modifier, if any.
-      endif
-c
-c==================================================================     
-c
-c     Now for some finishing up work
-c
-300   if (sbjct(i1:i1) .ne. ' ') call herror(n27, m1, 'Bad syntax')
-      if (global) call herror(n27, m1, 'Bad syntax')
-c
-      if (ilenout+ilen+ptr-i1 .gt. len(strng)) 
-     .		call herror(n27, m1, 'Resulting string is too long')
-c
-      strng(ptr:) = outbuff(1:ilenout) // sbjct(i1:)
-c
-      return
-      end
-c
-c--------------------------------------------------
-c
-      subroutine findwords(string, maxword, numword, wstart, 
-     .			   wend, wtype)
-c
-c     Finds up to MAXWORDS 'words' in STRING and places the number
-c     of words found in NUMWORD and the satrting and ending locations
-c     of the words in arrays WSTART and WEND.
-c     WTYPE(n) = 0 if common word, 1 if special word, 2 if string
-c
-      character*(*) string
-      integer*2 wstart(*), wend(*), maxword, numword, wtype(*)
-c
-      integer*2 i, j, numsingle, numdouble, n120, m1, lastblnk, ilen
-      logical pushcmp, special
-c
-      parameter (numsingle=18)
-      parameter (numdouble=4)
-      parameter (n120=120)
-      parameter (m1=-1)
-c
-      character*1 singles(numsingle), c1
-      character*2 doubles(numdouble)
-c
-      data singles/',',   '(',   ')',   '=',   '+',   '-',   '*',   '/',
-     .             '>',   '<',   '~',   '|',   '&',   ';',   '?',   '{',
-     .             '}',   '@'/
-      data doubles/'**',   '~=',   '>=',   '<='/
-c
-      ilen = lastblnk(string)
-      if (ilen .eq. 0) call herror(n120, m1, 'HISTORY: Internal error')
-c
-      do 1 j = 1, maxword
-	wend(j) = 0
-	wtype(j) = 0
-	wstart(j) = 0
-1	continue
-      numword = 0
-      special = .false.
-c
-      i = 1
-5     if (i .gt. ilen) return
-      if (string(i:i) .eq. ' ') then
-	i = i + 1
-	goto 5 
-      endif
-c     Skips any blanks in STRING
-c
-      if (.not. pushcmp(wstart, numword, maxword, i)) 
-     .		call herror(n120, m1, 'HISTORY: Internal error')
-c     Pushes start of word onto stack
-c
-      if (string(i:i) .eq. '''' .or. string(i:i) .eq. '"') then
-c	   The word is a string; must find closing quote
-c
-	   c1 = string(i:i)
-	   i = i + 1
-15	   if (i .le. ilen) then
-	     if (string(i:i) .ne. c1) then
-		i = i + 1
-		goto 15
-	     else if(string(i:i) .eq. c1 .and. i+1 .lt. ilen .and. 
-     .		     string(i+1:i+1) .eq. c1) then
-		i = i + 2
-		goto 15
-	     endif
-c	     Find final quote; skip double quotes
-	  endif
-	  wend(numword) = min(i,ilen)
-	  wtype(numword) = 2
-	  i = i + 1
-	  goto 5
-      endif
-c
-c 	Start looking for the end of the current word
-c
-20	if (i .gt. ilen) then
-	   wend(numword) = ilen
-	   wtype(numword) = 0
-	   return
-c
-	else if (string(i:i) .eq. ' ') then
-c	   We have a space
-c
-	   wend(numword) = i-1
-	   wtype(numword) = 0
-	   i = i + 1
-	   goto 5
-c------
-c
-	else 
-c
-c	  Look for double character words
-c 
-	  if (i .lt. ilen) then
-	    do 50 j = 1, numdouble
-	     if(string(i:i+1) .eq. doubles(j)) then
-		if (special) then
-		  wend(numword) = i+1
-	   	  wtype(numword) = 1
-		else
-		  if (wstart(numword) .le. i-1) then
-			wend(numword) = i-1
- 	   	  	wtype(numword) = 1
-     		  	if (.not. pushcmp(wstart, numword, maxword, i)) 
-     .			     call herror(n120, m1, 'HISTORY: Internal error')
-		  endif
-		  wend(numword) = i+1
-	   	  wtype(numword) = 1
-		endif
-		i = i + 2
-		special = .true.
-		goto 5
-	     endif
-50	     continue
-	  endif
-c
-c	  Look for single character words
-c 
-	  do 60 j = 1, numsingle
-	     if(string(i:i) .eq. singles(j)) then
-		if (special) then
-		  wend(numword) = i
- 	   	  wtype(numword) = 1
-		else
-		  if (wstart(numword) .le. i-1) then
-			wend(numword) = i-1
-  	   	  	wtype(numword) = 1
-     		        if (.not. pushcmp(wstart, numword, maxword, i)) 
-     .			     call herror(n120, m1, 'HISTORY: Internal error')
-		  endif
-		  wend(numword) = i
- 	   	  wtype(numword) = 1
-		endif
-		i = i + 1
-		special = .true.
-		goto 5
-	     endif
-60	     continue
-c------
-	endif
-c
-c	Go to next character in string and see if its the end of a word
-	special = .false.
-        i = i + 1
-	goto 20
-c
-      end
-c
-c--------------------------------------
-c
-      subroutine qhistory(strng, ptr, print)
-c
-c     Does C-Shell ^ history substitution using STRNG and HIST arrays
-c
-c     STRING = C*(*) String that contains history command
-c     PTR = I*2 character position in STRING of ^ chracater
-c     PRINT = L*2 is true if the line is NOT to be executed but only
-c	printed.
-c
-      character*(*) strng
-      integer*2 ptr
-      logical print
-c
-      integer*2 i1, i2, n27, m1, lastblnk
-c
-      parameter (n27 = 27)
-      parameter (m1 = -1)
-c
-      if (strng(ptr:ptr) .ne. '^') 
-     .		call herror(n27, m1, 'Internal error')
-c
-      i1 = index(strng(ptr+1:),'^') + ptr
-      if (i1 .eq. 0) call herror(n27, m1, 'Missing ^')
-      i2 = index(strng(i1+1:),'^') + i1
-      if (i2 .eq. i1) call herror(n27, m1, 'Missing ^')
-c
-      if (lastblnk(strng)+4 .gt. len(strng)) 
-     .		call herror(n27, m1, 'Resulting string is too long')
-c
-      strng(ptr:ptr) = '/'
-      strng(i1:i1) = '/'
-      strng(i2:i2) = '/'
-      strng = strng(1:ptr-1) // '!!:s' // strng(ptr:)
-c
-      call history( strng, ptr, print)
-c
-      return
-      end
-c
-c--------------------------------------
-c
-      subroutine histparser(kb)
-c
-c     Parses a line for history substitutions.
-c
-      integer*2 kb(*)
-c
-      include 'cio.inc'
-c
-      logical lhist, lprint, noexec
-      character*1 c1
-      integer*2 i0, ilen, lastblnk, iwpc
-c
-      i0 = 1
-      lhist = .false.
-      lprint = .false.
-c
-20    if ( cbuff(i0:i0) .eq. '!') then
-	call history(cbuff, i0, noexec)
-	lprint = noexec .or. lprint
-	lhist = .true.
-c
-      else if (cbuff(i0:i0) .eq. '^') then
-	call qhistory(cbuff, i0, noexec)
-	lprint = noexec .or. lprint
-	lhist = .true.
-c
-      else if (cbuff(i0:i0) .eq. '''' .or. cbuff(i0:i0) .eq. '"') then
-c	   The word is a string; must find closing quote
-c
-	   c1 = cbuff(i0:i0)
-	   i0 = i0 + 1
-	   ilen = lastblnk(cbuff)
-15	   if (i0 .le. ilen) then
-	     if (cbuff(i0:i0) .ne. c1) then
-		i0 = i0 + 1
-		goto 15
-	     else if(cbuff(i0:i0) .eq. c1 .and. i0+1 .lt. ilen .and. 
-     .		     cbuff(i0+1:i0+1) .eq. c1) then
-		i0 = i0 + 2
-		goto 15
-	     else
-		i0 = i0 + 1
-	     endif
-c	     Find final quote; skip double quotes
-	  endif
-c
-      else
-	i0 = i0 + 1
-      endif
-c
-      if (i0 .lt. lastblnk(cbuff)) goto 20
-c
-      if (lhist) then
-	hist(mod(inhist-1,maxhist)+1) = cbuff
-	nbytes = min(lastblnk(cbuff)+1, karlim)
-	write(istdout,*) cbuff(1:nbytes)
-	if (lprint) call togtline
-	call unpack(iwpc(nbytes), jbuff, kb)
-      endif
-c
-      return
-      end
-c
-c-----------------------------------------
-c
-      subroutine herror(n1, n2, string)
-c
-c     History error trap
-c
-      integer*2 n1, n2
-      character*(*) string
-c
-      include 'cio.inc'
-c
-      inhist = inhist - 1
-      call oerror(n1, n2, string)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/hphardplace.f unipops-3.6/source/conline/hphardplace.f
--- 3.5/source/conline/hphardplace.f	2000-03-16 11:33:06.000000000 -0700
+++ unipops-3.6/source/conline/hphardplace.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,40 +0,0 @@
-      subroutine hphardplace(ix1, iy1)
-C-------------------------------------------------------------------------------
-C  @(#)hphardplace.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR -- HPGL code
-c*******************************
-c 8904 [RJM]
-c*******************************
-c
-      integer*2 ix1, ix2, ix3, iy1, iy2, iy3
-      integer*2 n19, n39
-      include 'cio.inc'
-c
-      character*40 stch
-c
-      data n19, n39 /19, 39/
-c
-      save ix3, iy3
-c
-	write(stch,10) 'PU;PA ', ix1, iy1, ';'
-10	format( a, 2i6, a)
-	call putchar(stch,n19,ioutgrph)
-	ix3 = ix1
-	iy3 = iy1
-	return
-c
-      entry hphardvctr(ix2, iy2)
-c
-c     Draws a line -- HPGL code
-c
-	write(stch,11) 'PU;PA ',ix3, iy3, '; PD;PA ',ix2, iy2, ';'
-11	format( a, 2i6, a, 2i6, a)
-	call putchar(stch,n39,ioutgrph)
-	ix3 = ix2
-	iy3 = iy2
-	return
-c
-      end
-c
diff -uNr 3.5/source/conline/hphardtcopy.f unipops-3.6/source/conline/hphardtcopy.f
--- 3.5/source/conline/hphardtcopy.f	2000-03-16 11:33:06.000000000 -0700
+++ unipops-3.6/source/conline/hphardtcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine hphardtcopy
-C-------------------------------------------------------------------------------
-C  @(#)hphardtcopy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Dumps internal array INSTRING to device iouttxt for dumping
-c	of text screen -- HPGL code
-c******************************
-c 8904 [RJM]
-c******************************
-c
-      integer*2 i, ij, lastblnk, ilen2
-      integer*2 n16, fshort, n90
-      character*100 stch
-c
-      include 'cio.inc'
-c
-      data n16/16/, n90/90/
-c
-      do 1099 i = 1, inlast
-         ij = mod(fshort(i+inline-2),inlast) + 1
-         write(stch,10) 'PU;PA 10 ',750-(i-1)*20, ';'
-10	 format(a9,i6,a1)
-	 call putchar(stch, n16, iouttxt)
-         ilen2 = min(n90,lastblnk(instring(ij)))
-	 write(stch,20) 'LB', instring(ij)(1:ilen2), char(3)
-20	 format(a2,a,a1)
-	 call putchar(stch, fshort(ilen2+3), iouttxt)
-1099     continue
-c
-      return
-c      
-      end
-c
diff -uNr 3.5/source/conline/ilct.f unipops-3.6/source/conline/ilct.f
--- 3.5/source/conline/ilct.f	2000-03-16 11:33:06.000000000 -0700
+++ unipops-3.6/source/conline/ilct.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      integer*4 function ilct(i, j, iptwh)
-c
-c     @(#)ilct.f	5.1 06/22/94
-c
-c     Finds where in matrix IPTWH the elements (I,J) are stored.
-c
-      integer*2 iptwh, i, j
-      integer*2 fshort
-      integer*4 long, istart
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      istart = long(fshort(iptwh-1))*mdatasize/mnumarrays
-      ilct = long(i) + mhead(mnaxis1,iptwh)*long(fshort(j-1)) + istart
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/initcio.F unipops-3.6/source/conline/initcio.F
--- 3.5/source/conline/initcio.F	2000-03-16 11:32:30.000000000 -0700
+++ unipops-3.6/source/conline/initcio.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,206 +0,0 @@
-      subroutine initcio
-c
-c---------------------------------------------------------
-c   @(#)initcio.F	5.2 11/19/98
-c---------------------------------------------------------
-c
-c     Initializes most of the variables in CIO.INC
-c
-      include 'cio.inc'
-c
-      integer*4 irtn, getpid, getlog, hostnm, getenv, getcwd, inf,
-     1          iicio, ist4, ii
-      logical first, flse
-      real*4 rinf, rinfinity
-      integer*2 ksize, kxsize, lsize, i, n1, lastblnk, lenpid
-      character*6 pidtag
-c
-      equivalence (rinf, inf)
-c
-      data ksize/32766/,  kxsize/32766/, lsize/32766/, first/.true./
-c
-      parameter (n1=1)
-      parameter (flse = .false.)
-c
-      rinf = rinfinity()
-      if (first) then
-	numcio = inf
-	iicio = 1
-19      if (Rio(iicio) .eq. inf) then
-	   numcio = iicio
-	else
-	   iicio = iicio + 1
-	   goto 19
-	endif
-c       Finds out the number of I*4 words in CIO common block
-c
-	first = .false.
-        imenuin = 15
-        igraphin = 18
-        igraphout = 19
-        igraphtype = 1
-        iprinttype = 1
-	projcode = ' '
-c       Only reset IGRAPH, IPRINTTYPE if this is the first time INITCIO is called
-c     
-      endif
-c
-      version = VERSION
-      cpt = '  '
-c
-      irtn = getlog(oobs)
-      irtn = hostnm(site)
-      irtn = getcwd(dirname)
-      call progname(program)
-      irtn = getpid()
-      write(unit=procid, 10) irtn
-10    format (i8)
-c
-      nbytes = 0
-      outbuf = ' '
-      cbuff = ' '
-      karlim = 160
-      linelngth = 80
-      pagefull = .false.
-      cpuf = ' '
-c
-      inline = 1
-      inlast = 1
-      numline = 23
-      inhist = 0
-      maxhist = 50
-      lastline = ' '
-      do 100 i = 1, 50
-	hist(i) = ' '
-	instring(i) = ' '
-100	continue
-c
-      nfiles = 10
-      do 110 i = 1, nfiles
-	ffile(i,1) = 0
-	ffile(i,2) = 0
-	ffile(i,3) = 0
-	ffile(i,4) = 0
-	cfile(i) = ' '
-110	continue
-c
-      prntfmt = '(1pg15.7.2)'
-c
-      lenpid = lastblnk(procid) 
-      pidtag = '      '
-      ii = 0
-      do 115 i= lenpid-5, lenpid
-         if (i .gt. 0) then
-            if (procid(i:i) .ge. '0' .and. procid(i:i) .le. '9') then
-               ii = ii + 1
-               pidtag(ii:ii) = procid(i:i)
-            endif
-         endif
- 115  continue
-c            
-      cprtout = program(1:1)//'PRINTOUT'
-      csetupin = program(1:1) // 'SETUP'
-      couttxt = '/tmp/' // program(1:1) // 'TEXT' // pidtag
-      coutgrph = '/tmp/' // program(1:1) // 'GRAPH' // pidtag
-      cmemory = program(1:1) // 'MEMORY'
-      crecover = program(1:1) // 'RECOVER'
-      cmenuin = '/tmp/' // program(1:1) // 'MIN' // pidtag
-      cmenuout = '/tmp/' // program(1:1) // 'MOUT' // pidtag
-      clogout = program(1:1) // 'CMDLOG'
-      cgraphin = '/tmp/' // program(1:1) // 'GIN' // pidtag
-      cgraphout = '/tmp/' // program(1:1) // 'GOUT' // pidtag
-      ccube = ''
-c
-      istderr = 0
-      istdin = 5
-      istdout = 6
-      ibatchin = 7
-      iprtout = 8
-      iouttxt = 9
-      ioutgrph = 10
-      iiotmp = 11
-      isetupin = 12
-      ishelpin = 13
-      irecover = 14
-      imenuout = 16
-      ilogout = 17
-      icube = 18
-      imemory = 21
-c
-      open(unit=istdout, form='print')
-      open(unit=istderr, form='print')
-      write(istdout,109)
-109   format('1')
-c     Redefine the output FORM of STDOUT so that carriage control characters
-c     will be properly interpreted.  Clears Text screen.
-c	
-      iout = istdout
-      iinptr = 1
-      iinlist(iinptr, 1) = istdin
-      iinlist(iinptr, 2) = istdin
-      cinlist(iinptr) = 'stdin'
-      iinunit = iinlist(iinptr, 1)
-      iintype = iinlist(iinptr, 2)
-c
-      online = .false.
-      dolog = .false.
-      lsetup = .false.
-c
-      do 101 i = 1, 10
-	iounit(i) = -32767
-	ciounit(i) = ' '
-101	continue
-      iounit(1) = 31
-      iounit(2) = 32
-      iounit(3) = 33
-      ciounit(1) = program(1:1)//'DATA'
-      ciounit(2) = program(1:1)//'KEEP'
-      ciounit(3) = program(1:1)//'SAVE'
-      if (program(1:1) .eq. 'L') then
-         iounit(4) = 34
-         ciounit(4) = program(1:1)//'GAINS'
-         iounit(5) = 35
-         ciounit(5) = program(1:1)//'RECORDS'
-      endif
-c     Sets only those iounit#  which will be used
-c
-      irecsiz = 256
-      kblk = ksize / irecsiz
-      if (kblk*irecsiz .ne. ksize) kblk = kblk + 1
-      kxblk = kxsize / irecsiz
-      if (kxblk*irecsiz .ne. kxsize) kxblk = kxblk + 1
-      lblk = lsize / irecsiz
-      if (lblk*irecsiz .ne. lsize) lblk = lblk + 1
-c
-      irtn = getenv('popsdir', dirprefix(1))
-      irtn = getenv('popsutil1', dirprefix(2))
-      irtn = getenv('popsutil2', dirprefix(3))
-      irtn = getenv('popsproc1', dirprefix(4))
-      irtn = getenv('popsproc2', dirprefix(5))
-c
-      iglinex = 1
-      igliney = 780
-      graphon = .false.
-c
-      undoon = .false.
-c
-      call fset(n1, flse)
-      call rotlet(0.)
-      call charbd(n1)
-      call charsize(1.)
-c     Initializes default character font.
-c
-      if (version .lt. 1) then
-         write(istdout,*) 'Version: ', version*1000.0
-      else
-         write(istdout,*) 'Version: ', version
-      endif
-c
-      ist4 = istdout
-      call flush(ist4)
-c
-      return
-      end
-c
-
-
diff -uNr 3.5/source/conline/initcomm.f unipops-3.6/source/conline/initcomm.f
--- 3.5/source/conline/initcomm.f	2000-03-16 11:33:07.000000000 -0700
+++ unipops-3.6/source/conline/initcomm.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,64 +0,0 @@
-      SUBROUTINE initcomm
-C-------------------------------------------------------------------------------
-C  @(#)initcomm.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C	 INIT initializes the K, LISTF,	and commons for	POPS.
-C Modified 890105 [PPM] includes to .inc, lowercase
-c          8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      integer*2	ITRUE(2), IFALSE(3), karat, iwpr, irealp, iwpc
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-c
-      integer*2 n0, n1, n2, n4, n5, n40
-c
-      DATA ITRUE/'TR','UE'/, IFALSE/'FA','LS','E '/
-      DATA KARAT /' >'/
-c
-      data n0, n1, n2, n4, n5, n40 /0, 1, 2, 4, 5, 40/
-C
-C=======================================================================
-C
-C					COMMON VARIABLES
-c
-      slim = 400
-      NEXTP=0
-      LPGM=2
-      KT=51
-      IDEBUG = -1
-      CALL FILL	(n40,n0,STACK)
-      CALL FILL	(n40,n0,CSTACK)
-C					Initialize.
-C					   One
-      L	= K(4)
-      CALL HUNT	(K,L,IWPR(n1),n2,1.0)
-      TAG = IREALP(L)+1
-      ONE=TAG
-C					   Zero
-      L	= K(4)
-      CALL HUNT	(K,L,IWPR(n1),n2,0.0)
-      TAG = IREALP(L)+1
-      ZERO=TAG
-C					   True
-      L	= K(1)
-      CALL HUNT	(K,L,IWPC(n4),n4,ITRUE)
-      TAG = K(L+2)
-      TRUE=TAG
-C					   False
-      L	= K(1)
-      CALL HUNT	(K,L,IWPC(n5),n4,IFALSE)
-      TAG = K(L+2)
-      FALSE=TAG
-C
-      MODE = 0
-      IEDIT = 0
-      CALL PROMPT (KARAT,IPT)
-c
-   99 CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/initfiles.f unipops-3.6/source/conline/initfiles.f
--- 3.5/source/conline/initfiles.f	2000-03-16 11:33:07.000000000 -0700
+++ unipops-3.6/source/conline/initfiles.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,100 +0,0 @@
-      subroutine initfiles(first4)
-C-------------------------------------------------------------------------------
-C  @(#)initfiles.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Initializes files and checks for their existence.
-c     Allows user to change the names of default files
-c
-c     If FIRST = 1 then will NOT ask for changes -- assumes the user
-c	wants an initialization of files and a listing of the found
-c	files.  If FIRST != 1 then no initialization and questions will
-c	be asked.
-c
-c     RJM December, 1989
-c
-      include 'cio.inc'
-c
-      integer*2 inum, chngfile, n0, n9, n1, n14, lastblnk
-      integer*4 first4
-      integer*4 long, system, outputtemp, irtn
-      character*64 filename
-      character*15 answr1, answr2
-c
-      data n0, n9 /0, 9/, n1, n14 /1, 14/
-c				ensure that sddinit is only called once
-      if (first4 .eq. 1) call sddinit()
-c
-5     inum = 1
-      filename = ' '
-      answr2 = ' '
-c
-      outputtemp = iout
-      iout = istdout
-      call files
-      iout = outputtemp
-c     Call Files with STDIN and STDOUT as IO units and return these
-c     units to the values they had presvious to the call to FILES
-c
-1     format(1x,10a)
-c			the first time, don't offer any choices
-      if (first4 .eq. 1) then
-         write(istdout, 1) 'Use the CHNGFILE verb to change ',
-     1        'an entry in this table.'
-         write(istdout, 1) ' '
-         return
-      endif
-c
-      write(istdout,1) ' '
-      write(istdout,1) 
-     1 	'Enter one of the following commands: DIR, SUBTRACT, ',
-     1  'CHANGE, CREATE, HELP'
-      write(istdout,30) 'Or enter a <cr> to use these files: '
-30    format(1x,a,$)
-c
-      call flush(long(istdout))
-      read(istdin,40) answr1
-40    format(a)
-      write(istdout,1) ' '
-c
-      call uppercase(answr1,answr2)
-c
-      if (answr2 .eq. 'CHANGE' .or. answr2 .eq. 'CREATE' .or. 
-     1    answr2 .eq. 'SUBTRACT') then
-41	write(istdout,1) 'Enter number of file type you want to ',
-     1		'alter; use the numbers in column 1 above'
-	write(istdout,30) '# '
-	call flush(long(istdout))
-	read(iinunit,45,err=41) inum
-45	format(i10)
-      else if (answr2 .eq. 'HELP') then
-	irtn = system('help.exe CHNGFILE')
-        if (irtn .ne. 0) call oerror(n9, n0, 'CHNGFILE')
-	goto 5
-c
-      else if(answr2 .eq. 'DIR') then
-	irtn = system('ls.exe *')
-        if (irtn .ne. 0) call oerror(n9, n0, 'CHNGFILE')
-	goto 5
-c
-      else if (answr2 .eq. ' ') then
-	goto 99
-      else
-	write(istderr,1) '***ERROR*** Bad command... Try again...'
-	goto 5
-      endif
-c
-46    if (answr2 .eq. 'CHANGE' .or. answr2 .eq. 'CREATE') then
-	write(istdout,30) 'Enter name of file to add to table',
-     1			  ' (60 characters max): '
-	call flush(long(istdout))
-	read(iinunit,40) filename
-        if (lastblnk(filename) .gt. 60) call oerror(n14, n1, ' ')
-      endif
-c
-      irtn = chngfile(answr2, inum, filename)
-      goto 5
-c
-99    return
-      end
-c
diff -uNr 3.5/source/conline/initfperror.F unipops-3.6/source/conline/initfperror.F
--- 3.5/source/conline/initfperror.F	2000-03-16 11:33:08.000000000 -0700
+++ unipops-3.6/source/conline/initfperror.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine initfperror
-c
-c     @(#)initfperror.F	5.1 06/22/94
-c
-c     Initializes floating Point error handler
-c
-      include 'errors.inc'
-c
-      external fphandler
-c
-#ifdef sun4
-      call ieee_handler('set','common',fphandler)
-#endif
-c
-      erron = .true.
-      amath = .false.
-      numdivision = 0
-      numunderflow = 0
-      numoverflow = 0
-      numinvalid = 0
-      numothererr = 0
-      loclasterr = 0
-c
-      return
-      end
diff -uNr 3.5/source/conline/initlock.f unipops-3.6/source/conline/initlock.f
--- 3.5/source/conline/initlock.f	2000-03-16 11:33:08.000000000 -0700
+++ unipops-3.6/source/conline/initlock.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,105 +0,0 @@
-      subroutine initlock()
-C-------------------------------------------------------------------------------
-C  @(#)initlock.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Creates a file which, if it exists, locks other users from running
-c     LINE/CONDAR in that directory
-c
-      integer*2 ierr, irtn
-      integer*4 chmod
-      include 'cio.inc'
-c
-      integer*4 ia1(3), ia2(3), four, system 
-      character*8 oobs2, site2, time2
-      character*10 date2
-      character*1 answr, answr2
-c
-      data four/4/
-c
-      oobs2 = ' '
-      site2 = ' '
-      time2 = ' '
-      date2 = ' '
-      call idate(ia1)
-      call itime(ia2)
-c     Gets date, and time
-c
-102   open(unit=iiotmp,file=program(1:1)// 'LOCKFILE',
-     1     access='sequential',status='unknown',iostat=ierr)
-      if(ierr .eq. 0) then
-	write(iiotmp,1199,iostat=ierr) oobs, site, ia1, ia2, procid
-1199	format(1x,a8,1x,a8,1x,i2,'/',i2,'/',i4,1x,i2,':',i2,':',
-     1     	       i2,1x,a8)
-      endif
-      if (ierr .ne. 0) then
-	rewind(iiotmp,iostat=ierr) 
-	read(iiotmp, 1299, iostat=ierr) oobs2, site2, date2, time2
-1299	format(1x,a8,1x,a8,1x,a10,1x,a8)
-	close(iiotmp,iostat=ierr)
-        write(istderr,5) ' '
-5       format(1x,10(a,' '))
-        write(istderr,10)
-10      format(1x,70('*'))
-	write(istderr,5) 'LOCKFILE exists.  '
-        write(istderr,5) 'Another user has control of the files',
-     .    'in this directory which may'
-	write(istderr,5) 'lead to unpredictable results when files are',
-     .	  'read from or written to.'
-	write(istderr,5) ' '
-        if (ierr .eq. 0) then
- 	   write(istderr,5) 'Possible user is:'
-	   write(istderr,5) 'Obs:', oobs2,' Machine:',site2, 
-     1	  	            ' Date/Time:', date2, time2
-           write(istderr,5) ' '
-        else
-	   write(istderr,5) 'Cannot ascertain who the user is'
-	   write(istderr,5) ' '
-	endif
-        write(istderr,10)
-101     write(istderr,5) ' '
-	write(istderr,5) 'You have the following options:'
-	write(istderr,5) '   To exit the program, type: 0'
-	write(istderr,5) '   To remove a leftover LOCKFILE, type: 1'
-	write(istderr,5) '   To ignore the LOCKFILE, type: 2'
-	write(istderr,6) 'Enter 0, 1, or 2 [ default : 0 ]: '
-6	format(1x, a, $)
-	read(istdin, 7) answr
-7	format(a)
-	if (answr .eq. ' ' .or. answr .eq. '0') then
-	   call exitpops(four)
-	else if (answr .eq. '1' .or. answr .eq. '2') then
-           write(istderr,5) ' '
-	   write(istderr,5) 'WARNING:  This may be very dangerous!! ',
-     .			'Proceed at your own risk!!'
-	   write(istderr,6) 'Continue (y or n)? [default : n] '
-	   read(5,*) answr2
-	   if (answr2 .eq. ' ' .or. answr2 .eq. 'n' .or. answr2 .eq. 'N') then
-		call exitpops(four)
-	   else if (answr2 .eq. 'Y' .or. answr2 .eq. 'y') then
-		if (answr .eq. '1') then
-			irtn = system('clearlock.exe ' // program(1:1))
-			if (irtn .ne. 0) then
-			  write(istderr,*) 'Error in clearing LOCKFILE.',
-     .				'  Cannot continue!!'
-			  write(istderr,*) 'Get help from your local ',
-     .				'UniPops guru!'
-			  call exitpops(four)
-			endif
-			goto 102
-		endif
-	   else
-		goto 101
-	   endif
-	else
-	   goto 101
-	endif
-c	
-      else
-	close(iiotmp,iostat=ierr)
-	irtn = chmod(program(1:1)// 'LOCKFILE', 'a-w')
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/initlog.f unipops-3.6/source/conline/initlog.f
--- 3.5/source/conline/initlog.f	2000-03-16 11:33:09.000000000 -0700
+++ unipops-3.6/source/conline/initlog.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,57 +0,0 @@
-      subroutine initlog
-c-------------------------------------------------------------------------------
-c @(#)initlog.f	5.1 06/22/94
-c
-c     Sets up logfile
-c
-C-------------------------------------------------------------------------------
-c
-      integer*4 istat, n8
-      integer*2 lastblnk
-      logical*2 opened
-      character*160 line
-      character*1023 fullname
-      character*24 zdatetime
-c
-      include 'cio.inc' 
-c
-      data n8 / 8/
-c
-      call filecomp(clogout, fullname)
-      if (opened(fullname)) return
-      open(ilogout,file=fullname,status='unknown',form='formatted',
-     1     iostat = istat)
-      if (istat .ne. 0) then
-         write(istderr,*) ' Can not open command log file ',
-     .			  clogout(1:lastblnk(clogout))
-         call exitpops(n8)
-      end if
-c				find end of file
- 10   continue
-         read(ilogout, 1010, end = 20, iostat = istat) line
-         if (istat .ne. 0) then
-            write(istderr, 1020) clogout(1:lastblnk(clogout))
-            call exitpops(n8)
-         end if
-      goto 10
-c
- 20   continue
-c
-      if (dolog) then
-	  write(ilogout, 1030, iostat=istat)'# Command logging ON -- ', 
-     .				zdatetime()
-          if (istat .ne. 0) then
-            write(istderr, 1030) 'Error while trying to write to ', 
-     .				clogout(1:lastblnk(clogout))
-            call exitpops(n8)
-          endif
-      endif
-
-      return
-c
- 1010 format(a10)
- 1020 format(' Error while trying to find end of log file ',a)
- 1030 format(3a)
-c
-      end
-c
diff -uNr 3.5/source/conline/initmess.f unipops-3.6/source/conline/initmess.f
--- 3.5/source/conline/initmess.f	2000-03-16 11:33:10.000000000 -0700
+++ unipops-3.6/source/conline/initmess.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      subroutine initmess
-C-------------------------------------------------------------------------------
-C  @(#)initmess.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Echos startup mesages to the terminal
-c****************************************
-c 8904 [RJM]
-c****************************************
-c
-      include 'cio.inc'
-c
-      integer*4 irtn, system
-c
-      irtn = system('mess.exe ' // program(2:2))
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/initonline.f unipops-3.6/source/conline/initonline.f
--- 3.5/source/conline/initonline.f	2000-03-16 11:33:10.000000000 -0700
+++ unipops-3.6/source/conline/initonline.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,51 +0,0 @@
-      subroutine initonline
-C-------------------------------------------------------------------------------
-C  @(#)initonline.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Initializes ONLINE data file.   
-c
-c***************************************
-c 8904 [RJM]
-c***************************************
-c
-c
-      include 'cio.inc'
-c
-      integer*2 itry
-      integer*4 ithree, long, useprojcode
-      character*8 project, tucproj
-      logical*2 changeproj
-c
-      data ithree/3/
-      data tucproj /"tucson "/
-c
-      if (useprojcode() .ne. 0) then
-         itry = 0
-1390     write(istdout,13909) ' '
-13909    format(1x,10a)
-c
-         write(istdout,13910)'Enter Project Code ',
-     .		'(3 CHARS MIN, 8 MAX, Default: NULL): '
-13910    format(1x,2a,$)
-         call flush(long(istdout))
-         read(istdin,13911) project 
-13911    format(a)
-	 if (project .eq. "        ") project = "NULL"
-         if (.not. changeproj(project) ) then
-            if (itry .le. 10) then
-	       itry = itry + 1
-	       goto 1390
-            else
-	       write(istderr,13909) 
-     1               'You have had ten tries... TERMINATING!!'
-               call exitpops(ithree)
-            endif
-         endif
-      else
-         itry = changeproj(tucproj)
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/initsetup.f unipops-3.6/source/conline/initsetup.f
--- 3.5/source/conline/initsetup.f	2000-03-16 11:33:11.000000000 -0700
+++ unipops-3.6/source/conline/initsetup.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,53 +0,0 @@
-      subroutine initsetup()
-C-------------------------------------------------------------------------------
-C  @(#)initsetup.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Prepares POPS so that it will read from the SETUP file
-c     if one exists at start up.
-c
-      include 'cio.inc'
-c
-      logical*2 inquirefile
-      integer*4 long
-c
-      lsetup = .false.
-c
-      if (inquirefile(csetupin)) then
-            open(unit=isetupin,file=csetupin,status='old',err=50)
-            rewind(isetupin,err=50)
-            write(istdout,*) ' '
-            write(istdout,*) 'Initializing program using SETUP file' 
-            write(istdout,*) ' '
-            call flush(long(istdout))
-            if (iinptr .ge. 50) then
-c				no room in iinlist, this should NEVER
-c				happen, so we're going to check it anyway
-               write(istderr, *) ' '
-               write(istderr, *) 'SETUP file can not be added ',
-     .                           'to list of open input devices'
-               write(istderr, *) 
-     .             'This should not happen, report this problem.'
-               write(istderr, *) 'Using default initialization'
-               close(unit=isetupin)
-            else
-               iinptr = iinptr + 1
-               iinlist(iinptr, 1) = isetupin
-               iinlist(iinptr, 2) = isetupin
-               cinlist(iinptr) = csetupin
-               iinunit = iinlist(iinptr, 1)
-               iintype = iinlist(iinptr, 2)
-               lsetup = .true.
-            endif
-	    return
-      endif
-c
-50       write(istderr,*) ' '
-         write(istderr,*) 'SETUP file doesn''t exist... ',
-     1	                  'Using default initialization'
-         write(istderr,*) ' '
-c
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/inrange.f unipops-3.6/source/conline/inrange.f
--- 3.5/source/conline/inrange.f	2000-03-16 11:33:11.000000000 -0700
+++ unipops-3.6/source/conline/inrange.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,59 +0,0 @@
-      integer*4 function inrange(min, max, value, default)
-c
-c @(#)inrange.f	5.1 06/22/94
-c
-c      checks that value is in the range specified by min and max.
-c      If either min or max is default, value is assumed to fit within that
-c      end of the range.
-c
-c      returns 0 for false and 1 for true
-c
-c      min and max are NOT checked to see that min <= max
-c
-      real*4 min, max, value, default
-c
-      logical*2 lupper, llower
-c
-      lupper = .true.
-      llower = .true.
-      inrange = 0
-c
-      if (min .ne. default) lupper = (value .ge. min)
-      if (max .ne. default) llower = (value .le. max)
-c
-      if (lupper .and. llower) inrange = 1
-c
-      return
-      end
-c
-      integer*4 function inrange8 (min, max, value, default)
-c
-c	same as inrange above but for double precision value
-c	since the values for min and max come from pops adverbs,
-c	they only have r*4 accuracy (they are r*8 arguments here so
-c	that the c code that gets these values from the params structure
-c	call call this with no conversion.  Also, if we ever go to an R*8
-c	interpreter, only the down conversion to r*4 here will need to
-c	be change for those routines using inrange 8.
-c
-      real*8 min, max, default, value
-      real*4 rmin, rmax, rval, rdef
-c
-      logical*2 lupper, llower
-c
-      lupper = .true.
-      llower = .true.
-      inrange8 = 0
-c		down convert to r*4
-      rmin = min
-      rmax = max
-      rval = value
-      rdef = default
-c
-      if (rmin .ne. rdef) lupper = (rval .ge. rmin)
-      if (rmax .ne. rdef) llower = (rval .le. rmax)
-c
-      if (lupper .and. llower) inrange8 = 1
-c
-      return
-      end
diff -uNr 3.5/source/conline/interp.f unipops-3.6/source/conline/interp.f
--- 3.5/source/conline/interp.f	2000-03-16 11:33:11.000000000 -0700
+++ unipops-3.6/source/conline/interp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,139 +0,0 @@
-      SUBROUTINE INTERP	(KENTRY)
-C-------------------------------------------------------------------------------
-C  @(#)interp.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C   POPS INTERPRETER
-C---------------------------------------------------------------------
-c
-      integer*2 kentry, ier, j, kk, j1, lflag, inspacen
-      integer*2 m1, m3, n107, n120, n130, n0, fshort
-      logical*2 amatherr
-c
-      INCLUDE 'core.inc'
-      include 'appl.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-      include 'smstuf.inc'
-c
-      include 'tags.inc'
-c
-      data m1, m3, n107, n120, n130, n0 /-1, -3, 107, 120, 130, 0/
-c
-C
-C=======================================================================
-C
-      call savestatus
-      call clrruntag
-c
-      nspacen = 0.
-      amatherr = .false.
-c     Both nspacen and amatherr are used to keep track of errors occuring
-c     during Array Math processing.  If all is going well with Array Math,
-c     then amatherr = .false. and nspacen has a value between 1 and MAX_DATA_POINTS.
-c     If amatherr = true, then we must skip over all commands until the end
-c     of the array math processing.  The end of array math processing is
-c     flaged when nspacen takes on the value of MAX_DATA_POINTS+1.  
-c
-      SP=0
-      CP=0
-      SP0=1
-      LINK=K(KENTRY)
-      L=KENTRY
-C					Program	chunk begins.
- 10   L=L+1
-C					   Advance program counter.
- 20   L=L+1
- 25   J=K(L)
-c
-      if (amatherr .and. j .ne. iforend .and. j .ne. i0 ) goto 20
-c     Array math error has occured so the only allowed command is the 'END' 
-c     command which flags the end of array math processing.  All other
-c     commands are skiped.  Stop processing if nothing more to process (i.e.,
-c     J = 0)
-c     
-C					Debug.
-      IF (IDEBUG.gt.0) then
-	 KK=CSTACK(CP)
-	 WRITE (iout,200,IOSTAT=IER) L,J,SP,SP0,STACK(SP),V(SP),CP,
-     .                   CSTACK(CP), C(KK)
- 200     FORMAT (' INTERP: ',2I6,2I3,I6,G12.5,2I6,G12.5)
-      endif
-C					Operand	- push on stack.
-      IF(J.lt.0) then
-	 SP=SP+1
-         IF (SP.lt.1.or.SP.gt.SLIM.or.CP.lt.0.or.CP.gt.SLIM) 
-     .		call oerror(n107, m1, ' ')
-  	 J1=-J
-	 STACK(SP)=J1
-         V(SP)=C(J1)
-	 GO TO 20
-      endif
-C					Verb linkages.
-      call setflags
-      IF ((J.ge.iaubegin(1)).and.(J.lt.ilastverb)) then
-	 CALL VERBS (J)
-	 lflag = 2
-      else if (j.ge.ifunct.and. j.lt.ifunfunct) then
-	CALL FUNCT(LFLAG,fshort(J-ifunct+1))
-      else if (j.ge.ifunfunct.and. j.lt.igenop) then
-	CALL funfunct(LFLAG,fshort(J-ifunfunct+1))
-      else if (j.ge. igenop .and. j .lt. irtops) then
-	call genop(lflag, fshort(j-igenop+1))
-      else
-         CALL QUICK(LFLAG,J, l, link)
-      endif
-c
-110   call gpflush
-c     Flush out any pending graphics commands
-c
-      inspacen = int(nspacen + 0.5)
-      if (amatherr .and. inspacen .ge. MAX_DATA_POINTS + 1) then
-	amatherr = .false.
-	nspacen = 0.
-c	Array math error has occured and the END of the array math processing
-c	has been found.  We can now continue processing stuff after that END
-c
-      else if(amatherr) then
-	goto 20
-c       An array math  error has occured as well as an END, however, that 
-c       END was NOT the END which defines the end of array math processing.
-c       We need to continue skipping until the correct END is found.
-c
-      endif
-c
-      goto (10, 20, 25, 5000, 5001, 99 ), lflag
-      call oerror(n120, m3, 'INTERP')
-C---------------------------------------------------------------------
-C		   S T O R E   I N T E R M E D I A T E	 V A L U E
-C---------------------------------------------------------------------
-5000  SP=SP-1
-5001  STACK(SP)=0
-      V(SP)=XX
-      GO TO 20
-C					Normal exit.
-99    if (sp .ne. 0) call oerror(n130, n0, 'Consequences are unknown!!')
-      RETURN
-C--------------------------------------------------------------------
-c
-c****************************
-c
-      entry execerror
-c
-      lflag = 2
-      goto 110
-c
-c     You will re-enter interp at this point if a run-time error occured
-c     in one of the above routines.
-c
-c****************************
-c
-      entry amatherror
-
-      nspacen = MAX_DATA_POINTS
-      amatherr = .true.
-      lflag = 2
-      goto 110
-c     You will enter interp at this point if an array math error occured.
-c
-      END
diff -uNr 3.5/source/conline/lfit.f unipops-3.6/source/conline/lfit.f
--- 3.5/source/conline/lfit.f	2000-03-16 11:34:02.000000000 -0700
+++ unipops-3.6/source/conline/lfit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,240 +0,0 @@
-      SUBROUTINE LFIT(X,Y,SIG,NDATA,A,MA,LISTA,MFIT,COVAR,NCVM,CHISQ,
-     .		      funcs)
-c
-c     @(#)lfit.f	5.1 06/22/94
-c
-
-
-**************************************************************************
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C      numerical recipes (Press et.al. ) rotuine
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
- 
-      integer*4 MMAX
-      PARAMETER (MMAX=50)
-
-
-      Real X(NDATA),Y(NDATA),SIG(NDATA),
-     *                COVAR(NCVM,NCVM),AFUNC(MMAX),
-     *                BETA(MMAX),CHISQ,SIG2I,SUM,
-     *                A(MA),YM,WT
-      INTEGER*4 LISTA(MA),NDATA,NCVM,MA,MFIT,I,KK,
-     *          IHIT,K,J, n1
-c
-      integer*2 n120, m3
-c
-      external funcs
-c
-      data n120/120/, m3/-3/, n1/1/
-
-      KK=MFIT+1
-      DO 12 J=1,MA
-        IHIT=0
-        DO 11 K=1,MFIT
-          IF (LISTA(K).EQ.J) IHIT=IHIT+1
-11      CONTINUE
-        IF (IHIT.EQ.0) THEN
-          LISTA(KK)=J
-          KK=KK+1
-        ELSE IF (IHIT.GT.1) THEN
-          call oerror(n120, m3, 'LFIT: Improper set in LISTA')
-	  goto 25
-        ENDIF
-12    CONTINUE
-      IF (KK.NE.(MA+1)) then
-        call oerror(n120, m3, 'LFIT: Improper set in LISTA')
-	goto 25
-      endif
-      DO 14 J=1,MFIT
-        DO 13 K=1,MFIT
-          COVAR(J,K)=0.
-13      CONTINUE
-        BETA(J)=0.
-14    CONTINUE
-      DO 18 I=1,NDATA
-        CALL FUNCS(X(I),AFUNC,MA)
-        YM=Y(I)
-        IF(MFIT.LT.MA) THEN
-          DO 15 J=MFIT+1,MA
-            YM=YM-A(LISTA(J))*AFUNC(LISTA(J))
-15        CONTINUE
-        ENDIF
-        SIG2I=1./SIG(I)**2
-        DO 17 J=1,MFIT
-          WT=AFUNC(LISTA(J))*SIG2I
-          DO 16 K=1,J
-            COVAR(J,K)=COVAR(J,K)+WT*AFUNC(LISTA(K))
-16        CONTINUE
-          BETA(J)=BETA(J)+YM*WT
-17      CONTINUE
-18    CONTINUE
-      IF (MFIT.GT.1) THEN
-        DO 21 J=2,MFIT
-          DO 19 K=1,J-1
-            COVAR(K,J)=COVAR(J,K)
-19        CONTINUE
-21      CONTINUE
-      ENDIF
-      CALL GAUSSJ(COVAR,MFIT,NCVM,BETA,n1,n1)
-      DO 22 J=1,MFIT
-        A(LISTA(J))=BETA(J)
-22    CONTINUE
-      CHISQ=0.
-      DO 24 I=1,NDATA
-        CALL FUNCS(X(I),AFUNC,MA)
-        SUM=0.
-        DO 23 J=1,MA
-          SUM=SUM+A(J)*AFUNC(J)
-23      CONTINUE
-        CHISQ=CHISQ+((Y(I)-SUM)/SIG(I))**2
-24    CONTINUE
-      CALL COVSRT(COVAR,NCVM,MA,LISTA,MFIT)
-25    RETURN
-      END
-
-************************************************************************
-
-      SUBROUTINE COVSRT(COVAR,NCVM,MA,LISTA,MFIT)
-
-***********************************************************************
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C          numerical recipes routine, Press et. al.
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-
-
-      
-      Real COVAR(NCVM,NCVM),SWAP
-      INTEGER*4 NCVM,MA,LISTA(MFIT),MFIT,I,
-     *          J
-
-      DO 12 J=1,MA-1
-        DO 11 I=J+1,MA
-          COVAR(I,J)=0.
-11      CONTINUE
-12    CONTINUE
-      DO 14 I=1,MFIT-1
-        DO 13 J=I+1,MFIT
-          IF(LISTA(J).GT.LISTA(I)) THEN
-            COVAR(LISTA(J),LISTA(I))=COVAR(I,J)
-          ELSE
-            COVAR(LISTA(I),LISTA(J))=COVAR(I,J)
-          ENDIF
-13      CONTINUE
-14    CONTINUE
-      SWAP=COVAR(1,1)
-      DO 15 J=1,MA
-        COVAR(1,J)=COVAR(J,J)
-        COVAR(J,J)=0.
-15    CONTINUE
-      COVAR(LISTA(1),LISTA(1))=SWAP
-      DO 16 J=2,MFIT
-        COVAR(LISTA(J),LISTA(J))=COVAR(1,J)
-16    CONTINUE
-      DO 18 J=2,MA
-        DO 17 I=1,J-1
-          COVAR(I,J)=COVAR(J,I)
-17      CONTINUE
-18    CONTINUE
-      RETURN
-      END
-
-****************************************************************************
- 
-                  SUBROUTINE GAUSSJ(A,N,NP,B,M,MP)
-
-***************************************************************************
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C          numerical recipes routine, Press et. al.
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-
-
-      integer*4 NMAX
-      PARAMETER (NMAX=50)
-
-      INTEGER*4 IPIV(NMAX),INDXR(NMAX),INDXC(NMAX),
-     *          N,NP,M,MP,I,J,K,IROW,ICOL,L,LL
-      Real A(NP,NP),B(NP,MP),BIG,DUM,
-     *                 PIVINV
-c
-      integer*2 m3, n120
-c
-      data m3/-3/, n120/120/
-      
-      DO 11 J=1,N
-        IPIV(J)=0
-11    CONTINUE
-      DO 22 I=1,N
-        BIG=0.
-        DO 13 J=1,N
-          IF(IPIV(J).NE.1)THEN
-            DO 12 K=1,N
-              IF (IPIV(K).EQ.0) THEN
-                IF (ABS(A(J,K)).GE.BIG)THEN
-                  BIG=ABS(A(J,K))
-                  IROW=J
-                  ICOL=K
-                ENDIF
-              ELSE IF (IPIV(K).GT.1) THEN
-		call oerror(n120, m3, 'GAUSSJ: Singular matrix')
-	        goto 25
-              ENDIF
-12          CONTINUE
-          ENDIF
-13      CONTINUE
-        IPIV(ICOL)=IPIV(ICOL)+1
-        IF (IROW.NE.ICOL) THEN
-          DO 14 L=1,N
-            DUM=A(IROW,L)
-            A(IROW,L)=A(ICOL,L)
-            A(ICOL,L)=DUM
-14        CONTINUE
-          DO 15 L=1,M
-            DUM=B(IROW,L)
-            B(IROW,L)=B(ICOL,L)
-            B(ICOL,L)=DUM
-15        CONTINUE
-        ENDIF
-        INDXR(I)=IROW
-        INDXC(I)=ICOL
-        IF (A(ICOL,ICOL).EQ.0.) then
-	    call oerror(n120, m3, 'GAUSSJ: Singular matrix')
-	    goto 25
-	endif
-        PIVINV=1./A(ICOL,ICOL)
-        A(ICOL,ICOL)=1.
-        DO 16 L=1,N
-          A(ICOL,L)=A(ICOL,L)*PIVINV
-16      CONTINUE
-        DO 17 L=1,M
-          B(ICOL,L)=B(ICOL,L)*PIVINV
-17      CONTINUE
-        DO 21 LL=1,N
-          IF(LL.NE.ICOL)THEN
-            DUM=A(LL,ICOL)
-            A(LL,ICOL)=0.
-            DO 18 L=1,N
-              A(LL,L)=A(LL,L)-A(ICOL,L)*DUM
-18          CONTINUE
-            DO 19 L=1,M
-              B(LL,L)=B(LL,L)-B(ICOL,L)*DUM
-19          CONTINUE
-          ENDIF
-21      CONTINUE
-22    CONTINUE
-      DO 24 L=N,1,-1
-        IF(INDXR(L).NE.INDXC(L))THEN
-          DO 23 K=1,N
-            DUM=A(K,INDXR(L))
-            A(K,INDXR(L))=A(K,INDXC(L))
-            A(K,INDXC(L))=DUM
-23        CONTINUE
-        ENDIF
-24    CONTINUE
-25    RETURN
-      END
diff -uNr 3.5/source/conline/line/accums.f unipops-3.6/source/conline/line/accums.f
--- 3.5/source/conline/line/accums.f	2000-03-16 11:34:05.000000000 -0700
+++ unipops-3.6/source/conline/line/accums.f	2008-12-29 14:39:22.000000000 -0700
@@ -4,8 +4,8 @@
 C-------------------------------------------------------------------------------
 c
       real*4 XSCALE, newscale, oldscale, rinfinity 
-      integer*2 iptwh, jj, lk, ierr
-      INTEGER*4 ISTART, ISTOP, istarthold, istophold
+      integer*2 iptwh, jj, lk
+      INTEGER*4 ISTART, ISTOP, istarthold, istophold, ierr
       logical okreal4
 c
       INCLUDE 'cform.inc'
@@ -34,7 +34,7 @@
 c
       IF (NACCUM.EQ.0) then
 c
-        CALL COPY2(HDU_FLOAT_SIZE*2,iTWH(1,IPTWH),IACCUM(1))
+        CALL COPY2(HDU_FLOAT_SIZE*2,ITWH(1,IPTWH),IACCUM(1))
 c
         DACCUM(c12WT) = XSCALE
         DACCUM(c13NS)=1.
@@ -54,6 +54,7 @@
 c
         oldscale = daccum(c12wt)
  	newscale = DACCUM(c12WT) + XSCALE
+c
         DACCUM(c12WT) = newscale
         DACCUM(c13NS) = DACCUM(c13NS) + 1.0
         DACCUM(c13LS) = DTWH(c1SNO,iptwh)
diff -uNr 3.5/source/conline/line/au1.f unipops-3.6/source/conline/line/au1.f
--- 3.5/source/conline/line/au1.f	2000-03-16 11:34:06.000000000 -0700
+++ unipops-3.6/source/conline/line/au1.f	2008-12-29 14:39:22.000000000 -0700
@@ -16,10 +16,10 @@
       include 'stk.inc'
 c
       integer*2 j, itemp, iwork, ihold, iptwh, jj, iarrayout, 
-     .          iarrayin, isave, imagic, ifil, ier
+     .          iarrayin, isave, imagic, ifil
       integer*2 m1, m2, m3, n80, n105, n112, n120, n224, n226,
-     .          n232, n263, n367
-      integer*4 onlinesite, idtype, iver
+     .          n232, n263, n367, ier
+      integer*4 onlinesite, idtype, iver, ierr
       real*4 fscan, scan, icur
       character*60 errstr
 c
@@ -171,14 +171,14 @@
 C							  RECALL
 C---------------------------------------------------------------------
  150  CONTINUE
-      ISAVE=nint(NSAVE)
+      ISAVE=int2(nint(NSAVE))
       call getbyloc(dtwh(1,iptwh),isave,imagic,iounit(3),ciounit(3),ier)
       if (ier .lt. 0) then
          call oerror(-ier, m1, 'RECALL')
       else if (ier .gt. 0) then
          if (ier .eq. 368 .or. ier .eq. 371) then
             write(errstr, 1510) isave
- 1510       format('NSAVE ',i,' : RECALL')
+ 1510       format('NSAVE ',i1,' : RECALL')
          else
             write(errstr, 1520)
  1520       format('RECALL')
@@ -189,7 +189,7 @@
 C---------------------------------------------------------------------
 C							  SAVE
 C---------------------------------------------------------------------
- 160  isave = nint(nsave)
+ 160  isave = int2(nint(nsave))
 c
       if (itwh(1,iwork) .eq. 0) call oerror(n224, m2, 'SAVE')
 c     Needs a scan to be in array to be saved
@@ -215,7 +215,7 @@
       else if (ier .gt. 0) then
          if (ier .eq. 355) then
             write(errstr, 1630) isave
- 1630       format('Data exists at ',i,
+ 1630       format('Data exists at ',i1,
      .             ' .... can not overwrite! : SAVE')
          else
             write(errstr, 1620)
@@ -292,17 +292,18 @@
 C---------------------------------------------------------------------
 C					  CHECK
 C---------------------------------------------------------------------
- 70   ISAVE=nint(NSAVE)
+ 70   ISAVE=int2(nint(NSAVE))
       call checkbyloc(isave, iounit(3), ciounit(3), scan, ier)
       if (ier .lt. 0) then
 	call oerror(-ier, m1, 'CHECK')
       else if (ier .gt. 0) then
 	call oerror(ier, m2, 'CHECK')
       else 
+         ierr = int(ier)
 	if (scan .gt. 0) then
-	   WRITE (CPUF,73,IOSTAT=IER) ISAVE, SCAN
+	   WRITE (CPUF,73,IOSTAT=IERR) ISAVE, SCAN
         else
-           WRITE (CPUF,74,IOSTAT=IER) ISAVE
+           WRITE (CPUF,74,IOSTAT=IERR) ISAVE
 	endif
       endif
       CALL PWRITE (IPUF,n80)
@@ -359,11 +360,11 @@
       else if (ier .gt. 0) then
          if (ier .eq. 362) then
             write(errstr, 2811) nint(fscan)
- 2811       format('Subscan ',i,' : CGGET')
+ 2811       format('Subscan ',i1,' : CGGET')
          else if (ier .eq. 371) then
             ier = 357
             write(errstr, 2812) nint(fscan)
- 2812       format('Subscan ',i,
+ 2812       format('Subscan ',i1,
      .             ' is not a valid subscan number : CGGET')
          else
             write(errstr, 2813)
diff -uNr 3.5/source/conline/line/au2.F unipops-3.6/source/conline/line/au2.F
--- 3.5/source/conline/line/au2.F	2000-03-16 11:34:07.000000000 -0700
+++ unipops-3.6/source/conline/line/au2.F	2008-12-29 14:39:22.000000000 -0700
@@ -13,10 +13,10 @@
       INCLUDE 'appl.inc'
 c
       INTEGER*2 IPUF(40), j, iptwh, inn, ierr, lxa1, ishift,
-     .          istart, istop, n, ier, nchn, num, ntmp
+     .          istart, istop, n, nchn, num, ntmp
       integer*4 itemp, jj, istart0, istop0, istart1, istop1, lim1, lim2,
      .          lim, i, jj1, ib, ie, ll, i1, i2, ijk, ist, isp, ii,
-     .          ibad, iswtch, ilist(4), ii2, in, jcnt
+     .          ibad, iswtch, ilist(4), ii2, in, jcnt, ier
       integer*2 n224, m2, n120, m3, n238, n293, n227, n223, n228, n225,
      .		n288, n222, n292, n235, n80, n249, n251, n252, n253,
      .		n230, n248, n112, m1, n0, n3, n270, n268
@@ -25,8 +25,9 @@
      .	     tvel, rmaxnormal, rminnormal, rinfinity, centchan
       logical*4 invers
       logical okarray, okreal4, first
-      real*8 t12m, numaa1, numaa2, mag2, chantox
+      real*8 value12m, valuesmt, numaa1, numaa2, mag2, chantox
       CHARACTER*80 CPUF
+      character*8 t12m, smt
 c
 #ifdef CONTINUUM
 #else
@@ -41,6 +42,10 @@
       include 'core.inc'
 c
       equivalence (ipuf, cpuf)
+c     we need these equivalences, because g77 can't declare chars as reals
+c     (ex. NRAO declared t12m as a real*8; we have to have it as char*8)
+      equivalence (t12m, value12m)
+      equivalence (smt, valuesmt)
 c
 #ifdef CONTINUUM
 #else
@@ -49,6 +54,7 @@
 c
       DATA ITEMP /2/
       data t12m/'NRAO 12M'/
+      data smt/'ARO-HHT'/
       data n224/224/, m2/-2/, n120/120/, m3/-3/, n238/238/, n293/293/,
      .	   n227/227/, n223/223/, n228/228/, n225/225/,  n288/288/, 
      .	   n222/222/, n292/292/, n235/235/, n80/80/,  n249/249/,  
@@ -78,7 +84,8 @@
 c
       setrst = .true.
       useeff = .true.
-      if(dtwh(c1tel,iptwh).eq.t12m .or. 
+      if(dtwh(c1tel,iptwh).eq.value12m .or. 
+     .   dtwh(c1tel,iptwh).eq.valuesmt .or.
      .   .not. okreal8(dtwh(c12eit,iptwh))) useeff = .false.
 c
       if (useeff) then
@@ -164,7 +171,8 @@
       endif
 #else
       useeff = .true.
-      if(dtwh(c1tel,iptwh).eq.t12m .or. 
+      if(dtwh(c1tel,iptwh).eq.value12m .or. 
+     .   dtwh(c1tel,iptwh).eq.valuesmt .or.
      .	 .not. okreal8(dtwh(c12eit,iptwh)) ) useeff = .false.
 c
       IF (NACCUM.ne.1) then
@@ -203,7 +211,7 @@
 c
       call copy2(HDU_FLOAT_SIZE*2, IACCUM(1), itwh(1,iptwh))
 c
-      NACCUM=0
+      NACCUM = 0
       weight = 1
 c
       GO TO 99
@@ -366,6 +374,8 @@
 c
       size(1) = x
       size(2) = y / x
+      write(*,103) size(1), size(2)
+ 103  format("moments = ",f8.4,f8.4)
 #endif
 c
       GO TO 99
@@ -900,7 +910,8 @@
 C-----------------------------------------------------------------------
   250 CONTINUE
 c
-      if (dtwh(c1tel,iptwh) .ne. t12m) call oerror(n248, m2, 'PDOC')
+      if (dtwh(c1tel,iptwh) .ne. value12m .or.
+     .    dtwh(c1tel,iptwh) .ne. valuesmt) call oerror(n248, m2, 'PDOC')
 c
       do 2509 i1 = 1, 10
          if (.not.okreal4(twh(idatoff+i1,iptwh))) 
@@ -946,7 +957,7 @@
             write(cpuf, 1252, iostat=ier)
      .         (chshifts(ilist(ii2),1), chshifts(ilist(ii2), 2), 
      .         ii2=1,(ii-1))
- 1252 format(4(x,f8.2,x,f6.1,2x))
+ 1252 format(4(1x,f8.2,1x,f6.1,2x))
             call pwrite(ipuf, n80)
  251     continue
       endif
diff -uNr 3.5/source/conline/line/au3.f unipops-3.6/source/conline/line/au3.f
--- 3.5/source/conline/line/au3.f	2000-03-16 11:34:12.000000000 -0700
+++ unipops-3.6/source/conline/line/au3.f	2008-12-29 14:39:22.000000000 -0700
@@ -9,7 +9,7 @@
 c
       integer*2 j, iptwh, jj, istart, istop, i, ier, ix, iy, isort, i2,
      .		kk, ip, median, in, inn, md2
-      integer*4 I4, mdsize
+      integer*4 I4, mdsize, ierr
       integer*2 n0, n80, n120, n225, n237, n242, n297, n298, m3, m2
       integer*2 n25, n780, n1, n33, n268
       logical isfirst, okreal4
@@ -142,7 +142,7 @@
 54	    continue
       SUM=SUM2-SUM*SUM/TOTAL
       VRMS=SQRT(SUM/(TOTAL-1.0))
-      WRITE (CPUF,2000,IOSTAT=IER) VRMS
+      WRITE (CPUF,2000,IOSTAT=IERR) VRMS
       CALL PWRITE (IPUF,n80)
  2000 FORMAT(1X,'RMS VALUE',F8.4)
       GO TO 99
diff -uNr 3.5/source/conline/line/au4.F unipops-3.6/source/conline/line/au4.F
--- 3.5/source/conline/line/au4.F	2000-03-16 11:34:13.000000000 -0700
+++ unipops-3.6/source/conline/line/au4.F	2008-12-29 14:39:22.000000000 -0700
@@ -8,8 +8,8 @@
 c
 C-----------------------------------------------------------------
 c
-      INTEGER*2 iptwh, iy, itmp, short, nchan, ix, ier, j, ilct,
-     .          ichar, iyz, ixy, ipixel, sclc, color, ierr, nplot, 
+      INTEGER*2 iptwh, iy, itmp, short, nchan, ix, j, ilct,
+     .          ichar, iyz, ixy, ipixel, sclc, color, nplot, 
      .		curcur
       integer*2 n0, n1, n8, n10, n33, n112, n120, n222, n245, n299,
      .		n2, n5, n9, n14, n25, n50, m1, m2, m3, m16, n3,
@@ -18,7 +18,7 @@
      .		huered 
       character*10 getformat, format, stch
       integer*4 ialt, ibx, istart1, istart2, istop1, istop2,
-     .		jj, i
+     .		jj, i, ier
       real*8 chantox, xtochan
       logical okarray, seton, okreal8
 c
@@ -26,7 +26,7 @@
 c
       double precision dtmphdr(PADDED_HDR_SIZE)
       real rtmphdr(PADDED_HDR_SIZE*2)
-      integer*2 itmphdr(PADDED_HDR_SIZE*4), cflag
+      integer*2 itmphdr(PADDED_HDR_SIZE*4), cflag, ierr
       equivalence (dtmphdr, rtmphdr), (dtmphdr, itmphdr)
 c
       INCLUDE 'mappl.inc'
@@ -277,23 +277,23 @@
 c
       if (xorg(curcur()) .lt. xorg0) then
 	xorg(curcur()) = xorg0
-        write(stch,71,iostat=ierr) xorg0
+        write(stch,71,iostat=ier) xorg0
 71	format(i10)
 	call oerror(n245, n0, 'SETPAGE:  Setting X-origin to ' // stch)
       endif
       if (yorg(curcur()) .lt. yorg0) then
 	yorg(curcur()) = yorg0
-        write(stch,71,iostat=ierr) yorg0
+        write(stch,71,iostat=ier) yorg0
 	call oerror(n245, n0, 'SETPAGE:  Setting Y-origin to ' // stch)
       endif
       if (xmax(curcur()) .gt. xmax0) then
 	xmax(curcur()) = xmax0
-        write(stch,71,iostat=ierr) xmax0
+        write(stch,71,iostat=ier) xmax0
 	call oerror(n245, n0, 'SETPAGE:  Setting X-max to ' // stch)
       endif
       if (ymax(curcur()) .gt. ymax0) then
 	ymax(curcur()) = ymax0
-        write(stch,71,iostat=ierr) ymax0
+        write(stch,71,iostat=ier) ymax0
 	call oerror(n245, n0, 'SETPAGE:  Setting Y-max to ' // stch)
       endif
 c
diff -uNr 3.5/source/conline/line/au5.f unipops-3.6/source/conline/line/au5.f
--- 3.5/source/conline/line/au5.f	2000-03-16 11:34:16.000000000 -0700
+++ unipops-3.6/source/conline/line/au5.f	2008-12-29 14:39:22.000000000 -0700
@@ -13,14 +13,14 @@
 C-----------------------------------------------------------------------
 c
       integer*2 j, iptwh, iarrayin, iarrayout, i1, i2, j1, j2, irealp,
-     .		ierr, jj, numlevs, loc, itype, isize, curcur, 
+     .		jj, numlevs, loc, itype, isize, curcur, 
      .		itable, face, i3
       integer*2 m1, m2, m3, n0, n80, n112, n120, n254, n255, n256, n257,
      .          n258, n259, n264, n296, nconj, n272, n1, n2, n3, n4, n5,
      .		n267, n252, n274, n275
       integer*2 is1, n25, n780, ixmin, iymin, ixmax, iymax, ntick, col, 
-     .		row
-      integer*4 istart, istop, numx, numy, istart1, i, x1, x2 
+     .		row, ierr
+      integer*4 istart, istop, numx, numy, istart1, i, x1, x2 , ier
       integer*4 l1, long, ilct, numx1, numy1, numtot, numtot1
       real value, zmin, zmax, zdiff, percents(32), mratio1, cfactor,
      .	   mtemp, rstch(10), xmn, xmx, ymn, ymx, nyqrate, dishdia,
@@ -316,27 +316,27 @@
       endif
       if (mxmax .gt. mhead(mnaxis1,iptwh) .or. mxmax .le. 0.5) then
 	mxmax = nint(mhead(mnaxis1,iptwh))
-        write(stch,71,iostat=ierr) nint(mxmax)
+        write(stch,71,iostat=ier) nint(mxmax)
 71	format(i10)
 	call oerror(n258, n0, 'MRANGE:  Setting MXMAX to ' // stch(1:10))
       endif
       if (mymax .gt. mhead(mnaxis2,iptwh) .or. mymax .le. 0.5) then
 	mymax = nint(mhead(mnaxis2,iptwh))
-        write(stch,71,iostat=ierr) nint(mymax)
+        write(stch,71,iostat=ier) nint(mymax)
 	call oerror(n258, n0, 'MRANGE:  Setting MYMAX to ' // stch(1:10))
       endif
       if (mxmin .eq. mxmax) then
 	mxmin = 1.
 	mxmax = nint(mhead(mnaxis1,iptwh))
 	call oerror(n258, n0, 'MRANGE: Setting MXMIN to 1')
-        write(stch,71,iostat=ierr) nint(mxmax)
+        write(stch,71,iostat=ier) nint(mxmax)
 	call oerror(n258, n0, 'MRANGE:  Setting MXMAX to ' // stch(1:10))
       endif
       if (mymin .eq. mymax) then
 	mymin = 1.
 	mymax = nint(mhead(mnaxis2,iptwh))
 	call oerror(n258, n0, 'MRANGE: Setting MYMIN to 1')
-        write(stch,71,iostat=ierr) nint(mymax)
+        write(stch,71,iostat=ier) nint(mymax)
 	call oerror(n258, n0, 'MRANGE:  Setting MYMAX to ' // stch(1:10))
       endif
 c     If any input parameter is out of range, reset to default value
@@ -898,16 +898,16 @@
       ymx = chantox(m1, mhead(1,1), float(iymax), ierr)
 c     Fins max/min values in matrix -- skip over undefined points
 c
-      write(stch,211,iostat=ierr) cmhead(mbunit,iptwh), 
+      write(stch,211,iostat=ier) cmhead(mbunit,iptwh), 
      .		cmhead(mtype1,iptwh), cmhead(mtype2,iptwh)
 211   format(t12, a, t30, a, t46, a, t64, 'Pixels')
       call pwrite(rstch,n80)
 c
-      write(stch,201,iostat=ierr) 'Min. = ',zmin,xmn,ymn,ixmin,iymin 
+      write(stch,201,iostat=ier) 'Min. = ',zmin,xmn,ymn,ixmin,iymin 
       call pwrite(rstch,n80)
 201   format(a, 1pg15.7, ' at (', g15.7, ',', g15.7, 
      .	     ') (', i4, ',', i4, ')')
-      write(stch,201,iostat=ierr) 'Max. = ',zmax,xmx,ymx,ixmax,iymax
+      write(stch,201,iostat=ier) 'Max. = ',zmax,xmx,ymx,ixmax,iymax
       call pwrite(rstch,n80)
 c
       mlims(1,1)=zmin
@@ -1343,11 +1343,11 @@
      .				call oerror(n112, m2, 'PUTROW')
 c
       if (istop .gt. numx ) then
-	write(stch,'(i5)',iostat=ierr) numx
+	write(stch,'(i5)',iostat=ier) numx
 	call oerror(n267, n0, 'PUTROW: Using the first ' // stch(1:5) // 
      .				' values in Array 0')
       else if (istop .lt. numx ) then
-	write(stch,'(i5)',iostat=ierr) istop
+	write(stch,'(i5)',iostat=ier) istop
 	call oerror(n267, n0, 'PUTROW: Setting the first ' // stch(1:5) // 
      .				' in the row of Matrix 0')
       endif
@@ -1396,11 +1396,11 @@
      .				call oerror(n112, m2, 'PUTCOL')
 c
       if (istop .gt. numy ) then
-	write(stch,'(i5)',iostat=ierr) numy
+	write(stch,'(i5)',iostat=ier) numy
 	call oerror(n267, n0, 'PUTCOL: Using the first ' // stch(1:5) // 
      .				' values in Array 0')
       else if (istop .lt. numy ) then
-	write(stch,'(i5)',iostat=ierr) istop
+	write(stch,'(i5)',iostat=ier) istop
 	call oerror(n267, n0, 'PUTCOL: Setting the first ' // stch(1:5) // 
      .				' in the column of Matrix 0')
       endif
@@ -1449,11 +1449,11 @@
      .				call oerror(n112, m2, 'GETROW')
 c
       if (istop .gt. numx ) then
-	write(stch,'(i5)',iostat=ierr) numx
+	write(stch,'(i5)',iostat=ier) numx
 	call oerror(n267, n0, 'GETROW: Setting the first ' // stch(1:5) // 
      .				' values in Array 0')
       else if (istop .lt. numx ) then
-	write(stch,'(i5)',iostat=ierr) istop
+	write(stch,'(i5)',iostat=ier) istop
 	call oerror(n267, n0, 'GETROW: Using the first ' // stch(1:5) // 
      .				' in the row of Matrix 0')
       endif
@@ -1504,11 +1504,11 @@
      .				call oerror(n112, m2, 'GETCOL')
 c
       if (istop .gt. numy ) then
-	write(stch,'(i5)',iostat=ierr) numy
+	write(stch,'(i5)',iostat=ier) numy
 	call oerror(n267, n0, 'GETCOL: Setting the first ' // stch(1:5) // 
      .				' values in Array 0')
       else if (istop .lt. numy ) then
-	write(stch,'(i5)',iostat=ierr) istop
+	write(stch,'(i5)',iostat=ier) istop
 	call oerror(n267, n0, 'GETCOL: Using the first ' // stch(1:5) // 
      . 				' in the row of Matrix 0')
       endif
diff -uNr 3.5/source/conline/line/au6.F unipops-3.6/source/conline/line/au6.F
--- 3.5/source/conline/line/au6.F	2000-03-16 11:34:26.000000000 -0700
+++ unipops-3.6/source/conline/line/au6.F	2008-12-29 14:39:22.000000000 -0700
@@ -10,9 +10,10 @@
       integer*2 mmax
       parameter (mmax=80)
       integer*2 j, iptwh, i, istrt, istp, jj,  sclc,
-     .          kount, ierr, ix, iystrt, iy, ier,  ipixel, lxa1
+     .          kount, ierr, ix, iystrt, iy, ipixel, lxa1
       integer*2 m2, m3, n0, n1, n80, n120, n225, n289, n290, n298
       integer*2 n25, n780, n272, n295, n282, n33
+      integer*4 ier
       logical isfirst, okarray, okreal4
       REAL hw, cnt, s, ajj,covar(mmax,mmax),lcoef(mmax),
      .	   alph(mmax,mmax), chisq, alamda, alamda1, chisq1, constant
diff -uNr 3.5/source/conline/line/au8.F unipops-3.6/source/conline/line/au8.F
--- 3.5/source/conline/line/au8.F	2000-03-16 11:34:30.000000000 -0700
+++ unipops-3.6/source/conline/line/au8.F	2008-12-29 14:39:22.000000000 -0700
@@ -8,13 +8,16 @@
 c
 C---------------------------------------------------------------------
 C
-      real*8 source(2), dat, nrao12m, nrao140, nrao300, ctype(6), 
-     .       ctype2(8), dfreq, osb, b8, fshift
+      real*8 source(2), dat, dfreq, fshift, value12m, value140, 
+     .       value300, valuetype(6), valuetype2(8), valueosb, valueb8,
+     .       valuesmt
+      character*8  ctype(6), ctype2(8), osb, b8, nrao12m, nrao140, 
+     .       nrao300, smt
       real*4 LST, sincr, sbscan, si, sescan, ra,
      .       bw, scan, xcoord, ycoord, sa, se, decx, cosd, dco,
      .       rrao, rdco, re, rao
-      integer*2 ier, j, iptwh, imon, iday, iyr
-      integer*4 isb, ih, im, is, k1, icor1, icdtype, jj, ian, ia, i
+      integer*2 j, iptwh, imon, iday, iyr
+      integer*4 ier, isb, ih, im, is, k1, icor1, icdtype, jj, ian, ia, i
       integer*2 m1, m2, m3, n0, n1, n2, n80, n90, n112, n120, n224,
      .          n231, n239, n248, n281, n283
 #ifdef CONTINUUM
@@ -34,6 +37,16 @@
 c
       EQUIVALENCE (CPUF,IPUF)
       EQUIVALENCE (SOURCE,BSORCE)
+c     we need these equivalences, because g77 can't declare chars as reals
+c     (ex. NRAO declared nrao12m as a real*8; we have to have it as char*8)
+      equivalence (nrao12m, value12m)
+      equivalence (nrao140, value140)
+      equivalence (nrao300, value300)
+      equivalence (smt, valuesmt)
+      equivalence (ctype, valuetype)
+      equivalence (ctype2, valuetype2)
+      equivalence (osb, valueosb)
+      equivalence (b8, valueb8)
 #ifdef CONTINUUM
       equivalence (obsmode, robsmode)
 #endif
@@ -41,7 +54,8 @@
       save icor1
 c
       DATA nrao12m/'NRAO 12M'/, nrao140/'NRAO 43M'/, nrao300/'NRAO 93M'/
-      data ctype/2*'        ','EPOCRADC','GALACTIC','AZEL    ',
+      data smt/'ARO-HHT'/
+      data ctype/'        ','        ','EPOCRADC','GALACTIC','AZEL    ',
      .             'INDICATD'/
       data ctype2/'1950RADC','EPOCRADC','MEANRADC','APPRADC','APPHADC',
      2		  'USERDEF','2000RADC','INDRADC'/
@@ -163,29 +177,30 @@
   231    SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
       BW=abs(DTWH(C12FR,IPTWH))
       SCAN=DTWH(C1SNO,IPTWH)
-      if(dtwh(c1tel,iptwh).eq.nrao12m) then
+      if(dtwh(c1tel,iptwh).eq.value12m .or. 
+     .   dtwh(c1tel,iptwh).eq.valuesmt) then
          isb = int(dtwh(c9sb,iptwh))
 #ifdef CONTINUUM
          robsmode = dtwh(c1stc, iptwh)
          write(cpuf, 5000) scan, source, ih, im,
      .                dtwh(c12rf, iptwh), obsmode(5:8)
- 5000    format(x,f8.2,x,2a8,' LST=',i4,':',i2,' FREQ=',f11.4,x,a4)
+ 5000    format(1x,f8.2,1x,2a8,' LST=',i4,':',i2,' FREQ=',f11.4,1x,a4)
 #else
          WRITE(CPUF,5000,IOSTAT=IER) SCAN,source, ih, im,
      .               DTWH(C12RF,IPTWH),nint(bw*1000.),isb
- 5000    FORMAT(x,f8.2,x,2a8,' LST=',i4,':',i2,' FREQ=',F11.4,' RES=',
+ 5000    FORMAT(1x,f8.2,1x,2a8,' LST=',i4,':',i2,' FREQ=',F11.4,' RES=',
      .          i4,' SB=',i2)
 #endif
       else
 #ifdef CONTINUUM
          write(cpuf,5001) scan, source, ih, im,
      .			dtwh(c12ct,iptwh),bw
- 5001    format(x,f8.2,x,2a8,' LST=',i4,':',i2,' NT=',f11.4,
+ 5001    format(1x,f8.2,1x,2a8,' LST=',i4,':',i2,' NT=',f11.4,
      1       ' CALFCT=',1pg11.4)
 #else
          write(cpuf,5001) scan, source, ih, im,
      .			dtwh(c12rf,iptwh),bw
- 5001    format(x,f8.2,x,2a8,' LST=',i4,':',i2,' FREQ=',f11.4,
+ 5001    format(1x,f8.2,1x,2a8,' LST=',i4,':',i2,' FREQ=',f11.4,
      1       ' RES=',1pg11.4)
 #endif
       endif
@@ -235,15 +250,15 @@
       ycoord = dtwh(c4sx + icor1, iptwh)
 c
       do 233 icdtype = 1, 8
-	 if (dtwh(c4csc,iptwh) .eq. ctype2(icdtype)) then
+	 if (dtwh(c4csc,iptwh) .eq. valuetype2(icdtype)) then
       		CALL RNS(xcoord,n2,RSTRNG)
         	CALL RNS(ycoord,n1,DSTRNG)
 c
         	WRITE(CPUF,6002,IOSTAT=IER) SCAN,(BSORCE(I),I=1,12),
      .               iyr, imon,iday,(RSTRNG(i),i=2,6),(DSTRNG(i),i=1,5),
      .               im,is,dfreq
- 6002   	FORMAT (f8.2,x,12a1,x,i4,'-',i2.2,'-',i2.2,x,5A2,5A2,
-     .                  x,i3,':',i2.2,x,F11.4)
+ 6002   	FORMAT (f8.2,1x,12a1,1x,i4,'-',i2.2,'-',i2.2,1x,5A2,5A2,
+     .                  1x,i3,':',i2.2,1x,F11.4)
 c
 	   	goto 235
 	  endif
@@ -254,8 +269,8 @@
 c
       WRITE(CPUF,6003,IOSTAT=IER) SCAN,(BSORCE(I),I=1,12),
      .               iyr,imon,iday,xcoord,ycoord,im,is,dfreq
- 6003 FORMAT (f8.2,x,12a1,x,i4,'-',i2.2,'-',i2.2,x,2f10.4,
-     .                  x,i3,':',i2.2,x,F11.4)
+ 6003 FORMAT (f8.2,1x,12a1,1x,i4,'-',i2.2,'-',i2.2,1x,2f10.4,
+     .                  1x,i3,':',i2.2,1x,F11.4)
 c
 235   CALL PWRITE(IPUF,n90)
 c
@@ -267,7 +282,8 @@
       if (.not.okreal8(dtwh(c1sno,iptwh))) 
      .			call oerror(n224, m2, 'THUMB')
 c
-      if (dtwh(c1tel,iptwh).eq.nrao12m) then
+      if (dtwh(c1tel,iptwh).eq.value12m .or. 
+     .    dtwh(c1tel,iptwh).eq.valuesmt) then
         SA=DTWH(C2UXP,IPTWH)
         SE=DTWH(C2UYP,IPTWH)
         DECX=DTWH(C4EDC,IPTWH)
@@ -302,8 +318,8 @@
  7004   FORMAT (3X,'DEC',1X,4A2,3X,4A2)
         CALL PWRITE(IPUF,n80)
 c
-      else if (dtwh(c1tel,iptwh).eq.nrao140 .or.
-     1         dtwh(c1tel,iptwh).eq.nrao300 ) then
+      else if (dtwh(c1tel,iptwh).eq.value140 .or.
+     1         dtwh(c1tel,iptwh).eq.value300 ) then
 c
 	write(cpuf,9901) (dtwh(c2pc+k1-1,iptwh),k1=1,3)
 9901    format(' PVLS: ',1p3g15.6,' Arcmin')
@@ -320,7 +336,8 @@
 C                                        OSB
 C----------------------------------------------------------------
   270 CONTINUE
-      if (dtwh(c1tel,iptwh).eq.nrao12m) then
+      if (dtwh(c1tel,iptwh).eq.value12m .or.
+     .    dtwh(c1tel,iptwh).eq.valuesmt) then
 c				flip sign of c12fr, and c12dx
          dtwh(c12fr, iptwh) = - dtwh(c12fr, iptwh)
          dtwh(c12dx, iptwh) = - dtwh(c12dx, iptwh)
@@ -355,11 +372,11 @@
             dtwh(c9sb, iptwh) = 2
          endif
 c			and set/unset a flag in class 10
-         if (dtwh(c10pv, iptwh) .eq. osb) then
-            dtwh(c10pv, iptwh) = b8
-         else if (dtwh(c10pv, iptwh) .eq. b8 .or. 
+         if (dtwh(c10pv, iptwh) .eq. valueosb) then
+            dtwh(c10pv, iptwh) = valueb8
+         else if (dtwh(c10pv, iptwh) .eq. valueb8 .or. 
      .       dtwh(c10pv, iptwh) .eq. 0) then
-            dtwh(c10pv, iptwh) = osb
+            dtwh(c10pv, iptwh) = valueosb
          endif
       else
          call oerror(n248, m2, 'OSB')
diff -uNr 3.5/source/conline/line/au9.f unipops-3.6/source/conline/line/au9.f
--- 3.5/source/conline/line/au9.f	2000-03-16 11:34:31.000000000 -0700
+++ unipops-3.6/source/conline/line/au9.f	2008-12-29 14:39:22.000000000 -0700
@@ -7,12 +7,12 @@
 c
 C---------------------------------------------------------------------
 c
-      INTEGER*4  ISTART, ISTOP
-      integer*2 j, iptwh, jj, ix, iy, ierr
+      INTEGER*4  ISTART, ISTOP, ierr
+      integer*2 j, iptwh, jj, ix, iy
       integer*2 m2, m3, n0, n120, n225, n284, n298
       integer*2 n1, n25, n780, n33
       logical isfirst, okreal4
-      real*4 rampltde, rphase, rperiod, ajj, twopi
+      real*4 ajj, twopi
 c
       include 'core.inc'
       include 'cio.inc'
diff -uNr 3.5/source/conline/line/chantox.F unipops-3.6/source/conline/line/chantox.F
--- 3.5/source/conline/line/chantox.F	2000-03-16 11:35:49.000000000 -0700
+++ unipops-3.6/source/conline/line/chantox.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,189 +0,0 @@
-      double precision function chantox(unittype, array, v1, ierr)
-c
-c     @(#)chantox.F	5.1 06/22/94
-c
-c     Converts X1 from channel number to units specified by UNITTYPE.
-c	for array ARRAY.
-c
-c     UNITTYPE = (I*2) Units of V1.
-c  
-c		Continuum     	   	   Spectral Line
-c		-------------------------------------------
-c		-2 = matrix -x	   	    -2 = matrix -x
-c		-1 = matrix -y	   	    -1 = matrix -y
-c		1 = channel	   	    1 = channel
-c		2 = time offset	   	    2 = frequency offset
-c		3 = pos. offset (header)    3 = velocity (header)
-c		4 = pos. offset-x   	    4 = velocity (Radio)
-c		5 = pos. offset-y  	    5 = velocity (Optical)
-c		6 = position x	  	    6 = velocity (Relativity)
-c		7 = position y	  	    7 = velocity (Linear)
-c		8 = LST			    8 = rest frequency  (sig)
-c		9 = UT	 	    	    9 = sky frequency (sig)
-c			  		    *10 = rest frequency  (imag)
-c					    *11 = sky frequency (imag) 
-c
-c     Those items preceeded with a * have been implemented for 12m data only
-c
-c     IERR = (I*2) If conversion is not possible, ierr will be 1, else
-c	it will be 0.
-c     V1 = value to be converted.         
-c	
-      integer*2 unittype, ierr
-      real*8 array(*), lstut
-      real*4 v1
-      logical okreal8
-c
-#ifdef CONTINUUM
-#else
-      integer isb
-      double precision chantovel, dveldef, fshift, nrao12m
-      character*8 veldef, cnrao12m
-      equivalence (dveldef, veldef), (nrao12m, cnrao12m)
-c
-      data cnrao12m /'NRAO 12M'/
-c
-#endif
-c
-      include 'cform.inc'
-      include 'mform.inc'
-c
-      data lstut/1.002737908d0/
-c
-      ierr = 0
-c
-      if (unittype .eq. -2  .and. okreal8(array(mrval1)) .and. 
-     .	       okreal8(array(mdelt1)) .and. okreal8(array(mpix1)) ) then
-	chantox = (v1-array(mpix1))*array(mdelt1) + array(mrval1)
-c-----------------------
-c
-      else if (unittype .eq. -1  .and. okreal8(array(mrval2)) .and. 
-     .	       okreal8(array(mdelt2)) .and. okreal8(array(mpix2)) ) then
-	chantox = (v1-array(mpix2))*array(mdelt2) + array(mrval2)
-c-----------------------
-c
-      else if (unittype .eq. 1) then
-	chantox = v1
-c-----------------------
-c
-#ifdef CONTINUUM
-      else if (unittype .eq. 2 .and. okreal8(array(c3srt)) .and. 
-     .         okreal8(array(c12rp)) ) then
-	chantox = (v1-array(c12rp))*array(c3srt)
-c-----------------------
-c
-      else if (unittype .eq. 3 .and. okreal8(array(c12dx)) .and.
-     .      okreal8(array(c12x0)) .and.
-     .      okreal8(array(c12rp)) )  then
-        chantox = (v1-array(c12rp))*array(c12dx) + array(c12x0)
-c-----------------------
-c
-      else if (unittype .eq. 4 .and. 
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp)) * array(c6dx) * array(c3srt)/ 3600.
-c-----------------------
-c
-      else if (unittype .eq. 5 .and. 
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp)) * array(c6dy) * array(c3srt)/ 3600.
-c-----------------------
-c
-      else if (unittype .eq. 6 .and. 
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c4sx)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp)) * array(c6dx) * array(c3srt)/ 3600.
-     .		 + array(c4sx)
-c-----------------------
-c
-      else if (unittype .eq. 7 .and.
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c4sy)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	chantox = (v1 - array(c12rp))*array(c6dy) * array(c3srt) / 3600.
-     .		+ array(c4sy)
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3lst)) ) then 
-     	chantox = (v1 - array(c12rp))*array(c3srt)*lstut / 3600. +
-     .			array(c3lst)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3ut)) ) then 
-     	chantox = (v1 - array(c12rp))*array(c3srt)/ 3600. +
-     .			  + array(c3ut)
-c-----------------------
-c
-#else
-      else if (unittype .eq. 2 .and. okreal8(array(c12fr)) .and.
-     .	  okreal8(array(c12rp)) ) then
-	  chantox = (v1-array(c12rp))*array(c12fr)
-c-----------------------
-c
-      else if (unittype .eq. 3) then
-	  dveldef = array(c7vrd)
- 	  chantox = chantovel(v1, array, veldef(1:4), ierr)
-c-----------------------
-c
-      else if (unittype .eq. 4) then
-	chantox = chantovel(v1, array, 'RADI',ierr)
-c----------------------- 
-c
-      else if (unittype .eq. 5) then
-	chantox = chantovel(v1, array, 'OPTL',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 6) then
-	chantox = chantovel(v1, array, 'RELV',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 7) then
-	chantox = chantovel(v1, array, '    ',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. okreal8(array(c12rf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	chantox = (v1 - array(c12rp))*array(c12fr) + array(c12rf)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. okreal8(array(c12cf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	chantox = (v1 - array(c12rp))*array(c12fr) + array(c12cf)
-c-----------------------
-c
-      else if ((array(c1tel) .eq. nrao12m) .and. 
-     .        ((unittype .eq. 10) .or. (unittype .eq. 11))) then
-         if (okreal8(array(c9fif)) .and. okreal8(array(c9sb)) .and.
-     .       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) .and.
-     .       okreal8(array(c12cf))) then
-C
-            isb = ifix(array(c9sb))
-            if ((isb .eq. 0) .or. (isb .eq. 2)) then
-               fshift = -2.0 * array(c9fif) / 1000.0
-            else
-               fshift = 2.0 * array(c9fif) / 1000.0
-            endif
-c
-            if (unittype .eq. 10 .and. okreal8(array(c12rf)) .and.
-     .          array(c12cf) .ne. 0.0) then
-               chantox = (v1 - array(c12rp))*(-1.0*array(c12fr)) +
-     .                   (array(c12rf) * (1 + fshift/array(c12cf)))
-            else if (unittype .eq. 11) then
-               chantox = (v1 - array(c12rp)) * (-1.0 * array(c12fr)) +
-     .                   (array(c12cf) + fshift)
-            else
-               ierr = 1
-               chantox = v1
-            endif
-         endif
-#endif
-c
-      else
-	ierr = 1
-	chantox = v1
-c
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/line/cheader.f unipops-3.6/source/conline/line/cheader.f
--- 3.5/source/conline/line/cheader.f	2000-03-16 11:34:33.000000000 -0700
+++ unipops-3.6/source/conline/line/cheader.f	2008-12-29 14:39:23.000000000 -0700
@@ -4,9 +4,9 @@
 c
 c     Lists out the contents of the header of the current cube
 c
-      integer*2 istch(40), ierr, n, iinitp, n1
+      integer*2 istch(40), n, iinitp, n1
       integer*2 n80
-      integer*4 n24, nchar
+      integer*4 n24, nchar, ierr
       character*80 stch
       character*24 sdate
 c
diff -uNr 3.5/source/conline/line/chngol.F unipops-3.6/source/conline/line/chngol.F
--- 3.5/source/conline/line/chngol.F	2000-03-16 11:34:35.000000000 -0700
+++ unipops-3.6/source/conline/line/chngol.F	2008-12-29 14:39:23.000000000 -0700
@@ -8,8 +8,8 @@
 c     appropriateness of the file type is checked here.  
 c------------------------------------------------------------------------
 c
-      integer*4 iftype, iver
-      integer*2 m1, m2, n300, ier
+      integer*4 iftype, iver, ier
+      integer*2 m1, m2, n300
 c
       include 'cio.inc'
       include 'core.inc'
@@ -19,8 +19,8 @@
 #ifdef CONTINUUM
       if (iftype .ne. 3) call oerror(n300, m1, 'CHNGONLINE')
 #else
-      if (iftype .ne. 1 .and. iftype .ne. 2) 
-     .   call oerror(n300, m1, 'CHNGONLINE')
+      if (iftype .lt. 1 .or. iftype .gt. 6 .or. iftype .eq. 3) 
+     .     call oerror(n300, m1, 'CHNGONLINE')
 #endif
 c
       call chngonline(iftype, iver, projcode, ier)
@@ -29,6 +29,9 @@
       if (iftype .eq. 1) hcver = iver
       if (iftype .eq. 2) fbver = iver
       if (iftype .eq. 3) conver = iver
+      if (iftype .eq. 4) aosver = iver
+      if (iftype .eq. 5) ffbver = iver
+      if (iftype .eq. 6) ctsver = iver
 c
       return
       end
diff -uNr 3.5/source/conline/line/chngver.F unipops-3.6/source/conline/line/chngver.F
--- 3.5/source/conline/line/chngver.F	2000-03-16 11:34:35.000000000 -0700
+++ unipops-3.6/source/conline/line/chngver.F	2008-12-29 14:39:23.000000000 -0700
@@ -14,13 +14,13 @@
 #else
       character*80 cans, uans
 #endif
-      character*2 fb, hc
+      character*2 fb, hc, ff, ao, ct
 c
       include 'cio.inc'
       include 'core.inc'
 c
       data m1, n300 /-1, 300/
-      data fb /'FB'/, hc /'HC'/
+      data fb /'FB'/, hc /'HC'/, ff /'FF'/, ao /'AO'/, ct /'CT'/
 c
 #ifdef CONTINUUM
       if (iftype .eq. -1) iftype = 3
@@ -29,7 +29,8 @@
       if (iftype .eq. -1) then
  100     write(istdout,1000)
  1000    format(' Type of on-line file ',
-     .          '(FB=filterbank, HC=hybrid correlator) : ',$)
+     .          '(FB=filterbank, HC=hybrid correlator
+     .           FFB=Forbes filterbank, AOS, CTS=Chirp): ',$)
          read(istdin, 1010) cans
  1010    format(a80)
          call uppercase(cans, uans)
@@ -37,6 +38,12 @@
             iftype = 2
          else if (uans(1:2) .eq. hc) then
             iftype = 1
+         else if (uans(1:2) .eq. ff) then
+            iftype = 5
+         else if (uans(1:2) .eq. ao) then
+            iftype = 4
+         else if (uans(1:2) .eq. ct) then
+            iftype = 6
          else
             write(istdout, 1020) cans(1:2)
  1020       format(' Unrecognized file type : ',a2)
@@ -44,7 +51,7 @@
          endif
       endif
 c
-      if (iftype .ne. 1 .and. iftype .ne. 2) 
+      if (iftype .lt. 1 .or. iftype .gt. 6 .or. iftype .eq. 3) 
      .   call oerror(n300, m1, 'CHNGVER')
 #endif
 c
@@ -54,6 +61,9 @@
       if (iftype .eq. 1) hcver = iver
       if (iftype .eq. 2) fbver = iver
       if (iftype .eq. 3) conver = iver
+      if (iftype .eq. 4) aosver = iver
+      if (iftype .eq. 5) ffbver = iver
+      if (iftype .eq. 6) ctsver = iver
 c
       return
       end
diff -uNr 3.5/source/conline/line/conversion2.f unipops-3.6/source/conline/line/conversion2.f
--- 3.5/source/conline/line/conversion2.f	2000-03-16 11:30:03.000000000 -0700
+++ unipops-3.6/source/conline/line/conversion2.f	2008-12-29 14:39:22.000000000 -0700
@@ -8,7 +8,7 @@
       include 'params.inc'
       integer*4 maxclass, i, nextout, inclasses, ifirst, j, ilast,
      .		i1, i2, headsize, datalen, noint, spn, 
-     .           maxperclass(20), bootsize
+     .           maxperclass(20), bootsize, byteswap, index
       double precision input(*), output(*)
 c
       integer*2 iindat(16), ioutdat(16), ier
@@ -25,16 +25,27 @@
 c     MAXPERCLASS = max. number of R*8 entries in each class
 c
       ier = 0
+      byteswap = 0
       bootsize = (maxclass+5)/4
       do 10 i = 1, bootsize
 	dindat(i) = input(i)
 10	continue
-c     Move class descriptors into DINDAT
+c     Move int*2 class descriptors into DINDAT as R*8's
+c     N.B.  They haven't yet been byteswapped.
+c     We'll do that manipulation with the iindat array next...
 c
       nextout = bootsize + 1
 c     nextout = location in OUTPUT where next class starts
 c
+c     do we need to byte swap?  Let's check the number of classes to see.
+      if (iindat(1) .gt. maxclass) then
+         byteswap=1
+         call swapINT2(iindat(1))
+         call swapINT2(iindat(2))
+         call swapR8(input(iindat(2)))
+      endif
       headsize = input(iindat(2))/8.d0
+c     This is the first entry in class 1 (headlen is a R*8)
       if (headsize*8 .ne. nint(input(iindat(2)))) 
      .		headsize = headsize + 1
 c     headsize = num. R*8 words in input header
@@ -43,24 +54,69 @@
       ioutdat(1) = inclasses
       ioutdat(2) = (inclasses+5)/4 + 1
 c     Find max number of classes needed, up to above limit and
-c     start puting new class descriptors into DOUTDAT
+c     start putting new class descriptors into DOUTDAT
 c
+
       do 100 i = 1, inclasses
 	ifirst = iindat(i+1)
+c       this should already be byteswapped as needed
 	if (ifirst .lt. 0) then
 	   ier = -1
 	   goto 99
 	endif
+c       byteswap the next iindat entry if needed
+        if(byteswap .eq. 1) call swapINT2(iindat(i+2))
 	ilast = ifirst + min(maxperclass(i), iindat(i+2)-ifirst) - 1
         if (i .eq. inclasses .and. ilast .lt. ifirst) then
 	    ilast = min(ifirst+maxperclass(i), headsize )
 	else if (i .ne. inclasses .and. ilast .lt. ifirst) then
-	    ier = -1
 	    goto 99
 	endif
 	ioutdat(i+2) = ioutdat(i+1) + ilast - ifirst + 1
 	if (i .ne. 1) nextout = nextout + maxperclass(i-1)
         do 50 j = ifirst, ilast
+c          normally we'd just do a swapR8(), but we don't want to 
+c          swap character arrays.  So we have to special-case them out. 
+c          You should have your barf bags out for this part, kids! 
+           if(byteswap .eq. 1) then
+              index = j-ifirst+1
+c          we've already swapped index=1 and i=1 (headerlen, see above)
+              if(i.eq.1) then 
+                 if(index.gt.1 .and. index.lt.4) then 
+                    call swapR8(input(j))
+                 endif
+              else if (i.eq.1 .and. index.gt.14) then
+                 call swapR8(input(j))
+              else if (i.eq.2 .and. index.lt.13) then 
+                 call swapR8(input(j))
+              else if (i.eq.3 .and. index.lt.9) then 
+                 call swapR8(input(j))
+              else if (i.eq.3 .and. index.gt.9) then 
+                 call swapR8(input(j))
+              else if (i.eq.4 .and. index.lt.17) then 
+                 call swapR8(input(j))
+              else if (i.eq.5) then 
+                 call swapR8(input(j))
+              else if (i.eq.6 .and. index.lt.11) then 
+                 call swapR8(input(j))
+              else if (i.eq.7 .and. index.lt.6) then 
+                 call swapR8(input(j))
+              else if (i.eq.8) then 
+                 call swapR8(input(j))
+c     This next entry is for the 12m.  Green Bank has a 3 byte char array
+c     at the end of class 9.  But who cares? :)
+              else if (i.eq.9) then 
+                 call swapR8(input(j))
+              else if (i.eq.11 .and. index.lt.8) then 
+                 call swapR8(input(j))
+              else if (i.eq.12 .and. index.lt.21) then 
+                 call swapR8(input(j))
+              else if (i.eq.12 .and. index.eq.22) then 
+                 call swapR8(input(j))
+              else if (i.eq.13) then 
+                 call swapR8(input(j))
+              endif
+           endif
 	   output(j-ifirst+nextout) = input(j)
 50	   continue
 c	Move header items from INPUT to OUTPUT at their correct locations
@@ -100,13 +156,15 @@
 	ier = -1
 	goto 99
       endif
-c     Find where the data is in INPUT give up if no header info
+c     Find where the data is in INPUT; give up if no header info
 c
       if (i2 .ge. i1) then
 c	Move the data from INPUT to OUTPUT
 c		only do this if there really is some data there
-c		this isn't strictly necessary, but I think its clearer
-         do 300 i = i1, i2
+c		this isn't strictly necessary, but I think its clearer.
+c       And byteswap the R*4 data within each R*8 as needed
+         do 300 i = i1, i2            
+            if(byteswap .eq. 1) call swapR4inR8(input(i))
 	    output(i-i1+nextout) = input(i)
 300	 continue
       endif
diff -uNr 3.5/source/conline/line/cube.f unipops-3.6/source/conline/line/cube.f
--- 3.5/source/conline/line/cube.f	2000-03-16 11:34:37.000000000 -0700
+++ unipops-3.6/source/conline/line/cube.f	2008-12-29 14:39:23.000000000 -0700
@@ -11,12 +11,12 @@
       parameter (nwrds4 = 720)
       parameter (nwrds8 = 360)
 c
-      integer*2 oldrec, record, ldata2(nwrds2), blankfits2, ierr
+      integer*2 oldrec, record, ldata2(nwrds2), blankfits2
       character*1 cdata1(nwrds1)
       real rdata4(nwrds4)
       double precision rdata8(nwrds8)
       integer*2 m1, n357, n365
-      integer*4 l1, long, ldata4(nwrds4)
+      integer*4 l1, ldata4(nwrds4), ierr
       integer*4 iloc, position, blankfits1, blankfits4
       logical okreal4, okreal8
 c
@@ -34,8 +34,8 @@
       data oldrec/0/
 c     OLDREC = value of last record read in
 c
-      iloc = long(ii) + nint(chead(cnaxis1))* ( long(jj-1) 
-     .           + nint(chead(cnaxis2))* long(kk-1) )
+      iloc = int(ii) + nint(chead(cnaxis1))* ( int(jj-1) 
+     .           + nint(chead(cnaxis2))* int(kk-1) )
 c
       if ( abs(nint(chead(cbitpix))) .eq. 16) then
 	nwrds = nwrds2
diff -uNr 3.5/source/conline/line/drawcntr.f unipops-3.6/source/conline/line/drawcntr.f
--- 3.5/source/conline/line/drawcntr.f	2000-03-16 11:34:38.000000000 -0700
+++ unipops-3.6/source/conline/line/drawcntr.f	2008-12-29 14:39:23.000000000 -0700
@@ -9,7 +9,7 @@
       integer*2 nseg, ictr, sclc, ipixel, jseg1, curcur
       integer*2 ixtmp, iytmp, n1, n2, n8, n14
       real savevec(4,*), undefwp
-      integer*4 isize, jsize
+      integer*4 isize, jsize, ierr
 c
       include 'mappl.inc'
       include 'appl.inc'
@@ -20,7 +20,7 @@
       character*10 fmt, getformat
       real alabel,xold,yold,xfst,yfst,rad,direc,alength,
      .	   xlst,ylst, ep4 
-      integer*2 kseg, jseg, lseg, ierr
+      integer*2 kseg, jseg, lseg
 c
       data n1, n2, n8, n14 /1, 2, 8, 14/
 c
diff -uNr 3.5/source/conline/line/fgauss.f unipops-3.6/source/conline/line/fgauss.f
--- 3.5/source/conline/line/fgauss.f	2000-03-16 11:35:50.000000000 -0700
+++ unipops-3.6/source/conline/line/fgauss.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,111 +0,0 @@
-      subroutine fgauss(x, a, y, dyda, na)
-c
-c     @(#)fgauss.f	5.1 06/22/94
-c
-c     Calculates sum of (NA-3)/3 gaussians Y using parameters A(NA).
-c     Calculates partial derivatives DYDA(NA) of Y with respect to each A(I)
-c
-c     Equation to be calculated:
-c	
-c	 N
-c	____
-c	\      	
-c	 \       		        x - x(i) - X0 
-c	 /   H0 * h(i) *   exp  { - [  ---------------- ]**2 }
-c	/        		       1.41 * s(i) * S0
-c	----
-c	i = 1
-c
-c       where:	A(1) = H0
-c		A(2) = X0
-c		A(3) = S0
-c		A[3*i+1] = h(i)
-c		A[3*i+2] = x(i)
-c		A[3*i+3] = s(i)
-c		N = (NA-3)/3
-c
-c----------------------------------------------------------------
-c
-      real x, y, a(*), dyda(*)
-      integer*4 na
-c
-      real constant, ex, denom, fact, dy
-      integer*4 i
-      integer*2 n120, m3
-c
-      parameter (constant = 1.41421356237)
-      parameter (n120 = 120)
-      parameter (m3 = -3)
-c
-      if ( mod(na,3) .ne. 0 .or. na. lt. 3) 
-     .		call oerror(n120, m3, 'FGAUSS: Wrong number of coefficients')
-c
-      dyda(1) = 0.
-      dyda(2) = 0.
-      dyda(3) = 0.
-      y = 0.
-c
-      do 11 i = 4, na-1, 3
-	denom = constant*a(i+2)*a(3)
-	fact = ( x-a(i+1)-a(2) ) / denom
-	ex = exp( -fact*fact )
-	dy = a(i)*a(1)*ex
-	y = y + dy
-  	dyda(i) = a(1) * ex
-	dyda(i+1) = 2. * dy * fact / denom
-	dyda(i+2) = 2. * dy * fact*fact / a(i+2) 
-  	dyda(1) = dyda(1) + a(i)*ex
-	dyda(2) = dyda(2) + 2. * dy * fact / denom  
-	dyda(3) = dyda(3) + 2. * dy * fact*fact / a(3)   
-11	continue
-c
-      return
-      end
-c
-c------------------------------------------------------------------
-c
-      subroutine fgauss0(x, afunc, na)
-c
-c     Calculates AFUNC(NA) values for NA Gaussians at X.
-c
-c     Equation to be calculated:
-c	      	
-c	        	          x - x(i) - X0 
-c	  h(i)* H0 * exp  { - [  ---------------- ]**2 }
-c	        	         1.41 * s(i) * S0
-c
-c
-c       where:	COEF(1) = H0
-c		COEF(2) = X0
-c		COEF(3) = S0
-c		COEF[3*i+1] = h(i)
-c		COEF[3*i+2] = x(i)
-c		COEF[3*i+3] = s(i)
-c		I = 1,2,...,NA
-c
-c----------------------------------------------------------------
-c
-      real x, afunc(*)
-      integer*4 na
-c
-      real constant, xi, si
-      integer*4 i
-      integer*2 n120, m3
-c
-      include 'rip.inc'
-c
-      parameter (constant = 1.41421356237)
-      parameter (n120 = 120)
-      parameter (m3 = -3)
-c
-      if (na .gt. ing .or. na .lt. 1) 
-     .		call oerror(n120, m3, 'FGAUSS: Wrong number of coefficients')
-c
-      do 11 i = 1, na
-	xi = x - coef(3*i+2) - coef(2)
-	si = constant * coef(3*i+3) * coef(3)
-	afunc(i) = coef(1) * coef(3*i+1) * exp(- ( xi / si)**2 )
-11	continue
-c
-      return
-      end
diff -uNr 3.5/source/conline/line/fitfoc.f unipops-3.6/source/conline/line/fitfoc.f
--- 3.5/source/conline/line/fitfoc.f	2000-03-16 11:35:52.000000000 -0700
+++ unipops-3.6/source/conline/line/fitfoc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,223 +0,0 @@
-      subroutine fitfoc(nyqrate, dishdia, focalpt)
-c
-c     @(#)fitfoc.f	5.2 09/10/98
-c
-c     Finds the best location of the focus from the phase information
-c     Prints out results.  Subtracts fit from the data in Matrix 0 and
-c     places the model into Matrix 1.
-c
-      real nyqrate, dishdia, focalpt
-c
-      integer*2 m2, n256, mat0x, mat0y, i, j, n120, n0, istch(40),
-     .		iblank, niter, n282, kount, lastblnk
-      character*80 stch
-      character*2 blank
-      integer*4 NCA, kin, ndata, MFIT, MA, ilct
-c
-      parameter (NCA = 7)
-c
-      integer*4 lista(NCA)
-      real coef(NCA), covar(NCA,NCA), dx, dy, theta, thetamax, alamda,
-     .     alamda1, chisq, chisq1, alph(NCA,NCA), value, dyda(NCA), xc,
-     .	   yc, PRCERR
-      character*32 clab(NCA)
-c
-      external holfunc
-
-      parameter (MA = 7)
-      parameter (MFIT = 6)
-      parameter (PRCERR = 0.01)
-      parameter (M2 = -2)
-      parameter (N0 = 0)
-      parameter (N256 = 256)
-      parameter (N282 = 282)
-      parameter (N120 = 120)
-      parameter (NITER = 12)
-c
-      equivalence (blank,iblank), (stch,istch)
-c
-      INCLUDE 'appl.inc'
-      INCLUDE 'mappl.inc'
-      INCLUDE 'mform.inc'
-      INCLUDE 'cform.inc'
-c
-      data blank/'  '/
-      data clab/'Bias in Phase',
-     .          'Y Pointing Offset',
-     .          'X Pointing Offset',
-     .		'Lateral Focus Offset',
-     .		'Angle of Lat. Offset',
-     .		'Radial Focus Offset',
-     .		'Focal Length'/
-c
-      mat0x = nint(mhead(mnaxis1,1))
-      mat0y = nint(mhead(mnaxis2,1))
-      xc = float(mat0x) / 2. + 0.5
-      yc = float(mat0y) / 2. + 0.5
-c
-      if  (mat0x .le. 0 .or. mat0y .le. 0 .or. mat0x*mat0y .gt.
-     .     mdatasize/mnumarrays) call oerror(n256, m2, 'HOLFITFOC')
-c     Make sure the input matrix has been initialized
-c
-      do 43 i = 1, mheadsize
-	mhead(i,2) = mhead(i,1)
-43	continue
-c     Copy header
-c
-      dx = dishdia / (nyqrate*mat0x)
-      dy = dishdia / (nyqrate*mat0y)
-      thetamax = 2. * atan( dishdia / (4.*focalpt) )
-c
-      kin = idatoff + 1
-c
-      do 100 i = 1, mat0x
-	do 50 j = 1, mat0y
-	   if (mdata(ilct(i,j,1)) .ne. sngl(mhead(mblank,1)) ) then
-		twh(kin,1) = dx * (i-xc)
-		twh(kin,2) = dy * (j-yc)
-		theta = 2. * atan ( sqrt(twh(kin,1)**2 + twh(kin,2)**2 ) /
-     .				(2. * focalpt) )
-		if (theta .le. thetamax) then
-		   work(kin-idatoff) = 1.0
-		   xdata(kin-idatoff) = kin
-		   ydata(kin-idatoff) = mdata(ilct(i,j,1))
-		   kin = kin + 1
-		   if (kin .ge. MAX_DATA_POINTS) goto 101
-		endif
-	   endif
-50	   continue
-100	continue
-c
-101   ndata = kin - idatoff - 1
-c
-      if (ndata .le. MFIT) call oerror(n120, m2, 'HOLFITFOC')
-c
-      if (ndata .eq. MAX_DATA_POINTS) call oerror(n120, n0, 'HOLFITFOC')
-c
-      do 102 i = 1, MFIT
-	coef(i) = 0
-	lista(i) = i
-102	continue
-      coef(4) = 1.
-      coef(NCA) = focalpt
-c
-      alamda = -1
-      kount  = 0
-c
-      call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, MFIT, 
-     .	                 covar, alph, NCA, chisq, holfunc, alamda)
-c
-180     chisq1 = chisq
-	alamda1 = alamda
-        kount = kount + 1
-	if (kount .le. niter) then
-	   call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, MFIT, 
-     .	                 covar, alph, NCA, chisq, holfunc, alamda)
-	   if (alamda .gt. alamda1 .or. 
-     .         abs(1.-chisq1/chisq) .gt. PRCERR) goto 180
-	else
-	   call oerror(n282, n0, 'HOLFITFOC')
-	endif
-	alamda = 0.
-        call mrqmin(xdata, ydata, work, ndata, coef, MA, lista, MFIT, 
-     .	                 covar, alph, NCA, chisq, holfunc, alamda)
-c
-      stch = 'Covariant Matrix:         1    2    3    4    5    6'
-      call pwrite(istch, 80)
-c
-      do 502 i =1, MFIT
-	   write(stch,209) i, (nint(100.*
-     .		(covar(i,j)/sqrt(covar(i,i)*covar(j,j)))),j=1,i)
-209	   format(17x,i4,':',20i4)
-	   call pwrite(istch,80)
-502	   continue
-      call pwrite(iblank,1)
-c
-      do 4999 i = 1, MFIT
-          write(stch,500) clab(i)(1:lastblnk(clab(i))), coef(i),
-     .			  sqrt(covar(i,i))
-500	  format(a,':', t32, 1pg15.6, ' +/-', g15.6)
-	  call pwrite(istch, 80)
-4999	  continue
-      call pwrite(iblank,1)
-c
-      write(stch,410) kount, chisq, ndata
-410   format('Iterations:',i4, 5x,  'Chi Square:',1pg12.5, 5x,
-     .	     'No. Points:',i6)
-      call pwrite(istch, 80)
-      call pwrite(iblank,1)
-c
-      do 600 i = 1, mat0x
-	do 550 j = 1, mat0y
-		twh(1+idatoff,1) = dx * (i-xc)
-		twh(1+idatoff,2) = dy * (j-yc)
-		call holfunc(float(idatoff+1),coef, value, dyda, ma)
-c
-		mdata(ilct(i,j,1)) = mdata(ilct(i,j,1)) - value
-		mdata(ilct(i,j,2)) = value
-c
-550		continue
-600	continue
-c
-      return
-      end
-c
-      subroutine holfunc (xindex, a, value, dyda, na)
-c
-c     Describes Non-linear equation for phase variations across a
-c     dish due to feed position error (From Godwin et al., 1978
-c     Electronics Letters, Vol. 14, p. 134,)
-c
-c     xindex  = index to independent variables
-c     a = array of parameters
-c	  a(1) = a
-c	  a(2) = b
-c	  a(3) = c
-c	  a(4) = (2*pi/lambda)*deltat
-c	  a(6) = (2*pi/lambda)*deltaz
-c	  a(5) = phi prime
-c	  a(7) = focal length ( a convenient way of passing the focal
-c			length ).
-c     value = value of function at x
-c     dyda = partial derivitives of y with respect to a's
-c     na = number of parameters (= 6 here)
-c
-      integer*4 na
-      real value, a(na), dyda(na), xindex
-c
-      real x, y, theta, sinr, cosr, r
-      integer*2 n120, m3
-      integer*4 ix
-c
-      parameter (n120 = 120)
-      parameter (m3 = 3)
-c
-      include 'appl.inc'
-c
-      if (na .lt. 1 .or. na .gt. 7) call oerror(n120, m3, 'HOLFUNC')
-c
-      ix = nint(xindex)
-      x = twh(ix,1)
-      y = twh(ix,2)
-      theta = atan2(y,x)
-      r = 2 * atan( sqrt(x**2 + y**2)/(2*a(7)) )
-      sinr = sin(r)
-      cosr = cos(r)
-c
-      value = a(1) + a(2)*x + a(3)*y + a(4)*sinr*cos(theta-a(5))
-     .		 + a(6)*cosr
-c
-      dyda(1) = 1.
-      dyda(2) = x
-      dyda(3) = y
-      dyda(4) = sinr * cos(theta - a(5))
-      dyda(5) = a(4)*sinr*sin(theta-a(5))
-      dyda(6) = cosr
-      dyda(7) = 0.0
-c
-      return
-c
-c
-      end
-c
-c
diff -uNr 3.5/source/conline/line/funct.F unipops-3.6/source/conline/line/funct.F
--- 3.5/source/conline/line/funct.F	2000-03-16 11:34:40.000000000 -0700
+++ unipops-3.6/source/conline/line/funct.F	2008-12-29 14:39:24.000000000 -0700
@@ -1,24 +1,25 @@
       SUBROUTINE  FUNCT	(LFLAG,J)
-C-------------------------------------------------------------------------------
+C-----------------------------------------------------------------------------
 C  @(#)funct.F	5.2 05/04/98
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
+C-----------------------------------------------------------------------------
 C FUNCT contains frequently used fortran builtin functions
 C---------------------------------------------------------------------
 c
       integer*2 jj, lflag, j, iptwh2, icnum, istop, i1, loc, isize,
      .		isize2, iwpr, irealp, itype, numi2, numi4,
-     .		i, lastblnk, i2, i3, itag, isize1, ierr, ier,  
+     .		i, lastblnk, i2, i3, itag, isize1,
      .		iwpc, openmode, rwmode, exmode, posmode, SCR, NEW, OLD,
      .		UNK, EOF, REW, RO, WO, RW, iused
       integer*2 m1, m2, m3, n1, n30, n112, n120, n272, n225, n245, 
-     .		n28, n352, n370, n299
+     .		n28, n352, n370, n299, ierr
       real*4 cube, rcompar2(30), rcompar1(30), rchan
-      integer*4 ilct, index, ioget, iunit, slen, sused
+      integer*4 ilct, index, ioget, iunit, slen, sused, ier
       logical string
+      character*1 tempchar
       character*60 compar1, compar2
       character*1023 fullname
-      real*8 nrao140, nrao300, proto12m, x1, x2, dinfinity
+      character*8 nrao140, nrao300, proto12m, smt
+      real*8 x1, x2, dinfinity, value12m, value140, value300, valuesmt
       character*8 stat
       double precision chantox, xtochan
 c
@@ -31,12 +32,18 @@
       INCLUDE 'mappl.inc'
 c
       equivalence (compar1, rcompar1), (compar2, rcompar2)
+c     we need these equivalences, because g77 can't declare chars as reals
+c     (ex. NRAO declared proto12m as a real*8; we must have it as char*8)
+      equivalence (proto12m, value12m)
+      equivalence (smt, valuesmt)
+      equivalence (nrao140, value140)
+      equivalence (nrao300, value300)
 c
       data m1, m2, m3, n1, n28, n30, n112, n120, n272, n225, n245, n352
      .     /-1, -2, -3, 1, 28, 30, 112, 120, 272, 225, 245, 352/
       data n370, n299 /370, 299/
       data nrao140/'NRAO 43M'/, nrao300/'NRAO 93M'/
-      data proto12m /'PROTO12M'/
+      data proto12m /'PROTO12M'/, smt/'ARO-HHT'/
 c
       parameter (UNK = 0)
       parameter (OLD = 1)
@@ -111,7 +118,7 @@
       GO TO 5001
    46 CONTINUE
       if (sp.lt.1) call oerror(n112, m1, 'IFIX : One needed')
-      XX=FLOAT(IFIX(V(SP)))
+      XX=FLOAT(int(V(SP)))
       GO TO 5001
    47 CONTINUE
       if (sp.lt.2) call oerror(n112, m1, 'MAX : Two needed')
@@ -297,11 +304,12 @@
 1150	    continue
 c	 Find out if it is a string header word
 c	 Deal with class 9 and class 11 special cases
-	 if (i1 .eq. c9cff .and. dtwh(c1tel,iptwh2) .ne. nrao140 .and.
-     .		dtwh(c1tel,iptwh2) .ne. nrao300) string = .false.		
+	 if (i1 .eq. c9cff .and. dtwh(c1tel,iptwh2) .ne. value140 .and.
+     .		dtwh(c1tel,iptwh2) .ne. value300) string = .false.
          if (i1 .gt. c11ovv(1) .and. i1 .lt. c12fr .and. string) then
             string = .false.
-            if (dtwh(c3typ11,iptwh2) .eq. proto12m) then
+            if (dtwh(c3typ11,iptwh2) .eq. value12m .or.
+     .          dtwh(c3typ11,iptwh2) .eq. valuesmt) then
                do 1240 i = 1, 10
                   if (i1 .eq. c11pvd(i) .or. i1 .eq. c11ppt(i))
      .                        string = .true.
@@ -574,7 +582,7 @@
      .		'FOPEN: Scratch file cannot be opened for reading')
         iunit = ioget()
         if (iunit .lt. 0) call oerror(n28, m1, 'FOPEN')
-	open(unit=iunit, access='sequential', form='print', iostat=ier,
+	open(unit=iunit, access='sequential', form='formatted', iostat=ier,
      .		status='scratch')
 c
       else if (exmode .eq. NEW) then
@@ -585,7 +593,7 @@
         iunit = ioget()
         if (iunit .lt. 0) call oerror(n28, m1, 'FOPEN')
         call filecomp(compar1, fullname)
-	open(unit=iunit, access='sequential', form='print', iostat=ier,
+	open(unit=iunit, access='sequential', form='formatted', iostat=ier,
      .		status='new', file = fullname)
 c
       else if (exmode .eq. OLD .or. exmode .eq. UNK) then
@@ -599,13 +607,15 @@
         iunit = ioget()
         if (iunit .lt. 0) call oerror(n28, m1, 'FOPEN')
         call filecomp(compar1, fullname)
+        open(unit=iunit, access='sequential', form='formatted', 
+     .       iostat=ier, status= stat, file = fullname)
 	if (posmode .eq. EOF) then
-	   open(unit=iunit, access='sequential', form='print', iostat=ier,
-     .		status= stat, file = fullname, fileopt='eof')
-	else
-	   open(unit=iunit, access='sequential', form='print', iostat=ier,
-     .		status= stat, file = fullname)
-	endif
+c     g77 can't do fileopt=eof, so we'll seek there ourselves
+           do while (.true.)
+              read (iunit, end=100, fmt='(A1)') tempchar
+           end do
+c     should be at EOF now
+ 100    endif
 c
       else
         call oerror(n112, m1, 'FOPEN: Bad open parameter')
@@ -1020,7 +1030,7 @@
 c			how long is the string, result on stack must be mult of 4
          isize1 = lastblnk(compar1)
          if (isize1 .eq. 0) call oerror(n370, m2, 'FNAME')
-         if (mod(isize1, 4)  .ne. 0) isize1 = (ifix(isize1/4) + 1) * 4
+         if (mod(isize1, 4)  .ne. 0) isize1 = (int(isize1/4) + 1) * 4
 c			store contents of string into K array
          numi2 = min(n30, iwpc(isize1))
          call runtag(numi2, itag)
diff -uNr 3.5/source/conline/line/getbyloc.f unipops-3.6/source/conline/line/getbyloc.f
--- 3.5/source/conline/line/getbyloc.f	2000-03-16 11:34:45.000000000 -0700
+++ unipops-3.6/source/conline/line/getbyloc.f	2008-12-29 14:39:24.000000000 -0700
@@ -56,7 +56,7 @@
 c
       return
 c
- 20   format('Unknown disk error code ', i)
+ 20   format('Unknown disk error code ', i1)
 c
       end
 c
diff -uNr 3.5/source/conline/line/getbynum.f unipops-3.6/source/conline/line/getbynum.f
--- 3.5/source/conline/line/getbynum.f	2000-03-16 11:34:46.000000000 -0700
+++ unipops-3.6/source/conline/line/getbynum.f	2008-12-29 14:39:24.000000000 -0700
@@ -18,8 +18,9 @@
       character*(*) filename
       character*80 stch
       double precision array(*), xdata(maxsize)
-      integer*2 iunit, ierr, imagic, ier
+      integer*2 iunit, imagic
       integer*2 n80, n120, m3
+      integer*4 ier, ierr
       real scan, location
 c
       data n80, n120, m3 /80, 120, -3/
@@ -55,7 +56,7 @@
 c
       return
 c
- 20   format('Unknown disk error code ', i)
+ 20   format('Unknown disk error code ', i1)
 c
       end
 c
diff -uNr 3.5/source/conline/line/getbyrec.f unipops-3.6/source/conline/line/getbyrec.f
--- 3.5/source/conline/line/getbyrec.f	2000-03-16 11:35:55.000000000 -0700
+++ unipops-3.6/source/conline/line/getbyrec.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,160 +0,0 @@
-      subroutine getbyrec(array, scan, record, phase, imagic, iunit, 
-     .			  filename, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getbyrec.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Retrieves the array ARRAY from the ILOC location in file FILENAME
-c     which is attached to IO unit IUNIT.  
-c
-c     All of the work is done in getarec.
-c     The filename is ignored.
-c
-      include 'params.inc'
-c
-      integer*4 lunit, lrtn, ph, i, n2, nrecs, maxsize
-      integer*2 phase, record, fshort
-c
-      parameter (maxsize = HDU_FLOAT_SIZE)
-      character*(*) filename
-      character*80 stch
-      double precision array(*), sig(maxsize), ref(maxsize),
-     .		xdata(maxsize), fqsw, bmsw
-      integer*2 iunit, ierr, imagic, ier, totrecs, istart, istop, j
-      integer*2 n80, n120, n360, n0, m3, recmin, recmax
-      real scan, location, rsig(maxsize*2), rref(maxsize*2), data(1024),
-     .     weight, rweight, ffactor, totwght, effint 
-c
-      equivalence (rsig, sig), (rref, ref)
-c
-      include 'cform.inc'
-c
-      data n80, n120, m3, n2, n0, n360 /80, 120, -3, 2, 0, 360/
-      data bmsw/"LINEBMSW"/, fqsw/"LINEFQSW"/
-c
-      ierr = 0
-      lunit = iunit
-      location = scan
-
-      if (record .eq. 0) then
-	recmin = 1
-	recmax = 32767
-      else
-	recmin = record
-	recmax = record
-      endif
-      if (phase .eq. 0) then
-	ph = 1
-      else
-	ph = phase
-      endif
-      totrecs = 0
-c
-      do 100 i = recmin, recmax
-c
-         call getarec(lunit, location, ph, i, xdata, maxsize, lrtn)
-         if (lrtn .ne. 0) goto 99
-         call raz(sig)
-         call conversion2(xdata, sig, ier)
-         if (ier .ne. 0) then
-		ierr = 360
-		goto 999
-	 endif
-c
-	 if (i . eq. recmin) then
-	    call copy2(maxsize, sig, array)
-	    istart = sig(c12spn) + idatoff
-	    istop = istart + sig(c12ni) - 1
-	    nrecs = nint(sig(c12it) / sig(c3srt))
-	    if (i .eq. 1 .and. nrecs .ne. 1) call oerror(n360, n0, 
-     .			"Some records are possibly missing in file")
-	    effint = sig(c12eit) / nrecs
-	    ffactor = sig(c12rms)*sqrt(effint)/sig(c12sst)
-      	    totwght = 0
-      	    rweight = 0
-	    totrecs = 1
-	    array(c12it) = sig(c3srt)
-	    array(c12eit) = effint
-	    do 30 j = 1, istop - istart + 1
-		data(j) = 0.0
-30		continue
-	 else
-	    totrecs = totrecs + 1
-	    array(c12it) = array(c12it) + sig(c3srt)
-      	    array(c12eit) = array(c12eit) + effint
-	 endif
-c
-	 if (phase .eq. 0 .and. (sig(c1stc) .eq. fqsw .or.
-     .				 sig(c1stc) .eq. bmsw) ) then
-            call getarec(lunit, location, n2, i, xdata, maxsize, lrtn)
-            if (lrtn .ne. 0) goto 991
-            call raz(ref)
-            call conversion2(xdata, ref, ier)
-            if (ier .ne. 0) then
-		ierr = 360
-		goto 999
-	    endif
-	    weight = effint /
-     .		 ( (sig(c12sst)**2 + ref(c12rst)**2) /2.)
-	    totwght = totwght + weight
-	    rweight = rweight + effint / (ref(c12rst)**2)
-	    do 50 j = istart, istop
-		data(j-istart+1) = data(j-istart+1) + weight*ref(c12sst)*
-     .				(rsig(j)-rref(j))/rref(j)
-50		continue
-c
-	  else
-	    if (phase .eq. 2) then
-	       weight = effint / (sig(c12rst)**2)
-	    else 
-	       weight = effint / (sig(c12sst)**2)
-	    endif
-	    totwght = totwght + weight
-	    rweight = rweight + effint / (sig(c12rst)**2)
-	    do 60 j = istart, istop
-		data(j-istart+1) = data(j-istart+1) + weight*rsig(j)
-60		continue
-	  endif
-c
-100	  continue
-	
-99    if (lrtn .ne. 0. .and. (lrtn .ne. 4 .or. totrecs .eq. 0)) goto 991
-      imagic = 2
-      do 200 j = 1, istop - istart + 1
-	data(j) = data(j) / totwght
-200	continue
-      call copy(fshort(2*(istop-istart+1)), data, array((istart+1)/2) )
-      array(c12sst) = sqrt(array(c12eit)/totwght)
-      array(c12rst) = sqrt(array(c12eit)/rweight)
-      array(c12rms) = ffactor*array(c12sst)/sqrt(array(c12eit))
-      array(c1recid) = record
-      array(c3phsid) = phase
-      array(c1norec) = totrecs
-      if (phase .ge. 1 .and.  (sig(c1stc) .eq. fqsw .or.
-     .				 sig(c1stc) .eq. bmsw) ) then
-	    array(c12it) = array(c12it) * 4.
-	    array(c12eit) = array(c12eit) * 4.
-      endif
-c
-999   return
-c
-991   imagic = -1
-      if (lrtn .eq. 1) then
-            ierr = -370
-      else if (lrtn .eq. 2) then
-            ierr = -357
-      else if (lrtn .eq. 3) then
-            ierr = -359
-      else if (lrtn .eq. 4) then
-            ierr = 362
-      else if (lrtn .eq. 5) then
-            ierr = 371
-      else
-            write(stch, 20) lrtn
- 20   	    format('Unknown disk error code ', i)
-            call oerror(n120, m3, stch)
-      endif
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/line/getir.f unipops-3.6/source/conline/line/getir.f
--- 3.5/source/conline/line/getir.f	2000-03-16 11:35:54.000000000 -0700
+++ unipops-3.6/source/conline/line/getir.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,130 +0,0 @@
-      subroutine getir(scanno, record, phase, iptwh, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getir.f	5.2 09/10/98
-c
-c  Gets data for a particular scan, record, or phase combination.
-c
-C-------------------------------------------------------------------------------
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'cio.inc'
-      include 'cform.inc'
-c
-      integer*4 iptwh
-c
-      integer*4 onlinesite, is4, if4, irtn, deffeed, long
-      integer*2 ierr, record, phase, irtn2, ier
-      real*4 scanno, ascanno, bscanno
-      real*8 xtemp(HDU_FLOAT_SIZE/2), specproc, ac
-c
-      data specproc/'SPECPROC'/, ac/'1024ACIV'/
-c
-      if (onlinesite() .eq. 1) then
-c	Only for GB data
-	ierr = -240
-	goto 99
-      endif
-c
-      ierr = 0
-      ascanno = abs(scanno)
-      is4 = int(ascanno+0.001)
-      if4 = mod(100.*ascanno+0.5,100.)
-      if(if4.eq.0 .or. if4.gt.99) if4 = deffeed()
-      bscanno = is4 + float(if4) / 100.0
-c     Find the abs value of scan number (IS4) and feed number (IF4)
-c
-      irtn = -1
-c     Set up irtn with a 'scan not found' flag in case online file or
-c     ofline file doesn't exist.  IRTN will only be cleared when a scan
-c     is found and correctly converted to SDD.
-c
-      if (scanno .gt. 0) then
-c       First search on-line file and then the offline file in the user's 
-c	directory if scan number > 0.
-c
-	if (online) then
-c       Try to get from online file first, then offline
-c
-	  call gscan(is4, if4, xtemp, irtn)
-	  if (irtn .eq. 0) then
-             call getrecio(long(phase), long(record), if4, xtemp, irtn)
-c			if irtn is zero, everthing went well, pad it out
-             if (irtn .eq. 0) then
-	        call raz(dtwh(1,iptwh))
- 	        call conversion2(xtemp, dtwh(1,iptwh), irtn2)
-	        if (irtn2 .ne. 0) then
-	    	   ierr = -360
-		   goto 99
-	        endif
-             else
-c			getrecio returns appropriate error message codes
-                ierr = irtn
-                goto 99
-             endif
-	   endif
-        endif
-c       At this point, irtn = 0 if scan was found and the scan is in SDD
-c       format.  If not found, irtn is not zero.
-c
-        if (irtn .ne. 0 .and. iounit(5) .gt. 0) then
-c	    Scan wasn't in online and offline file exists so...
-c
-     	    call getbyrec(dtwh(1,iptwh), bscanno, record, phase,
-     .			  irtn2, iounit(5), ciounit(5),ier)
-	    if (ier .ne. 0) then
-		ierr = ier
-		goto 99
-	    endif
-	    if (irtn2 .ge. 0) irtn = 0
-	endif
-c	Gets scan from user's RECORDS file in SDD format; irtn = 0 if
-c	all goes well.
-c
-      else
-c       Try offline first of scan < 0.
-c
-	if (iounit(5) .gt. 0) then
-     	    call getbyrec(dtwh(1,iptwh), bscanno, record, phase,
-     .			  irtn2, iounit(5), ciounit(5),ier)
-	    if (ier .ne. 0) then
-		ierr = ier
-		goto 99
-	    endif
-	    if (irtn2 .ge. 0) irtn = 0
-	endif
-c	Gets scan from user's RECORDS file in SDD format; irtn = 0 if
-c	all goes well.
-c
-        if (irtn .lt. 0 .and. online) then
-c	   Scan wasn't in offline and online file exists so...
-c
-	   call gscan(is4, if4, xtemp, irtn)
-	   if (irtn .eq. 0) then
-             call getrecio(long(phase), long(record), if4, xtemp, irtn)
-c			if irtn is zero, everthing went well, pad it out
-             if (irtn .eq. 0) then
-	        call raz(dtwh(1,iptwh))
- 	        call conversion2(xtemp, dtwh(1,iptwh), irtn2)
-	        if (irtn2 .ne. 0) then
-	    	   ierr = -360
-		   goto 99
-	        endif
-             else
-c			getrecio returns appropriate error message codes
-                ierr = irtn
-                goto 99
-             endif
-           endif
-	endif
-c       At this point, irtn = 0 if scan was found and the scan is in SDD
-c       format.  If not found, irtn is not zero.
-c
-      endif
-c
-      if (irtn .ne. 0) ierr = 362
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/line/getlist.f unipops-3.6/source/conline/line/getlist.f
--- 3.5/source/conline/line/getlist.f	2000-03-16 11:34:46.000000000 -0700
+++ unipops-3.6/source/conline/line/getlist.f	2008-12-29 14:39:24.000000000 -0700
@@ -11,8 +11,8 @@
 c      
       character*(*) filename
       real scans(*)
-      integer*2 number, iunit, max, ierr
-      integer*4 lunit, lmax, lnumber, lrtn
+      integer*2 number, iunit, max
+      integer*4 lunit, lmax, lnumber, lrtn, ierr
 c
       number = 0
       ierr = 0
diff -uNr 3.5/source/conline/line/getotf.f unipops-3.6/source/conline/line/getotf.f
--- 3.5/source/conline/line/getotf.f	2000-03-16 11:35:56.000000000 -0700
+++ unipops-3.6/source/conline/line/getotf.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,70 +0,0 @@
-      subroutine getotf(scanno, record, iptwh, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getotf.f	5.2 09/10/98
-c
-c  Gets data for a particular scan, record, or phase combination.
-c
-C-------------------------------------------------------------------------------
-C
-      include 'appl.inc'
-      include 'cio.inc'
-      include 'cform.inc'
-c
-      integer*4 iptwh
-c
-      integer*4 onlinesite, is4, if4, irtn, lrec, nrec
-      integer*2 ierr, record, irtn2
-      real*4 scanno, ascanno, bscanno
-      real*8 xtemp(HDU_FLOAT_SIZE/2)
-c
-      if (onlinesite() .ne. 1) then
-c	Only for 12-m data
-	ierr = -246
-	goto 99
-      endif
-c
-      ierr = 0
-      ascanno = abs(scanno)
-      is4 = int(ascanno+0.001)
-      if4 = mod(100.*ascanno+0.5,100.)
-      bscanno = is4 + float(if4) / 100.0
-      lrec = record
-c     Find the abs value of scan number (IS4) and feed number (IF4)
-c
-      irtn = -1
-c     Set up irtn with a 'scan not found' flag in case online file or
-c     ofline file doesn't exist.  IRTN will only be cleared when a scan
-c     is found and correctly converted to SDD.
-c
-c       Only search on-line file
-c
-      if (online) then
-c
-         call gotfrec(is4, if4, lrec, nrec, xtemp, irtn)
-c				nrec is set by gotfrec
-         if (irtn .eq. 0) then
-            call raz(dtwh(1,iptwh))
-            call conversion2(xtemp, dtwh(1,iptwh), irtn2)
-            if (irtn2 .ne. 0) then
-               ierr = -360
-               goto 99
-            endif
-c			set 2 additional header words
-            dtwh(c1norec, iptwh) = nrec
-            dtwh(c1recid, iptwh) = lrec
-         else
-c			getotfrec had a problem, irtn is appropriate code
-            ierr = irtn
-            goto 99
-         endif
-      endif
-c       At this point, irtn = 0 if scan was found and the scan is in SDD
-c       format.  Otherwise, online was false.
-c
-c
-      if (irtn .ne. 0) ierr = 367
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/line/getpolz.f unipops-3.6/source/conline/line/getpolz.f
--- 3.5/source/conline/line/getpolz.f	2000-03-16 11:35:57.000000000 -0700
+++ unipops-3.6/source/conline/line/getpolz.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,70 +0,0 @@
-      subroutine getpolz(scanno, record, iptwh, ierr)
-C-------------------------------------------------------------------------------
-C  @(#)getpolz.f	1.2 09/10/98
-c
-c  Gets polz data for a particular scan, and record combination.
-c
-C-------------------------------------------------------------------------------
-C
-      include 'appl.inc'
-      include 'cio.inc'
-      include 'cform.inc'
-c
-      integer*4 iptwh
-c
-      integer*4 onlinesite, is4, if4, irtn, lrec, nrec
-      integer*2 ierr, record, irtn2
-      real*4 scanno, ascanno, bscanno
-      real*8 xtemp(HDU_FLOAT_SIZE/2)
-c
-      if (onlinesite() .ne. 1) then
-c	Only for 12-m data
-	ierr = -246
-	goto 99
-      endif
-c
-      ierr = 0
-      ascanno = abs(scanno)
-      is4 = int(ascanno+0.001)
-      if4 = mod(100.*ascanno+0.5,100.)
-      bscanno = is4 + float(if4) / 100.0
-      lrec = record
-c     Find the abs value of scan number (IS4) and feed number (IF4)
-c
-      irtn = -1
-c     Set up irtn with a 'scan not found' flag in case online file or
-c     ofline file doesn't exist.  IRTN will only be cleared when a scan
-c     is found and correctly converted to SDD.
-c
-c       Only search on-line file
-c
-      if (online) then
-c
-         call gpzrec(is4, if4, lrec, nrec, xtemp, irtn)
-c				nrec is set by gpzrec
-         if (irtn .eq. 0) then
-            call raz(dtwh(1,iptwh))
-            call conversion2(xtemp, dtwh(1,iptwh), irtn2)
-            if (irtn2 .ne. 0) then
-               ierr = -360
-               goto 99
-            endif
-c			set 2 additional header words
-            dtwh(c1norec, iptwh) = nrec
-            dtwh(c1recid, iptwh) = lrec
-         else
-c			gpzrec had a problem, irtn is appropriate code
-            ierr = irtn
-            goto 99
-         endif
-      endif
-c       At this point, irtn = 0 if scan was found and the scan is in SDD
-c       format.  Otherwise, online was false.
-c
-c
-      if (irtn .ne. 0) ierr = 367
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/source/conline/line/gmeasure.f unipops-3.6/source/conline/line/gmeasure.f
--- 3.5/source/conline/line/gmeasure.f	2000-03-16 11:34:48.000000000 -0700
+++ unipops-3.6/source/conline/line/gmeasure.f	2008-12-29 14:39:25.000000000 -0700
@@ -80,7 +80,7 @@
       include 'appl.inc'
       include 'cform.inc'
 c
-      Real F(5),SMx,Smax,S,Dex,f
+      Real F(5),SMx,Smax,S,Dex,ff
       Real SDV(5),W(5),V(5),pr1,pr2,pr3, dv(5)
       Real RMS,SFAC,wrd(5), velrms
 c
@@ -88,11 +88,11 @@
 c     
       Integer*4        I, J, Imax, il, ir, channo, firstch
       Integer*4        gmeasK(5), jl(5), jr(5), ibx
-      Integer*4        iostatus, istart, istop, chanil, chanir
+      Integer*4        iostatus, istart, istop, chanil, chanir, ier
 c
       character*80 stch
       integer*2 istch(40), short, inn, iptwh, nb, inn2, n80, n292, m1,
-     .		iymm10, n112, ierr, n225, m2, n0, n270, lxa1, n268
+     .		iymm10, n112, n225, m2, n0, n270, lxa1, n268, ierr
       logical okarray, okreal4, first
 c
       EQUIVALENCE (istch, stch)
@@ -136,7 +136,7 @@
       IF (PR1.le.0.) THEN
 229      call pread2( 'Enter string of modes to measure:', stch, nb)
          READ (stch,*,iostat=iostatus) PR1
-	 if (iostatus.ne.0 .or. PR1 .eq. '0.') then
+	 if (iostatus.ne.0 .or. PR1 .eq. 0.0) then
 		stch = 'Bad input... Try again'
 		call pwrite(istch, n80)
 		goto 229
@@ -240,7 +240,7 @@
 c
 	 chanIL = IL + firstch - 1
          chanIR = IR + firstch - 1
-         WRITE (stch,109,iostat=ierr) chanIL,chanIR,SDV(I),V(I),
+         WRITE (stch,109,iostat=ier) chanIL,chanIR,SDV(I),V(I),
      *            (JL(I)+firstch-1), (JR(I)+firstch-1),W(I)
   109    FORMAT (" area(",I3,",",I4,") =",E10.4,
      *           " Center =",F8.1,3X," Width(",I3,",",I4,") =",F8.1)
@@ -256,7 +256,7 @@
 C           velocity resolution caused by smoothing
 c           
 	    dv(i) = VELRMS*sfac
-            WRITE(stch,901,iostat=ierr)  dv(i)
+            WRITE(stch,901,iostat=ier)  dv(i)
  901        FORMAT (28X,'DeltaV =',F6.2)
 	    call pwrite(istch, n80)
 	 else
@@ -351,7 +351,7 @@
 ********************************************************************************
 C
       Real X(*),Y(*),SDV,AVE,BL,FRAC,BR,V,W,FLevel
-      Real Sdv, F,RMS,VR,VL
+      Real F,RMS,VR,VL
       Integer*4        Ifirst, last, JR, J, JL, I
 c
       integer*2 n229, n0
@@ -665,13 +665,13 @@
 
       INTEGER*4 IFIRST,ILAST,NORDER,
      *          IFR1L,IFR2L,IFRL,IFR1R,IFR2R,
-     *          IFRR,I,IPL,IPR,J
+     *          IFRR,I,IPL,IPR,J, ios
       Real VFRL,VFRR,YFRL,YFRR,dV,A(3),
-     *                 FR1,FR2,FR,FPL,FPR,FPL,B(3),
+     *                 FR1,FR2,FR,FPL,B(3),
      *                 FRMS,VRMSL,VRMSR,VRMS,
      *                 COVAR(3,3),TEMP
       character*80 stch
-      integer*2 istch(40), nb, n80, IOS
+      integer*2 istch(40), nb, n80
 c
       equivalence (istch, stch)
 
@@ -988,7 +988,7 @@
          WRITE(stch,'(2f6.1)',iostat=ios) FTST1,FTST2
          call pwrite(istch,n80)
          write(stch,10,iostat=ios) IFR1L-IFR2L+1,IFR2R-IFR1R+1
- 10      format('# of points used to fit l & r halves are',x,i3,x,i3 )
+ 10      format('# of points used to fit l & r halves are',1x,i3,1x,i3 )
 	 call pwrite(istch, n80)
 
 	 retry = .true.
@@ -1183,13 +1183,13 @@
       INTEGER*4 IFIRST,ILAST,NORDER,
      *          IFR1L,IFR2L,IFRL,IFR1R,IFR2R,
      *          IFRR,I,IPL,IPR, ifrp1, ifrm1, n1,
-     *          IFRR1,IFRR2,IFRL1,IFRL2
+     *          IFRR1,IFRR2,IFRL1,IFRL2, ios
       Real VFRL,VFRR,YFRL,YFRR,dV,A(3),
-     *                 FR1,FR2,FR,FPL,FPR,FPL,
+     *                 FR1,FR2,FR,FPR,FPL,
      *                 VRMSL,VRMSR,VRMS,COVAR(3,3),
      *                 YFRL1,YFRL2,YFRR1,YFRR2,TEMP
       character*80 stch
-      integer*2 istch(40), nb, n80, IOS
+      integer*2 istch(40), nb, n80
 c
       equivalence (istch, stch)
 
@@ -1475,7 +1475,7 @@
          WRITE(stch,'(2f6.1)',iostat=ios) FTST1,FTST2
          call pwrite(istch,n80)
          write(stch,10,iostat=ios) IFR1L-IFR2L+1,IFR2R-IFR1R+1
- 10      format('# of points used to fit l & r halves are',x,i3,x,i3 )
+ 10      format('# of points used to fit l & r halves are',1x,i3,1x,i3 )
          call pwrite(istch,n80)
 
 	 retry = .true.
@@ -1837,9 +1837,9 @@
       INTEGER*4 I1,I2,NORDER
       Real XA(NMAX),YA(NMAX),SIG(NMAX)
       Real COVAR(NCVM,NCVM),CHISQR
-      INTEGER*4 MFIT,MA,NDATA,LISTA(NCVM),I,NFREE
+      INTEGER*4 MFIT,MA,NDATA,LISTA(NCVM),I,NFREE, ios
       character*80 stch
-      integer*2 istch(40), ios, n80
+      integer*2 istch(40), n80
 c
       external funcs
 c
diff -uNr 3.5/source/conline/line/header.F unipops-3.6/source/conline/line/header.F
--- 3.5/source/conline/line/header.F	2000-03-16 11:34:54.000000000 -0700
+++ unipops-3.6/source/conline/line/header.F	2008-12-29 14:39:25.000000000 -0700
@@ -3,18 +3,19 @@
 C  @(#)header.F	5.3 09/10/98
 C-------------------------------------------------------------------------------
 c 
-c     Prints either GB or 12M header
+c     Prints either GB or 12M/SMT header
 c
 c************************************
       INTEGER*4 ISTC(2), IOBSOPR(2), ivdef(2), bsp
       INTEGER*2 STR1(4), STR2(4), STR5(4), STR6(4), STR7(4), STR8(4),
      .		RSTRNG2(6), DSTRNG3(6), estrng(6), lstrng(6), ipuf(40),
-     .		imon, iday, iyear, ier, imonth, rrstr(6), rdstr(6)
+     .		imon, iday, iyear, imonth, rrstr(6), rdstr(6)
       integer*2 m2, n0, n1, n2, n3, n80, n283
-      integer*4 iptwh, i, j, icdtype 
-      real*8  T03, ctype(8), t12m, nrao140, nrao300, vdef, SOURCE(2), 
-     .	      OBSNAME(2), STC, OBSOPR, UDATE, digit, dfform(3), 
-     .	      dcoordcode
+      integer*4 iptwh, i, j, icdtype, ier
+      character*8  digit, ctype(8), t12m, nrao140, nrao300, smt
+      real*8  T03, vdef, SOURCE(2), 
+     .	    OBSNAME(2),STC, OBSOPR, UDATE, dfform(3), value(8),
+     .	    dcoordcode, value300, value12m, value140, valuesmt, valuedig
       real*4 lst, ut, ra, dec, az, el, sx, sy, rx, ry
       character*80 cpuf
       character*24 cfform
@@ -46,8 +47,16 @@
       equivalence (cpuf, ipuf), (stc,istc), (obsopr,iobsopr)
       equivalence (rstrng2, crstrng2), (dstrng3, cdstrng3)
       equivalence (rrstr, crrstr), (rdstr, crdstr)
+c     we need these equivalences, because g77 can't declare chars as reals
+c     (ex. NRAO declared t12m as a real*8; we have to have it as char*8)
+      equivalence (t12m, value12m)
+      equivalence (nrao140, value140)
+      equivalence (nrao300, value300)
+      equivalence (smt, valuesmt)
+      equivalence (digit, valuedig)
+      equivalence (ctype, value)
 c
-      DATA BSP/'BSP '/
+      DATA BSP/'BSP '/,smt/'ARO-HHT'/
       data nrao140/'NRAO 43M'/,nrao300/'NRAO 93M'/,t12m/'NRAO 12M'/
       data T03 /0.001d0/, digit/'DIGITAL '/
 c
@@ -59,9 +68,11 @@
 c
       iptwh = 1
 c
-      if(dtwh(c1tel,iptwh).eq.nrao140 .or. 
-     .		dtwh(c1tel,iptwh).eq.nrao300) goto 20
-      if(dtwh(c1tel,iptwh).ne.t12m) call oerror(n283, m2, 'HEADER')
+      if(dtwh(c1tel,iptwh).eq.value140 .or. 
+     .		dtwh(c1tel,iptwh).eq.value300) goto 20
+c
+      if(dtwh(c1tel,iptwh).ne.value12m .and.
+     .   dtwh(c1tel,iptwh).ne.valuesmt) call oerror(n283, m2, 'HEADER')
 c
       DO 11 I = 1,2
          SOURCE(I)=DTWH(C1SNA+I-1,IPTWH)
@@ -105,7 +116,7 @@
       rx = dtwh(c4rx, iptwh)
       ry = dtwh(c4ry, iptwh)
       do 100 icdtype = 1, 8
-         if (dcoordcode .eq. ctype(icdtype)) goto 110
+         if (dcoordcode .eq. value(icdtype)) goto 110
  100  continue
  110  if (coordcode .eq. 'USERDEF ' .or. icdtype .gt. 8 .and.
      .    coordcode .ne. 'GALACTIC') then
@@ -367,7 +378,7 @@
  3008 FORMAT(33X,F10.8,15X,F5.0)
  3009 FORMAT(2X,'TIME',3X,'NS',4X,'SEC',7X,'VEL',4X,a5,'/VR',3X,
      .       'VEL/CHAN',3X,'TOL',5X,'F0')
- 3010 FORMAT(1X,F5.1,I5,F9.1,F11.2,F9.3,F10.3,F7.0,F7.1,x,a4)
+ 3010 FORMAT(1X,F5.1,I5,F9.1,F11.2,F9.3,F10.3,F7.0,F7.1,1x,a4)
  3011 format('V',a4)
 c
 c
@@ -467,7 +478,7 @@
 c     Don't repeat a coordinate that will already be on the output
 c
       do 233 icdtype = 1, 8
-	if (dcoordcode .eq. ctype(icdtype)) then
+	if (dcoordcode .eq. value(icdtype)) then
             CALL RNS ( RA,n2,RSTRNG2)
             CALL RNS (DEC,n1,DSTRNG3)
             write (unit=cpuf,fmt=2547,iostat=ier) coordcode,
@@ -491,7 +502,7 @@
      .       '  N.Tube  (Counts/K)')
       call pwrite(ipuf,n80)
 c
-      if (dtwh(c1bke,iptwh) .eq. digit) then
+      if (dtwh(c1bke,iptwh) .eq. valuedig) then
 	TSYS   = dTWH(c12sst,IPTWH)
         bw  = dTWH(c12bw,IPTWH)
       else
diff -uNr 3.5/source/conline/line/initappl.f unipops-3.6/source/conline/line/initappl.f
--- 3.5/source/conline/line/initappl.f	2000-03-16 11:34:58.000000000 -0700
+++ unipops-3.6/source/conline/line/initappl.f	2008-12-29 14:39:25.000000000 -0700
@@ -10,8 +10,7 @@
       INCLUDE 'mform.inc'
 C
 C
-      integer*4 inf, iiappl
-      integer*2 i
+      integer*4 inf, iiappl, i
       logical*2 first
       real*4 rinf, rinfinity
       real*8 dinf, dinfinity
diff -uNr 3.5/source/conline/line/itfits.F unipops-3.6/source/conline/line/itfits.F
--- 3.5/source/conline/line/itfits.F	2000-03-16 11:34:58.000000000 -0700
+++ unipops-3.6/source/conline/line/itfits.F	2008-12-29 14:39:25.000000000 -0700
@@ -5,9 +5,9 @@
 c      function used by select to see if the values of the various
 c      index fields fit the selection criteria stored in core
 c
-      integer*2 idat(1)
-      integer*2 index(32), i4pc, i8pc, i16pc, ii, iobsmode, obs, mode
-      integer*2 is_mode, irtn, lastblnk
+      integer*2 idat(1), index(32), lastblnk
+      integer*2 i4pc, i8pc, i16pc, ii, iobsmode, obs, mode
+      integer*2 is_mode, irtn
       integer*2 n1, n2, n4, n5, n7, n8, n9, n17, n19, n21, n25, n27
       integer*4 i1, inrange, inrange8
       real*4 rindex(16), scanno, feedno, sourcex, sourcey, lst, ut_date
@@ -59,8 +59,8 @@
 c				scan and feed number
 c				scan number is just truncated but
 c				feed number needs to be nearest int
-      scanno = int(rindex(i4pc(n17)))
-      feedno = nint((rindex(i4pc(n17)) - scanno) * 100.0)
+      scanno = aint(rindex(i4pc(n17)))
+      feedno = anint((rindex(i4pc(n17)) - scanno) * 100.0)
 c
       if (localfit) localfit = localfit .and. 
      .     (inrange(scan_min, scan_max, scanno, default) .eq. 1)
diff -uNr 3.5/source/conline/line/laub.f unipops-3.6/source/conline/line/laub.f
--- 3.5/source/conline/line/laub.f	2000-03-16 11:34:59.000000000 -0700
+++ unipops-3.6/source/conline/line/laub.f	2008-12-29 14:39:25.000000000 -0700
@@ -17,7 +17,9 @@
       real*4 df, bm, sm, atemp, toff, off, diff, ton, pr1,
      .		tsyson, tsysoff, f, scanno, rinfinity, ref(MAX_DATA_POINTS)
       character*1 losgn
-      real*8 dsmbm(3), nrao140, nrao300, t12m, dinfinity, specproc 
+      real*8 dsmbm(3), dinfinity, value12m,value140,value300,valuespec,
+     .     valuesmt
+      character*8 nrao140, nrao300, t12m, specproc, smt
       character*24 csmbm
       CHARACTER*80 CPUF
       character*60 errstr
@@ -29,10 +31,17 @@
 c
       EQUIVALENCE (CPUF,IPUF)
       equivalence (csmbm, dsmbm)
+c     we need these equivalences, because g77 can't declare chars as reals
+c     (ex. NRAO declared t12m as a real*8; we have to have it as char*8)
+      equivalence (t12m, value12m)
+      equivalence (nrao140, value140)
+      equivalence (nrao300, value300)
+      equivalence (smt, valuesmt)
+      equivalence (specproc,valuespec)
 c
       DATA IHOLD /3/, ITEMP /2/
       data t12m/'NRAO 12M'/,nrao140/'NRAO 43M'/,nrao300/'NRAO 93M'/
-      data specproc/'SPECPROC'/
+      data specproc/'SPECPROC'/,smt/'ARO-HHT'/
       data n283/283/, m2/-2/, n120/120/, m3/-3/, n291/291/, n247/247/,
      .	   n112/112/, m1/-1/, n225/225/, n221/221/, n222/222/
 c
@@ -47,10 +56,11 @@
 C						RAP
 C----------------------------------------------------------------------
   170 CONTINUE
-      if(dtwh(c1tel,iptwh).eq.t12m) then
+      if(dtwh(c1tel,iptwh).eq.value12m .or. 
+     .   dtwh(c1tel,iptwh).eq.valuesmt) then
 	goto 1709
-      else if(dtwh(c1tel,iptwh).eq.nrao140 .or. 
-     1	      dtwh(c1tel,iptwh).eq.nrao300) then
+      else if(dtwh(c1tel,iptwh).eq.value140 .or. 
+     1	      dtwh(c1tel,iptwh).eq.value300) then
 	goto 1719
       else
         call oerror(n283, m2, 'RAP')
@@ -145,7 +155,7 @@
       if (ierr .ne. 0) call oerror(n247, m2, "RAP")
 c     Create Reference Spectra
 c
-      if (dtwh(c1bke,iptwh).eq. specproc) then
+      if (dtwh(c1bke,iptwh).eq. valuespec) then
         tsyson = dTWH(c12rst,IPTWH)
         tsysoff = sqrt( (dTWH(c12sst,IPTWH)**2)*2. - tsyson**2 )
       else
@@ -208,10 +218,11 @@
 c  Green Bank: (0) = ON  (1) = OFF
 C ------------------------------------------------------------------
   300 CONTINUE
-      if(dtwh(c1tel,iptwh).eq.nrao140.or.
-     1   dtwh(c1tel,iptwh).eq.nrao300) then
+      if(dtwh(c1tel,iptwh).eq.value140.or.
+     1   dtwh(c1tel,iptwh).eq.value300) then
 	goto 3021
-      else if(dtwh(c1tel,iptwh).eq.t12m) then
+      else if(dtwh(c1tel,iptwh).eq.value12m .or.
+     .        dtwh(c1tel,iptwh).eq.valuesmt) then
 	goto 3001
       else
 	call oerror(n283, m2, 'TEMP')
@@ -268,7 +279,7 @@
 c     Update all necessary header parameters (see memo by R.Maddalena
 c	dated Jan 22, 1992).
 c
-      if (dtwh(c1bke,iptwh).eq. specproc) then
+      if (dtwh(c1bke,iptwh).eq. valuespec) then
 	tsyson = tsysoff
 	istart = istart + 1
 	istop = istop - 1
diff -uNr 3.5/source/conline/line/lpdoc.f unipops-3.6/source/conline/line/lpdoc.f
--- 3.5/source/conline/line/lpdoc.f	2000-03-16 11:35:19.000000000 -0700
+++ unipops-3.6/source/conline/line/lpdoc.f	2008-12-29 14:39:27.000000000 -0700
@@ -1,14 +1,13 @@
       SUBROUTINE pdoc(ifit)
 C-----------------------------------------------------------------------
 C @(#)lpdoc.f	5.3 09/10/98
-C
 C-----------------------------------------------------------------------
       integer*2 ipos(4), jpos(4), lstrng(6), dstrng(5), gstrng(5),
-     .          str1(4), str2(4), ichsize, ifit, ier, imon, iday, iyr,
+     .          str1(4), str2(4), ichsize, ifit, imon, iday, iyr,
      .          il1, il2, il3, lastblnk
       integer*4 IM(3), IS(3), JM(3), JS(3), iptwh, nn, i, iazof, 
      .          ielof, iscan, ifb, itm, its, ihp, ns, isb, nloffset, 
-     .          plen, ifeed
+     .          plen, ifeed, ier
       integer*2 m2, n0, n1, n3, n72, n80, n234, n352, n355, n356
       integer*2 n25, n50, n75, n275, n300, n325, n450, n475, n500,
      .          n625, n650, n675, n700, n725, n750, n775, n800
@@ -23,7 +22,7 @@
       real*8 pt_model, rx_info(2)
       character*8 cpt_model
       character*16 crx_info
-      character*1 ipl, ipr(3), jpr(3), ic(4), imu
+      character*1 ipl, ipr(3), jpr(3), ic(4), imu, tempchar
       character*1023 pfile
 c
       INCLUDE 'appl.inc'
@@ -66,10 +65,10 @@
 c
       OBSOPR=DTWH(C1OBS,IPTWH)
       AZOF=DTWH(C2UXP,IPTWH)
-      IAZOF=IFIX(AZOF+SIGN(0.5,AZOF))
+      IAZOF=int(AZOF+SIGN(0.5,AZOF))
       AZOF=FLOAT(IAZOF)
       ELOF=DTWH(C2UYP,IPTWH)
-      IELOF=IFIX(ELOF+SIGN(0.5,ELOF))
+      IELOF=Int(ELOF+SIGN(0.5,ELOF))
       ELOF=FLOAT(IELOF)
       LST=DTWH(C3LST,IPTWH)
       CALL RNS(LST,n0,LSTRNG)
@@ -78,7 +77,7 @@
       ITS=nint(DTWH(C12SST,IPTWH))
       IFB=nint(abs(DTWH(C12FR,IPTWH)*1000.0))
       hp = dtwh(c7fw, iptwh)
-      IHP=IFIX(HP+0.5)
+      IHP=Int(HP+0.5)
       NS=DTWH(C12IT,IPTWH)/DTWH(C3SRT,IPTWH)
       DAT=DTWH(C3DAT,IPTWH)
       CALL UDAT(DAT,IMON,IDAY,IYR)
@@ -227,10 +226,10 @@
       CAZ=CAZ+CAZZ(NN)
       CELL(NN)=ELOF+(2.0-CG(1))*HP
       CEL=CEL+CELL(NN)
-      IPOS(NN*2-1)=510+IFIX((5.0-CG(3))*182.+0.5)
-      JPOS(NN*2-1)=475+IFIX((2.0-CG(1))*175.+0.5)
-      IPOS(NN*2)=510+IFIX((5.0-CG(4))*182.+0.5)
-      JPOS(NN*2)=475+IFIX((2.0-CG(2))*175.+0.5)
+      IPOS(NN*2-1)=510+INT((5.0-CG(3))*182.+0.5)
+      JPOS(NN*2-1)=475+INT((2.0-CG(1))*175.+0.5)
+      IPOS(NN*2)=510+INT((5.0-CG(4))*182.+0.5)
+      JPOS(NN*2)=475+INT((2.0-CG(2))*175.+0.5)
 c
       IF (IFIT.EQ.NN) GO TO 250
 c
@@ -244,13 +243,13 @@
 C
   250 DO 253 I = 1,NN
          ACAZ=ABS(CAZZ(I))
-         IM(I)=IFIX(ACAZ/60.)
-         IS(I)=IFIX(ACAZ-FLOAT(IM(I))*60.+0.5)
+         IM(I)=INT(ACAZ/60.)
+         IS(I)=INT(ACAZ-FLOAT(IM(I))*60.+0.5)
          IPR(I)=IPL
          IF (CAZZ(I).LT.0.0) IPR(I)=IMU
          ACEL=ABS(CELL(I))
-         JM(I)=IFIX(ACEL/60.0)
-         JS(I)=IFIX(ACEL-FLOAT(JM(I))*60.0+0.5)
+         JM(I)=INT(ACEL/60.0)
+         JS(I)=INT(ACEL-FLOAT(JM(I))*60.0+0.5)
          JPR(I)=IPL
          IF (CELL(I).LT.0.0) JPR(I)=IMU
   253 CONTINUE
@@ -258,14 +257,14 @@
       if (IFIT.EQ.2) then
          CAZ=CAZ/NN
          ACAZ=ABS(CAZ)
-         IM(3)=IFIX(ACAZ/60.)
-         IS(3)=IFIX(ACAZ-FLOAT(IM(3))*60.+0.5)
+         IM(3)=INT(ACAZ/60.)
+         IS(3)=INT(ACAZ-FLOAT(IM(3))*60.+0.5)
          IPR(3)=IPL
          IF (CAZ.LT.0.0) IPR(3)=IMU
          CEL=CEL/NN
          ACEL=ABS(CEL)
-         JM(3)=IFIX(ACEL/60.0)
-         JS(3)=IFIX(ACEL-FLOAT(JM(3))*60.0+0.5)
+         JM(3)=INT(ACEL/60.0)
+         JS(3)=INT(ACEL-FLOAT(JM(3))*60.0+0.5)
          JPR(3)=IPL
          IF (CEL.LT.0.0) JPR(3)=IMU
          WRITE (CPUF,4013,IOSTAT=IER) 
@@ -291,17 +290,21 @@
       endif
       write(cpuf, 4017, iostat=ier) pfile(max(1,plen-71):plen)
       call pwrite(cpuf, n80)
-      open (unit=iiotmp,file=pfile, status='old', fileopt='eof',
-     .      iostat = ier)
-      if (ier .ne. 0) then
+c     g77 cant do fileopt=eof, so we'll seek there ourselves
+      open (unit=iiotmp,file=pfile, status='old', iostat = ier)
+      do while (.true.)
+         read (iiotmp, end=100, fmt='(A1)') tempchar
+      end do
+c     should be at EOF now
+ 100  if (ier .ne. 0) then
          call oerror(n352, n0, 'POINT.DAT')
 c
       else
          FRQ=DTWH(C12RF,IPTWH)*0.001
          UT=DTWH(C3UT,IPTWH)
          CALL RNS (UT,n0,LSTRNG)
-         IHP=IFIX(HP+0.5)
-         IFEED = ifix ((dtwh(c1sno,iptwh) - float(iscan)) * 100. + 0.5) 
+         IHP=int(HP+0.5)
+         IFEED = int ((dtwh(c1sno,iptwh) - float(iscan)) * 100. + 0.5) 
 c
 c  Compute the total change in new pointing correction from the
 c  initial guess (PRJ  25 Jul 91):
diff -uNr 3.5/source/conline/line/mheader.f unipops-3.6/source/conline/line/mheader.f
--- 3.5/source/conline/line/mheader.f	2000-03-16 11:35:06.000000000 -0700
+++ unipops-3.6/source/conline/line/mheader.f	2008-12-29 14:39:26.000000000 -0700
@@ -4,9 +4,9 @@
 c
 c     Lists out the contents of the header of the IPTWH matrix
 c
-      integer*2 iptwh, istch(40), ierr, n, iinitp, n1
+      integer*2 iptwh, istch(40), n, iinitp, n1
       integer*2 m2, n80, n112
-      integer*4 n24, nchar
+      integer*4 n24, nchar, ierr
       character*80 stch
       character*24 sdate
 c
diff -uNr 3.5/source/conline/line/minit.f unipops-3.6/source/conline/line/minit.f
--- 3.5/source/conline/line/minit.f	2000-03-16 11:35:07.000000000 -0700
+++ unipops-3.6/source/conline/line/minit.f	2008-12-29 14:39:26.000000000 -0700
@@ -13,8 +13,8 @@
       include 'mappl.inc'
       include 'mform.inc'
 c
-      integer*2 i,lastblnk,ierr, nx, ny, j1
-      integer*4 n0, n24, n80, nchars, datestyle
+      integer*2 i,lastblnk, nx, ny, j1
+      integer*4 n0, n24, ierr, n80, nchars, datestyle
       character*80 input, fmts, fmtf, fmtd1, fmtd2
       character*24 sdate
       real*8 ddate
diff -uNr 3.5/source/conline/line/mlabel.f unipops-3.6/source/conline/line/mlabel.f
--- 3.5/source/conline/line/mlabel.f	2000-03-16 11:35:10.000000000 -0700
+++ unipops-3.6/source/conline/line/mlabel.f	2008-12-29 14:39:26.000000000 -0700
@@ -4,13 +4,13 @@
 C
 c     Draws a labeled and anotated box for the previous 2-dim map
 c
-      integer*2 itype, ix, iy, sclc, ipixel, istch(40), i, j, ier, 
+      integer*2 itype, ix, iy, sclc, ipixel, istch(40), i, j,
      .		numlevs, ierr, idelx, idely, ilen, lastblnk, short,
      .		imintmp, imaxtmp, jmintmp, jmaxtmp, curcur
       integer*2 n1, n8, m2, m1
       integer*2 n2, n5, n10, n12, n14, n18, n20, n30, n38, n40,
      .          n55, n90, n100, n125, n272
-      integer*4 l2, l34, l80
+      integer*4 l2, l34, l80, ier
       integer*4 iby, ibx, nchars
       real xlft, xrght, ybot, ytop, xf, xl, dx, yf, yl, dy, xz, yz,
      .	   percents(34), value, aindex, blah(2,34), axtmp, aytmp, 
diff -uNr 3.5/source/conline/line/mread.f unipops-3.6/source/conline/line/mread.f
--- 3.5/source/conline/line/mread.f	2000-03-16 11:35:12.000000000 -0700
+++ unipops-3.6/source/conline/line/mread.f	2008-12-29 14:39:26.000000000 -0700
@@ -10,7 +10,7 @@
       character*1023 headname, fullname
       character*1 quote
       logical lend, inquirefile, okreal4, okreal8
-      integer*4 n1, n2, long, i4, nwrds1, nwrds2, nwrds4, nwrds8, nwrds,
+      integer*4 n1, n2, i4, nwrds1, nwrds2, nwrds4, nwrds8, nwrds,
      +          l80, nchars, oldfits
 c
       parameter (nwrds1 = 2880)
@@ -18,9 +18,9 @@
       parameter (nwrds4 = 720)
       parameter (nwrds8 = 360)
 c
-      integer*2 ierr, j, i, k, lastblnk, ilen, irec, nv, numhead, kmax, 
+      integer*2 j, i, k, lastblnk, ilen, irec, nv, numhead, kmax, 
      .		maxrec, mleft, ldata2(nwrds2), istch(40)
-      integer*4 ldata4(nwrds4), iblank, ii
+      integer*4 ierr, ldata4(nwrds4), iblank, ii
       integer*2 m1, m2, n80, n352, n357, n365
       character*1 cdata1(nwrds1)
       real tzero, tscale, rdata4(nwrds4), fblank, r_quiet_nan
@@ -44,7 +44,7 @@
       call filecomp(filename, fullname)
 c
       ilen = lastblnk(dirprefix(1))
-      headname = dirprefix(1)(1:ilen) // '/sunbin/twodim.mask'
+      headname = dirprefix(1)(1:ilen) // '/bin/twodim.mask'
 c     Get the file name of FITS template file
 c
       open(unit=iiotmp,file=headname,access='sequential',
@@ -200,16 +200,16 @@
                 endif
 		if (i .eq. 20) cmhead(mbunit,1) = head(j) (12:19) 
 c
-      		if (i.eq.7) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i.eq.7) read(head(j)(11:30),40,iostat=ierr) 
      .							mhead(mrval1,1)
-      		if (i.eq.8) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i.eq.8) read(head(j)(11:30),40,iostat=ierr) 
      .							mhead(mdelt1,1)
-		if (i.eq.9) read(unit=head(j)(11:30),40) mhead(mpix1,1)
-      		if (i .eq. 11) read(unit=head(j)(11:30),40,iostat=ierr) 
+		if (i.eq.9) read(head(j)(11:30),40) mhead(mpix1,1)
+      		if (i .eq. 11) read(head(j)(11:30),40,iostat=ierr) 
      .							mhead(mrval2,1)
-      		if (i .eq. 12) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 12) read(head(j)(11:30),40,iostat=ierr) 
      .							mhead(mdelt2,1)
-		if (i .eq. 13) read(unit=head(j)(11:30),40,iostat=ierr) 
+		if (i .eq. 13) read(head(j)(11:30),40,iostat=ierr) 
      .							mhead(mpix2,1)
       		if (i .eq. 17) then
 c                           look for bad unipops BLANK values which are
@@ -219,17 +219,17 @@
                       if (head(j)(ii:ii) .eq. '.') goto 410
  405               continue
  410               if (ii .le. 30) then
-                      read(unit=head(j)(11:30),40,iostat=ierr) fblank
+                      read(head(j)(11:30),40,iostat=ierr) fblank
                    else
-                      read(unit=head(j)(15:30),45,iostat=ierr) iblank
+                      read(head(j)(15:30),45,iostat=ierr) iblank
                       fblank = iblank
                    endif
                 endif
-      		if (i .eq. 18) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 18) read(head(j)(11:30),40,iostat=ierr) 
      .							tscale
-      		if (i .eq. 19) read(unit=head(j)(11:30),40,iostat=ierr)
+      		if (i .eq. 19) read(head(j)(11:30),40,iostat=ierr)
      .							tzero
-      		if (i .eq. 23) read(unit=head(j) (11:30),40,iostat=ierr) 
+      		if (i .eq. 23) read(head(j)(11:30),40,iostat=ierr) 
      .							mhead(mequinox,1)
  40             format(1p1g20.0)
  45             format(i16)
@@ -302,7 +302,7 @@
 c	into the matrix.
 c
 	do 91 i = 1, j
-	   i4 = long(i) + nwrds*long(irec-numhead-1)
+	   i4 = int(i) + nwrds*int(irec-numhead-1)
 	   if (nint(mhead(mbitpix,1)) .eq. 16) then
 	   	if (ldata2(i) .eq. fblank) then
 			mdata(i4) = mhead(mblank,1)
diff -uNr 3.5/source/conline/line/mrqmin.f unipops-3.6/source/conline/line/mrqmin.f
--- 3.5/source/conline/line/mrqmin.f	2000-03-16 11:35:50.000000000 -0700
+++ unipops-3.6/source/conline/line/mrqmin.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,179 +0,0 @@
-      subroutine mrqmin(x, y, sig, ndata, a, ma, lista, mfit, 
-     .	                 covar, alpha, nca, chisq, funcs, alamda)
-c
-c      @(#)mrqmin.f	5.1 06/22/94
-c
-c     Levenberg-Marquardt method from Press et al "Numerical Recipes"
-c     The following is directly from Press et al:
-c     
-c	Attempts to reduce the value of chi**2 of a fit between a set
-c	of NDATA points X(I), Y(I) woth individual standard deviations
-c	SIG(I), and a nonlinear function dependent on MA coeficiaents
-c	A.  The array LISTA numbers the parameters A such that the
-c	first MFIT elements corespond to values actually being
-c	adjusted; the remaining MA-MFIT parameters are held fixed at
-c	their input value.  The program returns current best-fit values
-c	for the MA fit parameters A and chi**2, CHISQ. The arrays
-c	COVAR(NCA,NCA), ALPHA(NCA,NCA) with physical dimensions NCA (>=
-c	MFIT) are used as working space during most iterations.  Supply
-c	a subroutine FUNCS(X,A,YFIT,DYDA,MA) that evaluates the fitting
-c	function YFIT and its derivatives DYDA with respect to the
-c	fitting parameters A at X.  On the first call provide an
-c	initial guess for the parameters A, and set ALAMDA < 0 for
-c	initialization (which then sets ALAMDA to 0.001).  If a step
-c	succeeds, CHISQ becomes smaller and ALAMDA decreases by a
-c	factor of 10.  If a step fails ALAMDA grows by a factor of 10.
-c	You must call this routine repeatedly until convergence is
-c	achieved.  Then, make one final call with ALAMDA=0 so that
-c	COVAR(I,J) returns the covarience matrix and ALPHA(I,J) the
-c	curvature matrix.  
-c
-      real x(*), y(*), sig(*), a(*), covar(nca, nca), alpha(nca, nca),
-     .	   chisq, alamda
-      integer*4 nca, ndata, ma, lista(*), mfit
-c
-      integer*4 mmax, kk, j, ihit, k, n1
-      integer*2 n120, m3
-c
-      parameter (mmax=80)
-      parameter (n120=120)
-      parameter (m3=-3)
-      parameter (n1=1)
-c
-      real atry(mmax), beta(mmax), da(mmax), ochisq
-c
-      save atry, beta, da, ochisq
-c
-      external funcs
-c
-      if (mmax .lt. ma) 
-     .		call oerror(n120, m3, 'MRQMIN: Too many parameters to fit')
-c
-      if (alamda .lt. 0) then
-c	Initialization
-c
-	kk = mfit + 1
-	do 12 j = 1, ma
-	    ihit = 0
-	    do 11 k = 1, mfit
-		if (lista(k) .eq. j) ihit = ihit + 1
-11		continue
-	    if (ihit .eq. 0) then
-		lista(kk) = j
-		kk = kk + 1
-	    else if (ihit .gt. 1) then
-		call oerror(n120, m3, 'MRQMIN: Improper permutation in LISTA')
-	    endif
-12	    continue
-c	    Does LISTA containa proper permutation of the coefficiants.
-c
-	if (kk .ne. ma+1) call oerror(n120, m3, 'MRQMIN: Improper permutation in LISTA')
-	alamda = 0.001
-	call mrqcof(x ,y, sig, ndata, a, ma, lista, mfit, alpha, beta,
-     .		    nca, chisq, funcs)
-	ochisq = chisq
-c
-	do 13 j = 1, ma
-	   atry(j) = a(j)
-13	   continue
-c
-      endif
-c
-      do 15 j = 1, mfit
-	do 14 k = 1, mfit
-	   covar(j,k) = alpha(j,k)
-14	   continue
-	covar(j,j) = alpha(j,j)*(1.+alamda)
-	da(j) = beta(j)
-15	continue
-c	Alter linearized fitting matrix by augmenting diagnol elements
-c
-      call gaussj(covar, mfit, nca, da, n1, n1)
-c     Matrix solution
-c
-      if (alamda .eq. 0) then
-	call covsrt(covar, nca, ma, lista, mfit)
-	return
-      endif
-c     Once converged, evaluate covariance with ALAMDA=0
-c
-      do 16 j = 1, mfit
-	atry(lista(j)) = a(lista(j)) + da(j)
-16	continue
-c
-      call mrqcof(x, y, sig, ndata, atry, ma, lista, mfit, covar, da,
-     .	          nca, chisq, funcs)
-c
-      if (chisq .lt. ochisq) then
-c	Trial succedded.. attempt the new solution.
-	alamda = 0.1*alamda
-	ochisq = chisq
-	do 18 j = 1, mfit
-	   do 17 k = 1, mfit
-		alpha(j,k) = covar(j,k)
-17		continue
-	   beta(j) = da(j)
-	   a(lista(j)) = atry(lista(j))
-18	   continue
-      else
-c	 Failure, increase ALAMDA and return.
-	 alamda = 10.*alamda
-	 chisq = ochisq
-      endif
-c
-      return
-      end
-c
-c----------------------------------------------------
-c
-      subroutine mrqcof(x, y, sig, ndata, a, ma, lista, mfit, alpha, 
-     .		        beta, nalp, chisq, funcs)
-c
-c     Used by MRQMIN to evaluate the linearized fitting matrix ALPHA and vector BETA.
-c
-      integer*4 ndata, ma, lista(*), mfit, nalp
-      real x(*), y(*), sig(*), a(*), alpha(nalp,nalp), beta(*)
-c
-      integer*4 mmax, i, j, k
-      integer*2 n120, m3
-c
-      parameter (mmax=80)
-c
-      real dyda(mmax), sig2i, dy, wt, ymod, chisq
-c
-      external funcs
-c
-      if (mmax .lt. ma) 
-     .		call oerror(n120, m3, 'MRQCOF: Too many parameters to fit')
-c
-      do 12 j = 1, mfit
-	do 11 k = 1, j
-	   alpha(j,k) = 0.
-11	   continue
-	beta(j) = 0.
-12	continue
-      chisq = 0.
-c
-      do 15 i = 1, ndata
-	call funcs(x(i), a, ymod, dyda, ma)
-	sig2i = 1/(sig(i)*sig(i))
-	dy = y(i)-ymod
-	do 14 j = 1, mfit
-	   wt = dyda(lista(j))*sig2i
-	   do 13 k = 1, j
-		alpha(j,k) = alpha(j,k) + wt*dyda(lista(k))
-13		continue
-	   beta(j) = beta(j) + dy*wt
-14	   continue
-	chisq = chisq + dy*dy*sig2i
-15	continue
-c
-      do 17 j = 2, mfit
-	do 16 k = 1, j-1
-	   alpha(k,j) = alpha(j,k)
-16	   continue
-17	continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/line/mtable.f unipops-3.6/source/conline/line/mtable.f
--- 3.5/source/conline/line/mtable.f	2000-03-16 11:35:16.000000000 -0700
+++ unipops-3.6/source/conline/line/mtable.f	2008-12-29 14:39:26.000000000 -0700
@@ -17,12 +17,12 @@
 c
 c
       real z(isize,jsize)
-      integer*4 isize, jsize
+      integer*4 isize, jsize, ierr
 c
       include 'mappl.inc'
 c
       integer*2 m2, n80, n254
-      integer*2 npages, n1, n2, np, j, j1, istch(40), ierr, i
+      integer*2 npages, n1, n2, np, j, j1, istch(40), i
       character*80 stch
 c
       equivalence(istch, stch)
diff -uNr 3.5/source/conline/line/mwrite.f unipops-3.6/source/conline/line/mwrite.f
--- 3.5/source/conline/line/mwrite.f	2000-03-16 11:35:16.000000000 -0700
+++ unipops-3.6/source/conline/line/mwrite.f	2008-12-29 14:39:27.000000000 -0700
@@ -9,23 +9,23 @@
       character*24 sdate
       character*80 hmask(36), stch
       character*1023 headname, fullname
-      integer*4 n1, n2, unlink, nwrds2, i4, long, hcmt, nwrds4, nwrds,
-     .          nwrds1, nwrds8, n24, nchars, nend
+      integer*4 n1, n2, unlink, nwrds2, i4, hcmt, nwrds4, nwrds,
+     .          nwrds1, nwrds8, n24, nchars, nend, ierr
 c
       parameter (nwrds1 = 2880)
       parameter (nwrds2 = 1440)
       parameter (nwrds4 = 720)
       parameter (nwrds8 = 360)
 c
-      integer*2 ierr, ilen, lastblnk, i, j, ldata2(nwrds2), maxrec,  
+      integer*2 ilen, lastblnk, i, j, ldata2(nwrds2), maxrec,  
      .		mleft, irec, istch(40), ixmin, iymin, ixmax, iymax, 
      .		blankfits2, blankfits1
       integer*4 ldata4(nwrds4), blankfits4
       integer*2 m1, m2, n0, n80, n255, n273, n352, n355, n357, n366
       real value, zmin, zmax, tscale, tzero, rdata4(nwrds4),
-     .     rnan, r_quiet_nan
+     .     rnan, r_quiet_nan, value2
       logical inquirefile
-      character*1 answr, cdata1(nwrds1)
+      character*1 answr, cdata1(nwrds1), string
       real*8 rmax2, rmax4, rmax1, rdata8(nwrds8), dnan, d_quiet_nan
 c
       parameter (rmax1 = 255.0d0)
@@ -69,7 +69,7 @@
       endif
 c
       ilen = lastblnk(dirprefix(1))
-      headname = dirprefix(1)(1:ilen) // '/sunbin/twodim.mask'
+      headname = dirprefix(1)(1:ilen) // '/bin/twodim.mask'
 c     Get the file name of FITS template file
 c
       open(unit=iiotmp,file=headname,access='sequential',
@@ -127,9 +127,9 @@
       endif
 c     Calculate max,min, and scale factors from min/max in matrix 0.
 c
-      write(unit=hmask(2) (24:30),20,iostat=ierr) nint(mhead(mbitpix,1))
-      write(unit=hmask(4) (24:30),20,iostat=ierr) nint(mhead(mnaxis1,1))
-      write(unit=hmask(5) (24:30),20,iostat=ierr) nint(mhead(mnaxis2,1))
+      write(hmask(2) (24:30),20,iostat=ierr) nint(mhead(mbitpix,1))
+      write(hmask(4) (24:30),20,iostat=ierr) nint(mhead(mnaxis1,1))
+      write(hmask(5) (24:30),20,iostat=ierr) nint(mhead(mnaxis2,1))
 20    format(i7)
 c
       hmask(6) (12:19) = cmhead(mtype1,1)
@@ -145,27 +145,27 @@
       hmask(16) (nend:nend) = '\''
       hmask(20) (12:19) = cmhead(mbunit,1)
 c
-      write(unit=hmask(7) (15:30),40,iostat=ierr) mhead(mrval1,1)
-      write(unit=hmask(8) (15:30),40,iostat=ierr) mhead(mdelt1,1)
-      write(unit=hmask(9) (15:30),40,iostat=ierr) mhead(mpix1,1)
-      write(unit=hmask(11) (15:30),40,iostat=ierr) mhead(mrval2,1)
-      write(unit=hmask(12) (15:30),40,iostat=ierr) mhead(mdelt2,1)
-      write(unit=hmask(13) (15:30),40,iostat=ierr) mhead(mpix2,1)
+      write(hmask(7) (15:30),40,iostat=ierr) mhead(mrval1,1)
+      write(hmask(8) (15:30),40,iostat=ierr) mhead(mdelt1,1)
+      write(hmask(9) (15:30),40,iostat=ierr) mhead(mpix1,1)
+      write(hmask(11) (15:30),40,iostat=ierr) mhead(mrval2,1)
+      write(hmask(12) (15:30),40,iostat=ierr) mhead(mdelt2,1)
+      write(hmask(13) (15:30),40,iostat=ierr) mhead(mpix2,1)
       if (nint(mhead(mbitpix,1)) .eq. 16) then
-        write(unit=hmask(17) (15:30),42,iostat=ierr) (blankfits2-1)
+        write(hmask(17) (15:30),42,iostat=ierr) (blankfits2-1)
       else if (nint(mhead(mbitpix,1)) .eq. 32) then
-        write(unit=hmask(17) (15:30),42,iostat=ierr) (blankfits4-1)
+        write(hmask(17) (15:30),42,iostat=ierr) (blankfits4-1)
       else if (nint(mhead(mbitpix,1)) .eq. 8) then
-        write(unit=hmask(17) (15:30),42,iostat=ierr) blankfits1
+        write(hmask(17) (15:30),42,iostat=ierr) blankfits1
       else if (nint(mhead(mbitpix,1)) .lt. 0) then
-        write(unit=hmask(17), 45,iostat=ierr) ' '
+        write(hmask(17), 45,iostat=ierr) ' '
       else
 	call oerror(n273, m1, 'MWRITE: Bad MBITPIX')
       endif
-      write(unit=hmask(18) (15:30),40,iostat=ierr) tscale
-      write(unit=hmask(19) (15:30),40,iostat=ierr) tzero
-      write(unit=hmask(21) (15:30),40,iostat=ierr) zmin
-      write(unit=hmask(22) (15:30),40,iostat=ierr) zmax
+      write(hmask(18) (15:30),40,iostat=ierr) tscale
+      write(hmask(19) (15:30),40,iostat=ierr) tzero
+      write(hmask(21) (15:30),40,iostat=ierr) zmin
+      write(hmask(22) (15:30),40,iostat=ierr) zmax
       if (cmhead(mtype1,1)(1:4) .eq. 'RA--' .or.
      .    cmhead(mtype2,1)(1:4) .eq. 'RA--' .or.
      .    cmhead(mtype1,1)(1:4) .eq. 'HA--' .or.
@@ -173,7 +173,7 @@
      .    cmhead(mtype1,1)(1:4) .eq. 'DEC-' .or.
      .    cmhead(mtype2,1)(1:4) .eq. 'DEC-') then
          if (mhead(mequinox,1) .eq. 0) mhead(mequinox,1) = 1950.0
-         write(unit=hmask(23) (15:30),40,iostat=ierr) mhead(mequinox,1)
+         write(hmask(23) (15:30),40,iostat=ierr) mhead(mequinox,1)
          hcmt = 24
       else
          do 102 i = 23, 34
@@ -242,7 +242,7 @@
 c	last record.
 c
 	do 91 i = 1, j
-	   i4 = long(i) + nwrds*long(irec-2)
+	   i4 = int(i) + nwrds*int(irec-2)
 	   if (nint(mhead(mbitpix,1)) .eq. 16) then
 	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
 			ldata2(i) = blankfits2 - 1
@@ -259,7 +259,9 @@
 	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
 			cdata1(i) = char(blankfits1)
 	   	else
-	        	cdata1(i) = char((mdata(i4)-tzero)/tscale)
+                        value2=(mdata(i4)-tzero)/tscale
+                        write(string,'(i1)'),value2
+	        	cdata1(i) = string
 	   	endif
 	   else if (nint(mhead(mbitpix,1)) .eq. -32) then
 	   	if (mdata(i4) .eq. sngl(mhead(mblank,1))) then
diff -uNr 3.5/source/conline/line/plot.f unipops-3.6/source/conline/line/plot.f
--- 3.5/source/conline/line/plot.f	2000-03-16 11:35:22.000000000 -0700
+++ unipops-3.6/source/conline/line/plot.f	2008-12-29 14:39:27.000000000 -0700
@@ -8,17 +8,17 @@
       include 'core.inc'
       include 'appl.inc'
 c
-      integer*2 nchan, iplt, ix, i, ipuf(4), ilen, lastblnk, ier, iy,
+      integer*2 nchan, iplt, ix, i, ipuf(4), ilen, lastblnk, iy,
      .		short, mint, idely, nxl, nyl, itemp, ipixel, sclc, idelx
       integer*2 m2, n1, n2, n5, n8, n12, n14, n20, n30, n33, 
      .          n55, n219, n220, n10, curcur, npp1
       character*10 getformat, format
-      integer*4 ibx, iby, ix4, iy4
+      integer*4 ibx, iby, ix4, iy4, ier
       character*8 cpuf
       character*2 ctemp
-      real*4 ybtm, ytop, ylog, yval, dy, ymax1, ylow2, fupy, xmx, xmn,
+      real*4 ybtm, ytop, yval, dy, ymax1, ylow2, fupy, xmx, xmn,
      .	     fy1, dfy1, ymax2, ymin1, fy2, dfy2, ymin2, yf, yl
-      real*4 xlft, xrght, xlog, xval, dx, xmax1,xlow2, fupx, ymn, ymx,
+      real*4 xlft, xrght, xval, dx, xmax1,xlow2, fupx, ymn, ymx,
      .	     fx1, dfx1, xmax2, xmin1, fx2, dfx2, xmin2, xf, xl, aa
       logical okreal4, placenxt
 c
diff -uNr 3.5/source/conline/line/posstring.f unipops-3.6/source/conline/line/posstring.f
--- 3.5/source/conline/line/posstring.f	2000-03-16 11:35:24.000000000 -0700
+++ unipops-3.6/source/conline/line/posstring.f	2008-12-29 14:39:27.000000000 -0700
@@ -52,9 +52,9 @@
 c
       return
 C---------------------------------------------------------------
- 1000 format(2x,i2.2,x,i2.2,x,'0',f3.1)
- 1005 format(2x,i2.2,x,i2.2,x,f4.1)
- 1010 format(2x,i2.2,x,i2.2,x,i2.2,2x)
+ 1000 format(2x,i2.2,1x,i2.2,1x,'0',f3.1)
+ 1005 format(2x,i2.2,1x,i2.2,1x,f4.1)
+ 1010 format(2x,i2.2,1x,i2.2,1x,i2.2,2x)
  1020 format(a1)
- 1030 format(x,f8.4,3x)
+ 1030 format(1x,f8.4,3x)
       end
diff -uNr 3.5/source/conline/line/prep.f unipops-3.6/source/conline/line/prep.f
--- 3.5/source/conline/line/prep.f	2000-03-16 11:35:25.000000000 -0700
+++ unipops-3.6/source/conline/line/prep.f	2008-12-29 14:39:27.000000000 -0700
@@ -16,6 +16,7 @@
 C
       IPTWH = 1
       ierr = 0
+      nseg = 0
 c
       istart = dtwh(c12spn,iptwh)
       istop = istart + dtwh(c12ni,iptwh) - 1
@@ -23,7 +24,7 @@
 	ierr = 225
 	goto 99
       endif
-c
+c     
       do 10 i = 1, maxregn
    10    BREG(I)=0
 c
@@ -44,7 +45,6 @@
      .           EDROP - 1
          BREG(3)=BREG(4)-nint(EBASE) + 1
       else
-         nseg = 0
          do 15 i = 1, maxregn, 2
 	    if (nregon(i).ne.0.0) then
               nseg = nseg + 1
diff -uNr 3.5/source/conline/line/readcube.f unipops-3.6/source/conline/line/readcube.f
--- 3.5/source/conline/line/readcube.f	2000-03-16 11:35:27.000000000 -0700
+++ unipops-3.6/source/conline/line/readcube.f	2008-12-29 14:39:27.000000000 -0700
@@ -10,12 +10,13 @@
       character*1023 headname, fullname
       character*1 quote
       logical lend, inquirefile
-      integer*2 ierr, j, i, ilen, irec, nv, kmax, maxrec, mleft, 
+      integer*2 j, i, ilen, irec, nv, kmax, maxrec, mleft, 
      .		istch(40), lastblnk, k, blankfits2, blankfits1
       integer*2 m1, m2, n80, n352, n357, n365
       integer*4 n1, n2, n3, nwrds2, nwrds4, nwrds1, nwrds8, blankfits4
-      integer*4 nchars, oldfits, bp, iblank, ii
-      real*8 rmax1, rmax2, rmax4
+      integer*4 ierr, nchars, oldfits, bp, iblank, ii
+      character*8 string
+      real*8 rmax1, rmax2, rmax4, value
       real r_quiet_nan
 c
       include 'mappl.inc'
@@ -23,6 +24,8 @@
       include 'mform.inc'
 c
       equivalence (istch,stch)
+c     we need this equivalence, because g77 can't declare chars as reals
+      equivalence (string, value)
 c
       parameter (rmax1 = 255.0d0)
       parameter (rmax2 = 32767.0d0)
@@ -35,6 +38,7 @@
       parameter (blankfits2 = -32767)
       parameter (blankfits1 = 1)
 c
+      data string /'        '/
       data m1, m2, n80, n352, n357, n365 /-1, -2, 80, 352, 357, 365/
       data quote /''''/
 c
@@ -87,19 +91,21 @@
       chead(cpix2) = 1.
       chead(cpix3) = 1.
       chead(cequinox) = 0.0
-      chead(ctype1) = '        '
-      chead(ctype2) = '        '
-      chead(ctype3) = '        '
+c     g77 needs explicit type conversion via internal file ops
+c     (see equivalence at beginning of subroutine) -CAK
+      chead(ctype1) = value
+      chead(ctype2) = value
+      chead(ctype3) = value
       chead(cdate) = -1.0
-      chead(cobject) = '        '
-      chead(cobject+1) = '        '
-      chead(corigin) = '        '
-      chead(cbunit) = '        '
+      chead(cobject) = value
+      chead(cobject+1) = value
+      chead(corigin) = value
+      chead(cbunit) = value
       do 1011 i = 1, cheadsize-ccomment+1
 	cchead(i-1+ccomment) = '        '
 1011	continue
 c     Sets up defaults if the header doesn't contain the necessary
-c     information.  No gaurentees if one of the above is not in the header
+c     information.  No garantees if one of the above is not in the header
 c
       irec = 0
 c
@@ -130,7 +136,7 @@
 	if (head(2)(1:10) .ne. hmask(2)(1:10)) then
      	   call oerror(n365, m2, 'READCUBE: ----> '// head(2)(1:30))
 	else
-	   read(unit=head(2) (11:30), fmt=20, iostat=ierr) nv
+	   read(head(2) (11:30), fmt=20, iostat=ierr) nv
 	   chead(cbitpix) = nv
 	endif
 c
@@ -147,20 +153,20 @@
 	if (head(4)(1:10) .ne. hmask(4)(1:10)) then
      	   call oerror(n365, m2, 'READCUBE: ----> '// head(4)(1:30))
 	else
-	   read(unit=head(4) (11:30),fmt=20, iostat=ierr) nv
+	   read(head(4) (11:30),fmt=20, iostat=ierr) nv
 20    	   format(i20)
 	   chead(cnaxis1) = nv
 	endif
 	if (head(5)(1:10) .ne. hmask(5)(1:10)) then 
      	   call oerror(n365, m2, 'READCUBE: ----> '// head(5)(1:30))
 	else
-	   read(unit=head(5) (11:30),fmt=20, iostat=ierr) nv
+	   read(head(5) (11:30),fmt=20, iostat=ierr) nv
 	   chead(cnaxis2) = nv
 	endif
 	if (head(6)(1:10) .ne. hmask(6)(1:10)) then 
      	   call oerror(n365, m2, 'READCUBE: ----> '// head(6)(1:30))
 	else
-	   read(unit=head(6) (11:30),fmt=20, iostat=ierr) nv
+	   read(head(6) (11:30),fmt=20, iostat=ierr) nv
 	   chead(cnaxis3) = nv
 	endif
 c       Checks NAXIS1,NAXIS2,NAXIS3
@@ -207,22 +213,22 @@
                 endif
 		if (i .eq. 29) cchead(cbunit) = head(j) (12:19) 
 c
-      		if (i.eq.8) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i.eq.8) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(crval1)
-      		if (i.eq.9) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i.eq.9) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(cdelt1)
-		if (i.eq.10) read(unit=head(j)(11:30),40) chead(cpix1)
-      		if (i .eq. 13) read(unit=head(j)(11:30),40,iostat=ierr) 
+		if (i.eq.10) read(head(j)(11:30),40) chead(cpix1)
+      		if (i .eq. 13) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(crval2)
-      		if (i .eq. 14) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 14) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(cdelt2)
-		if (i .eq. 15) read(unit=head(j)(11:30),40,iostat=ierr) 
+		if (i .eq. 15) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(cpix2)
-      		if (i .eq. 18) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 18) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(crval3)
-      		if (i .eq. 19) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 19) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(cdelt3)
-		if (i .eq. 20) read(unit=head(j)(11:30),40,iostat=ierr) 
+		if (i .eq. 20) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(cpix3)
       		if (i .eq. 26) then 
 c                       look for bad unipops BLANK values which may be
@@ -231,21 +237,21 @@
                       if (head(j)(ii:ii) .eq. '.') goto 410
  405               continue
  410               if  (ii .le. 30) then
-                      read(unit=head(j)(11:30),45,iostat=ierr) fcblank
+                      read(head(j)(11:30),45,iostat=ierr) fcblank
                    else
-                      read(unit=head(j)(15:30),45,iostat=ierr) iblank
+                      read(head(j)(15:30),45,iostat=ierr) iblank
                       fcblank = iblank
                    endif
                 endif
-      		if (i .eq. 27) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 27) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(ctscale)
-      		if (i .eq. 28) read(unit=head(j)(11:30),40,iostat=ierr)
+      		if (i .eq. 28) read(head(j)(11:30),40,iostat=ierr)
      .							chead(ctzero)
-      		if (i .eq. 30) read(unit=head(j)(11:30),40,iostat=ierr) 
+      		if (i .eq. 30) read(head(j)(11:30),40,iostat=ierr) 
      .							chead(ctmin)
-      		if (i .eq. 31) read(unit=head(j) (11:30),40,iostat=ierr) 
+      		if (i .eq. 31) read(head(j) (11:30),40,iostat=ierr) 
      .							chead(ctmax)
-      		if (i .eq. 32) read(unit=head(j) (11:30),40,iostat=ierr) 
+      		if (i .eq. 32) read(head(j) (11:30),40,iostat=ierr) 
      .							chead(cequinox)
  40             format(1g20.0)
  45             format(i16)
diff -uNr 3.5/source/conline/line/savebyloc.f unipops-3.6/source/conline/line/savebyloc.f
--- 3.5/source/conline/line/savebyloc.f	2000-03-16 11:35:31.000000000 -0700
+++ unipops-3.6/source/conline/line/savebyloc.f	2008-12-29 14:39:27.000000000 -0700
@@ -20,7 +20,7 @@
       logical*2 overwrite
       integer*2 imagic, iunit, ierr, n0, n80, n120, n355, m3, ier, iloc
       integer*4 lunit, loverwrite, lrtn, j
-      double precision array(*), location, obsmode, ydata(2786)
+      double precision array(*), location, obsmode, ydata(4096)
 c
       equivalence (obsmode, cobsmode)
 c
@@ -28,16 +28,16 @@
 c
       include 'cform.inc'
 c
-      lunit = iunit
-      location = iloc
+      lunit = int(iunit)
+      location = dble(iloc)
       loverwrite = 0
       if (overwrite) loverwrite = 1
       ierr = 0
-c			make sure data_length is large enough
+c     make sure data_length is large enough
       if (array(c1dln).lt.(array(c12ni) + array(c12spn) - 1) * 4.0) then
          array(c1dln) = (array(c12ni) + array(c12spn) - 1) * 4.0
       endif
-c			convert, pass address of array and ydata to saveascan
+c     convert, pass address of array and ydata to saveascan
       call conversion3(array, ydata, ier)
       if (ier .lt. 0) then
          ierr = 360
@@ -87,7 +87,7 @@
  99   return
 c
  40   format('Unrecognized observing mode ',4a1)
- 50   format('Unknown error code ', i)
- 60   format('Data exists at ', i,' .... Overwriting!')
+ 50   format('Unknown error code ', i1)
+ 60   format('Data exists at ', i1,' .... Overwriting!')
 c
       end
diff -uNr 3.5/source/conline/line/savebynum.f unipops-3.6/source/conline/line/savebynum.f
--- 3.5/source/conline/line/savebynum.f	2000-03-16 11:35:32.000000000 -0700
+++ unipops-3.6/source/conline/line/savebynum.f	2008-12-29 14:39:27.000000000 -0700
@@ -20,7 +20,7 @@
       logical*2 overwrite
       integer*2 imagic, iunit, ierr, n0, n80, n120, n355, m3, ier
       integer*4 lunit, loverwrite, lrtn, j
-      double precision array(*), scan, location, obsmode, ydata(2786)
+      double precision array(*), scan, location, obsmode, ydata(4096)
 c
       equivalence (obsmode, cobsmode)
 c
@@ -85,9 +85,9 @@
 c
  99   return
 c
- 10   format('Unexpected error code ',i)
+ 10   format('Unexpected error code ',i1)
  40   format('Unrecognized observing mode ',4a1)
- 50   format('Unknown error code ', i)
+ 50   format('Unknown error code ', i1)
  60   format('Scan ',f12.2,' exists .... Overwriting!')
 c
       end
diff -uNr 3.5/source/conline/line/select.F unipops-3.6/source/conline/line/select.F
--- 3.5/source/conline/line/select.F	2000-03-16 11:35:33.000000000 -0700
+++ unipops-3.6/source/conline/line/select.F	2008-12-29 14:39:28.000000000 -0700
@@ -18,9 +18,9 @@
 c                                        
 c------------------------------------------------------------------------
 c
-      integer*4 idatsize
+      integer*4 idatsize, ierr
       parameter (idatsize = 1024)
-      integer*2 idat(idatsize), ierr, index(32), is_mode, lastblnk
+      integer*2 index(32), lastblnk, is_mode, idat(idatsize) 
       integer*2 m3, m2, m1, n1, n2, n80, n112, n120, n281
       logical*2 itfits, lusescanno, skipscan
       integer*4 ifun, ifile, irec, i1, i4pc, i, lastindex, lastrecord,
@@ -59,6 +59,7 @@
 c------------------------------------------------------------------------
 c
 c		Make sure there is something present on the stack.
+      ierr = 0
       ifun = 0
       if (sp .lt. 1) call oerror(n112, m1, 'SELECT')
       ifun = nint(v(sp))
@@ -67,7 +68,7 @@
       if (ifun .lt. 1 .or. ifun .gt. 18) call oerror(n112, m1, 'SELECT')
 c		check ACOUNT and remember current status
       iacount = nint(acount)
-      if (iacount .lt. 0 .or. iacount .gt. maxstck) 
+      if (iacount .lt. 0 .or. iacount .gt. int(maxstck)) 
      .     call oerror (n281, m2, 'SELECT')
       iacount = iacount + 1
       iacstart = iacount
@@ -152,7 +153,7 @@
          params(23) = it_min 
          params(24) = it_max
 c			call gselect, which does all the work
-         maxadd = maxstck - iacount + 1
+         maxadd = int(maxstck) - iacount + 1
          call gselect(params, actno, maxadd, astack(iacount), irtn)
          if (irtn .eq. 0) then
             iacount = iacount + actno
@@ -186,9 +187,11 @@
          write(cpuf, 1030) '   Object : All Objects (S_OBJECT)'
             call pwrite(ipuf, n80)
       endif
-      call modeid(cs_mode, is_mode, irtn)
+      call modeid(cs_mode, is_mode, short(irtn))
+      irtn = short(irtn)
       if (is_mode .ne. 0 .and. irtn .eq. 0) then
-         call modedesc(is_mode, mode_desc, irtn)
+         call modedesc(is_mode, mode_desc, short(irtn))
+         irtn = short(irtn)
          if (irtn .eq. 0) then
             write(cpuf, 1047) cs_mode, mode_desc
          else
@@ -340,13 +343,14 @@
 		     oldscan = nint(scanno)
 		     skipscan = .false.
 		  else
-		     if ( nint(100.*(scanno-oldscan)) .le. 1.) skipscan = .true.
+		     if ( nint(100.*(scanno - real(oldscan))) .le. 1.) 
+     .                    skipscan = .true.
 		     if (skipscan) goto 120
 		  endif
 	       endif
                if (scanno .ne. 0) then
                   if (itfits(idat(i1))) then
-                     if (iacount .le. maxstck) then
+                     if (iacount .le. int(maxstck)) then
                         if (lusescanno) then
                            astack(iacount) = scanno * sscale
                         else
@@ -356,7 +360,7 @@
                         acount = float(iacount)
                         iacount = iacount + 1
                      else
-c				ascack is full, end now
+c				astack is full, end now
                         go to 990
                      endif
                   endif
diff -uNr 3.5/source/conline/line/show.F unipops-3.6/source/conline/line/show.F
--- 3.5/source/conline/line/show.F	2000-03-16 11:35:35.000000000 -0700
+++ unipops-3.6/source/conline/line/show.F	2008-12-29 14:39:28.000000000 -0700
@@ -16,21 +16,28 @@
       character*24 cfform, vellbl
       character*12 xlabels(11)
       INTEGER*2  ISOURC(8), iptwh, iplt, ishow, istop, iy, istart, ixr, 
-     .		 ixl, ix, ier, ilow, ihi, iy1, iy2, imon, iday, iyr, 
+     .		 ixl, ix, ilow, ihi, iy1, iy2, imon, iday, iyr, 
      .           short, ixlabels(6,11), sclc, limx2, ierr, lxa1, uxa1,
      .		 ivelcnt, lastblnk, ivellbl(12)
       integer*2 m2, n0, n1, n2, n5, n7, n8, n9, n10, n12, n14, n20, n25, 
      .          n30, n33, n35, n55, n72, n74, n75, n100, n125, n150, 
      .          n225, n288, n3, n270, n271, n272
       integer*4 iby, ibx, idelx, nchan, i, ilast, nch,
-     .          ibe, isb, nac, icdtype, ipixel, idely
+     .          ibe, isb, nac, icdtype, ipixel, idely, ier
       REAL*4 dvel, bw, tsys, tim, ra, dec, rra, rdc, tcal, ymin, 
      .	     yincr, val, xz, av, ch, scn1, scn2, xf, xl, dx, xf1,
      .	     xf2
-      real*8 nrao12m, nrao140, nrao300, dfform(3), chantox, xtochan
-      real*8 rf, d03, udate, cf, rif, SOURCE(2), ctype(8)
+      character*8 nrao12m, smt, nrao140, nrao300, ctype(8)
+      real*8 dfform(3), chantox, xtochan, value, valuesmt, value2(8)
+      real*8 rf, d03, udate, cf, rif, SOURCE(2)
       character*10 format, getformat
       logical okarray, okreal4, placenxt, okreal8
+
+c     we need this equivalence, because g77 can't declare chars as reals
+c     (NRAO declared nrao12m as a real*8; we have to have it as char*8)
+      equivalence(nrao12m, value)
+      equivalence(smt, valuesmt)
+      equivalence(ctype, value2)
 c
 #ifdef CONTINUUM
 #else
@@ -62,7 +69,7 @@
       DATA MON/'JAN','FEB','MAR','APR','MAY','JUN',
      .         'JUL','AUG','SEP','OCT','NOV','DEC'/
       data nrao12m/'NRAO 12M'/, nrao300/'NRAO 93M'/, 
-     1     nrao140/'NRAO 43M'/
+     1     nrao140/'NRAO 43M'/,smt/'ARO-HHT'/
 c
       data ctype/'1950RADC','EPOCRADC','MEANRADC','APPRADC','APPHADC',
      2		 'USERDEF','2000RADC','INDRADC'/
@@ -443,7 +450,8 @@
 c
 #ifdef CONTINUUM
 #else
-      if(dtwh(c1tel,iptwh).ne.nrao12m .and.
+      if(dtwh(c1tel,iptwh).ne.value .and.
+     .   dtwh(c1tel,iptwh).ne.valuesmt .and.
      .   (nint(dtwh(c1recid,iptwh)).ne.0 .or. 
      .    nint(dtwh(c3phsid,iptwh)).ne.0) ) then
 	write(cpuf,609) nint(dtwh(c1recid,iptwh)), 
@@ -451,7 +459,7 @@
 609	format('Rec:', i5, ' Phase:', i5)
         call place(ix0-sclc(n7*n14), iy0-sclc(n75))
         CALL pchar(IPUF,n72)
-       endif 
+       endif
 #endif
       cpuf = ' '
       DO 600 I = 1,2
@@ -485,7 +493,6 @@
      .					  MON(IMON),IYR
   629 FORMAT (' INT=',1x,4a2,' DATE:',1x,i2.2,1x,a3,1x,i4)
 #endif
-
 c
       call place(ix0-sclc(n7*n14), iy0-sclc(n100))
       CALL pchar(IPUF,n74)
@@ -498,7 +505,7 @@
       RDC=DTWH(C4RY,IPTWH)
       IF (ABS(RDC) .GT. 90.0) RDC=0.0
       do 680 icdtype = 1, 8
-	 if (dtwh(c4csc,iptwh) .eq. ctype(icdtype)) then
+	 if (dtwh(c4csc,iptwh) .eq. value2(icdtype)) then
            CALL RNS(RA,n2,RSTR)
            CALL RNS(DEC,n1,DSTR)
            WRITE (CPUF(1:29),639,IOSTAT=IER) dtwh(c4csc,iptwh),
@@ -517,7 +524,7 @@
 c	 hh:mm:ss DD:MM:SS format before printing
 c
          write(cpuf(1:29),689,iostat=ier) dtwh(c4csc,iptwh), ra, dec
-689      format(a8,'='2f10.4)
+689      format(a8,'=',2f10.4)
          IF (RRA.GT.0.1 .or. abs(rdc) .gt. 0.1) 
      .       WRITE (CPUF(31:52),699,IOSTAT=IER) rra, rdc
 699      FORMAT ('(',2f10.4,')')
@@ -537,11 +544,12 @@
       call place(ix0-sclc(n7*n14), iy0-sclc(n125))
       CALL pchar(IPUF,n74)
       cpuf = ' '
-c
+
       RF=DTWH(C12RF,IPTWH)
       DVEL=DTWH(C12DX,IPTWH)
       bw = abs(dtwh(c12fr,iptwh))
-      if(dtwh(c1tel,iptwh).eq.nrao12m) then
+      if(dtwh(c1tel,iptwh).eq.value .or.
+     .   dtwh(c1tel,iptwh).eq.valuesmt) then
         isb = dtwh(c9sb, iptwh)
 #ifdef CONTINUUM
         write(cpuf, 729, iostat = ier) dtwh(c12cf, iptwh), 
@@ -554,7 +562,7 @@
 	WRITE (CPUF,759,IOSTAT=IER) RF,SYN,VCNT,DVEL,nint(bw*1000),ISB,
      .         osb(1), osb(2)
  759    FORMAT ('FREQ=',F9.2,' SYN=',F10.8,' VEL=',F8.1,' DV=',
-     .        F6.2,' FR=',I4,' SB=',I1, x, 2a2)
+     .        F6.2,' FR=',I4,' SB=',I1, 1x, 2a2)
 #endif
       else 
         cf = dtwh(c12cf,iptwh)
@@ -581,7 +589,7 @@
      1   '  SMPLS',i5)
 #else
 	write(cpuf,749,iostat=ier) rf, cf, rif, bw, dvel
-  749   format('REST=',f11.5,' SKY=',f11.5,' IF=',f6.2,
+  749   format('REST=',f11.3,' SKY=',f11.3,' IF=',f6.2,
      1   ' DFREQ=',1pg10.3,' DV=',g9.2)
 #endif
 c
diff -uNr 3.5/source/conline/line/slice.f unipops-3.6/source/conline/line/slice.f
--- 3.5/source/conline/line/slice.f	2000-03-16 11:35:39.000000000 -0700
+++ unipops-3.6/source/conline/line/slice.f	2008-12-29 14:39:28.000000000 -0700
@@ -15,8 +15,8 @@
       integer*4 x1, x2, r1, r2, d1, d2, v1, v2, mloc, i, j, numtrig,
      .		iloc, ii, jj, numcells, numdone, istch(40),
      .		iarray(3), time0, time1
-      integer*2 face, ilen, lastblnk, r, v, d, ierr
-      integer*4 l1, l2, l6, l15, l24, l60 
+      integer*2 face, ilen, lastblnk, r, v, d
+      integer*4 l1, l2, l6, l15, l24, l60, ierr
       integer*2 m2, n112, n80
       real*4 cube, cval, factor
       real*8 dinfinity
@@ -188,7 +188,7 @@
 		numdone = numdone + l1
 		if ( mod(numdone, numtrig) .eq. 0 ) then
 		   write(stch,205,iostat=ierr) 100.*float(numdone)/float(numcells)
-205		   format('SLICE: ' f5.1, '% completed.')
+205		   format('SLICE: ', f5.1, '% completed.')
 		   call pwrite(istch, n80)
 		   call itime(iarray)
       		   time1 = iarray(3) + l60*(iarray(2) + l60*iarray(1))
diff -uNr 3.5/source/conline/line/summary.F unipops-3.6/source/conline/line/summary.F
--- 3.5/source/conline/line/summary.F	2000-03-16 11:35:40.000000000 -0700
+++ unipops-3.6/source/conline/line/summary.F	2008-12-29 14:39:28.000000000 -0700
@@ -615,11 +615,11 @@
 #endif
  1120 format(30x,'H coord',5x,'V coord',4x,'(',a3,')',9x,'(',a3,')')
 #ifdef CONTINUUM
- 1130 format(a1,x,f8.2,x,a16,a12,a12,x,g12.6,x,f6.2)
- 1131 format(a1,x,i5,x,i2,x,a16,a12,a12,x,g12.6,x,f6.2)
+ 1130 format(a1,1x,f8.2,1x,a16,a12,a12,1x,g12.6,1x,f6.2)
+ 1131 format(a1,1x,i5,1x,i2,1x,a16,a12,a12,1x,g12.6,1x,f6.2)
 #else
- 1130 format(a1,x,f8.2,x,a16,a12,a12,x,g12.6,x,g13.8)
- 1131 format(a1,x,i5,x,i2,x,a16,a12,a12,x,g12.6,x,g13.8)
+ 1130 format(a1,1x,f8.2,1x,a16,a12,a12,1x,g12.6,1x,g13.8)
+ 1131 format(a1,1x,i5,1x,i2,1x,a16,a12,a12,1x,g12.6,1x,g13.8)
 #endif
  1135 format(5x,'-----')
  1136 format(5x,'---- Scan ',i5,' not found.  May no longer exist.')
diff -uNr 3.5/source/conline/line/table.F unipops-3.6/source/conline/line/table.F
--- 3.5/source/conline/line/table.F	2000-03-16 11:35:43.000000000 -0700
+++ unipops-3.6/source/conline/line/table.F	2008-12-29 14:39:28.000000000 -0700
@@ -9,18 +9,24 @@
 c
       character*80 cpuf
       real*4 scan 
-      integer*2 iptwh, ipuf(40), ier, ierr, lxa1
+      integer*2 iptwh, ipuf(40), lxa1, ierr
       integer*2 m2, n80, n288, n0, n272
-      integer*4 istart, istop, i, lj, lm
+      integer*4 istart, istop, i, ier, lj, lm
       double precision chantox
       logical okarray, okreal8
 c
 #ifdef CONTINUUM
 #else
-      real*8 fib, dosb, nrao12m
+      real*8 fib, dosb, value12m, valuesmt
+      character*8 nrao12m, smt
       integer*4 iosb(2)
       equivalence (dosb, iosb(1))
-      data nrao12m /'NRAO 12M'/
+c     we need these equivalences, because g77 can't declare chars as reals
+c     (ex. NRAO declared nrao12m as a real*8; we have to have it as char*8)
+      equivalence (nrao12m,value12m)
+      equivalence (smt,valuesmt)
+c
+      data nrao12m /'NRAO 12M'/, smt/'ARO-HHT'/
 #endif
 c
       include 'cform.inc'
@@ -50,10 +56,11 @@
          CALL PWRITE(IPUF,n80)
 #else
          fib=abs(DTWH(C12FR,IPTWH))
-         if (dtwh(c1tel,iptwh) .eq. nrao12m) then
+         if (dtwh(c1tel,iptwh) .eq. value12m .or.
+     .       dtwh(c1tel,iptwh) .eq. valuesmt) then
             dosb = dtwh(c10pv, iptwh)
             write(cpuf,2091,iostat=ier) scan, fib, iosb
-2091        format(10x,f8.2,5x,'Freq. Res.',1pg18.10,' MHz',x,a4)
+2091        format(10x,f8.2,5x,'Freq. Res.',1pg18.10,' MHz',1x,a4)
          else
             WRITE(CPUF,209,IOSTAT=IER) SCAN,fib
 209         format(10x,f8.2,5x,'Freq. Res.',1pg18.10, ' MHz')
diff -uNr 3.5/source/conline/line/tellout.f unipops-3.6/source/conline/line/tellout.f
--- 3.5/source/conline/line/tellout.f	2000-03-16 11:35:44.000000000 -0700
+++ unipops-3.6/source/conline/line/tellout.f	2008-12-29 14:39:28.000000000 -0700
@@ -75,7 +75,7 @@
  1000 format(f9.2)
  1005 format(i6)
  1010 format(' ')
- 1020 format(a1,x,i6,':')
+ 1020 format(a1,1x,i6,':')
       end
              
 
diff -uNr 3.5/source/conline/line/tells.F unipops-3.6/source/conline/line/tells.F
--- 3.5/source/conline/line/tells.F	2000-03-16 11:35:44.000000000 -0700
+++ unipops-3.6/source/conline/line/tells.F	2008-12-29 14:39:28.000000000 -0700
@@ -4,14 +4,14 @@
 C-------------------------------------------------------------------------------
 c
       INTEGER*2 iactual2, ifun, i1, i2, kp, 
-     .          ia, inonzero, ier, iacct
+     .          ia, inonzero, iacct
 c
       real*4 scans(32767), scanno
       integer*2 m3, m2, m1, n1, n80, n112, n120, n232, n281
       integer*2 jmax, inonrpt
-      integer*4 numscans, numout, istype, iscanno, isubsc
+      integer*4 numscans, numout, istype, iscanno, isubsc, ier
       integer*4 imax, iactual, irtn
-      logical*2 ldoblank, lastblnk
+      logical*2 ldoblank
       character*1 prefix
 C
 #ifdef CONTINUUM
@@ -93,7 +93,7 @@
         call tellout(scans, numscans, ldoblank, prefix, istype, numout)
 c
 	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(1)(1:lastblnk(ciounit(1))),
+	  write(cpuf,159) ciounit(1)(1:lnblnk(ciounit(1))),
      .			  ' (Offline Data) file is empty'
 	  call pwrite(ipuf,n80)
         endif
@@ -130,7 +130,7 @@
 		WRITE(CPUF,2080)
       		CALL PWRITE (IPUF,n80)
 		WRITE(CPUF,2079,IOSTAT=IER)NACCUM
- 2079	FORMAT('      Of the 'i7,' scans accumed so far',
+ 2079	FORMAT('      Of the ',i7,' scans accumed so far',
      .					', the first 100 are :')
 	ENDIF
       CALL PWRITE (IPUF,n80)
@@ -200,7 +200,7 @@
         call tellout(scans, numscans, ldoblank, prefix, istype, numout)
 c
 	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(2)(1:lastblnk(ciounit(2))),
+	  write(cpuf,159) ciounit(2)(1:lnblnk(ciounit(2))),
      .			  ' (Keep) file is empty'
 	  call pwrite(ipuf,n80)
         endif
@@ -230,7 +230,7 @@
         call tellout(scans, numscans, ldoblank, prefix, istype, numout)
 c
 	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(5)(1:lastblnk(ciounit(5))),
+	  write(cpuf,159) ciounit(5)(1:lnblnk(ciounit(5))),
      .			  ' (Records) file is empty'
 	  call pwrite(ipuf,n80)
         endif
@@ -256,7 +256,7 @@
         call tellout(scans, numscans, ldoblank, prefix, istype, numout)
 c           
 	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(3)(1:lastblnk(ciounit(3))),
+	  write(cpuf,159) ciounit(3)(1:lnblnk(ciounit(3))),
      . 			  ' (Save) file is empty'
 	  call pwrite(ipuf,n80)
         endif
@@ -302,6 +302,7 @@
 	write(cpuf,159) 'The on-line data file is Not Available'
         call pwrite(ipuf,n80)
       endif
+c
 c     Get number of scans from On-Line data file
 c 
       if (iounit(1) .le. 0) then
@@ -313,10 +314,11 @@
         do 360 i1 = 1, iactual2
            if (scans(i1).ne.0) inonzero = inonzero + 1
  360       continue
-	write(cpuf,9611) ciounit(1)(1:lastblnk(ciounit(1))),
+	write(cpuf,9611) ciounit(1)(1:lnblnk(ciounit(1))),
      . 			  '(Offline Data)', inonzero
       endif
       call pwrite(ipuf,n80)
+c
 c     Get num. for off-line file
 c
       if (iounit(2) .le. 0) then
@@ -328,7 +330,7 @@
         do 361 i1 = 1, iactual2
            if (scans(i1).ne.0) inonzero = inonzero + 1
  361       continue
-      	write(cpuf,9611) ciounit(2)(1:lastblnk(ciounit(2))),
+      	write(cpuf,9611) ciounit(2)(1:lnblnk(ciounit(2))),
      . 			 '(Keep)', inonzero
       endif
       call pwrite(ipuf,n80)
@@ -343,7 +345,7 @@
         do 362 i1 = 1, iactual2
            if (scans(i1).ne.0) inonzero = inonzero + 1
  362       continue
-	write(cpuf,9611) ciounit(3)(1:lastblnk(ciounit(3))),
+	write(cpuf,9611) ciounit(3)(1:lnblnk(ciounit(3))),
      . 			 '(Save)', inonzero
       endif
       call pwrite(ipuf,n80)
@@ -359,7 +361,7 @@
         do 363 i1 = 1, iactual2
            if (scans(i1).ne.0) inonzero = inonzero + 1
  363    continue
-        write(cpuf,9611) ciounit(4)(1:lastblnk(ciounit(4))),
+        write(cpuf,9611) ciounit(4)(1:lnblnk(ciounit(4))),
      . 			 '(Gains)', inonzero
         call pwrite(ipuf,n80)
       endif
@@ -376,7 +378,7 @@
 c
         call rmextra(scans, iactual2, n1, inonrpt)
 c
-        write(cpuf,9615) ciounit(5)(1:lastblnk(ciounit(5))),
+        write(cpuf,9615) ciounit(5)(1:lnblnk(ciounit(5))),
      . 			 '(Records)', inonzero, inonrpt
 9615      format('The ', a, 1x, a, ' file contains ', i6, 
      .		' records and ', i6, ' scans')
@@ -442,7 +444,7 @@
         call tellout(scans, numscans, ldoblank, prefix, istype, numout)
 c
 	if (numout .eq. 0) then
-	  write(cpuf,159) ciounit(4)(1:lastblnk(ciounit(4))),
+	  write(cpuf,159) ciounit(4)(1:lnblnk(ciounit(4))),
      . 			  ' (Offline Gains) file is empty'
 	  call pwrite(ipuf,n80)
         endif
diff -uNr 3.5/source/conline/line/tellstat.F unipops-3.6/source/conline/line/tellstat.F
--- 3.5/source/conline/line/tellstat.F	2000-03-16 11:35:53.000000000 -0700
+++ unipops-3.6/source/conline/line/tellstat.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,194 +0,0 @@
-      subroutine tellstat(status)
-c
-c     @(#)tellstat.F	5.1 06/22/94
-c
-c     Relates the meaning of the contents of the status array.
-c
-      real status(*)
-c
-      character*24 status1(11), status3(0:2), status11(5), 
-     .		   status13(6), status21(-1:5)
-      integer*2 istat13(6), istch(40), ierr, iblue, igreen, ired, i,
-     .		lnblnk
-      character*80 stch
-c
-      include 'cio.inc'
-c
-      equivalence (stch, istch)
-c
-# ifdef CONTINUUM
-      data status1 /    "Channels",
-     .			"Time Offset",
-     .			"Position Offset",
-     .			"X-Position Offset",
-     .			"Y-Position Offset",
-     .			"X-Position",
-     .			"Y-Position",
-     .			"LST",
-     .			"UT",
-     .			2*" "/
-# else
-      data status1 /    "Channels",
-     .			"Frequency Offset",
-     .			"Velocity (Header Def.)",
-     .			"Radio Velocity",
-     .			"Optical Velocity",
-     .			"Relativistic Velocity",
-     .			"Linear Velocity Scale",
-     .			"Rest Frequency",
-     .			"Sky Frequency",
-     .			"Image Rest Frequency",
-     .			"Image Sky Frequency"/
-#endif
-      data status3 /	"Line",
-     .			"Histogram",
-     .			"Points"/
-      data status11/	"No graphics",
-     .			"SunView",
-     .			"Tek 4010",
-     .			"Retrographics",
-     .			"X-Window"/
-      data status13/	"Unknown",
-     .			"Keyboard",
-     .			"Batch File",
-     .			"Setup File",
-     .			"Help File",
-     .			"Menus"/
-      data istat13/0, 5, 7, 12, 13, 15/
-      data status21/	"None",
-     .			"SHOW",
-     .			"PLOT",
-     .			"HLFTNE",
-     .			"RASTER",
-     .			"CONTOUR/QCONTOUR",
-     .			"PLOTDOTS"/
-c
-      write(stch,20)
-20    format(72('-'))
-      call pwrite(istch, 72)
-c
-      ired = ifix(status(5)/(16.*16.))
-      igreen = ifix( (status(5)-ired*16.*16.)/16.)
-      iblue = ifix(status(5)-ired*16*16 -igreen*16) 
-      write(stch,"(a, 3i4)") "Color (RGB): ", -(ired+1),-(igreen+1),
-     .				-(iblue+1)
-      write(stch(36:),fmt="(a, i5.3)",iostat=ierr) 
-     .		"Linetype (Tick,Dash,Width): ", nint(status(6))
-      call pwrite(istch, 72)
-c
-      write(stch,fmt="(a, f5.2)",iostat=ierr) "Character Size: ", 
-     .					status(7)
-      write(stch(36:),fmt="(a, i5)",iostat=ierr) 
-     .		"# of scans in on-going average: ", nint(status(8))
-      call pwrite(istch, 72)
-c
-      if (status(10) .ge. 1) then
-	stch = "Scroll Lock: ON"
-      else
-	stch = "Scroll Lock: OFF"
-      endif
-      write(stch(36:),fmt="(a, i3)",iostat=ierr)
-     .          "# of plot areas since last PAGE: ", nint(status(9))
-      call pwrite(istch, 72)
-c
-      if ( nint(status(11)) .eq. 2 .and. termtype .eq. 'xwindow') then
-         stch = "Graphics Screen: " // status11(5)
-      else
-         stch = "Graphics Screen: " // status11(nint(status(11)))
-      endif
-      do 100 i = 2, 6
-	if (nint(status(13)) .eq. istat13(i)) goto 101
-100	continue
-      i = 1
-101   stch = stch(1:35) // "Command Input: " // status13(i)
-      call pwrite(istch, 72)
-c
-      if (status(16) .gt. 0) then
-	stch = "Command Logging:  ON"
-      else
-	stch = "Command Logging: OFF"
-      endif
-      if (status(19) .gt. 0) then
-	stch = stch(1:35) // "Error Trapping:  ON"
-      else
-	stch = stch(1:35) // "Error Trapping: OFF"
-      endif
-      call pwrite(istch, 72)
-c
-      if (status(15) .gt. 0) then
-	stch = "On-line data: Available"
-      else
-	stch = "On-line data: Unavailable"
-      endif
-      if (status(22) .gt. 0) then
-	stch = stch(1:35) // "Undo Facility:  ON"
-      else
-	stch = stch(1:35) // "Undo Facility: OFF"
-      endif
-      call pwrite(istch, 72)
-c
-      stch = "Last Plot was: " // status21(nint(status(21)))
-      if (status(20) .gt. 0) then
-	stch = stch(1:35) // "Debugging:  ON"
-      else
-	stch = stch(1:35) // "Debugging: OFF"
-      endif
-      call pwrite(istch, 72)
-c
-      stch = "PLOT/SHOW type: "  // status3(nint(status(3)))
-      stch = stch(1:35) // "RESHOW type: "  // status3(nint(status(4)))
-      call pwrite(istch, 72)
-c
-      stch = "SHOW axis (Lower/Upper): " // 
-     .	status1(nint(status(1)))(1:lnblnk(status1(nint(status(1))))) //
-     .	' / ' //  status1(nint(status(2)))
-      call pwrite(istch, 72)
-c
-      if (status(17) .gt. 0) then
-	stch = "Text output is going to: Graphics Screen"
-      else
-	if (status(14) .eq. 6) then
-	    stch = "Text output is going to: Text Screen"
-	else
-	    stch = "Text output is going to: Printout File"
-	endif
-      endif
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Graphics Screen Size: (", nint(status(23)), ",",
-     .  	nint(status(24)), ")  Pixels"
-10    format(a, 4(i5, a))
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Current Graphics Page: (", nint(status(25)), ",",
-     .  	nint(status(26)), ") to (", nint(status(27)), ",",
-     .  	nint(status(28)), ") Pixels"
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Location of Graphics Cursor: (", nint(status(31)), ",",
-     .  	nint(status(32)), ") Pixels"
-      call pwrite(istch, 72)
-c
-      write(stch,10,iostat=ierr) 
-     .		"Text Screen Size: (", nint(status(29)), ",",
-     .  	nint(status(30)), ") Characters"
-      call pwrite(istch, 72)
-c
-      stch = "Printer: " // printer 
-      stch = stch(1:lnblnk(stch)) // " (" // printtype 
-      stch = stch(1:lnblnk(stch)) // ")"
-      if (status(12) .lt. 0) then
-         stch = stch(1:lnblnk(stch)) // " (Copy: OFF)"
-      else
-         stch = stch(1:lnblnk(stch)) // " (Copy:  ON)"
-      endif
-      call pwrite(istch, 72)
-c
-      write(stch,20)
-      call pwrite(istch, 72)
-c
-      return
-      end
diff -uNr 3.5/source/conline/line/veltochan.f unipops-3.6/source/conline/line/veltochan.f
--- 3.5/source/conline/line/veltochan.f	2000-03-16 11:35:47.000000000 -0700
+++ unipops-3.6/source/conline/line/veltochan.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,73 +0,0 @@
-      double precision function veltochan( vel, array, veldef, ierr)
-c
-c----------------------------------------------------------
-c @(#)veltochan.f	5.1 06/22/94
-c----------------------------------------------------------
-c
-c     Converts for velocity (VEL) to channel number for array IARRAY
-c     IERR = 0 if all goes OK; VELDEF = RADI, OPTL, RELV, or blanks.
-c
-      double precision restf, freqres, vsys, cee, ct, freq,
-     1		       centerf, vrel, array(*)
-      integer*2 ierr
-      real vel
-      character*(*) veldef
-      logical okreal8
-c
-      include 'cform.inc'
-c
-      data cee/299792.5d0/
-c
-      restf = array(c12rf)
-      centerf = array(c12cf)
-      freqres = array(c12fr)
-      ct = array(c12rp)
-      vsys = array(c7vc)
-c
-      ierr = 0
-c
-c--------------------------
-      if (veldef .eq. 'RADI' .and. okreal8(restf) .and.
-     .	  okreal8(freqres) .and. okreal8(vsys) .and. 
-     .	  okreal8(centerf) .and. okreal8(ct) .and. 
-     .    centerf .gt. 0.d0 .and. freqres .ne. 0.d0 .and. 
-     .	  restf .gt. 0.d0) then
-          vrel = vsys + vel - vsys*vel/cee
-	  freq = restf * ( 1.0d0 - vrel/cee)
-	  veltochan = (freq-centerf)/freqres + ct
-c
-c--------------------------
-      else if (veldef .eq. 'OPTL' .and. okreal8(restf) .and. 
-     .     okreal8(freqres) .and. okreal8(vsys) .and. 
-     .	   okreal8(centerf) .and. okreal8(ct) .and. 
-     .	   centerf .gt. 0.d0 .and. freqres .ne. 0.d0 .and. 
-     .	   restf .gt. 0.d0) then
-          vrel = vsys + vel + vsys*vel/cee
-	  freq = restf / ( 1.0d0 + vrel/cee)
-	  veltochan = (freq-centerf)/freqres + ct
-c
-c--------------------------
-      else if (veldef .eq. 'RELV' .and. okreal8(restf) .and. 
-     .     okreal8(freqres) .and. okreal8(vsys) .and. 
-     .	   okreal8(centerf) .and. okreal8(ct) .and. 
-     .     centerf .gt. 0.d0 .and. freqres .ne. 0.d0 .and. 
-     .	   restf .gt. 0.d0) then
-          vrel = (vsys + vel) / (1.d0 + vsys*vel/(cee**2) )
-	  freq = restf * sqrt( (1.0d0 - vrel/cee) / (1.d0 + vrel/cee) )
-	  veltochan = (freq-centerf)/freqres + ct
-c
-c--------------------------
-      else if (veldef .eq. '    ' .and. okreal8(array(c12dx)) .and. 
-     .      okreal8(array(c12x0)) .and. okreal8(ct) .and. 
-     .	    array(c12dx) .ne. 0.d0) then
-	 veltochan = (vel - array(c12x0)) / array(c12dx) + ct
-c
-c--------------------------
-      else
-	 veltochan = vel
-	 ierr = 1
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/line/virfft.f unipops-3.6/source/conline/line/virfft.f
--- 3.5/source/conline/line/virfft.f	2000-03-16 11:35:51.000000000 -0700
+++ unipops-3.6/source/conline/line/virfft.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,89 +0,0 @@
-      subroutine virfft (isgn)
-c
-c     @(#)virfft.f	5.2 12/15/94
-c
-c     Performs 2-dim FFT on Matrices 0 and 1 and places result in Matrices 0
-c     and 1.  ISGN determines whether the forward (false) or Inverse (true) 
-c     transforms are to be used.  
-c
-      logical isgn
-c
-      integer*2 i1, i2,  n256, m2
-      integer*4 mat0x, mat0y, mat1x, mat1y, ilct, icnt, jcnt
-      logical*4 invers
-c
-      parameter (m2 = -2)
-      parameter (n256 = 256)
-c
-      INCLUDE 'appl.inc'
-      INCLUDE 'mappl.inc'
-      INCLUDE 'mform.inc'
-c
-      invers = isgn
-c
-      mat0x = nint(mhead(mnaxis1,1))
-      mat0y = nint(mhead(mnaxis2,1))
-      mat1x = nint(mhead(mnaxis1,2))
-      mat1y = nint(mhead(mnaxis2,2))
-c
-      if  (mat0x .le. 0 .or. mat0y .le. 0 .or. mat0x .ne. mat1x .or.
-     .     mat0y .ne. mat1y .or. mat0x*mat0y .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'MFFT/MIFFT')
-c     Make sure the input matrices have been initialized
-c
-      icnt = 0
-16	icnt = icnt + 1
-	if (2**icnt .lt. mat0x) goto 16
-      jcnt = 0
-17	jcnt = jcnt + 1
-	if (2**jcnt .lt. mat0y) goto 17
-c     ICNT and JCNT will help determine if the matrix sizes are a multiple
-c	of two.
-c
-
-      do 20 i2 = 1, mat0y
-c
-	do 10 i1 = 1, mat0x
-		xdata (i1) = mdata(ilct(i1,i2,1))
-		ydata (i1) = mdata(ilct(i1,i2,2))
-10		continue
-c
-	if (2**icnt .eq. mat0x) then
-	   call fft (xdata, ydata, icnt, invers)
-	else
-	   call dft (xdata, ydata, mat0x, invers)
-	endif
-c
-	do 19 i1 = 1, mat0x
-		mdata(ilct(i1,i2,1)) = xdata (i1)
-		mdata(ilct(i1,i2,2)) = ydata (i1)
-19		continue
-c
-20	continue
-c
-c
-      do 200 i1 = 1, mat0x
-c
-	do 100 i2 = 1, mat0y
-		xdata (i2) = mdata(ilct(i1,i2,1))
-		ydata (i2) = mdata(ilct(i1,i2,2))
-100		continue
-c
-	if (2**jcnt .eq. mat0y) then
-	   call fft (xdata, ydata, jcnt, invers)
-	else
-	   call dft (xdata, ydata, mat0y, invers)
-	endif
-c
-	do 190 i2 = 1, mat0y
-		mdata(ilct(i1,i2,1)) = xdata (i2)
-		mdata(ilct(i1,i2,2)) = ydata (i2)
-190		continue
-c
-200	continue
-c
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/line/window.f unipops-3.6/source/conline/line/window.f
--- 3.5/source/conline/line/window.f	2000-03-16 11:35:51.000000000 -0700
+++ unipops-3.6/source/conline/line/window.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,95 +0,0 @@
-      subroutine window (iw)
-c
-c     @(#)window.f	5.1 06/22/94
-c
-c     2-Dimensional windowing subroutine (holography package)
-c       iw     = window number:
-c                  1 = rectangular
-c                  2 = bartlett
-c                  3 = hanning
-c                  4 = hamming
-c                  5 = blackman
-c                (formulas for these functions may be obtained from
-c                "Digital Signal Processing", by Oppenheim & Shafer)
-c
-c
-c     User defined functions:
-c
-c       fnbar(u,v)    = iw .eq. 2.  Function for the 2 dimensional Bartlett
-c                       window.  u is the radius and v is the total diameter
-c       fnhan(u,v)    = iw .eq. 3.  Function for the 2 dimensional Hanning
-c                       window.  u and v are defined in fnbar
-c       fnham(u,v)    = iw .eq. 4.  Function for the 2 dimensional Hamming
-c                       window.  u and v are defined in fnbar
-c       fnbla(u,v)    = iw .eq. 5.  Function for the 2 dimensional Blackman
-c                       window.  u and v are defined in fnbar
-c
-c
-c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-c
-c
-c
-      integer*2 iw
-c
-      real fnbar, fnhan, fnham, fnbla, pi, u, v, rho, dia, fn, xc, yc
-      integer*2 i, j, n120, m2, mat0x, mat0y, mat1x, mat1y, n256
-      integer*4 ilct
-c
-      parameter (pi=3.1415927)
-      parameter (m2 = -2)
-      parameter (n256 = 256)
-      parameter (n120 = 120)
-c
-      include 'mappl.inc'
-      include 'mform.inc'
-c
-      fnbar(u,v)=2.0*(u-1.0)/(v-1.0)
-      fnhan(u,v)=.5*(1.0-cos(pi*fnbar(u,v)))
-      fnham(u,v)=.54-(.46*cos(pi*fnbar(u,v)))
-      fnbla(u,v)=.42-(.5*cos(pi*fnbar(u,v))) + 
-     1                (.08*cos(2.*pi*fnbar(u,v)))
-c
-      mat0x = nint(mhead(mnaxis1,1))
-      mat0y = nint(mhead(mnaxis2,1))
-      mat1x = nint(mhead(mnaxis1,2))
-      mat1y = nint(mhead(mnaxis2,2))
-c
-      if  (mat0x .le. 0 .or. mat0y .le. 0 .or. mat0x .ne. mat1x .or.
-     .     mat0y .ne. mat1y .or. mat0x*mat0y .gt. mdatasize/mnumarrays) 
-     .		call oerror(n256, m2, 'HOLWINDOW')
-c     Make sure the input matrices have been initialized
-c
-      if (iw .lt. 1 .or. iw .gt. 5) call oerror(n120, m2, 'HOLWINDOW')
-c
-      if (iw .eq. 1) return
-c
-      xc = float(mat0x)/2 + 0.5
-      yc = float(mat0y)/2 + 0.5
-      dia = mat0x
-c
-      do 20 i=1, mat0x
-          do 10 j=1, mat0y
-c
-            rho = xc-sqrt((i-xc)**2+((j-yc)*mat0x/mat0y)**2 )/sqrt(2.)
-c
-            if (iw .eq. 2) then
-		fn = fnbar (rho, dia)
-	    else if (iw .eq. 3) then
-		fn = fnhan (rho, dia)
-	    else if (iw .eq. 4) then
-		fn = fnham (rho, dia)
-	    else if (iw .eq. 5) then
-		fn = fnbla (rho, dia)
-	    else
-		call oerror(n120, m2, 'HOLWINDOW')
-	    endif
-c
-	    mdata(ilct(i,j,1)) = mdata(ilct(i,j,1))*fn
-	    mdata(ilct(i,j,2)) = mdata(ilct(i,j,2))*fn
-c
-   10       continue
-20       continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/line/xtochan.F unipops-3.6/source/conline/line/xtochan.F
--- 3.5/source/conline/line/xtochan.F	2000-03-16 11:35:48.000000000 -0700
+++ unipops-3.6/source/conline/line/xtochan.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,234 +0,0 @@
-      double precision function xtochan(unittype, array, v1, ierr)
-c
-c     @(#)xtochan.F	5.2 07/20/94
-c
-c     Converts X1 from units specified by UNITTYPE to channel number
-c	for array ARRAY.
-c
-c     UNITTYPE = (I*2) Units of V1.
-c  
-c		Continuum     	   	   Spectral Line
-c		-------------------------------------------
-c		-2 = matrix -x	   	    -2 = matrix -x
-c		-1 = matrix -y	   	    -1 = matrix -y
-c		1 = channel	   	    1 = channel
-c		2 = time offset	   	    2 = frequency offset
-c		3 = pos. offset (header)    3 = velocity (header)
-c		4 = pos. offset-x   	    4 = velocity (Radio)
-c		5 = pos. offset-y  	    5 = velocity (Optical)
-c		6 = position x	  	    6 = velocity (Relativity)
-c		7 = position y	  	    7 = velocity (Linear)
-c		8 = LST			    8 = rest frequency  (sig)
-c		9 = UT	 	    	    9 = sky frequency (sig)
-c			  		    *10 = rest frequency  (imag)
-c					    *11 = sky frequency (imag) 
-c
-c     Those items preceeded with a * been implemented for 12m data only
-c
-c     IERR = (I*2) If conversion is not possible, ierr will be 1, else
-c	it will be 0.
-c     V1 = value to be converted.         
-c	
-      integer*2 unittype, ierr
-      real*8 array(*), lstut
-      real*4 v1
-      logical okreal8
-c
-#ifdef CONTINUUM
-#else
-      integer isb
-      double precision veltochan, dveldef, fshift, nrao12m
-      character*8 veldef, cnrao12m
-      equivalence (dveldef, veldef), (nrao12m, cnrao12m)
-c
-      data cnrao12m /'NRAO 12M'/
-c
-#endif
-c
-      include 'cform.inc'
-      include 'mform.inc'
-c
-      data lstut/1.002737908d0/
-c
-      ierr = 0
-c
-      if (unittype .eq. -2  .and. 
-     .	       array(mdelt1) .ne. 0 .and. okreal8(array(mrval1)) .and. 
-     .	       okreal8(array(mdelt1)) .and. okreal8(array(mpix1)) ) then
-	xtochan = (v1-array(mrval1))/array(mdelt1) + array(mpix1)
-c-----------------------
-c
-      else if (unittype .eq. -1  .and. array(mdelt2) .ne. 0 .and. 
-     .	       okreal8(array(mrval2)) .and. okreal8(array(mdelt2)) .and. 
-     .         okreal8(array(mpix2)) ) then
-	xtochan = (v1-array(mrval2))/array(mdelt2) + array(mpix2)
-c-----------------------
-c
-      else if (unittype .eq. 1) then
-	xtochan = v1
-c-----------------------
-c
-#ifdef CONTINUUM
-c
-      else if (unittype .eq. 2 .and. array(c3srt) .ne. 0. .and. 
-     .	    okreal8(array(c3srt))  .and. okreal8(array(c12rp)) ) then 
-     	xtochan = v1/array(c3srt) + array(c12rp)
-c-----------------------
-c
-      else if (unittype .eq. 3 .and. array(c12dx) .ne. 0 .and.
-     .	       okreal8(array(c12dx)) .and. okreal8(array(c12x0)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + (v1-array(c12x0))/array(c12dx)
-c-----------------------
-c
-      else if (unittype .eq. 4 .and. array(c6dx) .ne. 0 .and.
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*v1/(array(c6dx)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 5 .and. array(c6dy) .ne. 0 .and.
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*v1/(array(c6dy)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 6 .and. array(c6dx) .ne. 0 .and.
-     .	       okreal8(array(c6dx)) .and. okreal8(array(c4sx)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*(v1-array(c4sx))/(array(c6dx)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 7 .and. array(c6dy) .ne. 0 .and.
-     .	       okreal8(array(c6dy)) .and. okreal8(array(c4sy)) .and.
-     .         okreal8(array(c12rp)) ) then
-     	xtochan = array(c12rp) + 3600.*(v1-array(c4sy))/(array(c6dy)*array(c3srt))
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. array(c3srt) .ne. 0. .and. 
-     .	    okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3lst)) ) then 
-     	xtochan = 3600.*(v1 - array(c3lst))/(lstut*array(c3srt)) + 
-     .		array(c12rp)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. array(c3srt) .ne. 0. .and. 
-     .	    okreal8(array(c3srt))  .and. 
-     .	    okreal8(array(c12rp)) .and. okreal8(array(c3ut)) ) then 
-     	xtochan = 3600.*(v1 - array(c3ut))/array(c3srt) + array(c12rp)
-c-----------------------
-c
-#else
-c 
-      else if (unittype .eq. 2  .and. array(c12fr) .ne. 0 .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	xtochan = array(c12rp) + v1/array(c12fr)
-c-----------------------
-c
-      else if (unittype .eq. 3) then
-	dveldef = array(c7vrd)
-	xtochan = veltochan(v1,array,veldef(1:4),ierr)
-c-----------------------
-c
-      else if (unittype .eq. 4) then
-	xtochan = veltochan(v1,array,'RADI',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 5) then
-	xtochan = veltochan(v1,array,'OPTL',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 6) then
-	xtochan = veltochan(v1,array,'RELV',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 7) then
-	xtochan = veltochan(v1, array, '    ',ierr)
-c-----------------------
-c
-      else if (unittype .eq. 8 .and. array(c12fr) .ne. 0 .and.
-     .	       okreal8(array(c12rf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	xtochan = array(c12rp) + (v1 - array(c12rf))/array(c12fr)
-c-----------------------
-c
-      else if (unittype .eq. 9 .and. array(c12fr) .ne. 0 .and.
-     .	       okreal8(array(c12cf)) .and. 
-     .	       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) ) then
-	xtochan = array(c12rp) + (v1 - array(c12cf))/array(c12fr)
-c-----------------------
-c
-      else if ((array(c1tel) .eq. nrao12m) .and.
-     .        ((unittype .eq. 10) .or. (unittype .eq. 11))) then
-         if (okreal8(array(c9fif)) .and. okreal8(array(c9sb)) .and.
-     .       okreal8(array(c12fr)) .and. okreal8(array(c12rp)) .and.
-     .       okreal8(array(c12cf)) .and. array(c12fr) .ne. 0.0) then
-c
-            isb = ifix(array(c9sb))
-            if ((isb .eq. 0) .or. (isb .eq. 2)) then
-               fshift = -2.0 * array(c9fif) / 1000.0
-            else
-               fshift = 2.0 * array(c9fif) / 1000.0
-            endif
-c
-            if (unittype .eq. 10 .and. okreal8(array(c12rf)) .and.
-     .          array(c12cf) .ne. 0.0) then
-               xtochan = array(c12rp) + (v1 - array(c12rf)*
-     .            (1.0 + fshift / array(c12cf))) /(-1.0*array(c12fr))
-            else if (unittype. eq. 11) then
-               xtochan = array(c12rp) + 
-     .            (v1 - array(c12cf) - fshift) / (-1.0*array(c12fr))
-            else
-               ierr = 1
-               xtochan = v1
-            endif
-         endif
-#endif
-c
-      else
-	ierr = 1
-	xtochan = v1
-c
-      endif
-c
-      return
-      end
-c
-      logical function okarray(unittype, array)
-c
-c     Tests whether a following conversion with XTOCHAN or CHANTOX will
-c	produce an error.
-c
-      integer*2 unittype
-      double precision array(*)
-c
-      double precision blah, xtochan, chantox
-      integer*2 ind1, ind2, ierr
-c
-      include 'cform.inc'
-      include 'mform.inc'
-c
-      if (unittype .eq. -2) then
-	ind1 = mrval1
-	ind2 = mpix1
-      else if (unittype .eq. -1) then
-	ind1 = mrval2
- 	ind2 = mpix2
-      else 
-	ind1 = c12x0
-	ind2 = c12rp
-      endif
-c
-      blah = xtochan(unittype, array, sngl(array(ind1)), ierr)
-      if (ierr .ne. 0) then
-	   okarray = .false.
-      else
-	   blah = chantox(unittype, array, sngl(array(ind2)), ierr)
-	   if (ierr .ne. 0) then
-	   	okarray = .false.
-	   else
-	        okarray = .true.
-	   endif
-      endif
-c
-      return
-      end
-
diff -uNr 3.5/source/conline/line/zerror.f unipops-3.6/source/conline/line/zerror.f
--- 3.5/source/conline/line/zerror.f	2000-03-16 11:35:47.000000000 -0700
+++ unipops-3.6/source/conline/line/zerror.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,82 +0,0 @@
-      subroutine zerror (z, isize, jsize, undefwp, ierr)
-c
-c     @(#)zerror.f	5.1 06/22/94
-c
-c     To check COMMON / MAPPL / and the z array specifications for 
-c     parameter errors.
-c
-c     z (isize, jsize) = (R*4) Array to be contoured
-c     isize = (I*4) First dimension limit of z
-c     jsize = (I*4) Second dimension limit of z
-c     undefwp = (R*4) Undefined value in z
-c     ierr = (I*4) Returns errors as sum of the following
-c		1: IMIN < 1
-c		2: IMAX-IMIN < 2
-c		4: IMAX > ISIZE
-c		8: JMIN < 1
-c		16: JMAX-JMIN < 2
-c		32: JMAX > JSIZE
-c		256: Number of LEVS < 1
-c		512: LEVS not in ascending order
-c		1024: All LEVS < minimum of z array
-c		2048: All LEVS > maximum of z array
-c
-c     Note: Errors 1 - 32 are major errors
-c
-c     Caution: COMMON /MAPPL/ must be set
-c
-c
-      integer*4 isize, jsize
-      integer*2 ierr, i, maxlev, ixmin, ixmax, iymin, iymax
-      real z(isize,jsize), zmin, zmax, cmin, cmax, undefwp
-c
-      include 'mappl.inc'
-      include 'appl.inc'
-      include 'core.inc'
-c
-      real zmin, zmax
-c
-      ierr = 0
-c
-      if (imin .lt. 1) ierr = ierr + 1
-c
-      if (imax - imin .lt. 1) ierr = ierr + 2
-c
-      if (imax .gt. isize) ierr = ierr + 4
-c
-      if (jmin .lt. 1) ierr = ierr + 8
-c
-      if (jmax - jmin .lt. 1) ierr = ierr + 16
-c
-      if (jmax .gt. jsize) ierr = ierr + 32
-c
-      if (levs(1) .le. -999999) ierr = ierr + 256
-c
-      do 60 i = 1, maxregn-1
-	maxlev = i
-	if (levs(i+1) .le. -999999) goto 70
-	if (levs(i) .gt. levs(i+1) ) then
-	   ierr = ierr + 512
-           goto 70
-	endif
-60	continue
-      maxlev = maxregn
-c
-70    if (imin .ge. 1 .and. jmin .ge. 1 .and. jmax .le. jsize .and.
-     .	  imax .le. isize) then
-          call zlimit(z, isize, jsize, zmin, ixmin, iymin, zmax, ixmax,
-     .		      iymax, undefwp)
-	  cmin = levs(1)
-	  cmax = levs(1)
-          do 100 i = 2, maxlev
-	     cmin = min(cmin, levs(i))
-	     cmax = max(cmax, levs(i))
-100	     continue
-          if (cmax .lt. zmin) ierr = ierr + 1024
-          if (cmin .gt. zmax) ierr = ierr + 2048
-	endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/line/zlimit.f unipops-3.6/source/conline/line/zlimit.f
--- 3.5/source/conline/line/zlimit.f	2000-03-16 11:35:48.000000000 -0700
+++ unipops-3.6/source/conline/line/zlimit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,79 +0,0 @@
-      subroutine zlimit (z, isize, jsize, zmin, ixmin, iymin, zmax, 
-     .			 ixmax, iymax, undefwp)
-c
-c     @(#)zlimit.f	5.1 06/22/94
-c
-c     To find the maximum and minimum in the Z array.  I = IMIN to
-c     IMAX, J = JMIN to JMAX (set in COMMON/MAPPL/).
-c
-c     z (isize, jsize) = (R*4) array for which max-min is desired
-c     isize = (I*4) first dimension limit of Z
-c     jsize = (I*4) second dimension limit of Z
-c     zmin = (R*4) Minimum value in Z-array
-c     zmax = (R*4) Maximum value in Z-array
-c     ixmin, iymin, ixmax, iymax = (I*2) Pixels where Max/Min are located.
-c     undefwp = (R*4) undefined value
-c
-c     Note: zmin and zmax are output, all others are input only.
-c	    Undefined points will be ignored.
-c
-c     Caution: IMIN, IMAX, JMIN, JMAX must be set in COMMON/APPL/
-c
-c
-      real*4 z(isize, jsize), zmin, zmax, undefwp
-      integer*4 isize, jsize
-      integer*2 n254, m2, ixmin, ixmax, iymin, iymax
-c
-      include 'mappl.inc'
-c
-      integer*2 i, j
-c
-      data m2, n254 /-2, 254/
-c
-      if (imin .gt. imax .or. imin .le. 0 .or. imax .gt. isize)
-     .		call oerror(n254, m2, 'MLIMIT')
-      if (jmin .gt. jmax .or. jmin .le. 0 .or. jmax .gt. jsize)
-     .		call oerror(n254, m2, 'MLIMIT')
-c     Checks that IMIN, IMAX, JMIN, and JMAX are defined correctly.
-c
-      zmin = z(imin,jmin)
-      zmax = zmin
-      ixmax = imin
-      ixmin = imin
-      iymax = jmin
-      iymin = jmin
-c
-      do 200 i = imin, imax
-	   do 100 j = jmin, jmax
-c
-		if (z(i,j) .ne. undefwp) then
-                    if (zmin .eq. undefwp) then
-                       zmin = z(i,j)
-                       zmax = z(i,j)
-                       ixmin = i
-                       ixmax = i
-                       iymin = j
-                       iymax = j
-		    else 
-                       if (z(i,j) .lt. zmin) then
-			   zmin = z(i,j)
-			   ixmin = i
-			   iymin = j
-		       endif
-		       if (z(i,j) .gt. zmax) then
-			   zmax = z(i,j)
-			   ixmax = i
-			   iymax = j
-                       endif
-		    endif
-		endif
-c
-100		continue
-200	   continue
-c
-      return
-c
-c    
-      end
-c
-c
diff -uNr 3.5/source/conline/main.c unipops-3.6/source/conline/main.c
--- 3.5/source/conline/main.c	2000-03-16 11:33:12.000000000 -0700
+++ unipops-3.6/source/conline/main.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,146 +0,0 @@
-
-/* @(#)main.c	5.5 05/04/98 */
-
-#include <signal.h>
-#include <setjmp.h>
-jmp_buf env, env2;
-int zero, six, one;
-sigset_t sset;
-void (*iterm)();
-void (*ipipe)();
-void (*ihup)();
-void (*iint)();
-void onintr(), closeonintr(), closeonterm(), brokenpipe();
-void (*zignal())();
-int datestyle_();
-
-#ifdef VS2_0_1
-	main(argc, argv)
-#else
-	MAIN_(argc, argv)
-#endif
-     int argc;
-     char **argv;
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-{
-    int iret, n1;
-    n1 = 1;
-
-    /* look for the undocumented y2k flag */
-    if (argc == 2 && strcmp(argv[1],"-y2k") == 0) datestyle_(&n1);
-    iterm = zignal(SIGTERM, SIG_IGN);
-    if (iterm != SIG_IGN) iterm = zignal (SIGTERM, closeonterm);
-/*  Initializes a KILL trap */
-
-    ihup = zignal(SIGHUP, SIG_IGN);
-    if (ihup != SIG_IGN) ihup = zignal (SIGHUP, closeonterm);
-/*  Initializes a HUP trap, exiting windows can do this */
-/*  Its essentially the same as a SIGTERM */
-
-    iint = zignal(SIGINT, SIG_IGN);
-    if (iint != SIG_IGN) iint = zignal (SIGINT, closeonintr);
-/*  Initializes temporarily a CTRL-C trap */
-
-    ipipe = zignal(SIGPIPE, SIG_IGN);
-    if (ipipe != SIG_IGN) ipipe = zignal (SIGPIPE, brokenpipe);
-/*  Initializes a broken pipe trap */
-
-    initfperror_();
-    initcio_(); 
-    initlock_();
-    initmess_();
-    setjmp(env2);
-    initappl_();
-    recover_(&iret);
-    gphint_();  
-    initonline_();
-    initlog_();
-    initcomm_();
-    one = 1;
-    initfiles_(&one); 
-    if (iret != 1) initsetup_();  
-
-/*  Initializes IO variables, graphics; checks for existence of necessary files
-    locks the directory from use by others, and initializes K array. */
-
-    iint = zignal(SIGINT, SIG_IGN);
-    if (iint != SIG_IGN) iint = zignal(SIGINT, onintr);
-    sigemptyset(&sset);
-    sigaddset(&sset, SIGINT);
-    setjmp(env);
-    /* make sure SIGINT is not blocked */
-    sigprocmask(SIG_UNBLOCK, &sset, NULL);
-
-/*  Sets up permanent CTRL-C trap */
-
-    gtline_();
-    zero = 0;
-    exitpops_(&zero);
-}
-
-void closeonintr(signo)
-int signo;
-
-{
-    zignal(SIGINT, SIG_IGN);
-/*		ignore any more interrupts, just exit */
-    printf("\nCTRL-C Interrupt -- Terminating\n");
-    six = 6;
-    exitpops_(&six);
-}
-
-void closeonterm(signo)
-int signo;
-
-{
-    
-    ihup = zignal(SIGHUP, SIG_IGN);
-    iterm = zignal(SIGTERM, SIG_IGN);
-/*		ignore things that can get here so this doesn't happen */
-/*		more than once */
-    printf("\nProccess has been KILLED\n");
-    six = 6;
-    exitpops_(&six);
-}
-
-void brokenpipe(signo)
-int signo;
-
-{
-    printf("\nCannot communicate with child process -- Continuing\n");
-}
-
-catchtrlc_()
-{
-     iint = zignal(SIGINT, onintr);
-}
-
-void onintr(signo)
-int signo;
-{
-    ctrlcintr_();
-    longjmp(env, 1);
-}
-
-wipe_()
-{
-     initcio_();
-     longjmp(env2, 1);
-}
-togtline_()
-{
-     longjmp(env, 1);
-}
-ignorectrlc_()
-{
-     iint = zignal(SIGINT, SIG_IGN);
-}
-resetctrlc_()
-{
-     iint = zignal(SIGINT, iint);
-}
-int signo;
diff -uNr 3.5/source/conline/massgn.f unipops-3.6/source/conline/massgn.f
--- 3.5/source/conline/massgn.f	2000-03-16 11:33:13.000000000 -0700
+++ unipops-3.6/source/conline/massgn.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,84 +0,0 @@
-      SUBROUTINE  MASSGN
-C-------------------------------------------------------------------------------
-C  @(#)massgn.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C Modified 890105 [PPM] includes to .inc, lowercase
-c          8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      integer*4 maxtemp
-      parameter (maxtemp = 100)
-c		size of temp array
-      integer*2 JTEMP(40), iblank, nvals, isize, iwpr, j, m, irealp
-      integer*2 m1, n4, n106, n107, n120, n126, fshort
-      REAL*8 TEMP(maxtemp)
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-c
-      DATA IBLANK/' '/
-c
-      data m1, n4, n106, n107, n120, n126 /-1, 4, 106, 107, 120, 126/
-C
-C=======================================================================
-C
-      if (sp .gt. slim .or. sp-3 .lt. 0) call oerror(n107, m1, '=')
-      NVALS = STACK (SP)
-      ISIZE = NVALS
-      IF (STACK(SP-1).EQ.2 .or. stack(sp-1) .eq. 3) ISIZE = ISIZE * 4
-      SP = SP -	ISIZE -	1
-      IF (STACK(SP - 3).EQ.7) GOTO 20
-      IF (STACK(SP - 3).ne.2) call oerror(n126, m1, ' ')
-      J	= 2 * IWPR(ISIZE)
-      if (isize .gt. maxtemp) call oerror(n120, m1, 'MASSGN')
-c
-      CALL COPY	(J,V(SP+1),TEMP)
-      TAG = STACK(SP - 1)
-      ISIZE = STACK(SP - 2)
-      IF (ISIZE.lt.NVALS) call oerror(n106, m1, '=')
-      SP = SP -	4
-      J	= 0
-      CALL COPY	(fshort(NVALS+4),J,STACK(SP+1))
-      TAG = TAG	- 1
-      DO 10 J =	1, NVALS
-	   TAG = TAG + 1
-	   SP =	SP + 2
-	   if (sp-1 .le. 0 .or. sp .gt. slim) call oerror(n107, m1, '=')
-	   STACK(SP - 1) = TAG
-	   V(SP) = TEMP(J)
-	   CALL	ASSGN
-   10	   CONTINUE
-      IF (ISIZE.EQ.NVALS) GOTO 99
-	 M = 0
-	 ISIZE = ISIZE - NVALS
-	 TAG = TAG + 1
-	 GOTO 40
-   20 CALL COPY(ISIZE,STACK(SP+1),JTEMP)
-      TAG = STACK(SP-1)
-      ISIZE = STACK(SP - 2)
-      SP = SP -	4
-      DO 30 J =	1, NVALS
-	   SP =	SP + 8
-	   if (sp-7 .le. 0 .or. sp .gt. slim) call oerror(n107, m1, '=')
-	   STACK(SP - 7) = 7
-	   STACK(SP - 6) = ISIZE
-	   STACK(SP - 5) = TAG
-	   STACK(SP - 4) = 3
-	   CALL	COPY (n4,JTEMP(4*(J-1)+1),STACK(SP-3))
-	   M = STACK(SP-2)
-	   IF (STACK(SP-3).EQ.14) M = IREALP(M)
-	   CALL	ASSGN
-	   ISIZE = ISIZE - M
-	   TAG = TAG + M
-   30	   CONTINUE
-      IF (ISIZE.EQ.0) GOTO 99
-	 M = IBLANK
-   40 ISIZE = IWPR (ISIZE)
-      if (tag .le. 0) call oerror(n107, m1, '=')
-      CALL FILL (ISIZE,M,C(TAG))
-   99 CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/menus.f unipops-3.6/source/conline/menus.f
--- 3.5/source/conline/menus.f	2000-03-16 11:33:13.000000000 -0700
+++ unipops-3.6/source/conline/menus.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,130 +0,0 @@
-      subroutine menus(ier)
-c---------------------------------------------
-c  @(#)menus.f	5.1 06/22/94
-c---------------------------------------------
-c     Supplies the values of variables for the graphical user interface.
-c
-      integer*2 lptr, ii, itype, numi2, ilen, lastblnk, ioutstrng(256),
-     1          iblank, isize, itag, iarryptr, ilast, iwpr, ier,
-     2		il2, iwpc
-      integer*2 fshort
-      integer*4 long
-      character*512 coutstrng, ctempstrng
-      character*2 cblank
-c
-      include 'cio.inc'
-      include 'appl.inc'
-      include 'core.inc'
-c
-      equivalence(coutstrng, ioutstrng), (iblank,cblank)
-c
-      data cblank/'  '/
-c
-c     First, go through the core array to find the values of things the GUI
-c     will need.
-c
-      ier = 0
-      rewind(imenuout,iostat=ier)
-      if (ier .ne. 0) goto 99
-c
-      lptr = 1
-c
-10    lptr = k(lptr)
-c
-      if (lptr .ne. 0) then
-c
-	numi2 = k(lptr+1)/16
-	itype = k(lptr+1) - 16*numi2
-c
-	if (itype .eq. 1 .or. itype .eq. 2 .or. itype .eq. 3 .or.
-     1      itype .eq. 7) then
-	    coutstrng = ' '
-	    ctempstrng = ' '
-	    call copy(numi2, k(lptr+4), ioutstrng(1) )
-	    ilen = lastblnk(coutstrng)
-c
-c           Get the name if it is a scalar, array, procedure, or literal and
-c	    store it in coutbuf
-c
-c
-	   if (itype .eq. 3) then
-	      coutstrng = ':procedure:' // coutstrng(1:ilen)
-c	      For procedures, just print out its name with a starting 'procedure'
-c	      designator.
-c
-c
-	   else if (itype .eq. 1) then
-	      itag = k(lptr+2)
-	      write(ctempstrng,22) coutstrng(1:ilen), c(itag)
-22	      format(':',a,':',1x,1p32g14.6, )
-	      coutstrng = ctempstrng
-c	      For scalars, print out name and its value
-c
-c
-	   else if (itype .eq. 2) then
-	      iarryptr = k(lptr+3)
-	      itag = k(lptr+2)
-	      isize = min(32, k(iarryptr) )
-	      ilast = isize + itag - 1
-	      write(ctempstrng,22) coutstrng(1:ilen),(c(ii),ii=itag,ilast)
-	      coutstrng = ctempstrng
-c	      For arrays, print out names and array values
-c
-c
-	   else if (itype .eq. 7) then
-	      iarryptr = k(lptr+3)
-	      itag = k(lptr+2)
-	      isize = iwpr(k(iarryptr))
-	      coutstrng = ':' // coutstrng(1:ilen) // ':'
-	      il2 = iwpc(fshort(ilen+2))
-	      call copy(min(isize, 79-ilen), c(itag), ioutstrng(il2+1) )
-c	      For character strings, print out name and the string
-c
-	   endif
-c
-	   if (itype .eq. 1 .or. itype .eq. 2) then
-	      il2 = lastblnk(coutstrng)
-	      if (coutstrng(il2:il2).eq.'0') coutstrng(il2:il2) = ' '
-	      do 239 ii = il2-1, ilen, -1
-		if (coutstrng(ii:ii+1).eq.'0 ') coutstrng(ii:ii+1) = '  '
-239		continue
-c	      Removes trailing zeros if scalar or arrays variable.
-c
-2391	      ii = index(coutstrng,  '  0.Inf ')
-	      if (ii .ne. 0) then
-		coutstrng(ii:ii+7) = 'DEFAULT '
-		goto 2391
-	      endif
-	      ii = index(coutstrng,  ' Inf    ')
-	      if (ii .ne. 0) then
-		coutstrng(ii:ii+7) = ' DEFAULT'
-		goto 2391
-	      endif
-c	      Prints out DEFAULT (instead of Infinity).
-c
-	   endif
-c
-	   if (itype .ne. 7) then
-		call cmprsstrng(coutstrng, ctempstrng)
-	        ilen = lastblnk(ctempstrng)
-	   else
-		ctempstrng = coutstrng
-		ilen = ilen+2+2*min(isize, 79-ilen)
-	   endif
-c	   Remove all spaces except in the case of strings; output is now
-c	   ctempstrng.
-c
-	   write(imenuout,21,iostat=ier) ctempstrng(1:ilen)
-21	   format(a)
-	   if (ier .ne. 0) goto 99
-c	   Write it out to the menuout file
-c
-	endif
-	goto 10
-      endif
-c
-99    call flush(long(imenuout))
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/modefn.c unipops-3.6/source/conline/modefn.c
--- 3.5/source/conline/modefn.c	2000-03-16 11:30:05.000000000 -0700
+++ unipops-3.6/source/conline/modefn.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,75 +0,0 @@
-
-/* @(#)modefn.c	5.1 06/22/94 */
-
-/* 2 functions for using modes.h and the modes array */
-/* both set *irtn to zero if successfull and to 1 if an error occured */
-
-#include <modes.h>
-
-void modeid_ (field, id, irtn) 
-
-   char *field;
-   short int *id, *irtn;
-
-/*	given field (a pointer to a 4 char string) return the matching id */
-
-{
-   int i, i4 = 4;
-
-   for (i=0;i<NUMMODES;i++) {
-      if (strncmp(modes[i].field,field,i4) == 0) break;
-   }
-
-   if (i != NUMMODES) {
-      *irtn = 0;
-      *id = i;
-   } else {
-/*	Not found, set it to the null id and report an error */
-      *irtn = 1;
-      *id = 0;
-   }
-}
-
-void modedesc_ (id, desc, irtn)
-
-   short int *id, *irtn;
-   char *desc;
-
-/*	given an id, set *desc to the description of that mode */
-/*	this is currently 32 character string, pad *desc out to */
-/* 	32 characters if necessary. */
-
-{
-   int i;
-
-   if (*id >= 0 || *id < NUMMODES) {
-      *irtn = 0;
-      strcpy(desc, modes[*id].description);
-      for (i=strlen(desc);i<32;i++) {
-         *(desc+i) = ' ';
-      }
-   } else {
-/*	a bad id, don't change desc and report error */
-      *irtn = 1;
-   }
-}
-
-void modefield_(id, field, irtn)
-
-   short int *id, *irtn;
-   char *field;
-
-/*	given an id, return the field associated with it */
-
-{
-   int i, i4 = 4;
-
-   if (*id >= 0 || *id < NUMMODES) {
-      *irtn = 0;
-      strncpy(field, modes[*id].field, i4);
-   } else {
-/*	a bad id, set field to 0 and report error */
-      strncpy(field, modes[0].field, i4);
-      *irtn = 1;
-   }
-}
diff -uNr 3.5/source/conline/move2.f unipops-3.6/source/conline/move2.f
--- 3.5/source/conline/move2.f	2000-03-16 11:33:14.000000000 -0700
+++ unipops-3.6/source/conline/move2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-      SUBROUTINE move2 (AMOUNT,FROM,FP,TO,TP)
-C-------------------------------------------------------------------------------
-C  @(#)move2.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c*******************************************
-c Modified 8903 [RJM] See CHANGES.DOC
-c*******************************************
-C-----------------------------------------------------------------------
-C        MOVE is a general purpose array moving routine.
-C     AMOUNT  =  Number of i*2 words to be moved.
-C     FROM    =  Source array.
-C     FP      =  Index of first element in FROM.
-C     TO      =  Receiving array.
-C     TP      =  Index of first element in TO.
-C-----------------------------------------------------------------------
-      integer*2 FROM(*), TO(*)
-      integer*2 AMOUNT, FP, TP, i, iwpc
-      DO 10 I = 1,iwpc(AMOUNT)
-         TO(I-1+iwpc(TP)) = FROM(I-1+iwpc(FP))
- 10      CONTINUE
-      RETURN
-      END
-
-
diff -uNr 3.5/source/conline/nextfield.f unipops-3.6/source/conline/nextfield.f
--- 3.5/source/conline/nextfield.f	2000-03-16 11:33:15.000000000 -0700
+++ unipops-3.6/source/conline/nextfield.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,58 +0,0 @@
-      subroutine nextfield(string)
-C-------------------------------------------------------------------------------
-C  @(#)nextfield.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Extracts the next string from the input line
-c     Field begins with next non-blank character and ends with either a
-c	semi-colon or another space.
-c     Depending upon the input, the returned string could be in either
-c     upper or lower case.
-c
-c     December 1989 [RJM]
-c**********************************************************
-c
-      character*(*) string
-      character*2 cm
-      integer*2 m, ib, ibstart, iend, n14, n1
-c
-      include 'cio.inc'
-      include 'smstuf.inc'
-c
-      equivalence (cm, m)
-c
-      data n1, n14 /1, 14/
-c
-      ib = kbptr
-10    if (ib .le. min(nbytes,karlim) ) then
-	m = karbuf(ib)
-	if (cm(1:1) .ne. ' ' ) goto 20
-	ib = ib + 1
-	goto 10
-      endif
-c     Skips over any initial blanks
-c
-c
-20    ibstart = ib
-      do 30 iend = ibstart, min(nbytes,karlim)
-	m = karbuf(iend)
-	if (cm(1:1) .eq. ' ' .or. cm(1:1) .eq. ';') goto 40
-30	continue
-      iend = min(nbytes,karlim)
-c     looks for next blank or colon to flag end of field
-c
-40    if (ibstart .eq. iend) then
-	string = ' '
-      else if (iend - ibstart .gt. 60) then
-c		too many characters
-        call oerror(n14, n1, ' ')
-      else
-        string = cbuff(ibstart:iend)
-      endif
-c     Extracts the next field on the input line
-c
-      kbptr = iend
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/noghard.f unipops-3.6/source/conline/noghard.f
--- 3.5/source/conline/noghard.f	2000-03-16 11:33:15.000000000 -0700
+++ unipops-3.6/source/conline/noghard.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,45 +0,0 @@
-      subroutine noghardvctr(i,j)
-C-------------------------------------------------------------------------------
-C  @(#)noghard.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Dummy routines for taking care of non-graphics printers
-c
-      include 'cio.inc'
-c
-      integer*2 string(*), i, j, k, l, i1, ij, lastblnk, ilen
-      integer*4 idx
-c
-      return
-c
-      entry noghardplace(i,j)
-      return
-c
-      entry noghardchar(string,i)
-      return
-c
-      entry noghardcsize(i)
-      return
-c
-      entry noghardbox(i,j,k,l)
-      return
-c
-      entry noghardcolor(idx)
-      return
-c
-      entry noghardtcopy
-c
-c     Dumps internal array INSTRING to device IMUNIT for dumping
-c	of text screen -- Non-graphics printer code
-c     
-	do 1099 i1 = 1, inlast
-	   ij = mod(i1+inline-2,inlast) + 1
-	   ilen = lastblnk(instring(ij))
-	   write(iouttxt,10) instring(ij) (1:ilen)
-10	   format(a)
-1099	   continue
-      return
-c
-      end
-c
-
diff -uNr 3.5/source/conline/nogint.f unipops-3.6/source/conline/nogint.f
--- 3.5/source/conline/nogint.f	2000-03-16 11:33:15.000000000 -0700
+++ unipops-3.6/source/conline/nogint.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,42 +0,0 @@
-      subroutine nogint
-C-------------------------------------------------------------------------------
-C  @(#)nogint.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Dummy routines for non-graphics screens
-c
-      integer*2 string(*), i, j, icursor, k, l
-      integer*4 idx
-c
-      return
-c
-      entry nogvctr(i,j)
-      return
-c
-      entry nogchar(string,i)
-      return
-c
-      entry nogplace(i,j)
-      return
-c
-      entry nogcursor(icursor,i,j)
-      icursor = -1
-      return
-c
-      entry nogclose
-      return
-c
-      entry nogclrpage
-      return
-c
-      entry nogcsize(i)
-      return
-c
-      entry nogbox(i,j,k,l)
-      return
-c
-      entry nogcolor(idx)
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/oerror.f unipops-3.6/source/conline/oerror.f
--- 3.5/source/conline/oerror.f	2000-03-16 11:33:16.000000000 -0700
+++ unipops-3.6/source/conline/oerror.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,187 +0,0 @@
-      SUBROUTINE OERROR	(IDD, isever, string)
-C-------------------------------------------------------------------------------
-C  @(#)oerror.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C	 ERROR displays	the error message on the users terminal
-C     and returns not to the calling program, but to the GTLINE
-C     routine.
-c
-c     IDD = error number
-c     isever = error severity (-3, -2, -1, 0, 1)
-c        -3 = internal POPS error
-c	 -2 = severe execution error that the user can attempt to catch
-c        -1 = fatal execution error
-c         0 = warning message
-c	  1 = interpretor/compiler error
-c     string = aux. string to be printed with error
-C
-C Modified 890105 [PPM] includes to .inc, lowercase
-c          8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      CHARACTER*60 MESAGE(500)
-      character*80 command
-      INTEGER*2 icommand(5), lastblnk, idd, iambiguous, karat, nerr, i,
-     .          ilen, i1, i2, ier, j, isever, ilenstrng, ilencp, 
-     .		iamath(2), n1
-      character*(*) string
-      character*1 svr
-      logical*2 skipoe2
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'errors.inc'
-      INCLUDE 'cio.inc'
-      include 'ambig.inc'
-      include 'appl.inc'
-      include 'stk.inc'
-c
-      equivalence (command, icommand)
-c
-      include 'tags.inc'
-      INCLUDE 'mesage.inc'
-c
-      DATA karat/' >'/, n1/1/
-C
-C=======================================================================
-C
-      skipoe2 = .false.
-c
-      if (amath .and. (idd .eq. iamath(1) .or. idd .eq. iamath(2))) then
-	nspacen = MAX_DATA_POINTS + 1
-	call amatherror
-	call togtline
-	amath = .false.
-      endif
-c     If array math is in progress and the error is that which is produced
-c     when an array bound is exceeded, then go on to next command in interp
-c     and then ask for next input line.
-c
-      errcode = float(idd)
-c
-      NERR = IDD
-      ilen = lastblnk(mesage(nerr))
-      ilenstrng = max(lastblnk(string),1)
-
-      if (isever .eq. -1) then
-	svr = 'F'
-      else if (isever .eq. -2) then
-	svr = 'S'
-      else if (isever .eq. 0) then
-	svr = 'W'
-      else if (isever .eq. 1) then
-	svr = 'I'
-      else
-	svr = 'P'
-      endif
-c
-      IF (NERR .GT. 500 .OR. NERR .LT. 1) THEN
-	  write(istderr, 11) svr, nerr, string(1:ilenstrng)
-11        format( 1x, '(', a1, i3, ') ', a, ' : ', a)
-      else if (ilen .le. 0) then
-	  write(istderr, 11) svr, nerr, string(1:ilenstrng)
-c         Prints out a special message if an unknown error code is found
-c
-      else 
-c
-	if (isever .gt. 0) then
-           command = cbuff(max(1,kbptr-nkar):
-     .                  max(1,kbptr-nkar) + min(nkar,10) - 1) //
-     .			' : ' // string(1:ilenstrng)
-c	   If isever>0, then print out command being interpreted as
-c	   well as error message and aux. string.
-	else
-	   command = string(1:ilenstrng)
-c	   if NERR > 100, then print out only aux. string
-c
-	endif
-c
-        ilencp = lastblnk(command)
-c
-        if (erron .or. isever .ne. -2) then
-c	           be silent if it is a severe error being caught
-           if (ilencp + ilen + 10 .gt. linelngth) then
-              write(istderr,10) svr, nerr, mesage(nerr)(1:ilen),
-     .                          command(1:ilencp)
-10            format( 1x, '(', a1, i3, ') ', a, ' : ', /, 1x, a)
-	   else
-	      write(istderr,11) svr,nerr, mesage(nerr)(1:ilen),
-     .                          command(1:ilencp)
-	   endif
-        endif
-c
-        if (nerr.eq.iambiguous) then
- 	   write(istderr,*) ' '
-           do 77 i1 = 1,napp,6
-	      i2 = min(i1+5,napp)
-	      write(cpuf, 3, iostat=ier) ((mname(j,i),j=1,5),i=i1,i2)
-   3  	      format (6(2x,5a2))
-	      ilen = lastblnk(cpuf)
-	      write(istderr,*) cpuf(1:ilen)
-   77         continue
- 	   write(istderr,*) ' '
-        endif
-c       Takes care of the special case of an error caused by an ambiguous
-c       symbol.
-c
-      endif
-c
-      IF (IDEBUG .GT. 0) write(istderr,1) idd,kbptr,nkar
-   1  FORMAT ('	POPS ERROR NO. ',3I5,' : ')
-c
-      if (isever .eq. 0) then
-	return
-c       If type 0 error, just return.
-c
-      else if (isever .gt. 0) then
-	write(istderr,*) 'Line ignored -- no commands executed'
-c	Interpretor error so no commands should not be executed
-c
-      else if (isever .eq. -2) then
-	if (erron) then
-     	  write(istderr,*) 'Command skipped -- Rest of command line is ignored'
-c	  You can ignore rest of commands on comand line
-c
-	else
-	   erron = .true.
-           skipoe2 = .true.
-	   call execerror
-c	   Try to silently continue executing rest of commands on line
-c
-	endif
-c
-      else 
-     	write(istderr,*) 'Command skipped -- Rest of command line is ignored'
-      endif
-c     Give supplemental info as to what will go on next with command line.
-c
-      if (mode .eq. -1) mode = iedit
-c     Was adding a decleration -- go back to mode prior to start of decleration
-c
-      if (mode .eq. 1 .and. iinunit .ne. istdin) then
-     	        write(istderr,*) 'Inserting a FINISH into the procedure.'
-     		call pseudo(ifinish-ipseudo+1)
-		call push(a, ap, iomega)
-		defexec = 0
-	        lastline = "FINISH"
-		call stores(n1)
-      endif
-c     Was compiling but input was not the terminal.
-c
-      if (mode .eq. -2 .or. mode .eq. 2 .or. mode .eq. 0) then
-         L = 1
-	 iedit = 0
-	 mode = 0
-	 llit = 0
-	 call prompt(karat, ipt)
-      endif
-C     Reset control variables.
-c
-      if (.not. skipoe2) call oerror2
-c
-      erron = .true.
-      call togtline
-c     Alawys go to GTLINE.  GTLINE will never return control back to OERROR.
-c
-      END
-c
diff -uNr 3.5/source/conline/otherbox.f unipops-3.6/source/conline/otherbox.f
--- 3.5/source/conline/otherbox.f	2000-03-16 11:33:17.000000000 -0700
+++ unipops-3.6/source/conline/otherbox.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,148 +0,0 @@
-      subroutine otherbox(ix0, iy0, ix1, iy1)
-c
-c     @(#)otherbox.f	5.2 09/23/94
-c
-c     Draws a box with corners (IX0,IY0), and (IX1,IY); mimics color
-c	for non-color devices.
-c
-c     Color is mimiced by drawing a set of lines in the box that depend
-c	in a random way on the chosen color.  The same color will always
-c	give the same pattern of lines.
-c
-c     The pattern is determined by:
-c	NSTEP -- distance between lines in x and y (1 - 4)
-c	ANGLE1 -- angle with respect to horizontal at which the first set
-c		of lines will be drawn (0, 45, 90, or 135).
-c	NANGLE -- how many different set of lines at various angles are
-c		to be drawn.  Angles are seperated by 45 degrees (1 - 4).
-c
-      integer*2 ix0, iy0, ix1, iy1, ixstart, ixend, iystart, iyend, i,
-     .		nx, ny, j, nangle, nstep, angle1, angle
-      integer*4 idx
-      real cred, cblue, cgreen, cfill
-c
-      save nangle, cfill, angle1
-c
-      data nangle/1/, nstep/4/, angle1/0/
-c
-      nx = ix1 - ix0 + 1
-      ny = iy1 - iy0 + 1
-      nstep = 2 + nint(3.*(1.-cfill))
-c
-      do 20 i = 1, nangle
-c
-	  angle = mod(angle1 + 45*(i-1), 180)
-c
-	  if (angle .eq. 0) then
-	    do 8 j = iy0+nstep, iy1, nstep
-	      ixstart = ix0
-	      iystart = j
-	      ixend = ix1
-	      iyend = j
-	      call otherdraw(ixstart, iystart, ixend, iyend)
-8	      continue
-c
-	  else if (angle .eq. 90) then
-	    do 9 j = ix0+nstep, ix1, nstep
-	      ixstart = j
-	      iystart = iy0
-	      ixend = j
-	      iyend = iy1
-	      call otherdraw(ixstart, iystart, ixend, iyend)
-9	      continue
-c
-	  else if (angle .eq. 45) then
-	    do 10 j = ix0, ix1, nstep
-	      ixstart = j
-	      iystart = iy0
-	      ixend = min(ix1, j+min(nx,ny)-1)
-	      iyend = iy0 + ixend - ixstart
-	      call otherdraw(ixstart, iystart, ixend, iyend)
-10	      continue
-	    do 11 j = iy0+nstep, iy1, nstep
-	      ixstart = ix0
-	      iystart = j
-	      iyend = min(iy1, j+min(nx,ny)-1)
-	      ixend = ix0 + iyend - iystart
-	      call otherdraw(ixstart, iystart, ixend, iyend)
-11	      continue
-c
-	  else if (angle .eq. 135) then
-	    do 12 j = ix1, ix0, -nstep
-	      ixstart = j
-	      iystart = iy0
-	      ixend = max(ix0, j-min(nx,ny)+1)
-	      iyend = iy0 + ixstart - ixend
-	      call otherdraw(ixstart, iystart, ixend, iyend)
-12	      continue
-	    do 13 j = iy0+nstep, iy1, nstep
-	      ixstart = ix1
-	      iystart = j
-	      iyend = min(iy1, j+min(nx,ny)-1)
-	      ixend = ix1 - (iyend - iystart)
-	      call otherdraw(ixstart, iystart, ixend, iyend)
-13	      continue
-	  endif
-20	  continue
-c
-      return
-c
-      entry othercolor(idx)
-c
-c     Mimics color by drawing random lines; uses IDX as a seed for the
-c	random number generator to calculate NSTEP, ANGLE1, NANGLE;
-c
-      cred = and(rshift(idx,16),255)/255.
-      cgreen = and(rshift(idx,8),255)/255.
-      cblue = and(idx,255)/255.
-c     Calculate RGB values from IDX -- range 0.0 to 1.
-c
-      cfill = cred*cgreen*cblue
-c	CFILL will be the percentage to fill in the box
-c
-      angle1 = 45*nint(3.*abs(cred-cgreen))
-c	ANGLE1 has an equal probability of being 0, 45, 90, and 135.
-c
-      nangle = 1 + nint(3.*(1.-cred)*(1.-cblue))
-c	NANGLE has a higher priority of being 1 and a lower probability of
-c	being 4.
-c
-      return
-      end
-c
-c
-      subroutine otherdraw(ixstart, iystart, ixend, iyend)
-c
-c     Draws a vector from (IXSTART,IYSTART) to (IXEND,IYEND) on
-c     all devices except SUNCORE and NOG's.
-c
-      integer*2 ixstart, iystart, ixend, iyend
-c
-      include 'cio.inc'
-c
-      if (ixend .ne. ixstart .or. iyend .ne. iystart) then
-      	      if (igraphtype .eq. 4) then
-			call v102place(ixstart,iystart)
-			call v102vctr(ixend,iyend)
-     	      else if (igraphtype .eq. 3) then
-			call tekplace(ixstart,iystart)
-			call tekvctr(ixend,iyend)
-	      endif
-      	      if (iprinttype .eq. 5) then
-        		call quichardplace(ixstart,iystart)
-        		call quichardvctr(ixend,iyend)
-      	      else if (iprinttype .eq. 4) then
-			call hphardplace(ixstart,iystart)
-			call hphardvctr(ixend,iyend)
-      	      else if (iprinttype .eq. 3) then
-			call posthardplace(ixstart,iystart)
-			call posthardvctr(ixend,iyend)
-      	      else if (iprinttype .eq. 2) then
-			call qmshardplace(ixstart,iystart)
-			call qmshardvctr(ixend,iyend)
-      	      endif
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/packer.f unipops-3.6/source/conline/packer.f
--- 3.5/source/conline/packer.f	2000-03-16 11:33:18.000000000 -0700
+++ unipops-3.6/source/conline/packer.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,39 +0,0 @@
-      subroutine packer(ixrw, iyrw, c4out)
-C-------------------------------------------------------------------------------
-C  @(#)packer.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c Code used to pack TEKTRONIX like graphics commands
-c***********************************************
-c 8904 [RJM]
-c***********************************************
-c
-      character*4 c4out
-      integer*2 iout(4), ixrw, iyrw, mask1, mask2, mxyl, myr, mxr, ixl,
-     .          ixr, iyl, iyr
-      character*1 c1out(8)
-c
-      equivalence (c1out, iout)
-c
-      data mask1/992/, mask2/31/, mxyl/32/, myr/96/, mxr/64/
-c     mask1 = 03d0; mask2 = 001e; mxyl = 0020; myr = 0060; mxr = 0040
-c
-       ixl = and(ixrw, mask1)
-       ixl = ixl / 32
-       iout(3) = or(ixl, mxyl)
-       ixr = and(ixrw, mask2)
-       iout(4) = or(ixr,mxr)
-       iyl = and(iyrw, mask1)
-       iyl = iyl / 32
-       iout(1) = or(iyl,mxyl)
-       iyr = and(iyrw,mask2)
-       iout(2) = or(iyr,myr)
-c
-       c4out = c1out(2) // c1out(4) // c1out(6) // c1out(8)
-c
-       return
-c
-       end
-c
-c*********************************
-c
diff -uNr 3.5/source/conline/pchar.f unipops-3.6/source/conline/pchar.f
--- 3.5/source/conline/pchar.f	2000-03-16 11:33:18.000000000 -0700
+++ unipops-3.6/source/conline/pchar.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,412 +0,0 @@
-      subroutine fset ( iset , spacing)
-c
-c     @(#)pchar.f	5.3 03/19/96
-c
-c     Allows for changing the character set
-c
-c     iset = (I*2) number of character set to use
-c          = 1 (Default) Roman simplex
-c	   = 2 Greek simplex
-c          = 3 Greek Gothic
-c	   = 4 Italic Gothic
-c	   = 5 English Gothic
-c	   = 6 Roman Duplex
-c	   = 7 Cyrillic Complex
-c	   = 8 Script Complex
-c	   = 9 Roman Complex
-c	   = 10 Italic Complex
-c	   = 11 Greek Complex
-c 	   = 12 Roman Triplex
-c	   = 13 Italic Triplex
-c	   = 14 Special symbols
-c	   = 15 Script Simplex
-c
-c     spacing = (L*2) TRUE if you want equally soaced characters, else they
-c		will be spaced by the size of the character.
-c
-c     Note: Up to three character sets will reside in core at any one
-c	   time, one of which (the first loaded) is the default font
-c	   which cannot be overwritten and the other two are user
-c	   chosable fonts.  If more than two additional are needed, the
-c	   program will throw away one of the old sets and read in the
-c	   new set.  Switching between three character sets will,
-c	   therefore, be much faster than if you switch between four or
-c	   more.
-c
-      integer*2 iset
-      logical spacing
-c
-      include 'cio.inc'
-      include 'foxplot.inc'
-c
-      integer*2 ier, lastblnk, n0, m1, kset, i, j, n112, n352, n372,
-     .		n356, n120, m3
-      character*10 files(NUMFONTS)
-      character*1023 charfile
-      logical first
-c
-      parameter (n0 = 0)
-      parameter (n112 = 112)
-      parameter (n120 = 120)
-      parameter (n352 = 352)
-      parameter (n356 = 356)
-      parameter (n372 = 372)
-      parameter (m1 = -1)
-      parameter (m3 = -3)
-c
-      data files/'roman     ','greek     ','gothgr    ','gothit    ',
-     1           'gothen    ','duplex    ','cyrillic  ','compsc    ',
-     2           'compro    ','compit    ','compgr    ','triplro   ',
-     3           'triplit   ','special   ','script    '/
-      data first/.true./
-c
-      if (iset .le. 0 .or. iset .gt. NUMFONTS) 
-     .		call oerror(n112, m1, 'Bad character set')
-c
-      if (first) then
-	oldest = 1
-	first = .false.
-c       Initializes OLDEST if this is the first time CSET has been called.
-c
-      else
-         do 10 i = 1, NUMSETS
-      	   if (iset .eq. usesets(i)) then
-	      spaces = spacing
-	      nset = i
-	      return
-           endif
-10         continue
-c	   Checks whether desired set is already loaded.
-c
-      endif
-c
-      kset = oldest
-      charfile = dirprefix(1)(1:lastblnk(dirprefix(1))) // 
-     .		'fonts/' //files(iset)
-c     It's not already loaded so lets try reading in the font
-c
-      open (unit=iiotmp,file=charfile,status='old',iostat=ier)
-      if (ier .ne. 0) call oerror(n352, m1, 'FONTSET')
-      rewind(iiotmp,iostat=ier)
-      if (ier .ne. 0) call oerror(n372, m1, 'FONTSET')
-c
-      do 20 i = 1, MAXNUMCHARS
-	numc(kset) = i
-	read(iiotmp,*,err=70,end=50) nc(i, kset),
-     1		 (vx(kset,i,j), vy(kset,i,j), j=1, MAXNUMVCTRS)
-20      continue
-c
-50    numc(kset) = numc(kset) - 1
-      close (iiotmp,iostat=ier)
-      if (ier .ne. 0) call oerror(n356, n0, 'FONTSET')
-c     Reads in character set
-c
-      if (numc(kset) .le. 1) goto 70
-c
-      nset = kset
-      usesets(nset) = iset
-      oldest = oldest + 1
-      if (oldest .gt. NUMSETS) oldest = 2
-      spaces = spacing
-c     After loading in the 1st font, oldest will cycle between values of 2 
-c	and NUMSETS
-c
-      return
-c     Font was read in OK so we can set up variables and return
-c
-70    oldest = kset
-      usesets(kset) = 0
-      call oerror(n120,m3,'FONTSET')
-c
-      end
-c
-c--------------------------------------------------
-c
-      subroutine rotlet (angle1)
-c
-c     To specify angle of rotation for characters.
-c
-c     angle1 = (R*4) (Default = 0.) Specifies the counterclocwise rotation 
-c	      in radians.
-c
-c     The angle is not changed until the next call to ROTLET.
-c
-      real angle1
-c
-      include 'foxplot.inc'
-c
-      angle = angle1
-c
-      return
-      end
-c
-c--------------------------------------------------
-c
-      subroutine charbd ( iwidth)
-c
-c     Varies the boldness of plotted characters.  The routine does this by
-c     redrawing characters iwidth**2 times with offsets between each redrawing.
-c
-c     iwidth = (I*2) Character boldness (1 < IWIDTH < 3).  The higher the 
-c		     value of IWIDTH, the bolder the character drawn.  The
-c		     default value is 1.
-c
-c     Note: Affects all calls which draw characters. 
-c
-c     An alternate way of producing bolder characters is to change the 
-c     character set with FSET to a "duplex" or "triplex" set.
-c
-c
-      integer*2 iwidth
-c
-      include 'foxplot.inc'
-c
-      numbold = max(1,min(3,iwidth))
-c
-      return
-      end
-c
-c--------------------------------------------------
-c
-      subroutine charpl (pchar, x0, y0)
-c
-c     Plots a character at a given location
-c
-c     PCHAR = (C*1) character to be plotted
-c     X0, Y0 = (R*4) locations at which to plot character.
-c
-      character*(*) pchar
-      real x0, y0
-c
-      include 'foxplot.inc'
-c
-      logical move
-      real*4 c, a, xsizrot, ysizrot, cs, x0b, y0b, xx1, yy1, xoff, 
-     .	     yoff, ix, iy
-      integer*2 n120, m3, numchar, ic, k1, k2, j, x1, y1, 
-     .		kset, searchi2
-      character*1 kchar
-c
-      parameter (n120 = 120)
-      parameter (m3 = -3)
-c
-      xsizrot(ix,iy,c,a) = ix*c*cos(a) + iy*c*sin(a)
-      ysizrot(ix,iy,c,a) = ix*c*sin(a) - iy*c*cos(a)
-c
-      if (len(pchar) .ne. 1) 
-     .		call oerror(n120, m3, 'CHARPL: Internal error')
-c
-      cs = 0.66*csize
-c     0.66 = ratio of UniPops default character size to Foxplot's
-c
-      kset = nset
-      kchar = pchar
-      numchar = ichar (kchar )
-      if (numchar .eq. 0) return
-c
-      ic = searchi2(numchar, nc(1,kset), numc(kset))
-c     Try to find character in current font
-c
-      if (ic .eq. 0) then
-c	Its not there so try to find it in default font.
-	ic = searchi2(numchar, nc(1,1), numc(1))
-c
-	if (ic .ne. 0) then
-c	   It was in the default font!
-	   kset = 1
-	else
-c	   Its not in the default font, so use a space and search current font
-	   numchar = ichar(' ')
-	   ic = searchi2(numchar, nc(1,kset), numc(kset))
-	   if (ic .eq. 0) then
-c		Woooow!!  A space isn't in the current font!!  One more try!
-		kset = 1
-		ic = searchi2(numchar, nc(1,1), numc(1))
-		if (ic .eq. 0) 
-     .			call oerror(n120, m3, 'CHARPL: Internal Error!!')
-c		A space wasn't found in the default font so bail out.
-	   endif
-  	endif
-      endif
-c
-      if (spaces) then
-	xoff = XDEFAULTS/2.
-      else
-	xoff = abs(vx(kset,ic,1))
-      endif
-      yoff = -YDEFAULTS/2.
-c
-      do 750 k1 = 0, numbold - 1
-       x0b = x0 + xsizrot(xoff,yoff,cs,angle) + cs*(k1-numbold/2)
-       do 700 k2 = 0, numbold - 1
-	y0b = y0 + ysizrot(xoff,yoff,cs,angle) + cs*(k2-numbold/2)
-c
-        move = .true.
-        do 600 j = 2, MAXNUMVCTRS
-	  xx1 = vx(kset,ic,j)
-    	  yy1 = vy(kset,ic,j)
-	  if(xx1 .eq. SIGPENUP .and. yy1 .eq. SIGPENUP) goto 700
-	  if (move) then
-		x1=nint(xsizrot(xx1,yy1,cs,angle)+x0b)
-		y1=nint(ysizrot(xx1,yy1,cs,angle)+y0b)
-		call place(x1, y1)
-		move = .false.
-	  else
-	        if (xx1 .eq. SIGPENUP) then
-		   move = .true.
-		else
-      		   x1=nint(xsizrot(xx1,yy1,cs,angle)+x0b)
-      		   y1=nint(ysizrot(xx1,yy1,cs,angle)+y0b)
-		   call vctr (x1, y1)
-		   move = .false.
-		endif
-	  endif
-600       continue
-700	 continue
-750	continue
-c
-      if (spaces) then
-	widthchar = cs*XDEFAULTS
-      else
-	widthchar = cs*(abs(vx(kset,ic,1)) + abs(vy(kset,ic,1)))
-      endif
-      hghtchar = cs*YDEFAULTS
-c
-      return
-c
-      end
-c
-c----------------------------------------------------
-c
-      subroutine pchar(string, nchar)
-c
-c     Draws characters horizontally on the graphics screen
-c
-      integer*2 string(*), nchar
-c
-      integer*2 ioutstring(40), i, ilen, n80, igtmp, iwpc
-      real oldangle, x0, y0
-      character*80 outstring
-      logical dodevice
-c
-      include 'foxplot.inc'
-      include 'cio.inc'
-c
-      equivalence (ioutstring, outstring)
-c
-      parameter (n80 = 80)
-c
-      ilen = min(nchar,n80)
-      if (ilen .le. 0) then
-	ilen = 1
-	outstring = ' '
-      else
-	call copy(iwpc(ilen), string, ioutstring)
-      endif
-c     Removes unprintable characters and stores results in OUTSTRING
-c
-      oldangle = angle
-      call rotlet(0.)
-      x0 = xpos
-      y0 = ypos
-c			if this is a TEK or v102 device, try and use
-c			device characters if possible
-      dodevice = (csize .eq. 1) .and. (nset .eq. 1) .and. 
-     .           ((igraphtype .eq. 3) .or. (igraphtype .eq. 4))
-      if (dodevice) then
-c			turn off normal graphics device, remembering type
-         igtmp = igraphtype
-         igraphtype = 1
-c			do the tek graphics
-         call tekchar(outstring, ilen)
-c			go on [to do the hardcopy if needed]
-      endif
-c
-      do 200 i = 1, ilen
-        call charpl(outstring(i:i), x0, y0)
-        x0 = x0 + widthchar
-200	continue
-      xpos = nint(x0)
-      ypos = nint(y0)
-      call rotlet(oldangle)
-c			reset igraphtype if dodevice
-      if (dodevice) igraphtype = igtmp
-c
-      return
-      end
-c
-c--------------------------------------------------------
-c
-      subroutine vchar(string, nchar, rotate)
-c
-c     Draws characters vertically on the graphics screen.
-c     If rotate = true, the characters will be rotated through -90 deg.
-c	and the string will be printed from the bottom up.
-c
-      integer*2 string(*), nchar
-      logical rotate
-c
-      integer*2 ioutstring(40), i, ilen, n80, iwpc
-      real oldangle, pi, x0, y0
-      character*80 outstring
-c
-      include 'foxplot.inc'
-c
-      equivalence (ioutstring, outstring)
-c
-      parameter (n80 = 80)
-      parameter (pi = 90./57.29577951)
-c
-      ilen = min(nchar,n80)
-      if (ilen .le. 0) then
-	ilen = 1
-	outstring = ' '
-      else
-	call copy(iwpc(ilen), string, ioutstring)
-      endif
-c     Removes unprintable characters and stores results in OUTSTRING
-c
-      oldangle = angle
-      if (rotate) then
-	call rotlet (pi)
-      else
-	call rotlet(0.)
-      endif
-      x0 = xpos
-      y0 = ypos
-      do 200 i = 1, ilen
-        call charpl(outstring(i:i), x0, y0)
-	if (rotate) then
-	    y0 = y0 + widthchar
-	else
-	    y0 = y0 - hghtchar
-	endif
-200	continue
-      xpos = nint(x0)
-      ypos = nint(y0)
-      call rotlet(oldangle)
-c
-      return
-      end
-c
-c--------------------------------
-c
-      integer*2 function searchi2(i2num, i2array, num)
-c
-c     Searches through I2ARRAY(NUM) for a value that matches
-c     I2NUM.  Returns the index in the I2ARRAY where this happens
-c     or zero if no element of I2ARRAY matches I2NUM.
-c
-      integer*2, i2num, i2array(*), num, i
-c
-      do 10 i = 1, num
-	if (i2array(i) .eq. i2num) then
-	   searchi2 = i
-	   return
-	endif
-10	continue
-c
-      searchi2 = 0
-c
-      return
-      end
diff -uNr 3.5/source/conline/pfixchar.f unipops-3.6/source/conline/pfixchar.f
--- 3.5/source/conline/pfixchar.f	2000-03-16 11:33:19.000000000 -0700
+++ unipops-3.6/source/conline/pfixchar.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,47 +0,0 @@
-      subroutine pfixchar(ix, iy, string, nchar, iangle, ichsize)
-C-------------------------------------------------------------------------------
-C @(#)pfixchar.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c	puts the characters in string on the graphics screen starting
-c	at the position ix, iy, and moving away at iangle putting each
-c	character ichsize away from the last character.
-c
-c	iangle is with respect to the horizontal, angles increase going
-c	counter clockwise.  Characters are NOT themselves rotated.
-c	Hence:  angle = 0 goes left to right
-c		angle = 90 goes up the page
-c		angle = 180 goes right to left
-c		angle = 270 goes down the page
-c	negative angles are fine.
-c	iangle is in degrees
-c     
-      integer*2 nchar, ix, iy, iangle, ichsize
-      integer*2 icx, icy, i
-      integer*2 n1
-      real*4 pi, angle, x, y, dx, dy
-      character*1 string(*), strtmp(2)
-c
-      data n1 /1/
-c
-      pi = 4.0 * atan(1.0)
-c
-      x = float(ix)
-      y = float(iy)
-      angle = float(iangle) * pi / 180.0
-      dx = float(ichsize) * cos(angle)
-      dy = float(ichsize) * sin(angle)
-c
-      do 100 i = 1, nchar
-         icx = nint(x)
-         icy = nint(y)
-         call place(icx, icy)
-         strtmp(1) = string(i)
-         call pchar(strtmp(n1), n1)
-         x = x + dx
-         y = y + dy
- 100  continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/place.f unipops-3.6/source/conline/place.f
--- 3.5/source/conline/place.f	2000-03-16 11:33:19.000000000 -0700
+++ unipops-3.6/source/conline/place.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,38 +0,0 @@
-      subroutine place(i1, i2)
-C-------------------------------------------------------------------------------
-C  @(#)place.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places the plotting pen for the next PCHAR or VCTR command
-c
-      integer*2 i1, i2
-c
-      include 'cio.inc'
-      include 'foxplot.inc'
-c
-      xpos = i1
-      ypos = i2
-c
-      if (igraphtype .eq. 4) then
-	call v102place(i1, i2)
-      else if (igraphtype .eq. 3) then
-	call tekplace(i1, i2)
-      else if (igraphtype .eq. 2) then
-	call coreplace(i1, i2)
-      else if (igraphtype .eq. 1) then
-	call nogplace(i1, i2)
-      endif
-      if (iprinttype .eq. 5) then
-        call quichardplace(i1, i2)
-      else if (iprinttype .eq. 4) then
-	call hphardplace(i1, i2)
-      else if (iprinttype .eq. 3) then
-	call posthardplace(i1, i2)
-      else if (iprinttype .eq. 2) then
-	call qmshardplace(i1, i2)
-      else if (iprinttype .eq. 1) then
-	call noghardplace(i1, i2)
-      endif
-      return
-      end
-c
diff -uNr 3.5/source/conline/posthbox.f unipops-3.6/source/conline/posthbox.f
--- 3.5/source/conline/posthbox.f	2000-03-16 11:33:25.000000000 -0700
+++ unipops-3.6/source/conline/posthbox.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-      subroutine posthardbox(ix0, iy0, ix1, iy1)
-C-------------------------------------------------------------------------------
-C  @(#)posthbox.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a box -- POSTCRIPT code
-c
-      integer*2 ix0, iy0, ix1, iy1
-c
-      include 'cio.inc'
-c
-      character*80 stch
-      integer*2 n52
-c
-      data n52/52/
-c
-      write(stch,10) ix0, iy0, ix0, iy1, ix1, iy1, ix1, iy0
-10    format(8i6, ' bx ')
-      call putchar(stch,n52,ioutgrph)
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/posthcolor.f unipops-3.6/source/conline/posthcolor.f
--- 3.5/source/conline/posthcolor.f	2000-03-16 11:33:25.000000000 -0700
+++ unipops-3.6/source/conline/posthcolor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine posthardcolor(icolor)
-C-------------------------------------------------------------------------------
-C  @(#)posthcolor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Changes colors -- POSTCRIPT code
-c
-      integer*4 icolor
-c
-      real r, g, b
-c
-      include 'cio.inc'
-c
-      character*40 stch
-      integer*2 n27
-c
-      data n27/27/
-c
-      r = min(1.,max(0.,float(and(rshift(icolor,16),255))/255.))
-      g = min(1.,max(0.,float(and(rshift(icolor,8),255))/255.))
-      b = min(1.,max(0.,float(and(icolor,255))/255.))
-      write(stch,10) r, g, b
-10    format( 3f8.5, ' c ')
-      call putchar(stch,n27,ioutgrph)
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/posthplace.f unipops-3.6/source/conline/posthplace.f
--- 3.5/source/conline/posthplace.f	2000-03-16 11:33:20.000000000 -0700
+++ unipops-3.6/source/conline/posthplace.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine posthardplace(ix1, iy1)
-C-------------------------------------------------------------------------------
-C  @(#)posthplace.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR -- POSTCRIPT code
-c*******************************
-c 8904 [RJM]
-c*******************************
-c
-      integer*2 ix1, iy1
-      integer*2 n15
-      include 'cio.inc'
-c
-      data n15 /15/
-c
-      character*40 stch
-c
-      write(stch,10) ix1, iy1
-10    format( 2i6, ' m ')
-      call putchar(stch,n15,ioutgrph)
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/posthtcopy.f unipops-3.6/source/conline/posthtcopy.f
--- 3.5/source/conline/posthtcopy.f	2000-03-16 11:33:20.000000000 -0700
+++ unipops-3.6/source/conline/posthtcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,33 +0,0 @@
-      subroutine posthardtcopy
-C-------------------------------------------------------------------------------
-C  @(#)posthtcopy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Dumps internal array INSTRING to device iouttxt for dumping
-c	of text screen -- POSTSCRIPT code
-c********************************************
-c 8904 [RJM]
-c********************************************
-c
-      integer*2 i, ij, lastblnk, ilen2
-      integer*2 n15, fshort
-      character*100 stch
-c
-      include 'cio.inc'
-c
-      data n15 /15/
-c
-      do 1099 i = 1, inlast
-         ij = mod(i+inline-2,inlast) + 1
-	 write(stch,10) 10, 750-(i-1)*20
-10       format(2i6, ' m ')
-         call putchar(stch,n15,iouttxt)
-	 ilen2 = min(90,lastblnk(instring(ij)))
-	 stch = '(' // instring(ij)(1:ilen2) // ') show'
-         call putchar(stch, fshort(ilen2+7), iouttxt)
-1099     continue
-c
-      return
-c      
-      end
-c
diff -uNr 3.5/source/conline/posthvctr.f unipops-3.6/source/conline/posthvctr.f
--- 3.5/source/conline/posthvctr.f	2000-03-16 11:33:21.000000000 -0700
+++ unipops-3.6/source/conline/posthvctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-      subroutine posthardvctr(ix2, iy2)
-C-------------------------------------------------------------------------------
-C  @(#)posthvctr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a line -- POSTSCRIPT code
-c******************************
-c 8904 [RJM]
-c******************************
-c
-      integer*2 ix2, iy2
-      integer*2 n15
-      character*100 stch
-c
-      include 'cio.inc'
-c
-      data n15 /15/
-c
-      write(stch,11) ix2, iy2
-11    format(2i6 ' v ')
-      call putchar(stch,n15,ioutgrph)
-      return
-c
-      end
-c
-
diff -uNr 3.5/source/conline/pread.f unipops-3.6/source/conline/pread.f
--- 3.5/source/conline/pread.f	2000-03-16 11:33:21.000000000 -0700
+++ unipops-3.6/source/conline/pread.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,170 +0,0 @@
-      SUBROUTINE PREAD (KB)
-C-------------------------------------------------------------------------------
-C  @(#)pread.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 PREAD reads input text	and unpacks the	buffer one byte	per
-C     word.  The buffer	is assumed to be 160 characters.  The
-C     buffer is	padded with blanks.
-C
-C-----------------------------------------------------------------------
-c
-      integer*2 kb(*), i1, ierr, istat, ilen3, lastblnk, iwpc
-      integer*2 n104, n0
-      integer*2 ilenp
-      integer*4 ione, long, istat4, ioput, lunit, iptr
-      logical*2 padme
-      character*200 cbuff2
-      character*1 promptchar
-      character*8 promptused
-      character*64 cbatchin
-c
-      INCLUDE 'cio.inc'
-      include 'core.inc'
-      include 'stk.inc'
-c
-      data ione /1/
-c
-      data n104, n0 /140, 0/
-c
-      promptchar = cpt(1:1)
-c
-9     cbuff2 = ' '
-      i1 = 1
-c     i1 = the starting character position to be read in in case of
-c     multiple line input
-c
-1     if (iintype .eq. istdin .or. iintype .eq. imenuin) then
-c
-c		use the value of userprompt in core for the promt if
-c               promptchar == '>' (standard pops prompt)
-c		otherwise use promptchar.  Also, if prompt is all
-c		blanks, use promptchar.
-c
-	promptused = promptchar
-        if (promptchar .eq. '>' .and. cuserprompt .ne. ' ')
-     .				promptused = cuserprompt
-c
-	ilenp = lastblnk(promptused)
-c
-        write(istdout, 10) promptused(1:ilenp)
- 10     format(1x,a,$)
-	call flush(long(istdout))
-	if (iintype .eq. istdin) then
-	   read(iinunit,2000,iostat=ierr) cbuff2(i1:)
-2000       format(a)
-	else
-	   call readfifo(long(iinunit), istat4, cbuff2(i1:))
-	   if (istat4 .lt. 0) then
-		ierr = istat4
-	   else
-		ierr = 0
-	   endif
-c			readfifo is a c routine that ALWAYS will return
-c			a null terminated string, fortran, however,
-c			likes strings that are padded with blanks
-c			so ... look for null string and pad from there
-c			to end
-           padme = .false.
-           do 100 iptr = i1, 200
-              if (.not. padme) then
-                 if (ichar(cbuff2(iptr:iptr)) .eq. 0) then
-                    padme = .true.
-                 endif
-              endif
-              if (padme) cbuff2(iptr:iptr) = ' '
- 100       continue
-c
-	endif
-c       Generates screen prompt and reads screen if input unit is istdin (the
-c	terminal) or reads from menus FIFO
-c
-      else 
-	 read(iinunit,2000,iostat=ierr) cbuff2(i1:)
-c        Reads from any other device
-c
-      endif
-c
-      if (ierr .ne. 0) then
-      	 if (.not. lsetup) write(istderr,*) ' '
-	 if (iintype .eq. ibatchin) then
-                cbatchin = cinlist(iinptr)
-		if (.not. lsetup) write(istderr,*) 'End of batch file ', 
-     .			cbatchin(1:lastblnk(cbatchin))
-	        close(iinunit,iostat=istat)
-                lunit = iinunit
-                lunit = ioput(lunit)
-c			ignore ioput errors, we don't really care
-	 else if(iintype .eq. isetupin) then	
-		write(istderr,*) 'End of SETUP file'
-	        close(iinunit,iostat=istat)
-                lsetup = .false.
-	 else if(iintype .eq. istdin) then
-      		write(istderr,*) 'END of input file or ERROR on read'
-      		write(istderr,*) 'TERMINATING....'
-      		call exitpops(ione)
-	 else if(iintype .eq. imenuin) then
-      		write(istderr,*) 'Problem with MENUS... Returning'
-      		write(istderr,*) 'control to standard window'
-		call donemenu
-	 endif
-      	 if (.not. lsetup) write(istderr,*) ' '
-         iinptr = max(1, iinptr - 1)
-         iinunit = iinlist(iinptr, 1)
-         iintype = iinlist(iinptr, 2)
-	 cbuff = ' '
-	 lastline = ' '
-	 ilen3 = 0
-c
-      else
-c
-	 ilen3 = lastblnk(cbuff2)
-      	 if (.not. lsetup)
-     .       call updateline(promptused(1:ilenp)//cbuff2(i1:ilen3))
-
-	 if (ilen3 .eq. i1-1) then
-		goto 1
-c               Skip blank lines
-C				
-	 else if (cbuff2(ilen3:ilen3) .eq. '\\') then
-	   	i1 = ilen3
-		promptchar = ' '
-	    	goto 1
-	 else
-	    	cbuff = cbuff2(1:ilen3)
-	    	lastline = cbuff
-	 endif
-c        Was a continuation character entered as a last character?
-c
-	 if (ilen3 .gt. karlim) then
-		call oerror(n104, n0, 'Line ignored')
-		cbuff = ' '
-		ilen3 = 0
-		i1 = 1
-		promptchar = cpt(1:1)
-		goto 9
-c		Check whether input line exceeds KARLIM length
-	 endif
-c
-         if (iintype .ne. ishelpin) then
-	    if (mode .eq. 0 .and. 
-     .		(iintype .eq. istdin .or. iintype .eq. isetupin) ) 
-     .			call updatehist(cbuff2(1:ilen3))
-	    if (iintype .ne. istdin .and. iintype .ne. imenuin .and.
-     .          .not. lsetup) then
-                write(iout,*) promptchar,cbuff2(1:ilen3)
-		call flush(long(iout))
-	    else if (iintype .eq. imenuin) then
-                write(iout,*) cbuff2(1:ilen3)
-		call flush(long(iout))
-	    endif
-         endif
-c
-      endif
-c
-      nbytes = min(ilen3+1, karlim)
-      CALL UNPACK (iwpc(nbytes),JBUFF,KB)
-c
-      RETURN
-c
-      END
diff -uNr 3.5/source/conline/pread2.f unipops-3.6/source/conline/pread2.f
--- 3.5/source/conline/pread2.f	2000-03-16 11:33:22.000000000 -0700
+++ unipops-3.6/source/conline/pread2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,152 +0,0 @@
-      SUBROUTINE PREAD2 (prompt, stch, nb)
-C-------------------------------------------------------------------------------
-C  @(#)pread2.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 PREAD2 reads input text and unpacks the buffer one byte per
-C     word.  The buffer	is assumed to be 160 characters.  The
-C     buffer is	padded with blanks.
-C
-c  stch = output buffer (packed)
-c  prompt = prompt string
-c  nb = number of bytes in output buffer
-c
-c              8903   [RJM] See CHANGES.DOC
-C-----------------------------------------------------------------------
-c
-      character*(*) stch
-      character*160 stch2, prompt2
-      character*64 cbatchin
-      character*(*) prompt
-      integer*2 nb, i1, ierr, ione, istat, ilen3, lastblnk, ilenp
-      integer*2 n104, n0
-      integer*4 len, long, istat4, ioput, lunit, iptr
-      logical*2 padme
-c
-      INCLUDE 'cio.inc'
-c
-      data n104, n0 /104, 0/
-c
-      ilenp = lastblnk(prompt)
-      prompt2 = prompt
-c
-9     stch2 = ' '
-      i1 = 1
-c     i1 = the starting character position to be read in in case of
-c     multiple line input
-c
-1     if (iintype .eq. istdin .or. iintype .eq. imenuin) then
-	write(istdout, 10) prompt2(1:ilenp)
-10	format(1x,a,$)
-	call flush(long(istdout))
-	if (iintype .eq. istdin) then
-	   read(iinunit,2000,iostat=ierr) stch2(i1:)
-2000       format(a)
-	else
-	   call readfifo(long(iinunit), istat4, stch2(i1:))
-	   if (istat4 .lt. 0) then
-		ierr = istat4
-	   else
-		ierr = 0
-	   endif
-c			readfifo is a c routine that ALWAYS will return
-c			a null terminated string, fortran, however,
-c			likes strings that are padded with blanks
-c			so ... look for null string and pad from there
-c			to end
-           padme = .false.
-           do 100 iptr = i1, 160
-              if (.not. padme) then
-                 if (ichar(stch2(iptr:iptr)) .eq. 0) then
-                    padme = .true.
-                 endif
-              endif
-              if (padme) stch2(iptr:iptr) = ' '
- 100       continue
-c
-	endif
-c       Generates screen prompt and reads screen if input unit is istdin (the
-c	terminal)
-c
-      else if (iintype .ne. 0) then
-	 read(iinunit,2000,iostat=ierr) stch2(i1:)
-c        Reads from any other device
-c
-      else if (iintype .eq. 0) then
-        iinptr = max(1, iinptr - 1)
-        iintype = iinlist(iinptr, 1)
-        iinunit = iinlist(iinptr, 2)
-        stch2 = stch
-        ierr = 0
-c       Takes care of when iintype = 0; that is, when we are using the 
-c	! or !# history command which uses an entry from HIST to regenerate
-c       CBUFF
-c
-      endif
-c
-      if (ierr .ne. 0) then
-	 if (iintype .eq. ibatchin) then
-                cbatchin = cinlist(iinptr)
-		write(istderr,*) 'End of batch file ', 
-     .			cbatchin(1:lastblnk(cbatchin))
-	        close(iinunit,iostat=istat)
-                lunit = iinunit
-                lunit = ioput(lunit)
-c			ignore ioput errors, we don't really care
-	 else if(iintype .eq. isetupin) then	
-		write(istderr,*) 'End of SETUP file'
-	        close(iinunit,iostat=istat)
-	 else if(iintype .eq. istdin) then
-      		write(istderr,*) 'END of input file or ERROR on read'
-      		write(istderr,*) 'TERMINATING....'
-      		call exitpops(ione)
-	 else if(iintype .eq. imenuin) then
-      		write(istderr,*) 'Problem with MENUS... Returning'
-      		write(istderr,*) 'control to standard window'
-		call donemenu
-	 endif
-      	 write(istderr,*) ' '
-         iinptr = max(1, iinptr - 1)
-	 iinunit = iinlist(iinptr, 1)
-         iintype = iinlist(iinptr, 2)
-	 stch = ' '
-	 ilen3 = 0
-c
-      else
-c
-	 ilen3 = lastblnk(stch2)
-      	 call updateline(prompt2(1:ilenp)//stch2(i1:ilen3))
-
-	 if (ilen3 .gt. len(stch) ) then
-		call oerror(n104, n0, 'Line Ignored')
-		stch = ' '
-		ilen3 = 0
-		i1 = 1
-		prompt2 = prompt
-		goto 9
-c		Check whether input line exceeds KARLIM length
-c
-	 else if (stch2(ilen3:ilen3) .eq. '\\') then
-	   	i1 = ilen3
-		prompt2 = '  '
-	    	goto 1
-	 else
-	    	stch = stch2(1:ilen3)
-	 endif
-c        Was a continuation character entered as a last character?
-c	
-	 if (iintype .ne. istdin .and. iintype .ne. imenuin) then
-                write(iout,*) prompt2,stch(1:ilen3)
-		call flush(long(iout))
-	 else if (iintype .eq. imenuin) then
-                write(iout,*) stch(1:ilen3)
-		call flush(long(iout))
-	 endif
-c
-      endif
-c
-      nb = min(ilen3+1, karlim)
-c
-      RETURN
-c
-      END
diff -uNr 3.5/source/conline/putchar.f unipops-3.6/source/conline/putchar.f
--- 3.5/source/conline/putchar.f	2000-03-16 11:33:23.000000000 -0700
+++ unipops-3.6/source/conline/putchar.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine putchar(string, length, idev)
-C-------------------------------------------------------------------------------
-C  @(#)putchar.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Puts characters fron STRING onto device IDEV one at
-c     a time.  
-c************************************************
-c 8904 [RJM] 
-c************************************************
-c
-      character*(*) string
-      integer*2 length, idev, i
-c
-      integer*4 fputc, irtn, idev1
-c
-      idev1 = idev
-c
-      do 100 i = 1, length
-	irtn = fputc(idev1,string(i:i))
-100     continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/pwrite.f unipops-3.6/source/conline/pwrite.f
--- 3.5/source/conline/pwrite.f	2000-03-16 11:33:23.000000000 -0700
+++ unipops-3.6/source/conline/pwrite.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,45 +0,0 @@
-      SUBROUTINE PWRITE	(KB,N)
-C-------------------------------------------------------------------------------
-C  @(#)pwrite.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C*	 Control output	devices.  
-C*				 
-C----------------------------------------------------------------------
-      integer*2 kb(*), n, iwpc, lastblnk, ilen2
-      character*160 ckb1
-      integer*2 kb1(80)
-      integer*4 long
-c
-      INCLUDE 'cio.inc'
-      INCLUDE 'appl.inc'
-c
-      equivalence (ckb1, kb1)
-c
-      ckb1 = ' '
-      call copy(min(iwpc(karlim),iwpc(n)), kb, kb1)
-      ilen2 = lastblnk(ckb1)
-c
-      if (graphon) then
-	if (sclchar .ne. 1.) call charsize(sclchar)
-	call place(iglinex, igliney)
-	call pchar(ckb1, ilen2)
-	if (sclchar .ne. 1.) call charsize(1.)
-	iglinex = 1
-	igliney = igliney - sclchar*25
-	if (igliney .lt. 0) igliney = 780
-c	Write to the graphics screen and bump pointer to next line to write.
-c	Change Char. Size. if needed.
-c
-      else
-        write(iout, 200) ckb1(1:ilen2)
-200     format(1x,a)
-        if (iout .eq. istdout) call updateline(ckb1)
-	call flush(long(iout))
-c	Write to either an output file or to the screen.
-c
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/qcomp.f unipops-3.6/source/conline/qcomp.f
--- 3.5/source/conline/qcomp.f	2000-03-16 11:33:23.000000000 -0700
+++ unipops-3.6/source/conline/qcomp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,39 +0,0 @@
-c
-c @(#)qcomp.f	5.1 06/22/94
-c
-c 	comparison functions needed by qsort calls, these compare two
-c	real*4 numbers.  qcomphi is used if the higher value is preferred
-c	while qcomplow is used if the lower value is preferred.
-c       qsort is a sun fortran quick sort routine.
-c
-      integer*2 function qcomphi(val1, val2)
-c
-      real*4 val1, val2
-c
-      if (val1 .gt. val2) then
-         qcomphi = -1
-      else if (val2 .gt. val1) then
-         qcomphi = 1
-      else
-         qcomphi = 0
-      endif
-c
-      return
-c
-      end
-c
-      integer*2 function qcomplow(val1, val2)
-c
-      real*4 val1, val2
-c
-      if (val1 .lt. val2) then
-         qcomplow = -1
-      else if (val2 .lt. val1) then
-         qcomplow = 1
-      else
-         qcomplow = 0
-      endif
-c
-      return
-c
-      end
diff -uNr 3.5/source/conline/qmshardplace.f unipops-3.6/source/conline/qmshardplace.f
--- 3.5/source/conline/qmshardplace.f	2000-03-16 11:33:24.000000000 -0700
+++ unipops-3.6/source/conline/qmshardplace.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine qmshardplace(ix1, iy1)
-C-------------------------------------------------------------------------------
-C  @(#)qmshardplace.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR -- QMS (TEK 4010) code
-c*******************************
-c 8904 [RJM]
-c*******************************
-c
-      real xscale, yscale
-      integer*2 iix, iiy
-c			make all TEK-like devices 15/16th full size 15/16 = 0.9375
-      parameter (yscale=0.9375)
-      parameter (xscale=0.9375)
-c
-      integer*2 ix1, iy1
-      integer*2 n1, n4
-      character*4 cout
-c
-      include 'cio.inc'
-c
-      data n1, n4 /1, 4/
-c
-      iix = nint(ix1*xscale)
-      iiy = nint(iy1*yscale)
-      call packer(iix, iiy, cout)
-      call putchar(char(29),n1,ioutgrph)
-      call putchar(cout,n4,ioutgrph)
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/qmshardtcopy.f unipops-3.6/source/conline/qmshardtcopy.f
--- 3.5/source/conline/qmshardtcopy.f	2000-03-16 11:33:24.000000000 -0700
+++ unipops-3.6/source/conline/qmshardtcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,32 +0,0 @@
-      subroutine qmshardtcopy
-C-------------------------------------------------------------------------------
-C  @(#)qmshardtcopy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Dumps internal array INSTRING to device iouttxt for dumping
-c	of text screen -- QMS (TEK 4010) code
-c******************************
-c 8904 [RJM]
-c******************************
-c
-      integer*2 i, ij, ilen2, lastblnk
-      integer*2 n1, n4, n80, fshort
-      character*4 cout
-c
-      include 'cio.inc'
-c
-      data n1, n4, n80 /1, 4, 80/
-c
-      do 1099 i = 1, inlast
-           ij = mod(fshort(i+inline-2),inlast) + 1
-	   call putchar(char(29),n1,iouttxt)
-	   call packer(10, fshort(750-(i-1)*20), cout)
-	   call putchar(cout,n4,iouttxt)
-	   call putchar(char(31),n1,iouttxt)
-	   ilen2 = min(n80,lastblnk(instring(ij)))
-	   call putchar(instring(ij), ilen2, iouttxt)
-1099     continue
-c
-      return
-c      
-      end
diff -uNr 3.5/source/conline/qmshardvctr.f unipops-3.6/source/conline/qmshardvctr.f
--- 3.5/source/conline/qmshardvctr.f	2000-03-16 11:33:24.000000000 -0700
+++ unipops-3.6/source/conline/qmshardvctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,32 +0,0 @@
-      subroutine qmshardvctr(ix2, iy2)
-C-------------------------------------------------------------------------------
-C  @(#)qmshardvctr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a line -- QMS (TEK 4010) code
-c******************************
-c 8904 [RJM]
-c******************************
-c
-      real xscale, yscale
-      integer*2 iix, iiy
-c			make all TEK-like devices 15/16th full size 15/16 = 0.9375
-      parameter (yscale=0.9375)
-      parameter (xscale=0.9375)
-c
-      integer*2 ix2, iy2
-      integer*2 n4
-      character*4 cout
-c
-      include 'cio.inc'
-c
-      data n4 /4/
-c
-      iix = nint(ix2*xscale)
-      iiy = nint(iy2*yscale)
-      call packer(iix, iiy, cout)
-      call putchar(cout,n4,ioutgrph)
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/quichardplace.f unipops-3.6/source/conline/quichardplace.f
--- 3.5/source/conline/quichardplace.f	2000-03-16 11:33:25.000000000 -0700
+++ unipops-3.6/source/conline/quichardplace.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,23 +0,0 @@
-      subroutine quichardplace(ix1, iy1)
-C-------------------------------------------------------------------------------
-C  @(#)quichardplace.f	4.2 11/24/92
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR -- QMS (QUIC) code
-c
-      integer*2 ix1, iy1, ixo, iyo
-      real*4 scale
-      data scale /9.5/
-c
-      include 'cio.inc'
-c
-      ixo = ix1 * scale
-      iyo = (840 - iy1) * scale
-      write(ioutgrph, 1000) ixo, iyo
-c
-      return
-c
- 1000 format('^U',i5.5,':',i5.5)
-c
-      end
-c
diff -uNr 3.5/source/conline/quichardtcopy.f unipops-3.6/source/conline/quichardtcopy.f
--- 3.5/source/conline/quichardtcopy.f	2000-03-16 11:33:26.000000000 -0700
+++ unipops-3.6/source/conline/quichardtcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-      subroutine quichardtcopy
-C-------------------------------------------------------------------------------
-C  @(#)quichardtcopy.f	4.2 11/24/92
-C-------------------------------------------------------------------------------
-c
-c     Dumps internal array INSTRING to device iouttxt for dumping
-c	of text screen -- QUIC code
-c
-      integer*2 i, ij, ilen2, lastblnk, j
-c
-      include 'cio.inc'
-c
-      write(iouttxt,1000)
-c
-      do 100 i = 1, inlast
-           ij = mod(i+inline-2,inlast) + 1
-	   ilen2 = min(80,lastblnk(instring(ij)))
-           write(iouttxt, 1010)
-           write(iouttxt, 1020) (instring(ij)(j:j),j=1,ilen2),'^','X'
- 100  continue
-c
-      write(iouttxt, 1030)
-c
-      return
-c
- 1000 format('^A^IGE^T00000^JM00800^X')
- 1010 format('^A^T00000^JR00200^X')
- 1020 format('^A',82a1)
- 1030 format('^A^IGV')
-c      
-      end
diff -uNr 3.5/source/conline/quichardvctr.f unipops-3.6/source/conline/quichardvctr.f
--- 3.5/source/conline/quichardvctr.f	2000-03-16 11:33:26.000000000 -0700
+++ unipops-3.6/source/conline/quichardvctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,22 +0,0 @@
-      subroutine quichardvctr(ix1, iy1)
-C-------------------------------------------------------------------------------
-C  @(#)quichardvctr.f	4.2 11/24/92
-C-------------------------------------------------------------------------------
-c
-c     Draws a line -- QMS (QUIC) code
-c
-      integer*2 ix1, iy1, iyo, ixo
-      real*4 scale 
-c
-      include 'cio.inc'
-      data scale /9.5/
-c
-      iyo = (840 - iy1) * scale
-      ixo = ix1 * scale
-      write(ioutgrph, 1000) ixo, iyo
-      return
-c
- 1000 format('^D',i5.5,':'i5.5)
-c
-      end
-c
diff -uNr 3.5/source/conline/quick.f unipops-3.6/source/conline/quick.f
--- 3.5/source/conline/quick.f	2000-03-16 11:33:26.000000000 -0700
+++ unipops-3.6/source/conline/quick.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,721 +0,0 @@
-      SUBROUTINE  QUICK(LFLAG,J, locl, loclink)
-C-------------------------------------------------------------------------------
-C  @(#)quick.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C	 QUICK contains	the most frequently used interpreter codes.
-C
-C---------------------------------------------------------------------
-      integer*2 lflag, j, i, m, mi, iwpr, lastblnk, unit, 
-     .		n, mj, isize1, isize2, RO, WO, locl, loclink,
-     .		ifrmt(30), iadvrb(30), loc1, loc2, itype,
-     .          kloc, execcomp, isize, irealp
-      integer*2 n1, n16, n80, n107, n111, n112, n115, n116, n118, n120,
-     .          n130, m1, m2, m3
-      real*4 epsiln, xi, xl, rstring1(30)
-      integer*4 long, loc
-      character*60 frmt, advrb, string1
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-      INCLUDE 'errors.inc'
-c
-      EQUIVALENCE (ifrmt, frmt), (iadvrb, advrb), (string1, rstring1)
-c
-      include 'tags.inc'
-c
-      data n1, n16, n80, n107, n111, n112, n115, n116, n118, n120,
-     .          n130, m1, m2, m3 
-     .        /1, 16, 80, 107, 111, 112, 115, 116, 118, 120, 
-     .           130, -1, -2, -3/
-      DATA EPSILN/1.0E-8/
-c
-      parameter (RO = 2)
-      parameter (WO = 1)
-C
-C=======================================================================
-C
-      GO TO ( 1,99,3, 4, 5, 6, 7, 8, 9,10,
-     .	 11,99,13,14,141,142,143,15,16,17,18,19,99,
-     .	 21,22,23,24,25,27,28,31,56,500,33,34,35,36), J
-      IF (J.EQ.iifelse) GO TO 53
-      IF (J.EQ.iifthen) GO TO 54
-      IF (J.EQ.iwhile) GO TO 59
-      if (j .eq. idumend) goto 96
-      IF (J.EQ.iwhilesetup) GO TO 97
-      IF (J.EQ.isubs) GO TO 98
-      IF (J .GT. ilastverb-1) GO TO 2801
-      call oerror(n120, m3, 'QUICK')
-C---------------------------------------------------------------------
-C		   O M E G A   O P E R A T O R			  
-C---------------------------------------------------------------------
-    1 Locl=locLINK
-      IF (locL.EQ.0) GO TO 9999
-      locLINK=K(locL)
-      GO TO 900
-C---------------------------------------------------------------------
-C		   G E T   A R G U M E N T
-C---------------------------------------------------------------------
-3     continue
-      if (cp .le. 0 .or. cp .gt. slim) call oerror(n107, m1, ' ')
-      IF (CSTACK(CP).ne.-irun) call oerror(n120, m3, ' ')
-      I=2*SP0-SP-1
-      IF (I.le.0) call oerror(n112, m1, ' ')
-      J=SP0
-300   IF ((I.lt.SP0).and.(J.le.SP)) then
-         if (j .le. 0) call oerror(n107, m1, ' ')
-         M=STACK(J)
-         if (m .le. 0) call oerror(n107, m1, ' ')
-         C(M)=V(I)
-         I=I+1
-         J=J+1
-         GO TO 300
-      endif
-      CP=CP+2
-      if (cp .gt. slim) call oerror(n107, m1, ' ')
-      CSTACK(CP-1)=SP0
-      CSTACK(CP)=-3
-      SP0=SP+1
-      if (sp0 .gt. slim .or. sp0 .le. 0) call oerror(n107, m1, ' ')
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   =	S T O R	E   O P	E R A T	O R		  
-C---------------------------------------------------------------------
-    4 continue
-      CALL ASSGN
-      GOTO 1000
-C---------------------------------------------------------------------
-C		   +   O P E R A T O R				 
-C---------------------------------------------------------------------
-5     continue
-      if (sp .lt. 2) call oerror(n112, m1, '+')
-      XX=V(SP-1)+V(SP)
-      GO TO 5000
-C---------------------------------------------------------------------
-C		   -   O P E R A T O R				  
-C---------------------------------------------------------------------
-6     continue
-      if (sp .lt. 2) call oerror(n112, m1, '-')
-      XX=V(SP-1)-V(SP)
-      GO TO 5000
-C---------------------------------------------------------------------
-C		   *   O P E R A T O R				 
-C---------------------------------------------------------------------
-7     continue
-      if (sp .lt. 2) call oerror(n112, m1, '*')
-      XX=V(SP-1)*V(SP)
-      GO TO 5000
-C---------------------------------------------------------------------
-C		   /   O P E R A T O R				
-C---------------------------------------------------------------------
-8     continue
-      if (sp .lt. 2) call oerror(n112, m1, '/')
-      XX=V(SP-1)/V(SP)
-      GO TO 5000
-C---------------------------------------------------------------------
-C		   * *	  O P E	R A T O	R		
-C---------------------------------------------------------------------
-9     continue
-      if (sp .lt. 2) call oerror(n112, m1, '**')
-      XX=V(SP-1)**V(SP)
-      GO TO 5000
-C---------------------------------------------------------------------
-C		   >   C O M P A R I S O N   O P E R A T O R	   
-C---------------------------------------------------------------------
-   10 continue
-      if (sp .lt. 2) call oerror(n112, m1, '>')
-      SP=SP-1
-      IF (sngl(V(SP)).GT.sngl(V(SP+1))) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		   <   C O M P A R I S O N   O P E R A T O R	  
-C---------------------------------------------------------------------
-   11 continue
-      if (sp .lt. 2) call oerror(n112, m1, '<')
-      SP=SP-1
-      IF (sngl(V(SP)).LT.sngl(V(SP+1))) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		   U N A R Y   ( - )   O P E R A T O R		 
-C---------------------------------------------------------------------
-   13 continue
-      if (sp .lt. 1) call oerror(n112, m1, '- (Unary)')
-      CONTINUE
-      XX=-V(SP)
-      GO TO 5001
-C---------------------------------------------------------------------
-C		   ~   O P E R A T O R				
-C---------------------------------------------------------------------
-   14 continue
-      if (sp .lt. 1) call oerror(n112, m1, '~')
-      IF (sngl(V(SP)).GT.0) then
-	xx = -1.0
-      else
-	xx = 1.0
-      endif
-      GO TO 5001
-C---------------------------------------------------------------------
-C		  ~=   C O M P A R I S O N   O P E R A T O R	  
-C---------------------------------------------------------------------
-  141 continue
-      if (sp .lt. 2) call oerror(n112, m1, '~=')
-      SP=SP-1
-      IF (sngl(V(SP)).ne.sngl(V(SP+1))) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		  >=   C O M P A R I S O N   O P E R A T O R	  
-C---------------------------------------------------------------------
-  142 continue
-      if (sp .lt. 2) call oerror(n112, m1, '>=')
-      SP=SP-1
-      IF (sngl(V(SP)).ge.sngl(V(SP+1))) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		  <=   C O M P A R I S O N   O P E R A T O R	  
-C---------------------------------------------------------------------
-  143 continue
-      if (sp .lt. 2) call oerror(n112, m1, '<=')
-      SP=SP-1
-      IF (sngl(V(SP)).le.sngl(V(SP+1))) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		   T O	 O P E R A T O R		
-C---------------------------------------------------------------------
-15    CONTINUE
-      if (sp .lt. 3 .or. sp+2 .gt. slim .or. cp .lt. 0 .or. 
-     1    cp .gt. slim-3 .or. sp0 .gt. slim-3 .or. sp0 .le. 0) 
-     2    call oerror(n107, m1, 'TO')
-      CSTACK(CP+1)=SP
-      CSTACK(CP+2)=SP0
-      CSTACK(CP+3)=-iloopto
-      CP=CP+3
-      SP0=SP0+3
-      V(SP+2)=V(SP-1)
-      STACK(SP+1)=STACK(SP-2)
-      STACK(SP+2) = 0
-      V(SP-1)=V(SP)
-      V(SP)=1.0
-      SP=SP+2
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   B Y	 O P E R A T O R	
-C---------------------------------------------------------------------
-   16 continue
-      if (cp .le. 0 .or. cp .gt. slim) call oerror(n107, m1, 'BY')
-      IF (CSTACK(CP).ne.-iloopto) call oerror(n115, m1, 'BY')
-      if (sp .lt. 4 .or. sp .gt. slim) call oerror(n107, m1, 'BY')
-      V(SP-3)=V(SP)
-      SP=SP-1
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   =   E Q U A L S   O P E R A T O R		 
-C---------------------------------------------------------------------
-   17 continue
-      if (sp .lt. 2) call oerror(n112, m1, '= (Comparison)')
-      SP=SP-1
-      IF (sngl(V(SP)).EQ.sngl(V(SP+1))) GO TO 1702
- 1701 V(SP)=-1.0
-      GO TO 1000
- 1702 V(SP)=1.0
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   |	' O R '	   O P E R A T O R		
-C---------------------------------------------------------------------
-18    continue
-      if (sp .lt. 2) call oerror(n112, m1, '|')
-      SP=SP-1
-      IF ((sngl(V(SP)).gt.0).or.(sngl(V(SP+1)).gt.0)) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		   &   ' A N D '    O P	E R A T	O R	
-C---------------------------------------------------------------------
-19    continue
-      if (sp .lt. 2) call oerror(n112, m1, '&')
-      SP=SP-1
-      IF ((sngl(V(SP)).GT.0).AND.(sngl(V(SP+1)).GT.0)) GO TO 1702
-      GO TO 1701
-C---------------------------------------------------------------------
-C		   F O R   O P E R A T O R	
-C---------------------------------------------------------------------
-   21 continue
-      if (cp .le. 0 .or. cp+2 .gt. slim) call oerror(n107, m1, 'FOR')
-      IF (CSTACK(CP).ne.-iloopto) call oerror(n115, m1, ' ')
- 2165 CSTACK(CP)=locL+1
-      CSTACK(CP+1)=locLINK
-      CP=CP+2
-      CSTACK(CP)=-iloopfor
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   E N D    O P	E R A T	O R
-C---------------------------------------------------------------------
-22    continue
-      if (cp .le. 0 .or. cp+2 .gt. slim) call oerror(n107, m1, 'END')
-      IF (CSTACK(CP).NE.-iloopfor) GO TO 2202
-      if (cp .le. 4) call oerror(n107, m1, 'END')
-      MI=CSTACK(CP-4)
-      if (mi .ne. sp .and. .not. amath) call oerror(n130, m1, 'FOR/END')
-      if (mi-2 .le. 0 .or. mi .gt. slim) call oerror(n107, m1, 'END')
-      XI=V(MI)
-      XL=V(MI-1)
-      M=STACK(MI-2)
-      IF (ABS(XI). lt. EPSILN) call oerror(n118, m1, ' ')
-      if (m .le. 0 .or. xi .eq. 0.0 .or. cp-2 .le. 0) 
-     .      call oerror(n107, m1, 'END')
-      C(M)=C(M)+XI
-      IF ((C(M)-XL)/XI .le. 0) then
-         locLINK=CSTACK(CP-1)
-         locL=CSTACK(CP-2)
-         GO TO 1001
-      endif
-      CP=CP-5
-      if (cp .lt. 0 .or. cp+2 .gt. slim) call oerror(n107, m1, 'END')
-      SP=CSTACK(CP+1)-3
-      SP0=CSTACK(CP+2)
-      if (sp .lt. 0 .or. sp .gt. slim .or. sp0 .lt. 0 .or. 
-     1    sp0 .gt. slim) call oerror(n107, m1, 'END')
-      GO TO 1000
-c
-2202  if (cp-2 .le. 0 .or. cp .gt. slim) call oerror(n107, m1, 'END')
-      IF (CSTACK(CP) .NE. -iprocedure) GO TO 1000
-      locL=CSTACK(CP-2)
-      locLINK=CSTACK(CP-1)
-      GO TO 1001
-C---------------------------------------------------------------------
-C		   R E A D    O	P E R A	T O R			 
-C---------------------------------------------------------------------
-23    continue
-c
-      call ufread(m1)
-c
-      sp=sp0-1
-      if (sp .lt. 0) call oerror(n107, m1, 'read')
-c
-      go to 1000
-C---------------------------------------------------------------------
-C		   P R I N T   O P E R A T O R			 
-C---------------------------------------------------------------------
-24    continue
-c
-      call ufwrite( m1)
-c
-      sp=sp0-1
-      if (sp .lt. 0) call oerror(n107, m1, 'PRINT')
-c
-      go to 1000
-C---------------------------------------------------------------------
-C		   R E T U R N					 
-C---------------------------------------------------------------------
-25    CONTINUE
-      if (cp-1 .le. 0 .or. cp .gt. slim .or. sp0 .lt. 0 .or. 
-     1    sp0 .gt. slim) call oerror(n107, m1, 'RETURN')
-      IF (CSTACK(CP).NE.-3) GO TO 2503
-      I=CSTACK(CP-1)
-      N=SP0-I
-      J=I-N
-      MI=I
-2500  IF ((J.GE.MI).OR.(I.GE.SP0)) GO TO 2501
-      if (j .le. 0 .or. j .gt. slim .or. i .le. 0 .or. i .gt. slim) 
-     .     call oerror(n107, m1, 'RETURN')
-      MJ=STACK(J)
-      M=STACK(I)
-      if (mj .gt. 0 .and. m .gt. 0) C(MJ)=C(M)
-      I=I+1
-      J=J+1
-      GO TO 2500
-c
-2501  SP0=MI
-      if (mi .le. 0 .or. mi .gt. slim .or. mi+n .le. 0 .or.
-     1    mi+n .gt. slim) call oerror(n107, m1, 'RETURN')
-      STACK(MI) = STACK(MI+N)
-      V(MI)=V(MI+N)
-      SP=SP-N
-      CP=CP-2
-      if (sp .lt. 0 .or. sp .gt. slim) call oerror(n107, m1, 'RETURN')
-2503  if (cp .le. 0 .or. cp+2 .gt. slim) call oerror(n107, m1, 'RETURN')
-      IF (CSTACK(CP).NE.-irun) GO TO 2505
-      IF (CSTACK(CP+2) .NE. -3)	GO TO 2504
-      MJ=SP0-N
-      if (mj .le. 0 .or. mj .gt. slim .or. mj+n .le. 0 .or.
-     1    mj+n .gt. slim) call oerror(n107, m1, 'RETURN')
-      STACK(MJ)=STACK(MJ+N)
-      V(MJ)=V(MJ+N)
-      SP=SP-N
-      if (sp .lt. 0 .or. sp .gt. slim) call oerror(n107, m1, 'RETURN')
-2504  if (cp-3 .le. 0 .or. cp .gt. slim) call oerror(n107, m1, 'RETURN')
-      locL=CSTACK(CP-3)
-      locLINK=CSTACK(CP-2)
-      SP0=CSTACK(CP-1)
-      CP=CP-4
-      GO TO 1000
-2505  if (cp-6 .lt. 0 .or. cp .gt. slim) call oerror(n107, m1, 'RETURN')
-      IF (CSTACK(CP).NE.-iloopfor) GOTO 2506
-      CP=CP-6
-      GO TO 25
- 2506 if (cp-3 .lt. 0 .or. cp .gt. slim) call oerror(n107, m1, 'RETURN')
-      IF (CSTACK(CP).ne.-iprocedure) call oerror(n116, m1, ' ')
-      CP=CP-3
-      GO TO 25
-C------------------------------------------------------------------
-C		     V E C T O R   A S S I G N M E N T ( G E T S )
-C---------------------------------------------------------------------
-   27 CALL MASSGN
-      GOTO 1000
-C----------------------------------------------------------------------
-c                   EXEC
-C----------------------------------------------------------------------
- 500  continue
-C
-      if (sp .lt. 4) call oerror(n112, m1, 'EXEC')
-      if (stack(sp) .ne. 3) call oerror(n112, m1, 'EXEC')
-c		check that the argument on the stack is a string
-c		check the correct isize which depends if its a litteral
-c		or variable (types 7 or 14).
-      loc = stack(sp-1)
-      itype = stack(sp-3)
-      if (itype .eq. 14) then
-         isize = irealp(stack(sp-2))
-      else if (itype .eq. 7) then
-         isize = stack(sp-2)
-      else
-         call oerror(n112, m1, 'EXEC')
-      endif
-c		Ok, copy the string to string1
-      string1 = ' '
-      do 501 i = 1, isize
-         rstring1(i) = c(loc+i-1)
- 501  continue
-c
-      sp = sp - 4
-c	   execcomp(string1) translates and compiles and returns a location in
-c	   the K array that can be used
-c	   Errors are caught by execcomp and execintp.
-      kloc = execcomp(string1)
-c	   however, if kloc returns a 0, it means do nothing (a NOP)
-      if (kloc .le. 0) goto 1000
-      if (cp+2 .lt. 0 .or. cp+4 .gt. slim) call oerror(n120, m3, ' ')
-      CP=CP+4
-      CSTACK(CP+2) = 0
-      CSTACK(CP-3)=locL
-      CSTACK(CP-2)=locLINK
-      CSTACK(CP-1)=SP0
-      CSTACK(CP)=-irun
-      locL=kloc
-      if (locl .le. 0) call oerror(n120, m3, ' ')
-      locLINK=K(locL)
-      SP0=SP+1
-      if (sp0 .gt. slim) call oerror(n120, m3, ' ')
-      GO TO 900
-c
-C---------------------------------------------------------------------
-C		     R U N    O	P E R A	T O R			   
-C---------------------------------------------------------------------
-28    GO TO 1000
- 2801 IF (J.gt.KXORG) call oerror(n111, m3, ' ')
-      if (cp+2 .lt. 0 .or. cp+4 .gt. slim) call oerror(n120, m3, ' ')
-      CP=CP+4
-      CSTACK(CP+2) = 0
-      CSTACK(CP-3)=locL
-      CSTACK(CP-2)=locLINK
-      CSTACK(CP-1)=SP0
-      CSTACK(CP)=-irun
-      locL=J
-      if (locl .le. 0) call oerror(n120, m3, ' ')
-      locLINK=K(locL)
-      SP0=SP+1
-      if (sp0 .gt. slim) call oerror(n120, m3, ' ')
-      GO TO 900
-C---------------------------------------------------------------------
-C		U  S  I	 N  G				
-C---------------------------------------------------------------------
-31    GO TO 1000
-C----------------------------------------------------------------------
-C		   E L S E    O	P E R A	T O R			
-C---------------------------------------------------------------------
-53    continue
-      if (sp .lt. 2 .or. sp .gt. slim) call oerror(n107, m1, 'ELSE')
-      SP=SP-2
-      locL=STACK(SP+1)
-      locLINK=STACK(SP+2)
-      if (loclink .eq. 1) loclink = 0
-      GO TO 1001
-C---------------------------------------------------------------------
-C		   T H E N    O	P E R A	T O R			 
-C---------------------------------------------------------------------
-54    if (sp .lt. 3 .or. sp .gt. slim) call oerror(n107, m1, 'THEN')
-      SP=SP-3
-      IF (sngl(V(SP+1)) .gt. 0) GO TO 1000
-      locL=STACK(SP+2)
-      locLINK=STACK(SP+3)
-      if (loclink .eq. 1) loclink = 0
-      GO TO 1001
-C---------------------------------------------------------------------
-C		   W  H	 I  L  E				 
-C---------------------------------------------------------------------
-59    if (sp .lt. 3 .or. sp .gt. slim) call oerror(n107, m1, 'WHILE')
-      SP=SP-3
-      IF (sngl(V(SP+1)) .GT. 0) GO TO	1000
-      locL=STACK(SP+2)
-      locLINK=STACK(SP+3)
-      if (loclink .eq. 1) loclink = 0
-      if (cp-3 .lt. 0) call oerror(n107, m1, 'WHILE')
-      CP=CP-3
-      GO TO 1001
-C---------------------------------------------------------------------
-C		   D U M M Y   E N D   (IF-THEN-ELSE)		 
-C---------------------------------------------------------------------
-96    GO TO 1000
-C---------------------------------------------------------------------
-C		   W H I L E	S E T -	U P			 
-C---------------------------------------------------------------------
-97    if (cp+3 .gt. slim .or. cp .lt. 0) call oerror(n107, m1, 'WHILE')
-      CP=CP+3
-      CSTACK(CP)=-iprocedure
-      CSTACK(CP-1)=locLINK
-      CSTACK(CP-2)=locL+1
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   S U B S   O P E R A T O R			 
-C---------------------------------------------------------------------
-   98 CALL SUBS
-      GOTO 1000
-C---------------------------------------------------------------------
-C		   N O P				       
-C---------------------------------------------------------------------
-   99 CONTINUE
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   P R O T E C T				       
-C---------------------------------------------------------------------
-   56 CONTINUE
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   SPRINT				       
-C---------------------------------------------------------------------
-   33 CONTINUE
-c
-      i = sp0
-      if (i+7 .gt. sp) 
-     .		call oerror(n112, m1, 'SPRINT : Two strings needed')
-c
-      if (stack(i+3) .ne. 3) call oerror(n112, m1, 'SPRINT')
-      if (stack(i+7) .ne. 3) call oerror(n112, m1, 'SPRINT')
-c
-c     First string first
-c
-      itype = stack(i)
-      isize1 = iwpr(stack(i+1))
-      loc1 = stack(i+2)
-      if  (itype .ne. 7) call oerror(n112, m1, 'SPRINT')
-c
-c     Now for 2nd string
-c
-      itype = stack(i+4)
-      if  (itype .eq. 14) then
-	isize2 = stack(i+5)
-      else if (itype .eq. 7) then
-	isize2 = iwpr(stack(i+5))
-      else 
-	call oerror(n112, m1, 'SPRINT')
-      endif
-      loc2 = stack(i+6)
-      frmt = ' '
-      call copy( isize2, c(loc2), ifrmt)
-c
-      sp0 = sp0  + 8
-c
-      if (lastblnk(frmt) .ne. 0) then
-         call swrite( frmt(1:2*isize2), advrb(1:2*isize1) )
-      else
-         call uswrite( advrb(1:2*isize1) )
-      endif
-      call copy( isize1, iadvrb, c(loc1))
-c
-      sp0 = sp0  - 8
-      sp = sp0  - 1
-      if (sp .lt. 0) call oerror(n107, m1, 'SPRINT')
-c
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   SREAD				       
-C---------------------------------------------------------------------
-   34 CONTINUE
-c
-      i = sp0
-      if (i+7 .gt. sp) 
-     .		call oerror(n112, m1, 'SREAD : Two strings needed')
-c
-      if (stack(i+3) .ne. 3) call oerror(n112, m1, 'SREAD')
-      if (stack(i+7) .ne. 3) call oerror(n112, m1, 'SREAD')
-c
-c     First string first
-c
-      itype = stack(i)
-      if  (itype .eq. 14) then
-	isize1 = stack(i+1)
-      else if (itype .eq. 7) then
-	isize1 = iwpr(stack(i+1))
-      else 
-	call oerror(n112, m1, 'SREAD')
-      endif
-      loc1=stack(i+2)
-c
-      call copy( isize1, c(loc1), advrb)
-c
-c     Now for 2nd string
-c
-      itype = stack(i+4)
-      if  (itype .eq. 14) then
-	isize2 = stack(i+5)
-      else if (itype .eq. 7) then
-	isize2 = iwpr(stack(i+5))
-      else 
-	call oerror(n112, m1, 'SREAD')
-      endif
-      frmt = ' '
-      loc2=stack(i+6)
-      call copy( isize2, c(loc2), ifrmt)
-c
-      sp0 = sp0  + 8
-c
-      if (lastblnk(frmt) .ne. 0) then
-	call sread( frmt(1:2*isize2), advrb(1:2*isize1) )
-      else
-	call usread(advrb(1:2*isize1) )
-      endif
-c
-      sp0 = sp0  - 8
-      sp = sp0  - 1
-      if (sp .lt. 0) call oerror(n107, m1, 'SREAD')
-c
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   FPRINT				       
-C---------------------------------------------------------------------
-   35 CONTINUE
-c
-      i = sp0
-      if (i+4 .gt. sp) 
-     .		call oerror(n112, m1, 'FPRINT : Two needed')
-c
-      if (stack(i+4) .ne. 3) call oerror(n112, m1, 'FPRINT')
-c
-c     First get the unit number
-c
-      unit = nint(v(i))
-      if (unit .lt. 0) then
-	unit = iout
-      else if (unit .gt. 0) then
-        do 351 j = 1, nfiles
-	  if (unit .eq. ffile(j,1)) goto 352
-351	  continue
-        call oerror(n112, m1, 'FPRINT: No file opened with that unit')
-c
-352     if (ffile(j,2) .eq. RO) call oerror(n112, m1, 
-     .	  'FPRINT: File not open with write permission')
-      endif
-c
-c     Now for string
-c
-      itype = stack(i+1)
-      if  (itype .eq. 14) then
-	isize2 = stack(i+2)
-      else if (itype .eq. 7) then
-	isize2 = iwpr(stack(i+2))
-      else 
-	call oerror(n112, m1, 'FPRINT')
-      endif
-      loc2 = stack(i+3)
-      frmt = ' '
-      call copy( isize2, c(loc2), ifrmt)
-c
-      sp0 = sp0  + 5
-c
-      if (lastblnk(frmt) .ne. 0) then
-         call fwrite( frmt(1:2*isize2), unit )
-      else
-         call ufwrite( unit )
-      endif
-      call flush(long(unit))
-c
-      sp0 = sp0  - 5
-      sp = sp0  - 1
-      if (sp .lt. 0) call oerror(n107, m1, 'FPRINT')
-c
-      GO TO 1000
-C---------------------------------------------------------------------
-C		   FREAD				       
-C---------------------------------------------------------------------
-   36 CONTINUE
-c
-      i = sp0
-      if (i+4 .gt. sp) 
-     .		call oerror(n112, m1, 'FREAD : Two needed')
-c
-      if (stack(i+4) .ne. 3) call oerror(n112, m1, 'FREAD')
-c
-c     First get the unit number
-c
-      unit = nint(v(i))
-      if (unit .lt. 0) then
-	unit = iinunit
-      else if (unit .gt. 0) then
-        do 361 j = 1, nfiles
-	  if (unit .eq. ffile(j,1)) goto 362
-361	  continue
-        call oerror(n112, m1, 'FREAD: No file opened with that unit')
-c
-362     if (ffile(j,2) .eq. WO) call oerror(n112, m1, 
-     .	  'FREAD: File not open with read permission')
-      else
-	call oerror(n112, m1, 'FREAD: Cannot read from standard error') 
-      endif
-c
-c     Now for string
-c
-      itype = stack(i+1)
-      if  (itype .eq. 14) then
-	isize2 = stack(i+2)
-      else if (itype .eq. 7) then
-	isize2 = iwpr(stack(i+2))
-      else 
-	call oerror(n112, m1, 'FREAD')
-      endif
-      frmt = ' '
-      loc2=stack(i+3)
-      call copy( isize2, c(loc2), ifrmt)
-c
-      sp0 = sp0  + 5
-c
-      if (lastblnk(frmt) .ne. 0) then
-	call fread( frmt(1:2*isize2), unit )
-      else
-	call ufread( unit )
-      endif
-c
-      sp0 = sp0  - 5
-      sp = sp0  - 1
-      if (sp .lt. 0) call oerror(n107, m1, 'FREAD')
-c
-      GO TO 1000
-C---------------------------------------------------------------------
-C	       E    X	 I    T
-C---------------------------------------------------------------------
-900   LFLAG=1
-      GO TO 10000
-1000  LFLAG=2
-      GO TO 10000
-1001  LFLAG=3
-      GO TO 10000
-5000  LFLAG=4
-      GO TO 10000
-5001  LFLAG=5
-      GO TO 10000
-9999  LFLAG=6
-10000 CONTINUE
-10001 RETURN
-C-----------------------------------------------------------------------
- 9601 FORMAT (1pG15.7,1x)
-      END
-
diff -uNr 3.5/source/conline/rdrm.f unipops-3.6/source/conline/rdrm.f
--- 3.5/source/conline/rdrm.f	2000-03-16 11:33:29.000000000 -0700
+++ unipops-3.6/source/conline/rdrm.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,23 +0,0 @@
-      subroutine rdrm(junit, nchars, iout)
-C-------------------------------------------------------------------------------
-C  @(#)rdrm.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c Code used to read from TEKTRONIX like graphics screens when they are in 
-c	cursor mode
-c***********************************************
-c 8904 [RJM]
-c***********************************************
-c
-      character*1 iout(*), ctemp
-      integer*2 junit, nchars, i
-      integer*4 fgetc, jjunit, irtn
-c
-      jjunit = junit
-      do 100 i = 1, nchars
-         irtn = fgetc(jjunit, ctemp)
-         iout(i) = ctemp
-100      continue
-      return
-      end
-c
diff -uNr 3.5/source/conline/recover.f unipops-3.6/source/conline/recover.f
--- 3.5/source/conline/recover.f	2000-03-16 11:33:29.000000000 -0700
+++ unipops-3.6/source/conline/recover.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,403 +0,0 @@
-      subroutine recover(iret)
-C-------------------------------------------------------------------------------
-C  @(#)recover.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Initializes files, locks, K-array, etc. from a disk RECOVER file
-c     or initializes K-array from MEMORY file.
-c
-c     iret = 0 if no recover happened
-c                1 if a recover happened
-c
-      character*1 answr
-      real*4 recversion
-      logical*2 inquirefile, onlinetmp, memcreate
-      integer*2 igtmp, iptmp, istat, ierr, inlinetmp, igintmp, 
-     .		igouttmp, imintmp, iouttmp, ffiletmp(10,4),
-     .		iinlisttmp(50,2), iinptrtmp, iinunittmp, iintypetmp
-      logical*2 lsetuptmp
-      character*8  oobstmp, sitetmp, termtmp, proctmp
-      character*64 dirprefixtmp(10), ccubetmp, dirtmp, cfiletmp(10),
-     .			cinlisttmp(50)
-      character*16 couttxttmp, coutgrphtmp, cmenuintmp, cmenuouttmp, 
-     .		   cgraphintmp, cgraphouttmp
-      character*72 str1, str2
-      integer*4 numcio2, numappl2, numlsf2, numcore2, nummax, err7, 
-     1	        access, long, iloc, long, ii, numkx,
-     2		maxcio, i4, iret, chmod
-      integer*2 n1, lastblnk, memory(8)
-      real memversion
-      logical rcvrerr
-c
-      include 'cio.inc'
-      include 'appl.inc'
-      include 'core.inc'
-      include 'lsf.inc'
-c
-      equivalence (cmemory, memory(1))
-      equivalence (memversion, kx(13) )
-c     13 is the location in KX of VERSION adverb.
-c
-      data nummax/32766/, err7/7/, maxcio/5800/
-      data n1 /1/
-c
-      iret = 0
-c
-101   if (.not. inquirefile(cmemory)) then
-	write(istderr,*) ' '
-	write(istderr,*) '***ERROR***  Memory file does not exist!!'
-	if (.not. memcreate()) goto 110
-	goto 101
-      endif
-      if (access(cmemory,'rw').ne.0 .and. chmod(cmemory,'rw').ne.0) then
-	write(istderr,*) ' '
-	write(istderr,*) '***ERROR***  Memory file has wrong access ',
-     .		'privileges!!'
-	if (.not. memcreate()) goto 110
-	goto 101
-      endif
-c     Checks for existence of MEMORY file (Needed even if RECOVERing).
-c
-C					Read in	K & LISTF arrays.
-      call openms(imemory, memory, n1, istat)
-      ILOC = 1
-      call readms(imemory, iloc, long(kblk), k, ierr)
-      ILOC = iloc + KBLK
-      if (ierr .ge. 0) call readms(imemory, iloc, long(kxblk), kx, ierr)
-      ILOC = iloc + KxBLK
-      if (ierr .ge. 0) call readms(imemory,iloc,long(lblk),listf,ierr)
-      IF (IERR.LT.0) then
-	write(istderr,*) ' '
-	write(istderr,*) '***ERROR***  Memory file has an internal problem!!'
-	if (.not. memcreate()) goto 110
-	goto 101
-      endif
-      call closms(imemory, istat)
-c
-      if (version .ge. 1.0) then
-         if (int(memversion) .ne. int(version)) then
-	    write(istderr,*) ' '
-            write(istderr,*) 'ERROR: Memory file and program ',
-     1      	             'are not compatable!!'
-	    write(istderr,*) 'Versions: ', memversion, version
-	    if (.not. memcreate()) goto 110
-	    goto 101
-        endif
-      else
-         if (memversion .lt. 1.0) memversion = memversion*1000.0
-         version = version * 1000.0
-	 if (int(memversion*100.0) .ne. int(version*100.0)) then
-	    write(istderr,*) ' '
-	    write(istderr,*) 'ERROR: Memory file and program ',
-     1  	              'are not compatable!!'
-	    write(istderr,*) 'Versions: ', memversion, version
-            version = version / 1000.0
-	    if (.not. memcreate()) goto 110
-	    goto 101
-         endif
-         version = version / 1000.0
-      endif
-c
-c     Checks that the MEMORY file is up to date with the executble code.
-c
-c---------------------------------
-c
-c
-      if (inquirefile(crecover)) then
-	str1 = " "
-	str2 = " "
-	rcvrerr = .false.
-c
-	if (access(crecover,'rw').ne.0 .and. chmod(crecover,'rw') .ne. 0) then
-	   write(str1,34) 'Recover file has wrong access privelages!!'
-	   rcvrerr = .true.
-	   goto 120
-	endif
-c
-	rcvrerr = .true.
-	str1 = "ERROR: Problem in opening or reading recover file"
-	open(unit=irecover,file=crecover,status='old',
-     1       form='unformatted',access='sequential',err=120)
-	rewind(irecover,err=120)
-	read(irecover,err=120,end=120) recversion, numcio2, numappl2, 
-     1     			         numcore2, numkx, numlsf2
-	rcvrerr = .false.
-c
-        if (version .ge. 1) then
-	     if (int(recversion) .ne. int(version)) then
-	        write(str1,34) 'ERROR: Recovery file and program ',
-     1  	  	         'are not compatable!!'
-34		format(10a)
-	        write(str2,351) 'Versions: ', recversion, version
-351		format(a, f10.2, f10.2)
-	   	rcvrerr = .true.
-		goto 120
-	     endif
-        else
-             if (recversion .lt. 1) recversion = recversion*1000.0
-             version = version*1000.0
-	     if (int(recversion*100.0) .ne. int(version*100.0)) then
-	        write(str1,34) 'ERROR: Recovery file and program ',
-     1  	  	         'are not compatable!!'
-	        write(str2,351) 'Versions: ', recversion, version
-	   	rcvrerr = .true.
-                version = version / 1000.0
-		goto 120
-	     endif
-             version = version / 1000.0
-	endif
-c
-        if (numcio2 .ne. numcio .or. numcio .gt. maxcio .or. 
-     1        numcio2 .gt. maxcio) then
-	     write(str1,352) 'ERROR: Bad recovery file (NUMCIO):',
-     1		numcio2, numcio
-352	     format(a, i7, i7)
-	     rcvrerr = .true.
-	     goto 120
-	 else if (numappl2 .ne. numappl .or. numappl .gt. RAPPLSIZE .or.
-     1        numappl2 .gt. RAPPLSIZE) then
-	     write(str1,352) 'ERROR: Bad recovery file (NUMAPPL):',
-     1	  	numappl2, numappl
-	     rcvrerr = .true.
-	     goto 120
-	else if (numcore2 .ne. nummax .or. nummax .gt. 32766 .or.
-     1        numcore2 .gt. 32766) then
-	     write(str1,352) 'ERROR: Bad recovery file (NUMCORE):',
-     1		numcore2, nummax
-	     rcvrerr = .true.
-	     goto 120
-	else if (numkx .ne. nummax .or. nummax .gt. 32766 .or.
-     1        numkx .gt. 32766) then
-	     write(str1,352) 'ERROR: Bad recovery file (NUMKX):',
-     1		numkx, nummax
-	     rcvrerr = .true.
-	     goto 120
-	else if (numlsf2 .ne. nummax .or. nummax .gt. 32766 .or.
-     1        numlsf2 .gt. 32766) then
-	     write(str1,352) 'ERROR: Bad recovery file (NUMLSF):',
-     1		numlsf2, nummax
-	     rcvrerr = .true.
-	     goto 120
-	endif
-c	Check that all info in RECOVER file is correct
-c
-120     if (rcvrerr) then
-	   write(istderr,*) ' '
-	   if (str1 .ne. ' ') write(istderr,*) str1(1:lastblnk(str1))
-	   if (str2 .ne. ' ') write(istderr,*) str2(1:lastblnk(str2))
-	   write(istderr,*) 'No attempt will be made to recover!'
-	   write(istderr,*) ' '
-	else
-	   write(istdout,*) ' '
-	    write(istdout,*) 'Do you want to recover your environment ', 
-     .			 ' from the last time you ran'
-      	   write(istdout,20) 'the program? (y or n)? [ default : n ]: '
-20         format(1x,a,$)
-	   call flush(long(istdout))
-           read(istdin,30) answr
-30         format(a)
-           write(istdout,*) ' '
-c
-           if (answr .eq. 'y' .or. answr .eq. 'Y') then
-	     igtmp = igraphtype
-	     igintmp = igraphin
-	     igouttmp = igraphout
-	     imintmp = imenuin
-	     iouttmp = iout
-	     couttxttmp = couttxt
-	     coutgrphtmp = coutgrph
-	     cmenuintmp = cmenuin
-	     cmenuouttmp = cmenuout
-	     cgraphintmp = cgraphin
-	     cgraphouttmp = cgraphout
-	     ccubetmp = ccube
-	     iptmp = iprinttype
-	     oobstmp = oobs
-	     sitetmp = site
-	     dirtmp = dirname
-	     termtmp = termtype
-	     proctmp = procid
-	     onlinetmp = online
-             inlinetmp = inline
-	     lsetuptmp = lsetup
-             do 35 ii = 1, 10
-                dirprefixtmp(ii) = dirprefix(ii)
-		ffiletmp(ii,1) = ffile(ii,1)
-		ffiletmp(ii,2) = ffile(ii,2)
-		ffiletmp(ii,3) = ffile(ii,3)
-		ffiletmp(ii,4) = ffile(ii,4)
-	        cfiletmp(ii) = cfile(ii)
- 35          continue
-             do 3509 ii = 1, 50
-	        iinlisttmp(ii, 1) = iinlist(ii, 1)
-	        iinlisttmp(ii, 2) = iinlist(ii, 2)
-		cinlisttmp(ii) = cinlist(ii)
-3509		continue
-	     iinptrtmp = iinptr
-	     iinunittmp = iinunit
-	     iintypetmp = iintype
-c            Temporarily store those items in CIO that are NOT to be overwritten
-c	     by RECOVER.
-c
-             read(irecover,err=100,end=100) (Rio(i4),i4=1,numcio)
-	     read(irecover,err=100,end=100) (Rappl(i4),i4=1,numappl)
-	     read(irecover,err=100,end=100) (k(i4),i4=1,nummax)
-	     read(irecover,err=100,end=100) (kx(i4),i4=1,nummax)
-	     read(irecover,err=100,end=100) (listf(i4),i4=1,nummax)
-             if (vers .lt. 1) vers = vers * 1000.0
-	     close(irecover)
-c	     Read in arrays from RECOVER file.
-c	
-             iret = 1
-             igraphtype = igtmp 
-	     igraphin = igintmp
-	     igraphout = igouttmp
-	     imenuin = imintmp
-	     iout = iouttmp
-	     couttxt = couttxttmp 
-	     coutgrph = coutgrphtmp
-	     cmenuin = cmenuintmp 
-	     cmenuout = cmenuouttmp 
-	     cgraphin = cgraphintmp 
-	     cgraphout = cgraphouttmp
-	     ccube = ccubetmp
-             iprinttype = sign(iptmp, iprinttype)
-             oobs = oobstmp
-             site = sitetmp
-             dirname = dirtmp
-             termtype = termtmp
-             procid = proctmp
-	     online = onlinetmp
-             inline = inlinetmp
-	     lsetup = lsetuptmp
-             do 36 ii = 1, 10
-                dirprefix(ii) = dirprefixtmp(ii)
-		ffile(ii,1) = ffiletmp(ii,1)
-		ffile(ii,2) = ffiletmp(ii,2)
-		ffile(ii,3) = ffiletmp(ii,3)
-		ffile(ii,4) = ffiletmp(ii,4)
-	        cfile(ii) = cfiletmp(ii)
- 36          continue
-             do 361 ii = 1, 50
-	        iinlist(ii, 1) = iinlisttmp(ii, 1)
-	        iinlist(ii, 2) = iinlisttmp(ii, 2)
-		cinlist(ii) = cinlisttmp(ii)
-361		continue
-	     iinptr = iinptrtmp
-	     iinunit = iinunittmp 
-	     iintype =  iintypetmp
-c            If all goes well, then put back temp. values into CIO.
-c
-	   else if (answr .ne. 'n' .and. answr .ne. 'N' .and. 
-     .		   answr .ne. ' ') then
-	     goto 120
-c
-	   endif
-c
-        endif 
-      endif
-c			set prompt if not already set
-      if (lastblnk(cuserprompt) .le. 0) then
-         if (program(1:1) .eq. 'L') then
-            cuserprompt = 'Line >'
-         else if (program(1:1) .eq. 'C') then
-            cuserprompt = 'Condar >'
-         endif
-      endif
-c     Also, if by some bizare chain of events
-c     program is not L or C, prompt stays the same
-c
-      return
-c------------------------------
-c
-100   igraphtype = igtmp 
-      igraphin = igintmp
-      igraphout = igouttmp
-      imenuin = imintmp
-      iout = iouttmp
-      couttxt = couttxttmp 
-      coutgrph = coutgrphtmp
-      cmenuin = cmenuintmp 
-      cmenuout = cmenuouttmp 
-      cgraphin = cgraphintmp 
-      cgraphout = cgraphouttmp
-      ccube = ccubetmp
-      iprinttype = sign(iptmp, iprinttype)
-      oobs = oobstmp
-      site = sitetmp
-      dirname = dirtmp
-      termtype = termtmp
-      procid = proctmp
-      online = onlinetmp
-      inline = inlinetmp
-      lsetup = lsetuptmp
-      do 105 ii = 1, 10
-         dirprefix(ii) = dirprefixtmp(ii)
-	 ffile(ii,1) = ffiletmp(ii,1)
-	 ffile(ii,2) = ffiletmp(ii,2)
-	 ffile(ii,3) = ffiletmp(ii,3)
-	 ffile(ii,4) = ffiletmp(ii,4)
-	 cfile(ii) = cfiletmp(ii)
- 105  continue
-      do 1051 ii = 1, 50
-	iinlist(ii, 1) = iinlisttmp(ii, 1)
-	iinlist(ii, 2) = iinlisttmp(ii, 2)
-	cinlist(ii) = cinlisttmp(ii)
-1051	continue
-      iinptr = iinptrtmp
-      iinunit = iinunittmp 
-      iintype =  iintypetmp
-      call exitpops(err7)
-c     Error in RECOVER file so go to EXITPOPS... Do some cleanup before hand.
-c
-110   call exitpops(err7)
-c     Exit if the memory file has a problem
-c
-      end
-c
-c---------------------------------------
-c
-      logical*2 function memcreate()
-c
-c     Memory file error trap and recovery
-c
-      include 'cio.inc'
-c
-      character*1 answr
-      integer*4 system, unlink, long
-      logical*2 inquirefile
-c
-      memcreate = .false.
-c
-1     write(istdout,*) ' '
-      write(istdout,5) 'Do you want to recreate your memory file '
-      write(istdout,5) '(y or n)?  [ default : n ]: '
-5     format(1x,a,$)
-      call flush(long(istdout))
-      read(istdin,6) answr
-6     format(a)
-c
-      if (answr .eq. ' ' .or. answr .eq. 'n' .or. answr .eq. 'N') then
-	memcreate = .false.
-      else if (answr .eq. 'y' .or. answr .eq. 'Y') then
-	if (inquirefile(cmemory) .and. unlink(cmemory) .ne. 0) then
-      	   write(istderr,5) ' '
-	   write(istderr,*) "Cannot delete old memory file and cannot ",
-     .			"continue!!"
-	   write(istderr,*) "Get help from your local UniPops guru!"
-	   memcreate = .false.
-	else if (system("makefile.exe " // cmemory) .ne. 0) then
-      	   write(istderr,5) ' '
-	   write(istderr,*) "Cannot create new memory file and cannot ",
-     .			"continue!"
-	   write(istderr,*) "Get help from your local UniPops guru!"
-	   memcreate = .false.
-	else
-	   memcreate = .true.
-	endif
-      else
-	goto 1
-      endif
-c
-      return
-      end
diff -uNr 3.5/source/conline/rn1.f unipops-3.6/source/conline/rn1.f
--- 3.5/source/conline/rn1.f	2000-03-16 11:33:31.000000000 -0700
+++ unipops-3.6/source/conline/rn1.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,48 +0,0 @@
-      SUBROUTINE RN1(POS,STRNG)
-C-------------------------------------------------------------------------------
-C  @(#)rn1.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c*************************************
-c Modified 8903 [RJM] See CHANGES.DOC
-c*************************************
-      CHARACTER*8 CSTR
-      integer*2 STRNG(4), STR(4), minus, idd, imm, isec, ier, i
-      real*4 pos, pos1, dd, rem, sec
-      character*1 BSTR(8), BMU
-      REAL MM
-c
-      EQUIVALENCE (STR,BSTR,CSTR)
-c
-      DATA BMU/'-'/
-      DATA MINUS/' -'/
-c
-      POS1=ABS(POS)
-      DD=POS1/3600.0
-      IDD=IFIX(DD)
-      REM=POS1-IDD*3600.0
-      MM=REM/60.0
-      IMM=IFIX(MM)
-      SEC=REM-IMM*60.0
-      ISEC=IFIX(SEC+0.5)
-      IF (ISEC.LT.60) GO TO 13
-      ISEC=0
-      IMM=IMM+1
-   13 IF (IMM.LT.60) GO TO 14
-      IMM=0
-      IDD=IDD+1
-   14 CONTINUE
-      IF (IDD.NE.0) GO TO 15
-      WRITE(CSTR,102,IOSTAT=IER) IMM,ISEC
-      IF (POS.LT.0.0.AND.IMM.LT.10) BSTR(4)=BMU
-      IF (POS.LT.0.0.AND.IMM.GE.10) BSTR(3)=BMU
-      GO TO 16
-   15 IF (POS.LT.0) IDD=-IDD
-      WRITE(CSTR,101,IOSTAT=IER) IDD,IMM,ISEC
-   16 CONTINUE
-      DO 11 I=1,4
-         STRNG(I)=STR(I)
-   11    CONTINUE
-  101 FORMAT (I2.2,':',I2.2,':',I2.2)
-  102 FORMAT (3X,I2.2,':',I2.2)
-      RETURN
-      END
diff -uNr 3.5/source/conline/rns.f unipops-3.6/source/conline/rns.f
--- 3.5/source/conline/rns.f	2000-03-16 11:33:32.000000000 -0700
+++ unipops-3.6/source/conline/rns.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,65 +0,0 @@
-      SUBROUTINE RNS (POS,IFLAG,STRING)
-C-------------------------------------------------------------------------------
-C  @(#)rns.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------
-C---------------------------------------------------------------
-      integer*2 STRING(6), STRNG2(6), iflag, minus, idd, imm, iss, 
-     .          ier, ihh, i
-      real*4 pos, dd, ss, hh
-      CHARACTER*12 CSTRING
-      REAL   MM
-      EQUIVALENCE (STRNG2,CSTRING)
-      DATA MINUS/' -'/
-C                                          DEC, L, B.
-      IF (IFLAG .EQ. 1 .OR. IFLAG .EQ. 3) THEN
-         DD = ABS(POS)
-         IDD = IFIX(DD)
-         MM = (DD-FLOAT(IDD))*60.0
-         IMM = IFIX(MM)
-         SS = (MM-FLOAT(IMM))*60.
-c         ISS = IFIX(SS)
-         iss=nint(ss)
-         IF (ISS.LT.60) GO TO 13
-         ISS=0
-         IMM=IMM+1
-   13    IF (IMM.LT.60) GO TO 14
-         IMM=0
-         IDD=IDD+1
-   14    CONTINUE
-         IF (IFLAG .EQ. 3) 
-     .   WRITE(CSTRING,103,IOSTAT=IER) IDD,IMM,ISS
-         IF (IFLAG .EQ. 1) THEN
-            WRITE(CSTRING,101,IOSTAT=IER) IDD, IMM, ISS
-            IF (POS.LT.0.0) STRNG2(1)=MINUS
-            ENDIF
-         GO TO 99
-      ENDIF
-C                                          R.A.
-      IF (IFLAG .EQ. 2 .OR. IFLAG .EQ. 0) THEN
-         IF (IFLAG .EQ. 2) POS=POS/15.0
-         HH = POS
-         IHH = IFIX(HH)
-         MM = (HH-FLOAT(IHH))*60.0
-         IMM = IFIX(MM)
-         SS = (MM-FLOAT(IMM))*60.0
-         IF (SS.LT.59.9) GO TO 23
-         SS=0.
-         IMM=IMM+1
-   23    IF (IMM.LT.60) GO TO 24
-         IMM=0
-         IHH=IHH+1
-   24    CONTINUE
-         WRITE(CSTRING,102,IOSTAT=IER) IHH,IMM,SS
-         GO TO 99
-         ENDIF
-   99    CONTINUE
-         DO 11 I = 1,6
-            STRING(I)=STRNG2(I)
-   11       CONTINUE
-         RETURN
-C---------------------------------------------------------------
- 101  FORMAT (2X,I2.2,':',I2.2,':',I2.2)
- 102  FORMAT (2X,I2.2,':',I2.2,':',F4.1)
-  103 FORMAT (1X,I3,':',I2.2,':',I2.2)
-      END
diff -uNr 3.5/source/conline/rns8.f unipops-3.6/source/conline/rns8.f
--- 3.5/source/conline/rns8.f	2000-03-16 11:33:32.000000000 -0700
+++ unipops-3.6/source/conline/rns8.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,64 +0,0 @@
-      SUBROUTINE RNS8 (POS,IFLAG,STRING)
-C-------------------------------------------------------------------------------
-C  @(#)rns8.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------
-C---------------------------------------------------------------
-      integer*2 STRING(6), STRNG2(6), iflag, minus, idd, imm, iss, 
-     .          ier, ihh, i
-      real*8 pos, dd, ss, hh, mm
-      CHARACTER*12 CSTRING
-      EQUIVALENCE (STRNG2,CSTRING)
-      DATA MINUS/' -'/
-C                                          DEC, L, B.
-      IF (IFLAG .EQ. 1 .OR. IFLAG .EQ. 3) THEN
-         DD = ABS(POS)
-         IDD = IFIX(DD)
-         MM = (DD-FLOAT(IDD))*60.0
-         IMM = IFIX(MM)
-         SS = (MM-FLOAT(IMM))*60.
-c         ISS = IFIX(SS)
-         iss=nint(ss)
-         IF (ISS.LT.60) GO TO 13
-         ISS=0
-         IMM=IMM+1
-   13    IF (IMM.LT.60) GO TO 14
-         IMM=0
-         IDD=IDD+1
-   14    CONTINUE
-         IF (IFLAG .EQ. 3) 
-     .   WRITE(CSTRING,103,IOSTAT=IER) IDD,IMM,ISS
-         IF (IFLAG .EQ. 1) THEN
-            WRITE(CSTRING,101,IOSTAT=IER) IDD, IMM, ISS
-            IF (POS.LT.0.0) STRNG2(1)=MINUS
-            ENDIF
-         GO TO 99
-      ENDIF
-C                                          R.A.
-      IF (IFLAG .EQ. 2 .OR. IFLAG .EQ. 0) THEN
-         IF (IFLAG .EQ. 2) POS=POS/15.0
-         HH = POS
-         IHH = IFIX(HH)
-         MM = (HH-FLOAT(IHH))*60.0
-         IMM = IFIX(MM)
-         SS = (MM-FLOAT(IMM))*60.0
-         IF (SS.LT.59.9) GO TO 23
-         SS=0.
-         IMM=IMM+1
-   23    IF (IMM.LT.60) GO TO 24
-         IMM=0
-         IHH=IHH+1
-   24    CONTINUE
-         WRITE(CSTRING,102,IOSTAT=IER) IHH,IMM,SS
-         GO TO 99
-         ENDIF
-   99    CONTINUE
-         DO 11 I = 1,6
-            STRING(I)=STRNG2(I)
-   11       CONTINUE
-         RETURN
-C---------------------------------------------------------------
- 101  FORMAT (2X,I2.2,':',I2.2,':',I2.2)
- 102  FORMAT (2X,I2.2,':',I2.2,':',F4.1)
-  103 FORMAT (1X,I3,':',I2.2,':',I2.2)
-      END
diff -uNr 3.5/source/conline/runtag.f unipops-3.6/source/conline/runtag.f
--- 3.5/source/conline/runtag.f	2000-03-16 11:33:33.000000000 -0700
+++ unipops-3.6/source/conline/runtag.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,81 +0,0 @@
-      subroutine runtag(numi2, itag)
-c
-c     @(#)runtag.f	5.1 06/22/94
-c
-c     Returns a location in the core array that would be safe to use
-c     at run time for storing a constant.  NUMI2 is the number of
-c     I*2 words that are to be taken up by the word to be stored.
-c     ITAG is the location in the C array at which the constant can 
-c     be stored.
-c
-      integer*2 numi2, itag, ktag
-      integer*2 n131, m1
-c
-      integer*2 kxoffset, koffset, safety, numkleft, numkxleft,
-     .		irealp
-c
-      include 'core.inc'
-c
-      save koffset, kxoffset
-c
-      data koffset/0/, kxoffset/0/, safety/6/
-c     KOFFSET, KXOFFSET = Number of I*2 words already placed
-c	 into core arrays.
-c     SAFETY = Safety margin between end of static core usage and run-ime
-c	core usage.
-c
-      data n131, m1 /131, -1/
-c
-      numkleft = k(5)-k(3)-koffset-2*safety
-      numkxleft = kx(5)-kx(3)-kxoffset-2*safety
-c     Number of i*2 words left in each part of core arrays; give ourselves  
-c	a safety margin both right after the end of static core and before end
-c	of array.  Probably safety could be 1.
-c
-      if (numkleft .gt. numi2) then
-	itag = irealp(k(3) + safety + koffset)
-	koffset = koffset + numi2
-      else if (numkxleft .gt. numi2) then
-c		irealp must be used in two parts here because
-c               the arg to irealp is an I*2 and the full sum of
-c               kx(3) + safety + kxoffset + kxorg will exceed 32767
-	itag = irealp(kx(3) + safety + kxoffset) + irealp(kxorg)
-	kxoffset = kxoffset + numi2
-      else 
-	call oerror(n131, m1, ' ')
-      endif
-c
-      return
-c
-c-------------------------
-c
-      entry runktag(numi2, ktag)
-c
-c	Returns a location in the K array that would be safe to use
-c	at run time for storing a program chunk.  NUMI2 is the number of
-c	I*2 words that are to be taken up by the word to be stored.
-c	KTAG is the location in the K array at which the program chunk can 
-c	be stored.
-c
-      numkleft = k(5) - k(3) - koffset - 2*safety
-      if (numkleft .gt. numi2) then
-         ktag = k(3) + safety + koffset
-         koffset = koffset + numi2
-      else
-         call oerror(n131, m1, ' ')
-      endif
-c
-      return
-c
-c-------------------------
-c
-      entry clrruntag
-c
-c     Clears all run-time tags; should be called occasionally
-c
-      kxoffset = 0
-      koffset = 0
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/scal.f unipops-3.6/source/conline/scal.f
--- 3.5/source/conline/scal.f	2000-03-16 11:33:33.000000000 -0700
+++ unipops-3.6/source/conline/scal.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,60 +0,0 @@
-      SUBROUTINE SCAL   (VMAX,VMIN,MIN,INCR)
-C-------------------------------------------------------------------------------
-C  @(#)scal.f	5.2 12/21/95
-C-------------------------------------------------------------------------------
-c
-      integer*2 i, is
-      REAL SAVE(4),VMAX,VMIN,FIRSTV,DELTAV
-      REAL P,T,MIN,INCR,FAD,AXLEN, rmaxnormal
-c
-      data save/1., 2., 5., 10./
-c
-      if ( abs(vmax) .lt. rmaxnormal() .and. 
-     .     abs(vmin) .lt. rmaxnormal()) then
-         AXLEN=5.
-         FAD=0.01
-         FIRSTV=VMIN
-         IF (VMIN.LT.0.) FAD=-0.99
-         DELTAV=(VMAX-FIRSTV)/AXLEN
-         IF (DELTAV.LE.0.) DELTAV=ABS(2.*FIRSTV/AXLEN)+1.
-         I=ALOG10(DELTAV)+1000.
-         P=10.**(I-1000)
-         DELTAV=DELTAV/P-0.01
-         do 200 i = 1, 4
-            IS=I
-            IF (SAVE(I).GE.DELTAV) GO TO 300
-200         CONTINUE
-300      DELTAV=SAVE(IS)*P
-         FIRSTV=DELTAV*FLOAT(IFIX(VMIN/DELTAV+FAD))
-         T=FIRSTV+(AXLEN+0.01)*DELTAV
-         IF (T.GE.VMAX) GO TO 400
-c
-         FIRSTV=P*FLOAT(IFIX(VMIN/P+FAD))
-         T=FIRSTV+(AXLEN+0.01)*DELTAV
-         IF (T.GE.VMAX) GO TO 400
-         IS=IS+1
-         if (is .gt. 4) then
-c                             increase p by an order of magnitude
-c                             and reset index into save to 1
-            is = 1
-            p = p*10.0
-         end if
-         GO TO 300
-c
-400      CONTINUE
-         FIRSTV=FIRSTV-FLOAT(IFIX((AXLEN+(FIRSTV-VMAX)/DELTAV)
-     .       *0.5))*DELTAV
-         IF (dble(VMIN)*dble(FIRSTV).LE.0.d00) FIRSTV=0.
-         MIN=FIRSTV
-         INCR=DELTAV
-c
-      else
-         min = 1.e30
-	 incr = 1.e30
-c	 Takes care of the case of bad numbers in array.
-c
-      endif
-c
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/setdefaults.f unipops-3.6/source/conline/setdefaults.f
--- 3.5/source/conline/setdefaults.f	2000-03-16 11:33:34.000000000 -0700
+++ unipops-3.6/source/conline/setdefaults.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,27 +0,0 @@
-      subroutine setdefaults(itag, value)
-c
-c     @(#)setdefaults.f	5.1 06/22/94
-c
-c     Sets VALUE to the default value of the ADVERB located at tag ITAG
-c
-      integer*2 itag, i
-      real*8 value, dinfinity, dinfinit
-c
-      include 'defaults.inc'
-c
-      dinfinit= dinfinity()
-c
-      if (value .ne. dinfinit) return
-c
-      do 100 i = 1, numtags-1
-	if (defvalues(i) .ne.  dinfinit) then
-	  if (itag .ge. offsets(i) .and. itag .lt. offsets(i+1)) then
-		value = defvalues(i)
-		return
-	  endif
-	endif
-100	continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/setflags.f unipops-3.6/source/conline/setflags.f
--- 3.5/source/conline/setflags.f	2000-03-16 11:33:34.000000000 -0700
+++ unipops-3.6/source/conline/setflags.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,77 +0,0 @@
-      subroutine setflags
-c
-c     @(#)setflags.f	5.1 06/22/94
-c
-c     Sets up values for STATUS array-adverb depending upon
-c     values of internal flags which the user may need to know.
-c
-c     DON'T ALTER WITHOUT ALSO CHANGING DOCUMENTATION AND TELLSTAT ROUTINE
-c
-      integer*2 curcur
-c
-      include 'appl.inc'
-      include 'errors.inc'
-      include 'cio.inc'
-      include 'core.inc'
-      include 'stk.inc'
-c
-      status(1) = lxa
-      status(2) = uxa
-      status(3) = splt
-      status(4) = rplt
-      status(5) = idx
-      status(6) = ltype
-      status(7) = sclchar*11
-      status(8) = naccum
-      status(9) = numplots
-      if (pagefull) then
-	status(10) = 1
-      else
-	status(10) = -1
-      endif
-      status(11) = igraphtype
-      status(12) = iprinttype
-      status(13) = iintype
-      status(14) = iout
-      if (online) then
-	status(15) = 1
-      else
-	status(15) = -1
-      endif
-      if (dolog) then
-	status(16) = 1
-      else
-	status(16) = -1
-      endif
-      if (graphon) then
-	status(17) = 1
-      else
-	status(17) = -1
-      endif
-      if (erron) then
-	status(19) = 1
-      else
-	status(19) = -1
-      endif
-      status(20) = idebug
-      status(21) = showplot(curcur())
-      if (undoon) then
-	status(22) = 1
-      else
-	status(22) = -1
-      endif
-
-      status(23) = xmax0
-      status(24) = ymax0
-      status(25) = xorg(curcur())
-      status(26) = yorg(curcur())
-      status(27) = xmax(curcur())
-      status(28) = ymax(curcur())
-      status(29) = linelngth
-      status(30) = numline
-      status(31) = iglinex
-      status(32) = igliney
-c
-      return
-      end
-
diff -uNr 3.5/source/conline/shm_graph.c unipops-3.6/source/conline/shm_graph.c
--- 3.5/source/conline/shm_graph.c	2000-03-16 11:29:32.000000000 -0700
+++ unipops-3.6/source/conline/shm_graph.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,284 +0,0 @@
-/* @(#)shm_graph.c	5.2 07/08/94  
-* Shared memory routines for SunCore/SunView graphics
-*/
-
-# include <stdio.h>
-# include <sys/types.h>
-# include <sys/ipc.h>
-# include <sys/shm.h>
-# include <sys/sem.h>
-
-# define ARRAYSIZE 4096
-# define NUMCHAR 80
-# define BYTES 376836
-
-/* NUMCHAR = number of characters to be sent for CHAR graphics command
-*  ARRAYSIZE = number of graphics commands to send before doing a FLUSH (larger
-*              the better but not TOO much that huge amounts of memory are used)
-*  BYTES = number of bytes in shared memory = 
-*	   ARRAYSIZE*(NUMCHAR + 12) + 4
-*/ 
-
-/* ---------------------------------------------------------------
-* The following was lifted from IPC_MAC.H, created by Allen Farris and is
-* an easy-to-use set of shared memory functions
-*
-*
-* Define a key to be used for shared memory 
-* Define the shared memory id -- only one shared memory region allowed
-* Define errno
-*/
-
-static key_t shm_key;
-static int shm_id;
-extern int errno;
-
-/* Create shared memory */
-
-# define create_shm(SHMKEY,BYTES,RWFLAG) \
-	strncpy(((char *)&shm_key),SHMKEY,4); \
- 	shm_id = shmget(shm_key,BYTES,IPC_CREAT | RWFLAG); \
-	if (shm_id == -1) \
-	{ \
-		printf("Failure creating shared memory (%d)\n",errno); \
-		exit(-1); \
-	}
-
-/* Access shared memory that has already been created */
-
-# define access_shm(SHMKEY,BYTES,RWFLAG) \
-	strncpy(((char *)&shm_key),SHMKEY,4); \
-	shm_id = shmget(shm_key,BYTES,RWFLAG); \
-	if (shm_id == -1) \
-	{ \
-		printf("Failure acessing shared memory (%d)\n",errno); \
-		exit(-1); \
-	}
-
-/* Attach shared memory -- returns address of shared memory or -1 */
-
-# define attach_shm(SHMADDR) \
-	shmat(shm_id,0,0)
-
-/* Deallocate shared memory */
-
-struct shmid_ds shmem;
-# define destroy_shm() \
-	if (shmctl(shm_id, IPC_STAT, &shmem) == -1) \
-	{ \
-		printf("Could not deallocate shared memory\n"); \
-		exit(-1); \
-	} \
-	if (shmctl(shm_id, IPC_RMID, &shmem) == -1) \
-	{ \
-		printf("Could not deallocate shared memory\n"); \
-		exit(-1); \
-	}
-
-/*  That is it for Allen's stuff -- Now for my creations 
-* ---------------------------------------------------------------
-*/
-
-/* The shared memory structure used by UniPOPS and the Graphiuucs process 
-* FLAG = the number of elements used in shared memory
-* COMMAND = the graphics commands 1=PLACE, 2=VCTR, 10=CHAR
-* POS1, POS2 = X,Y plot positions for PLACE and VCTR
-* BUFFER = character string for CHAR
-*/
-
-typedef struct shared_memory_structure
-{
-        long int flag;
-	long int command[ARRAYSIZE];
-	long int pos1[ARRAYSIZE];
-	long int pos2[ARRAYSIZE];
-	char buffer[ARRAYSIZE][NUMCHAR];
-} ShmGraph;
-
-
-ShmGraph *shm;
-
-/* R/WNEXT_LOC = the location in shared memory where to read or write next */
-
-long int rnext_loc, wnext_loc;
-
-
-createshm2_(memname, len)
-
-/* Creates Shared memory -- Called by UniPOPS */
-
-long int len;
-char *memname;
-
-{
-
-	create_shm(memname,BYTES,IPC_CREAT | 0644);
-	shm = (ShmGraph *) (attach_shm(0));
-        if (shm == (ShmGraph *)(-1)) {
-           printf("Failure attaching shared memory (%d)\n",errno);
-           exit(-1);
-        }
-	wnext_loc = 0;
-
-}
-
-writeshm2_(cmnd, pos1, pos2, string, len)
-
-/* Writes graphics commands and strings to shared memory -- Used by UniPOPS */
-
-char *string;
-long int len, *cmnd, *pos1, *pos2;
-
-{
-	wnext_loc = shm->flag;
-        shm->command[wnext_loc] = *cmnd;
-	shm->pos1[wnext_loc] = *pos1;
-	shm->pos2[wnext_loc] = *pos2;
-	if (*cmnd >= 10) strncpy(shm->buffer[wnext_loc], string, NUMCHAR);
-	shm->flag = wnext_loc + 1;
-/*      Update shared memory and bump the WNEXT_LOC pointer */
-
-	if (shm->flag >= ARRAYSIZE) coreflush_();
-/*	Tell the Graphics process to start using the contents of shared memory
-*	Wait till the process uses all of the contents of shared memory
-*/
-}
-
-destroyshm2_()
-
-/* Destroys the shared memory -- Called by UniPOPS */
-
-{
-	destroy_shm();
-
-}
-
-accessshm_(memname, len)
-
-/* Access shared memory -- Used by Graphics process and not UniPOPS */
-
-char *memname;
-long int len;
-
-{
-	access_shm(memname, BYTES, 0644);
-	shm = (ShmGraph *) (attach_shm(0));
-        if (shm == (ShmGraph *)(-1)) {
-           printf("Failure attaching shared memory (%d)\n",errno);
-           exit(-1);
-        }
-	rnext_loc = 0;
-
-}
-
-long int readshm2_(cmnd, pos1, pos2, string, len)
-
-/* Read shared memory -- Used by Graphics process and not UniPOPS */
-
-char *string;
-long int *cmnd, *pos1, *pos2, len;
-
-{
-	if (rnext_loc >= shm->flag) 
-	{
-	    rnext_loc = 0;
-	    shm->flag = 0;
-	}
-/* Checks whether the full contents of the shared memory arrays have been used */
-	else
-	{
-	    *cmnd = shm->command[rnext_loc];
-	    *pos1 = shm->pos1[rnext_loc];
-	    *pos2 = shm->pos2[rnext_loc];
-	    if (*cmnd >= 10) strncpy(string, shm->buffer[rnext_loc], NUMCHAR);
-	    rnext_loc++;
-	}
-/* Gets the commands, positions, strings from shared memory -- bump the 
-* read pointer
-*/
-
-	return(shm->flag);
-
-}
-
-long int getnextloc_()
-
-/* Finds out if there is anything in shared memory -- Used by UniPOPS */
-
-{
-	return(shm->flag);
-}
-
-resetshm_()
-
-/* Clears the flags in shm  */
-
-{
-	shm->flag = 0;
-}
-
-/*   Reads and writes to named pipes */
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-
-readfifo_(id, irtn, string, len)
-
-char *string;
-long int len, *irtn, *id;
-
-{
-	char input;
-	int i;
-
-	for (i = 0; i < len; i++)  {
-	   *irtn = read(*id, &input, 1);
-	   if (*irtn < 0) perror("readfifo");
-	   if (input == '\n' || *irtn < 0) break;
-	   string[i] = input;
-	}
-}
-
-writefifo_(id, irtn, string, len)
-
-char *string;
-long int len, *irtn, *id;
-
-{
-
-	*irtn = write(*id,string,len);
-	if (*irtn < 0) perror("writefifo");
-	*irtn = write(*id,"\n",1);
-	if (*irtn < 0) perror("writefifo");
-
-}
-
-openread_(irtn, string, len)
-
-char *string;
-long int len, *irtn;
-
-{
-	*irtn = open(string, O_RDONLY);
-	if (*irtn < 0) perror("openread");
-}
-
-
-openwrite_(irtn, string, len)
-
-char *string;
-long int len, *irtn;
-
-{
-	*irtn = open(string, O_WRONLY);
-	if (*irtn < 0) perror("openwrite");
-}
-closefifo_(ifd, irtn)
-
-long int *irtn, *ifd;
-
-{
-	*irtn = close(*ifd);
-	if (*irtn < 0) perror("closewrite (close)");
-}
diff -uNr 3.5/source/conline/smooth.f unipops-3.6/source/conline/smooth.f
--- 3.5/source/conline/smooth.f	2000-03-16 11:33:35.000000000 -0700
+++ unipops-3.6/source/conline/smooth.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,38 +0,0 @@
-      SUBROUTINE SMOOTH (TWH,ISTART,ISTOP,WGT,N,WORK)
-C-------------------------------------------------------------------------------
-C  @(#)smooth.f	5.1 06/22/94
-C-----------------------------------------------------------------------
-C        SMOOTH convolves the input data (TWH) from ISTART to ISTOP
-C     with the  weighting function found in WGTS.
-C-----------------------------------------------------------------------
-      integer*2 istart, istop, n, i, ib, ie, ic, j
-      REAL TWH(*), WGT(*), twt, sum, rinfinity
-      real*4 WORK(*)
-      logical okreal4
-c
-      IB = ISTART
-      IE = ISTOP  - (N-1)
-      IC=N/2
-      DO 20 I=IB,IE
-         SUM = 0.
-	 twt = 0.0
-         DO 10 J=1,N
-            if(okreal4(twh(i+j-1))) then
-		SUM = SUM + WGT(J)*TWH(I+J-1)
-		twt = twt + wgt(j)
-	    endif
-   10       CONTINUE
-         if (twt .gt. 0.0) then
-		WORK(I+IC)=SUM/twt
-	 else
-		work(i+ic)=rinfinity()
-	 endif
-   20    CONTINUE
-      IB=IB+IC
-      IE=IE+IC
-      DO 40 I =IB,IE
-         if (okreal4(twh(i))) TWH(I)=WORK(I)
-   40    CONTINUE
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/sread.f unipops-3.6/source/conline/sread.f
--- 3.5/source/conline/sread.f	2000-03-16 11:33:48.000000000 -0700
+++ unipops-3.6/source/conline/sread.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,2648 +0,0 @@
-
-c
-c     @(#)srw.F	5.1 06/22/94
-c
-      subroutine sread(infmt, string)
-c
-c     Takes the stack of adverbs and reads values for them from STRING 
-c     using the format statement INFMT
-c
-
-c
-      character*(*) infmt
-c
-
-c
-      character*(*) string
-c
-
-c
-      integer*2 stkptr, i0, i1, i2, i3, numchar, ioutst, lastblnk,
-     .		numstring, nsize, tag, type, i, ier, itmpstring(30),
-     .		nfield, inum, iwpr, fdefault, idefault, ldefault,
-     .		stck(40), maxstck, top, ssize, irpt, m1,
-     .		i0level0, inumlevel0, n373, n374 
-      integer*4 ivalue
-      character*60 tmpstring, frmt
-      character*8 pms
-      character*6 frmt2, snum
-      character*4 bms
-      character*1 lc1, c1, c2
-      logical test, pushcmp, popcmp, left, right
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (fdefault = 15)
-      parameter (idefault = 12)
-      parameter (ldefault = 2)
-c     Default field widths for F, I, and L formats.
-c
-      parameter (maxstck = 20)
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      if (lastblnk(infmt) .eq. 0) call oerror(n373, m1, 'Empty format')
-c
-      stkptr = sp0
-      i0 = 1
-      numchar = len(infmt)
-      numstring = len(string)
-      ioutst = 1
-      inum = 0
-      pms = '    '
-      bms = '    '
-      frmt2 = '(a)'
-      nsize = 0
-      top = 0
-      i0level0 = 1
-      inumlevel0 = 0
-      do 1 i1 = 1, maxstck
-	stck(i1) = 0
-1	continue
-c
-
-c
-10    if (i0 .gt. numchar .and. stkptr .le. sp) then
-c
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-c
-
-	call oerror(n373, m1, 'Format exhausted')
-
-c
-      else if (i0 .gt. numchar) then
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-
-	return
-      else
-        lc1 = infmt(i0:i0)
-	call uppercase(lc1, c1)
-      endif
-c
-c------
-      if (ichar(c1).le.32 .or. ichar(c1).ge.128 .or. c1.eq.',') then
-	i0 = i0 + 1
-c	Skip all blanks, commas, non-printable characters between fields
-c
-c------
-      else if (lle(c1,'9') .and. lge(c1,'0') .or. c1 .eq. '-' ) then
-c	We have a number begining a field; parse the number until you get
-c	to a non-number and then set up INUM.  Probably a
-c	repeat count or a scale factor for 'P'.
-c
-	i1 = i0
-	i2 = i0 + 1
-20	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 20
-	  endif
-	else
-	  call oerror(n373, m1, 'Format exhausted')
-        endif
-	if (c1 .eq. '-' .and. i1+1 .eq. i2) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-c	Must have a digit after the minus sign.
-c
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. 'P') then
-c	We have a P scale factor; set up PMS and reset the repeat-count
-c
-	write(snum,'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	pms = snum // 'P' // ','
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-
-      else if (c1 .eq. 'B') then
-c	We have a B scale factor; set up PMS
-c
-	if (inum .ne. 0) 
-     .	   call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'Z' .or. c2 .eq. 'z' .or.
-     .	      c2 .eq. 'N' .or. c2 .eq. 'n') then
-	     i2 = i2 + 1
-	  else
-	     c2 = ' '
-	  endif
-        endif
-	bms = 'B' // c2 // ', '
-	i0 = i2
-c
-c------
-
-      else if (c1 .eq. '(' ) then
-c	We have an open parenthesis; push the location of the ( in INFMT and
-c	the current repeat count onto the stack.
-c
-	if (top .eq. 0) then
-	   i0level0 = i0
-	   inumlevel0 = inum
-	endif
-c	Save level zero repeat count
-c
-     	if (.not. pushcmp(stck, top, maxstck, i0) .or.
-     .	    .not. pushcmp(stck, top, maxstck, max(1,inum) ) )
-     .	    call oerror(n373, m1, 'Too many ( in format')
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. ')' ) then
-c	We have a close parenthesis; get the repeat count for the (..) and
-c	the location in INFMT of the (.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-     	if (.not. popcmp(stck, top, irpt) .or. .not. popcmp(stck, top, i1) ) 
-     .		call oerror(n373, m1, 'Too many )''s ')
-	if (irpt .gt. 1) then
-     	   if (.not. pushcmp(stck, top, maxstck, i1) .or.
-     .	       .not. pushcmp(stck, top, maxstck, max(1,irpt-1) ) )
-     .	       call oerror(n373, m1, 'Too many )''s or (''s')
-	   i0 = i1
-c	   We have NOT completed the repeat count for the opening (
-c	   so we may have to again repeat this (...). Pop I0 and push it 
-c	   back onto the stack; push a decremented count back onto the stack.
-c 
-	endif
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'X') then
-c	We have an 'X' format.  If no repeat count, assume 1 and then
-c	add blanks to the output string.
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	if (inum .eq. 0) inum = 1
-        if (ioutst + inum - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	ioutst = ioutst + inum
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'T') then	
-c	We have a 'T' format.  
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	left = .false.
-	right = .false.
-	i1 = i0 + 1
-	i2 = i1
-30	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 30
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'L' .or. c2 .eq. 'l') .and. i2 .eq. i1) then
-	     left = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'R' .or. c2 .eq. 'r') .and. i2 .eq. i1) then
-	     right = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  endif
-        endif
-	if (i2 .eq. i1) call oerror(n373, m1, 'Incomplete T format')
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield  
-	if (ier .ne. 0 .or. nfield .le. 0 .or. nfield .gt. numstring) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c	Parse column number
-c
-	if (left) then
-	   ioutst = max(1,ioutst - nfield)
-	else if (right) then
-	   ioutst = ioutst + nfield
-	else
-	   ioutst = nfield
-	endif
-      	if (ioutst .gt. numstring) call oerror(n374, m1, 'End of record')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. ':') then
-c	We have a termination control :
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-
-        if (stkptr .gt. sp) return
-
-	i0 = i0 + 1
-c
-c------
-
-c
-c------
-
-      else if (c1 .eq. 'A') then
-c	We have an 'A' format.  Check for and parse field width, if
-c	any.  Check that next thing to be printed is a string or
-c	string adverb.  If so, check its size to that of the optional
-c	filed width.  Then place value of string/adverb
-c	into STRING and increment IOUT.  Do this for the specified repeat
-c	count.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-50	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 50
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 50
-	  endif
-        endif
-	if (i2 .ne. i1) then
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-	else
-	   nfield = 0
-	endif
-	do 55 i = 1, max(1,inum)
-
-           if (stkptr .gt. sp) return
-
-	   if ( stkptr+3 .gt. sp .or. ( stack(stkptr+3) .ne. 3 .or. 
-     .         (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) 
-     .	       	call oerror(n373, m1, 'Incompatable format')
-c
-	   type = stack(stkptr)
-
-           if (type .eq. 7) then
-	      ssize=iwpr(stack(stkptr+1))
-	   else
-	      call oerror(n373, m1, 'Incompatable format')
-	   endif
-
-           tag=stack(stkptr+2)
-           stkptr=stkptr+4
-	   if (nfield .eq. 0) nfield = 2*ssize
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	   tmpstring = string(ioutst:ioutst+nfield-1)
-	   call copy( ssize, itmpstring, c(tag))
-
-	   ioutst = ioutst + nfield
-55	   continue
-	i0 = i2
-	inum = 0
-c
-c------
-      else if (c1 .eq. 'F' .or. c1 .eq. 'G' .or. c1 .eq. 'E' .or. 
-     .	       c1 .eq. 'L' .or. c1 .eq. 'I' .or. c1 .eq. 'D') then	
-c	We have an 'E, F, I, L, or G' format.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-60	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 60
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 60
-	  endif
-        endif
-c	Parse field width
-c
-	if (i2 .eq. i1) then
-	   if (c1 .eq. 'I') then
-	     nfield = idefault
-	   else if (c1 .eq. 'L') then
-	     nfield = ldefault
-	   else
-	     nfield = fdefault
-	   endif
-	   i3 = i2
-c	   Set default field width
-c
-	else 
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c
-	   if (c1 .eq. 'L' .or. c2 .ne. '.') then
-	      i3 = i2
-	   else
-	      i3 = i2 + 1
-62	      if (i3 .le. numchar) then
-	  	c2 = infmt(i3:i3)
-	  	if ( (lle(c2,'9') .and. lge(c2,'0')) .or.
-     .		     c2 .eq. '.'  .or. c2 .eq. 'e' .or. c2 .eq. 'E') then
-	     	  i3 = i3 + 1
-	     	  goto 62
-	  	endif
-	      endif
-	      if (i3 .eq. i2 + 1) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	   endif
-	endif
-c	Parse field width and # sig. digits.
-c  
-	frmt = '(' // pms // bms // infmt(i0:i3-1) // ')'
-c	Create format statement out of the above pieces
-c
-	do 65 i = 1, max(1,inum)
-
-            if (stkptr .gt. sp) return
-
-      	    if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	    tmpstring = string(ioutst:ioutst+nfield-1)
-	    if (c1 .eq. 'I') then
-		read(tmpstring,fmt=frmt,iostat=ier) ivalue
-		value = ivalue
-	    else if (c1 .eq. 'L') then
-		read(tmpstring,fmt=frmt,iostat=ier) test
-		if (test) then
-		  value = c(true)
-		else
-		  value = c(false)
-		endif
-	    else
-		read(tmpstring,fmt=frmt,iostat=ier) value
-	    endif
-	    if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad format specification')
-c
-	    if ((stkptr+3 .gt. sp) .or. 
-     .    	    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     	    (stack(stkptr+3) .ne. 3 .or. 
-     .        	    (stack(stkptr) .ne. 7 .and. 
-     .		     stack(stkptr) .ne. 14)) ) ) then
-c		   We have a scalar!
-c
-	   	tag = stack(stkptr)
-		c(tag) = value
-         	stkptr=stkptr+1
-	    else
-c		We have an array!!
-c
-		if (nsize .le. 0) then
-c		   We aren't trying to complete an array
-c
-	 	   type = stack(stkptr)
-        	   nsize=stack(stkptr+1)
-        	   tag=stack(stkptr+2)
-        	   if (type.ne. 2) call oerror(n373, m1, 'Incompatable format')
-	        endif
-		c(tag) = value
-		tag = tag + 1
-		nsize = nsize - 1
-		if (nsize .eq. 0) stkptr = stkptr + 4
-	    endif
-c
-
-	    ioutst = ioutst + nfield
-65	    continue
-	i0 = i3
-	inum = 0
-c
-c------
-      else
-	call oerror(n373, m1, 'Bad format specification')
-      endif
-c
-      goto 10
-c
-
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-
-
-c
-      subroutine usread(string)
-c
-c     Takes the stack of adverbs and reads values for them from STRING 
-c     using list-directed IO
-c
-
-c
-
-c
-      character*(*) string
-c
-
-c
-      integer*2 stkptr, ioutst, numstring, tag, type, i1, lastblnk,
-     .		itmpstring(60), nfield, iwpr, nsize, m1, ssize,
-     .		i2, i3, i4, n373, n374
-      character*120 tmpstring
-      character*1 c1
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      stkptr = sp0
-      numstring = len(string)
-      nsize = 0
-c
-
-c
-      ioutst = 1
-c
-2400  continue
-c
-      if (stkptr .gt. sp) return
-c
-      tmpstring = string(ioutst:)
-c
-      if ((stkptr+3 .gt. sp) .or. 
-     .    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     (stack(stkptr+3) .ne. 3 .or. 
-     .     (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) ) then
-c	we have a scalar!
-c
-	type = 1
-	nsize = 0
-	tag = stack(stkptr)
-	nfield = 1
-	call getnum(tmpstring,nfield,value)
-
-	if (nfield .ge. len(tmpstring)) call oerror(n374, m1, 'Empty record')
-
- 	nfield = nfield - 1
-       if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	c(tag) = value
-	stkptr = stkptr + 1
-	ioutst = ioutst + nfield
-c
-      else
-c
-c       an array or string
-c
-        if (nsize .le. 0) then
-c	   we aren't trying to complete an array
-c
-	   type=stack(stkptr)
-           nsize=stack(stkptr+1)
-           tag=stack(stkptr+2)
-	endif
-c
-        if (type.eq.2) then
-c
-c       We have an array
-c
-	   nfield = 1
-	   call getnum(tmpstring,nfield,value)
-
-	   if (nfield .ge. len(tmpstring)) call oerror(n374, m1, 'Empty record')
-
-	   nfield = nfield - 1
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   c(tag) = value
-	   tag = tag + 1
-	   nsize = nsize - 1
-	   if (nsize .eq. 0) stkptr = stkptr + 4
-	   ioutst = ioutst + nfield
-
-	else 
-c	We have a string or literal constant
-c
-	   i3 = lastblnk(tmpstring)
-
-	   if (i3 .eq. 0) call oerror(n374, m1, 'Empty record') 
-
-c
-	   do 2401 i1 = 1, i3
-		if (tmpstring(i1:i1) .ne. ' ') goto 2402
-2401		continue
-	   i1 = i3
-2402	   tmpstring = tmpstring(i1:)
-	   i1 = i1 - 1
-	   if (tmpstring(1:1) .eq. '''' .or. tmpstring(1:1) .eq. '"') then
-		c1 = tmpstring(1:1)
-		tmpstring = tmpstring(2:)
-		i3 = 2
-		i4 = 1
-2403		i2 = index(tmpstring(i4:), c1) + i4 - 1
-		if (i2 .eq. i4 - 1) call oerror(n374, m1, 'End of record')
-		if (tmpstring(i2+1:i2+1) .eq. c1) then
-			tmpstring(i2+1:) = tmpstring(i2+2:)
-			i3 = i3 + 1
-			i4 = i2 + 1
-			goto 2403
-		endif
-		tmpstring(i2:) = ' '
-c		Take care of strings surrounded by quotes; be wary of 
-c		double quotes
-c
-	   else
-		i3 = 0
-	        i2 = index(tmpstring, ' ')
-	        if (i2 .ne. 0) tmpstring(i2:) = ' '
-c		Takes care of strings not begun with quotes; the next blank
-c		signals end of string.
-c
-	   endif
-c	   i1 = # blanks precceding string, i2 = # chars in string; i3 =
-c		number of quotation marks that didn't get into final string.
-c
-	   if (type .eq. 7) then
-	     ssize = iwpr(nsize)
-	   else
-	     call oerror(n374, m1, ' ')
-	   endif
-	   nfield = i2 + i1 + i3
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   call copy( ssize, itmpstring, c(tag))
-	   nsize = 0
-	   stkptr = stkptr + 4
-	   ioutst = ioutst + nfield
-c
-	endif
-      endif
-c
-      goto 2400
-c
-
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-c
-      subroutine swrite(infmt, string)
-c
-c     Takes the stack of adverbs and prints them out into STRING 
-c     using the format statement INFMT
-c
-
-c
-      character*(*) infmt
-c
-
-c
-      character*(*) string
-c
-
-c
-      integer*2 stkptr, i0, i1, i2, i3, numchar, ioutst, lastblnk,
-     .		numstring, nsize, tag, type, i, ier, itmpstring(30),
-     .		nfield, inum, iwpr, fdefault, idefault, ldefault,
-     .		stck(40), maxstck, top, ssize, irpt, m1,
-     .		i0level0, inumlevel0, n373, n374 
-      integer*4 ivalue
-      character*60 tmpstring, frmt
-      character*8 pms
-      character*6 frmt2, snum
-      character*4 bms
-      character*1 lc1, c1, c2
-      logical test, pushcmp, popcmp, left, right
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (fdefault = 15)
-      parameter (idefault = 12)
-      parameter (ldefault = 2)
-c     Default field widths for F, I, and L formats.
-c
-      parameter (maxstck = 20)
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      if (lastblnk(infmt) .eq. 0) call oerror(n373, m1, 'Empty format')
-c
-      stkptr = sp0
-      i0 = 1
-      numchar = len(infmt)
-      numstring = len(string)
-      ioutst = 1
-      inum = 0
-      pms = '    '
-      bms = '    '
-      frmt2 = '(a)'
-      nsize = 0
-      top = 0
-      i0level0 = 1
-      inumlevel0 = 0
-      do 1 i1 = 1, maxstck
-	stck(i1) = 0
-1	continue
-c
-
-      string = ' '
-
-c
-10    if (i0 .gt. numchar .and. stkptr .le. sp) then
-c
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-c
-
-	call oerror(n373, m1, 'Format exhausted')
-
-c
-      else if (i0 .gt. numchar) then
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-
-	return
-      else
-        lc1 = infmt(i0:i0)
-	call uppercase(lc1, c1)
-      endif
-c
-c------
-      if (ichar(c1).le.32 .or. ichar(c1).ge.128 .or. c1.eq.',') then
-	i0 = i0 + 1
-c	Skip all blanks, commas, non-printable characters between fields
-c
-c------
-      else if (lle(c1,'9') .and. lge(c1,'0') .or. c1 .eq. '-' ) then
-c	We have a number begining a field; parse the number until you get
-c	to a non-number and then set up INUM.  Probably a
-c	repeat count or a scale factor for 'P'.
-c
-	i1 = i0
-	i2 = i0 + 1
-20	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 20
-	  endif
-	else
-	  call oerror(n373, m1, 'Format exhausted')
-        endif
-	if (c1 .eq. '-' .and. i1+1 .eq. i2) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-c	Must have a digit after the minus sign.
-c
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. 'P') then
-c	We have a P scale factor; set up PMS and reset the repeat-count
-c
-	write(snum,'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	pms = snum // 'P' // ','
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-
-      else if (c1 .eq. 'S') then
-c	We have a S scale factor; set up PMS
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'P' .or. c2 .eq. 'p' .or.
-     .	      c2 .eq. 'S' .or. c2 .eq. 's') then
-	     i2 = i2 + 1
-	  else
-	     c2 = ' '
-	  endif
-        endif
-	bms = 'S' // c2 // ', '
-	i0 = i2
-c
-c------
-
-      else if (c1 .eq. '(' ) then
-c	We have an open parenthesis; push the location of the ( in INFMT and
-c	the current repeat count onto the stack.
-c
-	if (top .eq. 0) then
-	   i0level0 = i0
-	   inumlevel0 = inum
-	endif
-c	Save level zero repeat count
-c
-     	if (.not. pushcmp(stck, top, maxstck, i0) .or.
-     .	    .not. pushcmp(stck, top, maxstck, max(1,inum) ) )
-     .	    call oerror(n373, m1, 'Too many ( in format')
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. ')' ) then
-c	We have a close parenthesis; get the repeat count for the (..) and
-c	the location in INFMT of the (.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-     	if (.not. popcmp(stck, top, irpt) .or. .not. popcmp(stck, top, i1) ) 
-     .		call oerror(n373, m1, 'Too many )''s ')
-	if (irpt .gt. 1) then
-     	   if (.not. pushcmp(stck, top, maxstck, i1) .or.
-     .	       .not. pushcmp(stck, top, maxstck, max(1,irpt-1) ) )
-     .	       call oerror(n373, m1, 'Too many )''s or (''s')
-	   i0 = i1
-c	   We have NOT completed the repeat count for the opening (
-c	   so we may have to again repeat this (...). Pop I0 and push it 
-c	   back onto the stack; push a decremented count back onto the stack.
-c 
-	endif
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'X') then
-c	We have an 'X' format.  If no repeat count, assume 1 and then
-c	add blanks to the output string.
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	if (inum .eq. 0) inum = 1
-        if (ioutst + inum - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	string(ioutst:ioutst+inum-1) = ' '
-
-	ioutst = ioutst + inum
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'T') then	
-c	We have a 'T' format.  
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	left = .false.
-	right = .false.
-	i1 = i0 + 1
-	i2 = i1
-30	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 30
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'L' .or. c2 .eq. 'l') .and. i2 .eq. i1) then
-	     left = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'R' .or. c2 .eq. 'r') .and. i2 .eq. i1) then
-	     right = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  endif
-        endif
-	if (i2 .eq. i1) call oerror(n373, m1, 'Incomplete T format')
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield  
-	if (ier .ne. 0 .or. nfield .le. 0 .or. nfield .gt. numstring) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c	Parse column number
-c
-	if (left) then
-	   ioutst = max(1,ioutst - nfield)
-	else if (right) then
-	   ioutst = ioutst + nfield
-	else
-	   ioutst = nfield
-	endif
-      	if (ioutst .gt. numstring) call oerror(n374, m1, 'End of record')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. ':') then
-c	We have a termination control :
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-
-        if (stkptr .gt. sp) return
-
-	i0 = i0 + 1
-c
-c------
-
-c
-c------
-
-      else if (c1 .eq. 'H') then
-c	We have a holerith field.  Look for closing ", making sure
-c	to skip all double quotes.  Add to STRING the contents of the
-c	holerith (skiping over start/end ").  Error if no closing quote.
-c
-	if (inum .le. 0) call oerror(n373, m1, 'Bad H format')
-	i1 = i0 + 1
-	i2 = i1 + inum
-	if (i2 .gt. numchar) call oerror(n373, m1, 'Format exhausted')
-        if (ioutst + i2 - i1 - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+i2-i1-1) = infmt(i1:i2-1)
-	ioutst = ioutst + i2 - i1
-	i0 = i2 + 1
-c
-c------
-      else if (c1 .eq. '"' .or. c1 .eq. '''') then
-c	We have a " or ' holerith field.  Look for closing ", making sure
-c	to skip all double quotes.  Add to STRING the contents of the
-c	holerith (skiping over start/end ").  Error if no closing quote.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-	i3 = 0
-	tmpstring = infmt(i1:)
-40	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .ne. c1) then
-	     i2 = i2 + 1
-	     goto 40
-	  else if (c2 .eq. c1 .and. i2+1 .lt. numchar .and. 
-     .             infmt(i2+1:i2+1) .eq. c1 ) then
-	     tmpstring(i2 - i1 + 1:) = tmpstring(i2 - i1 + 2:)
-	     i3 = i3 + 1
-	     i2 = i2 + 2
-	     goto 40
-	  endif
-	else
-	     call oerror(n373, m1, 'No closing quote')
-	endif
-        if (ioutst + i2 - i1 - 1 - i3 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+i2-i1-1-i3) = tmpstring
-	ioutst = ioutst + i2 - i1
-	i0 = i2 + 1
-c
-c------
-
-      else if (c1 .eq. 'A') then
-c	We have an 'A' format.  Check for and parse field width, if
-c	any.  Check that next thing to be printed is a string or
-c	string adverb.  If so, check its size to that of the optional
-c	filed width.  Then place value of string/adverb
-c	into STRING and increment IOUT.  Do this for the specified repeat
-c	count.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-50	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 50
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 50
-	  endif
-        endif
-	if (i2 .ne. i1) then
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-	else
-	   nfield = 0
-	endif
-	do 55 i = 1, max(1,inum)
-
-           if (stkptr .gt. sp) return
-
-	   if ( stkptr+3 .gt. sp .or. ( stack(stkptr+3) .ne. 3 .or. 
-     .         (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) 
-     .	       	call oerror(n373, m1, 'Incompatable format')
-c
-	   type = stack(stkptr)
-
-           if (type .eq. 7) then
-	      ssize=iwpr(stack(stkptr+1))
-	   else
-	      ssize = stack(stkptr+1)
-	   endif
-
-           tag=stack(stkptr+2)
-           stkptr=stkptr+4
-	   if (nfield .eq. 0) nfield = 2*ssize
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	   call copy( ssize, c(tag), itmpstring)
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:2*ssize)
-
-	   ioutst = ioutst + nfield
-55	   continue
-	i0 = i2
-	inum = 0
-c
-c------
-      else if (c1 .eq. 'F' .or. c1 .eq. 'G' .or. c1 .eq. 'E' .or. 
-     .	       c1 .eq. 'L' .or. c1 .eq. 'I' .or. c1 .eq. 'D') then	
-c	We have an 'E, F, I, L, or G' format.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-60	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 60
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 60
-	  endif
-        endif
-c	Parse field width
-c
-	if (i2 .eq. i1) then
-	   if (c1 .eq. 'I') then
-	     nfield = idefault
-	   else if (c1 .eq. 'L') then
-	     nfield = ldefault
-	   else
-	     nfield = fdefault
-	   endif
-	   i3 = i2
-c	   Set default field width
-c
-	else 
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c
-	   if (c1 .eq. 'L' .or. c2 .ne. '.') then
-	      i3 = i2
-	   else
-	      i3 = i2 + 1
-62	      if (i3 .le. numchar) then
-	  	c2 = infmt(i3:i3)
-	  	if ( (lle(c2,'9') .and. lge(c2,'0')) .or.
-     .		     c2 .eq. '.'  .or. c2 .eq. 'e' .or. c2 .eq. 'E') then
-	     	  i3 = i3 + 1
-	     	  goto 62
-	  	endif
-	      endif
-	      if (i3 .eq. i2 + 1) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	   endif
-	endif
-c	Parse field width and # sig. digits.
-c  
-	frmt = '(' // pms // bms // infmt(i0:i3-1) // ')'
-c	Create format statement out of the above pieces
-c
-	do 65 i = 1, max(1,inum)
-
-            if (stkptr .gt. sp) return
-
-      	    if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	    if ((stkptr+3 .gt. sp) .or. 
-     .    	    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     	    (stack(stkptr+3) .ne. 3 .or. 
-     .        	    (stack(stkptr) .ne. 7 .and. 
-     .		     stack(stkptr) .ne. 14)) ) ) then
-c		   We have a scalar!
-c
-		value = sngl(v(stkptr))
-         	stkptr=stkptr+1
-	    else
-c		We have an array!!
-c
-		if (nsize .le. 0) then
-c		   We aren't trying to complete an array
-c
-	 	   type = stack(stkptr)
-        	   nsize=stack(stkptr+1)
-        	   tag=stack(stkptr+2)
-        	   if (type.ne. 2) call oerror(n373, m1, 'Incompatable format')
-	        endif
-		value = c(tag)
-		tag = tag + 1
-		nsize = nsize - 1
-		if (nsize .eq. 0) stkptr = stkptr + 4
-	    endif
-c
-	    if (c1 .eq. 'I') then
-		ivalue = value
-		write(tmpstring,fmt=frmt,iostat=ier) ivalue
-	    else if (c1 .eq. 'L') then
-		if (value .gt. 0.) then
-		  test = .true.
-		else
-		  test = .false.
-		endif
-		write(tmpstring,fmt=frmt,iostat=ier) test
-	    else
-		write(tmpstring,fmt=frmt,iostat=ier) value
-	    endif
-c
-	    if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	    string(ioutst:ioutst+nfield-1) = tmpstring
-
-	    ioutst = ioutst + nfield
-65	    continue
-	i0 = i3
-	inum = 0
-c
-c------
-      else
-	call oerror(n373, m1, 'Bad format specification')
-      endif
-c
-      goto 10
-c
-
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-c
-      subroutine uswrite(string)
-c
-c     Takes the stack of adverbs and prints them out into STRING 
-c     using list-directed IO
-c
-
-c
-
-c
-      character*(*) string
-c
-
-c
-      integer*2 stkptr, ioutst, lastblnk, numstring, tag, type, ier,
-     .		itmpstring(30), nfield, iwpr, nsize, ssize,  m1, n373,
-     .		 n374 
-      character*60 tmpstring
-      character*16 dfltfmt
-      character*8 frmt2
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-      include 'cio.inc'
-c
-      equivalence (itmpstring, tmpstring)
-
-c
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      stkptr = sp0
-      numstring = len(string)
-      ioutst = 1
-      dfltfmt = prntfmt
-      string = ' '
-      frmt2 = '(1x,a)'
-      nsize = 0
-c
-2400  continue
-c
-
-      if (stkptr .gt. sp) return
-
-c
-      if ((stkptr+3 .gt. sp) .or. 
-     .    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     (stack(stkptr+3) .ne. 3 .or. 
-     .     (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) ) then
-c	we have a scalar!
-c
-	type = 1
-	nsize = 0
-	tag = stack(stkptr)
-	value = v(stkptr)
-	write(tmpstring,dfltfmt,iostat=ier) value
-	if (ier .ne. 0) call oerror(n373, m1, 'Bad Format specification')
-	nfield = lastblnk(tmpstring)+1
-
-        if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	ioutst = ioutst + nfield
-	stkptr = stkptr + 1
-c
-      else
-c
-c       an array or string
-c
-        if (nsize .le. 0) then
-c	   we aren't trying to complete an array
-c
-	   type=stack(stkptr)
-           nsize=stack(stkptr+1)
-           tag=stack(stkptr+2)
-	endif
-c
-        if (type.eq.2) then
-c
-c       We have an array
-c
-	   value = c(tag)
-	   write(tmpstring,dfltfmt,iostat=ier) value
-	   if (ier .ne. 0) call oerror(n373, m1, 'Bad Format specification')
-	   nfield = lastblnk(tmpstring)+1
-
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	   ioutst = ioutst + nfield
-	   tag = tag + 1
-	   nsize = nsize - 1
-	   if (nsize .eq. 0) stkptr = stkptr + 4
-
-	else 
-c	We have a string or literal constant
-c
-	   if (type .eq. 7) then
-	     ssize = iwpr(nsize)
-	   else
-	     ssize = nsize
-	   endif
-	   nfield = 2*ssize+1
-
-	   nsize = 0
-	   stkptr = stkptr + 4
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   tmpstring = ' '
-	   call copy( ssize, c(tag), itmpstring)
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	   ioutst = ioutst + nfield
-c
-	endif
-      endif
-c
-c
-      goto 2400
-c
-
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-
-
-c
-      subroutine fread(infmt, unit)
-c
-c     Takes the stack of adverbs and reads values for them from UNIT 
-c     using the format statement INFMT
-c
-
-c
-      character*(*) infmt
-c
-
-c
-      integer*2 unit
-      character*5120 string
-c
-
-c
-      integer*2 stkptr, i0, i1, i2, i3, numchar, ioutst, lastblnk,
-     .		numstring, nsize, tag, type, i, ier, itmpstring(30),
-     .		nfield, inum, iwpr, fdefault, idefault, ldefault,
-     .		stck(40), maxstck, top, ssize, irpt, m1,
-     .		i0level0, inumlevel0, n373, n374 
-      integer*4 ivalue
-      character*60 tmpstring, frmt
-      character*8 pms
-      character*6 frmt2, snum
-      character*4 bms
-      character*1 lc1, c1, c2
-      logical test, pushcmp, popcmp, left, right
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (fdefault = 15)
-      parameter (idefault = 12)
-      parameter (ldefault = 2)
-c     Default field widths for F, I, and L formats.
-c
-      parameter (maxstck = 20)
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      if (lastblnk(infmt) .eq. 0) call oerror(n373, m1, 'Empty format')
-c
-      stkptr = sp0
-      i0 = 1
-      numchar = len(infmt)
-      numstring = len(string)
-      ioutst = 1
-      inum = 0
-      pms = '    '
-      bms = '    '
-      frmt2 = '(a)'
-      nsize = 0
-      top = 0
-      i0level0 = 1
-      inumlevel0 = 0
-      do 1 i1 = 1, maxstck
-	stck(i1) = 0
-1	continue
-c
-
-      read(unit,frmt2,err=900,end=800) string
-
-c
-10    if (i0 .gt. numchar .and. stkptr .le. sp) then
-c
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-c
-
-
-        read(unit,frmt2,err=900,end=800) string
-
-	i0 = i0level0
-	inum = inumlevel0
-c	Find rescan point from last level zero '(' or from start
-c	of format.
-c
-	ioutst = 1
-	goto 10
-c
-
-c
-      else if (i0 .gt. numchar) then
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-
-	return
-      else
-        lc1 = infmt(i0:i0)
-	call uppercase(lc1, c1)
-      endif
-c
-c------
-      if (ichar(c1).le.32 .or. ichar(c1).ge.128 .or. c1.eq.',') then
-	i0 = i0 + 1
-c	Skip all blanks, commas, non-printable characters between fields
-c
-c------
-      else if (lle(c1,'9') .and. lge(c1,'0') .or. c1 .eq. '-' ) then
-c	We have a number begining a field; parse the number until you get
-c	to a non-number and then set up INUM.  Probably a
-c	repeat count or a scale factor for 'P'.
-c
-	i1 = i0
-	i2 = i0 + 1
-20	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 20
-	  endif
-	else
-	  call oerror(n373, m1, 'Format exhausted')
-        endif
-	if (c1 .eq. '-' .and. i1+1 .eq. i2) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-c	Must have a digit after the minus sign.
-c
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. 'P') then
-c	We have a P scale factor; set up PMS and reset the repeat-count
-c
-	write(snum,'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	pms = snum // 'P' // ','
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-
-      else if (c1 .eq. 'B') then
-c	We have a B scale factor; set up PMS
-c
-	if (inum .ne. 0) 
-     .	   call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'Z' .or. c2 .eq. 'z' .or.
-     .	      c2 .eq. 'N' .or. c2 .eq. 'n') then
-	     i2 = i2 + 1
-	  else
-	     c2 = ' '
-	  endif
-        endif
-	bms = 'B' // c2 // ', '
-	i0 = i2
-c
-c------
-
-      else if (c1 .eq. '(' ) then
-c	We have an open parenthesis; push the location of the ( in INFMT and
-c	the current repeat count onto the stack.
-c
-	if (top .eq. 0) then
-	   i0level0 = i0
-	   inumlevel0 = inum
-	endif
-c	Save level zero repeat count
-c
-     	if (.not. pushcmp(stck, top, maxstck, i0) .or.
-     .	    .not. pushcmp(stck, top, maxstck, max(1,inum) ) )
-     .	    call oerror(n373, m1, 'Too many ( in format')
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. ')' ) then
-c	We have a close parenthesis; get the repeat count for the (..) and
-c	the location in INFMT of the (.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-     	if (.not. popcmp(stck, top, irpt) .or. .not. popcmp(stck, top, i1) ) 
-     .		call oerror(n373, m1, 'Too many )''s ')
-	if (irpt .gt. 1) then
-     	   if (.not. pushcmp(stck, top, maxstck, i1) .or.
-     .	       .not. pushcmp(stck, top, maxstck, max(1,irpt-1) ) )
-     .	       call oerror(n373, m1, 'Too many )''s or (''s')
-	   i0 = i1
-c	   We have NOT completed the repeat count for the opening (
-c	   so we may have to again repeat this (...). Pop I0 and push it 
-c	   back onto the stack; push a decremented count back onto the stack.
-c 
-	endif
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'X') then
-c	We have an 'X' format.  If no repeat count, assume 1 and then
-c	add blanks to the output string.
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	if (inum .eq. 0) inum = 1
-        if (ioutst + inum - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	ioutst = ioutst + inum
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'T') then	
-c	We have a 'T' format.  
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	left = .false.
-	right = .false.
-	i1 = i0 + 1
-	i2 = i1
-30	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 30
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'L' .or. c2 .eq. 'l') .and. i2 .eq. i1) then
-	     left = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'R' .or. c2 .eq. 'r') .and. i2 .eq. i1) then
-	     right = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  endif
-        endif
-	if (i2 .eq. i1) call oerror(n373, m1, 'Incomplete T format')
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield  
-	if (ier .ne. 0 .or. nfield .le. 0 .or. nfield .gt. numstring) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c	Parse column number
-c
-	if (left) then
-	   ioutst = max(1,ioutst - nfield)
-	else if (right) then
-	   ioutst = ioutst + nfield
-	else
-	   ioutst = nfield
-	endif
-      	if (ioutst .gt. numstring) call oerror(n374, m1, 'End of record')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. ':') then
-c	We have a termination control :
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-
-        if (stkptr .gt. sp) return
-
-	i0 = i0 + 1
-c
-c------
-
-      else if (c1 .eq. '/') then
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-
-        read(unit,'(a)',err=900,end=800) string
-
-	ioutst = 1
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. '$') then
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	frmt2 = '(a,$)'
-	i0 = i0 + 1
-
-c
-c------
-
-      else if (c1 .eq. 'A') then
-c	We have an 'A' format.  Check for and parse field width, if
-c	any.  Check that next thing to be printed is a string or
-c	string adverb.  If so, check its size to that of the optional
-c	filed width.  Then place value of string/adverb
-c	into STRING and increment IOUT.  Do this for the specified repeat
-c	count.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-50	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 50
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 50
-	  endif
-        endif
-	if (i2 .ne. i1) then
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-	else
-	   nfield = 0
-	endif
-	do 55 i = 1, max(1,inum)
-
-           if (stkptr .gt. sp) return
-
-	   if ( stkptr+3 .gt. sp .or. ( stack(stkptr+3) .ne. 3 .or. 
-     .         (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) 
-     .	       	call oerror(n373, m1, 'Incompatable format')
-c
-	   type = stack(stkptr)
-
-           if (type .eq. 7) then
-	      ssize=iwpr(stack(stkptr+1))
-	   else
-	      call oerror(n373, m1, 'Incompatable format')
-	   endif
-
-           tag=stack(stkptr+2)
-           stkptr=stkptr+4
-	   if (nfield .eq. 0) nfield = 2*ssize
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	   tmpstring = string(ioutst:ioutst+nfield-1)
-	   call copy( ssize, itmpstring, c(tag))
-
-	   ioutst = ioutst + nfield
-55	   continue
-	i0 = i2
-	inum = 0
-c
-c------
-      else if (c1 .eq. 'F' .or. c1 .eq. 'G' .or. c1 .eq. 'E' .or. 
-     .	       c1 .eq. 'L' .or. c1 .eq. 'I' .or. c1 .eq. 'D') then	
-c	We have an 'E, F, I, L, or G' format.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-60	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 60
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 60
-	  endif
-        endif
-c	Parse field width
-c
-	if (i2 .eq. i1) then
-	   if (c1 .eq. 'I') then
-	     nfield = idefault
-	   else if (c1 .eq. 'L') then
-	     nfield = ldefault
-	   else
-	     nfield = fdefault
-	   endif
-	   i3 = i2
-c	   Set default field width
-c
-	else 
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c
-	   if (c1 .eq. 'L' .or. c2 .ne. '.') then
-	      i3 = i2
-	   else
-	      i3 = i2 + 1
-62	      if (i3 .le. numchar) then
-	  	c2 = infmt(i3:i3)
-	  	if ( (lle(c2,'9') .and. lge(c2,'0')) .or.
-     .		     c2 .eq. '.'  .or. c2 .eq. 'e' .or. c2 .eq. 'E') then
-	     	  i3 = i3 + 1
-	     	  goto 62
-	  	endif
-	      endif
-	      if (i3 .eq. i2 + 1) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	   endif
-	endif
-c	Parse field width and # sig. digits.
-c  
-	frmt = '(' // pms // bms // infmt(i0:i3-1) // ')'
-c	Create format statement out of the above pieces
-c
-	do 65 i = 1, max(1,inum)
-
-            if (stkptr .gt. sp) return
-
-      	    if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	    tmpstring = string(ioutst:ioutst+nfield-1)
-	    if (c1 .eq. 'I') then
-		read(tmpstring,fmt=frmt,iostat=ier) ivalue
-		value = ivalue
-	    else if (c1 .eq. 'L') then
-		read(tmpstring,fmt=frmt,iostat=ier) test
-		if (test) then
-		  value = c(true)
-		else
-		  value = c(false)
-		endif
-	    else
-		read(tmpstring,fmt=frmt,iostat=ier) value
-	    endif
-	    if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad format specification')
-c
-	    if ((stkptr+3 .gt. sp) .or. 
-     .    	    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     	    (stack(stkptr+3) .ne. 3 .or. 
-     .        	    (stack(stkptr) .ne. 7 .and. 
-     .		     stack(stkptr) .ne. 14)) ) ) then
-c		   We have a scalar!
-c
-	   	tag = stack(stkptr)
-		c(tag) = value
-         	stkptr=stkptr+1
-	    else
-c		We have an array!!
-c
-		if (nsize .le. 0) then
-c		   We aren't trying to complete an array
-c
-	 	   type = stack(stkptr)
-        	   nsize=stack(stkptr+1)
-        	   tag=stack(stkptr+2)
-        	   if (type.ne. 2) call oerror(n373, m1, 'Incompatable format')
-	        endif
-		c(tag) = value
-		tag = tag + 1
-		nsize = nsize - 1
-		if (nsize .eq. 0) stkptr = stkptr + 4
-	    endif
-c
-
-	    ioutst = ioutst + nfield
-65	    continue
-	i0 = i3
-	inum = 0
-c
-c------
-      else
-	call oerror(n373, m1, 'Bad format specification')
-      endif
-c
-      goto 10
-c
-
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-
-
-c
-      subroutine ufread(unit)
-c
-c     Takes the stack of adverbs and reads values for them from UNIT 
-c     using list-directed IO
-c
-
-c
-
-c
-      integer*2 unit, ilen
-      character*5120 string
-c
-
-c
-      integer*2 stkptr, ioutst, numstring, tag, type, i1, lastblnk,
-     .		itmpstring(60), nfield, iwpr, nsize, m1, ssize,
-     .		i2, i3, i4, n373, n374
-      character*120 tmpstring
-      character*1 c1
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      stkptr = sp0
-      numstring = len(string)
-      nsize = 0
-c
-
-2300  if (unit .lt. 0) then
-	call pread2('# ', string, ilen)
-      else
-	read(unit,'(a)',err=900,end=800) string
-      endif
-
-c
-      ioutst = 1
-c
-2400  continue
-c
-      if (stkptr .gt. sp) return
-c
-      tmpstring = string(ioutst:)
-c
-      if ((stkptr+3 .gt. sp) .or. 
-     .    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     (stack(stkptr+3) .ne. 3 .or. 
-     .     (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) ) then
-c	we have a scalar!
-c
-	type = 1
-	nsize = 0
-	tag = stack(stkptr)
-	nfield = 1
-	call getnum(tmpstring,nfield,value)
-
-	if (nfield .ge. len(tmpstring)) goto 2300
-
- 	nfield = nfield - 1
-       if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	c(tag) = value
-	stkptr = stkptr + 1
-	ioutst = ioutst + nfield
-c
-      else
-c
-c       an array or string
-c
-        if (nsize .le. 0) then
-c	   we aren't trying to complete an array
-c
-	   type=stack(stkptr)
-           nsize=stack(stkptr+1)
-           tag=stack(stkptr+2)
-	endif
-c
-        if (type.eq.2) then
-c
-c       We have an array
-c
-	   nfield = 1
-	   call getnum(tmpstring,nfield,value)
-
-	   if (nfield .ge. len(tmpstring)) goto 2300
-
-	   nfield = nfield - 1
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   c(tag) = value
-	   tag = tag + 1
-	   nsize = nsize - 1
-	   if (nsize .eq. 0) stkptr = stkptr + 4
-	   ioutst = ioutst + nfield
-
-	else 
-c	We have a string or literal constant
-c
-	   i3 = lastblnk(tmpstring)
-
-	   if (i3 .eq. 0) goto 2300
-
-c
-	   do 2401 i1 = 1, i3
-		if (tmpstring(i1:i1) .ne. ' ') goto 2402
-2401		continue
-	   i1 = i3
-2402	   tmpstring = tmpstring(i1:)
-	   i1 = i1 - 1
-	   if (tmpstring(1:1) .eq. '''' .or. tmpstring(1:1) .eq. '"') then
-		c1 = tmpstring(1:1)
-		tmpstring = tmpstring(2:)
-		i3 = 2
-		i4 = 1
-2403		i2 = index(tmpstring(i4:), c1) + i4 - 1
-		if (i2 .eq. i4 - 1) call oerror(n374, m1, 'End of record')
-		if (tmpstring(i2+1:i2+1) .eq. c1) then
-			tmpstring(i2+1:) = tmpstring(i2+2:)
-			i3 = i3 + 1
-			i4 = i2 + 1
-			goto 2403
-		endif
-		tmpstring(i2:) = ' '
-c		Take care of strings surrounded by quotes; be wary of 
-c		double quotes
-c
-	   else
-		i3 = 0
-	        i2 = index(tmpstring, ' ')
-	        if (i2 .ne. 0) tmpstring(i2:) = ' '
-c		Takes care of strings not begun with quotes; the next blank
-c		signals end of string.
-c
-	   endif
-c	   i1 = # blanks precceding string, i2 = # chars in string; i3 =
-c		number of quotation marks that didn't get into final string.
-c
-	   if (type .eq. 7) then
-	     ssize = iwpr(nsize)
-	   else
-	     call oerror(n374, m1, ' ')
-	   endif
-	   nfield = i2 + i1 + i3
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   call copy( ssize, itmpstring, c(tag))
-	   nsize = 0
-	   stkptr = stkptr + 4
-	   ioutst = ioutst + nfield
-c
-	endif
-      endif
-c
-      goto 2400
-c
-
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-c
-      subroutine fwrite(infmt, unit)
-c
-c     Takes the stack of adverbs and prints them out onto UNIT 
-c     using the format statement INFMT
-c
-
-c
-      character*(*) infmt
-c
-
-c
-      integer*2 unit
-      character*5120 string
-c
-
-c
-      integer*2 stkptr, i0, i1, i2, i3, numchar, ioutst, lastblnk,
-     .		numstring, nsize, tag, type, i, ier, itmpstring(30),
-     .		nfield, inum, iwpr, fdefault, idefault, ldefault,
-     .		stck(40), maxstck, top, ssize, irpt, m1,
-     .		i0level0, inumlevel0, n373, n374 
-      integer*4 ivalue
-      character*60 tmpstring, frmt
-      character*8 pms
-      character*6 frmt2, snum
-      character*4 bms
-      character*1 lc1, c1, c2
-      logical test, pushcmp, popcmp, left, right
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (fdefault = 15)
-      parameter (idefault = 12)
-      parameter (ldefault = 2)
-c     Default field widths for F, I, and L formats.
-c
-      parameter (maxstck = 20)
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      if (lastblnk(infmt) .eq. 0) call oerror(n373, m1, 'Empty format')
-c
-      stkptr = sp0
-      i0 = 1
-      numchar = len(infmt)
-      numstring = len(string)
-      ioutst = 1
-      inum = 0
-      pms = '    '
-      bms = '    '
-      frmt2 = '(a)'
-      nsize = 0
-      top = 0
-      i0level0 = 1
-      inumlevel0 = 0
-      do 1 i1 = 1, maxstck
-	stck(i1) = 0
-1	continue
-c
-
-      string = ' '
-
-c
-10    if (i0 .gt. numchar .and. stkptr .le. sp) then
-c
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-c
-
-
-        write(unit,frmt2,err=900) string(1:ioutst)
-	string = ' '
-
-	i0 = i0level0
-	inum = inumlevel0
-c	Find rescan point from last level zero '(' or from start
-c	of format.
-c
-	ioutst = 1
-	goto 10
-c
-
-c
-      else if (i0 .gt. numchar) then
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-
-        write(unit,frmt2,err=900) string(1:ioutst)
-
-	return
-      else
-        lc1 = infmt(i0:i0)
-	call uppercase(lc1, c1)
-      endif
-c
-c------
-      if (ichar(c1).le.32 .or. ichar(c1).ge.128 .or. c1.eq.',') then
-	i0 = i0 + 1
-c	Skip all blanks, commas, non-printable characters between fields
-c
-c------
-      else if (lle(c1,'9') .and. lge(c1,'0') .or. c1 .eq. '-' ) then
-c	We have a number begining a field; parse the number until you get
-c	to a non-number and then set up INUM.  Probably a
-c	repeat count or a scale factor for 'P'.
-c
-	i1 = i0
-	i2 = i0 + 1
-20	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 20
-	  endif
-	else
-	  call oerror(n373, m1, 'Format exhausted')
-        endif
-	if (c1 .eq. '-' .and. i1+1 .eq. i2) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-c	Must have a digit after the minus sign.
-c
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. 'P') then
-c	We have a P scale factor; set up PMS and reset the repeat-count
-c
-	write(snum,'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	pms = snum // 'P' // ','
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-
-      else if (c1 .eq. 'S') then
-c	We have a S scale factor; set up PMS
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'P' .or. c2 .eq. 'p' .or.
-     .	      c2 .eq. 'S' .or. c2 .eq. 's') then
-	     i2 = i2 + 1
-	  else
-	     c2 = ' '
-	  endif
-        endif
-	bms = 'S' // c2 // ', '
-	i0 = i2
-c
-c------
-
-      else if (c1 .eq. '(' ) then
-c	We have an open parenthesis; push the location of the ( in INFMT and
-c	the current repeat count onto the stack.
-c
-	if (top .eq. 0) then
-	   i0level0 = i0
-	   inumlevel0 = inum
-	endif
-c	Save level zero repeat count
-c
-     	if (.not. pushcmp(stck, top, maxstck, i0) .or.
-     .	    .not. pushcmp(stck, top, maxstck, max(1,inum) ) )
-     .	    call oerror(n373, m1, 'Too many ( in format')
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. ')' ) then
-c	We have a close parenthesis; get the repeat count for the (..) and
-c	the location in INFMT of the (.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-     	if (.not. popcmp(stck, top, irpt) .or. .not. popcmp(stck, top, i1) ) 
-     .		call oerror(n373, m1, 'Too many )''s ')
-	if (irpt .gt. 1) then
-     	   if (.not. pushcmp(stck, top, maxstck, i1) .or.
-     .	       .not. pushcmp(stck, top, maxstck, max(1,irpt-1) ) )
-     .	       call oerror(n373, m1, 'Too many )''s or (''s')
-	   i0 = i1
-c	   We have NOT completed the repeat count for the opening (
-c	   so we may have to again repeat this (...). Pop I0 and push it 
-c	   back onto the stack; push a decremented count back onto the stack.
-c 
-	endif
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'X') then
-c	We have an 'X' format.  If no repeat count, assume 1 and then
-c	add blanks to the output string.
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	if (inum .eq. 0) inum = 1
-        if (ioutst + inum - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	string(ioutst:ioutst+inum-1) = ' '
-
-	ioutst = ioutst + inum
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'T') then	
-c	We have a 'T' format.  
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	left = .false.
-	right = .false.
-	i1 = i0 + 1
-	i2 = i1
-30	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 30
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'L' .or. c2 .eq. 'l') .and. i2 .eq. i1) then
-	     left = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'R' .or. c2 .eq. 'r') .and. i2 .eq. i1) then
-	     right = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  endif
-        endif
-	if (i2 .eq. i1) call oerror(n373, m1, 'Incomplete T format')
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield  
-	if (ier .ne. 0 .or. nfield .le. 0 .or. nfield .gt. numstring) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c	Parse column number
-c
-	if (left) then
-	   ioutst = max(1,ioutst - nfield)
-	else if (right) then
-	   ioutst = ioutst + nfield
-	else
-	   ioutst = nfield
-	endif
-      	if (ioutst .gt. numstring) call oerror(n374, m1, 'End of record')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. ':') then
-c	We have a termination control :
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-
-        if (stkptr .gt. sp) then
-          write(unit,frmt2,err=900) string(1:ioutst)
-	  return
-	endif
-
-	i0 = i0 + 1
-c
-c------
-
-      else if (c1 .eq. '/') then
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-
-        write(unit,'(a)',err=900) string(1:ioutst)
-	string = ' '
-
-	ioutst = 1
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. '$') then
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	frmt2 = '(a,$)'
-	i0 = i0 + 1
-
-c
-c------
-
-      else if (c1 .eq. 'H') then
-c	We have a holerith field.  Look for closing ", making sure
-c	to skip all double quotes.  Add to STRING the contents of the
-c	holerith (skiping over start/end ").  Error if no closing quote.
-c
-	if (inum .le. 0) call oerror(n373, m1, 'Bad H format')
-	i1 = i0 + 1
-	i2 = i1 + inum
-	if (i2 .gt. numchar) call oerror(n373, m1, 'Format exhausted')
-        if (ioutst + i2 - i1 - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+i2-i1-1) = infmt(i1:i2-1)
-	ioutst = ioutst + i2 - i1
-	i0 = i2 + 1
-c
-c------
-      else if (c1 .eq. '"' .or. c1 .eq. '''') then
-c	We have a " or ' holerith field.  Look for closing ", making sure
-c	to skip all double quotes.  Add to STRING the contents of the
-c	holerith (skiping over start/end ").  Error if no closing quote.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-	i3 = 0
-	tmpstring = infmt(i1:)
-40	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .ne. c1) then
-	     i2 = i2 + 1
-	     goto 40
-	  else if (c2 .eq. c1 .and. i2+1 .lt. numchar .and. 
-     .             infmt(i2+1:i2+1) .eq. c1 ) then
-	     tmpstring(i2 - i1 + 1:) = tmpstring(i2 - i1 + 2:)
-	     i3 = i3 + 1
-	     i2 = i2 + 2
-	     goto 40
-	  endif
-	else
-	     call oerror(n373, m1, 'No closing quote')
-	endif
-        if (ioutst + i2 - i1 - 1 - i3 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+i2-i1-1-i3) = tmpstring
-	ioutst = ioutst + i2 - i1
-	i0 = i2 + 1
-c
-c------
-
-      else if (c1 .eq. 'A') then
-c	We have an 'A' format.  Check for and parse field width, if
-c	any.  Check that next thing to be printed is a string or
-c	string adverb.  If so, check its size to that of the optional
-c	filed width.  Then place value of string/adverb
-c	into STRING and increment IOUT.  Do this for the specified repeat
-c	count.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-50	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 50
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 50
-	  endif
-        endif
-	if (i2 .ne. i1) then
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-	else
-	   nfield = 0
-	endif
-	do 55 i = 1, max(1,inum)
-
-           if (stkptr .gt. sp) then
-             write(unit,frmt2,err=900) string(1:ioutst)
-	     return
-	   endif
-
-	   if ( stkptr+3 .gt. sp .or. ( stack(stkptr+3) .ne. 3 .or. 
-     .         (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) 
-     .	       	call oerror(n373, m1, 'Incompatable format')
-c
-	   type = stack(stkptr)
-
-           if (type .eq. 7) then
-	      ssize=iwpr(stack(stkptr+1))
-	   else
-	      ssize = stack(stkptr+1)
-	   endif
-
-           tag=stack(stkptr+2)
-           stkptr=stkptr+4
-	   if (nfield .eq. 0) nfield = 2*ssize
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	   call copy( ssize, c(tag), itmpstring)
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:2*ssize)
-
-	   ioutst = ioutst + nfield
-55	   continue
-	i0 = i2
-	inum = 0
-c
-c------
-      else if (c1 .eq. 'F' .or. c1 .eq. 'G' .or. c1 .eq. 'E' .or. 
-     .	       c1 .eq. 'L' .or. c1 .eq. 'I' .or. c1 .eq. 'D') then	
-c	We have an 'E, F, I, L, or G' format.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-60	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 60
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 60
-	  endif
-        endif
-c	Parse field width
-c
-	if (i2 .eq. i1) then
-	   if (c1 .eq. 'I') then
-	     nfield = idefault
-	   else if (c1 .eq. 'L') then
-	     nfield = ldefault
-	   else
-	     nfield = fdefault
-	   endif
-	   i3 = i2
-c	   Set default field width
-c
-	else 
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c
-	   if (c1 .eq. 'L' .or. c2 .ne. '.') then
-	      i3 = i2
-	   else
-	      i3 = i2 + 1
-62	      if (i3 .le. numchar) then
-	  	c2 = infmt(i3:i3)
-	  	if ( (lle(c2,'9') .and. lge(c2,'0')) .or.
-     .		     c2 .eq. '.'  .or. c2 .eq. 'e' .or. c2 .eq. 'E') then
-	     	  i3 = i3 + 1
-	     	  goto 62
-	  	endif
-	      endif
-	      if (i3 .eq. i2 + 1) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	   endif
-	endif
-c	Parse field width and # sig. digits.
-c  
-	frmt = '(' // pms // bms // infmt(i0:i3-1) // ')'
-c	Create format statement out of the above pieces
-c
-	do 65 i = 1, max(1,inum)
-
-            if (stkptr .gt. sp) then
-              write(unit,frmt2,err=900) string(1:ioutst)
-	      return
-	    endif
-
-      	    if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-
-	    if ((stkptr+3 .gt. sp) .or. 
-     .    	    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     	    (stack(stkptr+3) .ne. 3 .or. 
-     .        	    (stack(stkptr) .ne. 7 .and. 
-     .		     stack(stkptr) .ne. 14)) ) ) then
-c		   We have a scalar!
-c
-		value = sngl(v(stkptr))
-         	stkptr=stkptr+1
-	    else
-c		We have an array!!
-c
-		if (nsize .le. 0) then
-c		   We aren't trying to complete an array
-c
-	 	   type = stack(stkptr)
-        	   nsize=stack(stkptr+1)
-        	   tag=stack(stkptr+2)
-        	   if (type.ne. 2) call oerror(n373, m1, 'Incompatable format')
-	        endif
-		value = c(tag)
-		tag = tag + 1
-		nsize = nsize - 1
-		if (nsize .eq. 0) stkptr = stkptr + 4
-	    endif
-c
-	    if (c1 .eq. 'I') then
-		ivalue = value
-		write(tmpstring,fmt=frmt,iostat=ier) ivalue
-	    else if (c1 .eq. 'L') then
-		if (value .gt. 0.) then
-		  test = .true.
-		else
-		  test = .false.
-		endif
-		write(tmpstring,fmt=frmt,iostat=ier) test
-	    else
-		write(tmpstring,fmt=frmt,iostat=ier) value
-	    endif
-c
-	    if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	    string(ioutst:ioutst+nfield-1) = tmpstring
-
-	    ioutst = ioutst + nfield
-65	    continue
-	i0 = i3
-	inum = 0
-c
-c------
-      else
-	call oerror(n373, m1, 'Bad format specification')
-      endif
-c
-      goto 10
-c
-
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-c
-      subroutine ufwrite(unit)
-c
-c     Takes the stack of adverbs and prints them out onto UNIT 
-c     using list-directed IO
-c
-
-c
-
-c
-      integer*2 unit, istring(2560)
-      character*5120 string
-c
-
-c
-      integer*2 stkptr, ioutst, lastblnk, numstring, tag, type, ier,
-     .		itmpstring(30), nfield, iwpr, nsize, ssize,  m1, n373,
-     .		 n374 
-      character*60 tmpstring
-      character*16 dfltfmt
-      character*8 frmt2
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-      include 'cio.inc'
-c
-      equivalence (itmpstring, tmpstring)
-
-      equivalence (istring, string)
-
-c
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      stkptr = sp0
-      numstring = len(string)
-      ioutst = 1
-      dfltfmt = prntfmt
-      string = ' '
-      frmt2 = '(1x,a)'
-      nsize = 0
-c
-2400  continue
-c
-
-      if (stkptr .gt. sp) then
-	if (unit .lt. 0) then
-	   call pwrite(istring, lastblnk(string))
-	else
-	   write(unit,frmt2,err=900) string(1:ioutst)
-	endif
-	return
-      endif
-
-c
-      if ((stkptr+3 .gt. sp) .or. 
-     .    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     (stack(stkptr+3) .ne. 3 .or. 
-     .     (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) ) then
-c	we have a scalar!
-c
-	type = 1
-	nsize = 0
-	tag = stack(stkptr)
-	value = v(stkptr)
-	write(tmpstring,dfltfmt,iostat=ier) value
-	if (ier .ne. 0) call oerror(n373, m1, 'Bad Format specification')
-	nfield = lastblnk(tmpstring)+1
-
-        if (ioutst + nfield - 1 .gt. 72) then
-	   if (unit .lt. 0) then
-	      call pwrite(istring, lastblnk(string))
-	   else
-	      write(unit,frmt2,err=900) string(1:ioutst)
-	   endif
-	   ioutst = 1
-	   string = ' '
-        endif
-
-        if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	ioutst = ioutst + nfield
-	stkptr = stkptr + 1
-c
-      else
-c
-c       an array or string
-c
-        if (nsize .le. 0) then
-c	   we aren't trying to complete an array
-c
-	   type=stack(stkptr)
-           nsize=stack(stkptr+1)
-           tag=stack(stkptr+2)
-	endif
-c
-        if (type.eq.2) then
-c
-c       We have an array
-c
-	   value = c(tag)
-	   write(tmpstring,dfltfmt,iostat=ier) value
-	   if (ier .ne. 0) call oerror(n373, m1, 'Bad Format specification')
-	   nfield = lastblnk(tmpstring)+1
-
-           if (ioutst + nfield - 1 .gt. 72) then
-	      if (unit .lt. 0) then
-	         call pwrite(istring, lastblnk(string))
-	      else
-	         write(unit,frmt2,err=900) string(1:ioutst)
-	      endif
-	      ioutst = 1
-	      string = ' '
-           endif
-
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	   ioutst = ioutst + nfield
-	   tag = tag + 1
-	   nsize = nsize - 1
-	   if (nsize .eq. 0) stkptr = stkptr + 4
-
-	else 
-c	We have a string or literal constant
-c
-	   if (type .eq. 7) then
-	     ssize = iwpr(nsize)
-	   else
-	     ssize = nsize
-	   endif
-	   nfield = 2*ssize+1
-
-           if (ioutst + nfield - 1 .gt. 72) then
-	      if (unit .lt. 0) then
-	         call pwrite(istring, lastblnk(string))
-	      else
-	         write(unit,frmt2,err=900) string(1:ioutst)
-	      endif
-	      ioutst = 1
-	      string = ' '
-           endif
-
-	   nsize = 0
-	   stkptr = stkptr + 4
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   tmpstring = ' '
-	   call copy( ssize, c(tag), itmpstring)
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	   ioutst = ioutst + nfield
-c
-	endif
-      endif
-c
-c
-      goto 2400
-c
-
-900   call oerror(n374,m1,' ')
-
-c
-      end
-c
-c=======================================================================
-c
-
-
-
diff -uNr 3.5/source/conline/srw.F unipops-3.6/source/conline/srw.F
--- 3.5/source/conline/srw.F	2000-03-16 11:33:48.000000000 -0700
+++ unipops-3.6/source/conline/srw.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,1047 +0,0 @@
-#if defined SREAD
-c
-c     @(#)srw.F	5.1 06/22/94
-c
-      subroutine sread(infmt, string)
-c
-c     Takes the stack of adverbs and reads values for them from STRING 
-c     using the format statement INFMT
-c
-#elif defined SWRITE
-c
-      subroutine swrite(infmt, string)
-c
-c     Takes the stack of adverbs and prints them out into STRING 
-c     using the format statement INFMT
-c
-#elif defined FREAD
-c
-      subroutine fread(infmt, unit)
-c
-c     Takes the stack of adverbs and reads values for them from UNIT 
-c     using the format statement INFMT
-c
-#else
-c
-      subroutine fwrite(infmt, unit)
-c
-c     Takes the stack of adverbs and prints them out onto UNIT 
-c     using the format statement INFMT
-c
-#endif
-c
-      character*(*) infmt
-c
-#if defined SREAD || defined SWRITE
-c
-      character*(*) string
-c
-#else
-c
-      integer*2 unit
-      character*5120 string
-c
-#endif
-c
-      integer*2 stkptr, i0, i1, i2, i3, numchar, ioutst, lastblnk,
-     .		numstring, nsize, tag, type, i, ier, itmpstring(30),
-     .		nfield, inum, iwpr, fdefault, idefault, ldefault,
-     .		stck(40), maxstck, top, ssize, irpt, m1,
-     .		i0level0, inumlevel0, n373, n374 
-      integer*4 ivalue
-      character*60 tmpstring, frmt
-      character*8 pms
-      character*6 frmt2, snum
-      character*4 bms
-      character*1 lc1, c1, c2
-      logical test, pushcmp, popcmp, left, right
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (fdefault = 15)
-      parameter (idefault = 12)
-      parameter (ldefault = 2)
-c     Default field widths for F, I, and L formats.
-c
-      parameter (maxstck = 20)
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      if (lastblnk(infmt) .eq. 0) call oerror(n373, m1, 'Empty format')
-c
-      stkptr = sp0
-      i0 = 1
-      numchar = len(infmt)
-      numstring = len(string)
-      ioutst = 1
-      inum = 0
-      pms = '    '
-      bms = '    '
-      frmt2 = '(a)'
-      nsize = 0
-      top = 0
-      i0level0 = 1
-      inumlevel0 = 0
-      do 1 i1 = 1, maxstck
-	stck(i1) = 0
-1	continue
-c
-#if defined FREAD
-      read(unit,frmt2,err=900,end=800) string
-#elif defined SWRITE || defined FWRITE
-      string = ' '
-#endif
-c
-10    if (i0 .gt. numchar .and. stkptr .le. sp) then
-c
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-c
-#if defined FREAD || defined FWRITE
-#if defined FREAD
-        read(unit,frmt2,err=900,end=800) string
-#elif defined FWRITE
-        write(unit,frmt2,err=900) string(1:ioutst)
-	string = ' '
-#endif
-	i0 = i0level0
-	inum = inumlevel0
-c	Find rescan point from last level zero '(' or from start
-c	of format.
-c
-	ioutst = 1
-	goto 10
-c
-#else
-	call oerror(n373, m1, 'Format exhausted')
-#endif
-c
-      else if (i0 .gt. numchar) then
-	if (top .ne. 0) call oerror(n373, m1, 'Missing closing )')
-#if defined FWRITE
-        write(unit,frmt2,err=900) string(1:ioutst)
-#endif
-	return
-      else
-        lc1 = infmt(i0:i0)
-	call uppercase(lc1, c1)
-      endif
-c
-c------
-      if (ichar(c1).le.32 .or. ichar(c1).ge.128 .or. c1.eq.',') then
-	i0 = i0 + 1
-c	Skip all blanks, commas, non-printable characters between fields
-c
-c------
-      else if (lle(c1,'9') .and. lge(c1,'0') .or. c1 .eq. '-' ) then
-c	We have a number begining a field; parse the number until you get
-c	to a non-number and then set up INUM.  Probably a
-c	repeat count or a scale factor for 'P'.
-c
-	i1 = i0
-	i2 = i0 + 1
-20	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 20
-	  endif
-	else
-	  call oerror(n373, m1, 'Format exhausted')
-        endif
-	if (c1 .eq. '-' .and. i1+1 .eq. i2) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-c	Must have a digit after the minus sign.
-c
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. 'P') then
-c	We have a P scale factor; set up PMS and reset the repeat-count
-c
-	write(snum,'(i6)',iostat=ier) inum
-	if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	pms = snum // 'P' // ','
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-#if defined SREAD || defined FREAD
-      else if (c1 .eq. 'B') then
-c	We have a B scale factor; set up PMS
-c
-	if (inum .ne. 0) 
-     .	   call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'Z' .or. c2 .eq. 'z' .or.
-     .	      c2 .eq. 'N' .or. c2 .eq. 'n') then
-	     i2 = i2 + 1
-	  else
-	     c2 = ' '
-	  endif
-        endif
-	bms = 'B' // c2 // ', '
-	i0 = i2
-c
-c------
-#else
-      else if (c1 .eq. 'S') then
-c	We have a S scale factor; set up PMS
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i2 = i0 + 1
-	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .eq. 'P' .or. c2 .eq. 'p' .or.
-     .	      c2 .eq. 'S' .or. c2 .eq. 's') then
-	     i2 = i2 + 1
-	  else
-	     c2 = ' '
-	  endif
-        endif
-	bms = 'S' // c2 // ', '
-	i0 = i2
-c
-c------
-#endif
-      else if (c1 .eq. '(' ) then
-c	We have an open parenthesis; push the location of the ( in INFMT and
-c	the current repeat count onto the stack.
-c
-	if (top .eq. 0) then
-	   i0level0 = i0
-	   inumlevel0 = inum
-	endif
-c	Save level zero repeat count
-c
-     	if (.not. pushcmp(stck, top, maxstck, i0) .or.
-     .	    .not. pushcmp(stck, top, maxstck, max(1,inum) ) )
-     .	    call oerror(n373, m1, 'Too many ( in format')
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. ')' ) then
-c	We have a close parenthesis; get the repeat count for the (..) and
-c	the location in INFMT of the (.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-     	if (.not. popcmp(stck, top, irpt) .or. .not. popcmp(stck, top, i1) ) 
-     .		call oerror(n373, m1, 'Too many )''s ')
-	if (irpt .gt. 1) then
-     	   if (.not. pushcmp(stck, top, maxstck, i1) .or.
-     .	       .not. pushcmp(stck, top, maxstck, max(1,irpt-1) ) )
-     .	       call oerror(n373, m1, 'Too many )''s or (''s')
-	   i0 = i1
-c	   We have NOT completed the repeat count for the opening (
-c	   so we may have to again repeat this (...). Pop I0 and push it 
-c	   back onto the stack; push a decremented count back onto the stack.
-c 
-	endif
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'X') then
-c	We have an 'X' format.  If no repeat count, assume 1 and then
-c	add blanks to the output string.
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	if (inum .eq. 0) inum = 1
-        if (ioutst + inum - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-#if defined SWRITE || defined FWRITE
-	string(ioutst:ioutst+inum-1) = ' '
-#endif
-	ioutst = ioutst + inum
-	inum = 0
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. 'T') then	
-c	We have a 'T' format.  
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	left = .false.
-	right = .false.
-	i1 = i0 + 1
-	i2 = i1
-30	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 30
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'L' .or. c2 .eq. 'l') .and. i2 .eq. i1) then
-	     left = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  else if ( (c2 .eq. 'R' .or. c2 .eq. 'r') .and. i2 .eq. i1) then
-	     right = .true.
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 30
-	  endif
-        endif
-	if (i2 .eq. i1) call oerror(n373, m1, 'Incomplete T format')
-	read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield  
-	if (ier .ne. 0 .or. nfield .le. 0 .or. nfield .gt. numstring) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c	Parse column number
-c
-	if (left) then
-	   ioutst = max(1,ioutst - nfield)
-	else if (right) then
-	   ioutst = ioutst + nfield
-	else
-	   ioutst = nfield
-	endif
-      	if (ioutst .gt. numstring) call oerror(n374, m1, 'End of record')
-	i0 = i2
-c
-c------
-      else if (c1 .eq. ':') then
-c	We have a termination control :
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-#if defined FWRITE
-        if (stkptr .gt. sp) then
-          write(unit,frmt2,err=900) string(1:ioutst)
-	  return
-	endif
-#else
-        if (stkptr .gt. sp) return
-#endif
-	i0 = i0 + 1
-c
-c------
-#if defined FREAD || defined FWRITE
-      else if (c1 .eq. '/') then
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-#if defined FREAD
-        read(unit,'(a)',err=900,end=800) string
-#elif defined FWRITE
-        write(unit,'(a)',err=900) string(1:ioutst)
-	string = ' '
-#endif
-	ioutst = 1
-	i0 = i0 + 1
-c
-c------
-      else if (c1 .eq. '$') then
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	frmt2 = '(a,$)'
-	i0 = i0 + 1
-#endif
-c
-c------
-#if defined SWRITE || defined FWRITE
-      else if (c1 .eq. 'H') then
-c	We have a holerith field.  Look for closing ", making sure
-c	to skip all double quotes.  Add to STRING the contents of the
-c	holerith (skiping over start/end ").  Error if no closing quote.
-c
-	if (inum .le. 0) call oerror(n373, m1, 'Bad H format')
-	i1 = i0 + 1
-	i2 = i1 + inum
-	if (i2 .gt. numchar) call oerror(n373, m1, 'Format exhausted')
-        if (ioutst + i2 - i1 - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+i2-i1-1) = infmt(i1:i2-1)
-	ioutst = ioutst + i2 - i1
-	i0 = i2 + 1
-c
-c------
-      else if (c1 .eq. '"' .or. c1 .eq. '''') then
-c	We have a " or ' holerith field.  Look for closing ", making sure
-c	to skip all double quotes.  Add to STRING the contents of the
-c	holerith (skiping over start/end ").  Error if no closing quote.
-c
-	if (inum .ne. 0) 
-     .		call oerror(n373, m1, 'Extra numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-	i3 = 0
-	tmpstring = infmt(i1:)
-40	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if (c2 .ne. c1) then
-	     i2 = i2 + 1
-	     goto 40
-	  else if (c2 .eq. c1 .and. i2+1 .lt. numchar .and. 
-     .             infmt(i2+1:i2+1) .eq. c1 ) then
-	     tmpstring(i2 - i1 + 1:) = tmpstring(i2 - i1 + 2:)
-	     i3 = i3 + 1
-	     i2 = i2 + 2
-	     goto 40
-	  endif
-	else
-	     call oerror(n373, m1, 'No closing quote')
-	endif
-        if (ioutst + i2 - i1 - 1 - i3 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+i2-i1-1-i3) = tmpstring
-	ioutst = ioutst + i2 - i1
-	i0 = i2 + 1
-c
-c------
-#endif
-      else if (c1 .eq. 'A') then
-c	We have an 'A' format.  Check for and parse field width, if
-c	any.  Check that next thing to be printed is a string or
-c	string adverb.  If so, check its size to that of the optional
-c	filed width.  Then place value of string/adverb
-c	into STRING and increment IOUT.  Do this for the specified repeat
-c	count.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-50	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 50
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 50
-	  endif
-        endif
-	if (i2 .ne. i1) then
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-	else
-	   nfield = 0
-	endif
-	do 55 i = 1, max(1,inum)
-#if defined FWRITE
-           if (stkptr .gt. sp) then
-             write(unit,frmt2,err=900) string(1:ioutst)
-	     return
-	   endif
-#else
-           if (stkptr .gt. sp) return
-#endif
-	   if ( stkptr+3 .gt. sp .or. ( stack(stkptr+3) .ne. 3 .or. 
-     .         (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) 
-     .	       	call oerror(n373, m1, 'Incompatable format')
-c
-	   type = stack(stkptr)
-#if defined SWRITE || defined FWRITE
-           if (type .eq. 7) then
-	      ssize=iwpr(stack(stkptr+1))
-	   else
-	      ssize = stack(stkptr+1)
-	   endif
-#else
-           if (type .eq. 7) then
-	      ssize=iwpr(stack(stkptr+1))
-	   else
-	      call oerror(n373, m1, 'Incompatable format')
-	   endif
-#endif
-           tag=stack(stkptr+2)
-           stkptr=stkptr+4
-	   if (nfield .eq. 0) nfield = 2*ssize
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-#if defined SREAD || defined FREAD
-	   tmpstring = string(ioutst:ioutst+nfield-1)
-	   call copy( ssize, itmpstring, c(tag))
-#else
-	   call copy( ssize, c(tag), itmpstring)
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:2*ssize)
-#endif
-	   ioutst = ioutst + nfield
-55	   continue
-	i0 = i2
-	inum = 0
-c
-c------
-      else if (c1 .eq. 'F' .or. c1 .eq. 'G' .or. c1 .eq. 'E' .or. 
-     .	       c1 .eq. 'L' .or. c1 .eq. 'I' .or. c1 .eq. 'D') then	
-c	We have an 'E, F, I, L, or G' format.  
-c
-	if (inum .lt. 0) 
-     .		call oerror(n373, m1, 'Bad numerical field in format')
-	i1 = i0 + 1
-	i2 = i1
-60	if (i2 .le. numchar) then
-	  c2 = infmt(i2:i2)
-	  if ( lle(c2,'9') .and. lge(c2,'0') ) then
-	     i2 = i2 + 1
-	     goto 60
-	  else if (c2 .eq. ' ' .and. i2 .eq. i1) then
-	     i1 = i1 + 1
-	     i2 = i1
-	     goto 60
-	  endif
-        endif
-c	Parse field width
-c
-	if (i2 .eq. i1) then
-	   if (c1 .eq. 'I') then
-	     nfield = idefault
-	   else if (c1 .eq. 'L') then
-	     nfield = ldefault
-	   else
-	     nfield = fdefault
-	   endif
-	   i3 = i2
-c	   Set default field width
-c
-	else 
-	   read(infmt(i1:i2-1),'(i6)',iostat=ier) nfield
-	   if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad number field in format')
-c
-	   if (c1 .eq. 'L' .or. c2 .ne. '.') then
-	      i3 = i2
-	   else
-	      i3 = i2 + 1
-62	      if (i3 .le. numchar) then
-	  	c2 = infmt(i3:i3)
-	  	if ( (lle(c2,'9') .and. lge(c2,'0')) .or.
-     .		     c2 .eq. '.'  .or. c2 .eq. 'e' .or. c2 .eq. 'E') then
-	     	  i3 = i3 + 1
-	     	  goto 62
-	  	endif
-	      endif
-	      if (i3 .eq. i2 + 1) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	   endif
-	endif
-c	Parse field width and # sig. digits.
-c  
-	frmt = '(' // pms // bms // infmt(i0:i3-1) // ')'
-c	Create format statement out of the above pieces
-c
-	do 65 i = 1, max(1,inum)
-#if defined FWRITE
-            if (stkptr .gt. sp) then
-              write(unit,frmt2,err=900) string(1:ioutst)
-	      return
-	    endif
-#else
-            if (stkptr .gt. sp) return
-#endif
-      	    if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-#if defined SREAD || defined FREAD
-	    tmpstring = string(ioutst:ioutst+nfield-1)
-	    if (c1 .eq. 'I') then
-		read(tmpstring,fmt=frmt,iostat=ier) ivalue
-		value = ivalue
-	    else if (c1 .eq. 'L') then
-		read(tmpstring,fmt=frmt,iostat=ier) test
-		if (test) then
-		  value = c(true)
-		else
-		  value = c(false)
-		endif
-	    else
-		read(tmpstring,fmt=frmt,iostat=ier) value
-	    endif
-	    if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad format specification')
-c
-	    if ((stkptr+3 .gt. sp) .or. 
-     .    	    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     	    (stack(stkptr+3) .ne. 3 .or. 
-     .        	    (stack(stkptr) .ne. 7 .and. 
-     .		     stack(stkptr) .ne. 14)) ) ) then
-c		   We have a scalar!
-c
-	   	tag = stack(stkptr)
-		c(tag) = value
-         	stkptr=stkptr+1
-	    else
-c		We have an array!!
-c
-		if (nsize .le. 0) then
-c		   We aren't trying to complete an array
-c
-	 	   type = stack(stkptr)
-        	   nsize=stack(stkptr+1)
-        	   tag=stack(stkptr+2)
-        	   if (type.ne. 2) call oerror(n373, m1, 'Incompatable format')
-	        endif
-		c(tag) = value
-		tag = tag + 1
-		nsize = nsize - 1
-		if (nsize .eq. 0) stkptr = stkptr + 4
-	    endif
-c
-#else
-	    if ((stkptr+3 .gt. sp) .or. 
-     .    	    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     	    (stack(stkptr+3) .ne. 3 .or. 
-     .        	    (stack(stkptr) .ne. 7 .and. 
-     .		     stack(stkptr) .ne. 14)) ) ) then
-c		   We have a scalar!
-c
-		value = sngl(v(stkptr))
-         	stkptr=stkptr+1
-	    else
-c		We have an array!!
-c
-		if (nsize .le. 0) then
-c		   We aren't trying to complete an array
-c
-	 	   type = stack(stkptr)
-        	   nsize=stack(stkptr+1)
-        	   tag=stack(stkptr+2)
-        	   if (type.ne. 2) call oerror(n373, m1, 'Incompatable format')
-	        endif
-		value = c(tag)
-		tag = tag + 1
-		nsize = nsize - 1
-		if (nsize .eq. 0) stkptr = stkptr + 4
-	    endif
-c
-	    if (c1 .eq. 'I') then
-		ivalue = value
-		write(tmpstring,fmt=frmt,iostat=ier) ivalue
-	    else if (c1 .eq. 'L') then
-		if (value .gt. 0.) then
-		  test = .true.
-		else
-		  test = .false.
-		endif
-		write(tmpstring,fmt=frmt,iostat=ier) test
-	    else
-		write(tmpstring,fmt=frmt,iostat=ier) value
-	    endif
-c
-	    if (ier .ne. 0) 
-     .		call oerror(n373, m1, 'Bad format specification')
-	    string(ioutst:ioutst+nfield-1) = tmpstring
-#endif
-	    ioutst = ioutst + nfield
-65	    continue
-	i0 = i3
-	inum = 0
-c
-c------
-      else
-	call oerror(n373, m1, 'Bad format specification')
-      endif
-c
-      goto 10
-c
-#if FREAD || SREAD
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-#else
-900   call oerror(n374,m1,' ')
-#endif
-c
-      end
-c
-c=======================================================================
-c
-#if defined SWRITE || defined FWRITE
-#if defined SWRITE
-c
-      subroutine uswrite(string)
-c
-c     Takes the stack of adverbs and prints them out into STRING 
-c     using list-directed IO
-c
-#else
-c
-      subroutine ufwrite(unit)
-c
-c     Takes the stack of adverbs and prints them out onto UNIT 
-c     using list-directed IO
-c
-#endif
-c
-#if defined SWRITE
-c
-      character*(*) string
-c
-#else
-c
-      integer*2 unit, istring(2560)
-      character*5120 string
-c
-#endif
-c
-      integer*2 stkptr, ioutst, lastblnk, numstring, tag, type, ier,
-     .		itmpstring(30), nfield, iwpr, nsize, ssize,  m1, n373,
-     .		 n374 
-      character*60 tmpstring
-      character*16 dfltfmt
-      character*8 frmt2
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-      include 'cio.inc'
-c
-      equivalence (itmpstring, tmpstring)
-#if FWRITE
-      equivalence (istring, string)
-#endif
-c
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      stkptr = sp0
-      numstring = len(string)
-      ioutst = 1
-      dfltfmt = prntfmt
-      string = ' '
-      frmt2 = '(1x,a)'
-      nsize = 0
-c
-2400  continue
-c
-#if defined FWRITE
-      if (stkptr .gt. sp) then
-	if (unit .lt. 0) then
-	   call pwrite(istring, lastblnk(string))
-	else
-	   write(unit,frmt2,err=900) string(1:ioutst)
-	endif
-	return
-      endif
-#else
-      if (stkptr .gt. sp) return
-#endif
-c
-      if ((stkptr+3 .gt. sp) .or. 
-     .    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     (stack(stkptr+3) .ne. 3 .or. 
-     .     (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) ) then
-c	we have a scalar!
-c
-	type = 1
-	nsize = 0
-	tag = stack(stkptr)
-	value = v(stkptr)
-	write(tmpstring,dfltfmt,iostat=ier) value
-	if (ier .ne. 0) call oerror(n373, m1, 'Bad Format specification')
-	nfield = lastblnk(tmpstring)+1
-#if defined FWRITE
-        if (ioutst + nfield - 1 .gt. 72) then
-	   if (unit .lt. 0) then
-	      call pwrite(istring, lastblnk(string))
-	   else
-	      write(unit,frmt2,err=900) string(1:ioutst)
-	   endif
-	   ioutst = 1
-	   string = ' '
-        endif
-#endif
-        if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	ioutst = ioutst + nfield
-	stkptr = stkptr + 1
-c
-      else
-c
-c       an array or string
-c
-        if (nsize .le. 0) then
-c	   we aren't trying to complete an array
-c
-	   type=stack(stkptr)
-           nsize=stack(stkptr+1)
-           tag=stack(stkptr+2)
-	endif
-c
-        if (type.eq.2) then
-c
-c       We have an array
-c
-	   value = c(tag)
-	   write(tmpstring,dfltfmt,iostat=ier) value
-	   if (ier .ne. 0) call oerror(n373, m1, 'Bad Format specification')
-	   nfield = lastblnk(tmpstring)+1
-#if defined FWRITE
-           if (ioutst + nfield - 1 .gt. 72) then
-	      if (unit .lt. 0) then
-	         call pwrite(istring, lastblnk(string))
-	      else
-	         write(unit,frmt2,err=900) string(1:ioutst)
-	      endif
-	      ioutst = 1
-	      string = ' '
-           endif
-#endif
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	   ioutst = ioutst + nfield
-	   tag = tag + 1
-	   nsize = nsize - 1
-	   if (nsize .eq. 0) stkptr = stkptr + 4
-
-	else 
-c	We have a string or literal constant
-c
-	   if (type .eq. 7) then
-	     ssize = iwpr(nsize)
-	   else
-	     ssize = nsize
-	   endif
-	   nfield = 2*ssize+1
-#if defined FWRITE
-           if (ioutst + nfield - 1 .gt. 72) then
-	      if (unit .lt. 0) then
-	         call pwrite(istring, lastblnk(string))
-	      else
-	         write(unit,frmt2,err=900) string(1:ioutst)
-	      endif
-	      ioutst = 1
-	      string = ' '
-           endif
-#endif
-	   nsize = 0
-	   stkptr = stkptr + 4
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   tmpstring = ' '
-	   call copy( ssize, c(tag), itmpstring)
-	   string(ioutst:ioutst+nfield-1) = tmpstring(1:nfield)
-	   ioutst = ioutst + nfield
-c
-	endif
-      endif
-c
-c
-      goto 2400
-c
-#if FREAD || SREAD
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-#else
-900   call oerror(n374,m1,' ')
-#endif
-c
-      end
-c
-c=======================================================================
-c
-#endif
-#
-#if defined SREAD || defined FREAD
-#if defined SREAD
-c
-      subroutine usread(string)
-c
-c     Takes the stack of adverbs and reads values for them from STRING 
-c     using list-directed IO
-c
-#else
-c
-      subroutine ufread(unit)
-c
-c     Takes the stack of adverbs and reads values for them from UNIT 
-c     using list-directed IO
-c
-#endif
-c
-#if defined SREAD
-c
-      character*(*) string
-c
-#else
-c
-      integer*2 unit, ilen
-      character*5120 string
-c
-#endif
-c
-      integer*2 stkptr, ioutst, numstring, tag, type, i1, lastblnk,
-     .		itmpstring(60), nfield, iwpr, nsize, m1, ssize,
-     .		i2, i3, i4, n373, n374
-      character*120 tmpstring
-      character*1 c1
-      real value
-c
-      include 'stk.inc'
-      include 'core.inc'
-c
-      equivalence (itmpstring, tmpstring)
-c
-      parameter (n373 = 373)
-      parameter (n374 = 374)
-      parameter (m1 = -1)
-c
-      stkptr = sp0
-      numstring = len(string)
-      nsize = 0
-c
-#if defined FREAD
-2300  if (unit .lt. 0) then
-	call pread2('# ', string, ilen)
-      else
-	read(unit,'(a)',err=900,end=800) string
-      endif
-#endif
-c
-      ioutst = 1
-c
-2400  continue
-c
-      if (stkptr .gt. sp) return
-c
-      tmpstring = string(ioutst:)
-c
-      if ((stkptr+3 .gt. sp) .or. 
-     .    ((stack(stkptr+3) .ne. 2 .or. stack(stkptr) .ne. 2) .and.
-     .     (stack(stkptr+3) .ne. 3 .or. 
-     .     (stack(stkptr) .ne. 7 .and. stack(stkptr) .ne. 14)) ) ) then
-c	we have a scalar!
-c
-	type = 1
-	nsize = 0
-	tag = stack(stkptr)
-	nfield = 1
-	call getnum(tmpstring,nfield,value)
-#if defined FREAD
-	if (nfield .ge. len(tmpstring)) goto 2300
-#else
-	if (nfield .ge. len(tmpstring)) call oerror(n374, m1, 'Empty record')
-#endif
- 	nfield = nfield - 1
-       if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	c(tag) = value
-	stkptr = stkptr + 1
-	ioutst = ioutst + nfield
-c
-      else
-c
-c       an array or string
-c
-        if (nsize .le. 0) then
-c	   we aren't trying to complete an array
-c
-	   type=stack(stkptr)
-           nsize=stack(stkptr+1)
-           tag=stack(stkptr+2)
-	endif
-c
-        if (type.eq.2) then
-c
-c       We have an array
-c
-	   nfield = 1
-	   call getnum(tmpstring,nfield,value)
-#if defined FREAD
-	   if (nfield .ge. len(tmpstring)) goto 2300
-#else
-	   if (nfield .ge. len(tmpstring)) call oerror(n374, m1, 'Empty record')
-#endif
-	   nfield = nfield - 1
-      	   if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   c(tag) = value
-	   tag = tag + 1
-	   nsize = nsize - 1
-	   if (nsize .eq. 0) stkptr = stkptr + 4
-	   ioutst = ioutst + nfield
-
-	else 
-c	We have a string or literal constant
-c
-	   i3 = lastblnk(tmpstring)
-#if defined FREAD
-	   if (i3 .eq. 0) goto 2300
-#else
-	   if (i3 .eq. 0) call oerror(n374, m1, 'Empty record') 
-#endif
-c
-	   do 2401 i1 = 1, i3
-		if (tmpstring(i1:i1) .ne. ' ') goto 2402
-2401		continue
-	   i1 = i3
-2402	   tmpstring = tmpstring(i1:)
-	   i1 = i1 - 1
-	   if (tmpstring(1:1) .eq. '''' .or. tmpstring(1:1) .eq. '"') then
-		c1 = tmpstring(1:1)
-		tmpstring = tmpstring(2:)
-		i3 = 2
-		i4 = 1
-2403		i2 = index(tmpstring(i4:), c1) + i4 - 1
-		if (i2 .eq. i4 - 1) call oerror(n374, m1, 'End of record')
-		if (tmpstring(i2+1:i2+1) .eq. c1) then
-			tmpstring(i2+1:) = tmpstring(i2+2:)
-			i3 = i3 + 1
-			i4 = i2 + 1
-			goto 2403
-		endif
-		tmpstring(i2:) = ' '
-c		Take care of strings surrounded by quotes; be wary of 
-c		double quotes
-c
-	   else
-		i3 = 0
-	        i2 = index(tmpstring, ' ')
-	        if (i2 .ne. 0) tmpstring(i2:) = ' '
-c		Takes care of strings not begun with quotes; the next blank
-c		signals end of string.
-c
-	   endif
-c	   i1 = # blanks precceding string, i2 = # chars in string; i3 =
-c		number of quotation marks that didn't get into final string.
-c
-	   if (type .eq. 7) then
-	     ssize = iwpr(nsize)
-	   else
-	     call oerror(n374, m1, ' ')
-	   endif
-	   nfield = i2 + i1 + i3
-           if (ioutst + nfield - 1 .gt. numstring) 
-     .		call oerror(n374, m1, 'End of record')
-	   call copy( ssize, itmpstring, c(tag))
-	   nsize = 0
-	   stkptr = stkptr + 4
-	   ioutst = ioutst + nfield
-c
-	endif
-      endif
-c
-      goto 2400
-c
-#if FREAD || SREAD
-800   call oerror(n374,m1,'End of file')
-900   call oerror(n374,m1,' ')
-#else
-900   call oerror(n374,m1,' ')
-#endif
-c
-      end
-c
-c=======================================================================
-c
-#endif
diff -uNr 3.5/source/conline/stores.f unipops-3.6/source/conline/stores.f
--- 3.5/source/conline/stores.f	2000-03-16 11:33:36.000000000 -0700
+++ unipops-3.6/source/conline/stores.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,762 +0,0 @@
-      SUBROUTINE STORES	(J)
-C-------------------------------------------------------------------------------
-C  @(#)stores.f	5.2 07/25/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C   STORES-OPERATIONS
-C   -----------------
-C	 STORES	stores either the procedure source code, procedure
-C     object code, or handles the source code.	Note opcode 64 is a
-C     internal operator	that stores the	source and object code for
-C     procedures.
-C
-C     LISTF is the storage location for	PROC source code.
-C
-C---------------------------------------------------------------------
-C
-      integer*2 memory(8), itempstring(80), inum, chngfile
-      character*160 tempstring, query
-      character*80 command1, filename, command2, cnfile
-      integer*2 iwpc, j, llocat, listl, i3, lastblnk, ibyte, ii, ier, 
-     .          unused, ilen3, numnames, unalias, istat
-      integer*4 iloc, istat4, long, onlinesite, system, ix, it, ll, 
-     .          lll, i, jj, ix1, nmem, irtn, oldk3, oldkx3, oldlistf3,
-     .          lscratch, iftype, sign, zero4, lunit, ioput
-      real*4 oldvers
-      logical*2 changeproj, lrtn
-      character*24 zdatetime
-      character*1023 fullname
-      logical*2 opened
-      character*60 cix, ckpak
-      character*8 project
-      character*11 names(128)
-      character*1 wintype
-      integer*2 n0, n1, n6, n11, n17, n29, n30, n31, n80, n120, n351,
-     .          n352, n355, n356, n357, m1, m3, fshort, n2, n9, n28,
-     .          n26, n232, n39, n367
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-      include 'lsf.inc'
-c
-      include 'tags.inc'
-c
-      parameter (numnames=128)
-      parameter (zero4=4)
-c
-      equivalence (memory(1), cmemory), (itempstring(1), tempstring)
-      equivalence (cix, x(1)), (ckpak, kpak)
-C
-      data n0, n1, n6, n9, n11, n17, n29, n30, n31, n80, n120, n351,
-     .          n352, n355, n356, n357, m1, m3, n2
-     .    /0, 1, 6, 9, 11, 17, 29, 30, 31, 80, 120, 351, 352, 355,
-     .     356, 357, -1, -3, 2/
-      data n28, n26 /28, 26/, n232 /232/, n39 /39/, n367 /367/
-c
-
-c
-C=======================================================================
-C
-C					Get LISTF.
-      JJ = J
-      GO TO (10,20,30,40,50,60,80,90,100,110,120,130,
-     1       210,220,230,240,250,260,270,280,290,291,
-     2       292,293,300,310,320,330,331,332), JJ
-      call oerror(n120, m3, 'STORES')
-C
-C---------------------------------------------------------------------
-C   				   Store PROC source and object	code.
-C---------------------------------------------------------------------
-C					Store object code.
- 10   continue
-      L=LLOCAT(fshort(AP+2),K,LPGM)
-      LPGM=L
-      L=L+1
-      LISTL=1
-      tempstring = lastline
-      ibyte = min( lastblnk(tempstring), kbptr-1)
-c     Because of processing by a preparser like AMTHPARSER, must now use the
-c     input string stored in HIST as opposed to that in KARBUF or CBUFF.
-c     Also, the 'case' of the input string is preserved.
-c
-      ii = iwpc(ibyte) + 1
-      K(L)=LLOCAT(II,LISTF,LISTL)
-      L=L+1
-      CALL COPY	(AP,A,K(L))
-C					Store source code.
-      listf(listl) = ibyte
-      LISTL=LISTL+1
-      call copy(ibyte, itempstring, listf(listl) )
-      GO TO 99
-C---------------------------------------------------------------------
-C					STORE -	all memory.
-C---------------------------------------------------------------------
- 20   CONTINUE
-c
-      if (mode .ne. 0) call oerror(n17, m1, 'STORE')
-c
-      CALL GETFLD
-      IF (TYPE.ne.11) call oerror(n29, m1, 
-     .		'STORE: One needed and must be a number')
-c
-      NMEM=X(1)
-      IF (NMEM.lt.1.or.NMEM.gt.3) call oerror(n30, m1, 'STORE')
-c
-      call openms(imemory, memory, n1, ier)
-      if (ier .ne. 0) then
-	call oerror(n352, n0, 'STORE: ' // cmemory)
-	goto 21
-      endif
-C					   Store K array.
-      ILOC = NMEM*(KBLK+kxblk+LBLK)+1
-      call writms(imemory, iloc, long(kblk), k, ier)
-      IF (IER.ne.0) then
-	call oerror(n355, n0, 'STORE: ' // cmemory)
-	goto 21
-      endif
-C					   Store Kx array.
-      iloc = iloc + kblk
-c				set vers before storing, reset after
-      oldvers = vers
-      vers = version
-      call writms(imemory, iloc, long(kxblk), kx, ier)
-      vers = oldvers
-      IF (IER.ne.0) then
-	call oerror(n355, n0, 'STORE: ' // cmemory)
-	goto 21
-      endif
-C					   Store LISTF array.
-      ILOC = ILOC + KxBLK
-      call writms(imemory, iloc, long(lblk), listf, ier)
-      IF (IER.ne.0) call oerror(n355, n0, 'STORE: ' // cmemory)
-c
-21    call closms(imemory, ier)
-      IF (IER.ne.0) call oerror(n356, n0, 'STORE: ' // cmemory)
-      GO TO 99
-C---------------------------------------------------------------------
-C					RESTORE	- all memory.
-C---------------------------------------------------------------------
- 30   continue
-c
-      if (mode .ne. 0) call oerror(n17, m1, 'RESTORE')
-c
-      CALL GETFLD
-      IF (TYPE.ne.11) call oerror(n29, m1, 
-     .		'RESTORE: One needed and must be a number')
-c
-      NMEM=X(1)
-      IF (NMEM.lt.1.or.NMEM.gt.3) call oerror(n30, m1, 'RESTORE')
-c
-      call openms(imemory, memory, n1, ier)
-      if (ier .ne. 0) then
-	call oerror(n352, n0, 'RESTORE: ' // cmemory)
-	goto 31
-      endif
-c
-C					   Restore K array.
-      ILOC = NMEM*(KBLK+kxblk+LBLK)+1
-      call readms(imemory, iloc, long(kblk), k, ier)
-      IF (IER.ne.0) then
-	call oerror(n357, n0, 'RESTORE: ' // cmemory)
-	goto 31
-      endif
-C					   Restore Kx array.
-      ILOC = ILOC + KBLK
-      call readms(imemory, iloc, long(kxblk), kx, ier)
-      IF (IER.ne.0) then
-	call oerror(n357, n0, 'RESTORE: ' // cmemory)
-	goto 31
-      endif
-c					reset vers
-      if (vers .lt. 1) vers = vers * 1000.0
-C					   Restore LISTF array.
-      ILOC = ILOC + KxBLK
-      call readms(imemory, iloc, long(lblk), listf, ier)
-      IF (IER.ne.0) call oerror(n357, n0, 'RESTORE: ' // cmemory)
-c
-31    call closms(imemory, ier)
-      IF (IER.ne.0) call oerror(n356, n0, 'RESTORE: ' // cmemory)
-      GO TO 99
-C---------------------------------------------------------------------
-C					List a Procedure/Alias.
-C---------------------------------------------------------------------
-   40 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'LIST')
-c
-      CALL GETFLD
-c
-      IF (TYPE.eq.3) then
-        IX = 1
-        LINK = TAG
-  42    L=LINK
-        LINK = K(L)
-	 IT = K(L+1)
-	 IF (IT.EQ.0) GO TO 42
-	    LL = IT+1
-	    LLL	= IWPC(LISTF(IT)) + LL - 1
-	    WRITE(outbuf,401,IOSTAT=IER) IX, (LISTF(I), I = LL,LLL)
-  401 	    FORMAT (1x, I4, 2X, 35A2)
-	    CALL PWRITE	(ioutbuf,n80)
-	    IX = IX+1
-	    IF (LINK.NE.0) GO TO 42
-c
-      else if (type .eq. 6) then
-c
-	 ll = locsym+4
-	 lll = k(locsym+1)/16 + ll - 1
-	 l = k(1)
-43	 if (k(l+2) .eq. tag .and. mod(k(l+1),16) .ne. type) then
-		ix = l+4
-		ix1 = k(l+1)/16 + ix - 1
-		write(outbuf, 431,iostat=ier) (k(i),i=ll,lll),' -',
-     .					    '> ',(k(i),i=ix,ix1)
-431		format(80a2)
-	        CALL PWRITE(ioutbuf,n80)
-	 else
-		l = k(l)
-		if (l .ne. 0) goto 43
-	 endif
-c
-      else
-         call oerror(n11, m1, 'LIST')
-      endif
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					Report CORE utilization.
-C---------------------------------------------------------------------
-50    continue
-      if (mode .ne. 0) call oerror(n17, m1, 'CORE')
-      call memusage
-      GO TO 99
-C---------------------------------------------------------------------
-C					Scratch	a Verb/Adverb.
-C---------------------------------------------------------------------
-60    continue
-      if (mode .ne. 0) call oerror(n17, m1, 'SCRATCH')
-c
-      CALL GETFLD
-c
-      if (type .eq. 0) call oerror(n2, m1, 'SCRATCH')
-c
-      lscratch = l
-      if (k(7) .gt. lscratch) call oerror(n6, m1, 'SCRATCH')
-c     Make sure it is not a built-in operator/operand.
-c
-      if (type .eq. 1 .or. type .eq. 2 .or. type .eq. 7 .or. 
-     .	  type .eq. 8) then
-	irtn = unused(k, n1, fshort(-tag), names, numnames)
-      else if (type .eq. 3 .or. type .eq. 6) then
-	irtn = unused(k, n1, tag, names, numnames)
-	if (type .eq. 3) irtn = irtn + 
-     .		unalias(k, n1, tag, names(irtn+1),fshort(numnames-irtn))
-      else 
-	call oerror(n6, m1, 'SCRATCH: Symbol-type cannot be scratched')
-      endif
-c
-      if (irtn .ne. 0) then
-c
-	i3 = iwpc(nkar)
-	call copy(i3, k(l+4), ioutbuf)
-c
-	write(istderr,*) ' '
-	write(istderr,*) 'The following PROCEDURES/ALIASES use ',
-     .				outbuf(1:nkar), ':'
-	if (irtn .gt. numnames) write(istderr,*)
-     .		 '(Only the first ', numnames, ' will be listed.)'
-	write(istderr,*) ' '
-	i = min(irtn,numnames)
-619	write(istderr,*) ((names(ll), ll = j, min(i,j+5) ), j = 1, i, 6)
-	write(istderr,*) ' '
-	write(istderr,*) 'Cannot SCRATCH ', outbuf(1:nkar)
-	write(istderr,*) ' '
-c
-      else
-c
-C       Search for the operator/operand.
-        L = 1
-  62    LAST=L
-        L=K(L)
-        IF (l .ne. lscratch) GO TO 62
-c
-        IF (K(L).eq.0) then
-C	  Last symbol entry.
-c
-	   K(9)=LAST
-	   K(LAST)=0
-        else
-C	   Middle symbol entry.
-c
-	   K(LAST) = K(L)
-        endif
-C       Delete symbol from table.
-c
-      endif
-c
-      GO TO 99
-C-----------------------------------------------------------------------
-C                                  BATCH 
-C-------------------------------------------------------
-   80 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'BATCH')
-c
-      call nextfield(cnfile)
-      call batch(cnfile)
-c
-      goto 99
-c
-c-------------------------------------------------------
-c                                  FILES
-c-------------------------------------------------------
-  90  continue
-      if (mode .ne. 0) call oerror(n17, m1, 'FILES')
-      call files
-      goto 99
-c-------------------------------------------------------
-c                                   CHGPRJ
-c-------------------------------------------------------
-  100 continue
-      if (mode .ne. 0) call oerror(n17, m1, 'CHGPRJ')
-      call nextfield(project)
-      lrtn = changeproj(project)
-      goto 99
-c-------------------------------------------------------
-c				    SYSTEM
-c-------------------------------------------------------
-  110 continue
-      if (mode .ne. 0) call oerror(n17, m1, 'SYSTEM')
-      irtn = system(cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'SYSTEM')
-      kbptr = max(karlim, nbytes)
-      goto 99
-c----------------------------------------------------
-c                                    DOCUMENT
-c----------------------------------------------------
-120   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'DOCUMENT')
-      ilen3 = lastblnk(cbuff(kbptr:min(nbytes,karlim)))
-      call pwrite(cbuff(kbptr:min(nbytes,karlim)), ilen3)
-      kbptr = max(karlim, nbytes)
-      goto 99
-c---------------------------------------------------
-c        				UNDO
-c---------------------------------------------------
-130   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'UNDO')
-      call undo
-C-----------------------------------------------------------------------
-C					 EDIT	  210
-C-----------------------------------------------------------------------
-  210 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'EDIT')
-      irtn = system('edit.exe ' // cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'EDIT')
-      kbptr = max(karlim, nbytes)
-      GO TO 99
-C--------------------------------------------------------------------
-C                                    TYPE  
-C---------------------------------------------------------------------
-  220 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'TYPE')
-      irtn=system('more.exe ' // cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'TYPE')
-      kbptr = max(karlim, nbytes)
-      GO TO 99
-C---------------------------------------------------------------------
-C                                    DIR
-C--------------------------------------------------------------------
-  230 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'DIR')
-      irtn=system('ls.exe ' // cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'DIR')
-      kbptr = max(karlim, nbytes)
-      GO TO 99
-C--------------------------------------------------------------------
-C                                  SYSHELP
-C--------------------------------------------------------------------
-  240 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'SYSHELP')
-      irtn=system('man.exe ' // cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'SYSHELP')
-      kbptr = max(karlim, nbytes)
-      GO TO 99
-C---------------------------------------------------------------
-C                                  LASER
-C---------------------------------------------------------------
-  250 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'LASER')
-      irtn=system('printit ' // printer // ' text ' // 
-     .             cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'LASER')
-      kbptr = max(karlim, nbytes)
-      GO TO 99
-C--------------------------------------------------------------------
-C               COMMENTS
-C--------------------------------------------------------------------
- 260  CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'COMMENTS')
-      irtn=system('comments.exe ' // program(2:2) )
-      if (irtn .ne. 0) call oerror(n9,n0,'COMMENTS')
-      GOTO 99
-C----------------------------------------------------------------
-c           PRCDIR
-c--------------------------------------------------------------------
-270   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'PRCDIR')
-      irtn=system('prcdir2.exe')
-      if (irtn .ne. 0) call oerror(n9,n0,'PRCDIR')
-      goto 99
-C----------------------------------------------------------------
-c           MENUS
-c--------------------------------------------------------------------
-280   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'MENUS')
-C     Make sure it is in EXEC mode
-c
-      do 281 i = 1, iinptr
-         if (iinlist(i,2) .eq. imenuin)
-     .     call oerror(n26, m1,' ')
- 281  continue
-c			make sure there aren't any current menus open
-c
-      open(unit=imenuout, file=cmenuout, status='unknown', 
-     .     access='sequential',iostat=irtn)
-      if (irtn .eq. 0) rewind(imenuout,iostat=irtn)
-      if (irtn .eq. 0) call menus(irtn)
-c
-      if (irtn .eq. 0) irtn = system("makemenu.exe " // cmenuin //  
-     .                  " " //cmenuout // " " // program(2:2) //  
-     .			" " //procid)
-      if (irtn .ne. 0) call oerror(n351, m1, 'MENUS')
-c
-      call openread(istat4, cmenuin(1:lastblnk(cmenuin)) // '\0')
-      if (istat4 .lt. 0) then
-	call oerror(n351, n0, 'MENUS')
-	call donemenu
-	goto 99
-      endif
-C     Create menus, open menus input file
-c
-      if (iinptr .ge. 50) then
-c			no more room in iinlist, should NEVER happen
-         call oerror(n28, n0, 'MENUS')
-         call donemenu
-         goto 99
-      endif
-c
-      iinptr = iinptr + 1
-      iinlist(iinptr, 1) = istat4
-      iinlist(iinptr, 2) = imenuin
-      cinlist(iinptr) = cmenuin
-      iinunit = iinlist(iinptr, 1)
-      iintype = iinlist(iinptr, 2)
-c     Store away the current Input unit number for use after MENUS
-c     are no longer wanted.
-c			istat4 is the unix file descriptor which we'll
-c			treat as if it were the unit number in iinlist
-c
-      goto 99
-C----------------------------------------------------------------
-c           DONEMENU
-c--------------------------------------------------------------------
-290   continue
-      call donemenu
-      goto 99
-C----------------------------------------------------------------
-c           CHNGFILE
-c--------------------------------------------------------------------
-291   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'CHNGFILE')
-C     Make sure it is in ECEC mode
-c
-C     Parse the command line: command file_number file_name (optional)
-      call nextfield(command1)
-      ii = lastblnk(command1)
-      if (ii .eq. 0) then
-	call initfiles(zero4)
-c	User has not types in any arguments to CHNGFILE so go through
-c	Q/A session in INITFILES.
-
-      else
-        call uppercase(command1, command2)
-c       Get command
-c
-	if (command2 .eq. 'C') then
-            call oerror(n31, m1, 'CHNGFILE:  Ambiguous symbol')
-	else if (index("CHANGE", command2(1:ii)) .eq. 1) then
-	    command2 = "CHANGE"
-	else if (index("SUBTRACT", command2(1:ii)) .eq. 1) then		
-	    command2 = "SUBTRACT"
-	else if (index("CREATE", command2(1:ii)) .eq. 1) then		
-	    command2 = "CREATE"
-	else 
-            call oerror(n31, m1, 'CHNGFILE')
-	endif
-c
-	inum = 0
-        if (command2 .eq. 'CHANGE' .or. command2 .eq. 'SUBTRACT' .or.
-     1    command2 .eq. 'CREATE' ) then
-         call getfld
-         if (type.eq.1 .or. type.eq.8 .or. type.eq.11) then
-c		scalar, pointer or entered value, use tag returned by getfld
-            inum = c(tag)
-         else
-c		too complicated to deal
-            call oerror(n31, m1, 'CHNGFILE')
-         endif
-c	 Get file_number
-c
-	 if (command2 .eq. 'CHANGE' .or. command2 .eq. 'CREATE') 
-     1		call nextfield(filename)
-c         get file name
-c
-        endif
-        irtn = chngfile(command2, inum, filename)
-        if (irtn .ne. 0) call oerror(n31, m1, 'CHNGFILE')
-c
-      endif
-c
-      goto 99
-C---------------------------------------------------------------
-C                                  IDENTIFY
-C---------------------------------------------------------------
-  292 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'IDENTIFY')
-      irtn=system('identify.exe ' // cbuff(kbptr:min(nbytes,karlim)))
-      if (irtn .ne. 0) call oerror(n9,n0,'IDENTIFY')
-      kbptr = max(karlim, nbytes)
-      GO TO 99
-C---------------------------------------------------------------
-C                                  KILLGRPH
-C---------------------------------------------------------------
-  293 CONTINUE
-      if (mode .ne. 0) call oerror(n17, m1, 'KILLGRAPH')
-      wintype = 'S'
-      if (termtype .eq. 'xwindow') wintype = 'X'
-      irtn = system('killgraph.exe ' // cgraphin // ' ' // cgraphout //
-     .  	     ' ' // procid // ' ' // program(1:1) // 
-     .               ' ' // wintype)
-      if (irtn.ne. 0) call oerror(n9,n0,'KILLGRAPH')
-      GO TO 99
-c
-C---------------------------------------------------------------------
-C		   E  X	 I  T		
-C---------------------------------------------------------------------
-300   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'EXIT')
-      call exitpops(n0)
-c
-C---------------------------------------------------------------------
-C		   W   I   P   E		
-C---------------------------------------------------------------------
-310   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'RESTART')
-c
-      call donemenu
-      call closeall
-c
-      do 1009 i = 1, iinptr
-         if (iinlist(iinptr, 2) .eq. ibatchin) then
-            call filecomp(cinlist(iinptr), fullname)
-            if (opened(fullname)) then
-               close (iinlist(iinptr,1),iostat=irtn)
-               lunit = iinlist(iinptr, 1)
-               lunit = ioput(lunit)
-c			ignore ioput errors, we don't really care
-            endif
-         endif
-1009  continue
-c
-      do 1109 i = 1, nfiles
-	if (ffile(i,1) .gt. 0) close(ffile(i,1),iostat=istat)
-1109	continue
-c
-      if (opened(csetupin)) close(isetupin,iostat=irtn)
-      if (opened(cmemory)) call closms(imemory, istat)
-      if (opened(coutgrph)) close(ioutgrph,iostat=istat)
-      if (opened(couttxt)) close(iouttxt,iostat=istat)
-      close(ishelpin,iostat=istat)
-      close(iiotmp,iostat=istat)
-c
-      call filecomp(clogout,fullname)
-      if (dolog) write(ilogout, 1030, iostat=irtn)
-     .		'# Command logging OFF -- ', zdatetime()
- 1030 format(2a)
-      if (opened(fullname)) close(ilogout,iostat=irtn)
-      dolog = .false.
-c
-      call filecomp(ccube,fullname)
-      if (opened(fullname)) close(icube,iostat=irtn)
-      call filecomp(cprtout,fullname)
-      if (opened(fullname)) close(iprtout,iostat=istat)
-c
-      close(ishelpin,iostat=irtn)
-      close(iiotmp,iostat=irtn)
-c
-      CALL WIPE
-c
-C---------------------------------------------------------------------
-C		   COMPRESS		
-C---------------------------------------------------------------------
-320   continue
-      if (mode .ne. 0) call oerror(n17, m1, 'COMPRESS')
-      oldk3 = k(3)
-      oldkx3 = kx(3)
-      oldlistf3 = listf(3)
-c     Store away old array usage
-c
-      call compress
-c
-c     Now report on savings
-c
-      write(outbuf,3205,iostat=ier) 
-3205  format(' ')
-      call pwrite(ioutbuf,n80)
-c
-      write(outbuf,321,iostat=ier) 
-321   format(13x,'SPACE SAVED FOR:')
-      call pwrite(ioutbuf,n80)
-c
-      write(outbuf,322,iostat=ier) 
-322   format('     PROGRAMS   VARIABLES     SOURCE')
-      call pwrite(ioutbuf,n80)
-c
-      write(outbuf,323,iostat=ier) oldk3-k(3), oldkx3-kx(3), 
-     .				   oldlistf3-listf(3)
-323   format(7x,3(i5,7x))
-      call pwrite(ioutbuf,n80)
-c
-      oldk3 = nint(100.*float(oldk3-k(3))/float(oldk3))
-      oldkx3 = nint(100.*float(oldkx3-kx(3))/float(oldkx3))
-      oldlistf3 = nint(100.*float(oldlistf3-listf(3))/float(oldlistf3))
-c
-      write(outbuf,324,iostat=ier) oldk3, oldkx3, oldlistf3
-324   format(6x,'(',i5,'%',6x,i5,'%',6x,i5,'%)')
-      call pwrite(ioutbuf,n80)
-c
-      write(outbuf,3205,iostat=ier) 
-      call pwrite(ioutbuf,n80)
-c
-      goto 99
-c
-C---------------------------------------------------------------------
-C		   OLFILES
-C---------------------------------------------------------------------
-330   continue
-c			currently only applicable to tucson on-line files
-c			but there must BE an online data connection
-      if (.not. online) call oerror(n367, m1, 'OLFILES')
-      if (onlinesite() .ne. 1) call oerror(n232, m1, 'OLFILES')
-c
-      call olfiles()
-c
-      goto 99
-C---------------------------------------------------------------------
-C		   WHATIS
-C---------------------------------------------------------------------
-331   continue
-c
-      call getfld
-c
-      tempstring = ' '
-      query = ' '
-      if (type .eq. 11) then
-	tempstring = cbuff(kbptr-nkar:kbptr-1)
-      else if (type .eq. 14) then
-	tempstring = cix(1:nkar)
-      else if (type .ge. 1 .and. type .le. 15) then
-	i3 = k(l+1)/16
-	call copy(i3, k(l+4), itempstring)
-      else
-	tempstring = cbuff(kbptr-nkar:kbptr-1)
-      endif
-c
-      if (type .eq. 1) then
-        query = ' => Scalar Adverb'
-      else if (type .eq. 2) then
-        query = ' => Array Adverb'
-      else if (type .eq. 3) then
-        query = ' => Procedure'
-      else if (type .eq. 4) then
-	if (tag .ge. idhfunc1 .and. tag .le. idhfunc2) then
-           query = ' => Internal Array Verb'
-	else if (tag .ge. ifunct .and. tag .lt. igenop) then
-           query = ' => Function Verb'
-	else
-           query = ' => Regular Verb'
-	endif
-      else if (type .eq. 5) then
-        query = ' => Pseudo Verb'
-      else if (type .eq. 6) then
-        query = ' => Alias'
-      else if (type .eq. 7) then
-        query = ' => String Adverb'
-      else if (type .eq. 8) then
-        query = ' => Keyword or Pointer Adverb'
-      else if (type .eq. 11) then
-        query = ' => Real Constant'
-      else if (type .eq. 14) then
-        query = ' => String Constant'
-      else if (type .eq. 15) then
-        query = ' => Logical Constant'
-      else 
-        query = ' => Unknown Symbol'
-      endif
-c
-      tempstring = tempstring(1:lastblnk(tempstring)) // query
-c
-      call pwrite(itempstring, 80)
-c
-      goto 99
-C---------------------------------------------------------------------
-C		   CHNGVER
-C---------------------------------------------------------------------
-332   continue
-c			Tucson only, must be in execute mode, online avail
-      if (mode .ne. 0) call oerror(n17, m1, 'CHNGVER')
-      if (.not. online) call oerror(n367, m1, 'CHNGVER')
-      if (onlinesite() .ne. 1) call oerror(n232, m1, 'CHNGVER')
-c			Parse the command line: CHNVER type (optional)
-      call getfld
-c
-      if (type .eq. 0) then
-c			no arguments on the command line
-         iftype = -1
-      else if (type .eq. 1 .or. type .eq. 8 .or. type .eq. 11) then
-c			scalar, pointer or const, getfld places it in c array
-         iftype = nint(c(tag))
-      else if (tag .eq. iuplus .or. tag .eq. iuminus) then
-c			or, it could be a signed one of these
-c			this is as complicated as we'll allow
-         sign = 1
-         if (tag .eq. iuminus) sign = -1
-         call getfld
-         if (type .eq. 1 .or. type .eq. 8 .or. type .eq. 11) then
-            iftype = nint(c(tag)) * sign
-         else
-c			bad syntax, give an error
-            call oerror(n29, m1,
-     .         'CHNGVER: must be a SCALAR, POINTER, or REAL CONSTANT')
-         endif
-      else
-c			bad syntax, give an error
-         call oerror(n29, m1,
-     .      'CHNGVER: must be a SCALAR, POINTER, or REAL CONSTANT')
-      endif
-c			make sure at this point that there is NOTHING
-c			remaining on the command line
-      call getfld
-      if (type .ne. 0 .or. tag .ne. 0) then
-         call oerror(n39, m1, 'CHNGVER')
-      endif
-c
-      call chngver(iftype)
-      goto 99
-c---------------------------------------------------
-C
-   99 CONTINUE
-      RETURN
-      END
-c
diff -uNr 3.5/source/conline/str4cur.f unipops-3.6/source/conline/str4cur.f
--- 3.5/source/conline/str4cur.f	2000-03-16 11:34:03.000000000 -0700
+++ unipops-3.6/source/conline/str4cur.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,176 +0,0 @@
-      subroutine str4cur(plottype)
-c
-c     @(#)str4cur.f	5.2 09/10/98
-c
-c     Stores the necessary information for PLOTTYPE plottype for
-c     later use by a cursor routine.  Provides the capability to use
-c     the cursors on multiple plots on the same page.
-c
-      integer*2 plottype
-c
-      integer*2 n32, n120, m1, n128, fshort, curcur, i2hdrsize
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'mappl.inc'
-c
-      parameter (n32=32)
-      parameter (n120=120)
-      parameter (n128=128)
-      parameter (m1=-1)
-      parameter (i2hdrsize=PADDED_HDR_SIZE*4)
-c
-      numplots = curcur()
-c
-      showplot(numplots) = plottype
-c
-      if (plottype .eq. 0) then
-	call copy(i2hdrsize, dtwh(1,1), dplots(1, numplots))
-      else if (plottype .eq. 1) then
-	call copy(fshort(n32), title, dplots(1, numplots))
-	dplots(5, numplots) = xlog
-	dplots(6, numplots) = ylog
-      else if (plottype .ge. 2 .and. plottype .le. 5) then
-	call copy(n128, mhead(1,1), dplots(1, numplots))
-      else
-        call oerror(n120, m1, "STR4CUR")
-      endif
-c
-      showplot(curcur()) = showplot(numplots)
-      ax(curcur()) = ax(numplots)
-      ay(curcur()) = ay(numplots)
-      bx(curcur()) = bx(numplots)
-      by(curcur()) = by(numplots)
-      xorg(curcur()) = xorg(numplots)
-      yorg(curcur()) = yorg(numplots)
-      xmax(curcur()) = xmax(numplots)
-      ymax(curcur()) = ymax(numplots)
-
-      return
-      end
-c
-c----------------------------------
-c
-      subroutine rtrn4cur(ix, iy, whichplot, array, ierr)
-c
-c     Returns values from storage for usage by a cursor routine.
-c     IX, IY = pixel position for which parameters are to be found.
-c     IERR = 0 if all goes OK
-c     whichplot = location in cursor arrays where information about the
-c		desired plot is kept.
-c
-      integer*2 ix, iy, ierr, whichplot, i2hdrsize
-c
-      double precision array(*)
-c
-      integer*2 n32, n120, m1, n128, fshort, i, j, plottype
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'mappl.inc'
-c
-      parameter (n32=32)
-      parameter (n120=120)
-      parameter (n128=128)
-      parameter (m1=-1)
-      parameter (i2hdrsize=PADDED_HDR_SIZE*4)
-c
-      j = numplots + 1
-      do 10 i = 1, MAXPLOTS - 1
-	j = j + 1
-	if (j .gt. MAXPLOTS) j = 1
-        if (showplot(j) .ge. 0) then
-	    if ( ix .ge. xorg(j) .and. ix .le. xmax(j) .and.
-     .		 iy .ge. yorg(j) .and. iy .le. ymax(j)) then
-		     plottype = showplot(j)
-      		     if (plottype .eq. 0) then
-			call copy(i2hdrsize, dplots(1, j), array)
-      		     else if (plottype .eq. 1) then
-			call copy(fshort(n32), dplots(1, j), array)
-      		     else if (plottype .ge. 2 .and. plottype .le. 5) then
-			call copy(n128, dplots(1, j), array)
-      		     else
-        		call oerror(n120, m1, "STR4CUR")
-      		     endif
-		     whichplot = j
-		     ierr = 0
-		     goto 99
-	    endif
-	endif
-10	continue
-c
-      ierr = 1
-c
-99    return
-      end
-c
-c-------------------------------------------
-c
-      subroutine resetcur
-c
-c     Resets cursor arrays to their default values
-c
-      integer*2 i, j, i1, curcur, i2hdrsize
-      double precision dinfinity
-      logical first  
-c
-      include 'appl.inc'
-c
-      parameter (i2hdrsize=PADDED_HDR_SIZE*4)
-      data first/.true./
-c
-      if (.not. first) then
-	if (curcur() .ne. 1) then
-	  xmax(1) = xmax(curcur())
-	  ymax(1) = ymax(curcur())
-	  xorg(1) = xorg(curcur())
-	  yorg(1) = yorg(curcur())
-	  ax(1) = ax(curcur())
-	  ay(1) = ay(curcur())
-	  bx(1) = bx(curcur())
-	  by(1) = by(curcur())
-	  call copy(i2hdrsize, dplots(1,curcur()), dplots(1,1))
-	endif
-	showplot(1) = -1
-	i1 = 2
-      else
-	i1 = 1
-	first = .false.
-      endif
-c     If first initialization, initialize all parts of the cursor arrays
-c     If not, initialize all but slot one and store in slot 1 the current
-c     contents of the cursor arrays.
-c
-      numplots = 0
-      do 905 i = i1, MAXPLOTS
-        XORG(i)=1
-        YORG(i)=1
-        XMAX(i)=1024
-        YMAX(i)=800
-        ax(i) = 0.0
-        ay(i) = 0.0
-        bx(i) = 0.0
-        by(i) = 0.0
-        showplot(i) = -1
-        do 906 j = 1, PADDED_HDR_SIZE
-	   dplots(j, i) = dinfinity()
-906	   continue
-905	continue
-c
-      return
-      end
-c
-c-------------------------------------------
-c
-      integer*2 function curcur()
-c
-c     Returns the array location for the current plot
-c
-      include 'appl.inc'
-c
-      curcur = numplots + 1
-      if (curcur .gt. MAXPLOTS) curcur = 1
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/subs.f unipops-3.6/source/conline/subs.f
--- 3.5/source/conline/subs.f	2000-03-16 11:33:39.000000000 -0700
+++ unipops-3.6/source/conline/subs.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,84 +0,0 @@
-      SUBROUTINE SUBS
-C-------------------------------------------------------------------------------
-C  @(#)subs.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C Modified 890105 [PPM] includes to .inc, lowercase
-c          8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      integer*2 idata, n, ndim, index, isize, i, ndelta, j
-      integer*2 n0, n106, n112, n128, n129, m1
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-c
-      data n0, n106, n112, n128, n129, m1 
-     .     /0, 106, 112, 128, 129, -1/
-C
-C=======================================================================
-C
-C---------------------------------------------------------------------
-C		   S U B S   O P E R A T O R			 
-C---------------------------------------------------------------------
-C
-      if (sp .le. 4) call oerror(n112, m1, 'Array subscripts')
-      IDATA=STACK(SP)
-      TAG=STACK(SP-2)
-      TYPE = STACK(SP-4)
-      if (idata .le. 0) call oerror(n106, m1, 'Array subscripts')
-      N=K(IDATA)
-      NDIM=K(IDATA+1)
-      SP=SP-5
-      INDEX=0
-C			     get field length data if character	string
-      IF (TYPE.eq.7) then
-	 NDIM =	NDIM - 1
-	 ISIZE = K(IDATA + 3)
-	 IDATA = IDATA + 2
-      endif
-      I=SP-NDIM+1
-c
-      if (i .le. 0) call oerror(n106, m1, 'Array subscripts')
-c     Error if the wrong number of dimensions are specified
-c
-      SP=I
-      NDELTA=1
-      DO 9801 J=1,NDIM
-	 IDATA=IDATA+2
-         if (nint(v(i)) .lt. k(idata) .or.
-     1	     nint(v(i)) .ge. k(idata) + k(idata+1)) 
-     2		call oerror(n128, m1, 'Array subscripts')
-c	 Traps out-of-bounds on arrays
-c
-	 INDEX=INDEX+NDELTA*(V(I)-K(IDATA))
-	 NDELTA=NDELTA*K(IDATA+1)
-C			     put value of array	location on stack
-         I=I+1
-9801     continue
-c
-      IF (TYPE.EQ.7) GO TO 9802
-      IF (INDEX.ge.N) call oerror(n128, m1, 'Array subscripts')
-c
-      INDEX=TAG+INDEX
-      if (index .le. 0 .or. sp .le. 0) call oerror(n106, m1, 
-     .		'Array subscripts')
-      STACK(SP)=INDEX
-      V(SP)=C(INDEX)
-      GO TO 99
-C			     put string	subfield parameters onto stack
-9802  INDEX = INDEX * ISIZE
-      IF (INDEX.ge.N) then
-         nspacen = 32767.
-         call oerror(n128, m1, 'Array subscripts')
-      endif
-      INDEX = INDEX + TAG
-      if (sp .le. 0) call oerror(n106, m1, 'Array subscripts')
-      STACK(SP)	= TYPE
-      STACK(SP+1) = ISIZE
-      STACK(SP+2) = INDEX
-      STACK(SP+3) = 3
-      SP = SP +	3
-   99 CONTINUE
-C---------------------------------------------------------
-      END
diff -uNr 3.5/source/conline/tcopy.f unipops-3.6/source/conline/tcopy.f
--- 3.5/source/conline/tcopy.f	2000-03-16 11:33:39.000000000 -0700
+++ unipops-3.6/source/conline/tcopy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,53 +0,0 @@
-      subroutine tcopy
-C-------------------------------------------------------------------------------
-C  @(#)tcopy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Makes a hard copy of the text screen
-c
-      character*90 output
-      integer*4 unlink, irtn, system, istat, istat1
-      logical*2 inquirefile
-      integer*2 n0, n129
-c
-      data n0, n129 /0, 129/
-c
-      include 'cio.inc'
-c
-      if (iprinttype .le. 0) then
-	call oerror(n129, n0, 'TCOPY')
-	return
-      endif
-c
-      if (inquirefile(couttxt)) irtn = unlink(couttxt)
-      open(unit=iouttxt,file=couttxt,status='new',iostat=istat)
-      rewind(iouttxt,iostat=istat1)
-c
-      if (istat .ne. 0 .or. istat1 .ne. 0) then
-	write(istderr,*) 'Cannot perform TCOPY... Bad file designation'
-	return
-      endif
-c
-      if (iprinttype .eq. 5) then
-        call quichardtcopy
-      else if (iprinttype .eq. 4) then
-	call hphardtcopy
-      else if(iprinttype .eq. 3) then
-	call posthardtcopy
-      else if(iprinttype .eq. 2) then
-	call qmshardtcopy
-      else if(iprinttype .eq. 1) then
-	call noghardtcopy
-      endif
-c
-      output = 'printit ' // printer // ' ' // 
-     .            printtype // ' ' // couttxt
-c
-      close(iouttxt,status='keep',iostat=istat)
-      irtn = system(output)
-      if (irtn .ne. 0) write(istderr,*) 'Internal problem with TCOPY'
-      irtn = unlink(couttxt)
-      if (irtn .ne. 0) write(istderr,*) 'Internal problem with TCOPY'
-      return
-      end
-c
diff -uNr 3.5/source/conline/tekchar.f unipops-3.6/source/conline/tekchar.f
--- 3.5/source/conline/tekchar.f	2000-03-16 11:33:40.000000000 -0700
+++ unipops-3.6/source/conline/tekchar.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-      subroutine tekchar(string, nchar)
-C-------------------------------------------------------------------------------
-C  @(#)tekchar.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Outputs a string in a Tektronix style
-c***********************************************
-c 8904  [RJM]
-c***********************************************
-c
-      include 'cio.inc'
-c
-      integer*2 string(*), istch(50), nchar, nchar2, iwpc, lastblnk
-      integer*2 n1, n80
-      character*100 stch
-c
-      data n1, n80 /1, 80/
-c
-      equivalence (stch, istch)
-c
-      stch = ' '
-      nchar2 = min(nchar,n80)
-      call copy(iwpc(nchar2), string, istch)
-      nchar2 = min(lastblnk(stch),nchar2)
-c
-      call putchar(char(31),n1,istdout)
-      if (nchar2 .ne. 0) call putchar(stch(1:nchar2), nchar2, istdout)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/tekclrpage.f unipops-3.6/source/conline/tekclrpage.f
--- 3.5/source/conline/tekclrpage.f	2000-03-16 11:33:40.000000000 -0700
+++ unipops-3.6/source/conline/tekclrpage.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,30 +0,0 @@
-      subroutine tekclrpage
-C-------------------------------------------------------------------------------
-C  @(#)tekclrpage.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Clears TEKTRONIX graphics screen
-c*********************************************
-c 8904 [RJM]
-c*********************************************
-c
-      include 'cio.inc' 
-c
-      integer*2 ipage
-      integer*2 n0, n1, n2, n750
-      character*2 cpage
-c
-      equivalence (cpage, ipage)
-      data ipage/6924/
-c
-      data n0, n1, n2, n750 / 0, 1, 2, 750/
-c
-      call tekchar(cpage,n2)
-      call place(n0,n750)
-      call putchar(char(31),n1,istdout)
-c
-      return
-      end
-c
-c*******************
-c
diff -uNr 3.5/source/conline/tekcursor.f unipops-3.6/source/conline/tekcursor.f
--- 3.5/source/conline/tekcursor.f	2000-03-16 11:33:40.000000000 -0700
+++ unipops-3.6/source/conline/tekcursor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,54 +0,0 @@
-      subroutine tekcursor(irtn, ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)tekcursor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Returns cursor position in TEKTRONIX
-c*************************************************************************
-c 8904 [RJM]
-c*************************************************************************
-c
-      include 'cio.inc'
-c
-      real xscale, yscale
-      integer*2 iix, iiy
-c			make all TEK-like devices 15/16th full size 15/16 = 0.9375
-      parameter (yscale=0.9375)
-      parameter (xscale=0.9375)
-c
-      integer*2 icross, icrhex, irtn, ix, iy
-      integer*2 n2, n6
-      character*1 cciout(6)
-      integer*4 long
-c
-      data icrhex /6938/
-      data n2, n6 /2, 6/
-c     icrhex = 1b1a = ESC + SUB
-c
-      if (irtn .eq. 1) then
-        write(istdout,*) 'Hit space bar for coordinates; ',
-     1	            'Anything else to exit'
-	call updateline(' ')
-      else if(irtn.eq.0) then
-	write(istdout,*) 'Hit space bar for coordinates'
-	call updateline(' ')
-      endif
-      call flush(long(istdout))
-      icross = icrhex
-      call tekchar(icross, n2)
-      call rdrm(istdin, n6, cciout)
-      call upack(iix, iiy, irtn, cciout)
-c			scale the numbers back
-      ix = nint(float(iix) / xscale)
-      iy = nint(float(iiy) / yscale)
-c
-      if (irtn .eq. 32) then
-        irtn = -1
-      else
-        irtn = -2
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/tekint.f unipops-3.6/source/conline/tekint.f
--- 3.5/source/conline/tekint.f	2000-03-16 11:33:41.000000000 -0700
+++ unipops-3.6/source/conline/tekint.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,18 +0,0 @@
-      subroutine tekint
-C-------------------------------------------------------------------------------
-C  @(#)tekint.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Initializes and close TEKTRONIX Graphics Screen
-c*********************************************
-c 8904 [RJM]
-c*********************************************
-c
-      return
-c
-      entry tekclose
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/tekplace.f unipops-3.6/source/conline/tekplace.f
--- 3.5/source/conline/tekplace.f	2000-03-16 11:33:41.000000000 -0700
+++ unipops-3.6/source/conline/tekplace.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine tekplace(ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)tekplace.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR call -- TEKTRONIX 4010
-c****************************************************
-c 8904 [RJM]
-c****************************************************
-c
-      real xscale, yscale
-      integer*2 iix, iiy
-c			make all TEK-like devices 15/16th full size 15/16 = 0.9375
-      parameter (yscale=0.9375)
-      parameter (xscale=0.9375)
-c
-      integer*2 ix, iy
-      integer*2 n1, n4
-      include 'cio.inc'
-c
-      character*4 cout
-c
-      data n1, n4 /1, 4/
-c
-      iix = nint(ix*xscale)
-      iiy = nint(iy*yscale)
-      call putchar(char(29), n1, istdout)
-      call packer(iix,iiy,cout)
-      call putchar(cout,n4,istdout)
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/tekvctr.f unipops-3.6/source/conline/tekvctr.f
--- 3.5/source/conline/tekvctr.f	2000-03-16 11:33:41.000000000 -0700
+++ unipops-3.6/source/conline/tekvctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine tekvctr(ix,iy)
-C-------------------------------------------------------------------------------
-C  @(#)tekvctr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a line from the position last specified by
-c     move to the position ix, iy -- TEKTRONIX 4010
-c***************************************
-c 8904 [RJM
-c***************************************
-c
-      real xscale, yscale
-      integer*2 iix, iiy
-c			make all TEK-like devices 15/16th full size 15/16 = 0.9375
-      parameter (yscale=0.9375)
-      parameter (xscale=0.9375)
-c
-      integer*2 ix, iy
-      integer*2 n4
-      include 'cio.inc'
-c
-      character*4 cout
-c
-      data n4 /4/
-c
-      iix = nint(ix*xscale)
-      iiy = nint(iy*yscale)
-      call packer(iix,iiy,cout)
-      call putchar(cout, n4, istdout)
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/conline/tickmrk.f unipops-3.6/source/conline/tickmrk.f
--- 3.5/source/conline/tickmrk.f	2000-03-16 11:33:42.000000000 -0700
+++ unipops-3.6/source/conline/tickmrk.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,72 +0,0 @@
-      subroutine tickmrk(f1, f2, maxtick, x1, x2, ddx, numtick)
-c
-c----------------------------------------
-c  @(#)tickmrk.f	5.1 06/22/94
-c----------------------------------------
-c
-c     Calculates aesthetic tick marks for plots.
-c     F1, F2 = (R*4) end points of plots (INPUT)
-c     MAXTICK = (I*2) Maximum number of tickmarks to be allowed.
-c     X1, X2 = (R*4) first and last tick mark to be used (OUTPUT)
-c     DDX = (R*4) increment between tickmarks
-c     NUMTICK = (I*2) number of tick marks to be drawn
-
-      real test(13), f1, f2, x1, x2, ddx, r1, r2, a1, a2, a3, adx, 
-     1     xtemp, dx
-      integer*2 numtick, i, maxtick
-c
-      data test/.001,.002,.004,.005,.01,.02,.04,.05,.1,.2,.4,.5,1.0/
-c
-      r1 = min(f1,f2)
-      r2 = max(f1,f2)
-c
-      dx = r2 - r1
-      if (dx .eq. 0) then
-	x1 = f1
-	x2 = f2
-	numtick = 0
-	ddx = 0.
-      else
-c
-         a1 = log10(dx)
-         a2 = aint(a1)
-         a3 = 10.**a2   
-         adx = dx / a3
-c
-         do 20 i = 1, 13
-	   numtick = adx/test(i)
-	   if (numtick .le. maxtick) goto 25
-20	   continue
-         i = 13
-c
-25       ddx = test(i)*a3
-         x1 = ddx * anint((r1 + ddx) / ddx)
-c
-26	 continue
-         if (x1 - ddx .ge. r1) then
-		x1 = x1 - ddx
-		goto 26
-	 endif
-c
-         x2 = ddx * anint((r2 - ddx) / ddx)
-c
-27	 continue
-         if (x2 + ddx .le. r2) then
-	    	x2 = x2 + ddx
-		goto 27
-	 endif
-c
-         numtick = max(1, 1 + nint((x2-x1)/ddx) ) 
-c
-         if (f1 .gt. f2) then
-	   ddx = -ddx
-	   xtemp = x2
-	   x2 = x1
-	   x1 = xtemp
-         endif
-c
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/tuc/access.c unipops-3.6/source/conline/tuc/access.c
--- 3.5/source/conline/tuc/access.c	2000-03-16 11:37:57.000000000 -0700
+++ unipops-3.6/source/conline/tuc/access.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,1119 +0,0 @@
-/* @(#)access.c	5.5 05/03/95 */
-
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <malloc.h>
-
-#include <tucaccess.h>
-#include <sdd.h>
-
-#define RETURN(N) \
-   {\
-      *return_code = N * 10000 + errno;\
-      return;\
-   }\
-
-
-void openaccess_(anal_user_code, anal_user_name, anal_site_name, return_code)
-char *anal_user_code, *anal_user_name, *anal_site_name;
-int *return_code;
-{
-   short int ier;
-   int n, len, iftype, ivers;
-   void getinit(), make_user_code(), chngonline_(), progname_(), olfiles_();
-   char prog[2];
-
-   *return_code = 0;
- 
-/*		some initial values		 */
- 
-   for (n=0;n<3;n++) {
-      strcpy(onfile[n].type, ftype[n].c);
-      onfile[n].data_status = ST_UNAVAIL;
-      onfile[n].gain_status = ST_UNAVAIL;
-      onfile[n].datafile.fd = -1;
-      onfile[n].datafile.index = 0;
-      onfile[n].datafile.unit = -1;
-      onfile[n].gainfile.fd = -1;
-      onfile[n].gainfile.index = 0;
-      onfile[n].gainfile.unit = -1;
-      onfile[n].version = -1;
-   }
- 
-
-/* 			get env values */
- 
-   getinit();
-
-/*			initialize the files, etc */
- 
-   if (strlen(obsinit) != 0) {
-      if (access(datadir, 4) != 0) {
-         strcpy(datadir, ".");
-      }
-/*	if datadir can't be accessed, just substitude current directory */
-
-      for (n=0;n<3;n++) {
-         iftype = n+1;
-         ivers = 0;
-         chngonline_(&iftype, &ivers, anal_user_code, &ier);
-      }
-
-/*		set default initial file type */
-/*		FB, unlist condar is running, then CON */
-
-      filetype = FBTYPE;
-      progname_(prog);
-      if (*prog == 'c' || *prog == 'C') filetype = CONTYPE;
-
-/*		finally, have olfiles display what we've just set up */
-
-      olfiles_();
-  
-      make_user_code(anal_user_code);
-   } else {
-/*		if obsinit isn't set, there is NO way to access any data */
-      RETURN(-1)
-   }
-}
-
-void setformat_(fmtcode, return_code)
-   int *fmtcode, *return_code;
-{
-/*			this only can return SDD format data */
-/*			return an error (1) if any other format is requested */
-   *return_code = 0;
-   if (*fmtcode != SDDFMT) *return_code = 1;
-}
-
-void closeaccess_()
-{
-/*			close the files		*/
-   int n;
-
-   for (n=0;n<3;n++) {
-      if (onfile[n].datafile.fd != -1) {
-         close(onfile[n].datafile.fd);
-         free(onfile[n].datafile.index);
-         onfile[n].datafile.index = 0;
-         onfile[n].datafile.fd = -1;
-         onfile[n].data_status = ST_UNAVAIL;
-      }
-      if (onfile[n].gainfile.fd != -1) {
-         close(onfile[n].gainfile.fd);
-         free(onfile[n].gainfile.index);
-         onfile[n].gainfile.index = 0;
-         onfile[n].gainfile.fd = -1;
-         onfile[n].gain_status = ST_UNAVAIL;
-      }
-   }
-}
-
-/*	allow user to change initials if current OBSINT env variable */
-/*      is "sys" */
-
-void chgprj_(anal_user_code, anal_user_name, anal_site_name, return_code)
-char *anal_user_code, *anal_user_name, *anal_site_name;
-int *return_code;
-{
-   char *topdata, *envinit;
-   short int ier;
-   int n, iftype, iver, oldftype;
-   void make_user_code(), chngonline_();
-   
-   *return_code = 0;
-
-   envinit = getenv("OBSINIT");
-   if (envinit != NULL) {
-      if (strcmp(envinit,"sys") == 0) {
-/*			allow change of initials */
-         if (strcmp(anal_user_code,"tucson") == 0) {
-            strcpy(obsinit,"sys");
-            strcpy(anal_user_code, "sys");
-            iver = 0;
-            for (n=0;n<3;n++) {
-               iftype = n+1;
-               chngonline_(&iftype, &iver, anal_user_code, &ier);
-            }
-         } else {
-            strncpy(obsinit,anal_user_code,3);
-            if (strchr(obsinit,' ') != NULL) *strchr(obsinit,' ') = '\0';
-            topdata = getenv("TOPDATA");
-            datadir[0] = '\0';
-            if (topdata != NULL) {
-               strcpy(datadir, topdata);
-               strcat(datadir,"/");
-               strcat(datadir,obsinit);
-            }
-            if (strlen(datadir) == 0) strcpy(datadir, ".");
-            oldftype = filetype;
-            for (n=0;n<3;n++) {
-               iftype = n+1;
-/*				set the version to -1 to force a reopen */
-               onfile[n].version = -1;
-               iver = 0;
-               chngonline_(&iftype, &iver, anal_user_code, &ier);
-            }
-/*				restore original file type */
-            filetype = oldftype;
-         }
-      }
-   }
-   make_user_code(anal_user_code);
-}
-
-/* get the list of LINE scans in the default file that belong to this project */
-
-void gscanlist2_(actno, maxno, list, return_code)
-int *actno;		/* actual number of scans sent back */
-int *maxno;		/* the max number to send back */
-float *list;		/* the list of scan numbers */
-int *return_code;	/* not used */
-{
-
-   sddfile *file;
-   void getlist();
-
-   file = &(onfile[filetype-1].datafile);
-   getlist(file, "LINE", actno, maxno, list);
-   *return_code = 0;
-}
-
-/* get the list of gain scans in the default file that belong to this project */
-
-void ggscanlist2_(actno, maxno, list, return_code)
-int *actno;		/* actual number of scans sent back */
-int *maxno;		/* the max number to send back */
-float *list;		/* the list of scan numbers */
-int *return_code;	/* not used */
-{
-
-   sddfile *file;
-   void getlist();
-
-   file = &(onfile[filetype-1].gainfile);
-   getlist(file, "LINE", actno, maxno, list);
-   *return_code = 0;
-}
-
-/* get the list of CONT scans in the default file that belong to this project */
-
-void gcontlist2_(actno, maxno, list, return_code)
-int *actno;		/* actual number of scans sent back */
-int *maxno;		/* the max number to send back */
-float *list;		/* the list of scan numbers */
-int *return_code;	/* not used */
-{
-
-   sddfile *file;
-   void getlist();
-
-   file = &(onfile[filetype-1].datafile);
-   getlist(file, "CONT", actno, maxno, list);
-   *return_code = 0;
-}
-
-/*	this is what actually does the work for making lists of scans */
-
-void getlist(file, mode, actno, maxno, list)
-sddfile *file;
-char *mode;
-int *actno;
-int *maxno;
-float *list;
-{
-
-   int n, scan, numout, modecode, modetst;
-   int getincbs();
-
-   *actno = 0;
-
-   if (getincbs(file) != 0) return;
-
-/*		translate the mode into its appropriate code */
-   modecode = 0;
-   if (strncmp(mode, "CONT", 4) == 0) modecode = 1;
-   if (strncmp(mode, "LINE", 4) == 0) modecode = 2;
-
-   numout = 0;
-   for (n=0;n<file->bs.num_entries_used;n++) {
-      scan = file->index[n].scan_number;
-      modetst = file->index[n].obsmode / 256;
-      if ((scan != 0) &&  ((modecode == 0) || (modetst == modecode))) {
-         *(list+numout) = (float) scan + 
-                                (float) file->index[n].feed_number/100.0;
-         numout++;
-      }
-      if (numout >= *maxno) break;
-   }
-   *actno = numout;
-}
-
-/* This function standardizes the rule on where to find a particular subscan number */
-
-int filenum(subscan)
-    int subscan;                 /* the subscan number */
-{
-    int fnum;
-    if (subscan >= 11) {
-	fnum = HCTYPE - 1;
-    } else if (subscan < 11 && subscan != 0) {
-	fnum = FBTYPE - 1;
-    } else {
-	/* use the default */
-	fnum = filetype - 1;
-    }
-    return fnum;
-}
-
-/* get a particular LINE scan */
-
-void gscan_(scan, sub, record, return_code)
-int *scan;			/* scan number */
-int *sub;			/* subscan number */
-char *record;			/* buffer to fill */
-int *return_code;
-{
-
-   sddfile *file;
-   void getit();
-
-   file = &(onfile[filenum(*sub)].datafile);
-
-   getit(file, "LINE", scan, sub, record, return_code);
-}
-
-/* get the header for a particular LINE scan */
-
-void gshead_(scan, sub, record, return_code)
-int *scan;			/* scan number */
-int *sub;			/* subscan number */
-char *record;			/* buffer to fill */
-int *return_code;
-{
-	gscan_(scan, sub, record, return_code);
-}
-
-/* get a particular gain scan */
-
-void ggscan_(scan, sub, record, return_code)
-int *scan;			/* scan number */
-int *sub;			/* subscan number */
-char *record;			/* buffer to fill */
-int *return_code;
-{
-
-   sddfile *file;
-   void getit();
-
-   file = &(onfile[filenum(*sub)].gainfile);
-
-   getit(file, "LINE", scan, sub, record, return_code);
-}
-
-/*
-** Get the Spectral Processsor scan
-*/
-void gspscan_(scan_no,feed_no,record,return_code)
-	int *scan_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-}
-
-/*
-** Get the Spectral Processsor individual record
-*/
-void gspir_(scan_no,feed_no,phase_no, rec_no,record,return_code)
-	int *scan_no, phase_no, rec_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-}
-/*
-** Get the AC individual record
-*/
-void gacir_(scan_no,feed_no,phase_no, rec_no,record,return_code)
-	int *scan_no, phase_no, rec_no;
-	int *feed_no;
-	float *record;
-	int *return_code;
-{
-}
-
-#define OTF 0
-#define PZ 1
-
-void getweird(type, scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *type;
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-    char *rptr, field[4];
-    short id, irtn, *class_0;
-    int curpos, toread, startat, i, bytperrec;
-    int nrecs, hbytes, dbytes, n, indtype;
-    float *fbuf, *fptr;
-    double *headlen, *datalen, *noint, *dbuf;
-    sddfile *file;
-    void modefield_();
-    int nextra = 5;
-
-    /* first, guess which file is appropriate */
-    /* use the default feed number if not already set */
-    if (*feed_no == 0) {
-	*feed_no = 1;
-	if (filetype == HCTYPE -1) *feed_no = 11;
-    }
-    file = &(onfile[filenum(*feed_no)].datafile);
-    if (file->fd <0 || getincbs(file) != 0) {
-	*return_code = -370;
-	return;
-    }
-
-    /* find a matching scan number */
-    for (i=0;i<file->bs.num_entries_used;i++) {
-      if ((file->index[i].scan_number == *scan_no) &&
-          (file->index[i].feed_number == *feed_no)) break;
-    }
-    if (i >= file->bs.num_entries_used) {
-	/* not found, see if it is in the other file */
-	file = &(onfile[FBTYPE-1].datafile);
-	if (file->fd >0 && getincbs(file) == 0) {
-	    for (i=0;i<file->bs.num_entries_used;i++) {
-		if ((file->index[i].scan_number == *scan_no) &&
-		    (file->index[i].feed_number == *feed_no)) break;
-	    }
-	}
-	if (i >= file->bs.num_entries_used) {
-	    /* still not found, give up */
-	   *return_code = 362;
-	   return;
-	}
-    }
-    /* finally, determine the type as shown in the index */
-    id = file->index[i].obsmode - 512;
-    if (id >= 0) {
-	modefield_(&id, field, &irtn);
-	if (strncmp(&field[2],"PZ",2) == 0) {
-	    nextra = 0;
-	} else if (strncmp(field,"OTF ",4) != 0) {
-	    /* bad type */
-	    *return_code = 362;
-	    return;
-	}
-    } else {
-	/* no id, we must assume its the wrong type */
-	*return_code = 362;
-	return;
-    }
-/* 		position it */
-   bytperrec = file->bs.bytperrec;
-   startat = file->index[i].start_rec * bytperrec;
-   if (lseek(file->fd, startat, SEEK_SET) == -1) {
-      *return_code = -357;
-      return;
-   }
-
-/*		read the first record */
-   rptr = record;
-   if (read(file->fd, rptr, bytperrec) != bytperrec) {
-      *return_code = -357;
-      return;
-   }
-   rptr += bytperrec;
-/*		some sanity checks */
-   class_0 = (short *)record;
-   if (class_0[0] < 12 || class_0[1] > bytperrec || class_0[1] < 5) {
-      *return_code = -357;
-      return;
-   }
-/*		read the rest of the header */
-   dbuf = (double *)record;
-   headlen = (dbuf + class_0[1] - 1);
-   hbytes = *headlen;
-   toread = hbytes - bytperrec;
-   if (toread > 0) {
-      if (read(file->fd, rptr, toread) != toread) {
-         *return_code = -357;
-         return;
-      }
-   }
-   rptr += toread;
-/*		set up the other header pointers, with sanity checks */
-   if ((class_0[12] + 15) > hbytes || (class_0[12] <= 0)) {
-      *return_code = -357;
-      return;
-   }
-
-   datalen = (dbuf + class_0[1]);
-   dbytes = *datalen;
-   noint = (dbuf + class_0[12] + 13);
-   if (*noint <= 0) {
-      *return_code= -357;
-      return;
-   }
-
-    nrecs = (dbytes / (*noint + nextra)) / sizeof(float);
-    if (dbytes != nrecs * sizeof(float) * (*noint + nextra)) {
-	*return_code = -357;
-	return;
-    }
-   if (*rec_no == 0 || *rec_no > nrecs || *rec_no < -nextra) {
-      *return_code = 362;
-      return;
-   }
-   
-/*		seek to and read the requested data */
-/*		rec_no < 0 imply one of the last 5 arrays */
-/*  The above check against nextra has verified that this should be safe in all cases */
-   if (*rec_no < 0) {
-      startat = *noint * sizeof(float) * nrecs;
-      startat = startat + ((-1)*(*rec_no)-1)*nrecs*sizeof(float);
-      toread = nrecs * sizeof(float);
-   } else {
-      startat = (*noint * sizeof(float) * (*rec_no - 1));
-      toread = *noint * sizeof(float);
-   }
-
-   if (lseek(file->fd, startat, SEEK_CUR) == -1) {
-      *return_code = -357;
-      return;
-   }
-   curpos = startat;
-   if (toread > ((MAX_DATA_POINTS - nextra)*sizeof(float))) 
-            toread = (MAX_DATA_POINTS - nextra)*sizeof(float);
-   if (read(file->fd, rptr, toread) != toread) {
-      *return_code = -357;
-      return;
-   }
-   rptr += toread;
-   curpos = curpos + toread;
-   *datalen = *noint * sizeof(float);
-
-/*		seek to and read the 5 informational values for this rec */
-/*		but only if *rec_no > 0 && nextra == 5 && this is an OTF request */
-   if (*rec_no > 0) {
-       if (nextra == 5 && type == OTF) {
-	   startat = *noint * nrecs * sizeof(float);
-	   toread = nrecs * sizeof(float);
-	   if ((fbuf = (float *)malloc(toread)) == NULL) {
-	       *return_code = -357;
-	       return;
-	   }
-	   if (lseek(file->fd, (startat - curpos), SEEK_CUR) == -1) {
-	       *return_code = -357;
-	       free(fbuf);
-	       return;
-	   }
-	   fptr = (float *)rptr;
-	   for (n=0;n<5;n++) {
-	       if (read(file->fd, fbuf, toread) != toread) {
-		   *return_code = -357;
-		   free(fbuf);
-		   return;
-	       }
-	       *fptr = fbuf[*rec_no - 1];
-	       fptr++;
-	   }
-/*		fbuf can be freed now */
-	   free(fbuf);
-/*		And finally, reset DATALEN and NOINT */
-	   *noint = *noint + 5;
-	   *datalen = *noint * sizeof(float);
-       } else if (type == OTF) {
-	   /* just assign 0's */
-	   fptr = (float *)rptr;
-	   for (i=n;n<5;n++,fptr++) *fptr = 0.0;
-	   *noint = *noint + 5;
-	   *datalen = *noint * sizeof(float);
-       }
-   } else {
-      *noint = nrecs;
-      *datalen = nrecs * sizeof(float);
-   }
-   *num_rec = nrecs;
-   *return_code = 0;
-}
-
-void gotfrec_(scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-
-/*            everything now happens in getweird */
-
-   getweird(OTF, scan_no, feed_no, rec_no, num_rec, record, return_code);
-   return;
-}
-
-
-/*
-** Get a polariz. record
-*/
-void gpzrec_(scan_no, feed_no, rec_no, num_rec, record, return_code)
-int *scan_no, *feed_no, *rec_no, *num_rec;
-char *record;
-int *return_code;
-{
-   getweird(PZ, scan_no, feed_no, rec_no, num_rec, record, return_code);
-   return;
-}
-/* get a particular CONT scan */
-
-void gcont_(scan, sub, actualpoints, maxpoints, record, return_code)
-int *scan;			/* scan number */
-int *sub;			/* subscan number */
-int *actualpoints;		/* not set */
-int *maxpoints;			/* not checked */
-char *record;			/* buffer to fill */
-int *return_code;
-{
-
-   int fnum;
-   sddfile *file;
-   void getit();
-
-/*		 	which file */
-
-   fnum = CONTYPE - 1;
-
-   file = &(onfile[fnum].datafile);
-
-   getit(file, "CONT", scan, sub, record, return_code);
-}
-
-void gchead_(scan, sub, record, return_code)
-int *scan;			/* scan number */
-int *sub;			/* subscan number */
-char *record;			/* buffer to fill */
-int *return_code;
-{
-	int *actualpoints = 0;		/* not set */
-	int *maxpoints = 0;		/* not checked */
-	gcont_(scan, sub, actualpoints, maxpoints, record, return_code);
-}
-
-/*		this is what does the actual work when fetching scans */
-
-void getit(file, mode, scan, sub, record, return_code)
-sddfile *file;			/* the file to fetch it from */
-char *mode;			/* To check agains the mode in the index */
-int *scan;			/* the scan number to fetch */
-int *sub;			/* the subscan number to fetch */
-char *record;			/* where to return it */
-int *return_code;		/* the error code */
-{
-
-   int i, j, offset, toread, getincbs(), tscan, modecode, modetst;
-   int start_rec, bytperrec;
-
-/*		find the scan in the the index, must match type and subscan */
-
-   if (file->fd < 0 || getincbs(file) != 0) RETURN(5)
-
-   if (*sub == 0) {
-      *sub = 1;
-      if (filetype == HCTYPE - 1) *sub = 11;
-   }
-
-/*		translate the mode into its appropriate code */
-   modecode = 0;
-   if (strncmp(mode, "CONT", 4) == 0) modecode = 1;
-   if (strncmp(mode, "LINE", 4) == 0) modecode = 2;
-
-/*		see if anything matches in the in index */
-   for (i=0;i<file->bs.num_entries_used;i++) {
-      modetst = file->index[i].obsmode / 256;
-      if ((file->index[i].scan_number == *scan) &&
-          (file->index[i].feed_number == *sub) &&
-          ((modecode == 0) || (modetst == modecode))) break;
-   }
-
-   if (i >= file->bs.num_entries_used) RETURN(5)
-            
-/*		position it */
-   start_rec = file->index[i].start_rec;
-   bytperrec = file->bs.bytperrec;
-   if (lseek(file->fd, (start_rec * bytperrec), SEEK_SET) == -1) RETURN(6)
-
-/*		read it */
-   toread = file->index[i].nb_rec * bytperrec;
-   if (toread > sizeof(sddformat)) toread = sizeof(sddformat);
-
-   if (read(file->fd, record, toread) != toread) RETURN(7)
-
-   *return_code = 0;
-}
-
-/* Get the last completed LINE scan */
-
-void gcscan_(record, sub, return_code)
-char *record;			/* where to put it */
-int *sub;			/* subscan number to find */
-int *return_code;
-{
-   sddfile *file;
-   int fnum;
-
-   if (*sub >= 11) {
-      fnum = HCTYPE - 1;
-   } else if (*sub < 11 || *sub != 0) {
-      fnum = FBTYPE - 1;
-   } else {
-/*			just use the current default */
-      fnum = filetype - 1;
-   }
-
-   file = &(onfile[fnum].datafile);
-
-   getlast(file, "LINE", &fnum, sub, record, return_code);
-}
-
-/* Get the last completed gain scan */
-
-void glgscan_(record, sub, return_code)
-char *record;			/* where to put it */
-int *sub;			/* subscan number to find */
-int *return_code;
-{
-   sddfile *file;
-   int fnum;
-
-   if (*sub >= 11) {
-      fnum = HCTYPE - 1;
-   } else if (*sub < 11 || *sub != 0) {
-      fnum = FBTYPE - 1;
-   } else {
-/*			just use the current default */
-      fnum = filetype - 1;
-   }
-
-   file = &(onfile[fnum].gainfile);
-
-   getlast(file, "LINE", &fnum, sub, record, return_code);
-}
-
-/* Get the last completed CONT scan */
-
-void glcont_(sub, actualpoints, maxpoints, record, return_code)
-int *sub;			/* subscan number to find */
-int *actualpoints, *maxpoints;  /* not used or set */
-char *record;			/* where to put it */
-int *return_code;
-{
-   sddfile *file;
-   int fnum;
-
-   fnum = CONTYPE - 1;
-
-   file = &(onfile[fnum].datafile);
-
-   getlast(file, "CONT", &fnum, sub, record, return_code);
-}
-
-/*	this is what really does it when fetching the last scan */
-
-getlast(file, mode, fnum, sub, record, return_code)
-sddfile *file;				/* the file to fetch it from */
-char *mode;				/* the mode it must be */
-int *fnum;				/* the file number */
-int *sub;				/* the sub it must be */
-char *record;				/* the place to put it */
-int *return_code;
-{
-
-   int last, j, toread, getincbs(), modecode, modetst, bytperrec, start_rec;
-
-   if (file->fd < 0 || getincbs(file) != 0) RETURN(5)
-
-/*		translate the mode into its appropriate code */
-   modecode = 0;
-   if (strncmp(mode, "CONT", 4) == 0) modecode = 1;
-   if (strncmp(mode, "LINE", 4) == 0) modecode = 2;
-
-   last = file->bs.num_entries_used - 1;
-
-   for (j=last;j>=0;j--) {
-      modetst = file->index[j].obsmode / 256;
-      if (file->index[j].feed_number == *sub &&
-          ((modecode == 0) || (modetst == modecode))) break;
-   }
-   if (j < 0) RETURN(5)
-
-/*			find it and read it */
-
-   start_rec = file->index[j].start_rec;
-   bytperrec = file->bs.bytperrec;
-   if (lseek(file->fd, (start_rec * bytperrec), SEEK_SET) == -1) RETURN(6)
-   toread = file->index[j].nb_rec * bytperrec;
-   if (read(file->fd, record, toread) != toread) RETURN(6)
-   *return_code = 0;
-}
-
-/*	this signals to either initonline or stores that this code does not */
-/*      use project code information for security	*/
-/*	eventually this needs to be moved to the server process, but, as that */
-/*	require rethinking openenaccess and possibly chgprj on the gb server */
-/*	that task is left for later	*/
-
-int useprojcode_()
-{
-   return(0);
-}
-
-int onlinesite_()
-{
-   return(1);
-}
-/*	this function returns and integer appropriate for the online data */
-/*      file that this is dealing with */
-/*	for 12-m data this should return a 1 */
-
-void chngonline_(iftype, iver, anal_user_code, ier)
-int *iftype, *iver;
-char *anal_user_code;
-short int *ier;
-{
-   void make_user_code();
-   char name1[256], name2[256];
-   int vlist[100], maxlist=100, oldtype, file;
-   int newver;
-
-   *ier = 0;
-   newver = 0;
-   oldtype = filetype;
-
-   if (*iftype == HCTYPE || *iftype == FBTYPE || *iftype == CONTYPE) {
-      filetype = *iftype;
-      file = filetype - 1;
-      make_user_code(anal_user_code);
-   } else {
-      *ier = 112;
-      return;
-   }
-
-   if (*iver == 0) {
-/*					most recent version */
-      verslist(filetype, vlist, maxlist);
-      *iver = vlist[0];
-      if (*iver != onfile[file].version) newver = 1;
-   } else if (*iver < 0) {
-/*					subtract from current version */
-      *iver = onfile[file].version + *iver;
-      newver = 1;
-   } else {
-/*					is it different from current value */
-      if (*iver != onfile[file].version) newver = 1;
-   }
-
-/*					At this point, iver <= 0 is an error */
-   if (newver) {
-      if (*iver <= 0) {
-         *ier = 375;
-         filetype = oldtype;
-         return;
-      }
-/*			version # has changes, can we access this version */
-      if (filetype == HCTYPE) {
-         sprintf(name1,"%s/sdd_hc.%s_%3.3i",datadir,obsinit,*iver);
-         sprintf(name2,"%s/gsdd_hc.%s_%3.3i",datadir,obsinit,*iver);
-      } else {
-         sprintf(name1,"%s/sdd.%s_%3.3i",datadir,obsinit,*iver);
-         sprintf(name2,"%s/gsdd.%s_%3.3i",datadir,obsinit,*iver);
-      }
-      if (access(name1, 4) != 0) {
-         *ier = 375;
-         filetype = oldtype;
-         return;
-      }
-      if (onfile[file].datafile.fd != -1) {
-         close(onfile[file].datafile.fd);
-         free(onfile[file].datafile.index);
-         onfile[file].datafile.index = 0;
-         onfile[file].datafile.fd = -1;
-         onfile[file].data_status = ST_UNAVAIL;
-      }
-      if (onfile[file].gainfile.fd != -1) {
-         close(onfile[file].gainfile.fd);
-         free(onfile[file].gainfile.index);
-         onfile[file].gainfile.index = 0;
-         onfile[file].gainfile.fd = -1;
-         onfile[file].gain_status = ST_UNAVAIL;
-      }
-      onfile[file].datafile.name = strdup(name1);
-      if (initfile(&(onfile[file].datafile)) != 0) {
-         *ier = 375;
-         filetype = oldtype;
-         return;
-      } 
-      onfile[file].data_status = ST_OK;
-      onfile[file].version = *iver;
-      if (filetype != CONTYPE) {
-         onfile[file].gainfile.name = strdup(name2);
-/*		we don't care if gzfile can open successfully or not */
-         onfile[file].gain_status = ST_OK;
-         if (initfile(&(onfile[file].gainfile)) != 0) 
-            onfile[file].gain_status=ST_UNAVAIL;
-      }
-   }
-}
-
-void changever_(iftype, iver, anal_user_code, ier)
-int *iftype;
-int *iver;
-char *anal_user_code;
-short int *ier;
-{
-   int vlist[100], maxlist=100, i, n, fcioget_(), doagain, file;
-   char tmpstr[120];
-   tmpstr[0] = '\0';
-
-   *ier = 0;
-   if (*iftype != HCTYPE && *iftype != FBTYPE && *iftype != CONTYPE) {
-      *ier = 112;
-   }
-
-   file = *iftype - 1;
-   verslist(*iftype, vlist, maxlist);
-   if (vlist[0] == -1) {
-/*				nothing found */
-      printf("CHNGVER: no %s files are available.\n",ftype[file].c);
-   } else {
-      while(1) {
-         printf("CHNGVER: the following versions of type %s are available:\n",
-               ftype[file].c);
-         for (i=0;i<maxlist;i++) {
-            if (vlist[i] < 0) break;
-            if (vlist[i] == onfile[file].version) {
-               printf(" -> %3i <- Current version\n", vlist[i]);
-               *iver = vlist[i];
-            } else {
-               printf("    %3i\n", vlist[i]);
-            }
-         }
-         printf("Which version to use (<return> implies the current version): ");
-         if ((n=fcioget_(tmpstr)) <= 0) break;
-         if (sscanf(tmpstr, "%i", &n) == 1) {
-            chngonline_(iftype, &n, anal_user_code, ier);
-            if (*ier == 0) {
-               *iver = n;
-               break;
-            }
-         }
-/*			if it makes it here, either the input was wrong or */
-/*			there was a problem in chngonline, try again */
-         printf("Invalid or unavailable version number, try again.\n");
-      }
-   }
-}
-
-/*		do selection using values in params struct */
-void gselect_(params, actno, maxno, list, return_code)
-sel_params *params;
-int *actno, *maxno, *return_code;
-float *list;
-{
-   short id, irtn;
-   int modecode, modetst, iscan, getone, lrtn, entry;
-#define NFINDEX 8
-   int inrange8_(), i, n, nfindex = NFINDEX, curfindex = -1;
-   double def_val, value, scan_min, scan_max, x_min, x_max;
-   double y_min, y_max, lst_min, lst_max, ut_min, ut_max;
-   double bw_min, bw_max, f_min, f_max, feed_min, feed_max; 
-   double rate_min, rate_max, int_min, int_max;
-   char field[4];
-   char *object, *mode;
-   double utdate, lst, samprat, sourcex, sourcey;
-   double deltaxr, deltayr, restfreq, freqres, rate;
-   
-   sddfile *file;
-   sindex *index;
-   sdd_index_entry findex[NFINDEX], *findptr;
-   int getincbs();
-   void modefield_();
-   void getnsddindex();
-
-/*		set up for a bad return */
-   *actno = 0;
-   *return_code = -1;
-   if (*maxno <= 0) {
-      *return_code = 0;
-      return;
-   }
-/*		get the parms into usable chunks */
-   def_val = params->def_val;
-   scan_min = params->scan_min;
-   scan_max = params->scan_max;
-   feed_min = params->feed_min;
-   feed_max = params->feed_max;
-   x_min = params->x_min;
-   x_max = params->x_max;
-   y_min = params->y_min;
-   y_max = params->y_max;
-   lst_min = params->lst_min;
-   lst_max = params->lst_max;
-   ut_min = params->ut_min;
-   ut_max = params->ut_max;
-   bw_min = params->bw_min;
-   bw_max = params->bw_max;
-   f_min = params->f_min;
-   f_max = params->f_max;
-   rate_min = params->rate_min;
-   rate_max = params->rate_max;
-   int_min = params->int_min;
-   int_max = params->int_max;
-/*		what type of scans (LINE or CONT) */	
-   modecode = 0;
-   if (strncmp(params->obs_mode,"CONT",4) == 0) modecode = 1;
-   if (strncmp(params->obs_mode,"LINE",4) == 0) modecode = 2;
-
-/*	loop through the index in memory for the current file */
-
-   file = &(onfile[filetype-1].datafile);
-   if (getincbs(file) != 0) return;
-
-   index = file->index;
-   if (index == 0) return;
-
-   for (n=0;n<file->bs.num_entries_used;n++) {
-/*		check the values in the index first */
-/*		continuing with search if it misses */
-      modetst = index[n].obsmode / 256;
-      iscan = index[n].scan_number;
-      if (iscan == 0 || ((modecode != 0) && (modetst != modecode))) continue;
-      value = index[n].scan_number;
-      if (inrange8_(&scan_min, &scan_max, &value, &def_val) == 0) continue;
-      value = index[n].feed_number;
-      if (inrange8_(&feed_min, &feed_max, &value, &def_val) == 0) continue;
-/*	if we get here, we may need to get the full index */
-/*	but only if something isn't = def_val or strings are non-blank */
-      getone = 0;
-/*		mode independant stuff */
-      if (x_min != def_val || x_max != def_val ||
-          y_min != def_val || y_max != def_val ||
-          lst_min != def_val || lst_max != def_val ||
-          ut_min != def_val || ut_max != def_val) getone = 1;
-/*		mode dependant stuff */
-      if (getone != 1 && modecode == 1) {
-         if (rate_min != def_val || rate_max != def_val ||
-             int_min != def_val || int_max != def_val) getone = 1;
-      } else if (getone != 1) {
-         if (bw_min != def_val || bw_max != def_val ||
-             f_min != def_val || f_max != def_val) getone = 1;
-      }
-/*		strings */
-      if (getone != 1 && 
-          strncmp(params->source_name,"                ", 16) != 0)
-              getone = 1;
-      mode = (params->obs_mode) + 4;
-      if (getone != 1 && 
-          strncmp(mode,"    ", 4) != 0) getone = 1;
-/*		Ok, if getone == 1 here, get the full index */
-      if (getone == 1) {
-/*		do we need to read in a set of NFINDEX or is it already in */
-         entry = n+1;
-         if (curfindex == -1 ||
-             curfindex > entry || entry > (curfindex + NFINDEX - 1)) {
-            getnsddindex(file, &entry, findex, &nfindex, &lrtn);
-            if (lrtn != 0) RETURN(2);
-            curfindex = entry;
-         }
-/*		set findptr to point to the desired findex */
-         findptr = (findex + entry - curfindex);
-
-/*		ok, first do the strings */
-         object = findptr->source;
-         if ((strncmp(object, params->source_name, 16) != 0) &&
-             (strncmp(params->source_name,"                ", 16) != 0)) continue;
-         id = findptr->obsmode % 256;
-         modefield_(&id, field, &irtn);
-         mode = (params->obs_mode) + 4;
-         if ((strncmp(field, mode, 4) != 0) &&
-             (strncmp(mode,"    ", 4) != 0)) continue;
-/*		now the mode independant */
-         utdate = findptr->UT;
-         if (inrange8_(&ut_min, &ut_max, &utdate, &def_val) != 1) continue;
-         lst = findptr->lst;
-         if (inrange8_(&lst_min, &lst_max, &lst, &def_val) != 1) continue;
-         sourcex = findptr->h_coord;
-         if (inrange8_(&x_min, &x_max, &sourcex, &def_val) != 1) continue;
-         sourcey = findptr->v_coord;
-         if (inrange8_(&y_min, &y_max, &sourcey, &def_val) != 1) continue;
-/*		and finally the mode dependant stuff */
-         if (modecode != 1) {
-            restfreq = findptr->rest_freq;
-            if (inrange8_(&f_min, &f_max, &restfreq, &def_val) != 1) continue;
-            freqres = findptr->freq_res;
-            if (inrange8_(&bw_min, &bw_max, &freqres, &def_val) != 1) continue;
-         } else {
-            samprat = findptr->rest_freq;
-            if (inrange8_(&int_min,&int_max,&samprat,&def_val) != 1) continue;
-            rate = findptr->freq_res;
-            if (inrange8_(&rate_min, &rate_max, &rate, &def_val) != 1) continue;
-         }
-      }
-/*		if we've made it here, it belongs in the list */
-      *list = index[n].scan_number + index[n].feed_number / 100.0;
-      list++;
-      (*actno)++;
-      if (*actno >= *maxno) break;
-   }
-   *return_code = 0;
-}
-
-
-int deffeed_()
-/*	returns the default feed number for the first feed */
-{
-
-   if (filetype == HCTYPE) return(11);
-   return(1);
-}
-
-void make_user_code(anal_user_code)
-/*		reconstructs the full user code	*/
-char *anal_user_code;
-{
-
-   int len, n;
-   char *firstsp;
-
-   strncpy(anal_user_code, obsinit,8);
-
-   len = strlen(anal_user_code);
-
-   if (len < 8) {
-      strcat(anal_user_code," ");
-      if (len < 6) {
-         if (filetype == FBTYPE) {
-            strcat(anal_user_code,"FB");
-         } else if (filetype == HCTYPE) {
-            strcat(anal_user_code,"HC");
-         } else {
-            strcat(anal_user_code,"  ");
-         }
-         for (n = (len+3);n < 8;n++) strcat(anal_user_code," ");
-      } else {
-         strcat(anal_user_code," ");
-      }
-   }
-}
-
-int qvers_(iftype)
-int *iftype;
-{
-   int vers;
-
-   vers = -1;
-   if ((*iftype == HCTYPE) || (*iftype == FBTYPE) || (*iftype == CONTYPE)) {
-      vers = onfile[*iftype-1].version;
-   }
-   return(vers);
-}
diff -uNr 3.5/source/conline/tuc/getincbs.c unipops-3.6/source/conline/tuc/getincbs.c
--- 3.5/source/conline/tuc/getincbs.c	2000-03-16 11:38:00.000000000 -0700
+++ unipops-3.6/source/conline/tuc/getincbs.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,130 +0,0 @@
-
-/* @(#)getincbs.c	5.1 06/22/94 */
-
-/* getincbs is similar to getbs in the disk routines */
-/* It differs here in that the additions to the disk file are most likely */
-/* to be incremental changes at the end of the index and hence, the entire */
-/* index doesn't need to be reread each time a change is noted */
-/* uses the routines incindex to do this, does a fullindex when needed */
-
-/* returns 0 if everything is ok */
-/*         1 if file read/positioning problems */
-/*         2 if bootstrap values are bizzare */
-
-#include <stdio.h>
-#include <malloc.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <files.h>
-#include <sdd.h>
-
-int getincbs(fptr)
-sddfile *fptr;
-
-{
-
-   sdd_bs_block *sddbs, bs;
-   old_sdd_bs_block *oldsddbs;
-   char cbuf[SDDBUFSIZE];
-   int n, offset;
-   int incrindex(), makesindex();
-
-/*		rewind file */
-
-   if ((offset = lseek(fptr->fd, 0, SEEK_SET)) != 0) {
-      return(1);
-   }
-   if ((n = read(fptr->fd, cbuf, SDDBUFSIZE)) != SDDBUFSIZE) {
-      return(1);
-   }
-
-/*		is it I*2 or I*4 */
-
-   if (((sdd_bs_block *)cbuf)->sddversion == 1) {
-/*		I*4 */
-      sddbs = (sdd_bs_block *)cbuf;
-   } else {
-/*		I*2, copy it over to sddbs */
-      sddbs = &bs;
-      oldsddbs = (old_sdd_bs_block *)cbuf;
-      sddbs->num_index_rec = oldsddbs->num_index_rec;
-      sddbs->num_data_rec = oldsddbs->num_data_rec;
-      sddbs->bytperrec = oldsddbs->bytperrec;
-      sddbs->bytperent = oldsddbs->bytperent;
-      sddbs->num_entries_used = oldsddbs->num_entries_used;
-      sddbs->counter = oldsddbs->counter;
-      sddbs->typesdd = oldsddbs->typesdd;
-      sddbs->sddversion = 0;
-   }
-
-   n = 0;
-   if ((sddbs->num_index_rec    != fptr->bs.num_index_rec) ||
-       (sddbs->num_data_rec     != fptr->bs.num_data_rec)  ||
-       (sddbs->bytperrec        != fptr->bs.bytperrec)     ||
-       (sddbs->bytperent        != fptr->bs.bytperent)     ||
-       (sddbs->num_entries_used != fptr->bs.num_entries_used) ||
-       (sddbs->counter          != fptr->bs.counter)       ||
-       (sddbs->typesdd          != fptr->bs.typesdd)       ||
-       (sddbs->sddversion       != fptr->bs.sddversion)) {
-/*              bs block has changed or was never set, first, sanity checks */
-/*              most of these are obvious, however, these routines assume */
-/*              that there are an integer number of index entries per record */
-/*              so, this checks that that assumption is true */
-      if ((sddbs->num_index_rec <= 0) ||
-          (sddbs->num_data_rec < 0) ||
-          (sddbs->bytperrec <= 0) ||
-          (sddbs->bytperent != sizeof(sdd_index_entry)) ||
-          (sddbs->num_entries_used < 0) ||
-          (sddbs->counter < 0) ||
-          (sddbs->bytperrec % sddbs->bytperent)) {
-/*			its just a bad file, give up */
-         return(2);
-      }
-
-/*			something has changed, do an incrindex */
-      if (sddbs->num_entries_used > fptr->bs.num_entries_used) {
-/*			some new stuff to read and decode */
-/*			set the things that don't change */
-         fptr->bs.num_index_rec = sddbs->num_index_rec;
-         fptr->bs.bytperrec = sddbs->bytperrec;
-         fptr->bs.bytperent = sddbs->bytperent;
-         fptr->bs.typesdd = sddbs->typesdd;
-         fptr->bs.sddversion = sddbs->sddversion;
-         if (incrindex(fptr,sddbs->num_entries_used) == 0) {
-/*			thats a rap 	*/
-/*			set the things that could change */
-            fptr->bs.num_data_rec = sddbs->num_data_rec;
-            fptr->bs.num_entries_used = sddbs->num_entries_used;
-            fptr->bs.counter = sddbs->counter;
-/*              the following is usefull to calculate now and keep around */
-            fptr->nb_index_elem =
-               (sddbs->num_index_rec - 1)* sddbs->bytperrec / sddbs->bytperent;
-/*              final sanity check      */
-            if (fptr->nb_index_elem < fptr->bs.num_entries_used) return(2);
-            return(0);
-         }
-      }
-/*			if we get to here, either the file has changed */
-/*			in a way that isn't possible or incrindex return */
-/*			a non-zero value.  Either way, lets try reading */
-/*			the full index	*/
-
-      fptr->bs.num_index_rec = sddbs->num_index_rec;
-      fptr->bs.num_data_rec = sddbs->num_data_rec;
-      fptr->bs.bytperrec = sddbs->bytperrec;
-      fptr->bs.bytperent = sddbs->bytperent;
-      fptr->bs.num_entries_used = sddbs->num_entries_used;
-      fptr->bs.counter = sddbs->counter;
-      fptr->bs.typesdd = sddbs->typesdd;
-      fptr->bs.sddversion = sddbs->sddversion;
-/*              the following is usefull to calculate now and keep around */
-      fptr->nb_index_elem =
-               (sddbs->num_index_rec - 1)* sddbs->bytperrec / sddbs->bytperent;
-/*              final sanity check      */
-      if (fptr->nb_index_elem < fptr->bs.num_entries_used) return(2);
-
-      if (makesindex(fptr)) return(1);
-   }
-/*			If we get here, everything is fine */
-   return(0);
-}
diff -uNr 3.5/source/conline/tuc/getinit.c unipops-3.6/source/conline/tuc/getinit.c
--- 3.5/source/conline/tuc/getinit.c	2000-03-16 11:38:00.000000000 -0700
+++ unipops-3.6/source/conline/tuc/getinit.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,30 +0,0 @@
-
-/* @(#)getinit.c	5.1 06/22/94 */
-
-/* sets the values of obsinit and datadir env variables */
-/* obsinit = $OBSINIT */
-/* datadir = $TOPDATA/$OBSINIT */
-
-#include <stdlib.h>
-#include <string.h>
-#include <tucaccess.h>
-
-void getinit()
-
-{
-
-   char *topdata;
-
-   if (getenv("OBSINIT") != NULL) strcpy(obsinit, getenv("OBSINIT"));
-   topdata = getenv("TOPDATA");
-
-   datadir[0] = '\0';
-
-   if (topdata != NULL && strlen(obsinit)) {
-      strcpy(datadir, topdata);
-      strcat(datadir,"/");
-      strcat(datadir,obsinit);
-   }
-
-   if (strlen(datadir) == 0) strcpy(datadir, ".");
-}
diff -uNr 3.5/source/conline/tuc/incrindex.c unipops-3.6/source/conline/tuc/incrindex.c
--- 3.5/source/conline/tuc/incrindex.c	2000-03-16 11:38:01.000000000 -0700
+++ unipops-3.6/source/conline/tuc/incrindex.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,122 +0,0 @@
-
-/* @(#)incrindex.c	5.1 06/22/94 */
-
-
-#include <stdio.h>
-#include <malloc.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <files.h>
-#include <sdd.h>
-
-int incrindex(fptr, num_entries_used)
-sddfile *fptr;
-int num_entries_used;
-
-{
-
-   int i, n, curend, newend, start, offset, fd, size, bytperent;
-   sdd_index_entry tmp;
-   old_sdd_index_entry oldtmp;
-   sindex test[8];
-
-   fd = fptr->fd;
-   if (fd == -1) {
-      return(1);
-   }
-   if (fptr->index == 0) return(1);
-
-   bytperent = fptr->bs.bytperent;
-
-/*			look at the last 8 index entries before new ones */
-
-   curend = fptr->bs.num_entries_used;
-   newend = num_entries_used;
-   start = curend - 8;
-   if (start < 0) start = 0;
-
-/*			offset into file to start index entry */
-
-   offset = start * bytperent + SDDBUFSIZE;
-   if (lseek(fd, offset, SEEK_SET) != offset) {
-      return(1);
-   }
-
-/*			read next 8 entries */
-
-   for (i=0;i<8;i++) {
-      size = bytperent;
-      if (fptr->bs.sddversion == 1) {
-/*			I*4 index */
-         if ((n=read(fd, &tmp, size)) != size) {
-            return(1);
-         }
-      } else {
-/*			old I*2 index */
-         if ((n=read(fd, &oldtmp, size)) != size) {
-            return(1);
-         }
-/*			copy important values over to test[i] */
-         tmp.scan = oldtmp.scan;
-         tmp.start_rec = oldtmp.start_rec;
-         tmp.end_rec = oldtmp.end_rec;
-         tmp.obsmode = oldtmp.obsmode;
-         tmp.phase_rec = oldtmp.phase_rec;
-      }
-/*			copy values over into the sindex test area */
-      test[i].scan_number = tmp.scan;
-      test[i].feed_number =(tmp.scan - test[i].scan_number) * 100. + 0.5;
-      test[i].start_rec = tmp.start_rec - 1;
-      test[i].nb_rec = tmp.end_rec - test[i].start_rec;
-      test[i].obsmode = tmp.obsmode;
-      test[i].phase_rec = tmp.phase_rec;
-   }
-
-/*	compare with values in fptr */
-   for (i=0;i<8;i++) {
-      if ((fptr->index[i+start].scan_number != test[i].scan_number) ||
-          (fptr->index[i+start].feed_number != test[i].feed_number) ||
-          (fptr->index[i+start].start_rec != test[i].start_rec) ||
-          (fptr->index[i+start].nb_rec != test[i].nb_rec) ||
-          (fptr->index[i+start].obsmode != test[i].obsmode) ||
-          (fptr->index[i+start].phase_rec != test[i].phase_rec)) {
-
-/*				the file has changed significantly */
-               return(1);
-      }
-   }
-
-/*			ok, same file, just get the new entries */
-
-   
-   for (i=curend;i<newend;i++) {
-      if (fptr->bs.sddversion == 1) {
-/*			I*4 index */
-         if ((n=read(fd, &tmp, size)) != size) {
-            return(1);
-         }
-      } else {
-/*			old I*2 index */
-         if ((n=read(fd, &oldtmp, size)) != size) {
-            return(1);
-         }
-/*			copy important values over to test[i] */
-         tmp.scan = oldtmp.scan;
-         tmp.start_rec = oldtmp.start_rec;
-         tmp.end_rec = oldtmp.end_rec;
-         tmp.obsmode = oldtmp.obsmode;
-         tmp.phase_rec = oldtmp.phase_rec;
-      }
-/*			copy values over into the fptr index */
-      fptr->index[i].scan_number = tmp.scan;
-      fptr->index[i].feed_number =
-         (tmp.scan - fptr->index[i].scan_number) * 100. + 0.5;
-      fptr->index[i].start_rec = tmp.start_rec - 1;
-      fptr->index[i].nb_rec = tmp.end_rec - fptr->index[i].start_rec;
-      fptr->index[i].obsmode = tmp.obsmode;
-      fptr->index[i].phase_rec = tmp.phase_rec;
-   }
-
-   return(0);
-}
diff -uNr 3.5/source/conline/tuc/initfile.c unipops-3.6/source/conline/tuc/initfile.c
--- 3.5/source/conline/tuc/initfile.c	2000-03-16 11:38:01.000000000 -0700
+++ unipops-3.6/source/conline/tuc/initfile.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,43 +0,0 @@
-
-/* @(#)initfile.c	5.1 06/22/94 */
-
-/*	initializes all of the important file information, including index */
-/*	returns -1 on failure	*/
-
-#include <fcntl.h>
-#include <string.h>
-#include <files.h>
-
-int initfile(fptr)
-sddfile *fptr;
-
-{
-   int n;
-
-/*			default values */
-
-   fptr->fd = -1;
-   fptr->bs.num_index_rec = 0;
-   fptr->bs.num_data_rec = 0;
-   fptr->bs.bytperrec = 0;
-   fptr->bs.bytperent = 0;
-   fptr->bs.num_entries_used = 0;
-   fptr->bs.counter = 0;
-   fptr->bs.typesdd = 0;
-   fptr->bs.sddversion = 0;
-   fptr->index = 0;
-/*			unit isn't used here */
-   fptr->unit = -1;
-
-/*			open the file */
-
-   if ((fptr->fd = open(fptr->name, O_RDONLY)) == -1) {
-/*			can't open the file */
-      return(1);
-   }
-
-/*			getbs does the rest */
-
-   n = getbs(fptr);
-   return(n);
-}
diff -uNr 3.5/source/conline/tuc/olfiles.c unipops-3.6/source/conline/tuc/olfiles.c
--- 3.5/source/conline/tuc/olfiles.c	2000-03-16 11:38:02.000000000 -0700
+++ unipops-3.6/source/conline/tuc/olfiles.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-
-/* @(#)olfiles.c	5.2 07/08/94 */
-/* simply displays the status of the online files */
-
-#include <stdio.h>
-#include <string.h>
-#include <tucaccess.h>
-
-void olfiles_()
-{
-
-
-   int i;
-   char *name;
-
-   printf("\nCurrently open 12-m online data files :\n");
-   printf("   Directory : %s\n",datadir);
-   if (filetype != CONTYPE) {
-/*		for now, filetype can only = CONTYPE if condar is running */
-
-      for (i=0;i<2;i++) {
-         name = onfile[i].datafile.name + strlen(datadir) + 1;
-         if (onfile[i].data_status == ST_OK) printf("      %s\n",name);
-         name = onfile[i].gainfile.name + strlen(datadir) + 1;
-         if (onfile[i].gain_status == ST_OK) printf("      %s\n",name);
-      }
-   } else {
-      name = onfile[CONTYPE-1].datafile.name + strlen(datadir) + 1;
-      if (onfile[CONTYPE-1].data_status == ST_OK) printf("      %s\n",name);
-   }
-
-   printf("\n To change the online files, use the CHNGVER or CHNGONLINE verbs.\n");
-   return;
-}
diff -uNr 3.5/source/conline/tuc/verslist.c unipops-3.6/source/conline/tuc/verslist.c
--- 3.5/source/conline/tuc/verslist.c	2000-03-16 11:38:02.000000000 -0700
+++ unipops-3.6/source/conline/tuc/verslist.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,116 +0,0 @@
-
-/* @(#)verslist.c	5.1 06/22/94 */
-
-/* returns a list of versions of files of type "type" */
-
-#include <tucaccess.h>
-#include <string.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <dirent.h>
-#include <math.h>
-
-void verslist(type, list, maxlist)
-int type, maxlist;
-int *list;
-
-{
-
-   char *template, *pdtemp="sdd.   _", *hctemp="sdd_hc.   _";
-   char *cptr, ctmp;
-   char ftmp[160];
-   int i, j, k, initptr, vers, templen, digit;
-   int *ltmp, size, lsize, val;
-   double expon, d10 = 10;
-   DIR *dirp;
-   struct dirent *dp;
-
-   if (type == HCTYPE) {
-      template = hctemp;
-   } else if (type == FBTYPE || type == CONTYPE) {
-      template = pdtemp;
-   } else {
-/*			unrecognized type, just return the list empty */
-/*			empty and last place used in list indicated by -1 */
-      *list = -1;
-      return;
-   }
-
-/*			fill initials in */
-
-   cptr = strchr(template,'.');
-   for (i=0;i<3;i++) {
-      *(cptr+i+1) = obsinit[i];
-   }
-
-   templen = strlen(template);
-
-/*			search for matches in datadir */
-
-   size = 0;
-   if ((dirp = opendir(datadir)) != NULL) {
-      for (dp = readdir(dirp);dp != NULL; dp = readdir(dirp)) {
-         if ((strncmp(dp->d_name, template, templen)) == 0) {
-
-/*			there MUST be 3 and only 3 characters after the _ */
-
-            if ((strlen(dp->d_name) - templen) == 3) {
-/*			make sure we can access it */
-               strcpy(ftmp, datadir);
-               strcat(ftmp,"/");
-               strcat(ftmp,dp->d_name);
-               if (access(ftmp, 4) == 0) {
-/*			get the version, make sure they're digits */
-                  vers = 0;
-                  for (i=0;i<3;i++) {
-                     ctmp = dp->d_name[templen+i];
-                     if (ctmp < '0' || ctmp > '9') {
-                        vers = -1;
-                        break;
-                     }
-                     digit = ctmp - '0';
-                     expon = (2-i);
-                     vers = digit * pow(d10,expon) + vers;
-                  }
-/*			Ok, if vers is >0 and < 1000 its ok */
-                  if ((vers > 0) && (vers < 1000)) {
-                     *(list+size) = vers;
-                     size++;
-                     if (size > maxlist) break;
-                  }
-               }
-            }
-         }
-      }
-   }
-   if (size < maxlist) *(list+size) = -1;
-   if (size < 1) return;
-
-/*			finally, sort the list in place */
-
-    ltmp = (int *) malloc(size*sizeof(int));
-
-    *ltmp = *list;
-    lsize = 1;
-    for (i=1;i<size;i++) {
-       val = *(list+i);
-       for (j=0;j<lsize;j++) {
-          if (val > *(ltmp+j)) break;
-       }
-/*			val belongs at position j in tmp list */
-/*			move upper half up 1 slot and insert */
-       for (k=lsize;k>j;k--) {
-          *(ltmp+k) = *(ltmp+k-1);
-       }
-       *(ltmp+j) = val;
-       lsize++;
-   }
-
-/*			Now, copy it back to the list */
-
-   for (i=0;i<size;i++) {
-      *(list+i) = *(ltmp+i);
-   }
-   free(ltmp);
-/*			and that should do it */
-}
diff -uNr 3.5/source/conline/udat.f unipops-3.6/source/conline/udat.f
--- 3.5/source/conline/udat.f	2000-03-16 11:33:42.000000000 -0700
+++ unipops-3.6/source/conline/udat.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      SUBROUTINE UDAT(UDATE,IMON,IDAY,IYEAR)
-C-------------------------------------------------------------------------------
-C  @(#)udat.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-C-------------------------------------------------------------
-C     This subroutine takes universal time date (yyyy.mmdd)
-C     and converts it to imon, iday, and iyear.
-C-------------------------------------------------------------
-      REAL*8 UDATE, DUMDATE
-      INTEGER*4 IDATE
-      INTEGER*2 IMON,IDAY,IYEAR
-      IYEAR = UDATE
-      DUMDATE=(UDATE-DBLE(IYEAR))*10000.0
-      IDATE=(DUMDATE+0.5)
-      IDAY = MOD(IDATE,100)
-      IDATE = IDATE - IDAY
-      IMON = IDATE/100
-      RETURN
-      END
diff -uNr 3.5/source/conline/undo.f unipops-3.6/source/conline/undo.f
--- 3.5/source/conline/undo.f	2000-03-16 11:33:42.000000000 -0700
+++ unipops-3.6/source/conline/undo.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,94 +0,0 @@
-      subroutine savestatus
-C-------------------------------------------------------------------------------
-C  @(#)undo.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Stores common blocks APPL and CORE into arrays for a later
-c     UNDO
-c
-      include 'appl.inc'
-      include 'core.inc'
-      include 'cio.inc'
-c
-      integer*4 StoreRappl1(RAPPLSIZE), StoreRappl2(RAPPLSIZE)
-      integer*2 StoreK1(32767), StoreK2(32767)
-      integer*2 StoreKx1(32767), StoreKx2(32767)
-      integer*2 n32, m1
-      integer*4 i4
-      integer*2 snext
-      logical*2 saved(2)
-c
-      save StoreRappl1, StoreRappl2
-      save StoreK1, StoreK2
-      save StoreKx1, StoreKx2
-      save saved, snext
-c
-      data saved/.false., .false./, snext/1/
-      data n32, m1 /32, -1/
-c
-      if (.not. undoon) then
-	snext = 1
-      else
-        if (snext .eq. 1) then
-           do 101 i4 = 1, numappl
-	     StoreRappl1(i4) = Rappl(i4)
-101          continue
-           do 201 i4 = 1, k(3)
-	     StoreK1(i4) =  k(i4)
-201          continue
-           do 301 i4 = 1, kx(3)
-	     StoreKx1(i4) =  kx(i4)
-301          continue
-        else
-           do 102 i4 = 1, numappl
-	     StoreRappl2(i4) = Rappl(i4)
-102          continue
-           do 202 i4 = 1, k(3)
-	     StoreK2(i4) =  k(i4)
-202          continue
-           do 302 i4 = 1, kx(3)
-	     StoreKx2(i4) =  kx(i4)
-302          continue
-        endif
-c
-        saved(snext) = .true.
-        snext = mod(snext,2) + 1
-c
-      endif
-      return
-c
-      entry undo
-c
-      if (.not. undoon) call oerror(n32, m1, 'UNDOOFF in affect')
-c
-      if (snext .eq. 1 .and. saved(2)) then
-        do 112 i4 = 1, numappl
-	  Rappl(i4) = StoreRappl2(i4)
-112       continue
-        do 212 i4 = 1, StoreK2(3)
-	  k(i4) = StoreK2(i4)
-212	  continue
-        do 312 i4 = 1, StoreKx2(3)
-	  kx(i4) = StoreKx2(i4)
-312	  continue
-      else if(snext .eq. 2 .and. saved(1)) then
-        do 111 i4 = 1, numappl
-	  Rappl(i4) = StoreRappl1(i4)
-111       continue
-        do 211 i4 = 1, StoreK1(3)
-	  k(i4) = StoreK1(i4)
-211	  continue
-        do 311 i4 = 1, StoreKx1(3)
-	  kx(i4) = StoreKx1(i4)
-311	  continue
-      else
-	call oerror(n32, m1, ' ')
-      endif
-c
-      snext = mod(snext,2) + 1
-      saved(snext) = .false.
-c
-      call togtline
-c
-      return
-      end
diff -uNr 3.5/source/conline/unused.f unipops-3.6/source/conline/unused.f
--- 3.5/source/conline/unused.f	2000-03-16 11:33:43.000000000 -0700
+++ unipops-3.6/source/conline/unused.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,176 +0,0 @@
-      integer function unused (k, start, tag, names, numnames)
-c
-c     @(#)unused.f	5.1 06/22/94
-c
-c     Goes through the K array, starting at START, looking for procedures
-c     that make use of the indicated TAG.  Will search for NUMNAMES+1 procedures
-c     that use that tag.  If NUMNAMES <= 0, then only the 1st procerdure will
-c     be looked for and, if one exists, UNUSED will return a 1 else a 0.  
-c     If NUMNAMES > 0 then all procedures will be searched and UNUSED will return
-c     the number of procedures found.  The routine also stuffs the names off the
-c     procedures found into the array NAMES.  Only NUMNAMES entries will be used
-c     in NAMES.
-c
-      integer*2 tag, numnames, k(*), start
-      integer*2 n5, fshort
-      character*(*) names(*) 
-c     
-      integer*2 l, type, ll, lll, num, length, iname(5)
-      character*10 name
-c
-      include 'tags.inc'
-c
-      equivalence (iname, name)
-c
-      data n5 /5/
-c
-      num = 0
-c     num = Number of procedures found that use the tag
-c
-      l = k(start)
-c
-10	if (l .ne. 0) then
-c	   Have we exhausted the list?  If not, check if the item is a 
-c	   procedure
-c
-	   length = k(l+1)/16
-	   type = k(l+1) - 16*length
-c
-	   if (type .eq. 3 .and. k(l+2) .ne. tag) then
-c		It is a procedure
-c		Its safe to skip it if tag points to the first chunk
-c		i.e. we can scratch procedures that reference themselves
-c
-		ll = k(l+2)
-c		LL = index to first/next program chunk; check whether it is
-c		the last chunk; remember who this is.
-c
-20		if (k(ll) .ne. 0) then
-c		    It is NOT the last program chunk
-c
-		    lll = ll+2
-c		    LLL = index to first/next command in current program chunk
-c
-30		    if (k(lll) .eq. iomega) then
-			ll = k(ll)
-			goto 20
-		    endif
-c		    You have come to the end of the last command in the
-c		    current program chunk.  Go on to the next program chunk
-c
-		    if (k(lll) .eq. tag) then
-c
-c		        The current command has the desired tag.
-c
-		   	num = num + 1
-			if (num .le. numnames) then
-			   name = ' '
-			   call copy(fshort(min(length,n5)),k(l+4),iname)
-			   names(num) = name
-c			   Store away the proc's name, if room left over.
-c
-			else if (numnames .le. 0) then
-			   unused = num
-			   return
-c			   We have been asked to give up the search after the
-c			   1st proc is found that uses TAG.
-c
-			endif
-c
-			l = k(l)
-			goto 10
-c			No use going thru rest of proc.  Skip to next item in K.
-c
-		    endif
-c
-		    lll = lll + 1
-		    goto 30
-c		    Advance to the next command in the current program chunk
-c
-		endif
-c
-c		Finished with the last program chunk in this procedure; 
-c		go on from L to find next item in list.  
-c
-	   endif
-
-	   l = k(l)
-	   goto 10
-c	   Advance to next item in list
-c
-	endif
-c
-      unused = num
-c     You have gone through the complete list.
-c
-      return
-      end
-c
-      integer function unalias (k, start, tag, names, numnames)
-c
-c     Goes through the K array, starting at START, looking for ALIASes
-c     that make use of the indicated TAG.  Will search for NUMNAMES+1 ALIASes
-c     that use that tag.  If NUMNAMES <= 0, then only the 1st ALIAS will
-c     be looked for and, if one exists, UNUSED will return a 1 else a 0.  
-c     If NUMNAMES > 0 then all ALIASes will be searched and UNUSED will return
-c     the number of ALIASes found.  The routine also stuffs the names off the
-c     procedures found into the array NAMES.  Only NUMNAMES entries will be used
-c     in NAMES.
-c
-      integer*2 tag, numnames, k(*), start
-      integer*2 n5, fshort
-      character*(*) names(*) 
-c     
-      integer*2 l, type, num, length, iname(5)
-      character*10 name
-c
-      include 'tags.inc'
-c
-      equivalence (iname, name)
-c
-      data n5 /5/
-c
-      num = 0
-c     num = Number of aliases found that use the tag
-c
-      l = k(start)
-c
-10	if (l .ne. 0) then
-c	   Have we exhausted the list?  If not, check if the item is a 
-c	   procedure
-c
-	   length = k(l+1)/16
-	   type = k(l+1) - 16*length
-c
-	   if (type .eq. 6 .and. k(l+2) .eq. tag) then
-c		It is a alias that has the desired tag.
-c
-		num = num + 1
-		if (num .le. numnames) then
-		   name = ' '
-		   call copy(fshort(min(length,n5)),k(l+4),iname)
-		   names(num) = name
-c		   Store away the proc's name, if room left over.
-c
-		else if (numnames .le. 0) then
-		   unalias = num
-		   return
-c		   We have been asked to give up the search after the
-c		   1st alias is found that uses TAG.
-c
-		endif
-c
-	   endif
-c
-	   l = k(l)
-	   goto 10
-c	   Advance to next item in list
-c
-	endif
-c
-      unalias = num
-c     You have gone through the complete list.
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/upack.f unipops-3.6/source/conline/upack.f
--- 3.5/source/conline/upack.f	2000-03-16 11:33:43.000000000 -0700
+++ unipops-3.6/source/conline/upack.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,38 +0,0 @@
-      subroutine upack(ixraw, iyraw, ich, iout)
-C-------------------------------------------------------------------------------
-C  @(#)upack.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Unpacks TEXTRONIX like command strings
-c**********************************
-c 8904 [RJM]
-c**********************************
-c
-      character*1 iout(*)
-      character*2 cxl, cxu, cyl, cyu, cch
-      integer*2 iich, ixl, ixu, iyl, iyu, ixraw, iyraw, ich, 
-     .          mask1, mask2
-c
-      equivalence (cxl,ixl),(cxu, ixu),(cyl,iyl),(cyu,iyu)
-      equivalence (cch,iich)
-c
-      data mask1/31/, mask2/63/
-c     mask1 = 001e, mask2 = 003e
-c
-      cxl(2:2) = iout(3)
-      ixl = and(ixl, mask1)
-      cxu(2:2) = iout(2)
-      ixu = and(ixu, mask1)
-      ixraw = ixu*32 + ixl
-      cyl(2:2) = iout(5)
-      iyl = and(iyl, mask1)
-      cyu(2:2) = iout(4)
-      iyu = and(iyu, mask1)
-      iyraw = iyu*32 + iyl
-      cch(2:2) = iout(1)
-      iich = and(iich, mask2)
-      ich = iich
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/updatehist.f unipops-3.6/source/conline/updatehist.f
--- 3.5/source/conline/updatehist.f	2000-03-16 11:33:44.000000000 -0700
+++ unipops-3.6/source/conline/updatehist.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,52 +0,0 @@
-      subroutine updatehist(string)
-C-------------------------------------------------------------------------------
-C  @(#)updatehist.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Adds STRING to the internal record of input strings
-c
-      character*(*) string
-c
-      integer*2 MAXWORDS
-      parameter (MAXWORDS=160)
-c     MAXWORDS characters maximun can be stored in HIST
-c
-      include 'cio.inc'
-      integer*2 lastblnk, ij, wstart(MAXWORDS), wend(MAXWORDS), i, 
-     .		i1, numword, lngth, n104, n0, wtype(MAXWORDS)
-      character*160 outstrng
-c
-      parameter (n104=104)
-      parameter (n0=0)
-c
-      if (lastblnk(string) .eq. 0) return
-c
-      call findwords(string, MAXWORDS, numword, wstart, wend, wtype)
-c
-      outstrng = " "
-      i1 = 1
-      do 100 i = 1, numword
-	 lngth = i1 + wend(i) - wstart(i)
-         if (lngth .le. MAXWORDS) then
-		outstrng(i1:lngth) = string(wstart(i):wend(i))
-		if (wtype(i) .eq. 1) then
-		   i1 = lngth + 1
-		else
-		   i1 = lngth + 2
-		endif
-c		Add a space after regular words or strings; don't after
-c		special chracaters.
-	 else
-		call oerror(n104, n0, 'Line ignored')
-	 endif
-100	 continue
-c     Compress out all unneeded blanks.
-c
-      inhist = inhist + 1
-      ij = mod(inhist-1,maxhist) + 1
-      hist(ij) = outstrng
-c
-      return
-      end
-c
-
diff -uNr 3.5/source/conline/updateline.f unipops-3.6/source/conline/updateline.f
--- 3.5/source/conline/updateline.f	2000-03-16 11:33:44.000000000 -0700
+++ unipops-3.6/source/conline/updateline.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,53 +0,0 @@
-      subroutine updateline(string)
-C-------------------------------------------------------------------------------
-C  @(#)updateline.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Adds STRING to the internal record of input/output strings
-c     Checks whether the text page has overflowed
-c*****************************************************
-c* 8903  [RJM]
-c*****************************************************
-c
-      character*(*) string
-      character*1 c1
-      integer*2 lastblnk, ilen, i1, i2
-      integer*4 long
-c
-      include 'cio.inc'
-c
-      ilen = max(1, lastblnk(string))
-      i1 = 1
-      i2 = min(ilen, linelngth)
-c     Sets limits on what should be stored in INSTRING; Don't want to overflow
-c	INSTRING.  Is STRING is very long, then more than one INSTRING will be
-c	used to hold STRING
-c
-9     instring(inline) = string(i1:i2)
-      inlast = max(inline, inlast)
-      inline = mod(inline,numline) + 1
-c
-      if (inline .eq. numline .and. pagefull) then
-	write(istdout,10) 
-10	format(' PAGEFULL: Enter T for tcopy, C to cancel pagefull, ',
-     1	       '<cr> for next page:',$)
-c
-	call flush(long(istdout))
-        read(istdin,11) c1
-11      format(a1)
-c
-        if (c1.eq.'t'.or.c1.eq.'T') call tcopy
-        if (c1.eq.'c'.or.c1.eq.'C') pagefull = .false. 
-        if (igraphtype .ge. 3) call clrpage
-      endif
-c
-      if (i2 .lt. ilen) then
-	i1 = i2 + 1
-	i2 = min(i1+linelngth-1, ilen)
-	goto 9
-      endif
-c
-      return
-      end
-c
-
diff -uNr 3.5/source/conline/uppercase.f unipops-3.6/source/conline/uppercase.f
--- 3.5/source/conline/uppercase.f	2000-03-16 11:30:02.000000000 -0700
+++ unipops-3.6/source/conline/uppercase.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-      subroutine uppercase(lc,uc)
-C-------------------------------------------------------------------------------
-C  @(#)uppercase.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Converts any lower case characters in string lc to upper case
-c     and stores results in string uc
-c
-      character*(*) uc, lc
-c
-      character*2 c1
-      integer*2 ic1, izero, lastblnk, ilen, i
-c
-      equivalence (ic1, c1)
-c
-      data izero/x'0000'/
-c
-      ilen = min(100,lastblnk(lc))
-c
-      ic1 = izero
-c
-      uc = ' '
-      do 100 i = 1, ilen
-	c1(2:2) = lc(i:i)
-        if (ic1 .ge. 97 .and. ic1 .le. 122) ic1 = ic1 - 32
-        uc(i:i) = c1(2:2)
-100     continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/v102clrpage.f unipops-3.6/source/conline/v102clrpage.f
--- 3.5/source/conline/v102clrpage.f	2000-03-16 11:33:45.000000000 -0700
+++ unipops-3.6/source/conline/v102clrpage.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,16 +0,0 @@
-      subroutine v102clrpage
-C-------------------------------------------------------------------------------
-C  @(#)v102clrpage.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Clears Tektronix-like screen but for the smaller V102 -
-c	retrographics screen
-c***********************************************
-c 8904  [RJM]
-c***********************************************
-c
-      call tekclrpage
-c
-      return
-      end
-
diff -uNr 3.5/source/conline/v102cursor.f unipops-3.6/source/conline/v102cursor.f
--- 3.5/source/conline/v102cursor.f	2000-03-16 11:33:46.000000000 -0700
+++ unipops-3.6/source/conline/v102cursor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,25 +0,0 @@
-      subroutine v102cursor(icode, ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)v102cursor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Returns cursor position in TEKTRONIX style but for smaller V102 -
-c	retrographics screen
-c*************************************************************************
-c 8904 [RJM]
-c*************************************************************************
-      integer*2 icode, ix1, iy1, ix, iy
-      real*4 scale
-c
-      data scale /0.7/
-c     Ratio of v102 screen to full TEK 4010 screen
-c
-      call tekcursor(icode, ix1, iy1)
-c
-      ix = int(float(ix1)/scale)
-      iy = int(float(iy1)/scale)
-c
-      return
-      end
-c
-
diff -uNr 3.5/source/conline/v102int.f unipops-3.6/source/conline/v102int.f
--- 3.5/source/conline/v102int.f	2000-03-16 11:33:46.000000000 -0700
+++ unipops-3.6/source/conline/v102int.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      subroutine v102int
-C-------------------------------------------------------------------------------
-C  @(#)v102int.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Initializes and close TEKTRONIX-like v102-retrographics Screen
-c*********************************************
-c 8904 [RJM]
-c*********************************************
-c
-      return
-c
-      entry v102close
-c
-      return
-c
-      end
-c
-
diff -uNr 3.5/source/conline/v102place.f unipops-3.6/source/conline/v102place.f
--- 3.5/source/conline/v102place.f	2000-03-16 11:33:46.000000000 -0700
+++ unipops-3.6/source/conline/v102place.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-      subroutine v102place(ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)v102place.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Places cursor for next VCTR or PCHAR call -- Tektronix 4010 style but
-c	for smaller v102 - retrographics screen
-c****************************************************
-c 8904 [RJM]
-c****************************************************
-c
-      integer*2 ix1, iy1, ix, iy
-      real*4 scale
-c
-      data scale /0.7/
-c     Ratio between v102 and tek 4010 screen
-c
-      ix1 = ix*scale
-      iy1 = iy*scale
-      call tekplace(ix1, iy1)
-c
-      return
-      end
-c
diff -uNr 3.5/source/conline/v102vctr.f unipops-3.6/source/conline/v102vctr.f
--- 3.5/source/conline/v102vctr.f	2000-03-16 11:33:47.000000000 -0700
+++ unipops-3.6/source/conline/v102vctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,24 +0,0 @@
-      subroutine v102vctr(ix, iy)
-C-------------------------------------------------------------------------------
-C  @(#)v102vctr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a line from the position last specified by
-c     move to the position ix, iy -- TEKTRONIX 4010 style but for smaller
-c     v102 retrographics screen
-c***************************************
-c 8904 [RJM
-c***************************************
-      integer*2 ix1, iy1, ix, iy
-      real*4 scale
-c
-      data scale/0.7/
-c     Ratio between v102 and tek 4010 screens
-c
-      ix1 = ix*scale
-      iy1 = iy*scale
-      call tekvctr(ix1, iy1)
-c
-      return
-      end
-
diff -uNr 3.5/source/conline/vctr.f unipops-3.6/source/conline/vctr.f
--- 3.5/source/conline/vctr.f	2000-03-16 11:33:47.000000000 -0700
+++ unipops-3.6/source/conline/vctr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,38 +0,0 @@
-      subroutine vctr(i3,i4)
-C-------------------------------------------------------------------------------
-C  @(#)vctr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Draws a line on the graphics screen
-c
-      integer*2 i3, i4
-c
-      include 'cio.inc'
-      include 'foxplot.inc'
-c
-      xpos = i3
-      ypos = i4
-c
-      if (igraphtype .eq. 4) then
-	call v102vctr(i3,i4)
-      else if (igraphtype .eq. 3) then
-	call tekvctr(i3, i4)
-      else if (igraphtype .eq. 2) then
-	call corevctr(i3, i4)
-      else if (igraphtype .eq. 1) then
-	call nogvctr(i3, i4)
-      endif
-      if (iprinttype .eq. 5) then
-        call quichardvctr(i3, i4)
-      else if (iprinttype .eq. 4) then
-	call hphardvctr(i3, i4)
-      else if (iprinttype .eq. 3) then
-	call posthardvctr(i3, i4)
-      else if (iprinttype .eq. 2) then
-	call qmshardvctr(i3, i4)
-      else if (iprinttype .eq. 1) then
-	call noghardvctr(i3, i4)
-      endif
-      return
-      end
-c
diff -uNr 3.5/source/conline/verbs.f unipops-3.6/source/conline/verbs.f
--- 3.5/source/conline/verbs.f	2000-03-16 11:33:47.000000000 -0700
+++ unipops-3.6/source/conline/verbs.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,65 +0,0 @@
-      SUBROUTINE VERBS (J)
-C-------------------------------------------------------------------------------
-C  @(#)verbs.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C     VERBS is a driver for all application verbs.
-C---------------------------------------------------------------------
-      INTEGER*2 VERB, j, i, ioverlay
-      integer*2 n120, m3
-c
-      include 'tags.inc'
-c
-      data n120, m3 /120, -3/
-C---------------------------------------------------------------------
-C					Search list for	proper overlay.
-C---------------------------------------------------------------------
-c
- 20   DO 22 I=1,20
-        if (iaubegin(i) .le. 0) goto 22
-	if (j .ge. iaubegin(i) ) then
-	    verb = j - iaubegin(i) + 1
-	    ioverlay = i
-	 endif
-   22    CONTINUE
-c
-      GO TO (1,2,3,4,5,6,7,8,9,10,11), ioverlay
-      call oerror(n120, m3, 'VERBS')
-c
-    1 CONTINUE
-      CALL AU1(VERB)
-      GO TO 99
-    2 CONTINUE
-      CALL AU2(VERB)
-      GO TO 99
-    3 CONTINUE
-      CALL AU3(VERB)
-      GO TO 99
-    4 CONTINUE
-      CALL AU4(VERB)
-      GO TO 99
-    5 CONTINUE
-      CALL AU5(VERB)
-      GO TO 99
-    6 CONTINUE
-      CALL AU6(VERB)
-      GO TO 99
-    7 CONTINUE
-      CALL AU7(VERB)
-      GO TO 99
-    8 CONTINUE
-      CALL AU8(VERB)
-      GO TO 99
-    9 CONTINUE
-      CALL AU9(VERB)
-      GO TO 99
-   10 CONTINUE
-      CALL AUA(VERB)
-      GO TO 99
-   11 CONTINUE
-      CALL AUB(VERB)
-      GO TO 99
-C
-   99 RETURN
-      END
-
diff -uNr 3.5/source/conline/yscale.f unipops-3.6/source/conline/yscale.f
--- 3.5/source/conline/yscale.f	2000-03-16 11:33:48.000000000 -0700
+++ unipops-3.6/source/conline/yscale.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,29 +0,0 @@
-      SUBROUTINE YSCALE (Y,LOW,HIGH,ymin,INCR)
-C-------------------------------------------------------------------------------
-C  @(#)yscale.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-      REAL ymin,INCR,Y(*), vmax, vmin
-      INTEGER*2 HIGH,LOW, i
-      logical okreal4, something
-C                                       Find max and min.
-      VMAX=-1.e30
-      VMIN=1.e30
-      something = .false.
-      DO 100 I=low,high
-         if (okreal4(y(i))) then
-      		something = .true.
-		vmin = min(vmin, y(i))
-		vmax = max(vmax, y(i))
-	 endif
-100      CONTINUE
-c
-      if (something) then
-	call scal(vmax, vmin, ymin, incr)
-      else
-	ymin = 1.e30
-	incr = 1.e30
-      endif
-c
-      RETURN
-      END
-
diff -uNr 3.5/source/conline/zignal.c unipops-3.6/source/conline/zignal.c
--- 3.5/source/conline/zignal.c	2000-03-16 11:29:40.000000000 -0700
+++ unipops-3.6/source/conline/zignal.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,35 +0,0 @@
-/* @(#)zignal.c	1.1 07/08/94 */
-/*  set up signal handling function */
-/*  the use of signal() is probably deprecated. */
-/*  sigaction is the POSIX way */
-
-#include <signal.h>
-
-void (*zignal (signo, func))()
-int signo;
-void (*func)();
-
-/*  signo is the signal number */
-/*  func is the function to call, which should return nothing */
-/*    func takes one argument, an int, the signal number that called it */
-/*  returns the previous signal handler function */
-
-{
-
-   struct sigaction act, oact;
-
-   act.sa_handler = func;
-/*		make sure we don't block other signals */
-   sigemptyset(&act.sa_mask);
-/*		turn off all flags */
-   act.sa_flags = 0;
-#ifdef SA_RESTART
-/*		Solaris uses this, SunOS default is essentially this */
-      act.sa_flags = SA_RESTART;
-#endif
-   if (sigaction(signo, &act, &oact) < 0)
-      return (SIG_ERR);
-   else
-      return (oact.sa_handler);
-}
-
diff -uNr 3.5/source/conline/zwait.f unipops-3.6/source/conline/zwait.f
--- 3.5/source/conline/zwait.f	2000-03-16 11:33:48.000000000 -0700
+++ unipops-3.6/source/conline/zwait.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,60 +0,0 @@
-      subroutine zwait(time)
-C-------------------------------------------------------------------------------
-C  @(#)zwait.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     System call for putting the program to sleep for
-c     a specified TIME (in sec).
-c     RJM   1989 March
-c
-      real*4 time
-      integer*4 isec
-c
-      isec = max(1, int(time+0.5))
-      call sleep(isec)
-c
-      return
-      end
-c
-c-----------------------------
-c
-      character*24 function zdatetime()
-c
-c     Returns the system date and time
-c	Format: Day-of-week, Month, Day, Hour:Min:Sec Year.
-c
-      character*24 fdate
-c
-      zdatetime = fdate()
-c
-      return
-      end
-c
-c-----------------------------
-c
-      character*16 function zdate()
-c
-c     Returns the system date
-c
-      character*24 fdate, temp
-c
-      temp = fdate()
-      zdate = temp(1:11) // temp(21:24)
-c
-      return
-      end
-c
-c-----------------------------
-c
-      character*8 function ztime()
-c
-c     Returns the system time
-c
-      character*24 fdate, temp
-c
-      temp = fdate()
-      ztime = temp(12:19)
-c
-      return
-      end
-
diff -uNr 3.5/source/copy.f unipops-3.6/source/copy.f
--- 3.5/source/copy.f	2000-03-16 11:32:02.000000000 -0700
+++ unipops-3.6/source/copy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      SUBROUTINE COPY (N,KFROM,KTO)
-C-------------------------------------------------------------------------------
-C  @(#)copy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C
-C          COPY TRANSFERS N INTEGER WORDS FROM KFROM TO KTO.
-C
-c     Changed 8903 [RJM] See CHANGES.DOC
-c************************************************************
-      integer*2 KFROM(*), KTO(*)
-      integer*2 n, i
-c
-      DO 10 I=1,N
-         KTO(I) = KFROM(I)
-   10    CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/copy2.f unipops-3.6/source/copy2.f
--- 3.5/source/copy2.f	2000-03-16 11:32:02.000000000 -0700
+++ unipops-3.6/source/copy2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,20 +0,0 @@
-      SUBROUTINE COPY2 (N,KFROM,KTO)
-C-------------------------------------------------------------------------------
-C  @(#)copy2.f	1.1 08/13/98
-C-------------------------------------------------------------------------------
-C
-C          COPY TRANSFERS N INTEGER WORDS FROM KFROM TO KTO.
-C
-c     Changed 8903 [RJM] See CHANGES.DOC
-C     This version uses I*4 indexing, which the other should
-C     as well, but that seemed more dangerous than simply
-C     making a copy2 for use where necessary.
-c************************************************************
-      integer*2 KFROM(*), KTO(*)
-      integer*4 n, i
-c
-      DO 10 I=1,N
-         KTO(I) = KFROM(I)
-   10    CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/cread.c unipops-3.6/source/cread.c
--- 3.5/source/cread.c	2000-03-16 11:32:03.000000000 -0700
+++ unipops-3.6/source/cread.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,46 +0,0 @@
-
-/*  @(#)cread.c	5.1 06/22/94 */
-
-/* read via c calls */
-
-#include <sys/types.h>
-#include <unistd.h>
-
-cread_ (fd, start, num, buf, blksize, ier)
-long int *fd, *start, *num, *blksize, *ier;
-char *buf;
-
-/* fd = file descriptor, need to be converted from lun in before calling */
-/* start = starting block number */
-/* num = number of blocks to read */
-/* blksize = blocksize in bytes */
-/* buf = buffer to hold the stuff from the file */
-/* ier = error number to return */
-
-
-{
-   off_t offset, curplace, newplace;
-   int i;
-
-/*	seek to the desired starting place */
-
-   curplace = lseek(*fd, 0L, SEEK_CUR);
-   newplace = *blksize * (*start - 1);
-   offset = newplace - curplace;
-   curplace = lseek(*fd, offset, SEEK_CUR);
-   if (curplace != newplace) {
-      *ier = 1;
-      return;
-   }
-
-   for(i=0;i<*num;i++) {
-      if (read(*fd, buf, *blksize) != *blksize) {
-         *ier = 2;
-         return;
-      }
-      buf = buf + *blksize;
-   }
-
-   *ier = 0;
-   return;
-}
diff -uNr 3.5/source/cwrite.c unipops-3.6/source/cwrite.c
--- 3.5/source/cwrite.c	2000-03-16 11:32:03.000000000 -0700
+++ unipops-3.6/source/cwrite.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,47 +0,0 @@
-
-/* @(#)cwrite.c	5.1 06/22/94 */
-
-/* write via c calls */
-
-#include <sys/types.h>
-#include <unistd.h>
-
-cwrite_ (fd, start, num, buf, blksize, ier)
-long int *fd, *start, *num, *blksize, *ier;
-char *buf;
-
-/* fd = file descriptor, need to be converted from lun in before calling */
-/* start = starting block number */
-/* num = number of blocks to write */
-/* blksize = blocksize in bytes */
-/* buf = buffer to hold the stuff from the file */
-/* ier = error number to return */
-/* block numbers are 1 relative, ala fortran */
-
-
-{
-   off_t offset, curplace, newplace;
-   int i;
-
-/*	seek to the desired starting place */
-
-   curplace = lseek(*fd, 0L, SEEK_CUR);
-   newplace = *blksize * (*start - 1);
-   offset = newplace - curplace;
-   curplace = lseek(*fd, offset, SEEK_CUR);
-   if (curplace != newplace) {
-      *ier = 1;
-      return;
-   }
-
-   for(i=0;i<*num;i++) {
-      if (write(*fd, buf, *blksize) != *blksize) {
-         *ier = 2;
-         return;
-      }
-      buf = buf + *blksize;
-   }
-
-   *ier = 0;
-   return;
-}
diff -uNr 3.5/source/editor.f unipops-3.6/source/editor.f
--- 3.5/source/editor.f	2000-03-16 11:32:04.000000000 -0700
+++ unipops-3.6/source/editor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,180 +0,0 @@
-      SUBROUTINE EDITOR	(J)
-C-------------------------------------------------------------------------------
-C  @(#)editor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-------------------------------------------------------------------------------
-C   POPS SOURCE	CODE EDIT FUNCTIONS
-C-------------------------------------------------------------------------------
-      integer*2 j, iblank, kedit, karat, jj, ll, i, nt, finish, lp, ip,
-     .		lp1, lp2, lcount
-      integer*2 n0, n1, n6, n11, n12, n13, n17, n21, n40, n120, m1, m3
-      real*4 epsiln
-      logical lhunt
-c
-      data n0, n1, n6, n11, n12, n13, n17, n21, n40, n120, m1, m3
-     +     /0, 1, 6, 11, 12, 13, 17, 21, 40, 120, -1, -3/
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-c
-      save lp, ip
-c
-      include 'tags.inc'
-c
-      DATA EPSILN/1.0E-6/
-      DATA IBLANK/' '/,	KEDIT/'	:'/
-      DATA KARAT/' >'/
-C
-C=======================================================================
-C
-      JJ = J
-      GO TO (10,50), JJ
-      call oerror(n120,m3,'EDITOR')
-C---------------------------------------------------------------------
-C					E D I T	 <name>	 <line>
-C---------------------------------------------------------------------
-  10  if (mode .ne. 0) call oerror(n17,n1,'')
-c
-      iedit = mode
-      mode = -1
-      symp = 0
-c
-      CALL GETFLD
-C					   Procedure name.
-      IF (TYPE.ne.3) call oerror(n11,n1,'')
-      if (k(7) .gt. locsym) call oerror(n6, n1, '')
-      IP=TAG
-      if (ip .le. 0) call oerror(n120,m3,'')
-      NAMEP=LOCSYM+2
-      lclstart = locsym + 3
-C					   Line	number.
-      CALL GETFLD
-      IF (TYPE.ne.11) call oerror(n12,n1,'')
-c
-      if (x(1) .lt. 1.+epsiln) call oerror(n40, n1, 
-     .		'Cannot POPSEDIT the first line of a PROCEDURE')
-c
-      LL=X(1)
-      DO 15 I=1,LL
-	 LP=IP
-	 IP=K(IP)
-	 IF (IP.EQ.0) GOTO 20 
-  15	 CONTINUE
-  20  IF (IP.NE.0) IP=K(IP)
-      if (ip .eq. 0) call oerror(n40, n1, 
-     .		'Cannot POPSEDIT the last line of a PROCEDURE')
-      XX=LL
-c
-      if (k(k(lp)+2) .eq. iprotect .and. ABS(X(1)-XX).le.EPSILN) 
-     .	call oerror(n40, n1, 'Cannot POPSEDIT a decleration')
-c
-      IF (ABS(X(1)-XX).GT.EPSILN) LP=K(LP)
-      LPGM=LP
-      AP=0
-c
-      lcllast = lclstart
-101   if (k(lcllast) .ne. 0) then
-	lcllast = k(lcllast)
-	goto 101
-      endif
-c     Find the location of the last local operand.
-c
-c     Now, step thru the proc to find out whether or not the user is
-c	editing between or after declerations.  Also, prepare list of
-c	operands already in use by procedure (in case we need to trap 
-c	the later desire to create a local symbol from one already
-c	used as a global).
-c 
-      lp1 = k(namep)
-      defexec = -1
-      lcount = 0
-120     if (k(lp1) .ne. 0) then
-	   lp2 = lp1 + 2
-c
-	   lcount = lcount + 1
-	   if (lcount .le. ll+2 .and. lcount .gt. 2) then
-		if (k(lp2) .ne. iprotect .and. k(lp2) .ne. iomega) then
-		  if (defexec .eq. -1) then
-		    defexec = 1
-		  else
-		    defexec = 0
-		  endif
-		endif
-	   endif 
-c	   Set DEFEXEC according to whether the edit is occuring before (1),
-c	   between (-1), or after (0) declerations.
-c
-130	   if(k(lp2) .eq. iomega) then
-		lp1 = k(lp1)
-		goto 120
-	   else
-		if (k(lp2) .lt. -200 .and. 
-     .		    .not. lhunt(-k(lp2)) ) call push(symstack, symp, -k(lp2))
-c		Place into SYMSTACK array the tags of all operands in use 
-c		by the procedure.
-c
-		lp2 = lp2 + 1
-		goto 130
-	   endif
-	else
-	   if (lcount .le. ll+2 .and. defexec .lt. 0) defexec = 1
-c	   Take care of the case of an empty procedure.
-c
-	endif
-c
-      mode = 1
-      llit = 1
-      CALL PROMPT (KEDIT,IPT)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C	       E  N  D	E  D  I	 T
-C---------------------------------------------------------------------
-  50  if (mode .ne. 1 .or. llit .ne. 1) call oerror(n13,n1,'')
-c
-      mode = -2
-      llit = 0
-      lclstart = 0
-      lcllast = 0
-      defexec = 0
-      symp = 0
-      CALL PROMPT (KARAT,IPT)
-c
-      AP=0
-      K(LPGM)=IP
-      lpgm = 2
-c
-      NT=0
-      IF (NAMEP.lt.200.or.NAMEP.gt.KXORG) call oerror(n13,n1,'')
-c     200 = tag of first item in linked list
-c
-      L=NAMEP-2
-      IF (L.eq.0) call oerror(n13,n1,'')
-c
-      NAMEP=0
-c
-      nt = finish(k, k(l+2), .false.)
-c
-      IF (NT .eq. 1) then
-	call oerror(n21,n0,'Too many IF, WHILE, or FOR constructs')
-      else if (nt .eq. 2) then
-	call oerror(n21,n0,'Too many END, THEN, or ELSE statements')
-      else if (nt .eq. 3) then
-	call oerror(n21,n0,'No closing END statement')
-      endif
-c
-      CALL PWRITE (IBLANK,n1)
-      CALL PUSH (A,AP,iomega)
-      IF (LEVEL.ne.0) call oerror(n21,n0,'')
-      call memusage
-c
-      mode = 0
-c
-      GO TO 99
-c
-C----------------------------------------------------------------------
-   99 CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/fill.f unipops-3.6/source/fill.f
--- 3.5/source/fill.f	2000-03-16 11:32:05.000000000 -0700
+++ unipops-3.6/source/fill.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      SUBROUTINE FILL (B,C,A)
-C-------------------------------------------------------------------------------
-C  @(#)fill.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C------------------------------------------------------------------------
-C	 FILL fills the	array A	with the constant C.  B	defines
-C     the length of array A.
-c     Modified 8903 [RJM] See CHANGES.DOC
-C------------------------------------------------------------------------
-      INTEGER*2 A(*), B, C
-      integer*2 i
-c
-      DO 10 I =	1, B
-	 A(I) =	C
- 10	 CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/finish.f unipops-3.6/source/finish.f
--- 3.5/source/finish.f	2000-03-16 11:32:05.000000000 -0700
+++ unipops-3.6/source/finish.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,114 +0,0 @@
-      integer*2 function finish(k, l, runorcmp)
-c
-c     @(#)finish.f	5.1  06/22/94
-c
-c     Processes and relinks IF, THEN, ELSE, and WHILES in procedures.
-c     Returns 0 if all goes well, else a value reflecting what went wrong.
-c
-c     K = Linked list that is to be relinked
-c     L = Index in K where procedure starts
-c     RUNORCMP = true if running an input line else must be compiling a line.
-c
-c     Returns a flag telling what went wrong.  
-c		0 = nothing went wrong
-c		1 = Too many IF's, FOR's, etc for processing.
-c		2 = END, THEN, or ELSE encounterd without a FOR, IF, or WHILE
-c			precceding it.
-c		3 = IF, FOR, or WHILE without a closing END
-c
-      integer*2 k(*), l
-      logical runorcmp
-c
-      integer*2 nt, ll, lll, it, reason, tstack(512), maxstck
-      logical pushcmp, popcmp
-c
-      include 'tags.inc'
-c
-      parameter (MAXSTCK = 512)
-c
-      NT=0
-      finish = 0
-c
-      ll = l
-c     LL = index to first/next program chunk; check whether it is
-c		the last chunk
-c
-20	if (ll .ne. 0) then
-c	    It is NOT the last program chunk
-c
-	    lll = ll+2
-c	    LLL = index to first/next command in current program chunk
-c
-30	    if (k(lll) .eq. iomega) then
-		ll = k(ll)
-		goto 20
-	    endif
-c	    You have come to the end of the last command in the
-c	    current program chunk.  Go on to the next program chunk
-c
-            IF (K(lll).eq.iifthen .or. K(lll).eq.iwhile) then
-c
-	        if (.not. pushcmp(tstack, nt, maxstck, lll) .or. 
-     .		    .not. pushcmp (TSTACK, NT, maxstck, K(lll))) then
-			finish = 1
-			return
-		endif
-c
-            else IF (K(lll).eq.iifelse .or. K(lll).eq.iforend .or.
-     .			K(lll).eq.idumend) then
-c
-	 	if (.not. popcmp (TSTACK, NT, REASON) .or.
-     .		    .not. popcmp (TSTACK, NT, IT)) then
-			finish = 2
-			return
-		endif
-c
-	        IF (REASON.EQ.iifelse .OR. REASON.EQ.iifthen .AND.
-     .			K(lll).EQ.iforend) K(lll) = idumend
-c		If end operator of an if stmt change to	opcode 96 (a no-op)
-c		which won't hurt the editor.
-c
-c
-	        IF (IT.ne .0) then
-	          K(IT-2)=-lll-1
-                  IF (k(ll) .LE. 0) then
-			if (runorcmp) then
-			   k(it-1) = -1
-			else
-			   K(IT-1) = -K(3)
-			endif
-		  else
-	         	K(IT-1)=-k(ll)
-		  endif
-	          IF (K(lll).EQ.iifelse) then
-	       	    if (.not. pushcmp(tstack, nt, maxstck, lll) .or.
-     .			.not. pushcmp (TSTACK, NT, maxstck, K(lll))) then
-				finish = 1
-				return
-		    endif
-	          endif
-	        endif
-C
-            else IF (K(lll).eq.iloopfor) then
-c
-	        if (.not. pushcmp(tstack, nt, maxstck, i0) .or.
-     .		    .not. pushcmp (TSTACK, NT, maxstck, K(lll))) then
-			finish = 1
-			return
-		endif
-c
-     	    endif
-c
-	    lll = lll + 1
-c
-	    goto 30
-c	    Advance to the next command in the current program chunk
-c
-      endif
-c
-      if (nt .ne. 0) finish = 3
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/fshort.F unipops-3.6/source/fshort.F
--- 3.5/source/fshort.F	2000-03-16 11:32:05.000000000 -0700
+++ unipops-3.6/source/fshort.F	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-c
-c @(#)fshort.F	5.1 06/22/94
-c
-      integer*2 function fshort(longint)
-c
-c	buffer between program and short() function
-c
-#ifdef I2ON
-      integer*2 longint
-#else
-      integer*4 longint
-#endif
-c
-      integer*4 temp
-      integer*2 short
-c
-      temp = longint
-      fshort = short(temp)
-c
-      return
-      end
diff -uNr 3.5/source/genmemory/arainit.f unipops-3.6/source/genmemory/arainit.f
--- 3.5/source/genmemory/arainit.f	2000-03-16 11:32:25.000000000 -0700
+++ unipops-3.6/source/genmemory/arainit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,132 +0,0 @@
-      SUBROUTINE ARAINIT
-C-------------------------------------------------------------------------------
-C  @(#)arainit.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C
-      INCLUDE 'core.inc'
-c
-      integer*2 i, j
-      real*4 rinfinity
-C
-C=======================================================================
-C
-C                               ADVERBS
-C
-C**********************************************************************
-C******************************** NOTE ********************************
-C**********************************************************************
-C******************************** NOTE ********************************
-C
-C         MAKE SURE YOU ALTER THE ARRAY DEFAULT VALUE COLUMN IN POPSDAT
-C	  TO REFLECT ALL CHANGES TO THIS ROUTINE.
-C
-C******************************** NOTE ********************************
-C**********************************************************************
-C******************************** NOTE ********************************
-C**********************************************************************
-c
-      do 5 i = 1, 2
-	 size(i) = 0.
-   5     CONTINUE
-c
-      DO 21 I = 1,12
-         XMARK(I)=-999999.
-         CMARK(I)=-999999.
-         FMARK(I)=-999999.
-	 HMARK(i)=-999999.
-         SMWGT(I)=0.
-         BADPT(I)=0.
-   21    CONTINUE
-c
-      DO 28 i=1,32 
-         NREGON(i)=0.
-	 levs(i) = -999999.
-	 flevs(i) = -999999.
-	 status(i) = 0.0
-	 conline(i) = 0.0
-	 do 319 j = 1, 3
-	   clut(j,i) = -16.0
-319	   continue
-  28     CONTINUE
-c
-      do 29 i = 1, 24
-         CENTER(I)=0.
-         HEIGHT(I)=0.
-         HWIDTH(I)=0.
-         cnterr(i) = 0.
-         hghterr(i) = 0.
-         hwerr(i) = 0.
-29	 continue
-c
-      do 30 i = 1, 48
-	gregon(i) = 0.
-30	continue
-c
-      do 33 i = 1, 15
-	bparm(i) = 0.0
-33	continue
-c
-      do 34 i = 1, 5
-	gmfrac(i) = 0.0
-	mlims(1,5) = default
-	mlims(2,5) = default
-	do 341 j = 1, 6
-	  gout(j, i) = 0.0
-341	  continue
-34	continue
-c
-      ctitle = ' '
-      cxtitle = ' '
-      cytitle = ' '
-      cs_object = ' '
-      cs_mode = ' '
-      cuserprompt = ' '
-c
-c		the following set the SELECT parameters to DEFAULT
-      default = rinfinity()
-      x_min = default
-      x_max = default
-      y_min = default
-      y_max = default
-      scan_min = default
-      scan_max = default
-      feed_min = default
-      feed_max = default
-      lst_min = default
-      lst_max = default
-      ut_min = default
-      ut_max = default
-      f_min = default
-      f_max = default
-      rate_min = default
-      rate_max = default
-      bw_min = default
-      bw_max = default
-      it_min = default
-      it_max = default
-c
-c     The following are the CLICK adverbs
-      cclick = default
-      tclick = default
-      fclick = default
-      vclick = default
-      mclick = default
-      xclick = default
-      yclick = default
-c
-C**********************************************************************
-C******************************** NOTE ********************************
-C**********************************************************************
-C******************************** NOTE ********************************
-C
-C         MAKE SURE YOU ALTER THE ARRAY DEFAULT VALUE COLUMN IN POPSDAT
-C	  TO REFLECT ALL CHANGES TO THIS ROUTINE.
-C
-C******************************** NOTE ********************************
-C**********************************************************************
-C******************************** NOTE ********************************
-C**********************************************************************
-C
-      RETURN
-      END
-
diff -uNr 3.5/source/genmemory/cre8ms.f unipops-3.6/source/genmemory/cre8ms.f
--- 3.5/source/genmemory/cre8ms.f	2000-03-16 11:32:26.000000000 -0700
+++ unipops-3.6/source/genmemory/cre8ms.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,38 +0,0 @@
-      SUBROUTINE CRE8MS(LUN,NAME,ISIZE,IER)
-C-------------------------------------------------------------------------------
-C  @(#)cre8ms.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C  To simulate the POPS PDP11 routine.
-C  See MSIO.MAC for specifications.
-c  Modified 8903   [RJM] See CHANGES.DOC
-c*****************************************************
-      INTEGER*2 LUN, name(*), isize, ier, inunit, i, istat
-      INTEGER*2 IRECLWORD
-      logical*2 inquirefile
-      integer*2 iname(32)
-      character*64 cname
-c
-      include 'cio.inc'
-c
-      equivalence (cname, iname(1))
-c
-      IRECLWORD=IRECSIZ/2            
-c***  !Record size in Long-words
-      inunit=LUN
-C                                    First copy NAME into the local array
-      do 10 i=1, 32
-	iname(i) = name(i)
-10	continue
-c
-      if (inquirefile(cname)) then
-	ier = -500
-      else
-        open(unit=inunit,file=cname,recl=ireclword*4,form='unformatted',
-     1     access='direct', status='new', iostat=istat)
-	if (istat .eq. 0) close(inunit,iostat=istat)
-	ier = istat
-      endif
-c
-      RETURN
-      END
-
diff -uNr 3.5/source/genmemory/gendummy.f unipops-3.6/source/genmemory/gendummy.f
--- 3.5/source/genmemory/gendummy.f	2000-03-16 11:32:26.000000000 -0700
+++ unipops-3.6/source/genmemory/gendummy.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine dummy (J)
-C-------------------------------------------------------------------------------
-C  @(#)gendummy.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c----------------------------------------------
-c  Dummy subroutines needed for GENMEMORY.  Should never be called
-c  [RJM] 8903
-c---------------------------------------------
-c
-      integer*2 j, stch(40), istat
-      integer*2 n80
-      character*80 cstch
-      data n80 /80/
-c
-      equivalence (stch, cstch)
-c
-      entry helps(j)
-c
-      write(cstch,10,iostat=istat) 
-10    format('HELPS:  You should not be here... Get HELP')
-      call pwrite(stch, n80)
-c
-      entry gpflush
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/genmemory/generrors.f unipops-3.6/source/genmemory/generrors.f
--- 3.5/source/genmemory/generrors.f	2000-03-16 11:32:27.000000000 -0700
+++ unipops-3.6/source/genmemory/generrors.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,36 +0,0 @@
-
-C-------------------------------------------------------------------------------
-C  @(#)generrors.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-      SUBROUTINE oerror (iecode, ierr, routine)
-C---------------------------------------------------------------------
-C Modified 890105 [PPM] includes to .inc, lowercase
-C          8903   [RJM] see CHANGES.DOC
-C---------------------------------------------------------------------
-      integer*2 ibuffer(40), istat, k, iecode, ierr
-      integer*2 n1, n10, n80
-      real*4 c
-      character*80 cbuffer
-      character*(*) routine
-c
-      INCLUDE 'smstuf.inc'
-c
-      equivalence (ibuffer, cbuffer)
-c
-      data n1, n10, n80 /1, 10, 80/
-C
-C=======================================================================
-C
-      WRITE (cbuffer,2005,iostat=istat) IECODE, ierr, routine
-      if (istat .eq. 0) call pwrite(ibuffer, n80)
-      WRITE (cbuffer,2010,iostat=istat) KPAK
-      if (istat .eq. 0) call pwrite(ibuffer, n80)
-      CALL KDUMP (n1,n10,K,C)
-      RETURN
-C---------------------------------------------------------
- 2005 FORMAT (1X, 'ERROR=', I5, i5, a)
- 2010 FORMAT (' KPAK:', 30A2)
- 2000 FORMAT (' ERROR',I3,' FROM: ',A4)
-      END
-
-
diff -uNr 3.5/source/genmemory/genmain.f unipops-3.6/source/genmemory/genmain.f
--- 3.5/source/genmemory/genmain.f	2000-03-16 11:32:27.000000000 -0700
+++ unipops-3.6/source/genmemory/genmain.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,295 +0,0 @@
-      PROGRAM POPSGEN
-C-------------------------------------------------------------------------------
-C  @(#)genmain.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C     POPSGEN	is the core initializer	for the	POPS driver.
-C     It initializes the K array with permanent	symbols, opcodes,
-C     procedures, etc. that are	needed to run POPS.
-C---------------------------------------------------------------------
-C
-      integer*2 ITRUE(2), IFALSE(3), istar, icmmnt, ispace, ksize,
-     .          lsize, inumarg, istat, llocat, irealp, ktlp, 
-     .          i1, i2, ll, n, i, idt, lli, ieof, ii, kxsize, itmp,
-     .          lastblnk
-      integer*2 n0, n1, n2, n12, n15, n20, n40, n50, n150, n120, m3,
-     .		fshort, n10
-      real*4 VX(2)
-      INTEGER*2 KPAC(5), FSIZE
-      integer*4 iargc, ione, iloc, long
-      character*10 filedat
-      character*10 ckpac
-c
-      include 'lsf.inc'
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-c
-      EQUIVALENCE (KPAK(1),KPAC(1)), (ckpac, kpac)
-c
-      DATA ITRUE/'TR','UE'/, IFALSE/'FA','LS','E '/
-      DATA ISTAR/'* '/
-      DATA ICMMNT/'C-'/, ispace/'  '/
-      DATA KSIZE/32766/, LSIZE/32766/, kxsize/32766/
-      data ione /1/
-c
-      data n0, n1, n2, n12, n15, n20, n40, n50, n150, n120, m3
-     +     /0, 1, 2, 12, 15, 20, 40, 50, 150, 120, -3/
-      data n10 /10/
-c
-      irecsiz = 256
-      KBLK = KSIZE / irecsiz
-      IF (KBLK*irecsiz .LT. KSIZE) KBLK=KBLK+1
-      LBLK = LSIZE / irecsiz
-      IF (LBLK*irecsiz .LT. LSIZE) LBLK=LBLK+1
-      kxBLK = kxSIZE / irecsiz
-      IF (kxBLK*irecsiz .LT. kxSIZE) kxBLK=kxBLK+1
-c
-      iout = 6
-      istderr = 6
-      iinunit = 5
-      iiotmp = 8
-      istdout = 6
-      istdin = 5
-      imemory = 21
-      karlim = 160
-c     Sets up units for I/O.  Needed by PWRITE, RWDISK, etc.
-c
-      write(iout,*) 'Generates Line or Condar Memory files'
-c
-      inumarg = iargc()
-c
-1099  if (inumarg .le. 0) then
-	write(iout,*) 'Enter L for Line or C for Condar'
-        read(iinunit,1091) program
-1091    format(a)
-      else
-	call getarg(ione,program(1:1))
-	inumarg = 0
-      endif
-c     Gets the file name from the command line, if it is specified or
-c     from standard input.
-c
-      if (program(1:1) .eq. 'L' .or. program(1:1) .eq. 'l') then
-	program = 'Ll'
-      else if(program(1:1) .eq. 'C' .or. program(1:1) .eq. 'c') then
-	program = 'Cc'
-      else
-	write(iout,*) 'Bad arguement: ', program(1:1),' .... Try again'
-	goto 1099
-      endif
-      cmemory = program(1:1) // 'MEMORY'
-c     Finds out what memory file to generate
-c
-      filedat = program(1:1) // 'POPSDAT'
-c     Input POPSDAT file
-c
-      iinunit = iiotmp
-c     Changes input unit for future reads
-C                                          Open files.
-      FSIZE = (KBLK + LBLK + kxblk) * 4
-      CALL CRE8MS(imemory,cmemory,FSIZE,ISTAT)
-      if (istat .ne. 0) then
-	write(istderr,*) 'Memory file cannot be created.... Terminating'
-	goto 99
-      endif
-c
-      CALL OPENMS(imemory,cmemory,n1,ISTAT)
-      if (istat .ne. 0) then
-	write(istderr,*) 'Memory file cannot be opened.... Terminating'
-	goto 99
-      endif
-c
-      open(unit=iinunit, file=filedat, status='old',iostat=istat)
-      if (istat .ne. 0) then
-	write(istderr,*) 'Popsdat file cannot be opened.... Terminating'
-	goto 99
-      endif
-c
-      REWIND (iinunit,err=99)
-C                                      Initialize memory file.
-C                                          Initialize.
-      CALL FILL	(KSIZE,n0,K)
-      CALL FILL	(LSIZE,n0,LISTF)
-      CALL FILL	(kxsize,n0,Kx)
-c
-      MODE=1
-      iedit = -1
-      KTLP = 2
-      slim = 400
-      NEXTP=0
-      LPGM=2
-c
-      K(3)=11
-      K(5) = ksize
-      K(8) = ksize
-      K(9)=1
-      K(10)=4
-      Kx(3)= 11
-      Kx(5)= kxsize
-      LISTF(3)=11
-      LISTF(5) = LSIZE
-      kt = 6
-      kt = LLOCAT(n40,K,kt) 
-C					Note:  KT is the subscript of
-C					       K for immediate exec.
-      KT=51
-      KT=LLOCAT(n150,K,KT)
-      KKT(3) = 11
-      KKT(5) = 140
-C					One.
-      LX=2
-      X(1)=1.0
-      TYPE=11
-      CALL LTSTOR
-      ONE=TAG
-C					Zero.
-      X(1)=0.0
-      CALL LTSTOR
-      ZERO=TAG
-C					True.
-      NKAR=4
-      KPAK(1)=ITRUE(1)
-      KPAK(2)=ITRUE(2)
-      call creatspc(n2, tag)
-      CALL creatsym (n15, kpak, nkar, tag, n0, locsym)
-      C(TAG)=+1.0
-      TRUE=TAG
-C					False.
-      NKAR=5
-      KPAK(1)=IFALSE(1)
-      KPAK(2)=IFALSE(2)
-      KPAK(3)=IFALSE(3)
-      call creatspc(n2, tag)
-      CALL creatsym (n15, kpak, nkar, tag, n0, locsym)
-      C(TAG)=-1.0
-      FALSE=TAG
-C					Compile	symbols	and opcodes.
- 50   READ (iinunit,1000,END=160) JBUFF
-      IF (JBUFF(1).EQ.ICMMNT .or. jbuff(1).eq.ispace) GO TO 50
-      READ (CBUFF,5050,ERR=500) KPAC,NKAR,IDT,I1,I2,VX
-      WRITE(istdout,5051) KPAC,NKAR,IDT,I1,I2,VX
-      itmp = min(lastblnk(ckpac),n10)
-      if (itmp .ne. nkar) then
-         write(istderr, *) 
-     .     'Inconsistent number of characters ... exiting'
-         goto 99
-      endif
-c					oops, there is a problem with POPSDAT
-c				bad number of characters, just exit
-      GO TO (110,120,130,140,150,160,120,110), IDT
-      call oerror(n120, m3, 'GENMAIN')
-C					Real symbols.
- 110  call creatspc(n2, tag)
-      CALL creatsym (idt, kpak, nkar, tag, n0, locsym)
-      C(TAG)=VX(1)
-      GO TO 50
-C					Arrays.
- 120  call creatspc(n2, tag)
-      CALL creatsym (idt, kpak, nkar, tag, n0, locsym)
-      L=LOCSYM+3
-      LL=LLOCAT(fshort(2*I1+2),K,L)
-      N=1
-      LLI=LL+2
-      DO 122 I=1,I1
-	 N=N*VX(I)
-	 K(LLI)=1
-	 K(LLI+1)=VX(I)+.1
- 122 	 LLI=LLI+2
-      K(LL)=N
-      K(LL+1)=I1
-      L=1
-      LL=LLOCAT(fshort(N*2-2),Kx,L)
-      GO TO 50
-c
- 130  CONTINUE
-      GO TO 50
-C					Operators.
- 140  CONTINUE
-C					Pseudo operators.
- 150  CALL creatsym (idt, kpak, nkar, i1, n1, locsym)
-      GO TO 50
-C
- 160  CONTINUE
-      CALL ARAINIT
-      CALL KDUMP (n1,n12,K,C)
-      CALL KDUMP (K(1),fshort(K(1)+n20),K,C)
-      CALL KDUMP (fshort(n50+n1),fshort(n50+n12),K,C)
-      CALL KDUMP (n1,n12,Kx,C(irealp(ksize)+n1) )
-      CALL KDUMP (n1,n12,listf,listf)
-C
-      ILOC = KBLK+kxblk+1
-      call writms(imemory, iloc, long(lblk), listf, istat)
-      if (istat .ne. 0) then
-	write(istderr,*) 'Cannot write to Memory file.... Terminating'
-	goto 99
-      endif
-C					Compile	Procedures.
-      mode = 0
- 200  CALL PREAD (KARBUF,IEOF)
-      WRITE (istdout,1022) (KARBUF(I),I=1,nbytes)
- 1022 FORMAT (1X,160a1)
-      GO TO (210,390), IEOF
-      call oerror(n120, m3, 'GENMAIN')
-C					   Comment Card.
- 210  IF (KARBUF(1).EQ.ISTAR .or. karbuf(1).eq.ispace) GO TO 200
-      KBPTR=1
-      CALL POLISH
-      IF ((AP.ne.0).and.(MODE.eq.0)) call oerror(n2, n1, ' ')
-C					   Mode	0 -> Immediate exec.
-C					   Mode	1 -> Compilation.
-      IF (MODE.EQ.1) GO	TO 200
-      LPGM = 2
-      MODE = 0
-      GO TO 200
-C
- 390  WRITE (istdout,1010)
-C					Lock of	resident PROCEDURES.
-      K(7)=K(3)
-      listf(7) = listf(3)
-      kx(7)= kx(3)
-C					Save core resident memories.
-      DO 400 II=1,4
-         ILOC = (II-1)*(KBLK+kxblk+LBLK)+1
-         WRITE (istdout,1999) II,ILOC,KBLK
- 1999    FORMAT (' WRITING TO DISK',3I8)
-         call writms(imemory, iloc, long(kblk), k, istat)
-         if (istat .ne. 0) then
-	   write(istderr,*) 'Cannot write to Memory file.... Terminating'
-	   goto 99
-         endif
-         ILOC = ILOC + KBLK
-         call writms(imemory, iloc, long(kxblk), kx, istat)
-         if (istat .ne. 0) then
-	   write(istderr,*) 'Cannot write to Memory file.... Terminating'
-	   goto 99
-         endif
-         ILOC = ILOC + kxblk
-	 call writms(imemory, iloc, long(lblk), listf, istat)
-         if (istat .ne. 0) then
-	   write(istderr,*) 'Cannot write to Memory file.... Terminating'
-	   goto 99
-         endif
- 400	 CONTINUE
-      call closms(imemory, istat)
-      if (istat .ne. 0) then
-	   write(istderr,*) 'Cannot close Memory file.... Terminating'
-	   goto 99
-      endif
-   99 CONTINUE
-      STOP
-C----------------------------------------- Unit istdout read error.
- 500  WRITE (istderr,5100) JBUFF,KPAC,NKAR,IDT,I1,I2,VX
-      GO TO 50
-C-----------------------------------------------------------------------
- 1000 FORMAT (80A2)
- 5000 FORMAT (1X,80A2)
- 5050 FORMAT(5A2,1X,I3,1X,I3,1X,I4,1X,I4,2(1X,F7.2))
- 5051 FORMAT(1X,5A2,1X,I3,1X,I3,1X,I4,1X,I4,2(1X,F10.2))
- 5100 FORMAT (1X,80A2,/,' READ AS:',/,' KPAC:',5A2,/,
-     .        ' NKAR:',I3,/,  ' IDT:',I3,/,
-     .        ' I1:',I3,/,    ' I2:',I3,/,
-     .        ' VX:',2F7.3)
- 1010 FORMAT(' POPSGEN COMPLETE')
-      END
diff -uNr 3.5/source/genmemory/genpread.f unipops-3.6/source/genmemory/genpread.f
--- 3.5/source/genmemory/genpread.f	2000-03-16 11:32:29.000000000 -0700
+++ unipops-3.6/source/genmemory/genpread.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-      SUBROUTINE PREAD (KB,IEOF)
-C-------------------------------------------------------------------------------
-C  @(#)genpread.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C        PREAD reads input text and unpacks the buffer one byte per
-C     word.  The buffer is assumed to be 160 or less characters.  The
-C     buffer is padded with blanks.
-C-----------------------------------------------------------------------
-      integer*2 KB(*), ieof, iblank, lastblnk, iwpc
-c
-      character*160 cbuff
-c
-      INCLUDE 'cio.inc'
-c
-      equivalence (cbuff, jbuff)
-c
-      DATA IBLANK /'  '/
-C
-C=======================================================================
-C
-C                                       All input text is tight buffer.
-      IEOF=1
-      READ (iinunit,2000,END=30) cbuff
-      nbytes = min(lastblnk(cbuff)+1,karlim)
-c
-      inhist = 1
-      maxhist = 1
-      hist(1) = cbuff
-      lastline = cbuff
-c     Stores input string into HIST array in case some other routine may need 
-c     it.
-c
-      CALL UNPACK (iwpc(nbytes),JBUFF,KB)
-      GO TO 99
- 30   IEOF=2
- 99   RETURN
-C-----------------------------------------------------------------------
- 2000 FORMAT (a160)
-      END
-
diff -uNr 3.5/source/genmemory/genpwrite.f unipops-3.6/source/genmemory/genpwrite.f
--- 3.5/source/genmemory/genpwrite.f	2000-03-16 11:32:29.000000000 -0700
+++ unipops-3.6/source/genmemory/genpwrite.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      SUBROUTINE PWRITE	(KB,N)
-C-------------------------------------------------------------------------------
-C  @(#)genpwrite.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C*	 Control output	devices.  
-C*				 
-c          8903   [RJM] See CHANGES.DOC
-C----------------------------------------------------------------------
-      integer*2 kb(*), n, iwpc, lastblnk, ilen2
-      character*160 ckb1
-      integer*2 kb1(80)
-c
-      INCLUDE 'cio.inc'
-c
-      equivalence (ckb1, kb1)
-c
-      if (iout .le. 0) iout = istdout
-      ckb1 = ' '
-      call copy(min(iwpc(karlim),iwpc(n)), kb, kb1)
-      ilen2 = lastblnk(ckb1)
-c
-      write(iout, 200) ckb1(1:ilen2)
-200   format(1x,a)
-c
-      return
-      end
-c
diff -uNr 3.5/source/genmemory/genstores.f unipops-3.6/source/genmemory/genstores.f
--- 3.5/source/genmemory/genstores.f	2000-03-16 11:32:29.000000000 -0700
+++ unipops-3.6/source/genmemory/genstores.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,64 +0,0 @@
-      SUBROUTINE STORES	(J)
-C-------------------------------------------------------------------------------
-C  @(#)genstores.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C   STORES-OPERATIONS
-C   -----------------
-C	 STORES	stores either the procedure source code, procedure
-C     object code, or handles the source code.	Note opcode 64 is a
-C     internal operator	that stores the	source and object code for
-C     procedures.
-C
-C     LISTF is the storage location for	PROC source code.
-C
-C---------------------------------------------------------------------
-C
-      character*160 tempstring
-      integer*2 j, llocat, ibyte, lastblnk, ii, listl,
-     1          itempstring(80), iwpc 
-      integer*2 n120, m3, fshort
-c
-      INCLUDE 'core.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-      include 'lsf.inc'
-      include 'smstuf.inc'
-c
-      equivalence (itempstring(1), tempstring)
-C
-      data n120/120/, m3/-3/
-c
-C=======================================================================
-C
-C					Get LISTF.
-c
-      if (j .ne. 1) call oerror(n120, m3, 'GENSTORES')
-C
-C---------------------------------------------------------------------
-C   				   Store PROC source and object	code.
-C---------------------------------------------------------------------
-C					Store object code.
-      L=LLOCAT(fshort(AP+2),K,LPGM)
-      LPGM=L
-      L=L+1
-      LISTL=1
-      tempstring = lastline
-      ibyte = min( lastblnk(tempstring), kbptr-1)
-c     Because of processing by a preparser like AMTHPARSER, must now use the
-c     input string stored in HIST as opposed to that in KARBUF or CBUFF.
-c     Also, the 'case' of the input string is preserved.
-c
-      ii = iwpc(ibyte) + 1
-      K(L)=LLOCAT(II,LISTF,LISTL)
-      L=L+1
-      CALL COPY	(AP,A,K(L))
-C					Store source code.
-      listf(listl) = ibyte
-      LISTL=LISTL+1
-      call copy(ibyte, itempstring, listf(listl) )
-c
-      RETURN
-      END
-c
-     
diff -uNr 3.5/source/getfld.f unipops-3.6/source/getfld.f
--- 3.5/source/getfld.f	2000-03-16 11:32:06.000000000 -0700
+++ unipops-3.6/source/getfld.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,195 +0,0 @@
-      SUBROUTINE GETFLD
-C-------------------------------------------------------------------------------
-C  @(#)getfld.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C--------------------------------------------------------------------
-C   Field scanning routine
-C     Finds the	next non-blank character in KARBUF.  Determines
-C  whether the token begun with	that character is symbolic
-C  (1st	char is	A->Z), numeric (1st char 0->9,	or .), or a hollerith
-C  constant begin with apostrophe.  After the field length is found,
-C  appropriate calls are made to the symbol processing routine,
-C  number scanning routine, etc.  Communication	back to	polish is
-C  via TYPE and	TAG parameters,	determined by the processors
-C  SYMBOL, GETNUM, LTSTOR, etc.
-c
-c  NTYPE = type of symbol that SYMBOL is to create if the symbol doesn't
-c	already exist. 
-C
-C  Modified 890105 [PPM] changed includes to .inc, lowercase and made
-C                        the above header more readable.
-c           8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-C
-      character*60 cix
-      character*160 cbuff2
-c
-      integer*2 isp, icom, nine, izero, ia, iz, idot, iquote, istar,
-     .          igt, ilt, iul, iequal, ibrace, inot, ilb, 
-     .          iblank, i0, limit, iia, iiz, iinine, iizero, iiul, 
-     .          iilb, m, it, j, kp, iwpc, iwpr, lastblnk,
-     .          m1, irealp, ibrace2, iquote1, iquote2
-      integer*2 n1, n2, n4, n5, n14, n37, fshort
-c
-      INCLUDE     'smstuf.inc'
-      include     'stk.inc'
-      INCLUDE     'cio.inc'
-c
-      equivalence (cix, x(1))
-C
-      DATA ISP/' '/,ICOM/','/,NINE/'9'/,IZERO/'0'/,IA/'A'/,IZ/'Z'/,
-     .	IDOT/'.'/,IQUOTE1/''''/,ISTAR/'*'/,IGT/'>'/,ILT/'<'/,
-     .      IUL/'_'/, IEQUAL/'='/, ibrace/'{'/, inot/'~'/, ilb/'#'/
-      data iblank/'  '/,ibrace2/'}'/, IQUOTE2/'"'/
-      DATA I0/0/
-c
-      data n1, n2, n4, n5, n14, n37 /1, 2, 4, 5, 14, 37/
-C
-C=======================================================================
-c
-C---------------------------------------  ZERO PAD CHAR.
-C
-      limit = min(nbytes, karlim)
-c
-      CALL GTBYTE (IIA,IA,I0)
-      CALL GTBYTE (IIZ,IZ,I0)
-      CALL GTBYTE (IININE,NINE,I0)
-      CALL GTBYTE (IIZERO,IZERO,I0)
-      CALL GTBYTE (IIUL,IUL,I0)
-      call gtbyte (iilb, ilb, i0)
-C--------------------------------------------------------------------
-5      TAG=0
-      NKAR=0
-      TYPE=0
-      X(1)=0
-C					SKIP LEADING BLANKS.
-   10 IF (KBPTR.GT.LIMIT) GO TO	99
-	 M=KARBUF(KBPTR)
-	 IF (M.NE.ISP) GO TO 20
-	 KBPTR=KBPTR+1
-	 GO TO 10
-C					CLASSIFY TYPE BY FIRST CHAR.
-20    CALL GTBYTE (IT,M,I0)
-      if (kbptr .eq. 1 .and. it .eq. iilb) then
-	kbptr = limit+1
-	goto 99
-      endif
-c     Skips parsing the input line if the first character is a # sign 
-c     (indicating a comment line).
-c
-      IF ((IT.LE.IIZ).AND.(IT.GE.IIA)) GO TO 40
-      IF (M.EQ.IDOT) GO	TO 60
-      IF (M.EQ.IQUOTE1  .or. m .eq. iquote2)  GO TO 90
-      if (m .eq. ibrace .or. m .eq. ibrace2) goto 110
-      IF ((IT.LE.IININE).AND.(IT.GE.IIZERO)) GO	TO 60
-      GO TO 80
-C--------------------------------------------------------------------
-C      S Y M B O L I C	  F I E	L D
-C--------------------------------------------------------------------
-   40 CONTINUE
-      J=KBPTR
-   42 NKAR=NKAR+1
-c		Look for end of line or end of symbol (flagged by 
-c		non-alphanumeric character)
-	 J=J+1
-         IF (J.gt.LIMIT) call oerror(n4,n1,' ')
-         M=KARBUF(J)
-	 CALL GTBYTE (IT,M,I0)
-	 IF ((IT.LE.IIZ).AND.(IT.GE.IIA)) GO TO	42
-	 IF (IT.EQ.IIUL) GO TO 42
-	 IF ((IT.LE.IININE).AND.(IT.GE.IIZERO))	GO TO 42
- 44   KP=1
-c
-c		Pack input string from start of field to end into
-c		KPAK; fill rest of KPAK with blanks
-c
-      if (nkar .gt. 10) call oerror(n5,n1,' ')
-      CALL KPACK (NKAR,KARBUF,KBPTR,KPAK,KP)
-      call fill (fshort(30-iwpc(nkar)), iblank, kpak(iwpc(nkar)+1))
-      CALL SYMBOL
-      GO TO 99
-C--------------------------------------------------------------------
-C	 N U M E R I C	  F I E	L D
-C--------------------------------------------------------------------
- 60   J=KBPTR
-      CALL GETNUM (cbuff(1:limit), kbptr, x(1))
-      kbptr = kbptr - 1
-      NKAR=KBPTR-J
-      LX = IWPR(n1)
-      TYPE=11
-      CALL LTSTOR
-      GO TO 99
-c----------------------------------------------
-c    Brace -- AMATH parsing
-c----------------------------------------------
-110   continue
-      call amathparser(cbuff(kbptr:nbytes), cbuff2)
-      if (lastblnk(cbuff2) + kbptr - 1 .ge. karlim) 
-     +       call oerror(n4,n1,' ')
-      cbuff(kbptr:) = cbuff2
-      nbytes = lastblnk(cbuff) + 1
-      call unpack(iwpc(nbytes), jbuff, karbuf)
-      goto 10
-c
-C--------------------------------------------------------------------
-C	 ' O T H E R ' (SUCH THINGS AS + - * / ** ETC.)
-C--------------------------------------------------------------------
- 80   J=KBPTR
-   82 NKAR=NKAR+1
-	 J=J+1
-         IF (NKAR.gt.2) call oerror(n2,n1,' ')
-         M=KARBUF(J)
-	 M1=KARBUF(J-1)
-c
-c		Watches out for double symbols **, <=, >=, etc.
-c
-	 IF ((M1.EQ.ISTAR).AND.(M.EQ.ISTAR)) GO	TO 82
-	 IF  (M.NE.IEQUAL) GO TO 44
-	 IF ((M1.EQ.ILT).OR.(M1.EQ.IGT).or.(m1.eq.inot) ) GO TO 82
-      GO TO 44
-C--------------------------------------------------------------------
-C	 H O L L E R I T H    F	I E L D	S
-C--------------------------------------------------------------------
- 90   CONTINUE
-c
-      iquote = m
-c
-      TYPE=14
-      KBPTR=KBPTR+1
-      J=KBPTR
-c
-c		Hollerith field can only hold 60 characters (set by
-c		dimension of IX array (= X array))
-c
-c		Steps through line until next closing quote is found
-c		or until end of line (generates an error then)
-c
-  95  IF (KARBUF(J).ne.IQUOTE) then
-	 NKAR=NKAR+1
-         IF (NKAR.gt.60) call oerror(n14,n1,' ')
-         J=J+1
-	 if (j .gt. limit) call oerror(n37,n1,' ')
-	 cix(nkar:nkar) = cbuff(j-1:j-1)
-	 GO TO 95
-      else
-	 if (j .lt. limit .and. karbuf(j+1) .eq. iquote) then
-	    nkar = nkar + 1
-            IF (NKAR.gt.60) call oerror(n14,n1,' ')
-            J=J+2
-	    if (j .gt. limit) call oerror(n37,n1,' ')
-	    cix(nkar:nkar) = cbuff(j-1:j-1)
-	    goto 95
-	 endif
-      endif
-c
-      if (mod(nkar,2).ne.0) cix(nkar+1:nkar+1) = ' '
-      lx = irealp(nkar)
-      kbptr = kbptr + nkar
-c     Use the packed, non-case-converted string instead of unpacked,
-c     uppercase string
-c
-      CALL LTSTOR
-      KBPTR=J+1
- 99   CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/getnum.f unipops-3.6/source/getnum.f
--- 3.5/source/getnum.f	2000-03-16 11:32:07.000000000 -0700
+++ unipops-3.6/source/getnum.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,67 +0,0 @@
-      SUBROUTINE GETNUM (KB,kbp,x)
-C-------------------------------------------------------------------------------
-C  @(#)getnum.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C   NUMBER FIELD SCANNER
-C   ------ ----- -------
-C        CONVERTS ALPHANUMERIC FIELD INTO A SINGLE-PRECISION REAL #.
-c Modified 8903 [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      character*(*) KB
-      real x
-      integer*2 kbp
-      integer*2 lastblnk, kbplim, ifirst, ilast
-      integer*2 n1, n15
-      data n1, n15 /1, 15/
-c
-C---------------------------------------------------------------------
-c
-      kbplim = lastblnk(kb)
-      if (kbplim .lt. kbp) then
-        kbp = len(kb)
-	x = 0.
-	return
-      endif
-c     Returns a zero if all blanks to end of string
-c
-      do 102 ifirst = kbp, kbplim
-         if (kb(ifirst:ifirst) .ne. ' ' .and.
-     1       kb(ifirst:ifirst) .ne. ',') goto 105
-102      continue
-c     Finds first non-blank character
-c
-105   do 103 ilast = ifirst, kbplim
-	if (kb(ilast:ilast) .eq. 'e') kb(ilast:ilast) = 'E'
-	if (kb(ilast:ilast) .eq. 'E') goto 103
-c       Convert any 'e' for exponent into capital E
-c
-	if (ilast .gt. ifirst .and.
-     1      (kb(ilast-1:ilast) .eq. 'E-' .or.
-     2       kb(ilast-1:ilast) .eq. 'E+') ) goto 103
-c
-        if (ilast .eq. ifirst .and.
-     1      (kb(ilast:ilast) .eq. '-' .or.
-     2       kb(ilast:ilast) .eq. '+') ) goto 103
-c
-        if (kb(ilast:ilast) .eq. '.') goto 103
-c
-        if ( llt(kb(ilast:ilast),'0') .or.
-     1       lgt(kb(ilast:ilast),'9') ) goto 110
-c       Any non-number character (except E+, E-, E, +, -, .) signals end
-c       of field.
-c
-103     continue
-      ilast = kbplim + 1
-c     Find next , or space, which indicates end of field
-c
-110   read(kb(ifirst:ilast-1), 100, err=120) x
-100   format(e80.0)
-      kbp = ilast + 1
-      return
-c
-120   continue
-      call oerror(n15,n1,' ')
-      return
-c
-      END
diff -uNr 3.5/source/gtbyte.f unipops-3.6/source/gtbyte.f
--- 3.5/source/gtbyte.f	2000-03-16 11:32:08.000000000 -0700
+++ unipops-3.6/source/gtbyte.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine gtbyte (data,iword,nbyte)
-C-------------------------------------------------------------------------------
-C  @(#)gtbyte.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 GTBYTE	extracts a character (byte) from IWORD and returns the
-C     character	in DATA	right justified	with zero fill.
-C     NBYTE = 0	=> left	char,  = 1 => right char.
-c Modified 8903 [RJM] See CHANGES.DOC
-C-----------------------------------------------------------------------
-C     For byte machines (PDP 11 series) NBYTE = 1 =>left;  0 => right.
-C-----------------------------------------------------------------------
-c
-      integer*2 data,iword
-      integer*2 nbyte
-c
-      if(nbyte.eq.1) data = mod(iword, 256)
-      if(nbyte.eq.0) data = iword / 256
-c
-      if (data.ge.97 .and. data.le.122) data = data - 32
-c     Changes Lower Case to Upper
-c
-      if (data .le. 31 .or. data .ge. 127) data = 32
-c     Replaces all non alpha-numeric character to a space.  Eliminates
-c     tabs, nulls, esc, etc.  
-c
-      return
-      end
diff -uNr 3.5/source/hunt.f unipops-3.6/source/hunt.f
--- 3.5/source/hunt.f	2000-03-16 11:32:08.000000000 -0700
+++ unipops-3.6/source/hunt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,33 +0,0 @@
-      SUBROUTINE HUNT (K,L,NT,ISTART,KHUNT)
-C-------------------------------------------------------------------------------
-C  @(#)hunt.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C	 HUNT searches a linked	list usually the symbol	or literal
-C     tables.  The array K contains the	table with K(L)	as the first
-C     entry.  NT words are matched beginning at	ISTART words from the
-C     beginning	of the entry with KHUNT.  The pointer L	is left	pointing
-C     at the entry found or equal to zero if no	match is found.
-c      Modified 8903  [RJM] See CHANGES.DOC
-C----------------------------------------------------------------------
-      integer*2 KHUNT(*), K(*), l, nt, istart, i, j
-
-10    continue
-      if (l .gt. 0) then
-	if (k(l+1)/16 .ne. nt) then
-		l = k(l)
-		goto 10
-	else
-      		J=L+ISTART
-      		DO 20 I=1,NT
-	 	   IF (K(J).NE.KHUNT(I)) then
-			l = k(l)
-			goto 10
-		   else
- 			J=J+1
-		   endif
-20		   continue
-	endif
-      endif
-      RETURN
-      END
diff -uNr 3.5/source/ieeestuff.f unipops-3.6/source/ieeestuff.f
--- 3.5/source/ieeestuff.f	2000-03-16 11:32:25.000000000 -0700
+++ unipops-3.6/source/ieeestuff.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,94 +0,0 @@
-      double precision function dmaxnormal()
-c
-c     @(#)ieeestuff.f	5.1 06/22/94
-c
-      double precision d_max_normal
-c
-      dmaxnormal = d_max_normal()
-      return
-      end
-c
-c-----------------------------
-c
-      double precision function dminnormal()
-c
-      double precision d_min_normal
-c
-      dminnormal = d_min_normal()
-      return
-      end
-c
-c-----------------------------
-c
-      real function rmaxnormal()
-c
-      real r_max_normal
-c
-      rmaxnormal = r_max_normal()
-      return
-      end
-c
-c-----------------------------
-c
-      real function rminnormal()
-c
-      real r_min_normal
-c
-      rminnormal = r_min_normal()
-      return
-      end
-c
-c-----------------------------
-c
-      real function rinfinity()
-c
-      real r_infinity
-c
-      rinfinity = r_infinity()
-      return
-      end
-c
-c-----------------------------
-c
-      double precision function dinfinity()
-c
-      double precision d_infinity
-c
-      dinfinity = d_infinity()
-      return
-      end
-c
-c-----------------------------
-c
-      logical function okreal8(value)
-c
-c     Checks that VALUE is not +/- infinity and NaN.
-c
-      double precision value, dmaxnormal
-c
-      if(abs(value) .le. dmaxnormal()) then
-	okreal8 = .true.
-      else
-	okreal8 = .false.
-      endif
-c
-      return
-      end
-c
-c-----------------------------
-c
-      logical function okreal4(value)
-c
-c     Checks that VALUE is not +/- infinity and NaN.
-c
-      real value, rmaxnormal
-c
-      if(abs(value) .le. rmaxnormal()) then
-	okreal4 = .true.
-      else
-	okreal4 = .false.
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/source/iinitp.f unipops-3.6/source/iinitp.f
--- 3.5/source/iinitp.f	2000-03-16 11:32:09.000000000 -0700
+++ unipops-3.6/source/iinitp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-      INTEGER*2 FUNCTION IINITP	(IP)
-C-------------------------------------------------------------------------------
-C  @(#)iinitp.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C------------------------------------------------------------------------
-C	 IINITP	calculates the index of	a integer array	element	cor-
-C     responding to an equivalenced real array given the real index
-C     (IP).
-C------------------------------------------------------------------------
-      integer*2 ip
-c
-      IINITP=IP*2-1
-      RETURN
-      END
diff -uNr 3.5/source/inquirefile.f unipops-3.6/source/inquirefile.f
--- 3.5/source/inquirefile.f	2000-03-16 11:32:09.000000000 -0700
+++ unipops-3.6/source/inquirefile.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      logical*2 function inquirefile(filename)
-C-------------------------------------------------------------------------------
-C  @(#)inquirefile.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Checks whether file FILENAME exists
-c     RJM   March 1989
-c
-      logical*4 lexist
-      character*(*) filename
-c
-      inquire(file=filename,exist=lexist)
-      inquirefile = lexist
-c
-      return
-      end
-
diff -uNr 3.5/source/iounits.c unipops-3.6/source/iounits.c
--- 3.5/source/iounits.c	2000-03-16 11:32:10.000000000 -0700
+++ unipops-3.6/source/iounits.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,125 +0,0 @@
-
-/* @(#)iounits.c	5.1 06/22/94 */
-/*
- *  A set of functions for keeping track of the open fortran IO unit numbers.
- *  Unit numbers are the NUMIO consecutive integers starting with MINIO.
- *
- *  The functions (all long int = integer*4) are:
- *     ioinit_() initiallizes the io table.  Can only be called once.  Returns
- *               0 on first call and -1 if called more than once.
- *               The other 4 functions can tell if it has been called and will
- *               call it if necessary so there is no need to ever call this.
- *     ioget_()  returns lowest unused IO number and marks it as used in the 
- *               table.  Returns -1 if all numbers assigned. 
- *     ioput_(ionum) ionum is a long int, ioput resets the table entry for
- *               ionum marking it as available for use. 
- *               Returns -1 if ionum is not marked as in use and
- *                       -2 if ionum is outside the range of the table
- *     iostat_() Returns the number of available IO numbers in the table.
- *     ioset_(ionum) Marks the entry in the table for ionum as being in
- *               use (i.e. like ioget except you get to choose the number).
- *               Returns -1 if ionum is already markes as in use and
- *                       -2 if ionum is outside the range of the table.
- *  A return of -3 in the last 4 functions means that they thought it was
- *  necessary to call ioinit but ioinit returned an error.  This indicates a
- *  serious problem which should never occur.
- */
-
-#define NUMIO 50
-#define MINIO 50
-
-static long int iotable[NUMIO];
-static int isinit = -1;
-   
-long int ioinit_()
-{
-   int i, iret;
-   iret = -1;
-   if (isinit != 1) {
-      for (i=0;i<NUMIO;iotable[i++]=-1);
-      isinit = 1;
-      iret = 0;
-   }
-   return (iret);
-}
-
-long int ioget_()
-{
-   long int i, ionum;
-
-   if (isinit == -1) {
-      ionum = ioinit_();
-      if (ionum < 0) return(-3);
-   }
-   ionum = -1;
-
-   for (i=0;i<NUMIO;i++) if (iotable[i]==-1) break;
-
-   if ( i < NUMIO ) {
-      iotable[i] = 1;
-      ionum = i + MINIO;
-   }
-
-   return(ionum);
-}
-
-long int ioput_(ionum)
-long int *ionum;
-{
-   long int i, iret;
-
-   if (isinit == -1) {
-      iret = ioinit_();
-      if (iret < 0) return(-3);
-   }
-
-   i = *ionum - MINIO;
-   if (i < 0 || i >= NUMIO) {
-      iret = -2;
-   } else if (iotable[i] == -1) {
-      iret = -1;
-   } else {
-      iotable[i] = -1;
-      iret = 0;
-   }
-
-   return(iret);
-}
-
-long int iostat_()
-{
-   long int i, inum;
-
-   if (isinit == -1) {
-      inum = ioinit_();
-      if (inum < 0) return(-3);
-   }
-
-   inum = 0;
-   for (i=0;i<NUMIO;i++) if (iotable[i]==-1) inum++;
-
-   return(inum);
-}
-
-long int ioset_(ionum)
-long int *ionum;
-{
-   long int i, iret;
-
-   if (isinit == -1) {
-      iret = ioinit_();
-      if (iret < 0) return(-3);
-   }
-
-   i = *ionum - MINIO;
-   if (i < 0 || i >= NUMIO) {
-      iret = -2;
-   } else if (iotable[i] != -1) {
-      iret = -1;
-   } else {
-      iotable[i] = 1;
-      iret = 0;
-   }
-
-   return(iret);
-}
diff -uNr 3.5/source/irealp.f unipops-3.6/source/irealp.f
--- 3.5/source/irealp.f	2000-03-16 11:32:10.000000000 -0700
+++ unipops-3.6/source/irealp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-      INTEGER*2 FUNCTION IREALP  (IP)
-C-------------------------------------------------------------------------------
-C  @(#)irealp.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C	 IREALP	calculates the index of	a real array corresponding to
-C     an equivalenced integer array given the integer index (IP).
-C----------------------------------------------------------------------
-      integer*2 ip, nipr
-c
-      DATA NIPR/2/
-      IREALP=(IP+1)/NIPR
-      RETURN
-      END
diff -uNr 3.5/source/iwpc.f unipops-3.6/source/iwpc.f
--- 3.5/source/iwpc.f	2000-03-16 11:32:10.000000000 -0700
+++ unipops-3.6/source/iwpc.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-      INTEGER*2 FUNCTION IWPC (IP)
-C-------------------------------------------------------------------------------
-C  @(#)iwpc.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C	 IWPC calculates the number of integer words required to
-C     hold IP number of	characters.
-C----------------------------------------------------------------------
-      integer*2 ncpi, ip
-c
-      DATA NCPI/2/
-      IWPC = (IP-1)/NCPI + 1
-      RETURN
-      END
diff -uNr 3.5/source/iwpr.f unipops-3.6/source/iwpr.f
--- 3.5/source/iwpr.f	2000-03-16 11:32:11.000000000 -0700
+++ unipops-3.6/source/iwpr.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-      INTEGER*2 FUNCTION IWPR (IP)
-C-------------------------------------------------------------------------------
-C  @(#)iwpr.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C	 IWPR calculates the number of integer words required to
-C     hold IP number of	real words.
-C----------------------------------------------------------------------
-      integer*2 nrpi, ip
-c
-      DATA NRPI/2/
-      IWPR = IP	* NRPI
-      RETURN
-      END
diff -uNr 3.5/source/kdump.f unipops-3.6/source/kdump.f
--- 3.5/source/kdump.f	2000-03-16 11:32:11.000000000 -0700
+++ unipops-3.6/source/kdump.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,43 +0,0 @@
-      SUBROUTINE KDUMP (I,J,K,C)
-C-------------------------------------------------------------------------------
-C  @(#)kdump.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C------------------------------------------------------------------------
-C        KDUMP prints the contents of the K array in integer, character
-C     and real format as possible.
-c     0389     [RJM] -- see CHANGES.DOC
-c------------------------------------------------------------------------
-      INTEGER*2 I,J,K(*)
-      REAL*4    C(*)
-      integer*2 n80
-      data n80 /80/
-c
-      integer*2 n, l, m, irealp
-c
-      integer*2 itemp(4)
-      character*2 ctemp, c1
-      double precision dtemp
-      character*80 buffer
-      integer*2 ibuffer(40)
-c
-      equivalence (ctemp, itemp(1)), (dtemp, itemp), (ibuffer, buffer)
-c
-      do 50 n = i, j
-	do 40 l = 1, 4
-	   itemp(l) = k(n+l-1)
-40	   continue
-c	   
-	m = irealp(n)
-	c1 = ctemp
-	if (ichar(c1(1:1)).lt.32 .or. ichar(c1(1:1)).gt.126) c1(1:1)=' '
-	if (ichar(c1(2:2)).lt.32 .or. ichar(c1(2:2)).gt.126) c1(2:2)=' '
-c
-	write(buffer,411,err=50) n,(n-i+1),k(n),c(m),dtemp,c1,k(n)
-411	format(1x, 3i7, 1x, 1pg15.7e2, 1pg24.16e2, 1x, a2, 1x, 16r, i5)
-	call pwrite(ibuffer,n80)
-c
-50	continue
-      return
-c
-      end
-c
diff -uNr 3.5/source/kpack.f unipops-3.6/source/kpack.f
--- 3.5/source/kpack.f	2000-03-16 11:32:11.000000000 -0700
+++ unipops-3.6/source/kpack.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,27 +0,0 @@
-      SUBROUTINE KPACK (N,KB,KBP,KB1,KBP1)
-C-------------------------------------------------------------------------------
-C  @(#)kpack.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 KPACK compress	a loose	to tight character buffer.  The
-C     operation	is defines as:	X\b + Y\b = X\Y.
-c      Modified 8903 [RJM] See CHANGES.DOC
-C-----------------------------------------------------------------------
-      integer*2	KB(*),KB1(*), n, kbp, kbp1, iblank, i, j, it
-      integer*2 n120, m3, n0
-      DATA IBLANK /'  '/
-      data n120, m3, n0 /120, -3, 0/
-c
-      if (kbp .le. 0 .or. kbp1 .le. 0) call oerror(n120,m3,'KPACK')
-c
-      DO 10 I=1,N
-         J = MOD(I-1,2)
-         IF (J.EQ.0) KB1(KBP1) = IBLANK
-	 CALL GTBYTE (IT,KB(KBP),n0)
-	 CALL PTBYTE (IT,KB1(KBP1),J)
-         KBP  = KBP  + 1
-         KBP1 = KBP1 + J
- 10	 CONTINUE
-      IF (J.EQ.0) KBP1 = KBP1 + 1
-      RETURN
-      END
diff -uNr 3.5/source/lastblnk.f unipops-3.6/source/lastblnk.f
--- 3.5/source/lastblnk.f	2000-03-16 11:30:02.000000000 -0700
+++ unipops-3.6/source/lastblnk.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,20 +0,0 @@
-      integer*2 function lastblnk(string)
-C-------------------------------------------------------------------------------
-C  @(#)lastblnk.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Finds the position of the last non-blank character in STRING
-c*********************************************
-c     [RJM] March 89
-c*********************************************
-c
-      character*(*) string
-      integer*4 lnblnk
-c
-c***********************************************************
-      lastblnk = lnblnk(string)
-c     MASSCOMP/SUN function LNBLNK
-c
-      return
-      end
-c
diff -uNr 3.5/source/llocat.f unipops-3.6/source/llocat.f
--- 3.5/source/llocat.f	2000-03-16 11:32:12.000000000 -0700
+++ unipops-3.6/source/llocat.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,29 +0,0 @@
-      INTEGER*2 FUNCTION LLOCAT (NWORDS,ARRAY,LPT)
-C-------------------------------------------------------------------------------
-C  @(#)llocat.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 LLOCAT	allocates NWORDS from the array	ARRAY and links	the
-C     last allocated block to the current block	by the pointer LPT.
-C-----------------------------------------------------------------------
-      INTEGER*2 ARRAY(*)
-      integer*2 nwords, lpt, nfc, j, i
-      integer*2 n1, n120, m3
-      data n1, n120, m3 /1, 120, -3/
-c
-      NFC=ARRAY(3)
-      J=ARRAY(5)-NFC-NWORDS 
-      IF (J.lt.0) call oerror(n1,n1,'Use COMPRESS to regain space')
-      LLOCAT=NFC
-      ARRAY(LPT)=NFC
-      NFC=NFC+NWORDS
-      LPT=LLOCAT
-      if (lpt .le. 0) call oerror(n120,m3,'LLOCAT')
-      J = NFC 
-      DO 10 I=LPT,J
-   10	 ARRAY(I)=0
-      IF (NFC.EQ.2*(NFC/2)) NFC=NFC+1
-      ARRAY(3)=NFC
-   99 CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/ltstor.f unipops-3.6/source/ltstor.f
--- 3.5/source/ltstor.f	2000-03-16 11:32:12.000000000 -0700
+++ unipops-3.6/source/ltstor.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,65 +0,0 @@
-      SUBROUTINE LTSTOR
-C-------------------------------------------------------------------------------
-C  @(#)ltstor.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C---------------------------------------------------------------------
-C   Search the literal list.  If matching literal is found, return tag.
-C   if not, generate a new one, linking it to the literal list.
-C
-C   Modified 890105 [PPM] include to .inc, lowercase
-c            8903   [RJM] See CHANGES.DOC
-C---------------------------------------------------------------------
-      integer*2 ix(1), isp, nt, n, llocat, mk, irk, irealp, iinitp
-      integer*2 n2
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-c
-      equivalence (x(1), ix(1))
-C
-      DATA ISP/'  '/
-      data n2 /2/
-C
-C=======================================================================
-c
-C					Literal	look-up	& define.
-      NT=LX
-      N=LX+2
-c
-      IF (MODE.le.0) then
-C					Temporary Literals.
-         L=KKT(4)
-C					Leave L	pointing to the	entry.
-         CALL HUNT(KKT,L,NT,n2,IX)
-         IF (L.eq.0) L=LLOCAT(N,KKT,KKT(10))
-C					Make L refer to	the K array.
-         L=L+KT-1
-  	 MK=L+2
-	 K(L+1)=16*NT+TYPE
-	 IRK = MK + NT
-	 IRK = IREALP(IRK)
-	 IF ((MK+NT).NE.IINITP(IRK)) K(MK+NT) =	ISP
-	 CALL COPY (NT,IX(1),K(MK))
-c
-      else
-C					Permanent literals.
-         L=K(4)
-         CALL HUNT(K,L,NT,n2,IX)
-         IF (L.eq.0) then
-	    L=LLOCAT(N,K,K(10))
-  	    MK=L+2
-	    K(L+1)=16*NT+TYPE
-	    IRK = MK + NT
-	    IRK = IREALP(IRK)
-	    IF ((MK+NT).NE.IINITP(IRK)) K(MK+NT) = ISP
-	    CALL COPY (NT,IX(1),K(MK))
-	 endif
-c
-      endif
-c
-      TAG=IREALP(L)+1
-      LOCSYM=L
-c
-      RETURN
-      END
diff -uNr 3.5/source/memusage.f unipops-3.6/source/memusage.f
--- 3.5/source/memusage.f	2000-03-16 11:32:13.000000000 -0700
+++ unipops-3.6/source/memusage.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,57 +0,0 @@
-      subroutine memusage
-c
-c     @(#)memusage.f	5.1 06/22/94
-c
-c     Reports on CORE usage.
-c
-      include 'core.inc'
-      include 'lsf.inc'
-      include 'cio.inc'
-c
-      integer*2 iprog, isource, ivar, ier
-      integer*2 n80
-      data n80 / 80/
-c
-      write (outbuf, 4998)
-      call pwrite(ioutbuf, n80)
-      write (outbuf, 4999)
-      call pwrite(ioutbuf, n80)
-      write (outbuf,5000,IOSTAT=IER) K(3),K(5),Kx(3),Kx(5),LISTF(3),
-     .                          LISTF(5)
-      call pwrite(ioutbuf, n80)
-c
-      iprog = nint(100.*float(k(3))/float(k(5)))
-      ivar = nint(100.*float(kx(3))/float(kx(5)))
-      isource = nint(100.*float(listf(3))/float(listf(5)))
-      write(outbuf,5001,iostat=ier) iprog, ivar, isource
-      call pwrite(ioutbuf, n80)
-c
-      if (iprog .ge. 90) then
-	write(outbuf,5002, iostat=ier)  'WARNING:  Program storage',
-     .					' >= 90 full'
-        call pwrite(ioutbuf, n80)
-      endif
-      if (ivar .ge. 90) then
-	write(outbuf,5002, iostat=ier)  'WARNING:  Variable storage',
-     .					' >= 90 full'
-        call pwrite(ioutbuf, n80)
-      endif
-      if (isource .ge. 90) then
-	write(outbuf,5002, iostat=ier)  'WARNING:  Procedure source',
-     .					' code storage >= 90 full'
-        call pwrite(ioutbuf, n80)
-      endif
-      if (iprog .ge. 90 .or. ivar .ge. 90 .or. isource .ge. 90) then
-	write(outbuf,5002, iostat=ier)  '(Use COMPRESS to regain some',
-     .				 	' storage space.)'
-        call pwrite(ioutbuf, n80)
-      endif
-c
- 4998 format(8X,'SPACE USED/AVAILABLE FOR:')
- 4999 format('     PROGRAMS   VARIABLES     SOURCE')
- 5000 format(1X,3(x,i5,'/',i5))
-5001  format(2x,'(',i5,'%',6x,i5,'%',6x,i5,'%)')
-5002  format(5a)
-c
-      return
-      end
diff -uNr 3.5/source/mhunt.f unipops-3.6/source/mhunt.f
--- 3.5/source/mhunt.f	2000-03-16 11:32:13.000000000 -0700
+++ unipops-3.6/source/mhunt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,86 +0,0 @@
-      SUBROUTINE MHUNT (K,L,NT,ISTART,KHUNT,NHUNT)
-C-------------------------------------------------------------------------------
-C  @(#)mhunt.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-c     This is the min-match version of HUNT
-c
-C	 HUNT searches a linked	list usually the symbol	or literal
-C     tables.  The array K contains the	table with K(L)	as the first
-C     entry.  NT words are matched beginning at	ISTART words from the
-C     beginning	of the entry with KHUNT.  The pointer L	is left	pointing
-C     at the entry found or equal to zero if no	match is found.
-c      Modified 8903 [RJM] See CHANGES.DOC
-C----------------------------------------------------------------------
-      integer*2	KHUNT(*), K(*), l, nt, istart, nhunt, ib, nmax, newl, i,
-     .          length, j, m
-      INTEGER*2  KNEW(25), KH(25)
-      character*1 BNEW(50), BH(50)
-      integer*2 n20, m3
-c
-      include 'ambig.inc'
-c
-      EQUIVALENCE (KNEW,BNEW), (KH,BH)
-c
-      DATA IB/'  '/
-      data nmax/100/
-      data n20, m3 /20, -3/
-c
-      NEWL=0
-      NAPP=0
-   10 IF (L.le.0) GO TO	55
-      LENGTH=K(L+1)/16
-c			if NT > LENGTH, its an automatic mismatch
-      if (nt .gt. length) go to 52
-c			if nt != length, check for min-match
-      IF (LENGTH.NE.NT)	GO TO 40
-      J=L+ISTART
-      DO 20 I=1,NT
-	     IF (K(J).NE.KHUNT(I)) GO TO 40
-         J=J+1
-   20    CONTINUE
-c     Entered and internal symbols have exactly the same number
-c     of characters and match exactly
-c
-      GO TO 60
-   40 J=L+ISTART
-      DO 41 M=1,NT
-         KH(M)=KHUNT(M)
-   41    CONTINUE
-      DO 42 M=1,LENGTH
-         KNEW(M)=K(J+M-1)
-   42    CONTINUE
-      DO 50 I=1,NHUNT
-         IF (BNEW(I).NE.BH(I)) GO TO 52
-   50    CONTINUE
-c     Symbols don't have same number of characters but check whether
-c     min-match will work on that symbol and that only one symbol
-c     min-matches
-c     NOTE: this assumes that NHUNT characters can be contained in NT I*2s
-c
-      NAPP=NAPP+1
-c     Bump number of ambiguous symbols
-c
-c
-      if (napp .gt. nmax) goto 55
-c
-      NEWL=L
-      do 43 m = 1, 5
-	if (m .le. length) then
-	  mname(m,napp) = knew(m)
-	else
-	  mname(m,napp) = ib
-	endif
-   43    CONTINUE
-   52 L=K(L)
-      GO TO 10
-c     Go on to next internal symbol
-c
-   55 IF (NAPP.EQ.1) GO TO 59
-      L=0
-      IF (NAPP.GT.1) call oerror(n20,m3,' ')
-      GO TO 60
-   59 L=NEWL
-   60 CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/oerror2.f unipops-3.6/source/oerror2.f
--- 3.5/source/oerror2.f	2000-03-16 11:32:14.000000000 -0700
+++ unipops-3.6/source/oerror2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,76 +0,0 @@
-      subroutine oerror2
-C-------------------------------------------------------------------------------
-C  @(#)oerror2.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Traps an error if it occurs when 'reading' input from other
-c     than the terminal.  Asks whether or not to continue reading 
-c     from a file at that point.
-c
-      real*4 answr
-      integer*4 ioput, lunit, i
-      integer*2 istat, lastblnk
-      character*64 cbatchin
-c
-      include 'cio.inc'
-c
-      if (iintype .ne. istdin .and. iintype .ne. imenuin) then
-         write(istderr,*) ' '
-         if (iintype .eq. ibatchin) then
-            cbatchin = cinlist(iinptr)
-            write(istderr,10) 'Error in batch file ', 
-     .         cbatchin(1:lastblnk(cbatchin))
-            do 100 i = iinptr, 2, -1
-               if (iinlist(i,2) .ne. ibatchin) goto 110
-               close(iinlist(i,1),iostat=istat)
-               lunit = iinlist(i,1)
-               lunit = ioput(lunit)
-c			ignore any errors from ioput, we don't really care
- 100        continue
-c			back out to last menu or stdin input
- 110        iinptr = i
-            iinunit = iinlist(iinptr, 1)
-            iintype = iinlist(iinptr, 2)
-            if (iintype .ne. isetupin) then
-               if (iintype .eq. ishelpin) then
-                  write(istderr,10) 'Internal ERROR in help file ... ',
-     1	                         ' Report problem'
-               else
-                  write(istderr, 11) 'Control returns to '
-                  if (iintype .eq. imenuin) then
-                     write(istderr, 10) 'MENUs input.'
-                  else
-                     write(istderr, 10) 'standard input.'
-                  endif
-               endif
-	    endif
-	 endif
-c
-         if (iintype .eq. isetupin) then
-            write(istderr,10) 'Error in SETUP file'
-            write(istderr,*) ' '
-            write(istderr,10) 'Terminate reading from file or skip to ',
-     1                        'next line in file'
-            write(istderr,11) 'Terminate (Y or N)? (Default = N) '
-            read(istdin,12) answr
-            if (answr .eq. 'y' .or. answr .eq. 'Y') then
-               close(iinunit,iostat=istat)
-               iinptr = max(1, iinptr - 1)
-               iinunit = iinlist(iinptr, 1)
-               iintype = iinlist(iinptr, 2)
-            endif
-         else if (iintype .eq. ishelpin) then
-            write(istderr,10) 'Internal ERROR in help file ... ',
-     1	                      ' Report problem'
-         endif
- 99      write(istderr,*) ' '
-      endif
-c
-      return
-c
- 10   format(1x,10a)
- 11   format(1x,a,$)
- 12   format(a1)
-C
-      end
-c
diff -uNr 3.5/source/opened.f unipops-3.6/source/opened.f
--- 3.5/source/opened.f	2000-03-16 11:32:14.000000000 -0700
+++ unipops-3.6/source/opened.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-      logical*2 function opened(filename)
-C-------------------------------------------------------------------------------
-C  @(#)opened.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     SUN version.  Checks whether file FILENAME is opened
-c     RJM  March 1989
-c
-      logical*4 lexist
-      character*(*) filename
-c
-      inquire(file=filename,opened=lexist)
-      opened = lexist
-c
-      return
-      end
-
diff -uNr 3.5/source/openms.f unipops-3.6/source/openms.f
--- 3.5/source/openms.f	2000-03-16 11:32:14.000000000 -0700
+++ unipops-3.6/source/openms.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,35 +0,0 @@
-      SUBROUTINE OPENMS(LUN,NAME,IRDO,IER)
-C-------------------------------------------------------------------------------
-C  @(#)openms.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C        IRDO=1     OPEN SHARED, WRITE ACCESS
-C        IRDO=0     OPEN NON SHARED, WRITE ACCESS
-C        IRDO=-1     OPEN SHARED, READONLY
-C                                               Modified 13 Feb 1987, DTE
-c     Modified 8903 [RJM] See CHANGES.DOC
-c*****************************************************
-C
-      INTEGER*2 LUN, ier, inunit, IRECLWORD, name(*), i, istat
-      logical*2 opened
-      INTEGER*2  IRDO
-      character*64 cname
-      integer*2 iname(32)
-c
-      include 'cio.inc'
-c
-      equivalence (iname(1), cname)
-c
-      IRECLWORD=IRECSIZ/2
-      inunit = LUN
-c
-      do 10 i = 1, 32
-	iname(i) = name(i)
-10	continue
-c
-      if (opened(cname)) return
-      open(unit=inunit,file=cname,recl=4*ireclword,form='unformatted',
-     1     status='old',access='direct',iostat=istat)
-      ier = istat
-      RETURN
-      END
-
diff -uNr 3.5/source/polish.f unipops-3.6/source/polish.f
--- 3.5/source/polish.f	2000-03-16 11:32:15.000000000 -0700
+++ unipops-3.6/source/polish.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,110 +0,0 @@
-      SUBROUTINE  POLISH
-C-------------------------------------------------------------------------------
-C  @(#)polish.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C--------------------------------------------------------------------
-C   Polish scanner
-C      Parses the character string in KARBUF, translating to polish
-C  postfix notation.  Result is a sequence of integers, representing
-C  code for the POPS interpreter.  Negative tokens are operand pointers
-C  while positive tokens are operation codes.  The array, A, holds
-C  these; AP points to the last entry.
-C--------------------------------------------------------------------
-      integer*2 nothing, i
-      integer*2 fshort, n0, n1, n34, n38, n39, n42
-c
-      INCLUDE 'smstuf.inc'
-      include 'stk.inc'
-c
-      include 'tags.inc'
-c
-      data nothing/0/
-      data n0, n1, n34, n38, n39, n42 /0, 1, 34, 38, 39, 42/
-C
-C=======================================================================
-c
-      LEVEL=0
-      AP=0
-      BP=0
-      IFFLAG=0
-      LAST=nothing
-C					Parse tokens.
- 10   CALL COMPIL
-C					   Pseudo operators.
-      IF (TYPE.eq.5) then
-c
-	 IF (TAG.GE.ihelps) then
-  	    CALL HELPS (fshort(TAG-ihelps+1))
-	 else IF (TAG.GE.istores) then
-	    CALL STORES (fshort(TAG-istores+1))
-	 else IF (TAG.GE.ieditor) then
-	    CALL EDITOR (fshort(TAG-ieditor+1))
-	 else if (tag .ge. ipseudo) then
-	    CALL PSEUDO (fshort(TAG-ipseudo+1))
-	    CALL PUSH(A,AP,iomega)
-	 else 
-	    CALL RTOPS (fshort(TAG-irtops+1))
-            goto 10
-	 endif
-	 call getfld
-	 if (tag .ne. i0) then
-     		call oerror(n39, n0, 'Extra commands ignored')
-		goto 99
-	 endif
-c
-      else
-C					Line finished.	-  Clean up.
-         NEXTP=0
-         CALL BCLEAN
-c
-	 i = 1
-c
-52	 if (i .le. ap) then
-c
-	    IF (A(I) .le. 0) then
-c
-		i = i + 1
-		goto 52
-c		Keep on looking for an operator
-c
-	    endif
-c
-	 else if (ap .ne. 0) then
-c
-     	    CALL oerror(n38, n1,'')
-C           NO OPERATOR ON LINE
-c
-	 endif
-c
-c	 Add OMEGA operator.
-	 CALL PUSH(A,AP,iomega)
-c
-C        UNBALANCED PARENTHESES?
-         IF (LEVEL.ne.0)  CALL oerror(n34, n1,'Line Ignored')
-c
-c
-      endif
-c
-      IF ((MODE.NE.0).AND.(AP.NE.0)) then
-	if (ap .gt. 1) then
-	   if (defexec .eq. 1 .and. a(1) .ne. iprotect) then
-	      defexec=0
-	   else if (defexec .eq. -1 .and. a(1) .ne. iprotect) then
-	      call oerror(n42, n1, 
-     .		'Cannot add executables among declerations')
-	   else if (defexec .eq. 0 .and. a(1) .eq. iprotect) then
-	      call oerror(n42, n1, 
-     .		'Cannot add declerations among executables')
-	   endif
-	endif
-c	Has the user started entering executable lines to the procedure or
-c	are they still symbol declerations.
-c
-	CALL STORES (n1)
-      endif
-c
-99    call gpflush()
-c
-      RETURN
-c
-      END
diff -uNr 3.5/source/pop.f unipops-3.6/source/pop.f
--- 3.5/source/pop.f	2000-03-16 11:32:15.000000000 -0700
+++ unipops-3.6/source/pop.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-      SUBROUTINE POP (STACK,SP,ITEM)
-C-------------------------------------------------------------------------------
-C  @(#)pop.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C	 POP takes the last item on the	stack STACK and	places
-C     it in ITEM.  The stack pointer SP	is decremented.
-c      Modified 8903 [RJM] See CHANGES.DOC
-C----------------------------------------------------------------------
-      INTEGER*2 STACK(*),SP,ITEM
-      integer*2 n1, n7
-      data n1, n7 /1, 7/
-c
-      IF (SP.le.0) call oerror(n7,n1,'Too few items in STACK')
-c
-      ITEM=STACK(SP)
-      SP=SP-1
-c
-      RETURN
-c
-      END
diff -uNr 3.5/source/prompt.f unipops-3.6/source/prompt.f
--- 3.5/source/prompt.f	2000-03-16 11:32:16.000000000 -0700
+++ unipops-3.6/source/prompt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,16 +0,0 @@
-      SUBROUTINE PROMPT	(ICHAR,IPT)
-C-------------------------------------------------------------------------------
-C  @(#)prompt.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 PROMPT	stores the right character of ICHAR into the left byte
-C     of the prompt variable IPT.
-C--------------------------------------------------------------- Modcomp
-      integer*2 ichar, ipt, it
-      integer*2 n0, n1
-      data n0, n1 /0, 1/
-c
-      CALL GTBYTE (IT,ICHAR,n1)
-      CALL PTBYTE (IT,IPT,n0)
-      RETURN
-      END
diff -uNr 3.5/source/pseudo.f unipops-3.6/source/pseudo.f
--- 3.5/source/pseudo.f	2000-03-16 11:32:16.000000000 -0700
+++ unipops-3.6/source/pseudo.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,850 +0,0 @@
-      SUBROUTINE PSEUDO	(J)
-C-------------------------------------------------------------------------------
-C @(#)pseudo.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C   PSEUDO handles procedure and array declarations and the FINISH
-C   operator.
-C----------------------------------------------------------------------
-c
-      integer*2 j, i1, karat, kolon, iblank,
-     .          jj, narg, n, llocat, ll, i, iwpr, nt, ier, 
-     .          nsize, i7, ls, ndim, np, ioldtag, mm, lli, isize,
-     .		oldtag, finish, iwpc, kbptrold, numvars
-      integer*2 n0, n1, n2, n6, n14, n16, n17, n18, n19, n21, n22,
-     .          n25, n36, n41, n80, n120, m3, n3, procname(40), 
-     .		procchar, n15, n8, n29, n42, nsizeold, ndimold
-      real*4 r4blank, valueold, valuenew
-      logical exists, allok, global, lhunt
-      character*1 answr
-      character*60 ckpak
-      character*10 names(400)
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      include 'cio.inc'
-c
-      equivalence (ckpak, kpak)
-c
-      include 'tags.inc'
-c
-      DATA I1/1/, I7/7/
-      DATA KARAT/' >'/,	KOLON/'	:'/, IBLANK/' '/, r4blank/'    '/
-      data n0, n1, n2, n6, n14, n16, n17, n18, n19, n21, n22,
-     .     n25, n36, n41, n80, n120, m3, n3, n15, n8, n29, n42
-     .     /0, 1, 2, 6, 14, 16, 17, 18, 19, 21, 22, 25, 36, 41, 80, 120,
-     .      -3, 3, 15, 8, 29, 42/
-C
-C=======================================================================
-c
-      global = .false.
-c
-      JJ = J
-100   GO TO (151,155,230,152,158,200,210,220), JJ
-      call oerror(n120,m3,'PSEUDO')
-c
-C------------------------------------------------------------------------
-C					P R O C	E D U R	E.
-C------------------------------------------------------------------------
- 151  if (mode .ne. 0) call oerror(n17,n1,'')
-c
-      MODE=2
-c
-c     Get name of procedure
-c
-      CALL GETFLD
-c
-      if (type .eq. 3) then
-c
-            IF (locsym.lt.K(7)) call oerror(n6,n1,'')
-c	    Cannot overwrite a builtin procedure
-c
-	    write(istderr,*) ' '
-	    write(istderr,991) 'Procedure already exists...  '
-991	    format(1x,a)
-	    write(istderr,992) 'Do you want to overwrite (y or n)? '
-992	    format(1x,a,$)
-	    read(istdin,993) answr
-993	    format(a)
-	    write(istderr,*) ' '
-	    if (answr .eq. 'n' .or. answr .eq. 'N') call oerror(n3, n1, '')
-	    exists = .true.
-c	    Protects against overwriting an existing procedure
-c
-            NAMEP=LOCSYM+2
-            oldtag = k(namep)
-c           If redifinig a procedure, oldtag will be the old tag of the
-c           old code.  Needed when relinking any other procedures that may have
-c           called the procedure that is being overwritten.
-c
-      else if (type .eq. 0) then
-c
-	    exists = .false.
-c
-      else
-c
-	    call oerror(n36, n1, '')
-c	    Name of procedure already exists as that of an adverb or verb
-c
-      endif
-c
-      procchar = nkar
-      nkar = iwpc(nkar)
-      call copy(nkar, kpak, procname)
-c     Store away name for later use.
-c
-      NARG=0
-c
-c     Get arguments, if any (triggered by a left paren.)
-c
-      CALL GETFLD
-c
-      IF (TAG.EQ.ilparen) then
-c
-1510	call getfld
-        IF (TAG.ne.irparen) then
-           IF (TAG.EQ.icomma) goto 1510
-           IF (TAG.EQ.i0) 
-     .		call oerror(n18,n1,'No closing ) in argument list')
-c          Must have a closing paren; if none, an error
-c
-	   if (type .eq. 11 .or. type .eq. 14) 
-     .		call oerror(n18, n1, 'Bad argument list')
-c
-	   do 1511 i = 1, narg
-		if (ckpak(1:nkar) .eq. names(i)) call oerror(n41, n1,
-     .			 'Bad argument list')
-1511		continue
-c
-	   call push(tstack, narg, nkar) 
-	   names(narg) = ckpak(1:nkar)
-c
-           GO TO 1510
-	endif
-c
-      endif
-c
-      if (tag .ne.  i0 .and. tag .ne. icolon .and.
-     .    tag .ne. irparen) call oerror(n18, n1, '')
-c
-      if (.not. exists) then
-	    call creatsym(n3, procname, procchar,
-     .				      n0, n0, locsym)
-            NAMEP=LOCSYM+2
-      endif
-c
-c     Process arguements
-      N=NARG+4
-      LL=LLOCAT(N,K,LPGM)
-c
-      lclstart = locsym + 3
-      k(lclstart) = 0
-      lcllast = locsym + 3
-c
-      LPGM=LL
-      K(NAMEP)=LL
-      LL=LL+2
-c
-      if (narg .gt. 0) then
-        do 1513 j = 1, narg
-	  nkar = tstack(j)
-	  ckpak = names(j)
-     	  call creatspc(n2, tag)
-      	  c(tag) = 0.0
-      	  call creatloc(n1, kpak, nkar, tag, n0, locsym)
-          k(ll) = -tag
-	  ll = ll + 1
-1513	  continue
-         K(LL)=igetargs
-         LL=LL+1
-      endif
-      K(LL)=iomega
-c
-      if (exists) call relink(oldtag, k(namep), n0, n1)
-c     If redefing a procedure, relink all procs. that called the
-c     old procedure with the new one.
-c
-      mode = 1
-      llit = 0
-      defexec = 1
-      CALL PROMPT (KOLON,IPT)
-c
-      GO TO 99
-c
-C---------------------------------------------------------------------
-C					F I N I	S H.
-C---------------------------------------------------------------------
- 155  continue
-      if (mode .ne. 1) call oerror(n16,n1,'')
-c
-      mode = -2
-      llit = 0
-      lclstart = 0
-      lcllast = 0
-      defexec = 0
-      symp = 0
-      CALL PROMPT (KARAT,IPT)
-c
-      NT=0
-c
-      IF (IDEBUG.GT.0) then
-	WRITE (outbuf,19901,IOSTAT=IER) NAMEP,K(NAMEP)
-19901   FORMAT ('NAMEP,K(NAMEP)=',2I10)
-	call pwrite(ioutbuf, n80)
-      endif
-c
-      IF (NAMEP.lt.200.or.NAMEP.gt.KXORG) call oerror(n16,n1,'')
-c     200 = tag of first item in linked list
-c
-      L=NAMEP-2
-      IF (L.eq.0) call oerror(n16,n1,'')
-c
-      NAMEP=0
-c
-      nt = finish(k, k(l+2), .false.)
-c
-      IF (NT .eq. 1) then
-	call oerror(n21,n0,'Too many IF, WHILE, or FOR constructs')
-      else if (nt .eq. 2) then
-	call oerror(n21,n0,'Too many END, THEN, or ELSE statements')
-      else if (nt .eq. 3) then
-	call oerror(n21,n0,'No closing END statement')
-      endif
-c
-      call bclean
-      call push(b,bp,ireturn)
-      bpr(bp) = level
-      call bclean
-c     Add RETURN to stack
-c
-      if (.not. lsetup) then
-         CALL PWRITE(IBLANK,I1)
-         call memusage
-      endif
-c
-      goto 99
-c
-C---------------------------------------------------------------------
-C					G L O B A L
-C---------------------------------------------------------------------
- 230  CONTINUE
-c
-      if (mode .eq. 1 .and. defexec .eq. 0) call oerror(n42, n1,
-     .	'Cannot add declerations among executables') 
-c
-      call getfld
-      if (tag .ge. iarray .and. tag .le. ialias) then
-	jj = tag - ipseudo + 1
-	global = .true.
-	goto 100
-      else
-	call oerror(n29, n1, '')
-      endif
-c
-      goto 99
-c
-C---------------------------------------------------------------------
-C					A R R A	Y <name> <(n)>.
-C---------------------------------------------------------------------
- 152  continue
-c
-      if (mode .eq. 1 .and. defexec .eq. 0) call oerror(n42, n1,
-     .		'Cannot add declerations among executables')
-c
-      iedit = mode
-      mode = -1
-      kbptrold = kbptr
-      allok = .false.
-      numvars = 0
-c     KBPTROLD = The pointer to the next field in the input line
-c     ALLOK = true when we have parsed the input line and no errors have
-c	been found; we can then reparse the line and execute what it says
-c	If false, then we are still going thru the initial trial parsing.
-c
-c     Get name of array
-1528  CALL GETFLD
-c
-      IF (TAG.EQ.i0) call oerror(n22,n1,'Must give the name of array ')
-c
-1532  if (type .eq. 11 .or. type .eq. 14) then
-	call oerror(n29, n1, 'Bad symbol name')
-c
-      else if ( (type .eq. 0) .or.
-     .	   (iedit .eq. 1 .and. .not. global .and. .not. local .and.
-     .	    .not. lhunt(tag) )  ) then
-c
-	   do 1531 i = 1, numvars
-		if (ckpak(1:nkar) .eq. names(i)) call oerror(n41, n1, 
-     .			'Bad set of ARRAY names')
-1531		continue
-c
-	   numvars = numvars + 1
-	   names(numvars) = ckpak(1:nkar)
-	   procchar = nkar	   
-	   exists = .false.
-c          Store away name for later use.
-c
-      else if (lhunt(tag) .and. .not. global .and. 
-     .		.not. local)  then
-	   call oerror(n3, n1, 'Symbol already in use in procedure')
-c
-      else if (type .eq. 2) then
-	   if (iedit .eq. 1 .and. global .and. local) call oerror(n3, n1, '')
-	   exists = .true.
-           LS = k(LOCSYM + 3)
-	   nsizeold = k(ls)
-	   ndimold = k(ls+1)
-      	   LLI=ls+2
-	   n = 2*ndimold
-	   call copy(n, k(lli), cstack)
-c	   Array already exists; copy old dimensions to see if new ones are the
-c	   same
-c
-      else 
-	   call oerror(n3, n1, '')	
-      endif
-c
-      NDIM=0
-      NP=0
-c
-C     Parse Dimensions.
-c
-      CALL GETFLD
-      IF (TAG.ne.ilparen) call oerror(n19,n1,'')
-c
-      CALL GETFLD
-c
-1521  IF (TYPE.ne.11) then
-          if (type .eq. 4 .and. (tag.eq.iuplus.or.tag.eq.iuminus)) then
-	    ioldtag = tag
-	    call getfld
-	    if (type .ne. 11) call oerror(n22, n1, 'Dimensions must be numbers')
-	    if (ioldtag .eq. iuminus) c(tag) = -c(tag)
-          else
-            call oerror(n22, n1, 'Dimensions must be numbers')
-          endif
-      endif
-c     Takes care of negative dimensions
-c
-      NDIM=NDIM+1
-      LL=nint(C(TAG))
-c
-      CALL GETFLD
-      IF ((TAG.ne.iloopto).or.(TYPE.ne.4)) then
-          MM=LL
-          if (mm .le. 0) call oerror(n22,n1,'Number of elements <= 0')
-c         Makes sure that the number of elements in the array (MM) is > 0
-c
-          LL=1
-      else
-          CALL GETFLD
-          IF (TYPE.ne.11) then
-            if (type.eq.4 .and. (tag.eq.iuplus.or.tag.eq.iuminus)) then
-	      ioldtag = tag
-	      call getfld
-	      if (type .ne. 11) call oerror(n22, n1, 'Dimensions must be numbers')
-	      if (ioldtag .eq. iuminus) c(tag) = -c(tag)
-            else
-              call oerror(n22,n1,'Dimensions must be numbers')
-            endif
-	  endif
-c	  Takes care of negative dimensions
-c
-          MM=nint(C(TAG))-LL+1
-          if (mm .le. 0) call oerror(n22,n1,'Number of elements <= 0 ')
-c         Makes sure that the number of elements in the array (MM) is > 0
-c
-          CALL GETFLD
-      endif
-c
-      CALL PUSH (TSTACK,NP,LL)
-      CALL PUSH (TSTACK,NP,MM)
-c
-      if (tag .eq. icomma) call getfld
-      IF (TAG.NE.irparen) GO TO 1521
-c
-      NSIZE=1
-      DO 1529 I=2,2*ndim,2
- 1529	   NSIZE=NSIZE*TSTACK(I)
-c
-      if (exists) then
-c
-	   if (nsizeold .ne. nsize .or. ndimold .ne. ndim) 
-     .		call oerror(n3, n1, '')
-	    do 1530 j = 1, 2*ndim
-		if (tstack(j) .ne. cstack(j)) 
-     .		      call oerror(n3, n1, '')
-1530	     continue
-c	     if symbol exists, compare new dims with old.
-c
-      else if (allok) then
-c		
-           isize = IWPR(NSIZE)
-	   call creatspc(isize, tag)
-	   ckpak = names(numvars)
-      	   DO 1539 J = tag, tag + nsize - 1
- 	       c(J) = 0.0
-1539           continue
-           if (iedit .eq. 1 .and. .not. global) then
-      	     call creatloc(n2, kpak, procchar, tag, n0, locsym)
-	   else
-      	     call creatsym(n2, kpak, procchar, tag, n0, locsym)
-	   endif
-c
-C          Allocate remaining space.
-           LS = locsym + 3
-           N = 2*NDIM + 2
-           LL = LLOCAT(N,K,LS)
-           K(LL) = nsize
-           K(LL+1) = NDIM
-           LLI=LL+2
-           N = 2*ndim
-           CALL COPY (N,TSTACK,K(LLI))
-c	   If symbol doesn't exist, create a new one (local if compiling a proc).
-c
-      endif
-c
-      call getfld
-      if (tag .eq. icomma) call getfld
-      IF (TAG.ne.i0 .and. tag .ne. icolon) goto 1532
-c     More names exist on the input line
-c 
-      if (.not. allok) then
-	allok=.true.
-	kbptr = kbptrold
-        numvars = 0
-	goto 1528
-c	We have parsed the line and no errors were found; reset the KBPTR
-c	pointer and set ALLOK so we can reparse the line and execute its
-c	contents.
-c
-      endif
-c
-      mode = iedit
-      if (mode .eq. 1) call push(a, ap, iprotect)
-c
-      GO TO 99
-c
-C---------------------------------------------------------------------
-C				      S	T R I N	G * n <name>
-C---------------------------------------------------------------------
- 158  continue
-c
-      if (mode .eq. 1 .and. defexec .eq. 0) call oerror(n42, n1,
-     .		'Cannot add declerations among executables')
-c
-      iedit = mode
-      mode = -1
-      numvars = 0
-c
-c     First parse string size
-      CALL GETFLD
-c
-      NSIZE = 1
-      IF (TAG.eq.itimes) then
-	 CALL GETFLD
-         IF (TYPE.ne.11) call oerror(n25,n1,
-     .		'String size must be a number')
-         if (nint(c(tag)).gt.60) call oerror(n14,n1,' ')
-	 if (mod(nint(c(tag)),4).ne.0) call oerror(n25,n1, 
-     .		'String lengths must be multiples of 4')
-c        Number of characters must be a multiple of 4 and less than 60
-c
-	 NSIZE = (3 + INT(C(TAG))) / 4
-	 call getfld
-c
-      else
-         IF (TAG.EQ.i0) call oerror(n25,n1,' ')
-      endif
-c
-C     Parse name of string.
-c
-      IF (TAG.EQ.i0) call oerror(n25,n1,'Must give the name of string ')
-c
-1582  if (type .eq. 11 .or. type .eq. 14) then
-	call oerror(n29, n1, 'Bad symbol name')
-c
-      else if ( (type .eq. 0) .or.
-     .	   (iedit .eq. 1 .and. .not. global .and. .not. local .and.
-     .	    .not. lhunt(tag) )  ) then
-c
-	   do 1581 i = 1, numvars
-		if (ckpak(1:nkar) .eq. names(i)) call oerror(n41, n1, 
-     .			'Bad set of STRING names')
-1581		continue
-c
-	   call push(tstack, numvars, nkar)
-	   names(numvars) = ckpak(1:nkar)
-	   exists = .false.
-c          Store away name for later use.
-c
-      else if (lhunt(tag) .and. .not. global .and. 
-     .		.not. local)  then
-	   call oerror(n3, n1, 'Symbol already in use in procedure')
-c
-      else if (type .eq. 7) then
-	   if (iedit .eq. 1 .and. global .and. local) call oerror(n3, n1, '')
-           LS = k(LOCSYM + 3)
-	   nsizeold = k(ls)
-	   exists = .true.
-c	   String already exists; copy old size to see if new one is the
-c	   same
-c
-      else 
-	   call oerror(n3, n1, '')	
-      endif
-c
-      if (exists .and. nsizeold .ne. nsize) 
-     .			call oerror(n3, n1, '')
-c
-      call getfld
-      if (tag .eq. icomma) call getfld
-      IF (TAG.ne.i0 .and. tag .ne. icolon) goto 1582
-c     More names exist on the input line
-c 
-      ISIZE = IWPR(nsize)
-      do 1583 i = 1, numvars
-	    call creatspc(isize, tag)
-	    ckpak = names(i)
-      	    DO 1589 J = tag, tag + nsize - 1
- 	        c(J) = r4blank
-1589            continue
-            if (iedit .eq. 1 .and. .not. global) then
-      	      call creatloc(i7, kpak, tstack(i), tag, n0, locsym)
-	    else
-      	      call creatsym(i7, kpak, tstack(i), tag, n0, locsym)
-	    endif
-c
-            LS = LOCSYM + 3
-            N = 4
-            LL = LLOCAT (N,K,LS)
-            K(LL) = nsize
-            K(LL + 1) = 1
-            K(LL + 2) = 1
-            K(LL + 3) = nsize
-1583	    continue
-c     Create new symbol (local if compiling a procedure).
-c
-      mode = iedit
-      if (mode .eq. 1) call push(a, ap, iprotect)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					S C A L A R
-C---------------------------------------------------------------------
- 200  CONTINUE
-c
-      if (mode .eq. 1 .and. defexec .eq. 0) call oerror(n42, n1,
-     .		'Cannot add declerations among executables')
-c
-      iedit = mode
-      mode = -1
-      numvars = 0
-c
-      CALL GETFLD
-c
-      IF (TAG.EQ.i0) call oerror(n29,n1,'Must give the name of scalar')
-c
-202   if (type .eq. 11 .or. type .eq. 14) then
-	call oerror(n29, n1, 'Bad symbol name')
-c
-      else if ( (type .eq. 0) .or.
-     .	   (iedit .eq. 1 .and. .not. global .and. .not. local .and.
-     .	    .not. lhunt(tag) )  ) then
-c
-	   do 201 i = 1, numvars
-		if (ckpak(1:nkar) .eq. names(i)) call oerror(n41, n1, 
-     .			'Bad list of SCALAR names')
-201		continue
-c
-	   call push(tstack, numvars, nkar)
-	   names(numvars) = ckpak(1:nkar)
-c          Store away new scalar's name for later use.
-c
-      else if (lhunt(tag) .and. .not. global .and. 
-     .		.not. local)  then
-	   call oerror(n3, n1, 'Symbol already in use in procedure')
-c
-      else if (type .eq. 1) then
-	   if (iedit .eq. 1 .and. global .and. local) call oerror(n3, n1, '')
-c  
-      else 
-	   call oerror(n3, n1, '')	
-      endif
-c
-      call getfld
-      if (tag .eq. icomma) call getfld
-      IF (TAG.ne.i0 .and. tag .ne. icolon) goto 202
-c     More names exist on the input line
-c 
-      do 203 i = 1, numvars
-	   call creatspc(n2, tag)
-      	   c(tag) = 0.0
-	   ckpak = names(i)
-           if (iedit .eq. 1 .and. .not. global) then
-      	     call creatloc(n1, kpak, tstack(i), tag, n0, locsym)
-	   else
-      	     call creatsym(n1, kpak, tstack(i), tag, n0, locsym)
-	   endif
-203	   continue
-c     Create new symbol (local if compiling a procedure).
-c
-      mode = iedit
-      if (mode .eq. 1) call push(a, ap, iprotect)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					P O I N T E R
-C---------------------------------------------------------------------
- 210  CONTINUE
-c
-      if (mode .eq. 1 .and. defexec .eq. 0) call oerror(n42, n1,
-     .		'Cannot add declerations among executables')
-c
-      iedit = mode
-      mode = -1
-      numvars = 0
-c
-      CALL GETFLD
-c
-      IF (TAG.EQ.i0) 
-     .	call oerror(n29,n1,'Must give the name of pointer ')
-c
-212   if (type .eq. 11 .or. type .eq. 14) then
-	call oerror(n29, n1, 'Bad symbol name')
-c
-      else if ( (type .eq. 0) .or.
-     .	   (iedit .eq. 1 .and. .not. global .and. .not. local .and.
-     .	    .not. lhunt(tag) )  ) then
-c
-	   do 211 i = 1, numvars
-		if (ckpak(1:nkar) .eq. names(i)) call oerror(n41, n1, 
-     .			'Bad set of POINTER names')
-211		continue
-c
-	   call push(tstack, numvars, nkar)
-	   names(numvars) = ckpak(1:nkar)
-	   exists = .false.
-c          Store away pointer name for later use.
-c
-      else if (lhunt(tag) .and. .not. global .and. 
-     .		.not. local)  then
-	   call oerror(n3, n1, 'Symbol already in use in procedure')
-c
-      else if (type .eq. 8) then
-	   if (iedit .eq. 1 .and. global .and. local) call oerror(n3, n1, '')
-	   valueold = c(tag)
-	   exists = .true.
-c	   Pointer already exists; copy old value to see if new one is the
-c	   same
-c
-      else 
-	   call oerror(n3, n1, '')	
-      endif
-c
-c     Get the value of the pointer
-      CALL GETFLD
-      IF (TYPE.ne.11) then
-          if (type .eq. 4 .and. (tag.eq.iuplus.or.tag.eq.iuminus)) then
-	    ioldtag = tag
-	    call getfld
-	    if (type .ne. 11) call oerror(n15, n1, '')
-	    if (ioldtag .eq. iuminus) c(tag) = -c(tag)
-          else
-            call oerror(n15, n1, '')
-          endif
-      endif
-      valuenew = c(tag)
-      cstack(numvars) = tag
-c
-      if (exists .and. valuenew .ne. valueold) 
-     .			call oerror(n3, n1, '')
-c
-      call getfld
-      if (tag .eq. icomma) call getfld
-      IF (TAG.ne.i0 .and. tag .ne. icolon) goto 212
-c     More names exist on the input line
-c 
-      do 213 i = 1, numvars
-	   call creatspc(n2, tag)
-	   c(tag) = c(cstack(i))
-	   ckpak = names(i)
-           if (iedit .eq. 1 .and. .not. global) then
-      	     call creatloc(n8, kpak, tstack(i), tag, n0, locsym)
-	   else
-      	     call creatsym(n8, kpak, tstack(i), tag, n0, locsym)
-	   endif
-213	   continue
-c     Create new symbol (local if compiling a procedure).
-c
-      mode = iedit
-      if (mode .eq. 1) call push(a, ap, iprotect)
-c
-      GO TO 99
-C---------------------------------------------------------------------
-C					A L I A S
-C---------------------------------------------------------------------
- 220  CONTINUE
-c
-      if (mode .eq. 1 .and. defexec .eq. 0) call oerror(n42, n1,
-     .		'Cannot add declerations among executables')
-c
-      iedit = mode
-      mode = -1
-      numvars = 0
-c
-      CALL GETFLD
-c
-      IF (TAG.EQ.i0) call oerror(n29,n1,'Must give the name of alias')
-c
-222   if (type .eq. 11 .or. type .eq. 14) then
-	call oerror(n29, n1, 'Bad symbol name')
-c
-      else if ( (type .eq. 0) .or.
-     .	   (iedit .eq. 1 .and. .not. global .and. .not. local .and.
-     .	    .not. lhunt(tag) )  ) then
-c
-	   do 221 i = 1, numvars
-		if (ckpak(1:nkar) .eq. names(i)) call oerror(n41, n1, 
-     .			'Bad set of ALIAS names')
-221		continue
-c
-	   call push(tstack, numvars, nkar)
-	   names(numvars) = ckpak(1:nkar)
-	   exists = .false.
-c          Store away alias name for later use.
-c
-      else if (lhunt(tag) .and. .not. global .and. 
-     .		.not. local)  then
-	   call oerror(n3, n1, 'Symbol already in use in procedure')
-c
-      else if (type .eq. 6) then
-	   if (iedit .eq. 1 .and. global .and. local) call oerror(n3, n1, '')
-           oldtag = k(LOCSYM + 2)
-	   exists = .true.
-c	   Alias already exists; copy old value to see if new one is the
-c	   same
-c
-      else 
-	   call oerror(n3, n1, '')	
-      endif
-c
-c     Get the name to be aliased.
-      CALL GETFLD
-      IF (TYPE.eq.0) call oerror(n2, n1, '')
-      IF (TYPE.ne.3 .and. type.ne.4 .and. type.ne.5) 
-     .	call oerror(n29, n1, 'Can only ALIAS to a VERB or PROCEDURE')
-      cstack(numvars) = tag
-c
-      if (exists .and. tag .ne. oldtag) call oerror(n3, n1, '')
-c
-      call getfld
-      if (tag .eq. icomma) call getfld
-      IF (TAG.ne.i0 .and. tag .ne. icolon) goto 222
-c     More names exist on the input line
-c 
-      do 223 i = 1, numvars
-	   ckpak = names(i)
-           if (iedit .eq. 1 .and. .not. global) then
-      	     call creatloc(n6, kpak, tstack(i), cstack(i), n0, locsym)
-	   else
-      	     call creatsym(n6, kpak, tstack(i), cstack(i), n0, locsym)
-	   endif
-223	   continue
-c     Create new symbol (local if compiling a procedure).
-c
-      mode = iedit
-      if (mode .eq. 1) call push(a, ap, iprotect)
-c
-      GO TO 99
-c
-C---------------------------------------------------------------------
-c
-  99  return
-      END
-c
-      SUBROUTINE RTOPS	(J)
-C----------------------------------------------------------------------
-C   RTOPS handles setups for run-time operators IF, THEN, ELSE, WHILE
-C   (which require forward references and an additional clean-up pass).
-C----------------------------------------------------------------------
-c
-      integer*2 m3, n120, nothng, j, jj, it
-c
-      include 'stk.inc'
-      include 'smstuf.inc'
-c
-      include 'tags.inc'
-c
-      data n120, m3/120,-3/, NOTHNG/0/ 
-c
-      JJ = J
-      GO TO (153,154,157,159), JJ
-      call oerror(n120,m3,'PSEUDO')
-c
-C---------------------------------------------------------------------
-C					E L S E.
-C---------------------------------------------------------------------
- 153  continue
-      GO TO 154
-C---------------------------------------------------------------------
-C					T H E N.
-C---------------------------------------------------------------------
- 154  CONTINUE
-      IFFLAG=0
-      NEXTP=0
-      CALL BCLEAN
-      CALL PUSH	(A,AP,I0)
-      CALL PUSH	(A,AP,I0)
-      CALL PUSH	(A,AP,TAG)
-      LAST=NOTHNG
-      GO TO 99
-C---------------------------------------------------------------------
-C			     I F
-C---------------------------------------------------------------------
- 157  IFFLAG=1
-      NEXTP=0
-      CALL BCLEAN
-      LAST=NOTHNG
-      GO TO 99
-C---------------------------------------------------------------------
-C					W H I L	E.
-C---------------------------------------------------------------------
- 159  IFFLAG=1
-      IT=iwhilesetup
-      NEXTP=0
-      CALL BCLEAN
-      CALL PUSH	(A,AP,IT)
-      CALL PUSH	(B,BP,TAG)
-      BPR(BP)=0
-      CALL PUSH	(B,BP,I0)
-      BPR(BP)=0
-      CALL PUSH	(B,BP,I0)
-      BPR(BP)=0
-      GO TO 99
-C---------------------------------------------------------------------
-c
-  99  return
-      END
-c
-      logical function lhunt(tag)
-c
-c     Searches the SYMSTACK stack for TAG.  If it is there, return TRUE.
-c
-      integer*2 i, tag
-c
-      include 'stk.inc'
-c
-      lhunt = .false.
-c
-      do 10 i = 1, symp
-	if (tag .eq. symstack(i)) then
-	   lhunt = .true.
-	   return
-	endif
-10	continue
-c
-      return
-      end
-c
diff -uNr 3.5/source/ptbyte.f unipops-3.6/source/ptbyte.f
--- 3.5/source/ptbyte.f	2000-03-16 11:32:19.000000000 -0700
+++ unipops-3.6/source/ptbyte.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-      subroutine ptbyte (data,iword,nbyte)
-C-------------------------------------------------------------------------------
-C  @(#)ptbyte.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C-----------------------------------------------------------------------
-C	 PTBYTE	put a character	(byte) into IWORD in either the	right
-C     or left byte (NBYTE = 0 => left,	= 1 => right, from DATA
-C     that is right justified.
-c Modified 8903 [RJM] See CHANGES.DOC
-C-----------------------------------------------------------------------
-C     For byte machines (PDP 11 series) NBYTE = 1 => left;  0 => right.
-C-----------------------------------------------------------------------
-c
-      integer*2 nbyte
-      integer*2 data,iword
-c
-      character*2 cout, cin
-      integer*2 iout, iin
-c
-      equivalence (cout, iout), (cin, iin)
-c
-      iin = data
-      iout = iword
-c
-      if(nbyte.ne.0) cout(2:2) = cin(2:2)
-      if(nbyte.eq.0) cout(1:1) = cin(2:2)
-c
-      iword = iout
-c
-      return
-      end
diff -uNr 3.5/source/push.f unipops-3.6/source/push.f
--- 3.5/source/push.f	2000-03-16 11:32:20.000000000 -0700
+++ unipops-3.6/source/push.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,22 +0,0 @@
-      SUBROUTINE PUSH (STACK,SP,ITEM)
-C-------------------------------------------------------------------------------
-C  @(#)push.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C--------------------------------------------------------------------
-C	 PUSH pushes ITEM onto the pushdown stack STACK	and
-C     advances the spack pointer SP.
-c      Modified 8903 [RJM] See CHANGES.DOC
-C--------------------------------------------------------------------
-      INTEGER*2 STACK(*), SP, item
-      integer*2 n1, n7
-      data n1, n7 /1, 7/
-c
-c
-      SP=SP+1
-      IF (SP.gt.399) call oerror(n7,n1,'Too many items in stack')
-c
-      STACK(SP)=ITEM
-c
-      RETURN
-c
-      END
diff -uNr 3.5/source/pushcmp.f unipops-3.6/source/pushcmp.f
--- 3.5/source/pushcmp.f	2000-03-16 11:32:20.000000000 -0700
+++ unipops-3.6/source/pushcmp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-      logical function pushcmp(stack, top, maxstck, item)
-c
-c     @(#)pushcmp.f	5.1  06/22/94
-c
-c     Pushes an integer ITEM onto the STACK which has MAXSTCK indices,
-c     of which TOP items have been used.
-c
-      integer*2 stack(*), top, maxstck, item
-c
-      if (top .eq. maxstck) then
-	pushcmp = .false.
-      else
-	pushcmp = .true.
-      	top = top + 1
-      	stack(top) = item
-      endif
-c
-      return
-c
-      end
-c
-c-------------------------------------
-c
-      logical function popcmp(stack, top, item)
-c
-c     Pops an integer ITEM from the TOP of the STACK.
-c
-      integer*2 stack(*), top, item
-c
-      if (top .eq. 0) then
-	popcmp = .false.
-      else
-      	item = stack(top)
-	popcmp = .true.
-      	top = top - 1
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/source/readms.f unipops-3.6/source/readms.f
--- 3.5/source/readms.f	2000-03-16 11:32:21.000000000 -0700
+++ unipops-3.6/source/readms.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-      SUBROUTINE READMS(LUN,IBLCK,NBLCK,LBUF,IER)
-C-------------------------------------------------------------------------------
-C  @(#)readms.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c     Modified 8903 [RJM] See CHANGES.DOC
-c*****************************************************
-      INTEGER*2 LUN, LBUF(*), ier
-      INTEGER*4  nblck, IBLCK, fd, blksize, unitno, ier4, getfd
-c
-      include 'cio.inc'
-c
-      unitno = lun
-      fd = getfd(unitno)
-      blksize = irecsiz * 2
-c
-      call cread(fd, iblck, nblck, lbuf, blksize, ier4)
-      ier = ier4
-c
-      return
-      end
-
diff -uNr 3.5/source/relink.f unipops-3.6/source/relink.f
--- 3.5/source/relink.f	2000-03-16 11:32:22.000000000 -0700
+++ unipops-3.6/source/relink.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,98 +0,0 @@
-      subroutine relink(old,new,subflags,numtags)
-c
-c     @(#)relink.f	5.1  06/22/94
-c
-c     Goes through the K array looking for procedures,  When it finds
-c     one it checks whether or not that procedure uses the OLD tag and,
-c     if so, it replaces the tag with NEW tag.  Does this for NUMTAGS
-c     entries in OLD and NEW. SUBFLAGS indicates that the tag is to 
-c     an array sub linked list, the subs operator must come next in the
-c     procedure chunk.
-c
-      integer*2 old(*), new(*), subflags(*), numtags 
-c     
-      integer*2 l, type, ll, lll, i
-c
-      include 'core.inc'
-      include 'tags.inc'
-c
-      if (numtags .le. 0) return
-c     No tags to alter so do nothing.
-c
-      l = 1
-c
-10    l = k(l)
-c	Advance to next item in list
-c
-      if (l .ne. 0) then
-c	   Have we exhausted the list?  If not, check if the item is a 
-c	   procedure
-c
-         type = k(l+1) - 16*(k(l+1)/16)
-         if (type .eq. 3) then
-c		It is a procudure
-c
-            ll = k(l+2)
-c		LL = index to first/next program chunk; check whether it is
-c		the last chunk
-c
- 20         if (k(ll) .ne. 0) then
-c		    It is NOT the last program chunk
-c
-               lll = ll+2
-c		    LLL = index to first/next command in current program chunk
-c
- 30            if (k(lll) .eq. iomega) then
-                  ll = k(ll)
-                  goto 20
-               endif
-c		    You have come to the end of the last command in the
-c		    current program chunk.  Go on to the next program chunk
-c
-               do 35 i = 1, numtags
-                  if (k(lll) .eq. old(i)) then
-                     if (subflags(i) .eq. 1 .and.
-     .                     k(lll+1) .eq. isubs) then
-                        k(lll) = new(i)
-                        goto 38
-                     else if (subflags(i) .ne. 1 .and. 
-     .                          k(lll+1) .ne. isubs) then
-                        k(lll) = new(i)
-                        goto 38
-                     endif
-                  endif
- 35            continue
-c		        If the current command has a desired TAG, change it.
-c			Make sure that if its an array type, that it is
-c			followed by the subs operator and that if it isn't
-c			an array type that it isn't followed by the subs op.
-c			Make sure that you don't change the value of the command
-c			more than once.
-c
- 38            lll = lll + 1
-               goto 30
-c		    Advance to the next command in the current program chunk
-c
-            endif
-c
-c		Finished with the last program chunk in this procedure; 
-c		go on from L to find next item in list.  
-c
-         else if (type .eq. 6) then
-c		It is an alias
-c
-            lll = l + 2
-            do 45 i = 1, numtags
-               if (k(lll) .eq. old(i) .and. subflags(i) .ne. 1) then
-                  k(lll) = new(i)
-                  goto 10
-               endif
- 45         continue
-c		   If the current Alias has a desired TAG, change it
-c
-         endif
-         goto 10
-      endif
-c
-      return
-      end
diff -uNr 3.5/source/settyp.f unipops-3.6/source/settyp.f
--- 3.5/source/settyp.f	2000-03-16 11:32:23.000000000 -0700
+++ unipops-3.6/source/settyp.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-      SUBROUTINE SETTYP	(KARRAY,LPTR,IVALUE)
-C-------------------------------------------------------------------------------
-C  @(#)settyp.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C--------------------------------------------------------------------
-C	 SETTYP	sets the type code for either a	symbol or literal as
-C     defined by the location LPTR, and	the new	type code IVALUE.
-c     Modified 8903 [RJM] See CHANGES.DOC
-C--------------------------------------------------------------------
-      integer*2	KARRAY(*), lptr, ivalue
-      integer*2 n120, m3
-      data n120, m3 /120, -3/
-c
-      if (lptr .lt. 2) call oerror(n120,m3,'SETTYP')
-c
-      KARRAY(LPTR-1)=(KARRAY(LPTR-1)/16)*16+IVALUE
-c
-      RETURN
-      END
diff -uNr 3.5/source/symbol.f unipops-3.6/source/symbol.f
--- 3.5/source/symbol.f	2000-03-16 11:32:23.000000000 -0700
+++ unipops-3.6/source/symbol.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,168 +0,0 @@
-      SUBROUTINE SYMBOL
-C-------------------------------------------------------------------------------
-C  @(#)symbol.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C----------------------------------------------------------------------
-C   Obtain a symbol from the symbol list.  
-c
-C---------------------------------------------------------------------
-c
-      integer*2 istat, length, iwpc, nt
-      integer*2 n4, n80
-c
-      INCLUDE 'core.inc'
-      include 'smstuf.inc'
-      include 'stk.inc'
-      INCLUDE 'cio.inc'
-c
-      data n4, n80 /4, 80/
-c
-C---------------------------------------------------------------------
-C					Search symbol table.
-      NT = IWPC(NKAR)
-      local = .false.
-c
-      IF (MODE.EQ.0) THEN
-c	 We are not trying to compile a proc so use min/match and only go
-c	 thru globals
-c
-	 L=K(1)
-     	 CALL MHUNT (K,L,NT,n4,KPAK,NKAR)
-      ELSE
-c	 We may be trying to compile a proc so don't use min/match and go
-c	 thru locals and, if not found, then thru globals.
-c
-	 l = 0
-	 if (lclstart .gt. 0) then
-	   l = max(0, k(lclstart))
-	   call hunt (k, l, nt, n4, kpak)
-	   if (l .ne. 0) local = .true.
-	 endif
-	 if (l .eq. 0) then
-	    L=K(1)
-            CALL HUNT (K,L,NT,n4,KPAK)
-	 endif
-      ENDIF
-c     if reading in a procedure, then no min match
-c
-      IF (IDEBUG.GT.0) then
-	WRITE (outbuf,102,iostat=istat) MODE,L,NT
- 102    FORMAT (1X,'SYMBOL ', 3I6)
-	call pwrite(ioutbuf, n80)
-      endif
-c
-      IF (L.gt.0) then
-C	Old symbol found.
-c
-	LENGTH=K(L+1)/16
-	TYPE=K(L+1)-16*LENGTH
-c
-	if (type .ne. 4 .and. type .ne. 5) LOCSYM=L
-	TAG=K(L+2)
-c
-      else 
-C	Symbol doesn't exist
-c
-        TYPE=0
-	TAG=-1
-c
-      endif
-c
-      RETURN
-      END
-c
-      subroutine creatsym(type, kpak, nkar, tag, err, locsym)
-c
-c     Creates a global symbol of type TYPE with name stored in KPAK of NKAR
-c	characters.  The symbol is given the tag TAG.  LOCSYM is given
-c	the location in CORE of the new item.  If ERR=0 then an error
-c	if symbol already exists, else no error.
-c
-      integer*2 n1, n3, n4
-      integer*2 type, kpak(*), nkar, l, nt, n, llocat, locsym, mk,
-     .		tag, err, iwpc
-c
-      include 'core.inc'
-c
-      data n1, n3, n4 /1, 3, 4/
-c
-      L=K(1)
-      NT = IWPC(NKAR)
-      CALL HUNT (K,L,NT,n4,KPAK)
-c
-      IF (L.gt.0) then
-c
-	if (err .eq. 0) call oerror(n3, n1, ' ')
-c
-      else
-c
-         N=NT+4
-         L=LLOCAT(N,K,K(9))
-         K(L+1)=16*NT+TYPE
-         LOCSYM=L
-         MK = L+4
-         CALL COPY(NT,KPAK,K(MK))
-         K(L+2)=TAG
-c
-      endif
-c
-      RETURN
-      END
-c
-      subroutine creatloc(type, kpak, nkar, tag, err, locsym)
-c
-c     Creates a local symbol of type TYPE with name stored in KPAK of NKAR
-c	characters.  The symbol is given the tag TAG.  LOCSYM is given
-c	the location in CORE of the new item.  If ERR=0 then an error
-c	if symbol already exists, else no error.
-c
-      integer*2 n1, n3, n4
-      integer*2 type, kpak(*), nkar, nt, n, llocat, locsym, mk,
-     .		tag, err, iwpc
-c
-      include 'core.inc'
-      include 'stk.inc'
-c
-      data n1, n3, n4 /1, 3, 4/
-c
-      NT = IWPC(NKAR)
-      if (lclstart .gt. 0) then
-	   l = max(0, k(lclstart))
-	   call hunt (k, l, nt, n4, kpak)
-      endif
-c
-      IF (L.gt.0) then
-c
-	if (err .eq. 0) call oerror(n3, n1, ' ')
-c
-      else
-c
-         N=NT+4
-         lcllast=LLOCAT(N,K,lcllast)
-         K(lcllast+1)=16*NT+TYPE
-         LOCSYM=lcllast
-         MK = lcllast+4
-         CALL COPY(NT,KPAK,K(MK))
-         K(lcllast+2)=TAG
-c
-      endif
-c
-      RETURN
-      END
-c
-      subroutine creatspc(numi2, tag)
-c
-c     Reserves NUMI2 words in the KX array; returns the TAG of the
-c	location used in KX.
-c
-      integer*2 numi2, tag, kxlink, irealp, llocat
-c
-      include 'core.inc'
-c
-      KXLINK=1
-      TAG=LLOCAT(numi2,Kx,KXLINK)
-      TAG=IREALP(TAG) + irealp(kxorg) - 1
-c
-      return
-      end
-c
diff -uNr 3.5/source/unpack.f unipops-3.6/source/unpack.f
--- 3.5/source/unpack.f	2000-03-16 11:32:24.000000000 -0700
+++ unipops-3.6/source/unpack.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-      SUBROUTINE UNPACK	(N,KF,KT)
-C-------------------------------------------------------------------------------
-C  @(#)unpack.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C------------------------------------------------------------------------
-C	 UNPACK	unpacks	a tight	to a loose character buffer.  The
-C     operation	is defined as X/Y = X/b, Y/b.
-c     Modified 8903 [RJM] See CHANGES.DOC
-C------------------------------------------------------------------------
-      integer*2	KF(*), KT(*), n, iblank, ktp, i, it
-      integer*2 n0, n1
-      DATA IBLANK /'  '/
-      data n0, n1 /0, 1/
-      KTP = 1
-      DO 10 I =	1, N
-	 KT(KTP) = IBLANK
-	 CALL GTBYTE(IT,KF(I),n0)
-	 CALL PTBYTE(IT,KT(KTP),n0)
-	 KTP = KTP + 1
-	 KT(KTP) = IBLANK
-	 CALL GTBYTE(IT,KF(I),n1)
-	 CALL PTBYTE(IT,KT(KTP),n0)
-	 KTP = KTP + 1
- 10	 CONTINUE
-      RETURN
-      END
diff -uNr 3.5/source/writms.f unipops-3.6/source/writms.f
--- 3.5/source/writms.f	2000-03-16 11:32:24.000000000 -0700
+++ unipops-3.6/source/writms.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-      SUBROUTINE WRITMS(LUN,IBLCK,NBLCK,LBUF,IER)
-C-------------------------------------------------------------------------------
-C  @(#)writms.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c     Modified 8903 [RJM] See CHANGES.DOC
-c********************************************************
-      integer*2 ier, LUN, LBUF(*)
-      INTEGER*4  IBLCK, nblck, fd, blksize, unitno, ier4, getfd
-c
-      include 'cio.inc'
-c
-      unitno = LUN
-      fd = getfd(unitno)
-      blksize = irecsiz * 2
-c
-      call cwrite(fd, iblck, nblck, lbuf, blksize, ier4)
-      ier = ier4
-c
-      return
-      end
-
Files 3.5/sunbin/CMEMORY and unipops-3.6/sunbin/CMEMORY differ
diff -uNr 3.5/sunbin/CPOPSDAT unipops-3.6/sunbin/CPOPSDAT
--- 3.5/sunbin/CPOPSDAT	2000-03-16 11:32:32.000000000 -0700
+++ unipops-3.6/sunbin/CPOPSDAT	1969-12-31 17:00:00.000000000 -0700
@@ -1,954 +0,0 @@
-C- Main File which includes all of the files that eventually make either
-C- LPOPSDAT or CPOPSDAT.  /lib/cpp is used and the -DCONTINUUM flag controls
-C- whether you get CPOPSDAT or LPOPSDAT, although the output-file name is
-C- controled by /lib/cpp.
-C- @(#)POPSDAT.MAIN	5.1 5
-C-
-C- POPSDAT stuff specific to both LINE and CONDAR (QUICK, FUNCT, STORES
-C- EDITOR, etc. type of stuff.)
-C- @(#)POPSDAT.GEN	5.1 06/22/94
-C-
-C- QUICK operators
-C-
-C- OMEGA       5   4    1  An internal operator
-,            1   4    1
-(            1   4    2
-)            1   4    3
-=            1   4    4
-+            1   4    5
--            1   4    6
-*            1   4    7
-/            1   4    8
-**           2   4    9
->            1   4   10
-<            1   4   11
-+            1   4   12
--            1   4   13
-~            1   4   14
-~=           2   4   15
->=           2   4   16
-<=           2   4   17
-TO           2   4   18
-BY           2   4   19
-=            1   4   20
-|            1   4   21
-&            1   4   22
-;            1   4   23
-FOR          3   4   24
-END          3   4   25
-READ         4   4   26
-PRINT        5   4   27
-?            1   4   27
-RETURN       6   4   28
-C-GETS         4   4   29  An internal operator
-C-RUN          3   4   30  An internal operator
-C-USING        5   4   31  An internal operator
-C-PROTECT      7   4   32  An internal operator
-EXEC         4   4   33
-SPRINT       6   4   34
-SREAD        5   4   35  
-FPRINT       6   4   36
-FREAD        5   4   37  
-C-
-C-  FUNCT; Function-like  operators
-C-  
-SIN          3   4   51
-ASIN         4   4   52
-COS          3   4   53
-ACOS         4   4   54
-TAN          3   4   55
-ATAN         4   4   56
-ATAN2        5   4   57
-SQRT         4   4   58
-LOG          3   4   59
-LOG10        5   4   60
-EXP          3   4   61
-ABS          3   4   62
-IFIX         4   4   63
-INT          3   4   63
-MAX          3   4   64
-MIN          3   4   65
-MOD          3   4   66
-NINT         4   4   67
-SIGN         4   4   68
-DIM          3   4   69
-SINH         4   4   70
-COSH         4   4   71
-TANH         4   4   72
-C-					 Stack function
-ASTACK       6   4   73
-C-                                       Get Data
-D0           2   4   74
-D1           2   4   75
-D2           2   4   76
-D3           2   4   77
-D4           2   4   78
-D5           2   4   79
-D6           2   4   80
-D7           2   4   81
-D8           2   4   82
-D9           2   4   83
-C-					 Get Headers
-H0           2   4   84
-H1           2   4   85
-H2           2   4   86
-H3           2   4   87
-H4           2   4   88
-H5           2   4   89
-H6           2   4   90
-H7           2   4   91
-H8           2   4   92
-H9           2   4   93
-C-					MATRIX operations
-MD0          3   4   94
-MD1          3   4   95
-MD2          3   4   96
-MD3          3   4   97
-C-
-MH0          3   4   98
-MH1          3   4   99
-MH2          3   4  100
-MH3          3   4  101
-C-					CUBE operations
-CD0          3   4  102
-CH0          3   4  103
-C-					String functions
-COMPARE      7   4  104
-LNBLNK       6   4  105
-LENGTH       6   4  106
-CONCAT       6   4  107
-SUBSTR       6   4  108
-INDEX        5   4  109
-C-                                      Data-Array functions
-CHANTOX      7   4  110
-XTOCHAN      7   4  111
-FOPEN        5   4  112
-FNAME        5   4  113
-XPIX2C       6   4  114
-YPIX2T       6   4  115
-C2XPIX       6   4  116
-T2YPIX       6   4  117
-C-
-C-  GENOP; General utility operators 
-C-
-PLACE        5   4  201
-VCTR         4   4  202
-CHAR         4   4  203
-PAGE         4   4  204
-EQTOGAL      7   4  205
-GALTOEQ      7   4  206
-DUMP         4   4  207
-CRT          3   4  208
-PRINTER      7   4  209
-OUTPUT       6   4  210
-TCOPY        5   4  211
-GCOPY        5   4  212
-PAUSE        5   4  213
-ERRON        5   4  214
-ERROFF       6   4  215
-FULLON       6   4  216
-FULLOFF      7   4  217
-GRAPHICS     8   4  218
-C-					 Set Stack 
-C- SETASTACK    9   4  219
-C-                                       Set Data
-C- SETD0        5   4  220
-C- SETD1        5   4  221
-C- SETD2        5   4  222
-C- SETD3        5   4  223
-C- SETD4        5   4  224
-C- SETD5        5   4  225
-C- SETD6        5   4  226
-C- SETD7        5   4  227
-C- SETD8        5   4  228
-C- SETD9        5   4  229
-C-					 Set Headers
-C- SETH0        5   4  230
-C- SETH1        5   4  231
-C- SETH2        5   4  232
-C- SETH3        5   4  233
-C- SETH4        5   4  234
-C- SETH5        5   4  235
-C- SETH6        5   4  236
-C- SETH7        5   4  237
-C- SETH8        5   4  238
-C- SETH9        5   4  239
-C-					MATRIX operations
-C- SETMD0       6   4  240
-C- SETMD1       6   4  241
-C- SETMD2       6   4  242
-C- SETMD3       6   4  243
-C-
-C- SETMH0       6   4  244
-C- SETMH1       6   4  245
-C- SETMH2       6   4  246
-C- SETMH3       6   4  247
-C-					additional common operators
-LOGON        5   4  248
-LOGOFF       6   4  249
-UNDOON       6   4  250
-UNDOOFF      7   4  251
-AMATHON      7   4  252
-AMATHOFF     8   4  253
-Z_SYSTEM     8   4  254
-Z_CHNGFIL    9   4  255
-C-				Z_BATCH turned off for now
-C- Z_BATCH      7   4  256
-C-
-COPYON       6   4  257
-COPYOFF      7   4  258
-DEBUG        5   4  259
-FREWIND      7   4  260
-FCLOSE       6   4  261
-FSTATUS      7   4  262
-PRNTFMT      7   4  263
-FONTSET      7   4  264
-VCHAR        5   4  265
-C-
-C- Run-Time operators
-C-
-ELSE         4   5  300
-THEN         4   5  301
-IF           2   5  302
-WHILE        5   5  303
-C-
-C- PSEUDO operators
-C-
-PROCEDURE    9   5  310
-PROC         4   5  310
-FINISH       6   5  311
-GLOBAL       6   5  312
-ARRAY        5   5  313
-STRING       6   5  314
-SCALAR       6   5  315
-POINTER      7   5  316
-ALIAS        5   5  317
-C-                          
-C- EDITOR operators
-C-
-POPSEDIT     8   5  320
-ENDEDIT      7   5  321
-C-
-C- STORES operators
-C-
-C- STOREPO     7   5  330  An Internal operator
-STORE        5   5  331
-RESTORE      7   5  332
-LIST         4   5  333
-CORE         4   5  334
-SCRATCH      7   5  335
-BATCH        5   5  336
-FILES        5   5  337
-CHNGPRJ      7   5  338
-SYSTEM       6   5  339
-DOCUMENT     8   5  340
-UNDO         4   5  341
-EDIT         4   5  342
-TYPE         4   5  343
-DIR          3   5  344
-SYSHELP      7   5  345
-LASER        5   5  346
-REPORT       6   5  347
-PRCDIR       6   5  348
-C-			MENUS disabled
-C- MENUS        5   5  349
-C- DONEMENU     8   5  350
-C-
-CHNGFILE     8   5  351
-IDENTIFY     8   5  352
-KILLGRPH     8   5  353
-EXIT         4   5  354
-RESTART      7   5  355
-COMPRESS     8   5  356 
-OLFILES      7   5  357
-WHATIS       6   5  358
-CHNGVER      7   5  359
-C-
-C- HELPS operators
-C-
-HELP         4   5  360
-VERB         4   5  361
-ADVERB       6   5  362
-EXPLAIN      7   5  363
-HISTORY      7   5  364
-C- DUMEND      6   5  368  An Internal operator
-C- WHILESETUP 10   5  369  An Internal operator
-C- SUBS        4   5  370  An Internal operator
-C-
-C- POPS VERBS - i.e. the stuff in the au routines
-C- @(#)POPSDAT.VERBS	5.2 07/06/94
-C-
-C--------------------------------------------------------------
-C-                                  AU1
-COPY         4   4  400
-MOVE         4   4  401
-REMOVE       6   4  402
-GET0         4   4  403
-GET          3   4  403
-ON           2   4  403
-GET1         4   4  404
-OFF          3   4  404
-GET2         4   4  405
-GET3         4   4  406
-GET4         4   4  407
-GET5         4   4  408
-GET6         4   4  409
-GET7         4   4  410
-GET8         4   4  411
-GET9         4   4  412
-RECALL       6   4  413
-SAVE         4   4  414
-TELL         4   4  415
-CGET         4   4  416
-SUMMARY      7   4  417
-KEEP         4   4  418
-CHECK        5   4  419
-GGET         4   4  420
-CGGET        5   4  421
-CHNGONLINE  10   4  422
-KGET         4   4  423
-C--------------------------------------------------------------
-C-                                  AU2
-ACCUM        5   4  430
-SUM          3   4  431
-AVE          3   4  432
-BOXCAR       6   4  433
-HANNING      7   4  434
-SCALE        5   4  435
-CLIP         4   4  436
-DIFF         4   4  437
-MINUS        5   4  437
-MOMENT       6   4  438
-SMOOTH       6   4  439
-INVERT       6   4  440
-DIVIDE       6   4  441
-SPIKE        5   4  442
-REPLACE      7   4  443
-PEAK         4   4  444
-BIAS         4   4  445
-CHNGRES      7   4  446
-CROSSFCN     8   4  447
-CONVFCN      7   4  448
-DECNVLV      7   4  449
-SHIFT        5   4  450
-FSHIFT       6   4  451
-VSHIFT       6   4  452
-PDOC         4   4  453
-LISTSHIFT    9   4  454
-PLUS         4   4  455
-MULTIPLY     8   4  456
-C--------------------------------------------------------------
-C-                                  AU3
-BASELINE     8   4  460
-BMODEL       6   4  461
-BSHAPE       6   4  462
-DCBASE       6   4  463
-RMS          3   4  464
-BSHOW        5   4  465
-PCBASE       6   4  466
-MDBASE       6   4  467
-C-------------------------------------------------------------
-C-                                  AU4
-CROSSHAIR    9   4  470
-RESHOW       6   4  471
-SHOW         4   4  472
-FLAG         4   4  473
-FULLGRID     8   4  474
-PLOT         4   4  475
-SETPAGE      7   4  476
-RSTPAGE      7   4  477
-COLOR        5   4  478
-LINETYPE     8   4  479
-CHARSIZE     8   4  480
-RSTCOLOR     8   4  481
-CLICK        5   4  482
-C------------------------------------------------------------
-C-                                  AU5
-MTABLE       6   4  485
-MHEADER      7   4  486
-MBLANK       6   4  487
-MCOPY        5   4  488
-MMOVE        5   4  489
-MREMOVE      7   4  490
-MINIT        5   4  491
-MRANGE       6   4  492
-HLFTNE       6   4  493
-LABEL        5   4  494
-SETLEV       6   4  495
-AUTOLEV      7   4  496
-RASTER       6   4  497
-SETCLUT      7   4  498
-CONTOUR      7   4  499
-MREAD        5   4  500
-MWRITE       6   4  501
-READCUBE     8   4  502
-SLICE        5   4  503
-MLIMITS      7   4  504
-QCONTOUR     8   4  505
-CHEADER      7   4  506
-PLOTDOTS     8   4  507
-MSMOOTH      7   4  508
-MFILL        5   4  509
-ROTATE       6   4  510
-MFFT         4   4  511
-MIFFT        5   4  512
-HOLWINDOW    9   4  513
-HOLFITFOC    9   4  514
-EQHISTLEV    9   4  515
-FUNCLEV      7   4  516
-PUTROW       6   4  517
-PUTCOL       6   4  518
-GETROW       6   4  519
-GETCOL       6   4  520
-MPLUS        5   4  521
-MMINUS       6   4  522
-MMULTIPLY    9   4  523
-MDIVIDE      7   4  524
-MSCALE       6   4  525
-MBIAS        5   4  526
-C-----------------------------------------------------------
-C-                                  AU6
-GMODEL       6   4  530
-GPARTS       6   4  531
-RESIDUAL     8   4  532
-GDISPLAY     8   4  533
-GAUSS        5   4  534
-C----------------------------------------------------------
-C-                                  AU7
-FFT          3   4  535
-IFFT         4   4  536
-POWSPEC      7   4  537
-C---------------------------------------------------------
-C-                                  AU8
-HEADER       6   4  540
-TABLE        5   4  541
-ADDSTACK     8   4  542
-DELETE       6   4  543
-EMPTY        5   4  544
-SCLEAR       6   4  545
-TITLE        5   4  546
-DOC          3   4  547
-THUMB        5   4  548
-OSB          3   4  549
-SELECT       6   4  550
-C---------------------------------------------------------
-C-                                  AU9
-RIPPLE       6   4  560
-RMODEL       6   4  561
-RSHAPE       6   4  562
-RSHOW        5   4  563
-C---------------------------------------------------------
-C-                                  AUA
-FV           2   4  570
-VF           2   4  571
-VC           2   4  572
-CV           2   4  573
-FC           2   4  574
-CF           2   4  575
-CC           2   4  576
-FF           2   4  577
-VV           2   4  578
-LINE         4   4  579
-HISTOGRAM    9   4  580
-POINTS       6   4  581
-RLINE        5   4  582
-RHIST        5   4  583
-RPOINTS      7   4  584
-FREEY        5   4  585
-HOLDY        5   4  586
-YRANGE       6   4  587
-XRANGE       6   4  588
-SAXIS        5   4  589
-C---------------------------------------------------------
-
-C-                                  CAUB
-CALDBE       6   4  590
-FIXDBE       6   4  591
-ZERO         4   4  592
-SWITCHED     8   4  593
-TOTALPWR     8   4  594
-AVGD         4   4  595
-ONS          3   4  596
-AVG          3   4  597
-SEDITS       6   4  598
-TEMPS        5   4  599
-SOLVETIP     8   4  600
-
-C-
-C-  FUNFUNCT; Funny Functions 
-C- @(#)POPSDAT.FFUNC	5.1 2
-XCUR         4   4  150
-YCUR         4   4  151
-RAND         4   4  152
-CCUR         4   4  153
-VCUR         4   4  154
-TCUR         4   4  155
-FCUR         4   4  156
-MCUR         4   4  157
-DATE         4   4  158
-TIME         4   4  159
-C-
-C- POPSDAT ADVERBS (Always common to LINE and CONDAR.. No adverbs which are
-C- specific to LINE and CONDAR allowed)
-C- @(#)POPSDAT.ADVERBS	5.2 08/30/94 
-C-
-C-                                  SCALAR ADVERBS
-VERS         4   8           000316. 
-NBOX         4   1            3.0
-NFIT         4   1            1.0
-NSAVE        5   1            1.0
-ZLINE        5   1            -1.0
-SLABEL       6   1            1.0
-FS           2   1            0.0
-FR           2   1            0.0
-BMARK        5   1            -1.0
-MRATIO       6   1            1.0
-NGAUSS       6   1            1.0
-BGAUSS       6   1            1.0
-EGAUSS       6   1            256.0
-NITER        5   1            8.0
-FIXC         4   1            -1.0
-FIXHW        5   1            -1.0
-FIXH         4   1            -1.0
-FIXRELC      7   1            -1.0
-FIXRELHW     8   1            -1.0
-FIXRELH      7   1            -1.0
-RAMPLTDE     8   1            0.0
-RPHASE       6   1            0.0
-RPERIOD      7   1            0.0
-RAMPERR      7   1            0.0
-RPHAERR      7   1            0.0
-RPERERR      7   1            0.0
-RFIXAMP      7   1            0.0
-RFIXPHA      7   1            0.0
-RFIXPER      7   1            -1.0
-ACOUNT       6   1            0.0
-CUTOFF       6   1            9999.0
-PFLAG        5   1            -1.0
-NEWRES       6   1            0.0
-OSHIFT       6   1            0.0
-BSCAN        5   1            0.0
-ESCAN        5   1            0.0
-BDROP        5   1            0.0
-EDROP        5   1            0.0
-FACT         4   1            0.0
-YMIN         4   1            -9999.0
-YINCR        5   1            1.0
-CLIPMIN      7   1            -9999.0
-CLIPMAX      7   1            9999.0
-VRMS         4   1            0.0
-CALVAL       6   1            0.0
-BMOMENT      7   1            0.0
-EMOMENT      7   1            0.0
-ASHIFT       6   1            0.0
-WEIGHT       6   1            0.0
-BBASE        5   1            50.0
-EBASE        5   1            50.0
-XMINP        5   1            0.0
-XMAXP        5   1            0.0
-XLOGP        5   1            -1.0
-YMINP        5   1            0.0
-YMAXP        5   1            0.0
-YLOGP        5   1            -1.0
-CROSSFLG     8   1            11111.
-DEFMODE      7   1            -1.0
-C-
-C-		Make sure following are properly initialized in ARAINIT
-C-
-CCLICK       6   1            0.0                INFINITY
-TCLICK       6   1            0.0                INFINITY
-VCLICK       6   1            0.0                INFINITY
-FCLICK       6   1            0.0                INFINITY
-MCLICK       6   1            0.0                INFINITY
-XCLICK       6   1            0.0                INFINITY
-YCLICK       6   1            0.0                INFINITY
-C-
-X_MIN        5   1            0.0                INFINITY
-X_MAX        5   1            0.0                INFINITY
-Y_MIN        5   1            0.0                INFINITY
-Y_MAX        5   1            0.0                INFINITY
-SCAN_MIN     8   1            0.0                INFINITY
-SCAN_MAX     8   1            0.0                INFINITY
-FEED_MIN     8   1            0.0                INFINITY
-FEED_MAX     8   1            0.0                INFINITY
-LST_MIN      7   1            0.0                INFINITY
-LST_MAX      7   1            0.0                INFINITY
-UT_MIN       6   1            0.0                INFINITY
-UT_MAX       6   1            0.0                INFINITY
-F_MIN        5   1            0.0                INFINITY
-F_MAX        5   1            0.0                INFINITY
-RATE_MIN     8   1            0.0                INFINITY
-RATE_MAX     8   1            0.0                INFINITY
-BW_MIN       6   1            0.0                INFINITY
-BW_MAX       6   1            0.0                INFINITY
-IT_MIN       6   1            0.0                INFINITY
-IT_MAX       6   1            0.0                INFINITY
-S_SORT       6   1            0.0
-TYPETIP      7   1            0.0
-ETA          3   1            0.84
-TAU0         4   1            0.0
-FTM          3   1            0.95
-FTSBR        5   1            0.95
-TRCVR        5   1            0.0
-ETAFREE      7   1            0.0
-TVANE        5   1            -1.0
-ERRCODE      7   1            0.0
-SPROTECT     8   1            1.0
-KPROTECT     8   1            1.0
-DCPCT        5   1            10.
-MDBOX        5   1            11.
-MXMIN        5   1            0.0
-MXMAX        5   1            0.0
-MYMIN        5   1            0.0
-MYMAX        5   1            0.0
-N_N          3   1            0.0
-DEFAULT      7   8            0.0
-C-
-C-                                  STRING ADVERBS
-C-		Make sure these are properly initialized in ARAINIT
-HTITLE       6   7    1       8.0
-XTITLE       6   7    1       4.0
-YTITLE       6   7    1       4.0
-S_OBJECT     8   7    1       4.0
-S_MODE       6   7    1       1.0
-PROMPT       6   7    1       2.0
-C-
-C-                                  ARRAY ADVERBS
-C-		Make sure these are properly initialized in ARAINIT
-SIZE         4   2    1       2.0                 0.0
-NREGION      7   2    1       32.0                0.0 
-GREGION      7   2    1       48.0                0.0
-VMARK        5   2    1       12.0               -999999.
-CMARK        5   2    1       12.0               -999999.
-FMARK        5   2    1       12.0               -999999.
-TMARK        5   2    1       12.0               -999999.
-CENTER       6   2    1       24.0                0.0
-HEIGHT       6   2    1       24.0                0.0
-HWIDTH       6   2    1       24.0                0.0
-CNTERR       6   2    1       24.0                0.0
-HGHTERR      7   2    1       24.0                0.0
-HWERR        5   2    1       24.0                0.0
-SMWGT        5   2    1       12.0                0.0
-BADPT        5   2    1       12.0                0.0
-GMFRAC       6   2    1       5.0                 0.0
-GOUT         4   2    2       6.0       5.0       0.0
-MLIMS        5   2    2       2.0       5.0      INFINITY
-LEVS         4   2    1       32.0               -999999.
-FLEVS        5   2    1       32.0               -999999.
-BPARM        5   2    1       15.0                0.0
-STATUS       6   2    1       32.0                0.0
-CONLINE      7   2    1       32.0                0.0
-CLUT         4   2    2        3.0     32.0      -16.0
-C-
-C-				Protected Adverbs, unlike the other 
-C-				protected adverbs below, these are
-C-				used, and occaisionally set, in the
-C-				program itself.   They are protected to
-C-				prevent the user from altering them
-C-
-FB_VER       6   8           -1.0
-HC_VER       6   8           -1.0
-CON_VER      7   8           -1.0
-C-
-C-				Protected ADVERBS -- Header wpords
-C-				Class One
-HEADLEN      7   8            5.0
-DATALEN      7   8            6.0
-SCAN         4   8            7.0
-OBSID        5   8            8.0
-OBSERVER     8   8            9.0
-TELESCOP     8   8           11.0
-PROJID       6   8           12.0
-OBJECT       6   8           13.0
-OBSMODE      7   8           15.0
-FRONTEND     8   8           16.0
-BACKEND      7   8           17.0
-PRECIS       6   8           18.0
-SAVENUM      7   8           19.0
-NORECORD     8   8           20.0
-RECORDID     8   8           21.0
-C-                      	Class Two
-XPOINT       6   8           30.0
-YPOINT       6   8           31.0
-UXPNT        5   8           32.0
-UYPNT        5   8           33.0
-PTCON        5   8           34.0
-ORIENT       6   8           38.0
-FOCUSR       6   8           39.0
-FOCUSV       6   8           40.0
-FOCUSH       6   8           41.0
-PT_MODEL     8   8           42.0
-C-                      	Class Three
-UTDATE       6   8           55.0
-UT           2   8           56.0
-LST          3   8           57.0
-NORCHAN      7   8           58.0
-NOSWVAR      7   8           59.0
-NOPHASE      7   8           60.0
-CYCLLEN      7   8           61.0
-SAMPRAT      7   8           62.0
-CL11TYPE     8   8           63.0
-PHASEID      7   8           64.0
-C-                      	Class Four
-EPOCH        5   8           80.0
-XSOURCE      7   8           81.0
-YSOURCE      7   8           82.0
-XREF         4   8           83.0
-YREF         4   8           84.0
-EPOCRA       6   8           85.0
-EPOCDEC      7   8           86.0
-GALLONG      7   8           87.0
-GALLAT       6   8           88.0
-AZ           2   8           89.0
-EL           2   8           90.0
-INDX         4   8           91.0
-INDY         4   8           92.0
-DESORG       6   8           93.0
-COORDCD      7   8           96.0
-C-                      	Class Five
-TAMB         4   8           105.0
-PRESSURE     8   8           106.0
-HUMIDITY     8   8           107.0
-REFRAC       6   8           108.0
-DEWPT        5   8           109.0
-MMH2O        5   8           110.0
-C-                       	Class Six
-SCANANG      7   8           130.0
-XZERO        5   8           131.0
-YZERO        5   8           132.0
-DELTAXR      7   8           133.0
-DELTAYR      7   8           134.0
-NOPTS        5   8           135.0
-NOXPTS       6   8           136.0
-NOYPTS       6   8           137.0
-XCELL0       6   8           138.0
-YCELL0       6   8           139.0
-FRAME        5   8           140.0
-C-                      	Class Seven
-BFWHM        5   8           155.0
-OFFSCAN      7   8           156.0
-BADCHV       6   8           157.0
-RVSYS        5   8           158.0
-VELOCITY     8   8           159.0
-VELDEF       6   8           160.0
-TYPECAL      7   8           161.0
-C-                       	Class Eight
-APPEFF       6   8           180.0
-BEAMEFF      7   8           181.0
-ANTGAIN      7   8           182.0
-ETAL         4   8           183.0
-ETAFSS       6   8           184.0
-C-                       	Class Nine - 12 M
-SYNFREQ      7   8           205.0
-LOFACT       6   8           206.0
-HARMONIC     8   8           207.0
-LOIF         4   8           208.0
-FIRSTIF      7   8           209.0
-RAZOFF       6   8           210.0
-RELOFF       6   8           211.0
-BMTHROW      7   8           212.0
-BMORENT      7   8           213.0
-BASEOFF      7   8           214.0
-OBSTOL       6   8           215.0
-SIDEBAND     8   8           216.0
-WL           2   8           217.0
-GAINS        5   8           218.0
-PBEAM        5   8           219.0
-MBEAM        5   8           221.0
-SROFF        5   8           223.0
-FOFFSIG      7   8           227.0
-FOFFREF1     8   8           228.0
-FOFFREF2     8   8           229.0
-C-                       	Class Nine - Green Bank
-L1           2   8           205.0
-L1F1         4   8           206.0
-L1F2         4   8           207.0
-L2           2   8           208.0
-L2F1         4   8           209.0
-L2F2         4   8           210.0
-LA           2   8           211.0
-LB           2   8           212.0
-LC           2   8           213.0
-LD           2   8           214.0
-LEVCORR      7   8           215.0
-PTFUDGE      7   8           216.0
-RHO          3   8           218.0
-THETA        5   8           219.0
-CFFORM       6   8           220.0
-C-                       	Class Ten
-OPENPAR      7   8           230.0
-C-		 		Class Eleven - ORIG
-VARVAL       6   8           255.0
-VARDES       6   8           256.0
-PHASTB       6   8           257.0
-C-				Class Eleven - PROTO
-NOSWVARF     8   8           255.0
-NUMCYC       6   8           256.0
-NUMCYCF      7   8           257.0
-NOPHASEF     8   8           258.0
-CYCLLENF     8   8           259.0
-SAMPTIMF     8   8           260.0
-VARVAL01     8   8           261.0
-VARDES01     8   8           262.0
-PHASTB01     8   8           263.0
-VARVAL02     8   8           267.0
-VARDES02     8   8           268.0
-PHASTB02     8   8           269.0
-VARVAL03     8   8           273.0
-VARDES03     8   8           274.0
-PHASTB03     8   8           275.0
-VARVAL04     8   8           279.0
-VARDES04     8   8           280.0
-PHASTB04     8   8           281.0
-VARVAL05     8   8           285.0
-VARDES05     8   8           286.0
-PHASTB05     8   8           287.0
-VARVAL06     8   8           291.0
-VARDES06     8   8           292.0
-PHASTB06     8   8           293.0
-VARVAL07     8   8           297.0
-VARDES07     8   8           298.0
-PHASTB07     8   8           299.0
-VARVAL08     8   8           303.0
-VARDES08     8   8           304.0
-PHASTB08     8   8           305.0
-VARVAL09     8   8           309.0
-VARDES09     8   8           310.0
-PHASTB09     8   8           311.0
-VARVAL10     8   8           315.0
-VARDES10     8   8           316.0
-PHASTB10     8   8           317.0
-C-                       	Class Twelve
-OBSFREQ      7   8           321.0
-RESTFREQ     8   8           322.0
-FREQRES      7   8           323.0
-BW           2   8           324.0
-TRX          3   8           325.0
-TCAL         4   8           326.0
-STSYS        5   8           327.0
-RTSYS        5   8           328.0
-TSOURCE      7   8           329.0
-TRMS         4   8           330.0
-REFPT        5   8           331.0
-X0           2   8           332.0
-DELTAX       6   8           333.0
-INTTIME      7   8           334.0
-NOINT        5   8           335.0
-SPN          3   8           336.0
-TAUH2O       6   8           337.0
-TH2O         4   8           338.0
-TAUO2        5   8           339.0
-TO2          3   8           340.0
-POLARIZ      7   8           341.0
-EFFINT       6   8           342.0
-RX_INFO      7   8           343.0
-C-                        	Class Thirteen
-NOSTAC       6   8           346.0
-FSCAN        5   8           347.0
-LSCAN        5   8           348.0
-LAMP         4   8           349.0
-LWID         4   8           350.0
-ILI          3   8           351.0
-DRMS         4   8           352.0
-C-			Protected Adverbs -- Matrix header
-MNAXIS1      7   8            1.0
-MNAXIS2      7   8            2.0
-MRVAL1       6   8            3.0
-MRVAL2       6   8            4.0
-MDELT1       6   8            5.0
-MDELT2       6   8            6.0
-MPIX1        5   8            7.0
-MPIX2        5   8            8.0
-MUNDEF       6   8            9.0
-MEQUINOX     8   8           10.0
-MTYPE1       6   8           20.0
-MTYPE2       6   8           21.0
-MBUNIT       6   8           22.0
-MOBJECT      7   8           23.0
-MORIGIN      7   8           25.0
-MDATE        5   8           26.0
-MCOMMENT     8   8           27.0
-C-			Protected Adverbs -- Cube header
-CNAXIS1      7   8            1.0
-CNAXIS2      7   8            2.0
-CRVAL1       6   8            3.0
-CRVAL2       6   8            4.0
-CDELT1       6   8            5.0
-CDELT2       6   8            6.0
-CPIX1        5   8            7.0
-CPIX2        5   8            8.0
-CUNDEF       6   8            9.0
-CNAXIS3      7   8           10.0
-CRVAL3       6   8           11.0
-CDELT3       6   8           12.0
-CPIX3        5   8           13.0
-CTMIN        5   8           14.0
-CTMAX        5   8           15.0
-CTSCALE      7   8           16.0
-CTZERO       6   8           17.0
-CEQUINOX     8   8           18.0
-CTYPE1       6   8           20.0
-CTYPE2       6   8           21.0
-CBUNIT       6   8           22.0
-COBJECT      7   8           23.0
-CORIGIN      7   8           25.0
-CDATE        5   8           26.0
-CTYPE3       6   8           27.0
-CCOMMENT     8   8           28.0
-C-       		Protected Adverbs -- Others
-C-			This order should match that used by FILES
-DSCANS       6   8            1.0
-KSCANS       6   8            2.0
-SSCANS       6   8            3.0
-GSCANS       6   8            4.0
-RSCANS       6   8            5.0
-PRINTFILE    9   8           11.0
-LOGFILE      7   8           12.0
-C-			These must continue where the last left off
-ACCMD        5   8           13.0
-STACK        5   8           14.0
-DISK         4   8           15.0
-OFFDATA      7   8           16.0
-ONDATA       6   8           17.0
-INFO         4   8           18.0
-STAT         4   8           19.0
-C-			these are for use with the chngonline verb
-HCTYPE       6   8            1.0
-FBTYPE       6   8            2.0
-CONTYPE      7   8            3.0
-C-
-C-			these are for use with FOPEN
-RW           2   8            0.0
-WO           2   8            1.0
-RO           2   8            2.0
-REW          3   8            0.0
-EOF          3   8           10.0
-UNK          3   8            0.0
-OLD          3   8           100.0
-NEW          3   8           200.0
-SCR          3   8           300.0
-C-
-C-                      These are for use with SAXIS (cont and line)
-SAMPLE       6   8             1.0
-TIMEOFF      7   8             2.0
-POS_OFF      7   8             3.0
-POSXOFF      7   8             4.0
-POSYOFF      7   8             5.0
-POSX         4   8             6.0
-POSY         4   8             7.0
-TIMELST      7   8             8.0
-TIMEUT       6   8             9.0
-C-
-CHANNEL      7   8             1.0
-FREQOFF      7   8             2.0
-VELHEAD      7   8             3.0
-VELRADI      7   8             4.0
-VELOPTI      7   8             5.0
-VELRELT      7   8             6.0
-VELLINR      7   8             7.0
-FREQRST      7   8             8.0
-FREQSKY      7   8             9.0
-FREQIRST     8   8            10.0
-FREQISKY     8   8            11.0
-C-
-QUIT         4   6
Files 3.5/sunbin/LMEMORY and unipops-3.6/sunbin/LMEMORY differ
diff -uNr 3.5/sunbin/LPOPSDAT unipops-3.6/sunbin/LPOPSDAT
--- 3.5/sunbin/LPOPSDAT	2000-03-16 11:32:31.000000000 -0700
+++ unipops-3.6/sunbin/LPOPSDAT	1969-12-31 17:00:00.000000000 -0700
@@ -1,949 +0,0 @@
-C- Main File which includes all of the files that eventually make either
-C- LPOPSDAT or CPOPSDAT.  /lib/cpp is used and the -DCONTINUUM flag controls
-C- whether you get CPOPSDAT or LPOPSDAT, although the output-file name is
-C- controled by /lib/cpp.
-C- @(#)POPSDAT.MAIN	5.1 5
-C-
-C- POPSDAT stuff specific to both LINE and CONDAR (QUICK, FUNCT, STORES
-C- EDITOR, etc. type of stuff.)
-C- @(#)POPSDAT.GEN	5.1 06/22/94
-C-
-C- QUICK operators
-C-
-C- OMEGA       5   4    1  An internal operator
-,            1   4    1
-(            1   4    2
-)            1   4    3
-=            1   4    4
-+            1   4    5
--            1   4    6
-*            1   4    7
-/            1   4    8
-**           2   4    9
->            1   4   10
-<            1   4   11
-+            1   4   12
--            1   4   13
-~            1   4   14
-~=           2   4   15
->=           2   4   16
-<=           2   4   17
-TO           2   4   18
-BY           2   4   19
-=            1   4   20
-|            1   4   21
-&            1   4   22
-;            1   4   23
-FOR          3   4   24
-END          3   4   25
-READ         4   4   26
-PRINT        5   4   27
-?            1   4   27
-RETURN       6   4   28
-C-GETS         4   4   29  An internal operator
-C-RUN          3   4   30  An internal operator
-C-USING        5   4   31  An internal operator
-C-PROTECT      7   4   32  An internal operator
-EXEC         4   4   33
-SPRINT       6   4   34
-SREAD        5   4   35  
-FPRINT       6   4   36
-FREAD        5   4   37  
-C-
-C-  FUNCT; Function-like  operators
-C-  
-SIN          3   4   51
-ASIN         4   4   52
-COS          3   4   53
-ACOS         4   4   54
-TAN          3   4   55
-ATAN         4   4   56
-ATAN2        5   4   57
-SQRT         4   4   58
-LOG          3   4   59
-LOG10        5   4   60
-EXP          3   4   61
-ABS          3   4   62
-IFIX         4   4   63
-INT          3   4   63
-MAX          3   4   64
-MIN          3   4   65
-MOD          3   4   66
-NINT         4   4   67
-SIGN         4   4   68
-DIM          3   4   69
-SINH         4   4   70
-COSH         4   4   71
-TANH         4   4   72
-C-					 Stack function
-ASTACK       6   4   73
-C-                                       Get Data
-D0           2   4   74
-D1           2   4   75
-D2           2   4   76
-D3           2   4   77
-D4           2   4   78
-D5           2   4   79
-D6           2   4   80
-D7           2   4   81
-D8           2   4   82
-D9           2   4   83
-C-					 Get Headers
-H0           2   4   84
-H1           2   4   85
-H2           2   4   86
-H3           2   4   87
-H4           2   4   88
-H5           2   4   89
-H6           2   4   90
-H7           2   4   91
-H8           2   4   92
-H9           2   4   93
-C-					MATRIX operations
-MD0          3   4   94
-MD1          3   4   95
-MD2          3   4   96
-MD3          3   4   97
-C-
-MH0          3   4   98
-MH1          3   4   99
-MH2          3   4  100
-MH3          3   4  101
-C-					CUBE operations
-CD0          3   4  102
-CH0          3   4  103
-C-					String functions
-COMPARE      7   4  104
-LNBLNK       6   4  105
-LENGTH       6   4  106
-CONCAT       6   4  107
-SUBSTR       6   4  108
-INDEX        5   4  109
-C-                                      Data-Array functions
-CHANTOX      7   4  110
-XTOCHAN      7   4  111
-FOPEN        5   4  112
-FNAME        5   4  113
-XPIX2C       6   4  114
-YPIX2T       6   4  115
-C2XPIX       6   4  116
-T2YPIX       6   4  117
-C-
-C-  GENOP; General utility operators 
-C-
-PLACE        5   4  201
-VCTR         4   4  202
-CHAR         4   4  203
-PAGE         4   4  204
-EQTOGAL      7   4  205
-GALTOEQ      7   4  206
-DUMP         4   4  207
-CRT          3   4  208
-PRINTER      7   4  209
-OUTPUT       6   4  210
-TCOPY        5   4  211
-GCOPY        5   4  212
-PAUSE        5   4  213
-ERRON        5   4  214
-ERROFF       6   4  215
-FULLON       6   4  216
-FULLOFF      7   4  217
-GRAPHICS     8   4  218
-C-					 Set Stack 
-C- SETASTACK    9   4  219
-C-                                       Set Data
-C- SETD0        5   4  220
-C- SETD1        5   4  221
-C- SETD2        5   4  222
-C- SETD3        5   4  223
-C- SETD4        5   4  224
-C- SETD5        5   4  225
-C- SETD6        5   4  226
-C- SETD7        5   4  227
-C- SETD8        5   4  228
-C- SETD9        5   4  229
-C-					 Set Headers
-C- SETH0        5   4  230
-C- SETH1        5   4  231
-C- SETH2        5   4  232
-C- SETH3        5   4  233
-C- SETH4        5   4  234
-C- SETH5        5   4  235
-C- SETH6        5   4  236
-C- SETH7        5   4  237
-C- SETH8        5   4  238
-C- SETH9        5   4  239
-C-					MATRIX operations
-C- SETMD0       6   4  240
-C- SETMD1       6   4  241
-C- SETMD2       6   4  242
-C- SETMD3       6   4  243
-C-
-C- SETMH0       6   4  244
-C- SETMH1       6   4  245
-C- SETMH2       6   4  246
-C- SETMH3       6   4  247
-C-					additional common operators
-LOGON        5   4  248
-LOGOFF       6   4  249
-UNDOON       6   4  250
-UNDOOFF      7   4  251
-AMATHON      7   4  252
-AMATHOFF     8   4  253
-Z_SYSTEM     8   4  254
-Z_CHNGFIL    9   4  255
-C-				Z_BATCH turned off for now
-C- Z_BATCH      7   4  256
-C-
-COPYON       6   4  257
-COPYOFF      7   4  258
-DEBUG        5   4  259
-FREWIND      7   4  260
-FCLOSE       6   4  261
-FSTATUS      7   4  262
-PRNTFMT      7   4  263
-FONTSET      7   4  264
-VCHAR        5   4  265
-C-
-C- Run-Time operators
-C-
-ELSE         4   5  300
-THEN         4   5  301
-IF           2   5  302
-WHILE        5   5  303
-C-
-C- PSEUDO operators
-C-
-PROCEDURE    9   5  310
-PROC         4   5  310
-FINISH       6   5  311
-GLOBAL       6   5  312
-ARRAY        5   5  313
-STRING       6   5  314
-SCALAR       6   5  315
-POINTER      7   5  316
-ALIAS        5   5  317
-C-                          
-C- EDITOR operators
-C-
-POPSEDIT     8   5  320
-ENDEDIT      7   5  321
-C-
-C- STORES operators
-C-
-C- STOREPO     7   5  330  An Internal operator
-STORE        5   5  331
-RESTORE      7   5  332
-LIST         4   5  333
-CORE         4   5  334
-SCRATCH      7   5  335
-BATCH        5   5  336
-FILES        5   5  337
-CHNGPRJ      7   5  338
-SYSTEM       6   5  339
-DOCUMENT     8   5  340
-UNDO         4   5  341
-EDIT         4   5  342
-TYPE         4   5  343
-DIR          3   5  344
-SYSHELP      7   5  345
-LASER        5   5  346
-REPORT       6   5  347
-PRCDIR       6   5  348
-C-			MENUS disabled
-C- MENUS        5   5  349
-C- DONEMENU     8   5  350
-C-
-CHNGFILE     8   5  351
-IDENTIFY     8   5  352
-KILLGRPH     8   5  353
-EXIT         4   5  354
-RESTART      7   5  355
-COMPRESS     8   5  356 
-OLFILES      7   5  357
-WHATIS       6   5  358
-CHNGVER      7   5  359
-C-
-C- HELPS operators
-C-
-HELP         4   5  360
-VERB         4   5  361
-ADVERB       6   5  362
-EXPLAIN      7   5  363
-HISTORY      7   5  364
-C- DUMEND      6   5  368  An Internal operator
-C- WHILESETUP 10   5  369  An Internal operator
-C- SUBS        4   5  370  An Internal operator
-C-
-C- POPS VERBS - i.e. the stuff in the au routines
-C- @(#)POPSDAT.VERBS	5.2 07/06/94
-C-
-C--------------------------------------------------------------
-C-                                  AU1
-COPY         4   4  400
-MOVE         4   4  401
-REMOVE       6   4  402
-GET0         4   4  403
-GET          3   4  403
-ON           2   4  403
-GET1         4   4  404
-OFF          3   4  404
-GET2         4   4  405
-GET3         4   4  406
-GET4         4   4  407
-GET5         4   4  408
-GET6         4   4  409
-GET7         4   4  410
-GET8         4   4  411
-GET9         4   4  412
-RECALL       6   4  413
-SAVE         4   4  414
-TELL         4   4  415
-CGET         4   4  416
-SUMMARY      7   4  417
-KEEP         4   4  418
-CHECK        5   4  419
-GGET         4   4  420
-CGGET        5   4  421
-CHNGONLINE  10   4  422
-KGET         4   4  423
-C--------------------------------------------------------------
-C-                                  AU2
-ACCUM        5   4  430
-SUM          3   4  431
-AVE          3   4  432
-BOXCAR       6   4  433
-HANNING      7   4  434
-SCALE        5   4  435
-CLIP         4   4  436
-DIFF         4   4  437
-MINUS        5   4  437
-MOMENT       6   4  438
-SMOOTH       6   4  439
-INVERT       6   4  440
-DIVIDE       6   4  441
-SPIKE        5   4  442
-REPLACE      7   4  443
-PEAK         4   4  444
-BIAS         4   4  445
-CHNGRES      7   4  446
-CROSSFCN     8   4  447
-CONVFCN      7   4  448
-DECNVLV      7   4  449
-SHIFT        5   4  450
-FSHIFT       6   4  451
-VSHIFT       6   4  452
-PDOC         4   4  453
-LISTSHIFT    9   4  454
-PLUS         4   4  455
-MULTIPLY     8   4  456
-C--------------------------------------------------------------
-C-                                  AU3
-BASELINE     8   4  460
-BMODEL       6   4  461
-BSHAPE       6   4  462
-DCBASE       6   4  463
-RMS          3   4  464
-BSHOW        5   4  465
-PCBASE       6   4  466
-MDBASE       6   4  467
-C-------------------------------------------------------------
-C-                                  AU4
-CROSSHAIR    9   4  470
-RESHOW       6   4  471
-SHOW         4   4  472
-FLAG         4   4  473
-FULLGRID     8   4  474
-PLOT         4   4  475
-SETPAGE      7   4  476
-RSTPAGE      7   4  477
-COLOR        5   4  478
-LINETYPE     8   4  479
-CHARSIZE     8   4  480
-RSTCOLOR     8   4  481
-CLICK        5   4  482
-C------------------------------------------------------------
-C-                                  AU5
-MTABLE       6   4  485
-MHEADER      7   4  486
-MBLANK       6   4  487
-MCOPY        5   4  488
-MMOVE        5   4  489
-MREMOVE      7   4  490
-MINIT        5   4  491
-MRANGE       6   4  492
-HLFTNE       6   4  493
-LABEL        5   4  494
-SETLEV       6   4  495
-AUTOLEV      7   4  496
-RASTER       6   4  497
-SETCLUT      7   4  498
-CONTOUR      7   4  499
-MREAD        5   4  500
-MWRITE       6   4  501
-READCUBE     8   4  502
-SLICE        5   4  503
-MLIMITS      7   4  504
-QCONTOUR     8   4  505
-CHEADER      7   4  506
-PLOTDOTS     8   4  507
-MSMOOTH      7   4  508
-MFILL        5   4  509
-ROTATE       6   4  510
-MFFT         4   4  511
-MIFFT        5   4  512
-HOLWINDOW    9   4  513
-HOLFITFOC    9   4  514
-EQHISTLEV    9   4  515
-FUNCLEV      7   4  516
-PUTROW       6   4  517
-PUTCOL       6   4  518
-GETROW       6   4  519
-GETCOL       6   4  520
-MPLUS        5   4  521
-MMINUS       6   4  522
-MMULTIPLY    9   4  523
-MDIVIDE      7   4  524
-MSCALE       6   4  525
-MBIAS        5   4  526
-C-----------------------------------------------------------
-C-                                  AU6
-GMODEL       6   4  530
-GPARTS       6   4  531
-RESIDUAL     8   4  532
-GDISPLAY     8   4  533
-GAUSS        5   4  534
-C----------------------------------------------------------
-C-                                  AU7
-FFT          3   4  535
-IFFT         4   4  536
-POWSPEC      7   4  537
-C---------------------------------------------------------
-C-                                  AU8
-HEADER       6   4  540
-TABLE        5   4  541
-ADDSTACK     8   4  542
-DELETE       6   4  543
-EMPTY        5   4  544
-SCLEAR       6   4  545
-TITLE        5   4  546
-DOC          3   4  547
-THUMB        5   4  548
-OSB          3   4  549
-SELECT       6   4  550
-C---------------------------------------------------------
-C-                                  AU9
-RIPPLE       6   4  560
-RMODEL       6   4  561
-RSHAPE       6   4  562
-RSHOW        5   4  563
-C---------------------------------------------------------
-C-                                  AUA
-FV           2   4  570
-VF           2   4  571
-VC           2   4  572
-CV           2   4  573
-FC           2   4  574
-CF           2   4  575
-CC           2   4  576
-FF           2   4  577
-VV           2   4  578
-LINE         4   4  579
-HISTOGRAM    9   4  580
-POINTS       6   4  581
-RLINE        5   4  582
-RHIST        5   4  583
-RPOINTS      7   4  584
-FREEY        5   4  585
-HOLDY        5   4  586
-YRANGE       6   4  587
-XRANGE       6   4  588
-SAXIS        5   4  589
-C---------------------------------------------------------
-
-C-				   LAUB
-RAP          3   4  590
-GMEASURE     8   4  591
-TEMP         4   4  592
-GETIR        5   4  593
-GETOTF       6   4  594
-GETPOLZ      7   4  595
-
-C-
-C-  FUNFUNCT; Funny Functions 
-C- @(#)POPSDAT.FFUNC	5.1 2
-XCUR         4   4  150
-YCUR         4   4  151
-RAND         4   4  152
-CCUR         4   4  153
-VCUR         4   4  154
-TCUR         4   4  155
-FCUR         4   4  156
-MCUR         4   4  157
-DATE         4   4  158
-TIME         4   4  159
-C-
-C- POPSDAT ADVERBS (Always common to LINE and CONDAR.. No adverbs which are
-C- specific to LINE and CONDAR allowed)
-C- @(#)POPSDAT.ADVERBS	5.2 08/30/94 
-C-
-C-                                  SCALAR ADVERBS
-VERS         4   8           000316. 
-NBOX         4   1            3.0
-NFIT         4   1            1.0
-NSAVE        5   1            1.0
-ZLINE        5   1            -1.0
-SLABEL       6   1            1.0
-FS           2   1            0.0
-FR           2   1            0.0
-BMARK        5   1            -1.0
-MRATIO       6   1            1.0
-NGAUSS       6   1            1.0
-BGAUSS       6   1            1.0
-EGAUSS       6   1            256.0
-NITER        5   1            8.0
-FIXC         4   1            -1.0
-FIXHW        5   1            -1.0
-FIXH         4   1            -1.0
-FIXRELC      7   1            -1.0
-FIXRELHW     8   1            -1.0
-FIXRELH      7   1            -1.0
-RAMPLTDE     8   1            0.0
-RPHASE       6   1            0.0
-RPERIOD      7   1            0.0
-RAMPERR      7   1            0.0
-RPHAERR      7   1            0.0
-RPERERR      7   1            0.0
-RFIXAMP      7   1            0.0
-RFIXPHA      7   1            0.0
-RFIXPER      7   1            -1.0
-ACOUNT       6   1            0.0
-CUTOFF       6   1            9999.0
-PFLAG        5   1            -1.0
-NEWRES       6   1            0.0
-OSHIFT       6   1            0.0
-BSCAN        5   1            0.0
-ESCAN        5   1            0.0
-BDROP        5   1            0.0
-EDROP        5   1            0.0
-FACT         4   1            0.0
-YMIN         4   1            -9999.0
-YINCR        5   1            1.0
-CLIPMIN      7   1            -9999.0
-CLIPMAX      7   1            9999.0
-VRMS         4   1            0.0
-CALVAL       6   1            0.0
-BMOMENT      7   1            0.0
-EMOMENT      7   1            0.0
-ASHIFT       6   1            0.0
-WEIGHT       6   1            0.0
-BBASE        5   1            50.0
-EBASE        5   1            50.0
-XMINP        5   1            0.0
-XMAXP        5   1            0.0
-XLOGP        5   1            -1.0
-YMINP        5   1            0.0
-YMAXP        5   1            0.0
-YLOGP        5   1            -1.0
-CROSSFLG     8   1            11111.
-DEFMODE      7   1            -1.0
-C-
-C-		Make sure following are properly initialized in ARAINIT
-C-
-CCLICK       6   1            0.0                INFINITY
-TCLICK       6   1            0.0                INFINITY
-VCLICK       6   1            0.0                INFINITY
-FCLICK       6   1            0.0                INFINITY
-MCLICK       6   1            0.0                INFINITY
-XCLICK       6   1            0.0                INFINITY
-YCLICK       6   1            0.0                INFINITY
-C-
-X_MIN        5   1            0.0                INFINITY
-X_MAX        5   1            0.0                INFINITY
-Y_MIN        5   1            0.0                INFINITY
-Y_MAX        5   1            0.0                INFINITY
-SCAN_MIN     8   1            0.0                INFINITY
-SCAN_MAX     8   1            0.0                INFINITY
-FEED_MIN     8   1            0.0                INFINITY
-FEED_MAX     8   1            0.0                INFINITY
-LST_MIN      7   1            0.0                INFINITY
-LST_MAX      7   1            0.0                INFINITY
-UT_MIN       6   1            0.0                INFINITY
-UT_MAX       6   1            0.0                INFINITY
-F_MIN        5   1            0.0                INFINITY
-F_MAX        5   1            0.0                INFINITY
-RATE_MIN     8   1            0.0                INFINITY
-RATE_MAX     8   1            0.0                INFINITY
-BW_MIN       6   1            0.0                INFINITY
-BW_MAX       6   1            0.0                INFINITY
-IT_MIN       6   1            0.0                INFINITY
-IT_MAX       6   1            0.0                INFINITY
-S_SORT       6   1            0.0
-TYPETIP      7   1            0.0
-ETA          3   1            0.84
-TAU0         4   1            0.0
-FTM          3   1            0.95
-FTSBR        5   1            0.95
-TRCVR        5   1            0.0
-ETAFREE      7   1            0.0
-TVANE        5   1            -1.0
-ERRCODE      7   1            0.0
-SPROTECT     8   1            1.0
-KPROTECT     8   1            1.0
-DCPCT        5   1            10.
-MDBOX        5   1            11.
-MXMIN        5   1            0.0
-MXMAX        5   1            0.0
-MYMIN        5   1            0.0
-MYMAX        5   1            0.0
-N_N          3   1            0.0
-DEFAULT      7   8            0.0
-C-
-C-                                  STRING ADVERBS
-C-		Make sure these are properly initialized in ARAINIT
-HTITLE       6   7    1       8.0
-XTITLE       6   7    1       4.0
-YTITLE       6   7    1       4.0
-S_OBJECT     8   7    1       4.0
-S_MODE       6   7    1       1.0
-PROMPT       6   7    1       2.0
-C-
-C-                                  ARRAY ADVERBS
-C-		Make sure these are properly initialized in ARAINIT
-SIZE         4   2    1       2.0                 0.0
-NREGION      7   2    1       32.0                0.0 
-GREGION      7   2    1       48.0                0.0
-VMARK        5   2    1       12.0               -999999.
-CMARK        5   2    1       12.0               -999999.
-FMARK        5   2    1       12.0               -999999.
-TMARK        5   2    1       12.0               -999999.
-CENTER       6   2    1       24.0                0.0
-HEIGHT       6   2    1       24.0                0.0
-HWIDTH       6   2    1       24.0                0.0
-CNTERR       6   2    1       24.0                0.0
-HGHTERR      7   2    1       24.0                0.0
-HWERR        5   2    1       24.0                0.0
-SMWGT        5   2    1       12.0                0.0
-BADPT        5   2    1       12.0                0.0
-GMFRAC       6   2    1       5.0                 0.0
-GOUT         4   2    2       6.0       5.0       0.0
-MLIMS        5   2    2       2.0       5.0      INFINITY
-LEVS         4   2    1       32.0               -999999.
-FLEVS        5   2    1       32.0               -999999.
-BPARM        5   2    1       15.0                0.0
-STATUS       6   2    1       32.0                0.0
-CONLINE      7   2    1       32.0                0.0
-CLUT         4   2    2        3.0     32.0      -16.0
-C-
-C-				Protected Adverbs, unlike the other 
-C-				protected adverbs below, these are
-C-				used, and occaisionally set, in the
-C-				program itself.   They are protected to
-C-				prevent the user from altering them
-C-
-FB_VER       6   8           -1.0
-HC_VER       6   8           -1.0
-CON_VER      7   8           -1.0
-C-
-C-				Protected ADVERBS -- Header wpords
-C-				Class One
-HEADLEN      7   8            5.0
-DATALEN      7   8            6.0
-SCAN         4   8            7.0
-OBSID        5   8            8.0
-OBSERVER     8   8            9.0
-TELESCOP     8   8           11.0
-PROJID       6   8           12.0
-OBJECT       6   8           13.0
-OBSMODE      7   8           15.0
-FRONTEND     8   8           16.0
-BACKEND      7   8           17.0
-PRECIS       6   8           18.0
-SAVENUM      7   8           19.0
-NORECORD     8   8           20.0
-RECORDID     8   8           21.0
-C-                      	Class Two
-XPOINT       6   8           30.0
-YPOINT       6   8           31.0
-UXPNT        5   8           32.0
-UYPNT        5   8           33.0
-PTCON        5   8           34.0
-ORIENT       6   8           38.0
-FOCUSR       6   8           39.0
-FOCUSV       6   8           40.0
-FOCUSH       6   8           41.0
-PT_MODEL     8   8           42.0
-C-                      	Class Three
-UTDATE       6   8           55.0
-UT           2   8           56.0
-LST          3   8           57.0
-NORCHAN      7   8           58.0
-NOSWVAR      7   8           59.0
-NOPHASE      7   8           60.0
-CYCLLEN      7   8           61.0
-SAMPRAT      7   8           62.0
-CL11TYPE     8   8           63.0
-PHASEID      7   8           64.0
-C-                      	Class Four
-EPOCH        5   8           80.0
-XSOURCE      7   8           81.0
-YSOURCE      7   8           82.0
-XREF         4   8           83.0
-YREF         4   8           84.0
-EPOCRA       6   8           85.0
-EPOCDEC      7   8           86.0
-GALLONG      7   8           87.0
-GALLAT       6   8           88.0
-AZ           2   8           89.0
-EL           2   8           90.0
-INDX         4   8           91.0
-INDY         4   8           92.0
-DESORG       6   8           93.0
-COORDCD      7   8           96.0
-C-                      	Class Five
-TAMB         4   8           105.0
-PRESSURE     8   8           106.0
-HUMIDITY     8   8           107.0
-REFRAC       6   8           108.0
-DEWPT        5   8           109.0
-MMH2O        5   8           110.0
-C-                       	Class Six
-SCANANG      7   8           130.0
-XZERO        5   8           131.0
-YZERO        5   8           132.0
-DELTAXR      7   8           133.0
-DELTAYR      7   8           134.0
-NOPTS        5   8           135.0
-NOXPTS       6   8           136.0
-NOYPTS       6   8           137.0
-XCELL0       6   8           138.0
-YCELL0       6   8           139.0
-FRAME        5   8           140.0
-C-                      	Class Seven
-BFWHM        5   8           155.0
-OFFSCAN      7   8           156.0
-BADCHV       6   8           157.0
-RVSYS        5   8           158.0
-VELOCITY     8   8           159.0
-VELDEF       6   8           160.0
-TYPECAL      7   8           161.0
-C-                       	Class Eight
-APPEFF       6   8           180.0
-BEAMEFF      7   8           181.0
-ANTGAIN      7   8           182.0
-ETAL         4   8           183.0
-ETAFSS       6   8           184.0
-C-                       	Class Nine - 12 M
-SYNFREQ      7   8           205.0
-LOFACT       6   8           206.0
-HARMONIC     8   8           207.0
-LOIF         4   8           208.0
-FIRSTIF      7   8           209.0
-RAZOFF       6   8           210.0
-RELOFF       6   8           211.0
-BMTHROW      7   8           212.0
-BMORENT      7   8           213.0
-BASEOFF      7   8           214.0
-OBSTOL       6   8           215.0
-SIDEBAND     8   8           216.0
-WL           2   8           217.0
-GAINS        5   8           218.0
-PBEAM        5   8           219.0
-MBEAM        5   8           221.0
-SROFF        5   8           223.0
-FOFFSIG      7   8           227.0
-FOFFREF1     8   8           228.0
-FOFFREF2     8   8           229.0
-C-                       	Class Nine - Green Bank
-L1           2   8           205.0
-L1F1         4   8           206.0
-L1F2         4   8           207.0
-L2           2   8           208.0
-L2F1         4   8           209.0
-L2F2         4   8           210.0
-LA           2   8           211.0
-LB           2   8           212.0
-LC           2   8           213.0
-LD           2   8           214.0
-LEVCORR      7   8           215.0
-PTFUDGE      7   8           216.0
-RHO          3   8           218.0
-THETA        5   8           219.0
-CFFORM       6   8           220.0
-C-                       	Class Ten
-OPENPAR      7   8           230.0
-C-		 		Class Eleven - ORIG
-VARVAL       6   8           255.0
-VARDES       6   8           256.0
-PHASTB       6   8           257.0
-C-				Class Eleven - PROTO
-NOSWVARF     8   8           255.0
-NUMCYC       6   8           256.0
-NUMCYCF      7   8           257.0
-NOPHASEF     8   8           258.0
-CYCLLENF     8   8           259.0
-SAMPTIMF     8   8           260.0
-VARVAL01     8   8           261.0
-VARDES01     8   8           262.0
-PHASTB01     8   8           263.0
-VARVAL02     8   8           267.0
-VARDES02     8   8           268.0
-PHASTB02     8   8           269.0
-VARVAL03     8   8           273.0
-VARDES03     8   8           274.0
-PHASTB03     8   8           275.0
-VARVAL04     8   8           279.0
-VARDES04     8   8           280.0
-PHASTB04     8   8           281.0
-VARVAL05     8   8           285.0
-VARDES05     8   8           286.0
-PHASTB05     8   8           287.0
-VARVAL06     8   8           291.0
-VARDES06     8   8           292.0
-PHASTB06     8   8           293.0
-VARVAL07     8   8           297.0
-VARDES07     8   8           298.0
-PHASTB07     8   8           299.0
-VARVAL08     8   8           303.0
-VARDES08     8   8           304.0
-PHASTB08     8   8           305.0
-VARVAL09     8   8           309.0
-VARDES09     8   8           310.0
-PHASTB09     8   8           311.0
-VARVAL10     8   8           315.0
-VARDES10     8   8           316.0
-PHASTB10     8   8           317.0
-C-                       	Class Twelve
-OBSFREQ      7   8           321.0
-RESTFREQ     8   8           322.0
-FREQRES      7   8           323.0
-BW           2   8           324.0
-TRX          3   8           325.0
-TCAL         4   8           326.0
-STSYS        5   8           327.0
-RTSYS        5   8           328.0
-TSOURCE      7   8           329.0
-TRMS         4   8           330.0
-REFPT        5   8           331.0
-X0           2   8           332.0
-DELTAX       6   8           333.0
-INTTIME      7   8           334.0
-NOINT        5   8           335.0
-SPN          3   8           336.0
-TAUH2O       6   8           337.0
-TH2O         4   8           338.0
-TAUO2        5   8           339.0
-TO2          3   8           340.0
-POLARIZ      7   8           341.0
-EFFINT       6   8           342.0
-RX_INFO      7   8           343.0
-C-                        	Class Thirteen
-NOSTAC       6   8           346.0
-FSCAN        5   8           347.0
-LSCAN        5   8           348.0
-LAMP         4   8           349.0
-LWID         4   8           350.0
-ILI          3   8           351.0
-DRMS         4   8           352.0
-C-			Protected Adverbs -- Matrix header
-MNAXIS1      7   8            1.0
-MNAXIS2      7   8            2.0
-MRVAL1       6   8            3.0
-MRVAL2       6   8            4.0
-MDELT1       6   8            5.0
-MDELT2       6   8            6.0
-MPIX1        5   8            7.0
-MPIX2        5   8            8.0
-MUNDEF       6   8            9.0
-MEQUINOX     8   8           10.0
-MTYPE1       6   8           20.0
-MTYPE2       6   8           21.0
-MBUNIT       6   8           22.0
-MOBJECT      7   8           23.0
-MORIGIN      7   8           25.0
-MDATE        5   8           26.0
-MCOMMENT     8   8           27.0
-C-			Protected Adverbs -- Cube header
-CNAXIS1      7   8            1.0
-CNAXIS2      7   8            2.0
-CRVAL1       6   8            3.0
-CRVAL2       6   8            4.0
-CDELT1       6   8            5.0
-CDELT2       6   8            6.0
-CPIX1        5   8            7.0
-CPIX2        5   8            8.0
-CUNDEF       6   8            9.0
-CNAXIS3      7   8           10.0
-CRVAL3       6   8           11.0
-CDELT3       6   8           12.0
-CPIX3        5   8           13.0
-CTMIN        5   8           14.0
-CTMAX        5   8           15.0
-CTSCALE      7   8           16.0
-CTZERO       6   8           17.0
-CEQUINOX     8   8           18.0
-CTYPE1       6   8           20.0
-CTYPE2       6   8           21.0
-CBUNIT       6   8           22.0
-COBJECT      7   8           23.0
-CORIGIN      7   8           25.0
-CDATE        5   8           26.0
-CTYPE3       6   8           27.0
-CCOMMENT     8   8           28.0
-C-       		Protected Adverbs -- Others
-C-			This order should match that used by FILES
-DSCANS       6   8            1.0
-KSCANS       6   8            2.0
-SSCANS       6   8            3.0
-GSCANS       6   8            4.0
-RSCANS       6   8            5.0
-PRINTFILE    9   8           11.0
-LOGFILE      7   8           12.0
-C-			These must continue where the last left off
-ACCMD        5   8           13.0
-STACK        5   8           14.0
-DISK         4   8           15.0
-OFFDATA      7   8           16.0
-ONDATA       6   8           17.0
-INFO         4   8           18.0
-STAT         4   8           19.0
-C-			these are for use with the chngonline verb
-HCTYPE       6   8            1.0
-FBTYPE       6   8            2.0
-CONTYPE      7   8            3.0
-C-
-C-			these are for use with FOPEN
-RW           2   8            0.0
-WO           2   8            1.0
-RO           2   8            2.0
-REW          3   8            0.0
-EOF          3   8           10.0
-UNK          3   8            0.0
-OLD          3   8           100.0
-NEW          3   8           200.0
-SCR          3   8           300.0
-C-
-C-                      These are for use with SAXIS (cont and line)
-SAMPLE       6   8             1.0
-TIMEOFF      7   8             2.0
-POS_OFF      7   8             3.0
-POSXOFF      7   8             4.0
-POSYOFF      7   8             5.0
-POSX         4   8             6.0
-POSY         4   8             7.0
-TIMELST      7   8             8.0
-TIMEUT       6   8             9.0
-C-
-CHANNEL      7   8             1.0
-FREQOFF      7   8             2.0
-VELHEAD      7   8             3.0
-VELRADI      7   8             4.0
-VELOPTI      7   8             5.0
-VELRELT      7   8             6.0
-VELLINR      7   8             7.0
-FREQRST      7   8             8.0
-FREQSKY      7   8             9.0
-FREQIRST     8   8            10.0
-FREQISKY     8   8            11.0
-C-
-QUIT         4   6
diff -uNr 3.5/sunbin/Makefile unipops-3.6/sunbin/Makefile
--- 3.5/sunbin/Makefile	2000-03-24 12:10:12.000000000 -0700
+++ unipops-3.6/sunbin/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -1,905 +0,0 @@
-# Makefile: For creating line, condar, or genmemory
-# @(#)Makefile	5.11 03/24/00
-#
-# Instructions:
-# To add a new routine, add name of .o file to the apllicable macros 
-# For example, if the routine, 'au5.f' is in the 'direct' directory and
-# uses the 'junk.inc' include file, then add '$(DIRECT)au5.o' to the
-# DIRECTOBJ and JUNKINC macros.  If no include files are used, do not
-# add anything to the 'include' macros.
-#
-# To remove a routine, delete all references to the routines .o file
-# For example, if you have removed 'au5.f', delete all entries in all
-# macros which refer to 'au5.o'
-#
-# To rename a routine, change all references to the .o files to the files
-# new name. (For example, if oldname.f is changed to newname.f, change
-# all 'oldname.o' to 'newname.o' in this file.
-#
-# To move a routine to a new directory, first follow the above instructions
-# for removing a routine and then follow the steps for adding a new routine.
-#
-# To add a new directory, create a macro whose name is that of the directory
-# and whose 'value' is the path to the directory (use, if applicable, 
-# $(popsdir) as the root directory for all of the pops source code).  Add
-# another macro whose name is that directory with OBJ added at the end and
-# whose valus is a list of .o files which are to be in that directory.  Add
-# any neccessary dependencies to the line.exe, condar.exe, etc. target lines.
-# Also add the appropriate line to the 'clean' target line.
-# For example, if the directory is named 'direct', is a subdirectory of
-# the $(direct9) directory, contains the files au51.f, au52.f, and is needed 
-# by the program 'test.exe', then the two macros would be: 
-# DIRECT = $(direct9)direct
-# DIRECTOBJ = $(DIRECT)au51.o $(DIRECT)au52.o
-# and the target dependency line should look like:
-# test.exe: $(DIRECTOBJ) .... plus any other directories
-# You would then add <tab> -rm -r $(DIRECTOBJ) to the 'clean' target.
-# Of course, you may need to do more work if au51.f or au52.f use
-# include files.
-#
-# To remove a directory, delete the two appropriate macros and the references
-# to these macros on the target/dependency files throughout the file
-#
-# To rename a directory, change all references to the old name throughtout the 
-# file to the new names.
-#
-# To add a new include file, add a macro whose name is that of the include
-# file and whose value is that of the .o files which depend upon that include
-# file.  Then add a new target whose name is that of the macro and whose
-# dependency is the name of the include file.  (For example, if the include
-# file is called 'ddd.inc' and is located in the $(INCLUDES) directory and the
-# routines junk1.c and junk2.c, located in the 'direct1' directory, depend 
-# upon that include file, then the macro would look like:
-# DDDINC = $(DIRECT1)junk1.o $(DIRECT1)junk2.o
-# and the target/dependency line would be:
-# $(DDINC): $(INCLUDES)ddd.inc
-#
-# To remove an include file, delete its macro and its target/dependency line
-# in the makefile.  Make sure that all source modules know about the changes
-# in the include file.
-#
-# To change the name of an include file, make sure all source modules know
-# about the change, and then change the name of the macro for the include
-# file and change the target/dependency line throughout this file.
-#
-# If a routine no longer needs an include file, remove the reference to 
-# the routine's .o file in the include file's macro.
-#
-# If a routine needs an include file, either because of changes you have
-# made to the routine or because the routine is a new one, add the 
-# routine's .o file to the include's macro.
-#
-# If you want to add a new execuatble to be created by make, add the name
-# of the executable to the BINLIST macro, and add a new target/dependency
-# using the rest of the target/dependency lines as examples.
-#
-# If you want to remove an executable, delete its entry in the BINLIST macro
-# and remove its target/dependency lines
-#
-# If you want to rename an executable, change all references to the executable
-# throughout the file to its new name.
-#
-#--------------------------------------------------------------
-# Macro definitions:
-# 
-#--------------------------------------------------------------
-CCMP = cc
-FCMP = f77
-CC = @cd $(@D); echo $@; $(CCMP)
-FC = @cd $(@D); $(FCMP)
-F77VS = VS1_4
-ARCH = `uname -m`
-SUNOS = 
-VDATE = `date '+%y%m%d'`
-#	for non-test versions after version 3.0: VERSION = version/1000.
-#       where version is the version number, i.e. 3.1
-#       for example: version 3.1 will have VERSION = 0.0031
-VERSION = $(VDATE).
-#	Control which, if any, window related stuff is compiled or cleaned
-USEX = TRUE
-USESUNVIEW = TRUE
-CDEBOROPT = -g
-FDEBOROPT = -g
-FLOATOPT = 
-LIBCORE = /usr/old/libcore77.a /usr/old/libcore.a
-FILLIB = /usr/lang/SC1.0/libm.il
-CILLIB = /usr/lib/libm.il
-FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(FILLIB) -D$(F77VS)
-CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CILLIB) -D$(F77VS) $(SUNOS)
-FFLAGS = -Nn1500 -i2 -DI2ON -u $(FFLOAT) -D$(ARCH)
-#	remove the -DI2ON if your remove the -i2 flag
-CFLAGS = $(CFLOAT) -I$(INCLUDES) -I$(TUCANINCS) -D$(ARCH) -DUSEPAD
-USEHACK =
-LFLAGS = $(FFLOAT)
-LLIBS  = -lm
-FLLIBS  = $(LLIBS)
-XHOME = $OPENWINHOME
-EXTRAXLIBS = -lXext
-XLIBS = -L${XHOME}/lib  -lX11 ${EXTRAXLIBS}
-XINCS = ${XHOME}/include
-AR = /usr/5bin/ar
-CPP = /lib/cpp
-# Macros which define compilation and linking parameters
-# Note redefinition of FC and CC.  
-# FDEBOROPT (debug or optimize flag for fortran) = 'g' as a default for 
-# using the debugger (reset for optimization using command line substitution).
-# CDEBOROPT (debug or optimize flag for c) = 'g' as a default for 
-# using the debugger (reset for optimization using command line substitution).
-LOCALMAILLIST =
-# used in constructing comments.exe
-# this is best set in makelocal rather than here.
-#
-#---------------------------------------------------------------
-INCLUDES = $(popsdir)includes/
-SOURCE = $(popsdir)source/
-CONLINE = $(SOURCE)conline/
-LINE = $(CONLINE)line/
-CONDAR = $(CONLINE)condar/
-DISK = $(CONLINE)disk/
-GENMEMORY = $(SOURCE)genmemory/
-ANAL = $(popsdir)source/conline/gb/
-TUCANAL = $(popsdir)source/conline/tuc/
-CVANAL = $(popsdir)source/conline/cv/
-TUCANINCS = $(INCLUDES)tuc/
-GBANINCS = $(INCLUDES)gb/
-MAC2 =
-# Macros which define directories containing source code 
-# popsdir = external shell script variable and gives the home directory
-#	of the source code directory
-#
-#-----------------------------------------------------------------
-ANALOBJO = $(MAC2)access_2.o $(MAC2)heapsort.o \
-	   $(MAC2)modcomp.o $(MAC2)cvtmoddbl.o \
-	   $(MAC2)cvtmodflt.o $(MAC2)lconvert.o $(MAC2)unpadraz.o
-ANALOBJR = $(ANAL)data_client.o
-TUCANALOBJ = $(TUCANAL)access.o $(TUCANAL)getincbs.o $(TUCANAL)getinit.o \
-	     $(TUCANAL)incrindex.o $(TUCANAL)initfile.o \
-	     $(TUCANAL)olfiles.o $(TUCANAL)verslist.o
-CVANALOBJ = $(CVANAL)access.o
-SOURCEOBJ = $(SOURCE)amathparser.o $(SOURCE)bclean.o $(SOURCE)closms.o \
-	    $(SOURCE)compil.o $(SOURCE)copy.o $(SOURCE)copy2.o $(SOURCE)cread.o \
-	    $(SOURCE)cwrite.o $(SOURCE)editor.o $(SOURCE)fill.o \
-	    $(SOURCE)finish.o $(SOURCE)fshort.o $(SOURCE)getfld.o \
-	    $(SOURCE)getnum.o $(SOURCE)gtbyte.o $(SOURCE)hunt.o \
-	    $(SOURCE)iinitp.o $(SOURCE)inquirefile.o $(SOURCE)iounits.o \
-	    $(SOURCE)irealp.o $(SOURCE)iwpc.o $(SOURCE)iwpr.o \
-	    $(SOURCE)kdump.o $(SOURCE)kpack.o $(SOURCE)lastblnk.o \
-	    $(SOURCE)llocat.o $(SOURCE)ltstor.o $(SOURCE)memusage.o \
-	    $(SOURCE)mhunt.o $(SOURCE)oerror2.o $(SOURCE)opened.o \
-	    $(SOURCE)openms.o $(SOURCE)polish.o $(SOURCE)pop.o \
-	    $(SOURCE)prompt.o $(SOURCE)pseudo.o $(SOURCE)ptbyte.o \
-	    $(SOURCE)push.o $(SOURCE)pushcmp.o $(SOURCE)readms.o \
-	    $(SOURCE)relink.o $(SOURCE)settyp.o $(SOURCE)symbol.o \
-	    $(SOURCE)unpack.o $(SOURCE)writms.o $(SOURCE)ieeestuff.o 
-CNLOBJ = $(CONLINE)apch.o $(CONLINE)apfs.o $(CONLINE)assgn.o \
-	 $(CONLINE)batch.o $(CONLINE)box.o $(CONLINE)bshape.o \
-	 $(CONLINE)changeproj.o $(CONLINE)charsize.o \
-	 $(CONLINE)checkfperror.o $(CONLINE)chngfile.o \
-	 $(CONLINE)cleanup.o $(CONLINE)clrpage.o $(CONLINE)cmprsstrng.o \
-	 $(CONLINE)cnps.o $(CONLINE)color.o $(CONLINE)compar.o \
-	 $(CONLINE)compress.o $(CONLINE)corebox.o \
-	 $(CONLINE)coreclose.o $(CONLINE)coreclrpage.o \
-	 $(CONLINE)corecolor.o \
-	 $(CONLINE)corecursor.o $(CONLINE)coredither.o \
-	 $(CONLINE)coreflush.o $(CONLINE)coreint.o \
-	 $(CONLINE)coreplace.o $(CONLINE)corevctr.o \
-	 $(CONLINE)ctrlcintr.o $(CONLINE)cursor.o $(CONLINE)dither.o \
-	 $(CONLINE)donemenu.o $(CONLINE)exitpops.o $(CONLINE)files.o \
-	 $(CONLINE)fcioget.o $(CONLINE)filecomp.o $(CONLINE)fitsdates.o \
-	 $(CONLINE)fphandler.o $(CONLINE)gcopy.o \
-	 $(CONLINE)genop.o $(CONLINE)getformat.o $(CONLINE)getprel.o \
-	 $(CONLINE)gpclose.o $(CONLINE)gpflush.o $(CONLINE)gphint.o \
-	 $(CONLINE)gtline.o $(CONLINE)helps.o \
-	 $(CONLINE)hphardplace.o \
-	 $(CONLINE)hphardtcopy.o $(CONLINE)ilct.o $(CONLINE)initcio.o \
-	 $(CONLINE)initcomm.o $(CONLINE)initfiles.o \
-	 $(CONLINE)initfperror.o $(CONLINE)initlock.o \
-	 $(CONLINE)initlog.o $(CONLINE)initmess.o \
-	 $(CONLINE)initonline.o $(CONLINE)initsetup.o \
-	 $(CONLINE)inrange.o $(CONLINE)interp.o $(CONLINE)main.o \
-	 $(CONLINE)massgn.o $(CONLINE)menus.o \
-	 $(CONLINE)modefn.o $(CONLINE)move2.o \
-	 $(CONLINE)nextfield.o $(CONLINE)noghard.o $(CONLINE)nogint.o \
-	 $(CONLINE)oerror.o $(CONLINE)otherbox.o $(CONLINE)packer.o \
-	 $(CONLINE)pchar.o $(CONLINE)pfixchar.o $(CONLINE)place.o \
-	 $(CONLINE)posthplace.o $(CONLINE)posthtcopy.o \
-	 $(CONLINE)posthvctr.o $(CONLINE)pread.o $(CONLINE)pread2.o \
-	 $(CONLINE)putchar.o $(CONLINE)pwrite.o $(CONLINE)qcomp.o \
-	 $(CONLINE)qmshardplace.o $(CONLINE)qmshardtcopy.o \
-	 $(CONLINE)qmshardvctr.o  $(CONLINE)posthcolor.o $(CONLINE)posthbox.o \
-	 $(CONLINE)quichardplace.o $(CONLINE)quichardtcopy.o \
-	 $(CONLINE)quichardvctr.o $(CONLINE)quick.o $(CONLINE)rdrm.o \
-	 $(CONLINE)recover.o $(CONLINE)rn1.o $(CONLINE)rns.o $(CONLINE)rns8.o \
-	 $(CONLINE)runtag.o $(CONLINE)scal.o $(CONLINE)setdefaults.o \
-	 $(CONLINE)setflags.o $(CONLINE)shm_graph.o \
-	 $(CONLINE)smooth.o $(CONLINE)stores.o $(CONLINE)subs.o \
-	 $(CONLINE)tcopy.o $(CONLINE)tekclrpage.o \
-	 $(CONLINE)tekcursor.o $(CONLINE)tekchar.o \
-	 $(CONLINE)tekint.o $(CONLINE)tekplace.o $(CONLINE)tekvctr.o \
-	 $(CONLINE)tickmrk.o $(CONLINE)udat.o $(CONLINE)undo.o \
-	 $(CONLINE)unused.o $(CONLINE)upack.o $(CONLINE)updatehist.o \
-	 $(CONLINE)updateline.o $(CONLINE)uppercase.o \
-	 $(CONLINE)v102clrpage.o $(CONLINE)funclev.o \
-	 $(CONLINE)v102cursor.o \
-	 $(CONLINE)v102int.o $(CONLINE)v102place.o \
-	 $(CONLINE)v102vctr.o $(CONLINE)vctr.o \
-	 $(CONLINE)verbs.o $(CONLINE)yscale.o $(CONLINE)zwait.o \
-	 $(CONLINE)sread.o $(CONLINE)fptfmt.o  $(CONLINE)history.o \
-	 $(CONLINE)lfit.o $(CONLINE)str4cur.o $(CONLINE)autolev.o \
-	 $(CONLINE)execpol.o $(CONLINE)execcomp.o $(CONLINE)zignal.o
-DISKOBJ = $(DISK)getascan.o $(DISK)getbs.o \
-	  $(DISK)getnindex.o $(DISK)getsddbs.o $(DISK)getslist.o \
-	  $(DISK)filefns.o $(DISK)makesindex.o $(DISK)saveascan.o \
-	  $(DISK)scanloc.o $(DISK)sddclose.o \
-	  $(DISK)sddopen.o $(DISK)getarec.o $(DISK)getsddscan.o \
-	  $(DISK)getnsddindex.o $(DISK)getsddscanlist.o
-LINEOBJ = $(LINE)accums.o $(LINE)au1.o $(LINE)au2.o $(LINE)au3.o \
-	  $(LINE)au4.o $(LINE)au5.o $(LINE)au6.o $(LINE)au7.o \
-	  $(LINE)au8.o $(LINE)au9.o $(LINE)aua.o \
-	  $(LINE)chantovel.o $(LINE)cheader.o $(LINE)checkbyloc.o \
-	  $(LINE)chgres.o $(LINE)chngol.o $(LINE)chngver.o \
-          $(LINE)conversion2.o $(LINE)conversion3.o \
-	  $(LINE)craz.o $(LINE)cube.o $(LINE)dft.o \
-	  $(LINE)drawcntr.o $(LINE)fft.o $(LINE)funct.o \
-	  $(LINE)funfunct.o $(LINE)getbyloc.o $(LINE)getbynum.o \
-	  $(LINE)getcurrent.o $(LINE)getlist.o $(LINE)getscan.o \
-	  $(LINE)gget.o $(LINE)gmeasure.o $(LINE)gnextindex.o \
-	  $(LINE)gprep.o $(LINE)header.o $(LINE)hlftne.o \
-	  $(LINE)initappl.o $(LINE)itfits.o $(LINE)jdtodate.o \
-	  $(LINE)laub.o $(LINE)lchkdate.o $(LINE)gbrecio.o \
-	  $(LINE)linetype.o \
-	  $(LINE)mfill.o $(LINE)mheader.o $(LINE)minit.o \
-	  $(LINE)mlabel.o $(LINE)mraz.o $(LINE)mread.o $(LINE)msmooth.o \
-	  $(LINE)msmoth2.o $(LINE)mtable.o $(LINE)mwrite.o \
-	  $(LINE)lpdoc.o $(LINE)plot.o $(LINE)pltdots.o \
-	  $(LINE)posstring.o $(LINE)prep.o $(LINE)progname.o \
-	  $(LINE)raster.o $(LINE)raz.o $(LINE)readcube.o \
-	  $(LINE)rotate.o $(LINE)rshape2.o $(LINE)savebyloc.o \
-	  $(LINE)savebynum.o $(LINE)sddcopy.o $(LINE)select.o \
-	  $(LINE)setunits.o $(LINE)show.o $(LINE)slice.o \
-	  $(LINE)splinecf.o $(LINE)summary.o $(LINE)table.o \
-	  $(LINE)tellout.o $(LINE)tells.o $(LINE)tracer.o \
-	  $(LINE)veltochan.o $(LINE)zerror.o \
-	  $(LINE)zlimit.o $(LINE)xtochan.o $(LINE)chantox.o $(LINE)fgauss.o \
-	  $(LINE)mrqmin.o $(LINE)virfft.o $(LINE)window.o $(LINE)fitfoc.o \
-	  $(LINE)tellstat.o $(LINE)getir.o $(LINE)getbyrec.o $(LINE)getotf.o \
-	  $(LINE)getpolz.o
-CONOBJ = $(CONDAR)accums.o $(CONDAR)au1.o $(CONDAR)au2.o \
-	 $(CONDAR)au3.o $(CONDAR)au4.o $(CONDAR)au5.o $(CONDAR)au6.o \
-	 $(CONDAR)au7.o $(CONDAR)au8.o $(CONDAR)au9.o $(CONDAR)aua.o \
-	 $(CONDAR)caub.o $(CONDAR)cheader.o \
-	 $(CONDAR)checkbyloc.o $(CONDAR)chgres.o $(CONDAR)chngol.o \
-         $(CONDAR)chngver.o $(CONDAR)conversion2.o \
-	 $(CONDAR)conversion3.o $(CONDAR)craz.o \
-	 $(CONDAR)cube.o $(CONDAR)curfit.o $(CONDAR)dft.o \
-	 $(CONDAR)drawcntr.o $(CONDAR)fchisq.o $(CONDAR)fderiv.o \
-	 $(CONDAR)fft.o $(CONDAR)funct.o \
-	 $(CONDAR)functn.o $(CONDAR)funfunct.o $(CONDAR)gbmean.o \
-	 $(CONDAR)getbyloc.o $(CONDAR)getbynum.o $(CONDAR)getcurrent.o \
-	 $(CONDAR)getlist.o $(CONDAR)getscan.o $(CONDAR)gget.o \
-	 $(CONDAR)gnextindex.o $(CONDAR)gprep.o $(CONDAR)header.o \
-	 $(CONDAR)hlftne.o $(CONDAR)initappl.o $(CONDAR)itfits.o \
-	 $(CONDAR)jdtodate.o $(CONDAR)lchkdate.o \
-	 $(CONDAR)linetype.o $(CONDAR)matinv.o \
-	 $(CONDAR)mean.o $(CONDAR)mfill.o $(CONDAR)mheader.o \
-	 $(CONDAR)minit.o $(CONDAR)mlabel.o $(CONDAR)mraz.o \
-	 $(CONDAR)mread.o $(CONDAR)msmooth.o $(CONDAR)msmoth2.o \
-	 $(CONDAR)mtable.o $(CONDAR)mwrite.o $(CONDAR)cpdoc.o \
-	 $(CONDAR)plot.o $(CONDAR)pltdots.o $(CONDAR)posstring.o \
-	 $(CONDAR)prep.o $(CONDAR)progname.o $(CONDAR)raster.o \
-	 $(CONDAR)raz.o $(CONDAR)readcube.o $(CONDAR)rotate.o \
-	 $(CONDAR)rshape2.o $(CONDAR)rt.o $(CONDAR)savebyloc.o \
-	 $(CONDAR)savebynum.o $(CONDAR)sddcopy.o $(CONDAR)select.o \
-	 $(CONDAR)setunits.o $(CONDAR)show.o $(CONDAR)slice.o \
-	 $(CONDAR)solve.o $(CONDAR)splinecf.o $(CONDAR)summary.o \
-	 $(CONDAR)table.o $(CONDAR)tellout.o $(CONDAR)tells.o \
-	 $(CONDAR)tipslv.o $(CONDAR)tracer.o \
-	 $(CONDAR)vsntip.o $(CONDAR)zerror.o $(CONDAR)zlimit.o \
-	 $(CONDAR)xtochan.o $(CONDAR)chantox.o $(CONDAR)fgauss.o \
-	 $(CONDAR)mrqmin.o $(CONDAR)virfft.o $(CONDAR)window.o \
-	 $(CONDAR)fitfoc.o $(CONDAR)tellstat.o $(CONDAR)gbrecio.o
-GENOBJ = $(GENMEMORY)arainit.o $(GENMEMORY)cre8ms.o \
-	 $(GENMEMORY)gendummy.o $(GENMEMORY)generrors.o \
-	 $(GENMEMORY)genmain.o $(GENMEMORY)genpread.o \
-	 $(GENMEMORY)genpwrite.o $(GENMEMORY)genstores.o
-#
-# Macros which list the object files in the various subdirectories 
-#
-#----------------------------------------------------------------
-FILESH = $(DISK)getascan.o $(DISK)getbs.o \
-	 $(DISK)getnindex.o $(DISK)getsddbs.o $(DISK)getslist.o \
-	 $(DISK)filefns.o $(DISK)makesindex.o $(DISK)saveascan.o \
-	 $(DISK)scanloc.o $(DISK)sddclose.o \
-	 $(DISK)sddopen.o $(DISK)getsddscan.o $(DISK)getsddscanlist.o \
-	 $(DISK)getnsddindex.o $(TUCANAL)getincbs.o $(TUCANAL)incrindex.o \
-	 $(TUCANAL)initfile.o
-MODESH = $(CONLINE)modefn.o
-SDDH = $(CONDAR)gnextindex.o $(CONDAR)raz.o \
-	$(DISK)getbs.o $(DISK)makesindex.o $(DISK)saveascan.o \
-	$(LINE)gnextindex.o $(LINE)gbrecio.o $(LINE)raz.o \
-	$(DISK)getnindex.o $(DISK)getnsddindex.o $(TUCANAL)getincbs.o \
-	$(TUCANAL)incrindex.o $(CONDAR)gbrecio.o
-SPHDR = $(LINE)gbrecio.o $(CONDAR)gbrecio.o
-TUCACCESSH = $(TUCANAL)access.o $(TUCANAL)getinit.o \
-	     $(TUCANAL)olfiles.o $(TUCANAL)verslist.o
-AMBIGINC = $(CONLINE)oerror.o $(SOURCE)mhunt.o
-APPLINC = $(CONDAR)accums.o $(CONDAR)au1.o $(CONDAR)au2.o \
-	  $(CONDAR)au3.o $(CONDAR)au4.o $(CONDAR)au5.o $(CONDAR)au6.o \
-	  $(CONDAR)au7.o $(CONDAR)au8.o $(CONDAR)au9.o $(CONDAR)aua.o \
-	  $(CONDAR)caub.o $(CONDAR)drawcntr.o $(CONDAR)funct.o \
-	  $(CONDAR)funfunct.o $(CONDAR)getcurrent.o $(CONDAR)getscan.o \
-	  $(CONDAR)gget.o $(CONDAR)gprep.o $(CONDAR)header.o \
-	  $(CONDAR)hlftne.o $(CONDAR)initappl.o \
-	  $(CONDAR)mlabel.o $(CONDAR)cpdoc.o $(CONDAR)plot.o \
-	  $(CONDAR)pltdots.o $(CONDAR)prep.o $(CONDAR)raster.o \
-	  $(CONDAR)rshape2.o $(CONDAR)select.o $(CONDAR)show.o \
-	  $(CONDAR)table.o $(CONDAR)tells.o $(CONDAR)tracer.o \
-	  $(CONDAR)zerror.o $(CONLINE)bshape.o $(CONLINE)exitpops.o \
-	  $(CONLINE)genop.o $(CONLINE)interp.o $(CONLINE)menus.o \
-	  $(CONLINE)oerror.o $(CONLINE)pwrite.o $(CONLINE)recover.o \
-	  $(CONLINE)setflags.o $(CONLINE)undo.o $(LINE)accums.o \
-	  $(LINE)au1.o $(LINE)au2.o $(LINE)au3.o $(LINE)au4.o \
-	  $(LINE)au5.o $(LINE)au6.o $(LINE)au7.o $(LINE)au8.o \
-	  $(LINE)au9.o $(LINE)aua.o \
-	  $(LINE)drawcntr.o $(LINE)funct.o $(LINE)funfunct.o \
-	  $(LINE)getcurrent.o $(LINE)getscan.o $(LINE)gget.o \
-	  $(LINE)gmeasure.o $(LINE)gprep.o $(LINE)header.o \
-	  $(LINE)hlftne.o $(LINE)initappl.o $(LINE)laub.o \
-	  $(LINE)mlabel.o $(LINE)lpdoc.o $(LINE)plot.o \
-	  $(LINE)pltdots.o $(LINE)prep.o $(LINE)raster.o \
-	  $(LINE)rshape2.o $(LINE)select.o $(LINE)show.o \
-	  $(LINE)table.o $(LINE)tells.o $(LINE)tracer.o  $(LINE)getir.o \
-	  $(LINE)veltochan.o $(LINE)zerror.o $(LINE)virfft.o $(CONDAR)virfft.o \
-	  $(CONDAR)fitfoc.o $(LINE)fitfoc.o $(CONLINE)ctrlcintr.o \
-          $(CONLINE)str4cur.o $(LINE)getotf.o $(CONLINE)funclev.o \
-	  $(CONLINE)color.o $(LINE)getpolz.o
-CFORMINC = $(CONDAR)accums.o $(CONDAR)au1.o $(CONDAR)au2.o \
-	   $(CONDAR)au3.o $(CONDAR)au4.o $(CONDAR)au6.o $(CONDAR)au7.o \
-	   $(CONDAR)au8.o $(CONDAR)au9.o $(CONDAR)aua.o \
-	   $(CONDAR)caub.o $(CONDAR)funct.o $(CONDAR)funfunct.o \
-	   $(CONDAR)gprep.o $(CONDAR)header.o \
-	   $(CONDAR)cpdoc.o $(CONDAR)prep.o $(CONDAR)rshape2.o \
-	   $(CONDAR)savebyloc.o $(CONDAR)savebynum.o $(CONDAR)show.o \
-	   $(CONDAR)summary.o $(CONDAR)table.o $(CONDAR)tells.o \
-	   $(CONLINE)genop.o $(LINE)accums.o $(LINE)au1.o \
-	   $(LINE)au2.o $(LINE)au3.o $(LINE)au4.o $(LINE)au6.o \
-	   $(LINE)au7.o $(LINE)au8.o $(LINE)au9.o $(LINE)aua.o \
-	   $(LINE)chantovel.o $(LINE)funct.o $(LINE)funfunct.o \
-	   $(LINE)gmeasure.o $(LINE)gprep.o $(LINE)header.o \
-	   $(LINE)laub.o $(LINE)lpdoc.o $(LINE)prep.o \
-	   $(LINE)rshape2.o $(LINE)savebyloc.o $(LINE)savebynum.o \
-	   $(LINE)show.o $(LINE)summary.o $(LINE)table.o \
-	   $(LINE)tells.o $(LINE)veltochan.o \
-	   $(CONDAR)xtochan.o $(CONDAR)chantox.o \
-	   $(LINE)xtochan.o $(LINE)chantox.o \
-	   $(CONDAR)fitfoc.o $(LINE)fitfoc.o $(LINE)getir.o $(LINE)getbyrec.o \
-	   $(LINE)getotf.o $(LINE)au5.o $(CONDAR)au5.o $(LINE)getpolz.o
-CIOINC = $(CONDAR)au1.o $(CONDAR)au3.o $(CONDAR)au4.o $(CONDAR)au5.o \
-	 $(CONDAR)au6.o $(CONDAR)au7.o $(CONDAR)au9.o \
-	 $(CONDAR)cheader.o $(CONDAR)chgres.o $(CONDAR)cube.o \
-	 $(CONDAR)dft.o $(CONDAR)fft.o $(CONDAR)getcurrent.o \
-	 $(CONDAR)getscan.o $(CONDAR)gget.o $(CONDAR)minit.o \
-	 $(CONDAR)mread.o $(CONDAR)mwrite.o $(CONDAR)cpdoc.o \
-	 $(CONDAR)prep.o $(CONDAR)readcube.o \
-	 $(CONDAR)select.o $(CONDAR)show.o $(CONDAR)summary.o \
-	 $(CONDAR)tellout.o $(CONDAR)tells.o $(CONDAR)tellstat.o \
-	 $(CONLINE)assgn.o $(CONLINE)batch.o $(CONLINE)box.o \
-	 $(CONLINE)changeproj.o \
-	 $(CONLINE)checkfperror.o $(CONLINE)chngfile.o \
-	 $(CONLINE)clrpage.o $(CONLINE)color.o $(CONLINE)compress.o \
-	 $(CONLINE)coreclose.o \
-	 $(CONLINE)coreclrpage.o $(CONLINE)corecursor.o \
-	 $(CONLINE)coreflush.o $(CONLINE)coreint.o \
-	 $(CONLINE)coreplace.o $(CONLINE)corevctr.o \
-	 $(CONLINE)ctrlcintr.o $(CONLINE)cursor.o $(CONLINE)dither.o \
-	 $(CONLINE)donemenu.o $(CONLINE)exitpops.o $(CONLINE)files.o \
-	 $(CONLINE)fcioget.o $(CONLINE)filecomp.o \
-	 $(CONLINE)gcopy.o $(CONLINE)genop.o $(CONLINE)gpclose.o \
-	 $(CONLINE)gpflush.o $(CONLINE)gphint.o $(CONLINE)gtline.o \
-	 $(CONLINE)helps.o \
-	 $(CONLINE)hphardplace.o \
-	 $(CONLINE)hphardtcopy.o $(CONLINE)initcomm.o \
-	 $(CONLINE)initfiles.o $(CONLINE)initlock.o \
-	 $(CONLINE)initlog.o $(CONLINE)initmess.o \
-	 $(CONLINE)initonline.o $(CONLINE)initsetup.o \
-	 $(CONLINE)interp.o $(CONLINE)massgn.o $(CONLINE)menus.o \
-	 $(CONLINE)nextfield.o $(CONLINE)noghard.o $(CONLINE)oerror.o \
-	 $(CONLINE)otherbox.o $(CONLINE)pchar.o $(CONLINE)place.o \
-	 $(CONLINE)posthplace.o $(CONLINE)posthtcopy.o \
-	 $(CONLINE)posthvctr.o $(CONLINE)pread.o $(CONLINE)pread2.o \
-	 $(CONLINE)pwrite.o $(CONLINE)posthcolor.o $(CONLINE)posthbox.o \
-	 $(CONLINE)qmshardplace.o \
-	 $(CONLINE)qmshardtcopy.o $(CONLINE)qmshardvctr.o \
-	 $(CONLINE)quichardplace.o \
-	 $(CONLINE)quichardtcopy.o $(CONLINE)quichardvctr.o \
-	 $(CONLINE)quick.o $(CONLINE)recover.o $(CONLINE)setflags.o \
-	 $(CONLINE)stores.o $(CONLINE)subs.o $(CONLINE)tcopy.o \
-	 $(CONLINE)tekclrpage.o $(CONLINE)tekchar.o \
-	 $(CONLINE)tekcursor.o \
-	 $(CONLINE)tekplace.o $(CONLINE)tekvctr.o $(CONLINE)undo.o \
-	 $(CONLINE)updatehist.o $(CONLINE)updateline.o $(CONLINE)vctr.o \
-	 $(GENMEMORY)cre8ms.o $(GENMEMORY)genmain.o \
-	 $(GENMEMORY)genpread.o $(GENMEMORY)genpwrite.o \
-	 $(GENMEMORY)genstores.o $(LINE)au1.o $(LINE)au3.o $(LINE)au4.o \
-	 $(LINE)au5.o $(LINE)au6.o $(LINE)au7.o $(LINE)au9.o \
-	 $(LINE)cheader.o $(LINE)chgres.o $(LINE)cube.o $(LINE)dft.o \
-	 $(LINE)fft.o $(LINE)getcurrent.o $(LINE)getscan.o \
-	 $(LINE)gget.o $(LINE)minit.o $(LINE)mread.o $(LINE)mwrite.o \
-	 $(LINE)lpdoc.o $(LINE)prep.o $(LINE)readcube.o \
-	 $(LINE)select.o $(LINE)show.o $(LINE)summary.o \
-	 $(LINE)tellout.o $(LINE)tells.o $(LINE)tellstat.o \
-	 $(LINE)getir.o $(LINE)getotf.o $(LINE)getpolz.o \
-	 $(SOURCE)amathparser.o \
-	 $(SOURCE)closms.o $(SOURCE)editor.o $(SOURCE)getfld.o \
-	 $(SOURCE)memusage.o $(SOURCE)oerror2.o $(SOURCE)openms.o \
-	 $(SOURCE)pseudo.o $(SOURCE)readms.o $(SOURCE)symbol.o \
-	 $(SOURCE)writms.o $(LINE)funct.o $(CONDAR)funct.o $(CONLINE)sread.o \
-	 $(CONLINE)history.o $(LINE)chngol.o $(CONDAR)chngol.o \
-	 $(LINE)chngver.o $(CONDAR)chngver.o $(CONLINE)execcomp.o
-COREINC = $(CONDAR)accums.o $(CONDAR)au1.o $(CONDAR)au2.o \
-	  $(CONDAR)au3.o $(CONDAR)au4.o $(CONDAR)au5.o $(CONDAR)au6.o \
-	  $(CONDAR)au7.o $(CONDAR)au8.o $(CONDAR)au9.o $(CONDAR)aua.o \
-	  $(CONDAR)caub.o $(CONDAR)drawcntr.o $(CONDAR)funct.o \
-	  $(CONDAR)funfunct.o $(CONDAR)getscan.o $(CONDAR)gget.o \
-	  $(CONDAR)gprep.o $(CONDAR)header.o $(CONDAR)itfits.o \
-	  $(CONDAR)mlabel.o $(CONDAR)plot.o \
-	  $(CONDAR)prep.o $(CONDAR)rshape2.o $(CONDAR)select.o \
-	  $(CONDAR)show.o $(CONDAR)summary.o $(CONDAR)table.o \
-	  $(CONDAR)tells.o $(CONDAR)tracer.o $(CONDAR)zerror.o \
-	  $(CONLINE)assgn.o $(CONLINE)bshape.o $(CONLINE)compress.o \
-	  $(CONLINE)exitpops.o $(CONLINE)genop.o $(CONLINE)gtline.o \
-	  $(CONLINE)helps.o $(CONLINE)initcomm.o $(CONLINE)interp.o \
-	  $(CONLINE)massgn.o $(CONLINE)menus.o $(CONLINE)oerror.o \
-	  $(CONLINE)pread.o $(CONLINE)quick.o $(CONLINE)recover.o \
-	  $(CONLINE)runtag.o $(CONLINE)setflags.o $(CONLINE)stores.o \
-	  $(CONLINE)subs.o $(CONLINE)undo.o $(GENMEMORY)arainit.o \
-	  $(GENMEMORY)genmain.o $(GENMEMORY)genstores.o \
-	  $(LINE)accums.o $(LINE)au1.o $(LINE)au2.o $(LINE)au3.o \
-	  $(LINE)au4.o $(LINE)au5.o $(LINE)au6.o $(LINE)au7.o \
-	  $(LINE)au8.o $(LINE)au9.o $(LINE)aua.o $(LINE)drawcntr.o \
-	  $(LINE)funct.o $(LINE)funfunct.o $(LINE)getscan.o \
-	  $(LINE)gget.o $(LINE)gmeasure.o $(LINE)gprep.o \
-	  $(LINE)header.o $(LINE)itfits.o $(LINE)laub.o \
-	  $(LINE)mlabel.o $(LINE)plot.o $(LINE)prep.o $(LINE)rshape2.o \
-	  $(LINE)select.o $(LINE)show.o $(LINE)summary.o \
-	  $(LINE)table.o $(LINE)tells.o $(LINE)tracer.o $(LINE)zerror.o \
-	  $(SOURCE)compil.o $(SOURCE)editor.o $(SOURCE)ltstor.o \
-	  $(SOURCE)memusage.o $(SOURCE)pseudo.o $(SOURCE)relink.o \
-	  $(SOURCE)symbol.o $(CONLINE)sread.o \
-	  $(CONLINE)changeproj.o $(LINE)chngol.o $(CONDAR)chngol.o \
-	  $(LINE)chngver.o $(CONDAR)chngver.o  $(LINE)getir.o  \
-	  $(CONLINE)str4cur.o $(LINE)getotf.o $(LINE)getpolz.o \
-	  $(CONLINE)execcomp.o
-DEFAULTINC = $(CONLINE)setdefaults.o
-ERRORSINC = $(CONLINE)checkfperror.o $(CONLINE)fphandler.o \
-	    $(CONLINE)genop.o $(CONLINE)initfperror.o \
-	    $(CONLINE)oerror.o $(CONLINE)quick.o $(CONLINE)setflags.o
-FOXPLOTINC = $(CONLINE)charsize.o $(CONLINE)pchar.o $(CONLINE)place.o \
-	     $(CONLINE)vctr.o
-LSFINC = $(CONLINE)compress.o $(CONLINE)exitpops.o $(CONLINE)recover.o \
-	 $(CONLINE)stores.o $(GENMEMORY)genmain.o \
-	 $(GENMEMORY)genstores.o $(SOURCE)memusage.o
-MAPPLINC = $(CONDAR)au4.o $(CONDAR)au5.o $(CONDAR)cheader.o \
-	   $(CONDAR)craz.o $(CONDAR)cube.o $(CONDAR)drawcntr.o \
-	   $(CONDAR)funct.o $(CONDAR)funfunct.o $(CONDAR)hlftne.o \
-	   $(CONDAR)initappl.o $(CONDAR)mfill.o $(CONDAR)mheader.o \
-	   $(CONDAR)minit.o $(CONDAR)mlabel.o $(CONDAR)mraz.o \
-	   $(CONDAR)mread.o $(CONDAR)msmooth.o $(CONDAR)msmoth2.o \
-	   $(CONDAR)mtable.o $(CONDAR)mwrite.o $(CONDAR)pltdots.o \
-	   $(CONDAR)raster.o $(CONDAR)readcube.o $(CONDAR)rotate.o \
-	   $(CONDAR)slice.o $(CONDAR)tracer.o $(CONDAR)zerror.o \
-	   $(CONDAR)zlimit.o $(CONLINE)genop.o $(CONLINE)ilct.o \
-	   $(LINE)au4.o $(LINE)au5.o $(LINE)cheader.o $(LINE)craz.o \
-	   $(LINE)cube.o $(LINE)drawcntr.o $(LINE)funct.o \
-	   $(LINE)funfunct.o $(LINE)hlftne.o $(LINE)initappl.o \
-	   $(LINE)mfill.o $(LINE)mheader.o $(LINE)minit.o \
-	   $(LINE)mlabel.o $(LINE)mraz.o $(LINE)mread.o \
-	   $(LINE)msmooth.o $(LINE)msmoth2.o $(LINE)mtable.o \
-	   $(LINE)mwrite.o $(LINE)pltdots.o $(LINE)raster.o \
-	   $(LINE)readcube.o $(LINE)rotate.o $(LINE)slice.o \
-	   $(LINE)tracer.o $(LINE)zerror.o $(LINE)zlimit.o $(LINE)virfft.o \
-	   $(CONDAR)virfft.o $(LINE)window.o $(CONDAR)window.o \
-	   $(CONDAR)fitfoc.o $(LINE)fitfoc.o  $(CONLINE)str4cur.o \
-	   $(CONLINE)funclev.o
-MESAGEINC = $(CONLINE)oerror.o
-MFORMINC = $(CONDAR)au4.o $(CONDAR)au5.o $(CONDAR)cheader.o \
-	   $(CONDAR)craz.o $(CONDAR)cube.o $(CONDAR)funct.o \
-	   $(CONDAR)funfunct.o $(CONDAR)initappl.o $(CONDAR)mheader.o \
-	   $(CONDAR)minit.o $(CONDAR)mlabel.o $(CONDAR)mraz.o \
-	   $(CONDAR)mread.o $(CONDAR)mwrite.o $(CONDAR)readcube.o \
-	   $(CONDAR)slice.o $(CONLINE)genop.o $(CONLINE)ilct.o \
-	   $(LINE)au4.o $(LINE)au5.o $(LINE)cheader.o $(LINE)craz.o \
-	   $(LINE)cube.o $(LINE)funct.o $(LINE)funfunct.o \
-	   $(LINE)initappl.o $(LINE)mheader.o $(LINE)minit.o \
-	   $(LINE)mlabel.o $(LINE)mraz.o $(LINE)mread.o $(LINE)mwrite.o \
-	   $(LINE)readcube.o $(LINE)slice.o \
-	   $(CONDAR)xtochan.o $(CONDAR)chantox.o \
-	   $(LINE)xtochan.o $(LINE)chantox.o LINE$(LINE)virfft.o \
-	   $(CONDAR)virfft.o $(LINE)window.o $(CONDAR)window.o \
-	   $(CONDAR)fitfoc.o $(LINE)fitfoc.o  $(CONLINE)funclev.o
-PARAMSINC = $(CONDAR)accums.o $(CONDAR)au1.o $(CONDAR)au2.o \
-	  $(CONDAR)au3.o $(CONDAR)au4.o $(CONDAR)au5.o $(CONDAR)au6.o \
-	  $(CONDAR)au7.o $(CONDAR)au8.o $(CONDAR)au9.o $(CONDAR)aua.o \
-	  $(CONDAR)caub.o $(CONDAR)drawcntr.o $(CONDAR)funct.o \
-	  $(CONDAR)funfunct.o $(CONDAR)getcurrent.o $(CONDAR)getbyloc.o \
-	  $(CONDAR)getbynum.o $(CONDAR)getbyrec.o $(CONDAR)getscan.o \
-	  $(CONDAR)gget.o $(CONDAR)gprep.o $(CONDAR)header.o \
-	  $(CONDAR)hlftne.o $(CONDAR)initappl.o \
-	  $(CONDAR)mlabel.o $(CONDAR)cpdoc.o $(CONDAR)plot.o \
-	  $(CONDAR)pltdots.o $(CONDAR)prep.o $(CONDAR)raster.o \
-	  $(CONDAR)rshape2.o $(CONDAR)select.o $(CONDAR)show.o \
-	  $(CONDAR)summary.o \
-	  $(CONDAR)table.o $(CONDAR)tells.o $(CONDAR)tracer.o \
-	  $(CONDAR)zerror.o $(CONLINE)bshape.o $(CONLINE)exitpops.o \
-	  $(CONLINE)genop.o $(CONLINE)interp.o $(CONLINE)menus.o \
-	  $(CONLINE)oerror.o $(CONLINE)pwrite.o $(CONLINE)recover.o \
-	  $(CONLINE)setflags.o $(CONLINE)undo.o $(LINE)accums.o \
-	  $(LINE)au1.o $(LINE)au2.o $(LINE)au3.o $(LINE)au4.o \
-	  $(LINE)au5.o $(LINE)au6.o $(LINE)au7.o $(LINE)au8.o \
-	  $(LINE)au9.o $(LINE)aua.o \
-	  $(LINE)drawcntr.o $(LINE)funct.o $(LINE)funfunct.o \
-	  $(LINE)getbyloc.o $(LINE)getbynum.o $(LINE)getbyrec.o \
-	  $(LINE)getcurrent.o $(LINE)getscan.o $(LINE)gget.o \
-	  $(LINE)gmeasure.o $(LINE)gprep.o $(LINE)header.o \
-	  $(LINE)hlftne.o $(LINE)initappl.o $(LINE)laub.o \
-	  $(LINE)mlabel.o $(LINE)lpdoc.o $(LINE)plot.o \
-	  $(LINE)pltdots.o $(LINE)prep.o $(LINE)raster.o \
-	  $(LINE)rshape2.o $(LINE)select.o $(LINE)show.o $(LINE)summary.o \
-	  $(LINE)table.o $(LINE)tells.o $(LINE)tracer.o  $(LINE)getir.o \
-	  $(LINE)veltochan.o $(LINE)zerror.o $(LINE)virfft.o $(CONDAR)virfft.o \
-	  $(CONDAR)fitfoc.o $(LINE)fitfoc.o $(CONLINE)ctrlcintr.o \
-          $(CONLINE)str4cur.o $(LINE)getotf.o $(CONLINE)funclev.o \
-	  $(CONLINE)color.o $(LINE)getpolz.o $(CONLINE)genop.f \
-	  $(CONDAR)chgres.o $(LINE)chgres.o $(CONDAR)conversion2.o \
-	  $(CONDAR)conversion3.o $(CONDAR)dft.o $(CONDAR)fft.o \
-	  $(LINE)conversion2.o $(LINE)conversion3.o $(LINE)dft.o \
-	  $(LINE)fft.o
-RIPINC = $(LINE)au6.o $(LINE)rshape2.o $(CONDAR)rshape2.o \
-	 $(LINE)fgauss.o $(CONDAR)au6.o $(CONDAR)fgauss.o 
-SMSTUFINC = $(CONLINE)assgn.o $(CONLINE)gtline.o $(CONLINE)helps.o \
-	    $(CONLINE)initcomm.o $(CONLINE)interp.o $(CONLINE)massgn.o \
-	    $(CONLINE)nextfield.o $(CONLINE)oerror.o $(CONLINE)quick.o \
-	    $(CONLINE)stores.o $(CONLINE)subs.o $(GENMEMORY)generrors.o \
-	    $(GENMEMORY)genmain.o $(GENMEMORY)genstores.o \
-	    $(SOURCE)amathparser.o $(SOURCE)bclean.o $(SOURCE)compil.o \
-	    $(SOURCE)editor.o $(SOURCE)getfld.o $(SOURCE)ltstor.o \
-	    $(SOURCE)polish.o $(SOURCE)pseudo.o $(SOURCE)symbol.o  \
-	    $(CONLINE)execpol.o $(CONLINE)execcomp.o
-STKINC = $(CONDAR)au1.o $(CONDAR)au2.o $(CONDAR)au4.o $(CONDAR)au5.o \
-	 $(CONDAR)au8.o $(CONDAR)aua.o $(CONDAR)caub.o $(CONDAR)funct.o \
-	 $(CONDAR)funfunct.o $(CONDAR)select.o $(CONDAR)show.o \
-	 $(CONDAR)summary.o $(CONDAR)tells.o $(CONLINE)assgn.o \
-	 $(CONLINE)compress.o $(CONLINE)genop.o $(CONLINE)gtline.o \
-	 $(CONLINE)helps.o $(CONLINE)initcomm.o $(CONLINE)interp.o \
-	 $(CONLINE)massgn.o $(CONLINE)oerror.o $(CONLINE)quick.o \
-	 $(CONLINE)setflags.o $(CONLINE)stores.o $(CONLINE)subs.o \
-	 $(GENMEMORY)genmain.o $(GENMEMORY)genstores.o $(LINE)au1.o \
-	 $(LINE)au2.o $(LINE)au4.o $(LINE)au5.o $(LINE)au8.o \
-	 $(LINE)aua.o $(LINE)funct.o $(LINE)funfunct.o $(LINE)laub.o \
-	 $(LINE)select.o $(LINE)show.o $(LINE)summary.o $(LINE)tells.o \
-	 $(SOURCE)bclean.o $(SOURCE)compil.o $(SOURCE)editor.o \
-	 $(SOURCE)getfld.o $(SOURCE)ltstor.o $(SOURCE)polish.o \
-	 $(SOURCE)pseudo.o $(SOURCE)symbol.o $(CONLINE)sread.o \
-	 $(CONLINE)pread.o $(CONLINE)execpol.o $(CONLINE)execcomp.o 
-TAGSINC = $(CONLINE)helps.o $(CONLINE)interp.o $(CONLINE)quick.o \
-	  $(CONLINE)stores.o $(CONLINE)unused.o $(CONLINE)verbs.o \
-	  $(SOURCE)compil.o $(SOURCE)editor.o $(SOURCE)finish.o \
-	  $(SOURCE)polish.o $(SOURCE)pseudo.o $(SOURCE)relink.o \
-	  $(CONLINE)oerror.o $(CONLINE)execpol.o
-
-# Macros which list the 'Include' file dependencies
-#
-#---------------------------------------------------------------
-BINLIST = genmemory.exe defaults.exe rundaemon
-GBBINLIST = gbline.rmt.exe gbcondar.rmt.exe
-GBOLLIST = gbline.exe gbcondar.exe 
-TUCBINLIST = tucline.exe tuccondar.exe
-CVBINLIST = cvline.exe cvcondar.exe
-# Macro which lists executables 
-#
-POPSDATLIST = LMEMORY CMEMORY
-#
-#---------------------------------------------------------------
-EXECS = checkup.exe clearlock.exe comments.exe gbline gbcondar \
-	edit.exe explain2.exe help.exe identify.exe \
-	ls.exe makefile.exe makegraph.exe makemenu.exe man.exe \
-	mess.exe messages.exe more.exe news.exe prcdir.exe \
-	prcdir2.exe print.exe edit2.exe hpprint quicprint postprint \
-	qmsprint nogprint makegraph2.exe killgraph.exe tucline \
-	tuccondar cvline cvcondar line.exe line.rmt.exe condar.exe \
-	condar.rmt.exe mkfiles.unipops filecomp.exe infantcide printit \
-	isSolaris
-PROCS = getbits.prc testarray.prc testerr.prc testif.prc testrtrn.prc \
-	testwhile.prc
-OTHERS = hpstart hpterm poststart postterm qmsstart qmsterm quicstart \
-	 quicterm explain.icon menu.icon comments.icon help.icon \
-	 ihstorgb twodim.mask prcdir.icon ls.icon man.icon more.icon \
-	 defaults.f  Makeman tuc.nrao.edu.mkfiles.unipops \
-	 kp.nrao.edu.mkfiles.unipops gb.nrao.mkfiles.unipops \
-	 cv.mkfiles.unipops print.awk printers.example
-#
-# Lists of things whicj occasionally should be SCCS gotten
-#---------------------------------------------------------------
-INITCIO = $(INCLUDES)appl.inc $(INCLUDES)cio.inc $(INCLUDES)core.inc \
-	  $(INCLUDES)lsf.inc $(CONLINE)initcio.F $(INCLUDES)params.inc \
-	  POPSDAT.GEN POPSDAT.ADVERBS  POPSDAT.MAIN  POPSDAT.VERBS  \
-	  POPSDAT.FFUNC
-# initcio dependencies for a new version number for program
-#---------------------------------------------------------------
-#
-# End of Macros
-#
-# Target and dependencies:
-#
-# General targets first
-#
-
-all:  most $(GBBINLIST) $(TUCBINLIST) $(CVBINLIST)
-
-most: MISCELANEOUS EXECUTABLES $(POPSDATLIST) $(BINLIST)
-
-tucall: most $(TUCBINLIST)
-
-gball: most $(GBBINLIST)
-
-gbonline: GBOLMISCELANEOUS $(GBOLLIST)
-
-cvall: most $(CVBINLIST)
-
-clean:
-	-rm -f $(SOURCEOBJ)
-	-rm -f $(CNLOBJ)
-	-rm -f $(DISKOBJ)
-	-rm -f $(LINEOBJ)
-	-rm -f $(CONOBJ)
-	-rm -f $(GENOBJ)
-	-rm -f $(POPSDATLIST)
-	-rm -f $(BINLIST)
-	@if [ $(USESUNVIEW) = TRUE ]; \
-	 then (cd $(popsdir)sunview; make clean)\
-	 fi
-	@if [ $(USEX) = TRUE ]; \
-	 then (cd $(popsdir)xwindows; make clean)\
-	 fi
-	(cd $(popsdir)explain/source; make clean)
-	(cd $(popsdir)source/conline/gb; make clean)
-	(cd $(popsdir)source/conline/tuc; make clean)
-	(cd $(popsdir)source/conline/cv; rm -f *.o)
-	(cd $(popsdir)utilities; make clean)
-	(cd $(popsdir)fonts; make clean)
-	-sccs clean
-	(cd $(popsdir)procedures; make clean) 
-	-rm -f graphics.exe popstool.exe
-	(cd $(popsdir)sys.unipops; make clean)
-	-(cd $(INCLUDES); sccs clean; sccs get SCCS/s.*)
-	(cd $(SOURCE); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(CONLINE); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(GENMEMORY); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(LINE); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(CONDAR); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-
-links:
-	-(cd $(INCLUDES); sccs clean; sccs get SCCS/s.*)
-	(cd $(SOURCE); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(CONLINE); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(GENMEMORY); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(LINE); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-	(cd $(CONDAR); rm -f *.inc *.h; ln -s $(INCLUDES)*.[i]* .)
-
-oclean:
-	-rm -f $(SOURCEOBJ)
-	-rm -f $(CNLOBJ)
-	-rm -f $(DISKOBJ)
-	-rm -f $(LINEOBJ)
-	-rm -f $(CONOBJ)
-	-rm -f $(GENOBJ)
- 
-# Executable targets next
-#
-
-gbline.exe: $(SOURCEOBJ) $(CNLOBJ) $(LINEOBJ) $(DISKOBJ) $(ANALOBJO) 
-	@echo "Linking gbline.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o gbline.exe $(ANALOBJO) $(SOURCEOBJ) $(CNLOBJ) \
-	      $(LINEOBJ) $(DISKOBJ) $(LLIBS) 
-
-tucline.exe: $(SOURCEOBJ) $(CNLOBJ) $(LINEOBJ) $(DISKOBJ) $(TUCANALOBJ)
-	@echo "Linking tucline.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o tucline.exe $(SOURCEOBJ) $(CNLOBJ) \
-	      $(LINEOBJ) $(DISKOBJ) $(TUCANALOBJ) $(LLIBS)
-
-cvline.exe: $(SOURCEOBJ) $(CNLOBJ) $(LINEOBJ) $(DISKOBJ) $(CVANALOBJ)
-	@echo "Linking cvline.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o cvline.exe $(SOURCEOBJ) $(CNLOBJ) \
-	      $(LINEOBJ) $(DISKOBJ) $(CVANALOBJ) $(LLIBS)
-
-gbline.rmt.exe: $(SOURCEOBJ) $(CNLOBJ) $(LINEOBJ) $(DISKOBJ) $(ANALOBJR)
-	@echo "Linking gbline.rmt.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o gbline.rmt.exe $(ANALOBJR) $(SOURCEOBJ) $(CNLOBJ) \
-		$(LINEOBJ) $(DISKOBJ) $(LLIBS)
-
-gbcondar.exe: $(SOURCEOBJ) $(CNLOBJ) $(CONOBJ) $(DISKOBJ) $(ANALOBJO) 
-	@echo "Linking gbcondar.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o gbcondar.exe $(ANALOBJO) $(SOURCEOBJ) $(CNLOBJ) \
-	      $(CONOBJ) $(DISKOBJ) $(LLIBS)
-
-gbcondar.rmt.exe: $(SOURCEOBJ) $(CNLOBJ) $(DISKOBJ) $(CONOBJ) $(ANALOBJR)
-	@echo "Linking gbcondar.rmt.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o gbcondar.rmt.exe $(ANALOBJR) $(SOURCEOBJ) \
-	       $(CNLOBJ) $(CONOBJ) $(DISKOBJ) $(LLIBS)
-
-tuccondar.exe: $(SOURCEOBJ) $(CNLOBJ) $(CONOBJ) $(DISKOBJ) $(TUCANALOBJ)
-	@echo "Linking tuccondar.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o tuccondar.exe $(TUCANALOBJ) $(SOURCEOBJ) $(CNLOBJ) \
-	      $(CONOBJ) $(DISKOBJ) $(LLIBS)
-
-cvcondar.exe: $(SOURCEOBJ) $(CNLOBJ) $(CONOBJ) $(DISKOBJ) $(CVANALOBJ)
-	@echo "Linking cvcondar.exe.  Version:" $(VERSION)
-	@$(FC) $(LFLAGS) -o cvcondar.exe $(CVANALOBJ) $(SOURCEOBJ) $(CNLOBJ) \
-	      $(CONOBJ) $(DISKOBJ) $(LLIBS)
-
-genmemory.exe: $(SOURCEOBJ) $(GENOBJ)
-	@echo "Linking genmemory.exe"
-	@$(FC) $(LFLAGS) -o genmemory.exe $(SOURCEOBJ) $(GENOBJ) $(LLIBS)
-
-comments.exe: comments.exe.base
-	@sed s/LOCALMAILLIST/"$(LOCALMAILLIST)"/ < comments.exe.base > comments.exe
-	@chmod +x comments.exe
-
-defaults.exe: defaults.f
-	@$(FC) $(FFLAGS) defaults.f -o defaults.exe
-
-rundaemon: rundaemon.c
-	@$(CC) $(CFLAGS) rundaemon.c -o rundaemon
-
-line.rmt.exe: line.exe
-	rm -f line.rmt.exe
-	ln -s line.exe line.rmt.exe
-
-condar.rmt.exe: condar.exe
-	rm -f condar.rmt.exe
-	ln -s condar.exe condar.rmt.exe
-
-# End of executable target/dependencies
-#
-# Start of Memory file dependencies
-#
-
-$(CONLINE)initcio.o LMEMORY CMEMORY: genmemory.exe $(INITCIO)
-	$(CPP) -P -C -DVERSION=$(VERSION) POPSDAT.MAIN LPOPSDAT;
-	rm -f LMEMORY
-	genmemory.exe L
-	rm -f CMEMORY
-	$(CPP) -P -C -DVERSION=$(VERSION) -DCONTINUUM POPSDAT.MAIN CPOPSDAT;\
-	genmemory.exe C;\
-	cd $(CONLINE); $(CPP) -DVERSION=$(VERSION) initcio.F initcio.f
-	cd $(CONLINE); $(FCMP) -c $(FFLAGS) initcio.f
-	@rm -f $(CONLINE)initcio.f
-
-# End of Memory file dependencies
-#
-# Start of Miscelaneous routines
-
-GBOLMISCELANEOUS: $(ANALOBJO)
-	(cd $(popsdir)utilities; make CCMP="$(CCMP)" \
-		FCMP="$(FCMP)" FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" \
-		MAC2="$(MAC2)" gbonline)
-
-MISCELANEOUS:
-	@if [ $(USESUNVIEW) = TRUE ]; \
-	then \
-	(cd $(popsdir)sunview; \
-		make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" FLLIBS="$(FLLIBS)" \
-		   LIBCORE="$(LIBCORE)" CCMP="$(CCMP)" FCMP="$(FCMP)" install) \
-	fi
-	@if [ $(USEX) = TRUE ]; \
-	then \
-	(cd $(popsdir)xwindows; \
-		make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" FLLIBS="$(FLLIBS)" \
-		   XLIBS="$(XLIBS)" XINCS="$(XINCS)"  CCMP="$(CCMP)" \
-		   FCMP="$(FCMP)" install) \
-	fi
-	(cd $(popsdir)utilities; \
-		make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-		   CCMP="$(CCMP)" FCMP="$(FCMP)" AR="$(AR)" all)
-	(cd $(popsdir)fonts; make all)
-	(cd $(popsdir)explain/source; \
-		make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-		   CCMP="$(CCMP)" FCMP="$(FCMP)" AR="$(AR)" all)
-
-# End of Miscelaneous routines
-#
-EXECUTABLES: $(EXECS) $(PROCS) $(OTHERS)
-	(cd $(popsdir)sys.unipops; make all)
-	(cd $(popsdir)procedures; make all)
-
-# End of Execuatable updating routines
-#
-# Start of include file targets
-#
-$(AMBIGINC): $(INCLUDES)ambig.inc
-
-$(APPLINC): $(INCLUDES)appl.inc
-
-$(CFORMINC): $(INCLUDES)cform.inc
-
-$(CIOINC): $(INCLUDES)cio.inc
-
-$(COREINC): $(INCLUDES)core.inc
-
-$(ERRORSINC): $(INCLUDES)errors.inc
-
-$(FOXPLOTINC): $(INCLUDES)foxplot.inc
-
-$(LSFINC): $(INCLUDES)lsf.inc
-
-$(MAPPLINC): $(INCLUDES)mappl.inc
-
-$(MESAGEINC): $(INCLUDES)mesage.inc
-
-$(MFORMINC): $(INCLUDES)mform.inc
-
-$(PARAMSINC): $(INCLUDES)params.inc
-
-$(RIPINC): $(INCLUDES)rip.inc
-
-$(SMSTUFINC): $(INCLUDES)smstuf.inc
-
-$(STKINC): $(INCLUDES)stk.inc
-
-$(TAGSINC): $(INCLUDES)tags.inc
-
-$(I140H): $(INCLUDES)140.h
-
-$(FILESH): $(INCLUDES)files.h
-
-$(MODESH): $(INCLUDES)modes.h
-
-$(SDDH): $(INCLUDES)sdd.h
-
-$(SPHDR): $(INCLUDES)sp_hdr.h
-
-$(TUCACCESSH): $(TUCANINCS)tucaccess.h
-
-$(PDFLH): $(TUCANINCS)pdfl.h
-
-$(DEFAULTINC): $(INCLUDES)defaults.inc
-
-# End of include file targets
-#
-# Start of Peculiar targets
-
-$(CONOBJ): 
-	@if [ `echo $(<F) | awk -F\. '{print $$NF}'` = f ]; \
-	then cd $(<D); $(FCMP) $(FFLAGS) -c -DCONTINUUM $(<F); \
-	elif [ `echo $(<F) | awk -F\. '{print $$NF}'` = F ]; \
-	then cd $(<D); $(FCMP) $(FFLAGS) -c -DCONTINUUM $(<F); \
-	else cd $(<D); $(CCMP) $(CFLAGS) -c -DCONTINUUM $(<F); \
-	fi
-
-$(CONLINE)sread.o: $(CONLINE)srw.F $(INCLUDES)core.inc $(INCLUDES)stk.inc 
-	(cd $(CONLINE); $(CPP) -P -DSREAD srw.F >! sread.f) 
-	(cd $(CONLINE); $(CPP) -P -DSWRITE srw.F >> sread.f) 
-	(cd $(CONLINE); $(CPP) -P -DFREAD srw.F >> sread.f) 
-	(cd $(CONLINE); $(CPP) -P -DFWRITE srw.F >> sread.f) 
-	(cd $(CONLINE); $(FCMP) -c $(FFLAGS) sread.f)
-
-$(CONLINE)cleanup.o: $(CONLINE)cleanup.c
-	(cd $(CONLINE); \
-	 $(CCMP) -c $(CDEBOROPT) $(FLOATOPT) $(USEHACK) cleanup.c)
-
-$(INCLUDES)defaults.inc: defaults.exe $(INCLUDES)core.inc POPSDAT.ADVERBS
-	rm -f $(INCLUDES)defaults.inc
-	defaults.exe < $(INCLUDES)core.inc > $(INCLUDES)defaults.inc
-	(cd $(CONLINE); rm -f defaults.inc; ln -s $(INCLUDES)defaults.inc .)
-
-$(ANALOBJO):
-	(cd $(MAC2); make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" \
-	CCMP="$(CCMP)" FCMP="$(FCMP)" LLIBS="$(LLIBS)" gbonline)
-
-$(ANALOBJR): $(GBANINCS)access.h
-	(cd $(ANAL); make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-	   FCMP="$(FCMP)" CCMP="$(CCMP)" all)
-
-#
-# End of Peculiar targets
-#
diff -uNr 3.5/sunbin/Makeman unipops-3.6/sunbin/Makeman
--- 3.5/sunbin/Makeman	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/Makeman	1969-12-31 17:00:00.000000000 -0700
@@ -1,575 +0,0 @@
-#   @(#)Makeman	5.1 06/22/94
-#
-# Makefile for producing hardcopy of the Cookbook and Reference Manual.
-# To use, type:  make -f Makeman <target>
-# where target is one of the targets listed below.
-#
-# Note that the full documentation is over 600 pages long!!
-#
-# Please READ these comments before you use the Makefile.
-#
-# Alter below lines to designate formatter, print command, and directories
-# to use.
-#
-#-------------------------------------------------------------------------
-# Text formatters and printer:
-#
-PAGES = 
-FRMTR = lwf $(PAGES) -s7 -t8 -l -p"-2 -h '
-PRNTR = ' " | lpr
-TFRMTR = lwf -s12 -t8 -p"-t -h '
-ADDPAGE = $(popsdir)explain/source/addpage 2
-#
-# FRMTR = text formatter
-# PRNTRT = print command 
-# TFRMTR = title page formatter (could be same as FRMTR)
-# PAGES = default definition if you want to print out a range of pages within 
-#		the manuals; a power-user option.  Typical usage:
-#		make PAGES="-o3:4" -f Makeman etc.
-# ADDPAGE is the program that will add a page so as to keep chapters 
-# an even number of pages long.  It is useful if you are planning on making
-# double sided copies and you don't want to worry about where blank pages
-# need to be inserted.  Use a '1' if you are not using lwf and are using
-# 'pr' for FRMTR.  Use a '2' if you are using lwf.
-#
-# For most systems, all you will need is:
-#	FRMTR = pr -h '
-#	PRNTR = ' | lpr
-#	ADDPAGE = $(popsdir)explain/source/addpage 1
-#	TFRMTR = pr -h '
-# The -h and single quotes are nessary.  The actual print statement looks 
-# like:  
-#    cat file | pr -h '  Some Title ' | lpr
-#
-# If you have the lwf filter for creating postscript files out of
-# text files, then we suggest you use.  
-# 	FRMTR = lwf $(PAGES) -s7 -t8 -l -p"-2 -h '
-# 	PRNTR = ' " | lpr -Pps
-# 	ADDPAGE = $(popsdir)explain/source/addpage 2
-# 	TFRMTR = lwf -s12 -t8 -p"-t -h '
-# The actual print statement would look like:  
-#    	cat file | lwf -s7 -t8 -l -p"-2 -h '   Some Title   ' | lpr -Pps
-#-------------------------------------------------------------------------
-# Directories :
-#
-EXPDIR = $(popsdir)explain/text/
-EXP = $(EXPDIR)expdir
-TMPFILE = /tmp/explain.$(USER)
-#
-# EXPDIR = explain directory
-# EXP = explain information file
-# (These should not need to be changed.)
-#
-#-------------------------------------------------------------------------
-# Manual page generation script
-#
-MANPAGE = $(popsdir)explain/source/manrange 
-ONEPAGE = $(popsdir)explain/source/manonepage 
-PGSZ = 70
-# PGSZ = 56
-#
-# MANPAGE = Manual page collator and the number of printed lines that
-# will fit on a page. If you use the lwf filter (see above) then you
-# should specify 70 lines per page else you should experimint.  
-# Note that if using pr, that pr adds 10 lines to each page.
-# Therefore, when using pr you need to tell MANPAGE that you 
-# have 10 lines less per page than you really have (hence if your 
-# printer puts 66 lines on a page, which is true for most printers, 
-# you need to use 56 on the above line.
-#
-#-------------------------------------------------------------------------
-#  Targets:   	
-#	        all:  cookbook, description, and reference manual
-#
-#		cookbook -- complete cookbook
-#  		reference -- complete reference manual
-#		description -- general description document
-#
-#		cook-title -- cookbook title page
-#		cook-contents -- cookbook table of contents
-#		cook-c1 through cook-c17 -- cookbook chapters
-#		cook-apa through cook-apm -- cookbook appendices
-#		cook-glossary -- cookbook glossary
-#		cook-index -- cookbook index
-#
-#		ref-title -- reference manual; title page
-#		ref-contents -- reference manual; table of contents
-#		ref-intro -- reference manual; Introduction
-#
-#		ref-moreon -- reference manual; more on section
-#		ref-morehelp -- reference manual; more on help
-#		ref-moresyntax -- reference manual; more on syntax
-#		ref-moremodes -- reference manual; more on modes
-#		ref-moremem -- reference manual; more on memory
-#		ref-moreproc -- reference manual; more on proc
-#		ref-morecond -- reference manual; more on conditionals and loops
-#		ref-moredisk -- reference manual; more on disk format
-#
-#		ref-xref -- reference manual; cross reference section
-#		ref-xaccess -- reference manual; cross reference; data access
-#		ref-xanalysis -- reference manual; cross reference; data analysis
-#		ref-xdisplay -- reference manual; cross reference; data display
-#		ref-xdoc -- reference manual; cross reference; data documentation
-#		ref-xio -- reference manual; cross reference; input/output
-#		ref-xsystem -- reference manual; cross reference; system interface
-#		ref-xinterp -- reference manual; cross reference; interpretor
-#
-#		ref-adverbs -- reference manual; adverb dictionary
-#		ref-advtype -- reference manual; adverb dictionary description
-#		ref-array -- reference manual; array-adverb dictionary 
-#		ref-keyword -- reference manual; keyword- dictionary 
-#		ref-pointer -- reference manual; pointer-adverb dictionary 
-#		ref-scalar -- reference manual; scalar-adverb dictionary 
-#		ref-string -- reference manual; string-adverb dictionary 
-#
-#		ref-procs -- reference manual; procedure dictionary
-#		ref-proclib -- reference manual; procedure library description
-#		ref-procgen -- reference manual; general procedure dictionary
-#		ref-procgb -- reference manual; Green Bank procedure dictionary
-#		ref-proc12m -- reference manual; NRAO 12-m procedure dictionary
-#
-#		ref-util -- reference manual; utilities dictionary
-#
-#		ref-verbs -- reference manual; verbs dictionary
-#		ref-verbtype -- reference manual; verb dictionary description
-#		ref-function -- reference manual; function dictionary
-#		ref-internal -- reference manual; internal-array verb dictionary
-#		ref-pseudo -- reference manual; pseudo verb dictionary
-#		ref-regular -- reference manual; regular verbs dictionary
-#
-#		ref-index -- reference manual; index 
-#
-#		1page -- for an individual reference using ONEPAGE manual
-#				collator; experienced users only.  Usage:
-#				make 1PAGE=<topic> -f Makeman 1page
-#		mpage -- for an individual reference using ONEPAGE manual
-#				collator; experienced users only.  Usage:
-#				make MPAGE=<topic> -f Makeman mpage
-#
-1PAGE = 
-MPAGE = 
-START = .
-STOP = zzzzzzzzz
-# Default START, STOP, 1PAGE and MPAGE declerations
-#-------------------------------------------------------------------------
-all: description cookbook reference 
-
-#-------------------------------------------------------------------------
-description:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) General-Description BLAH $(PGSZ) | \
-	$(FRMTR)      UniPops : General Description      $(PRNTR))
-
-#-------------------------------------------------------------------------
-cookbook: cook-title cook-contents cook-c1 cook-c2 cook-c3 cook-c4 cook-c5 \
-	  cook-c6 cook-c7 cook-c8 cook-c9 cook-c10 cook-c11 cook-c12 cook-c13 \
-	  cook-c14 cook-c15 cook-c16 cook-c17 cook-apa cook-apb \
-	  cook-apc cook-apd cook-ape cook-apf cook-apg cook-aph cook-api \
-	  cook-apj cook-apk cook-apl cook-apl cook-apm cook-glossary cook-index
-
-cook-title:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Title-Page CKBK $(PGSZ) | \
-	$(TFRMTR) $(PRNTR))
-
-cook-contents:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Table-Contents CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)           Table of Contents              $(PRNTR))
-
-cook-c1:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c01 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Chapter 1 : Introduction           $(PRNTR))
-
-cook-c2:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c02 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Chapter 2 : Getting Started        $(PRNTR))
-
-cook-c3:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c03 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Chapter 3 : UniPops Syntax        $(PRNTR))
-
-cook-c4:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c04 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     Chapter 4 : On-Line Assistance      $(PRNTR))
-
-cook-c5:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c05 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  Chapter 5 : Data Access/Manipulation   $(PRNTR))
-
-cook-c6:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c06 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Chapter 6 : Data Display          $(PRNTR))
-
-cook-c7:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c07 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)   Chapter 7 : Baselines and Gaussians   $(PRNTR))
-
-cook-c8:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c08 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Chapter 8 : Smoothing Data        $(PRNTR))
-
-cook-c9:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c09 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)      Chapter 9 : General Analysis       $(PRNTR))
-
-cook-c10:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c10 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)      Chapter 10 : Averaging Scans       $(PRNTR))
-
-cook-c11:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c11 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)        Chapter 11 : The Stack           $(PRNTR))
-
-cook-c12:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c12 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) Chapter 12 : Interacting with the System $(PRNTR))
-
-cook-c13:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c13 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Chapter 13 : Procedures           $(PRNTR))
-
-cook-c14:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c14 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  Chapter 14 : Math/Logical Expressions  $(PRNTR))
-
-cook-c15:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c15 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)   Chapter 15 : Optional Facilities      $(PRNTR))
-
-cook-c16:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c16 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) Chapter 16 : Matrix and Cube Analysis   $(PRNTR))
-
-cook-c17:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) c17 CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    Chapter 17 : Continuum Analysis      $(PRNTR))
-
-cook-apa:
-	(rm -f $(TMPFILE); cd $(EXPDIR); \
-	$(ONEPAGE) $(EXP) ApA CKBK $(PGSZ) > $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Adverbs CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Arrays CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Keywords CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Pointers CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Strings CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Functions CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Pseudo CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Verbs CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Logicals CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Math CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Synopsis-Syntax CKBK $(PGSZ) >> $(TMPFILE); \
-	cat $(TMPFILE) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     Appendix A : UniPOPS Synopsis       $(PRNTR); \
-	rm -f $(TMPFILE) )
-
-cook-apb:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApB CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)      Appendix B : UNIX Commands         $(PRNTR))
-
-cook-apc:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApC CKBK $(PGSZ) |  \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    Appendix C : Sun Windows (SunView)   $(PRNTR))
-
-cook-apd:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApD CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     Appendix D : Associated Utilities   $(PRNTR))
-
-cook-ape:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApE CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    Appendix E : Verbs and Data Arrays   $(PRNTR))
-
-cook-apf:
-	(rm -f $(TMPFILE); cd $(EXPDIR); \
-	$(ONEPAGE) $(EXP) ApF CKBK $(PGSZ)  > $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Error-Floating-Point CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Error-Numbered CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Error-Unnumbered CKBK $(PGSZ) >> $(TMPFILE); \
-	cat $(TMPFILE) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)      Appendix F : Error Messages        $(PRNTR); \
-	rm -f $(TMPFILE) )
-
-cook-apg:
-	(rm -f $(TMPFILE); cd $(EXPDIR); \
-	$(ONEPAGE) $(EXP) ApG CKBK $(PGSZ) > $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class01 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class02 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class03 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class04 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class05 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class06 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class07 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class08 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class09 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class10 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class11 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class12 CKBK $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Class13 CKBK $(PGSZ) >> $(TMPFILE); \
-	cat $(TMPFILE) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     Appendix G : The SDD File Format    $(PRNTR); \
-	rm -f $(TMPFILE) )
-
-cook-aph:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApH CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Appendix H : The Status Array     $(PRNTR))
-
-cook-api:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApI CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    Appendix I : Color Specifications    $(PRNTR))
-
-cook-apj:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApJ CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       Appendix J : Character Sets       $(PRNTR))
-
-cook-apk:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApK CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    Appendix K : History Substitution    $(PRNTR))
-
-cook-apl:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApL CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    Appendix L : Format Specification    $(PRNTR))
-
-cook-apm:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) ApM CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)   Appendix M : Environment Variables    $(PRNTR))
-
-cook-glossary:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Cook_Glossary CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)           Glossary                      $(PRNTR))
-
-cook-index:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Cook_Index CKBK $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)             Index                       $(PRNTR))
-
-#-------------------------------------------------------------------------
-reference: ref-title ref-contents ref-intro ref-moreon ref-xref ref-adverbs \
-	   ref-verbs ref-procs ref-util ref-index
-
-ref-title:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Ref_Title_Page RFRNC $(PGSZ) | $(TFRMTR) $(PRNTR))
-
-ref-contents:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Ref_Table_of_Contents RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)           Table of Contents            $(PRNTR))
-
-ref-intro:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Ref_Intro RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 1. Introduction -- How to Use this Manual $(PRNTR))
-
-ref-moreon:  ref-morehelp ref-moresyntax ref-moremodes ref-moremem ref-moreproc \
-	     ref-morecond ref-moredisk
-
-ref-morehelp:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Help-Facilities RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     2.1 : More on : Help Facilities       $(PRNTR))
-
-ref-moresyntax:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Command-Syntax RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     2.2 : More on : Command Syntax        $(PRNTR))
-
-ref-moremodes:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Command-Modes RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)     2.3 : More on : Command Modes         $(PRNTR))
-
-ref-moremem:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Memory RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)        2.4 : More on : Memory             $(PRNTR))
-
-ref-moreproc:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Procedure-Writing RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)   2.5 : More on : Procedure Writing       $(PRNTR))
-
-ref-morecond:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Conditionals-Loops RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  2.6 : More on : Conditionals and Loops    $(PRNTR))
-
-ref-moredisk:
-	(rm -f $(TMPFILE); cd $(EXPDIR); \
-	$(ONEPAGE) $(EXP) Data-Format RFRNC $(PGSZ) > $(TMPFILE); \
-	$(ONEPAGE) $(EXP) 140ft-telescope-tape RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) GB-ASCII RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) IEEE-Keep RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Modcomp-Keep RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) PC-Pops RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) SDD RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) Modcomp-binary RFRNC $(PGSZ) >> $(TMPFILE); \
-	$(ONEPAGE) $(EXP) IEEE-Binary RFRNC $(PGSZ) >> $(TMPFILE); \
-	cat $(TMPFILE) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 2.7 : More on : Data, Disk, and Tape Formats $(PRNTR); \
-	rm -f $(TMPFILE) )
-
-ref-xref: ref-xaccess ref-xanalysis ref-xdisplay ref-xdoc ref-xio ref-xsystem ref-xinterp
-
-ref-xaccess:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Data-Access RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  3.1 : Cross-Reference : Data Access      $(PRNTR))
-
-ref-xanalysis:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Data-Analysis RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 3.2 : Cross-Reference : Data Analysis     $(PRNTR))
-
-ref-xdisplay:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Data-Display RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 3.3 : Cross-Reference : Data Display      $(PRNTR))
-
-ref-xdoc:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Data-Documentation RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 3.4 : Cross-Reference : Data Documentation   $(PRNTR))
-
-ref-xio:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Input-Output RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 3.5 : Cross-Reference : Input and Output    $(PRNTR))
-
-ref-xsystem:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) System-Interface RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 3.6 : Cross-Reference : System Interface    $(PRNTR))
-
-ref-xinterp:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Interpretor RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 3.7 : Cross-Reference : Interpretor    $(PRNTR))
-
-ref-adverbs: ref-advtype ref-array ref-keyword ref-pointer ref-scalar ref-string
-
-ref-advtype:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Adverb RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 4.1 : Adverbs : Types, Creation, and Uses  $(PRNTR))
-
-ref-array:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Array-Adverbs RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  4.2 : Array Adverbs : Dictionary       $(PRNTR))
-
-ref-keyword:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Keyword-Adverbs RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 4.3 : Keyword Adverbs : Dictionary      $(PRNTR))
-
-ref-pointer:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Pointer-Adverbs RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 4.4 : Pointer Adverbs : Dictionary      $(PRNTR))
-
-ref-scalar:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Scalar-Adverbs RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 4.5 : Scalar Adverbs : Dictionary       $(PRNTR))
-
-ref-string:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) String-Adverbs RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 4.6 : String Adverbs : Dictionary       $(PRNTR))
-
-ref-verbs: ref-verbtype ref-function ref-internal ref-pseudo ref-regular
-
-ref-verbtype:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Verb RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)    5.1 : Verbs : Types and Uses          $(PRNTR))
-
-ref-internal:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Internal-Array-Verbs RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 5.2 : Internal-Array Verbs : Dictionary  $(PRNTR))
-
-ref-function:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Functions RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  5.3 : Function Verbs : Dictionary       $(PRNTR))
-
-ref-pseudo:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Pseudo-Verbs RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)   5.4 : Pseudo Verbs : Dictionary        $(PRNTR))
- 
-ref-regular:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Regular-Verbs RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)   5.5 : Regular Verbs : Dictionary       $(PRNTR))
-
-ref-procs: ref-proclib ref-procgen ref-procgb ref-proc12m
-
-ref-proclib:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Procedure-Libraries RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)       6.1 : Procedure Libraries          $(PRNTR))
-
-ref-procgen:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) General-Procedures RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)  6.2 : General Procedures : Dictionary   $(PRNTR))
-
-ref-procgb:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) GreenBank-Procedures RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR) 6.3 : Green Bank Procedures : Dictionary $(PRNTR))
-
-ref-proc12m:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) NRAO12m-Procedures RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)6.4 : NRAO 12-meter Procedures : Dictionary$(PRNTR))
-
-ref-util:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) Utilities-List RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)      7 : Utilities Dictionary           $(PRNTR))
-
-ref-index:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) Ref_Index RFRNC $(PGSZ) | \
-	$(ADDPAGE) $(PGSZ) | \
-	$(FRMTR)            8 : General Index             $(PRNTR))
-
-1page:
-	(cd $(EXPDIR); $(ONEPAGE) $(EXP) $(1PAGE) RFRNC $(PGSZ) | \
-	$(FRMTR)            $(1PAGE)             $(PRNTR))
-
-mpage:
-	(cd $(EXPDIR); $(MANPAGE) $(EXP) $(MPAGE) RFRNC $(START) $(STOP) $(PGSZ) | \
-	$(FRMTR)            $(MPAGE)             $(PRNTR))
-
diff -uNr 3.5/sunbin/POPSDAT.ADVERBS unipops-3.6/sunbin/POPSDAT.ADVERBS
--- 3.5/sunbin/POPSDAT.ADVERBS	2000-03-16 11:32:31.000000000 -0700
+++ unipops-3.6/sunbin/POPSDAT.ADVERBS	1969-12-31 17:00:00.000000000 -0700
@@ -1,464 +0,0 @@
-C- POPSDAT ADVERBS (Always common to LINE and CONDAR.. No adverbs which are
-C- specific to LINE and CONDAR allowed)
-C- @(#)POPSDAT.ADVERBS	5.2 08/30/94 
-C-
-C-                                  SCALAR ADVERBS
-VERS         4   8           VERSION 
-NBOX         4   1            3.0
-NFIT         4   1            1.0
-NSAVE        5   1            1.0
-ZLINE        5   1            -1.0
-SLABEL       6   1            1.0
-FS           2   1            0.0
-FR           2   1            0.0
-BMARK        5   1            -1.0
-MRATIO       6   1            1.0
-NGAUSS       6   1            1.0
-BGAUSS       6   1            1.0
-EGAUSS       6   1            256.0
-NITER        5   1            8.0
-FIXC         4   1            -1.0
-FIXHW        5   1            -1.0
-FIXH         4   1            -1.0
-FIXRELC      7   1            -1.0
-FIXRELHW     8   1            -1.0
-FIXRELH      7   1            -1.0
-RAMPLTDE     8   1            0.0
-RPHASE       6   1            0.0
-RPERIOD      7   1            0.0
-RAMPERR      7   1            0.0
-RPHAERR      7   1            0.0
-RPERERR      7   1            0.0
-RFIXAMP      7   1            0.0
-RFIXPHA      7   1            0.0
-RFIXPER      7   1            -1.0
-ACOUNT       6   1            0.0
-CUTOFF       6   1            9999.0
-PFLAG        5   1            -1.0
-NEWRES       6   1            0.0
-OSHIFT       6   1            0.0
-BSCAN        5   1            0.0
-ESCAN        5   1            0.0
-BDROP        5   1            0.0
-EDROP        5   1            0.0
-FACT         4   1            0.0
-YMIN         4   1            -9999.0
-YINCR        5   1            1.0
-CLIPMIN      7   1            -9999.0
-CLIPMAX      7   1            9999.0
-VRMS         4   1            0.0
-CALVAL       6   1            0.0
-BMOMENT      7   1            0.0
-EMOMENT      7   1            0.0
-ASHIFT       6   1            0.0
-WEIGHT       6   1            0.0
-BBASE        5   1            50.0
-EBASE        5   1            50.0
-XMINP        5   1            0.0
-XMAXP        5   1            0.0
-XLOGP        5   1            -1.0
-YMINP        5   1            0.0
-YMAXP        5   1            0.0
-YLOGP        5   1            -1.0
-CROSSFLG     8   1            11111.
-DEFMODE      7   1            -1.0
-C-
-C-		Make sure following are properly initialized in ARAINIT
-C-
-CCLICK       6   1            0.0                INFINITY
-TCLICK       6   1            0.0                INFINITY
-VCLICK       6   1            0.0                INFINITY
-FCLICK       6   1            0.0                INFINITY
-MCLICK       6   1            0.0                INFINITY
-XCLICK       6   1            0.0                INFINITY
-YCLICK       6   1            0.0                INFINITY
-C-
-X_MIN        5   1            0.0                INFINITY
-X_MAX        5   1            0.0                INFINITY
-Y_MIN        5   1            0.0                INFINITY
-Y_MAX        5   1            0.0                INFINITY
-SCAN_MIN     8   1            0.0                INFINITY
-SCAN_MAX     8   1            0.0                INFINITY
-FEED_MIN     8   1            0.0                INFINITY
-FEED_MAX     8   1            0.0                INFINITY
-LST_MIN      7   1            0.0                INFINITY
-LST_MAX      7   1            0.0                INFINITY
-UT_MIN       6   1            0.0                INFINITY
-UT_MAX       6   1            0.0                INFINITY
-F_MIN        5   1            0.0                INFINITY
-F_MAX        5   1            0.0                INFINITY
-RATE_MIN     8   1            0.0                INFINITY
-RATE_MAX     8   1            0.0                INFINITY
-BW_MIN       6   1            0.0                INFINITY
-BW_MAX       6   1            0.0                INFINITY
-IT_MIN       6   1            0.0                INFINITY
-IT_MAX       6   1            0.0                INFINITY
-S_SORT       6   1            0.0
-TYPETIP      7   1            0.0
-ETA          3   1            0.84
-TAU0         4   1            0.0
-FTM          3   1            0.95
-FTSBR        5   1            0.95
-TRCVR        5   1            0.0
-ETAFREE      7   1            0.0
-TVANE        5   1            -1.0
-ERRCODE      7   1            0.0
-SPROTECT     8   1            1.0
-KPROTECT     8   1            1.0
-DCPCT        5   1            10.
-MDBOX        5   1            11.
-MXMIN        5   1            0.0
-MXMAX        5   1            0.0
-MYMIN        5   1            0.0
-MYMAX        5   1            0.0
-N_N          3   1            0.0
-DEFAULT      7   8            0.0
-C-
-C-                                  STRING ADVERBS
-C-		Make sure these are properly initialized in ARAINIT
-HTITLE       6   7    1       8.0
-XTITLE       6   7    1       4.0
-YTITLE       6   7    1       4.0
-S_OBJECT     8   7    1       4.0
-S_MODE       6   7    1       1.0
-PROMPT       6   7    1       2.0
-C-
-C-                                  ARRAY ADVERBS
-C-		Make sure these are properly initialized in ARAINIT
-SIZE         4   2    1       2.0                 0.0
-NREGION      7   2    1       32.0                0.0 
-GREGION      7   2    1       48.0                0.0
-VMARK        5   2    1       12.0               -999999.
-CMARK        5   2    1       12.0               -999999.
-FMARK        5   2    1       12.0               -999999.
-TMARK        5   2    1       12.0               -999999.
-CENTER       6   2    1       24.0                0.0
-HEIGHT       6   2    1       24.0                0.0
-HWIDTH       6   2    1       24.0                0.0
-CNTERR       6   2    1       24.0                0.0
-HGHTERR      7   2    1       24.0                0.0
-HWERR        5   2    1       24.0                0.0
-SMWGT        5   2    1       12.0                0.0
-BADPT        5   2    1       12.0                0.0
-GMFRAC       6   2    1       5.0                 0.0
-GOUT         4   2    2       6.0       5.0       0.0
-MLIMS        5   2    2       2.0       5.0      INFINITY
-LEVS         4   2    1       32.0               -999999.
-FLEVS        5   2    1       32.0               -999999.
-BPARM        5   2    1       15.0                0.0
-STATUS       6   2    1       32.0                0.0
-CONLINE      7   2    1       32.0                0.0
-CLUT         4   2    2        3.0     32.0      -16.0
-C-
-C-				Protected Adverbs, unlike the other 
-C-				protected adverbs below, these are
-C-				used, and occaisionally set, in the
-C-				program itself.   They are protected to
-C-				prevent the user from altering them
-C-
-FB_VER       6   8           -1.0
-HC_VER       6   8           -1.0
-CON_VER      7   8           -1.0
-C-
-C-				Protected ADVERBS -- Header wpords
-C-				Class One
-HEADLEN      7   8            5.0
-DATALEN      7   8            6.0
-SCAN         4   8            7.0
-OBSID        5   8            8.0
-OBSERVER     8   8            9.0
-TELESCOP     8   8           11.0
-PROJID       6   8           12.0
-OBJECT       6   8           13.0
-OBSMODE      7   8           15.0
-FRONTEND     8   8           16.0
-BACKEND      7   8           17.0
-PRECIS       6   8           18.0
-SAVENUM      7   8           19.0
-NORECORD     8   8           20.0
-RECORDID     8   8           21.0
-C-                      	Class Two
-XPOINT       6   8           30.0
-YPOINT       6   8           31.0
-UXPNT        5   8           32.0
-UYPNT        5   8           33.0
-PTCON        5   8           34.0
-ORIENT       6   8           38.0
-FOCUSR       6   8           39.0
-FOCUSV       6   8           40.0
-FOCUSH       6   8           41.0
-PT_MODEL     8   8           42.0
-C-                      	Class Three
-UTDATE       6   8           55.0
-UT           2   8           56.0
-LST          3   8           57.0
-NORCHAN      7   8           58.0
-NOSWVAR      7   8           59.0
-NOPHASE      7   8           60.0
-CYCLLEN      7   8           61.0
-SAMPRAT      7   8           62.0
-CL11TYPE     8   8           63.0
-PHASEID      7   8           64.0
-C-                      	Class Four
-EPOCH        5   8           80.0
-XSOURCE      7   8           81.0
-YSOURCE      7   8           82.0
-XREF         4   8           83.0
-YREF         4   8           84.0
-EPOCRA       6   8           85.0
-EPOCDEC      7   8           86.0
-GALLONG      7   8           87.0
-GALLAT       6   8           88.0
-AZ           2   8           89.0
-EL           2   8           90.0
-INDX         4   8           91.0
-INDY         4   8           92.0
-DESORG       6   8           93.0
-COORDCD      7   8           96.0
-C-                      	Class Five
-TAMB         4   8           105.0
-PRESSURE     8   8           106.0
-HUMIDITY     8   8           107.0
-REFRAC       6   8           108.0
-DEWPT        5   8           109.0
-MMH2O        5   8           110.0
-C-                       	Class Six
-SCANANG      7   8           130.0
-XZERO        5   8           131.0
-YZERO        5   8           132.0
-DELTAXR      7   8           133.0
-DELTAYR      7   8           134.0
-NOPTS        5   8           135.0
-NOXPTS       6   8           136.0
-NOYPTS       6   8           137.0
-XCELL0       6   8           138.0
-YCELL0       6   8           139.0
-FRAME        5   8           140.0
-C-                      	Class Seven
-BFWHM        5   8           155.0
-OFFSCAN      7   8           156.0
-BADCHV       6   8           157.0
-RVSYS        5   8           158.0
-VELOCITY     8   8           159.0
-VELDEF       6   8           160.0
-TYPECAL      7   8           161.0
-C-                       	Class Eight
-APPEFF       6   8           180.0
-BEAMEFF      7   8           181.0
-ANTGAIN      7   8           182.0
-ETAL         4   8           183.0
-ETAFSS       6   8           184.0
-C-                       	Class Nine - 12 M
-SYNFREQ      7   8           205.0
-LOFACT       6   8           206.0
-HARMONIC     8   8           207.0
-LOIF         4   8           208.0
-FIRSTIF      7   8           209.0
-RAZOFF       6   8           210.0
-RELOFF       6   8           211.0
-BMTHROW      7   8           212.0
-BMORENT      7   8           213.0
-BASEOFF      7   8           214.0
-OBSTOL       6   8           215.0
-SIDEBAND     8   8           216.0
-WL           2   8           217.0
-GAINS        5   8           218.0
-PBEAM        5   8           219.0
-MBEAM        5   8           221.0
-SROFF        5   8           223.0
-FOFFSIG      7   8           227.0
-FOFFREF1     8   8           228.0
-FOFFREF2     8   8           229.0
-C-                       	Class Nine - Green Bank
-L1           2   8           205.0
-L1F1         4   8           206.0
-L1F2         4   8           207.0
-L2           2   8           208.0
-L2F1         4   8           209.0
-L2F2         4   8           210.0
-LA           2   8           211.0
-LB           2   8           212.0
-LC           2   8           213.0
-LD           2   8           214.0
-LEVCORR      7   8           215.0
-PTFUDGE      7   8           216.0
-RHO          3   8           218.0
-THETA        5   8           219.0
-CFFORM       6   8           220.0
-C-                       	Class Ten
-OPENPAR      7   8           230.0
-C-		 		Class Eleven - ORIG
-VARVAL       6   8           255.0
-VARDES       6   8           256.0
-PHASTB       6   8           257.0
-C-				Class Eleven - PROTO
-NOSWVARF     8   8           255.0
-NUMCYC       6   8           256.0
-NUMCYCF      7   8           257.0
-NOPHASEF     8   8           258.0
-CYCLLENF     8   8           259.0
-SAMPTIMF     8   8           260.0
-VARVAL01     8   8           261.0
-VARDES01     8   8           262.0
-PHASTB01     8   8           263.0
-VARVAL02     8   8           267.0
-VARDES02     8   8           268.0
-PHASTB02     8   8           269.0
-VARVAL03     8   8           273.0
-VARDES03     8   8           274.0
-PHASTB03     8   8           275.0
-VARVAL04     8   8           279.0
-VARDES04     8   8           280.0
-PHASTB04     8   8           281.0
-VARVAL05     8   8           285.0
-VARDES05     8   8           286.0
-PHASTB05     8   8           287.0
-VARVAL06     8   8           291.0
-VARDES06     8   8           292.0
-PHASTB06     8   8           293.0
-VARVAL07     8   8           297.0
-VARDES07     8   8           298.0
-PHASTB07     8   8           299.0
-VARVAL08     8   8           303.0
-VARDES08     8   8           304.0
-PHASTB08     8   8           305.0
-VARVAL09     8   8           309.0
-VARDES09     8   8           310.0
-PHASTB09     8   8           311.0
-VARVAL10     8   8           315.0
-VARDES10     8   8           316.0
-PHASTB10     8   8           317.0
-C-                       	Class Twelve
-OBSFREQ      7   8           321.0
-RESTFREQ     8   8           322.0
-FREQRES      7   8           323.0
-BW           2   8           324.0
-TRX          3   8           325.0
-TCAL         4   8           326.0
-STSYS        5   8           327.0
-RTSYS        5   8           328.0
-TSOURCE      7   8           329.0
-TRMS         4   8           330.0
-REFPT        5   8           331.0
-X0           2   8           332.0
-DELTAX       6   8           333.0
-INTTIME      7   8           334.0
-NOINT        5   8           335.0
-SPN          3   8           336.0
-TAUH2O       6   8           337.0
-TH2O         4   8           338.0
-TAUO2        5   8           339.0
-TO2          3   8           340.0
-POLARIZ      7   8           341.0
-EFFINT       6   8           342.0
-RX_INFO      7   8           343.0
-C-                        	Class Thirteen
-NOSTAC       6   8           346.0
-FSCAN        5   8           347.0
-LSCAN        5   8           348.0
-LAMP         4   8           349.0
-LWID         4   8           350.0
-ILI          3   8           351.0
-DRMS         4   8           352.0
-C-			Protected Adverbs -- Matrix header
-MNAXIS1      7   8            1.0
-MNAXIS2      7   8            2.0
-MRVAL1       6   8            3.0
-MRVAL2       6   8            4.0
-MDELT1       6   8            5.0
-MDELT2       6   8            6.0
-MPIX1        5   8            7.0
-MPIX2        5   8            8.0
-MUNDEF       6   8            9.0
-MEQUINOX     8   8           10.0
-MTYPE1       6   8           20.0
-MTYPE2       6   8           21.0
-MBUNIT       6   8           22.0
-MOBJECT      7   8           23.0
-MORIGIN      7   8           25.0
-MDATE        5   8           26.0
-MCOMMENT     8   8           27.0
-C-			Protected Adverbs -- Cube header
-CNAXIS1      7   8            1.0
-CNAXIS2      7   8            2.0
-CRVAL1       6   8            3.0
-CRVAL2       6   8            4.0
-CDELT1       6   8            5.0
-CDELT2       6   8            6.0
-CPIX1        5   8            7.0
-CPIX2        5   8            8.0
-CUNDEF       6   8            9.0
-CNAXIS3      7   8           10.0
-CRVAL3       6   8           11.0
-CDELT3       6   8           12.0
-CPIX3        5   8           13.0
-CTMIN        5   8           14.0
-CTMAX        5   8           15.0
-CTSCALE      7   8           16.0
-CTZERO       6   8           17.0
-CEQUINOX     8   8           18.0
-CTYPE1       6   8           20.0
-CTYPE2       6   8           21.0
-CBUNIT       6   8           22.0
-COBJECT      7   8           23.0
-CORIGIN      7   8           25.0
-CDATE        5   8           26.0
-CTYPE3       6   8           27.0
-CCOMMENT     8   8           28.0
-C-       		Protected Adverbs -- Others
-C-			This order should match that used by FILES
-DSCANS       6   8            1.0
-KSCANS       6   8            2.0
-SSCANS       6   8            3.0
-GSCANS       6   8            4.0
-RSCANS       6   8            5.0
-PRINTFILE    9   8           11.0
-LOGFILE      7   8           12.0
-C-			These must continue where the last left off
-ACCMD        5   8           13.0
-STACK        5   8           14.0
-DISK         4   8           15.0
-OFFDATA      7   8           16.0
-ONDATA       6   8           17.0
-INFO         4   8           18.0
-STAT         4   8           19.0
-C-			these are for use with the chngonline verb
-HCTYPE       6   8            1.0
-FBTYPE       6   8            2.0
-CONTYPE      7   8            3.0
-C-
-C-			these are for use with FOPEN
-RW           2   8            0.0
-WO           2   8            1.0
-RO           2   8            2.0
-REW          3   8            0.0
-EOF          3   8           10.0
-UNK          3   8            0.0
-OLD          3   8           100.0
-NEW          3   8           200.0
-SCR          3   8           300.0
-C-
-C-                      These are for use with SAXIS (cont and line)
-SAMPLE       6   8             1.0
-TIMEOFF      7   8             2.0
-POS_OFF      7   8             3.0
-POSXOFF      7   8             4.0
-POSYOFF      7   8             5.0
-POSX         4   8             6.0
-POSY         4   8             7.0
-TIMELST      7   8             8.0
-TIMEUT       6   8             9.0
-C-
-CHANNEL      7   8             1.0
-FREQOFF      7   8             2.0
-VELHEAD      7   8             3.0
-VELRADI      7   8             4.0
-VELOPTI      7   8             5.0
-VELRELT      7   8             6.0
-VELLINR      7   8             7.0
-FREQRST      7   8             8.0
-FREQSKY      7   8             9.0
-FREQIRST     8   8            10.0
-FREQISKY     8   8            11.0
-C-
-QUIT         4   6
diff -uNr 3.5/sunbin/POPSDAT.FFUNC unipops-3.6/sunbin/POPSDAT.FFUNC
--- 3.5/sunbin/POPSDAT.FFUNC	2000-03-16 11:32:31.000000000 -0700
+++ unipops-3.6/sunbin/POPSDAT.FFUNC	1969-12-31 17:00:00.000000000 -0700
@@ -1,12 +0,0 @@
-C-  FUNFUNCT; Funny Functions 
-C- @(#)POPSDAT.FFUNC	5.1 2
-XCUR         4   4  150
-YCUR         4   4  151
-RAND         4   4  152
-CCUR         4   4  153
-VCUR         4   4  154
-TCUR         4   4  155
-FCUR         4   4  156
-MCUR         4   4  157
-DATE         4   4  158
-TIME         4   4  159
diff -uNr 3.5/sunbin/POPSDAT.GEN unipops-3.6/sunbin/POPSDAT.GEN
--- 3.5/sunbin/POPSDAT.GEN	2000-03-16 11:32:30.000000000 -0700
+++ unipops-3.6/sunbin/POPSDAT.GEN	1969-12-31 17:00:00.000000000 -0700
@@ -1,270 +0,0 @@
-C- POPSDAT stuff specific to both LINE and CONDAR (QUICK, FUNCT, STORES
-C- EDITOR, etc. type of stuff.)
-C- @(#)POPSDAT.GEN	5.1 06/22/94
-C-
-C- QUICK operators
-C-
-C- OMEGA       5   4    1  An internal operator
-,            1   4    1
-(            1   4    2
-)            1   4    3
-=            1   4    4
-+            1   4    5
--            1   4    6
-*            1   4    7
-/            1   4    8
-**           2   4    9
->            1   4   10
-<            1   4   11
-+            1   4   12
--            1   4   13
-~            1   4   14
-~=           2   4   15
->=           2   4   16
-<=           2   4   17
-TO           2   4   18
-BY           2   4   19
-=            1   4   20
-|            1   4   21
-&            1   4   22
-;            1   4   23
-FOR          3   4   24
-END          3   4   25
-READ         4   4   26
-PRINT        5   4   27
-?            1   4   27
-RETURN       6   4   28
-C-GETS         4   4   29  An internal operator
-C-RUN          3   4   30  An internal operator
-C-USING        5   4   31  An internal operator
-C-PROTECT      7   4   32  An internal operator
-EXEC         4   4   33
-SPRINT       6   4   34
-SREAD        5   4   35  
-FPRINT       6   4   36
-FREAD        5   4   37  
-C-
-C-  FUNCT; Function-like  operators
-C-  
-SIN          3   4   51
-ASIN         4   4   52
-COS          3   4   53
-ACOS         4   4   54
-TAN          3   4   55
-ATAN         4   4   56
-ATAN2        5   4   57
-SQRT         4   4   58
-LOG          3   4   59
-LOG10        5   4   60
-EXP          3   4   61
-ABS          3   4   62
-IFIX         4   4   63
-INT          3   4   63
-MAX          3   4   64
-MIN          3   4   65
-MOD          3   4   66
-NINT         4   4   67
-SIGN         4   4   68
-DIM          3   4   69
-SINH         4   4   70
-COSH         4   4   71
-TANH         4   4   72
-C-					 Stack function
-ASTACK       6   4   73
-C-                                       Get Data
-D0           2   4   74
-D1           2   4   75
-D2           2   4   76
-D3           2   4   77
-D4           2   4   78
-D5           2   4   79
-D6           2   4   80
-D7           2   4   81
-D8           2   4   82
-D9           2   4   83
-C-					 Get Headers
-H0           2   4   84
-H1           2   4   85
-H2           2   4   86
-H3           2   4   87
-H4           2   4   88
-H5           2   4   89
-H6           2   4   90
-H7           2   4   91
-H8           2   4   92
-H9           2   4   93
-C-					MATRIX operations
-MD0          3   4   94
-MD1          3   4   95
-MD2          3   4   96
-MD3          3   4   97
-C-
-MH0          3   4   98
-MH1          3   4   99
-MH2          3   4  100
-MH3          3   4  101
-C-					CUBE operations
-CD0          3   4  102
-CH0          3   4  103
-C-					String functions
-COMPARE      7   4  104
-LNBLNK       6   4  105
-LENGTH       6   4  106
-CONCAT       6   4  107
-SUBSTR       6   4  108
-INDEX        5   4  109
-C-                                      Data-Array functions
-CHANTOX      7   4  110
-XTOCHAN      7   4  111
-FOPEN        5   4  112
-FNAME        5   4  113
-XPIX2C       6   4  114
-YPIX2T       6   4  115
-C2XPIX       6   4  116
-T2YPIX       6   4  117
-C-
-C-  GENOP; General utility operators 
-C-
-PLACE        5   4  201
-VCTR         4   4  202
-CHAR         4   4  203
-PAGE         4   4  204
-EQTOGAL      7   4  205
-GALTOEQ      7   4  206
-DUMP         4   4  207
-CRT          3   4  208
-PRINTER      7   4  209
-OUTPUT       6   4  210
-TCOPY        5   4  211
-GCOPY        5   4  212
-PAUSE        5   4  213
-ERRON        5   4  214
-ERROFF       6   4  215
-FULLON       6   4  216
-FULLOFF      7   4  217
-GRAPHICS     8   4  218
-C-					 Set Stack 
-C- SETASTACK    9   4  219
-C-                                       Set Data
-C- SETD0        5   4  220
-C- SETD1        5   4  221
-C- SETD2        5   4  222
-C- SETD3        5   4  223
-C- SETD4        5   4  224
-C- SETD5        5   4  225
-C- SETD6        5   4  226
-C- SETD7        5   4  227
-C- SETD8        5   4  228
-C- SETD9        5   4  229
-C-					 Set Headers
-C- SETH0        5   4  230
-C- SETH1        5   4  231
-C- SETH2        5   4  232
-C- SETH3        5   4  233
-C- SETH4        5   4  234
-C- SETH5        5   4  235
-C- SETH6        5   4  236
-C- SETH7        5   4  237
-C- SETH8        5   4  238
-C- SETH9        5   4  239
-C-					MATRIX operations
-C- SETMD0       6   4  240
-C- SETMD1       6   4  241
-C- SETMD2       6   4  242
-C- SETMD3       6   4  243
-C-
-C- SETMH0       6   4  244
-C- SETMH1       6   4  245
-C- SETMH2       6   4  246
-C- SETMH3       6   4  247
-C-					additional common operators
-LOGON        5   4  248
-LOGOFF       6   4  249
-UNDOON       6   4  250
-UNDOOFF      7   4  251
-AMATHON      7   4  252
-AMATHOFF     8   4  253
-Z_SYSTEM     8   4  254
-Z_CHNGFIL    9   4  255
-C-				Z_BATCH turned off for now
-C- Z_BATCH      7   4  256
-C-
-COPYON       6   4  257
-COPYOFF      7   4  258
-DEBUG        5   4  259
-FREWIND      7   4  260
-FCLOSE       6   4  261
-FSTATUS      7   4  262
-PRNTFMT      7   4  263
-FONTSET      7   4  264
-VCHAR        5   4  265
-C-
-C- Run-Time operators
-C-
-ELSE         4   5  300
-THEN         4   5  301
-IF           2   5  302
-WHILE        5   5  303
-C-
-C- PSEUDO operators
-C-
-PROCEDURE    9   5  310
-PROC         4   5  310
-FINISH       6   5  311
-GLOBAL       6   5  312
-ARRAY        5   5  313
-STRING       6   5  314
-SCALAR       6   5  315
-POINTER      7   5  316
-ALIAS        5   5  317
-C-                          
-C- EDITOR operators
-C-
-POPSEDIT     8   5  320
-ENDEDIT      7   5  321
-C-
-C- STORES operators
-C-
-C- STOREPO     7   5  330  An Internal operator
-STORE        5   5  331
-RESTORE      7   5  332
-LIST         4   5  333
-CORE         4   5  334
-SCRATCH      7   5  335
-BATCH        5   5  336
-FILES        5   5  337
-CHNGPRJ      7   5  338
-SYSTEM       6   5  339
-DOCUMENT     8   5  340
-UNDO         4   5  341
-EDIT         4   5  342
-TYPE         4   5  343
-DIR          3   5  344
-SYSHELP      7   5  345
-LASER        5   5  346
-REPORT       6   5  347
-PRCDIR       6   5  348
-C-			MENUS disabled
-C- MENUS        5   5  349
-C- DONEMENU     8   5  350
-C-
-CHNGFILE     8   5  351
-IDENTIFY     8   5  352
-KILLGRPH     8   5  353
-EXIT         4   5  354
-RESTART      7   5  355
-COMPRESS     8   5  356 
-OLFILES      7   5  357
-WHATIS       6   5  358
-CHNGVER      7   5  359
-C-
-C- HELPS operators
-C-
-HELP         4   5  360
-VERB         4   5  361
-ADVERB       6   5  362
-EXPLAIN      7   5  363
-HISTORY      7   5  364
-C- DUMEND      6   5  368  An Internal operator
-C- WHILESETUP 10   5  369  An Internal operator
-C- SUBS        4   5  370  An Internal operator
diff -uNr 3.5/sunbin/POPSDAT.MAIN unipops-3.6/sunbin/POPSDAT.MAIN
--- 3.5/sunbin/POPSDAT.MAIN	2000-03-16 11:32:31.000000000 -0700
+++ unipops-3.6/sunbin/POPSDAT.MAIN	1969-12-31 17:00:00.000000000 -0700
@@ -1,13 +0,0 @@
-C- Main File which includes all of the files that eventually make either
-C- LPOPSDAT or CPOPSDAT.  /lib/cpp is used and the -DCONTINUUM flag controls
-C- whether you get CPOPSDAT or LPOPSDAT, although the output-file name is
-C- controled by /lib/cpp.
-C- @(#)POPSDAT.MAIN	5.1 5
-C-
-#include "POPSDAT.GEN"
-C-
-#include "POPSDAT.VERBS"
-C-
-#include "POPSDAT.FFUNC"
-C-
-#include "POPSDAT.ADVERBS"
diff -uNr 3.5/sunbin/POPSDAT.VERBS unipops-3.6/sunbin/POPSDAT.VERBS
--- 3.5/sunbin/POPSDAT.VERBS	2000-03-16 11:32:31.000000000 -0700
+++ unipops-3.6/sunbin/POPSDAT.VERBS	1969-12-31 17:00:00.000000000 -0700
@@ -1,207 +0,0 @@
-C- POPS VERBS - i.e. the stuff in the au routines
-C- @(#)POPSDAT.VERBS	5.2 07/06/94
-C-
-C--------------------------------------------------------------
-C-                                  AU1
-COPY         4   4  400
-MOVE         4   4  401
-REMOVE       6   4  402
-GET0         4   4  403
-GET          3   4  403
-ON           2   4  403
-GET1         4   4  404
-OFF          3   4  404
-GET2         4   4  405
-GET3         4   4  406
-GET4         4   4  407
-GET5         4   4  408
-GET6         4   4  409
-GET7         4   4  410
-GET8         4   4  411
-GET9         4   4  412
-RECALL       6   4  413
-SAVE         4   4  414
-TELL         4   4  415
-CGET         4   4  416
-SUMMARY      7   4  417
-KEEP         4   4  418
-CHECK        5   4  419
-GGET         4   4  420
-CGGET        5   4  421
-CHNGONLINE  10   4  422
-KGET         4   4  423
-C--------------------------------------------------------------
-C-                                  AU2
-ACCUM        5   4  430
-SUM          3   4  431
-AVE          3   4  432
-BOXCAR       6   4  433
-HANNING      7   4  434
-SCALE        5   4  435
-CLIP         4   4  436
-DIFF         4   4  437
-MINUS        5   4  437
-MOMENT       6   4  438
-SMOOTH       6   4  439
-INVERT       6   4  440
-DIVIDE       6   4  441
-SPIKE        5   4  442
-REPLACE      7   4  443
-PEAK         4   4  444
-BIAS         4   4  445
-CHNGRES      7   4  446
-CROSSFCN     8   4  447
-CONVFCN      7   4  448
-DECNVLV      7   4  449
-SHIFT        5   4  450
-FSHIFT       6   4  451
-VSHIFT       6   4  452
-PDOC         4   4  453
-LISTSHIFT    9   4  454
-PLUS         4   4  455
-MULTIPLY     8   4  456
-C--------------------------------------------------------------
-C-                                  AU3
-BASELINE     8   4  460
-BMODEL       6   4  461
-BSHAPE       6   4  462
-DCBASE       6   4  463
-RMS          3   4  464
-BSHOW        5   4  465
-PCBASE       6   4  466
-MDBASE       6   4  467
-C-------------------------------------------------------------
-C-                                  AU4
-CROSSHAIR    9   4  470
-RESHOW       6   4  471
-SHOW         4   4  472
-FLAG         4   4  473
-FULLGRID     8   4  474
-PLOT         4   4  475
-SETPAGE      7   4  476
-RSTPAGE      7   4  477
-COLOR        5   4  478
-LINETYPE     8   4  479
-CHARSIZE     8   4  480
-RSTCOLOR     8   4  481
-CLICK        5   4  482
-C------------------------------------------------------------
-C-                                  AU5
-MTABLE       6   4  485
-MHEADER      7   4  486
-MBLANK       6   4  487
-MCOPY        5   4  488
-MMOVE        5   4  489
-MREMOVE      7   4  490
-MINIT        5   4  491
-MRANGE       6   4  492
-HLFTNE       6   4  493
-LABEL        5   4  494
-SETLEV       6   4  495
-AUTOLEV      7   4  496
-RASTER       6   4  497
-SETCLUT      7   4  498
-CONTOUR      7   4  499
-MREAD        5   4  500
-MWRITE       6   4  501
-READCUBE     8   4  502
-SLICE        5   4  503
-MLIMITS      7   4  504
-QCONTOUR     8   4  505
-CHEADER      7   4  506
-PLOTDOTS     8   4  507
-MSMOOTH      7   4  508
-MFILL        5   4  509
-ROTATE       6   4  510
-MFFT         4   4  511
-MIFFT        5   4  512
-HOLWINDOW    9   4  513
-HOLFITFOC    9   4  514
-EQHISTLEV    9   4  515
-FUNCLEV      7   4  516
-PUTROW       6   4  517
-PUTCOL       6   4  518
-GETROW       6   4  519
-GETCOL       6   4  520
-MPLUS        5   4  521
-MMINUS       6   4  522
-MMULTIPLY    9   4  523
-MDIVIDE      7   4  524
-MSCALE       6   4  525
-MBIAS        5   4  526
-C-----------------------------------------------------------
-C-                                  AU6
-GMODEL       6   4  530
-GPARTS       6   4  531
-RESIDUAL     8   4  532
-GDISPLAY     8   4  533
-GAUSS        5   4  534
-C----------------------------------------------------------
-C-                                  AU7
-FFT          3   4  535
-IFFT         4   4  536
-POWSPEC      7   4  537
-C---------------------------------------------------------
-C-                                  AU8
-HEADER       6   4  540
-TABLE        5   4  541
-ADDSTACK     8   4  542
-DELETE       6   4  543
-EMPTY        5   4  544
-SCLEAR       6   4  545
-TITLE        5   4  546
-DOC          3   4  547
-THUMB        5   4  548
-OSB          3   4  549
-SELECT       6   4  550
-C---------------------------------------------------------
-C-                                  AU9
-RIPPLE       6   4  560
-RMODEL       6   4  561
-RSHAPE       6   4  562
-RSHOW        5   4  563
-C---------------------------------------------------------
-C-                                  AUA
-FV           2   4  570
-VF           2   4  571
-VC           2   4  572
-CV           2   4  573
-FC           2   4  574
-CF           2   4  575
-CC           2   4  576
-FF           2   4  577
-VV           2   4  578
-LINE         4   4  579
-HISTOGRAM    9   4  580
-POINTS       6   4  581
-RLINE        5   4  582
-RHIST        5   4  583
-RPOINTS      7   4  584
-FREEY        5   4  585
-HOLDY        5   4  586
-YRANGE       6   4  587
-XRANGE       6   4  588
-SAXIS        5   4  589
-C---------------------------------------------------------
-#ifdef CONTINUUM
-C-                                  CAUB
-CALDBE       6   4  590
-FIXDBE       6   4  591
-ZERO         4   4  592
-SWITCHED     8   4  593
-TOTALPWR     8   4  594
-AVGD         4   4  595
-ONS          3   4  596
-AVG          3   4  597
-SEDITS       6   4  598
-TEMPS        5   4  599
-SOLVETIP     8   4  600
-#else
-C-				   LAUB
-RAP          3   4  590
-GMEASURE     8   4  591
-TEMP         4   4  592
-GETIR        5   4  593
-GETOTF       6   4  594
-GETPOLZ      7   4  595
-#endif
diff -uNr 3.5/sunbin/checkup.exe unipops-3.6/sunbin/checkup.exe
--- 3.5/sunbin/checkup.exe	2000-03-16 11:31:28.000000000 -0700
+++ unipops-3.6/sunbin/checkup.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-#! /bin/csh -f
-#
-# @(#)checkup.exe.sh	5.3 03/20/96
-#
-# Makes sure that if a parent dies, it takes the child with it
-# if the child dies, or both die, simply exit
-# usage: checkup.exe child_pid parent_pid
-#
-if ($#argv < 2) then
-  echo "CHECKUP: Bad inputs" > /dev/console
-  exit(1)
-endif
-#
-if (`isSolaris` == "YES") set solar
-loop:
-  sleep 20
-  if ($?solar) then
-  	/usr/bin/ps -ef | grep $USER > /tmp/ps.$$
-  	set childpid = `awk '{print $2}' /tmp/ps.$$ | grep $1` 
-  	set parentpid = `awk '{print $2}' /tmp/ps.$$ | grep $2` 
-  else
-	/usr/bin/ps > /tmp/ps.$$
-  	set childpid = `awk '{print $1}' /tmp/ps.$$ | grep $1` 
-  	set parentpid = `awk '{print $1}' /tmp/ps.$$ | grep $2` 
-  endif
-  if ($#parentpid == 0 && $#childpid > 0) then
-	kill -6 $childpid[1]
-        rm /tmp/ps.$$
-        exit(0)
-  endif
-  if ($#parentpid > 0 && $#childpid == 0) then
-     rm /tmp/ps.$$
-     exit(0)
-  endif
-  if ($#parentpid == 0 && $#childpid == 0) then
-        rm /tmp/ps.$$
-	exit(0)
-  endif
-  /bin/rm /tmp/ps.$$
-  goto loop
-#
diff -uNr 3.5/sunbin/clearlock.exe unipops-3.6/sunbin/clearlock.exe
--- 3.5/sunbin/clearlock.exe	2000-03-16 11:31:28.000000000 -0700
+++ unipops-3.6/sunbin/clearlock.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-#! /bin/csh -f
-# @(#)clearlock.exe.sh	5.1 06/22/94
-# Clears a left over lock file from a previous POPS run
-#
-set noglob
-if ($#argv < 1) then
-   echo 'USAGE: clearlock.exe prog_name (L or C)'
-else
-   if ($1 == l | $1 == L) then
-      rm -f LLOCKFILE
-   else if ($1 == c | $1 == C) then
-      rm -f CLOCKFILE
-   else
-      echo 'USAGE: clearlock.exe prog_name (L or C)'
-   endif
-endif
-
diff -uNr 3.5/sunbin/comments.exe unipops-3.6/sunbin/comments.exe
--- 3.5/sunbin/comments.exe	2000-03-16 11:31:29.000000000 -0700
+++ unipops-3.6/sunbin/comments.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-#! /bin/csh -f
-# @(#)comments.exe.base	5.2 10/26/94
-# Uses the POPS comments facility
-#
-set filename = /tmp/$USER.cmnt
-if (-e $filename) rm -f $filename
-touch $filename
-#
-echo '--------------------------------------------------------------------'
-echo 'Please enter your suggestions or comments.  If you are reporting a'
-echo 'bug, provide as much detail as possible.'
-#
-if (! $?popseditor) then
-   echo "After entering your comments, type Ctrl-D to send your comments."
-   echo '--------------------------------------------------------------------'
-   cat >> $filename
-else
-   echo "After entering your comments, exit the editor in the normal fashion."
-   echo '--------------------------------------------------------------------'
-   ${popsdir}sunbin/edit2.exe $filename comments.icon "REPORTS"
-endif
-#
-if (! -z $filename) then
-   echo "Your comments will now be electronically mailed to your local unipops"
-   echo "guru and unipops-comments@nrao.edu."
-   mail unipops-comments@nrao.edu  < $filename
-   echo "Thank you for submitting a report."
-else
-   echo "There was nothing in your report -- No report has been sent."
-endif
-rm -f $filename
diff -uNr 3.5/sunbin/comments.exe.base unipops-3.6/sunbin/comments.exe.base
--- 3.5/sunbin/comments.exe.base	2000-03-16 11:31:29.000000000 -0700
+++ unipops-3.6/sunbin/comments.exe.base	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-#! /bin/csh -f
-# @(#)comments.exe.base	5.2 10/26/94
-# Uses the POPS comments facility
-#
-set filename = /tmp/$USER.cmnt
-if (-e $filename) rm -f $filename
-touch $filename
-#
-echo '--------------------------------------------------------------------'
-echo 'Please enter your suggestions or comments.  If you are reporting a'
-echo 'bug, provide as much detail as possible.'
-#
-if (! $?popseditor) then
-   echo "After entering your comments, type Ctrl-D to send your comments."
-   echo '--------------------------------------------------------------------'
-   cat >> $filename
-else
-   echo "After entering your comments, exit the editor in the normal fashion."
-   echo '--------------------------------------------------------------------'
-   ${popsdir}sunbin/edit2.exe $filename comments.icon "REPORTS"
-endif
-#
-if (! -z $filename) then
-   echo "Your comments will now be electronically mailed to your local unipops"
-   echo "guru and unipops-comments@nrao.edu."
-   mail unipops-comments@nrao.edu LOCALMAILLIST < $filename
-   echo "Thank you for submitting a report."
-else
-   echo "There was nothing in your report -- No report has been sent."
-endif
-rm -f $filename
diff -uNr 3.5/sunbin/comments.icon unipops-3.6/sunbin/comments.icon
--- 3.5/sunbin/comments.icon	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/comments.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8001,0xF001,0x8000,0x0001,0x8007,0xF803,0xC000,0x0001,
-	0x8007,0x1C0E,0x6000,0x0001,0x8007,0x1E38,0x3000,0x0001,
-	0x8007,0x1F61,0x9C00,0x0001,0x8007,0xFFFF,0xC600,0x7801,
-	0x8003,0xFFFF,0xA300,0x8801,0x8003,0xFFFE,0x1181,0xD801,
-	0x8003,0xFFFC,0x08C7,0xE001,0x8001,0xFFF1,0x247E,0x0001,
-	0x8003,0xFFE2,0x0278,0x0001,0x800F,0xFF80,0x01F8,0x0001,
-	0x801C,0xFF0C,0x0F8C,0x0001,0x8071,0xFE20,0x3E47,0x0001,
-	0x81C3,0xF840,0xF821,0x8001,0x8783,0xF103,0xE018,0xC001,
-	0x8E07,0xC00F,0x8004,0x6001,0x8C0F,0x020E,0x0002,0x3001,
-	0x860F,0x0440,0x0001,0x1801,0x8384,0x1080,0x0000,0x8C01,
-	0x81C2,0x0100,0x0000,0x4601,0x8061,0x0000,0x0000,0x2381,
-	0x8030,0x8400,0x0000,0x10C1,0x8018,0x4000,0x0000,0x0861,
-	0x800E,0x3000,0x0000,0x0431,0x8007,0x0800,0x0000,0x0819,
-	0x8001,0x8400,0x0000,0x3071,0x8000,0xC200,0x0000,0x40E1,
-	0x8000,0x6100,0x0000,0x8381,0x8000,0x3880,0x0003,0x0701,
-	0x8000,0x1C40,0x0004,0x1E01,0x8000,0x0620,0x0008,0x3801,
-	0x8000,0x0310,0x0010,0xF001,0x8000,0x0188,0x0061,0xC001,
-	0x8000,0x00E6,0x0083,0x8001,0x8000,0x0071,0x010E,0x0001,
-	0x8000,0x0018,0x861C,0x0001,0x8000,0x000C,0x4878,0x0001,
-	0x8000,0x0006,0x30E0,0x0001,0x8000,0x0003,0x93C0,0x0001,
-	0x8000,0x0001,0xC700,0x0001,0x8000,0x0000,0x7E00,0x0001,
-	0x8000,0x0000,0x3C00,0x0001,0x8000,0x0000,0x1000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
diff -uNr 3.5/sunbin/condar.exe unipops-3.6/sunbin/condar.exe
--- 3.5/sunbin/condar.exe	2000-03-16 11:31:35.000000000 -0700
+++ unipops-3.6/sunbin/condar.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-#!/bin/csh -f
-#
-#  @(#)condar.exe.sh	5.1 06/22/94
-#
-set command = $0
-echo ""
-echo "Because of the differences in how each site handles on-line data"
-echo $command:t "is no longer the way to start up unipops."
-echo "Use the following commands: "
-echo ""
-echo "   gbcondar               : for accessing Green Bank on-line data."
-echo "   tuccondar              : for accessing Tucson on-line data."
-echo "   cvcondar               : for post-observation analysis."
-echo ""
-echo "Note: there is currently no remote access of Tucson on-line data."
-echo "Note: to access Green Bank data remotely, you must have permission"
-echo "      from the Green Bank staff.  Contact rmaddale@nrao.edu."
-echo ""
-exit(0)
diff -uNr 3.5/sunbin/cv.mkfiles.unipops unipops-3.6/sunbin/cv.mkfiles.unipops
--- 3.5/sunbin/cv.mkfiles.unipops	2000-03-16 11:31:39.000000000 -0700
+++ unipops-3.6/sunbin/cv.mkfiles.unipops	1969-12-31 17:00:00.000000000 -0700
@@ -1,4 +0,0 @@
-# @(#)cv.mkfiles.unipops	5.1 06/22/94
-#
-#   Charlottesville specific mkfiles.unipops
-#
diff -uNr 3.5/sunbin/cvcondar unipops-3.6/sunbin/cvcondar
--- 3.5/sunbin/cvcondar	2000-03-16 11:31:34.000000000 -0700
+++ unipops-3.6/sunbin/cvcondar	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-#!/bin/csh -f
-#
-#   @(#)cvcondar.sh	5.1 06/22/94
-#
-# Determines whether to call condar or condar.rmt
-#
-onintr ERROR
-#
-setenv INFANTS /tmp/Infants.$$
-if (-e $INFANTS) rm -f $INFANTS
-touch $INFANTS
-#
-${popsdir}sunbin/cvcondar.exe
-#
-ERROR:
-${popsdir}sunbin/infantcide $INFANTS
-rm $INFANTS
diff -uNr 3.5/sunbin/cvline unipops-3.6/sunbin/cvline
--- 3.5/sunbin/cvline	2000-03-16 11:31:34.000000000 -0700
+++ unipops-3.6/sunbin/cvline	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-#!/bin/csh -f
-#
-#   @(#)cvline.sh	5.1 06/22/94
-#
-# Determines whether to call line or line.rmt
-#
-onintr ERROR
-#
-setenv INFANTS /tmp/Infants.$$
-if (-e $INFANTS) rm -f $INFANTS
-touch $INFANTS
-#
-${popsdir}sunbin/cvline.exe
-#
-ERROR:
-${popsdir}sunbin/infantcide $INFANTS
-rm $INFANTS
diff -uNr 3.5/sunbin/defaults.f unipops-3.6/sunbin/defaults.f
--- 3.5/sunbin/defaults.f	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/defaults.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,162 +0,0 @@
-      program defaults
-c
-c     @(#)defaults.f	5.1 06/22/94
-c
-c     Uses the POPSDAT.ADVERBS file and the CORE.INC file to create an
-c     include file for setting default values to adverbs
-c
-      character*80 input
-      character*10 name(200), name1
-      character*19 value(200), infinite
-      integer*2 numoffset, islash, icomma, lparen, rparen, numindex, 
-     .		num, ncomma, nextindex, ierr, offsets(200), number,
-     .		numin, i
-      integer*4 long
-      real*8 d_infinity
-c
-      data value/200*'           '/
-c
-      numoffset = 0
-      number = 0
-      numin = 1
-c
-      write(infinite,5) d_infinity()
-5     format('X''',16r,i16,'''')
-c
-10    continue
-
-     	 read(5,11,end=9999) input
-11	 format(a)
-	 if (index(input,'COMMON') .eq. 0) then
-		goto 10
-	 else
-		goto 12
-	 endif
-c	 Skip over all input lines until you get to COMMON line
-c
-12	islash = index(input,'/')
-	islash = index(input(islash+1:),'/') + islash
-c	Skip over common name definition
-c
-15	icomma = index(input(islash+1:),',') + islash
-c
-	if (icomma .eq. islash) then
-c		We are at the end of the current line
-		read(5,11,end=9999) input
-		if (input(6:6) .ne. '.') goto 99
-c		Stop if the common block definition is over with
-c
-		islash = 6
-c		First field will start in column 6
-		goto 15
-	endif
-c
-	lparen = index(input(islash+1:icomma-1),'(') + islash
-c	If a '(' is present, then we have an array; else we have a scalar
-c
-	if (lparen .eq. islash) then
-c		We have a scalar
-c
-		numindex = 1
-		name1 = input(islash+1:icomma-1)
-	else
-c		We have an array
-c
-		numindex = 1
-		name1 = input(islash+1:lparen-1)
-		rparen = index(input(lparen+1:),')') + lparen
-c		Array must take up at least 1 R*4 word in size; find
-c		location of ')'.
-c
-c		Now start parsing the dimensions
-		nextindex = lparen
-		numindex = 1
-c
-20		ncomma = index(input(nextindex+1:rparen-1),',') + nextindex
-c		Any commas?
-c
-		if (ncomma .eq. nextindex) then
-			read(input(nextindex+1:rparen-1),21,iostat=ierr) num
-21			format(i10)
-			if (ierr .ne. 0) write(0,*) input(islash+1:icomma-1),
-     .							'Bad input?'
-			numindex = numindex * num
-			icomma = index(input(rparen+1:),',') + rparen
-
-		else
-			read(input(nextindex+1:ncomma-1),21,iostat=ierr) num
-			if (ierr .ne. 0) write(0,*) input(islash+1:icomma-1),
-     .							'Bad input line?'
-			numindex = numindex * num
-			nextindex = ncomma
-			goto 20
-		endif
-	endif
-c
-	if (name1 .eq. 'ALPHABET') then
-c	    Doing single-letter adverbs
-c
-	    do 80 i = 1, numindex
-	    	number = number + 1
-	    	if (number .gt. 200) goto 9999
-	    	numoffset = numoffset + 1
-	    	offsets(number) = numoffset
-		name(number) = name1
-80	    	continue
-	else
-	   number = number + 1
-	   if (number .gt. 200) goto 9999
-	   numoffset = numoffset + numindex
-	   offsets(number) = numoffset
-	   name(number) = name1
-	endif
-c
-	islash = icomma
-	goto 15
-c
-99    open(unit=10, file='POPSDAT.ADVERBS',status='old',
-     .		form='formatted')
-      rewind(10)
-c
-101     read(10,11,end=9999) input
-	if (input(1:2) .eq. 'C-' .or. input(1:2) .eq. '  ') goto 101
-c	Skip comment/blank lines
-c
-	numin = numin + 1
-	if (numin .gt. number) goto 200
-	if (input(18:18) .eq. '8' .or. input(18:18) .eq. '7') goto 101
-	if (input(50:59) .ne. '          ') then
-	    value(numin) = input(50:59)
-	    if (value(numin) .eq. 'INFINITY   ') value(numin) = infinite
-	else 
-	    value(numin) = input(31:40)
-	endif
-	if (ierr .ne. 0) write(0,*) input(1:40), 'Bad input?'
-      	goto 101
-c
-200   continue
-c
-c     All done... Now proceed with creating initialization lines.
-c
-      write(6,*) '      INTEGER*2 OFFSETS(',number+1,'), NUMTAGS'
-      write(6,*) '      REAL*8 DEFVALUES(',number+1,')'
-      write(6,*) '      DATA NUMTAGS/',number+1,'/'
-c
-      do 210 i = 1, number
-	if (value(i) .eq. '           ') then
-	  write(6,205)  i, offsets(i-1)+1, i, infinite
-205	  format('      DATA OFFSETS(', i3, ') /', i6, '/, DEFVALUES(',
-     .				      i3, ') /', a, '/' )
-	else
-	  write(6,205)  i, offsets(i-1)+1, i, value(i)
-	endif
-210	continue
-      write(6,205)  number+1, offsets(number)+1, number+1, infinite
-c
-      write(0,*) 'DEFAULTS.EXE: Normal termination'
-      call exit(long(0))
-      stop
-9999  write(0,*) 'DEFAULTS.EXE: Abnormal termination'
-      call exit(long(1))
-      stop
-      end
diff -uNr 3.5/sunbin/edit.exe unipops-3.6/sunbin/edit.exe
--- 3.5/sunbin/edit.exe	2000-03-16 11:31:29.000000000 -0700
+++ unipops-3.6/sunbin/edit.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,43 +0,0 @@
-#! /bin/csh -f
-# @(#)edit.exe.sh	5.1 06/22/94
-# Uses an editor to create/edit a file; uses the edit2.exe script which does all
-# the real work.
-#  Usage: edit.exe <filename>
-#  or     edit.exe (and name of file will be asked for)
-#
-if ($#argv < 1) then
-  echo -n 'Enter name of the file you want to edit: '
-  set filename = $<
-else
-  set filename = $1
-endif
-# Use supplied filenanme or ask for one.
-#
-#   If filename exists in $popsproc1 or $popsproc2, copy it over
-#   and edit the copy.
-set edit_found = "FALSE"
-if (-e $filename) then
-   set edit_found = "TRUE"
-endif
-if ($?popsproc1 != 0 && $edit_found == "FALSE") then
-   if (-e $popsproc1/$filename) then
-      cp $popsproc1/$filename $filename
-      if ($status == 0) then
-         chmod +w $filename
-         set edit_found = "TRUE"
-         echo $filename copied from $popsproc1 for editing.
-      endif
-   endif
-endif
-if ($?popsproc2 != 0 && $edit_found == "FALSE") then
-   if (-e $popsproc2/$filename) then
-      cp $popsproc2/$filename $filename
-      if ($status == 0) then
-         chmod +w $filename
-         echo $filename copied from $popsproc2 for editing.
-      endif
-   endif
-endif
-#
-exec ${popsdir}sunbin/edit2.exe $filename comments.icon "EDIT" YES
-#
diff -uNr 3.5/sunbin/edit2.exe unipops-3.6/sunbin/edit2.exe
--- 3.5/sunbin/edit2.exe	2000-03-16 11:31:33.000000000 -0700
+++ unipops-3.6/sunbin/edit2.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,124 +0,0 @@
-#! /bin/csh -f
-# @(#)edit2.exe.sh	5.1 06/22/94
-# Uses an editor specified by the env. variable $popseditor.  Tries to trap
-# running a window editor while not running SUNVIEW.  
-#  Usage: edit2.exe <filename> <icon> <label> <bg>
-#  FILENAME =  file to edit
-# ICON = icon file assumed to be in $popsdir/sunbin
-# LABEL = a lebel for the icon
-# BG = optional; if anything, then a window edit session will be put in the
-#	background
-#
-# Default editor (usually vi); must be usable outside of windows
-set default = /usr/ucb/vi
-#
-# List of available window-only editors
-set windows = (/usr/openwin/bin/textedit /usr/local/bin/emacstool)
-#
-# List of available window and non-window editors
-set nonwindow = (/usr/ucb/vi /usr/local/bin/edt /usr/local/bin/emacs)
-#
-if ($#argv < 3) then
-  echo 'Usage:  filename icon label [background]'
-else
-  set filename = $1
-  set icon = $2
-  set label = $3
-  if ($#argv >= 4) set bg
-endif
-# Get input params
-#
-if ($?popseditor) then
-  set editor=$popseditor
-else
-  echo "You have not defined an editor... Using" $default:t "instead"
-  echo -n "Hit q to quit, anything else to continue: "
-  set answr = $<
-  if ($answr != "q" && $answr != "Q") then
-	set editor = $default
-  else
-	exit(1)
-  endif
-endif
-#  Use default if the user hasn't specified an editor in his/her env. variables.
-#
-if ($?WINDOW_PARENT || $?DISPLAY) then
-#
-#   you are in windows
-#
-    if ($?WINDOW_PARENT || $?DISPLAY) then
-    foreach avail ($windows)
-      if ($editor == $avail:t || $editor == $avail) then
-        if ($?bg) then
-	  ${popsdir}sunbin/rundaemon $avail -WL "$label" -Wl "$label" \
-		 -WI ${popsdir}sunbin/$icon $filename
-	else
-	  $avail -WL "$label" -Wl "$label" \
-		 -WI ${popsdir}sunbin/$icon $filename 
-	endif
-	exit(0)
-      endif
-    end 
-#   Call up window editor, if one is specified
-#
-    foreach avail ($nonwindow)
-      if ($editor == $avail:t || $editor == $avail) then
-        if ($?bg) then
-    	   if ($?WINDOW_PARENT) then
-         	exec cmdtool -WL "$label" -Wl "$label" \
-		   -WI ${popsdir}sunbin/$icon $avail $filename &
-	   else
-	 	exec xterm -j -sb -wf -sl 1000 -title "$label" -n "$label"  \
-		-e $avail $filename &
-	   endif
-	else
-    	   if ($?WINDOW_PARENT) then
-         	exec cmdtool -WL "$label" -Wl "$label" \
-		   -WI ${popsdir}sunbin/$icon $avail $filename
-	   else
-	 	exec xterm -j -sb -wf -sl 1000 -title "$label" -n "$label"  \
-		-e $avail $filename
-	   endif
-	endif
-	exit(0)
-      endif
-    end 
-    endif
-#   Call up non-window editor, if one is specified; use CMDTOOL as a window
-#   to run editor in
-#
-    goto error
-#
-else
-#
-#    You are not in windows
-#
-    foreach avail ($windows)
-      if ($editor == $avail:t || $editor == $avail) then
-        echo "Cannot use" $avail "outside of Windows... Using" $default:t "instead"
-        echo -n "Hit q to quit, anything else to continue: "
-        set answr = $<
-        if ($answr != "q" && $answr != "Q") then
-	   set editor = $default
-	else
-	   exit(1)
-	endif
-      endif
-    end
-#   You have specified a windows-only editor; try out default editor on user
-#
-    foreach avail ($nonwindow)
-      if ($editor == $avail:t || $editor == $avail) then
-	exec $editor $filename
-	exit(0)
-      endif
-    end
-#   You have specified a non-window editor so just start it up
-#
-endif
-#
-error:
-echo "Your specified editor," $popseditor ", is NOT available"
-exit(1)
-#  Only a non-available editor would get you to this point.
-#
diff -uNr 3.5/sunbin/explain.icon unipops-3.6/sunbin/explain.icon
--- 3.5/sunbin/explain.icon	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/explain.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x7401,
-	0x8060,0x0000,0x0001,0x9401,0x805C,0x0000,0x0006,0x0A01,
-	0x8043,0x8000,0x0038,0x0A01,0x8080,0x7000,0x00C0,0x0A01,
-	0x8080,0x0E00,0x0700,0x0501,0x8090,0x01C0,0x1801,0x0501,
-	0x8100,0x0038,0x600A,0x0501,0x8111,0x0007,0x8070,0x0281,
-	0x8100,0x4001,0x0180,0x0281,0x8200,0x2001,0x0003,0x0281,
-	0x8218,0x0801,0x3008,0x0141,0x8200,0x9021,0x0028,0x0141,
-	0x8400,0x8001,0x03C0,0x2141,0x8430,0x4001,0x0C00,0x40A1,
-	0x8404,0x0181,0x1000,0x80A1,0x8406,0x0021,0x0000,0x00A1,
-	0x8881,0x0009,0x0028,0x0891,0x8800,0x6011,0x0300,0x0051,
-	0x8818,0x1001,0x0800,0x0050,0x900C,0x0201,0x0801,0x0048,
-	0x9000,0x8081,0x0003,0x0028,0x1040,0x1041,0x000C,0x0028,
-	0x2020,0x0409,0x0070,0x0C24,0x2006,0x0161,0x0800,0x0014,
-	0x2000,0x0051,0x0010,0xE014,0x40E0,0x0401,0x0050,0x0212,
-	0xC010,0x0001,0x2080,0x000A,0x7006,0x0081,0x2200,0x180E,
-	0x4E00,0x0001,0x0200,0xE033,0x8180,0x2005,0x001B,0x01C3,
-	0xC070,0x0005,0x0000,0x0603,0x3C0C,0x0501,0x00C0,0x383C,
-	0x03C3,0x0061,0x2301,0xC3C0,0x003C,0xE001,0x100E,0x3C0E,
-	0x0003,0xD801,0x0073,0xC3F0,0x0000,0x3F01,0x01BC,0xFC00,
-	0x0000,0x03C1,0x0FFF,0x0000,0x0000,0x003F,0xFFC0,0x0000,
-	0x0000,0x0003,0xF000,0x0000,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
-	0x0000,0x0000,0x0000,0x0000,0x7F3D,0xDF8F,0x00C0,0xF1CE,
-	0x3118,0x8CC6,0x00C0,0x60E4,0x300D,0x0CC6,0x00C0,0x60E4,
-	0x300E,0x0CC6,0x00C0,0x60B4,0x3406,0x0CC6,0x0160,0x60B4,
-	0x3C06,0x0F86,0x0160,0x609C,0x3406,0x0C06,0x01E0,0x609C,
-	0x3007,0x0C06,0x0160,0x608C,0x300B,0x0C06,0x0230,0x608C,
-	0x3111,0x8C06,0x2230,0x6084,0x7F3B,0xDE0F,0xE778,0xF1C4,
-	0x0000,0x0000,0x0000,0x0000,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
-	0xFFFF,0xFFFF,0xFFFF,0xFFFE,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0xFFFF,0xFFFF,0xFFFF,0xFFFF
diff -uNr 3.5/sunbin/explain2.exe unipops-3.6/sunbin/explain2.exe
--- 3.5/sunbin/explain2.exe	2000-03-16 11:31:29.000000000 -0700
+++ unipops-3.6/sunbin/explain2.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-#! /bin/csh -f
-# @(#)explain2.exe.sh	5.1 06/22/94
-# Uses the POPS hiearchial EXPLAIN facility
-#
-set noglob
-#
-if ($#argv < 1) then
-   set topic
-else
-   set topic = $1
-endif
-#
-cd ${popsdir}explain/text
-if ($?WINDOW_PARENT || $?DISPLAY) then
-     if ($?WINDOW_PARENT) then
-        exec cmdtool  -Wl "Explain" -WL ""  -WI \
-	   ${popsdir}sunbin/explain.icon ${popsdir}explain/source/explain \
-	   expdir $topic &
-     else
-	exec xterm -j -sb -wf -sl 1000 -title "Explain" -n "EXPLAIN"  \
-	    -e ${popsdir}explain/source/explain expdir $topic &
-     endif
-else
-     exec ${popsdir}explain/source/explain expdir $topic
-endif
-
diff -uNr 3.5/sunbin/filecomp.exe unipops-3.6/sunbin/filecomp.exe
--- 3.5/sunbin/filecomp.exe	2000-03-16 11:31:35.000000000 -0700
+++ unipops-3.6/sunbin/filecomp.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-#!/bin/csh -f
-#
-# @(#)filecomp.exe.sh	5.1 06/22/94
-# File completion script
-#
-if ($#argv == 2) then
-   rm -f $2
-   set filename = $1
-   touch $2 >& /dev/null
-   if ( $status == 0) then
-      if ( -f $2 ) then
-         echo $1 > $2
-         exit(0)
-      endif
-   endif
-   exit(1)
-endif
-#  	if argv > 2, that probably means a * expanded to too many files
-exit(2)
diff -uNr 3.5/sunbin/gb.nrao.mkfiles.unipops unipops-3.6/sunbin/gb.nrao.mkfiles.unipops
--- 3.5/sunbin/gb.nrao.mkfiles.unipops	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/gb.nrao.mkfiles.unipops	1969-12-31 17:00:00.000000000 -0700
@@ -1,4 +0,0 @@
-# @(#)gb.nrao.mkfiles.unipops	5.1 06/22/94
-#
-#   Green Bank specific mkfiles.unipops
-#
diff -uNr 3.5/sunbin/gbcondar unipops-3.6/sunbin/gbcondar
--- 3.5/sunbin/gbcondar	2000-03-16 11:31:29.000000000 -0700
+++ unipops-3.6/sunbin/gbcondar	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-#!/bin/csh -f
-#
-#   @(#)gbcondar.sh	5.2 08/02/94
-#
-# Determines whether to call condar or condar.rmt
-#
-onintr ERROR
-#
-setenv INFANTS /tmp/Infants.$$
-if (-e $INFANTS) rm -f $INFANTS
-touch $INFANTS
-#
-if (`hostname` == "fahd") then
-   ${popsdir}sunbin/gbcondar.exe
-else
-   ${popsdir}sunbin/gbcondar.rmt.exe
-endif
-#
-ERROR:
-${popsdir}sunbin/infantcide $INFANTS
-rm $INFANTS
diff -uNr 3.5/sunbin/gbline unipops-3.6/sunbin/gbline
--- 3.5/sunbin/gbline	2000-03-16 11:31:29.000000000 -0700
+++ unipops-3.6/sunbin/gbline	1969-12-31 17:00:00.000000000 -0700
@@ -1,21 +0,0 @@
-#!/bin/csh -f
-#
-#   @(#)gbline.sh	5.2 08/02/94
-#
-# Determines whether to call line or line.rmt
-#
-onintr ERROR
-#
-setenv INFANTS /tmp/Infants.$$
-if (-e $INFANTS) rm -f $INFANTS
-touch $INFANTS
-#
-if (`hostname` == "fahd") then
-   ${popsdir}sunbin/gbline.exe
-else
-   ${popsdir}sunbin/gbline.rmt.exe
-endif
-#
-ERROR:
-${popsdir}sunbin/infantcide $INFANTS
-rm $INFANTS
diff -uNr 3.5/sunbin/getbits.prc unipops-3.6/sunbin/getbits.prc
--- 3.5/sunbin/getbits.prc	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/getbits.prc	1969-12-31 17:00:00.000000000 -0700
@@ -1,13 +0,0 @@
-proc getbits(a)
-array bits(0 to 31)
-scalar i
-for i = 31 to 0 by -1
-    if a/(2**i) >= 1 then
-    	print a, i
-    	bits(i) = 1
-    	a = a - (2**i)
-    else
-    	bits(i) = 0
-    end; end   
-return
-finish
diff -uNr 3.5/sunbin/help.exe unipops-3.6/sunbin/help.exe
--- 3.5/sunbin/help.exe	2000-03-16 11:31:30.000000000 -0700
+++ unipops-3.6/sunbin/help.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,36 +0,0 @@
-#! /bin/csh -f
-# @(#)help.exe.sh	5.1 06/22/94
-# Displays selected set of POPS explain file without using EXPLAIN.  Only one
-# file is displayed.
-#
-set noglob
-cd ${popsdir}explain/text
-set com = $0
-set tmp = /tmp/$com:t.$$
-#
-if ($#argv >= 1) then
-    set topic = `echo $1 | tr [a-z] [A-Z]`
-    if ($topic == "HELP") set topic = Help-Facilities
-#
-    (${popsdir}explain/source/manonepage expdir $topic XPLN >! $tmp) >& /dev/null
-#   Create temporary file for prcdir.exe to work on
-#
-    if (-z $tmp) then
-	echo $com:t : No topic with the name of $1
-    else
-       	if ($?WINDOW_PARENT || $?DISPLAY) then
-   	   if ($?WINDOW_PARENT) then
-	      exec cmdtool -WL "" -Wl "" -WI ${popsdir}sunbin/help.icon  \
-		${popsdir}sunbin/prcdir.exe $tmp & 
-	   else
-	      exec xterm -j -sb -wf -sl 1000 -title "HELP" -n "HELP"  \
-		-e ${popsdir}sunbin/prcdir.exe $tmp &
-	   endif
-      	else
-           exec ${popsdir}sunbin/prcdir.exe $tmp
-      	endif
-    endif
-else
-    echo Usage: $com:t topic
-endif
-#
diff -uNr 3.5/sunbin/help.icon unipops-3.6/sunbin/help.icon
--- 3.5/sunbin/help.icon	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/help.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x03FF,0xC000,0x0001,
-	0x807F,0xFFFF,0x7FC0,0x0001,0x83DF,0xFE01,0xFFE0,0x0001,
-	0x83F0,0x0000,0x007F,0x8001,0x8E00,0x0000,0x0007,0xE001,
-	0x9C00,0x0000,0x0000,0xF801,0x9800,0x0000,0x0000,0x1601,
-	0xB000,0x0000,0x0000,0x0D01,0xE000,0x0000,0x0000,0x03C1,
-	0xE000,0x0000,0x0000,0x01E1,0xE180,0x0000,0x0000,0x0071,
-	0xE180,0x0000,0x0000,0x003D,0xC081,0x9C06,0x00FC,0x0015,
-	0xC0C1,0x9FC6,0x00FF,0x810F,0xC0C1,0x99E6,0x00C3,0xC38F,
-	0xC0C1,0x9806,0x00C0,0xE307,0xC0C1,0x9806,0x00C0,0x6387,
-	0xC0C1,0x9806,0x00C0,0x6383,0xC0C1,0x9806,0x00C0,0x6381,
-	0x80C1,0x9806,0x00C0,0xE383,0xC0E1,0x9FC6,0x00FF,0xE383,
-	0xC0FD,0x9EE6,0x00FF,0x8383,0xC0DF,0xCC06,0x0060,0x0381,
-	0x80CF,0xCC06,0x0060,0x0103,0xC0C0,0xCC06,0x0060,0x0383,
-	0xC0C0,0xCC06,0x0060,0x0103,0xC0C0,0xCC03,0x0060,0x0103,
-	0xC0C0,0xCC03,0x0060,0x0101,0xC0C0,0xCC03,0x0060,0x0101,
-	0xC0C0,0xCC03,0x0060,0x0003,0xE0C0,0xCFF3,0xFE60,0x0303,
-	0xE040,0x8FD3,0xFE60,0x0307,0xF000,0x0000,0x0000,0x000F,
-	0x9800,0x0000,0x0000,0x001D,0x9800,0x0000,0x0000,0x0019,
-	0x9800,0x0000,0x0000,0x0031,0x9C00,0x0000,0x0000,0x0071,
-	0x8C00,0x0000,0x0000,0x00E1,0x8600,0x0000,0x0000,0x01C1,
-	0x8500,0x0000,0x0000,0x0381,0x8380,0x0000,0x0000,0x1F01,
-	0x80C0,0x0000,0x0000,0xFE01,0x8070,0x0000,0x00FF,0xF001,
-	0x801E,0x0000,0x1FFF,0x8001,0x8007,0xE07F,0xFF00,0x0001,
-	0x8003,0xE07F,0xF800,0x0001,0x8000,0x6060,0x0000,0x0001,
-	0x8000,0x6060,0x0000,0x0001,0x8000,0x60C0,0x0000,0x0001,
-	0x8000,0xC180,0x0000,0x0001,0x8000,0xC380,0x0000,0x0001,
-	0x8003,0x8F00,0x0000,0x0001,0x8002,0x1C00,0x0000,0x0001,
-	0x8006,0xF800,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
diff -uNr 3.5/sunbin/hpprint unipops-3.6/sunbin/hpprint
--- 3.5/sunbin/hpprint	2000-03-16 11:31:33.000000000 -0700
+++ unipops-3.6/sunbin/hpprint	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-#! /bin/csh -f
-# @(#)hpprint.sh	5.1 06/22/94
-# Script for printing to HPGL printer
-#
-if ($#argv < 2) exit(1)
-if (-z $2) exit(0)
-#
-echo "cat ${popsdir}sunbin/hpstart $2 ${popsdir}sunbin/hpterm | $1" | /bin/csh -f
diff -uNr 3.5/sunbin/hpstart unipops-3.6/sunbin/hpstart
--- 3.5/sunbin/hpstart	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/hpstart	1969-12-31 17:00:00.000000000 -0700
@@ -1,2 +0,0 @@
-IN;
-SP2;IP1,1,10080,7825;SC1,1024,1,800;PU1,1;
diff -uNr 3.5/sunbin/hpterm unipops-3.6/sunbin/hpterm
--- 3.5/sunbin/hpterm	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/hpterm	1969-12-31 17:00:00.000000000 -0700
@@ -1,2 +0,0 @@
-PG 1;
-SP0;
diff -uNr 3.5/sunbin/identify.exe unipops-3.6/sunbin/identify.exe
--- 3.5/sunbin/identify.exe	2000-03-16 11:31:30.000000000 -0700
+++ unipops-3.6/sunbin/identify.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,57 +0,0 @@
-#! /bin/csh -f
-#
-#  @(#)identify.exe.sh	5.1 06/22/94
-#
-# IDENTIFY help utility
-#
-set noglob
-#
-if ($#argv == 0) then
-   echo -n "Enter topic (blanks to quit): "
-   set topic = $<
-   if ($topic == "") exit(0)
-else
-   set topic = $1
-endif
-#  Find topic if not given on command line.
-#
-if ($#argv == 1) then
-   set degree = 0
-else if ($#argv == 0) then
-   echo -n "Enter degree of search (0 = fast, 1 = complete): "
-   set degree = $<
-else
-   set degree = $2
-endif
-#
-degloop:
-if ($degree != 0 && $degree != 1) then
-   echo -n "Enter degree of search (0 = fast, 1 = complete): "
-   set degree = $<
-   goto degloop
-endif
-# Find degree of search if nothing on command line
-#
-unset noglob
-if ($degree == 0) then
-  cd ${popsdir}help
-  grep -i $topic * | grep -v SCCS |& grep -v ^grep | sed -e s/:PRINT/": "/ | sed -e s/:print/": "/
-# Do short IDENTIFY using short help files
-# 
-else
-  cd ${popsdir}explain/text
-  set directs = `find . -type f -name "*.text" -print | grep -v SCCS`
-  grep -i $topic $directs |& grep -v ^grep | grep -v ":\#" > ! /tmp/ident.$$
-  set files = `cut -f1 -d: /tmp/ident.$$`
-  if (-e /tmp/ident1.$$) rm /tmp/ident1.$$
-  touch /tmp/ident1.$$
-  foreach fle ($files)
-    basename $fle .text >> /tmp/ident1.$$
-  end
-  cut -f2- -d: /tmp/ident.$$ | paste -d: /tmp/ident1.$$ -
-  rm /tmp/ident*.$$
-#  For higher degree search, go thru explain file directory looking for
-#  matches
-endif
-	
-      
Files 3.5/sunbin/ihstorgb and unipops-3.6/sunbin/ihstorgb differ
diff -uNr 3.5/sunbin/infantcide unipops-3.6/sunbin/infantcide
--- 3.5/sunbin/infantcide	2000-03-16 11:31:35.000000000 -0700
+++ unipops-3.6/sunbin/infantcide	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-#! /bin/csh -f
-#
-#  @(#)infantcide.sh	5.3 09/10/97
-#
-# Practices Infantcide on the processes logged in $argv[1]
-#
-if ($#argv == 0) then
-   set com = $0
-   echo Usage:  $com:t  Infant_file
-   exit(0)
-endif
-#
-# ps differs between SunOS and Solaris
-# default is SunOS ps
-set PS = "/usr/bin/ps -g"
-# check for Solaris
-if (`isSolaris` == "YES") then
-   set PS = "/usr/bin/ps -ef"
-endif
-#
-set tmpfile = /tmp/prc.$$
-set proc1 = `cat $1`
-set procs = ($proc1)
-if ($#procs >= 1) then
-   echo "Attempting to kill child processes"
-   if (-e $tmpfile) rm $tmpfile
-   $PS > $tmpfile
-   foreach proc ($procs)
-	grep -s $proc $tmpfile
-	if ($status == 0) kill $proc 
-   end
-   rm $tmpfile
-endif
-#
diff -uNr 3.5/sunbin/isSolaris unipops-3.6/sunbin/isSolaris
--- 3.5/sunbin/isSolaris	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/isSolaris	1969-12-31 17:00:00.000000000 -0700
@@ -1,12 +0,0 @@
-#!/bin/sh
-# @(#)isSolaris.sh	1.1 10/27/94
-#
-#  Script to determine if this Solaris is running
-#  Uses "uname -r" : if the version number is < 5, assume SunOS
-#  echo YES if Solaris, else NO
-#
-ver=`/usr/bin/uname -r | awk -F. '{ print $1 }'`
-if [ $ver -lt 5 ]
-then echo NO
-else echo YES
-fi
diff -uNr 3.5/sunbin/killgraph.exe unipops-3.6/sunbin/killgraph.exe
--- 3.5/sunbin/killgraph.exe	2000-03-16 11:31:34.000000000 -0700
+++ unipops-3.6/sunbin/killgraph.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,51 +0,0 @@
-#!/bin/csh -f
-#
-#  @(#)killgraph.exe.sh	5.3 09/10/97
-#
-# Finds out if one can restart a graphics window and, if so, restarts
-# one.
-#
-
-if ($#argv != 5) then
-    echo 'KILLGRAPH: Bad parms' $argv > /dev/console
-    exit(-1)
-endif
-
-# ps differs from SunOS to Solaris
-# default case, SunOS
-set PS = "/usr/bin/ps -g"
-# check for SunOS
-if (`isSolaris` == "YES") then
-   set PS = "/usr/bin/ps -ef"
-endif
-
-set graphup = \
-  `$PS | grep graphics.exe | grep $1 | grep $3 | grep -v grep | grep -v popstool | grep -v makegraph2`
-
-loop:
-
-echo ' '
-if ($#graphup >= 1) then
-   echo Graphics window exists.... 
-   echo -n 'Do you want to destroy it (y or n : default = n) ? '
-   set answr = $<
-   if ($answr == "" || $answr == 'n' || $answr == 'N') then
-	echo 'Graphics window retained... Nothing has been done'
-   else if ($answr == 'y' || $answr == 'Y') then
-	echo 'Killing window... New one should automatically appear.'
-	kill -9 $graphup[1]
-	echo 'If new one does not appear in 5 sec., reissue this command'
-   else
-	echo 'Bad answer... Try again...'
-	goto loop
-   endif
-
-else
-
-   echo 'Creating new graphics window'
-   makegraph2.exe $1 $2 $3 $4 $5&
-
-endif
-
-echo ' '
-exit(0)
diff -uNr 3.5/sunbin/kp.nrao.edu.mkfiles.unipops unipops-3.6/sunbin/kp.nrao.edu.mkfiles.unipops
--- 3.5/sunbin/kp.nrao.edu.mkfiles.unipops	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/kp.nrao.edu.mkfiles.unipops	1969-12-31 17:00:00.000000000 -0700
@@ -1,11 +0,0 @@
-# @(#)kp.nrao.edu.mkfiles.unipops	5.1 06/22/94
-#
-#   12-m (Kitt Peak) specific mkfiles.unipops
-#   handles empty GAINS file and copying default SETUP files
-#
-if (! -e LGAINS) ${popsdir}sunbin/makefile.exe LGAINS
-echo -n "."
-if (! -e LSETUP && -e ~obs/LSETUP) cp ~obs/LSETUP LSETUP
-echo -n "."
-if (! -e CSETUP && -e ~obs/CSETUP) cp ~obs/CSETUP CSETUP
-echo -n "."
diff -uNr 3.5/sunbin/line.exe unipops-3.6/sunbin/line.exe
--- 3.5/sunbin/line.exe	2000-03-16 11:31:35.000000000 -0700
+++ unipops-3.6/sunbin/line.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,19 +0,0 @@
-#!/bin/csh -f
-#
-#  @(#)line.exe.sh	5.1 06/22/94
-#
-set command = $0
-echo ""
-echo "Because of the differences in how each site handles on-line data"
-echo $command:t "is no longer the way to start up unipops."
-echo "Use the following commands: "
-echo ""
-echo "   gbline                 : for accessing Green Bank on-line data."
-echo "   tucline                : for accessing Tucson on-line data."
-echo "   cvline                 : for post-observation analysis."
-echo ""
-echo "Note: there is currently no remote access of Tucson on-line data."
-echo "Note: to access Green Bank data remotely, you must have permission"
-echo "      from the Green Bank staff.  Contact rmaddale@nrao.edu."
-echo ""
-exit(0)
diff -uNr 3.5/sunbin/ls.exe unipops-3.6/sunbin/ls.exe
--- 3.5/sunbin/ls.exe	2000-03-16 11:31:30.000000000 -0700
+++ unipops-3.6/sunbin/ls.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,32 +0,0 @@
-#! /bin/csh -f
-# @(#)ls.exe.sh	5.1 06/22/94 
-# Lists contents of a directory
-#
-if ($#argv < 1) then
-  unset noglob
-  echo -n 'Enter names of desired files (UNIX wild cards accepted): '
-  set filename = $<
-else
-  set noglob
-  set filename = ($argv)
-endif
-# Use supplied filenanme or ask for one.
-#
-ls -l $filename >! /tmp/ls.$$
-if (! -z /tmp/ls.$$) then
-    if ($?WINDOW_PARENT || $?DISPLAY) then
-     if ($?WINDOW_PARENT) then
-         exec cmdtool -WL "DIR"  -Wl "DIR" \
-	    -WI ${popsdir}sunbin/ls.icon ${popsdir}sunbin/prcdir.exe \
-	    /tmp/ls.$$ &
-     else
-	 exec xterm -j -sb -wf -sl 1000 -title "DIR" -n "DIR"  \
-		-e ${popsdir}sunbin/prcdir.exe /tmp/ls.$$ &
-     endif
-    else
-      exec prcdir.exe /tmp/ls.$$
-    endif
-endif
-
-
-
diff -uNr 3.5/sunbin/ls.icon unipops-3.6/sunbin/ls.icon
--- 3.5/sunbin/ls.icon	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/ls.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x1FF0,0x0000,0x0001,
-	0x8000,0xF01F,0xFFFF,0xFFF1,0x8000,0x9FF0,0x0000,0x0011,
-	0x8000,0x8000,0x0000,0x0011,0x8000,0x800F,0xFC00,0x001F,
-	0x801F,0xFFF8,0x07FF,0xFC13,0x8010,0x000F,0xFC00,0x0413,
-	0x8010,0x0000,0x0000,0x0793,0x8010,0x0000,0x0000,0x0493,
-	0x8010,0x0000,0x03FE,0x0493,0x83FF,0xFFFF,0xFE03,0x8493,
-	0x8200,0x0000,0x03FE,0xE493,0x8200,0x0000,0x0000,0xA495,
-	0x821C,0x1000,0x0020,0xA495,0x8212,0x0143,0x0E78,0xA495,
-	0x8212,0x31A4,0x9020,0xA515,0x8212,0x1107,0x1020,0xA515,
-	0x8212,0x1104,0x1020,0xC515,0x821C,0x1103,0x8E18,0xC519,
-	0x8200,0x0000,0x0000,0xC519,0x8200,0x0000,0x0000,0xC519,
-	0x8200,0x0000,0x0000,0xC519,0x8200,0x0000,0x0000,0xC519,
-	0x8200,0x0000,0x0000,0xC619,0x8200,0x0314,0x4800,0xC619,
-	0x8200,0x049A,0x4800,0xC611,0x8200,0x0490,0x4800,0xC611,
-	0x8200,0x0490,0x3800,0xC611,0x8200,0x0310,0x0800,0xC7F1,
-	0x8200,0x0000,0x7000,0xC601,0x8200,0x0000,0x0000,0xC401,
-	0x8200,0x0000,0x0000,0x8401,0x8200,0x0000,0x0000,0x8401,
-	0x8200,0x0000,0x0000,0xFC01,0x8200,0x0000,0x0000,0x8001,
-	0x8200,0x0000,0x0000,0x8001,0x8200,0x0000,0x0000,0x8001,
-	0x83FF,0xFFFF,0xFFFF,0x8001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
diff -uNr 3.5/sunbin/makefile.exe unipops-3.6/sunbin/makefile.exe
--- 3.5/sunbin/makefile.exe	2000-03-16 11:31:30.000000000 -0700
+++ unipops-3.6/sunbin/makefile.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,36 +0,0 @@
-#! /bin/csh -f
-# @(#)makefile.exe.sh	5.1 06/22/94
-#
-# Makes a POPS data file or a POPS memory file in the current directory.
-# For data files, if no size is specified then simply copy EMPTY if it exists,
-# otherwise use makeempty.exe.
-#
-set noglob
-if ($#argv >= 1) then
-   if ($1 == LMEMORY) then
-	cp -i ${popsdir}sunbin/LMEMORY .
-   	if ($status != 0) goto err
-   else if ($1 == CMEMORY) then
-	cp -i ${popsdir}sunbin/CMEMORY .
-   	if ($status != 0) goto err
-   else 
-        if ( $#argv == 1 && -r ${popsdir}sunbin/EMPTY ) then
-	   cp -i ${popsdir}sunbin/EMPTY $1
-   	   if ($status != 0) goto err
-        else
-           ${popsdir}utilities/makeempty.exe $1 $2
-   	   if ($status != 0) goto err
-        endif
-   endif
-   chmod go-wr $1
-   exit(0)
-else
-   echo 'USAGE: makefile.exe filename [filesize]'
-   exit(-1)
-endif
-#
-err:
-echo " "
-echo "***ERROR***  Cannot create file"
-echo " "
-exit(-1)
diff -uNr 3.5/sunbin/makegraph.exe unipops-3.6/sunbin/makegraph.exe
--- 3.5/sunbin/makegraph.exe	2000-03-16 11:31:30.000000000 -0700
+++ unipops-3.6/sunbin/makegraph.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-#! /bin/csh -f
-#
-# @(#)makegraph.exe.sh	5.1 06/22/94
-#
-# Opens a graphics window for Unipops; creates necessary FIFO so that
-# process running in graphics window can talk with UniPOPS
-#
-# usage: makegraph.exe IN_FIFO OUT_FIFO PID U_TYPE W_TYPE
-#   where IN_FIFO = file name for input FIFO
-#        OUT_FIFO = file name for output FIFO
-#             PID = PID of parent (unipops) to pass to checkup.exe
-#          U_TYPE = UniPOPS type: L for Line, C for Continuum
-#          W_TYPE = window manager type, S for suncore, X for X11
-#
-if ($#argv != 5) then
-    echo 'MAKEGRAPH: Bad parms' $argv > /dev/console
-    exit(-1)
-endif
-#
-if (-e $1) rm $1 
-if ($status != 0) exit($status)
-if (-e $2) rm $2
-if ($status != 0) exit($status)
-/etc/mknod $1 p
-if ($status != 0) exit($status)
-/etc/mknod $2 p
-if ($status != 0) exit($status)
-#
-makegraph2.exe $1 $2 $3 $4 $5 &
-#
- 
diff -uNr 3.5/sunbin/makegraph2.exe unipops-3.6/sunbin/makegraph2.exe
--- 3.5/sunbin/makegraph2.exe	2000-03-16 11:31:34.000000000 -0700
+++ unipops-3.6/sunbin/makegraph2.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,68 +0,0 @@
-#! /bin/csh -f
-#  @(#)makegraph2.exe.sh	5.1 06/22/94
-#
-# Loops creating graphics windows until the graphics window dies a natural
-# death (status = 0), a prescribed death (status = 6), or a fatal death 
-# (status < 0)
-#
-if ($#argv != 5) then
-    echo 'MAKEGRAPH2: Bad parms' $argv 
-    exit(-1)
-endif
-
-set numdth = 0
-set nummax = 5
-set time_try = `date +\%H\%M\%S`
-set timemax = 10
-# set up a counter for how may tries will be atempted before
-# quiting.  Also set up the time for trying beyond which a death
-# of the graphics will reset the counter to zero.
-loop:
-
-  if ($5 == "S" || $5 == "s") then
-     if ($4 == "l" || $4 == "L") then
-        popstool.exe scgraphics.exe $1 $2 $3 -Wi -WL LinePlot \
-				-Wl LinePlot  -Ws 870 620
-        set death = $status
-      else
-        popstool.exe scgraphics.exe $1 $2 $3 -Wi -WL ContPlot \
-				-Wl ContPlot -Ws 870 620
-        set death = $status
-      endif
-   else
-      if ($4 == "l" || $4 == "L") then
-         xgraphics.exe $1 $2 $3 -iconic -name LinePlot -geometry 580x448-20+5
-         set death = $status
-      else
-         xgraphics.exe $1 $2 $3 -iconic -name ContPlot -geometry 580x448-5-5
-         set death = $status
-      endif
-   endif
-#
-  if ($death <= 0 || $death == 6 || $death > 64) then
-	if ($death != 0) then
-            echo " "
-	    echo 'Graphics window has died: Return code = ' $death 
-        endif
-	exit(0)
-  else
-        echo " "
-	echo 'Graphics window has died: Return code = ' $death 
-	if ($numdth > $nummax) then
-	    echo " "
-	    echo "Have tried $numdth times with no success... giving up..."
-	    echo 'You may need to Ctrl-C at this point\!\!'
-	    echo " "
-	    exit(1)
-	else
-  	    echo 'Trying to start a new graphics window....' 
-	    set time_death = `date +\%H\%M\%S`
-	    @ time_diff = $time_death - $time_try
-	    if ($time_diff > $timemax) then
-		set numdth = 0
-	    else
-	        @ numdth = $numdth + 1
-	    endif
-	    set time_try = $time_death
-	    goto loop
-  endif
diff -uNr 3.5/sunbin/makelocal unipops-3.6/sunbin/makelocal
--- 3.5/sunbin/makelocal	2000-03-24 12:10:21.000000000 -0700
+++ unipops-3.6/sunbin/makelocal	1969-12-31 17:00:00.000000000 -0700
@@ -1,131 +0,0 @@
-#!/bin/csh
-#
-# @(#)makelocal	5.8 03/24/00 
-#
-#-------------------------------------------------------------------------
-# Shell script to do a make with values for some crucial macros as 
-# appropriate locally.
-#
-# The uncommented values found here are appropriate for:  optimization 
-# level 2, no special floating-point options, equipped with inline math 
-# libraries, and using Sun's WorkShop compilers (f77 and cc) version 4.2
-#
-#-------------------------------------------------------------------------
-set CDEBOROPT = -xO2
-set FDEBOROPT = -xO2
-#	Debug option for C and Fortran compiler.  Some compilers use different
-#	flags to indicate optimization level.  Check the man page for the
-#	compilers you will be using to make sure you get this correct.
-#	We recommend something equivalent to -O2, optimization level 2, which
-#	we feel is safe.  Change the -O2 to -g if you want to compile with
-#	the debugger (or see the man page for your compiler to make sure
-#	you get this flag set appropriately)..
-#
-#-------------------------------------------------------------------------
-set FLOATOPT = 
-#	Floating point options (e.g. on a sun3 you may wish to set 
-#       this to -f68881 (i.e., set FLOATOPT = -f6888).  This option has
-#       not been tested with anything than the above unset value in years.
-#
-#-------------------------------------------------------------------------
-set CCMP = "cc"
-set FCMP = "f77"
-set F77VS = "VS2_0_1"
-#       The above define which C and Fortran compilers to use.
-#
-#       With the current WorkShop fortran compiler, you must also set F77VS = "VS2_0_1",
-#       this badly named variable is used to set the appropriate "MAIN" variable
-#       in the code.
-#-------------------------------------------------------------------------
-set LIBCORE = (/usr/old/libcore77.a /usr/old/libcore.a)
-#	Ignore if you are not compiling the Sunview version.
-#
-#	The sunview display server is unavailable under Solaris because
-#	these libraries no longer work with Solaris.
-#
-#       These libraries are no longer available at NRAO and hence the dependent
-#       is likely to no longer work.
-#
-#-------------------------------------------------------------------------
-set FILLIB = -xlibmil
-set CILLIB = -xlibmil
-#       These trigger the use of inline functions.  This may make the
-#       program run faster.  Set these as appropriate to your machine.
-#	If you don't have one of the libm.il's then replace that
-#	variable with simply -lm (the standard math library).  
-#
-#-------------------------------------------------------------------------
-set XHOME=/opt/local/X11R5
-#       Change this to point to the top-level of an X11R5 installation.
-#    .  The X libraries should be in $XHOME/lib and the X include files 
-#       should be in $XHOME/include.
-#
-set EXTRAXLIBS =
-# set EXTRAXLIBS=-lXext
-#       Uncomment the previous line if you are using /usr/openwin as XHOME.
-#       Sun's libX11.a depends on libXext.a for one symbol:
-#         XSolarisIASetProcessInfo.
-#
-#-------------------------------------------------------------------------
-set USEHACK =
-#	The above refers to a hack suggested by Sun customer support
-#	to turn off some annoying IEEE error messages.  This hack is
-#	only appropriate for Fortran 1.4 and is not necessary.
-#	There is no guarantee that this will work in subsequent releases of
-#	of Sun Fortran.  Hopefully Sun will have an easier way of ignoring
-#	these flags.  IF you need to use this hack, use: 
-#	set USEHACK = "-DIEEEHACK"
-#       This hack hasn't been necessary in some time and the related code
-#       has been untested for years and is likely unreliable.
-#-------------------------------------------------------------------------
-set SOLARIS = 
-#       Comment out the above line when building on old SunOS system.
-#       NRAO no longer has any non-Solaris machines hence, any non-solaris
-#       depenencies are no longer tested and are likely to be unreliable.
-#-------------------------------------------------------------------------
-set LOCALMAILLIST = " "
-#	Comments.exe sends users comments (started via the REPORT verb
-#	in unipops) to selected mail addresses.  LOCALMAILLIST allows
-#	you to define a list of local mail addresses which are to receive 
-#	these comments (all comments are, in addition, always sent to:
-#	unipops-comments@nrao.edu mail).  Edit this field to include any
-#	valid mail address (e.g.: set LOCALMAILLIST = myname@whatsamatau.edu).
-#
-#-------------------------------------------------------------------------
-set USEX = TRUE
-set USESUNVIEW = FALSE
-#       The value of USEX indicates whether you want to create the UniPOPS
-#       X11 display server while the value of USESUNVIEW indicates
-#       whether you want to create the UniPOPS sunview display server.
-#       When set to TRUE the corresponding display server will be created.
-#       Both settings are independant (i.e. both may be FALSE, both TRUE, etc.).
-#       Since sunview is becoming increasingly obsolete, it is strongly
-#       recommended that you stick to using the X11 display server
-#       (USEX = TRUE and USESUNVIEW = FALSE).  The sunview display server
-#       is unavailable under Solaris since there are no sunview libraries
-#       available for Solaris.
-#       The sunview libraries and environment are no longer available at
-#       NRAO and so the related code has been untested for years and may
-#       no longer work.
-#
-#-------------------------------------------------------------------------
-#
-# DO NOT ALTER the following 
-#
-if ($?SOLARIS) then
-#	This is for Solaris
-   make USEX="$USEX" USESUNVIEW="$USESUNVIEW" CCMP="$CCMP" FCMP="$FCMP" \
-	CDEBOROPT="$CDEBOROPT" FDEBOROPT="$FDEBOROPT" FLOATOPT="$FLOATOPT" \
-	F77VS="$F77VS" LIBCORE="$LIBCORE" FILLIB="$FILLIB" CILLIB="$CILLIB" \
-	XHOME="$XHOME" EXTRAXLIBS="$EXTRAXLIBS" usehack="$USEHACK" \
-        LOCALMAILLIST="$LOCALMAILLIST" \
-	AR=ar CPP=/usr/ccs/lib/cpp SUNOS=-DSOLARIS \
-	LLIBS="-lsocket -lnsl -lm" $*
-else
-#	This is for old SunOS
-   make USEX="$USEX" USESUNVIEW="$USESUNVIEW" CCMP="$CCMP" FCMP="$FCMP" \
-	CDEBOROPT="$CDEBOROPT" FDEBOROPT="$FDEBOROPT" FLOATOPT="$FLOATOPT" \
-	F77VS="$F77VS" LIBCORE="$LIBCORE" FILLIB="$FILLIB" CILLIB="$CILLIB" \
-	XHOME="$XHOME" EXTRAXLIBS="$EXTRAXLIBS" USEHACK="$USEHACK" \
-        LOCALMAILLIST="$LOCALMAILLIST" $*
-endif
diff -uNr 3.5/sunbin/makemenu.exe unipops-3.6/sunbin/makemenu.exe
--- 3.5/sunbin/makemenu.exe	2000-03-16 11:31:31.000000000 -0700
+++ unipops-3.6/sunbin/makemenu.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,53 +0,0 @@
-#! /bin/csh -f
-# @(#)makemenu.exe.sh	5.2 10/27/94
-#
-# This is now defunct and the verb that uses this disabled, so this
-# should never get executed.  I'ld like to keep this around as an
-# historical record of what we did, so I don't want to completely
-# remove it.  This stuff at the start is just to cause an ugly exit
-# in the event that someone does manage to somehow call this.
-#
-echo "MAKEMENU is disabled.  This should NEVER be used."
-echo "Report this use to a UniPOPS guru."
-exit(-1)
-#
-# Script used by POPS to start up tooltool
-# Usage: makemenu.exe inputfile outputfile progname procid
-# inputfile = name of FIFO used by POPS; outputfile = file containing
-# values of POPS variables; progname = either a c or l
-# procid = process ID of calling process
-#
-if ($#argv != 4) then
-   echo "MAKEMENU: Bad parameters for Menus" > /dev/console
-   exit(-1)
-endif
-#
-if (! -e ${popsdir}tool/procstart || ! -e ${popsdir}tool/procterm || ! -e $2) then
-   echo "MAKEMENU: Bad parameters for Menus" > /dev/console
-   exit(-1)
-endif
-#
-# AA = list of curent procedures
-set aa = `grep procedure $2 | awk -F: '{print $3}'`
-rm -f .${3}proctool
-cat ${popsdir}tool/procstart >! .${3}proctool
-if ($#aa >= 1) then
-      foreach proc ($aa)
-	 echo button $proc >> .${3}proctool
-	 echo normal \"$proc\" \{ send format\(\" $proc \(\%s\)\\n\", params\)\; >> .${3}proctool
-	 echo params \= \" \"\;\} >> .${3}proctool
-	 echo end_button >> .${3}proctool
-	 end
-endif
-cat ${popsdir}tool/procterm >> .${3}proctool
-# Create proctool file which contains gadgets for all known procedures
-#
-rm -f .${3}findfile $1
-if ($status != 0) exit($status)
-/usr/etc/mknod $1 p
-if ($status != 0) exit($status)
-ln $2 .${3}findfile
-if ($status != 0) exit($status)
-#
-exec tooltool -f ${popsdir}tool/${3}toolfile $1 $4 \
-	-WI ${popsdir}sunbin/menu.icon -WL "" &
diff -uNr 3.5/sunbin/makesparc unipops-3.6/sunbin/makesparc
--- 3.5/sunbin/makesparc	2000-03-16 11:28:08.000000000 -0700
+++ unipops-3.6/sunbin/makesparc	1969-12-31 17:00:00.000000000 -0700
@@ -1,126 +0,0 @@
-#!/bin/csh
-#
-# @(#)makelocal	5.6 03/16/00 
-#
-#-------------------------------------------------------------------------
-# Shell script to do a make with values for some crucial macros as 
-# appropriate locally.
-#
-# The uncommented values found here are appropriate for:  optimization 
-# level 2, no special floating-point options, equipped with inline math 
-# libraries, and using Sun's WorkShop compilers (f77 and cc) version 4.2
-#
-#-------------------------------------------------------------------------
-set CDEBOROPT = -xO2
-set FDEBOROPT = -xO2
-#	Debug option for C and Fortran compiler.  Some compilers use different
-#	flags to indicate optimization level.  Check the man page for the
-#	compilers you will be using to make sure you get this correct.
-#	We recommend something equivalent to -O2, optimization level 2, which
-#	we feel is safe.  Change the -O2 to -g if you want to compile with
-#	the debugger (or see the man page for your compiler to make sure
-#	you get this flag set appropriately)..
-#
-#-------------------------------------------------------------------------
-set FLOATOPT = 
-#	Floating point options (e.g. on a sun3 you may wish to set 
-#       this to -f68881 (i.e., set FLOATOPT = -f6888).  This option has
-#       not been tested with anything than the above unset value in years.
-#
-#-------------------------------------------------------------------------
-set CCMP = "cc"
-set FCMP = "f77"
-set F77VS = "VS2_0_1"
-#       The above define which C and Fortran compilers to use.
-#
-#       With the current WorkShop fortran compiler, you must also set F77VS = "VS2_0_1",
-#       this badly named variable is used to set the appropriate "MAIN" variable
-#       in the code.
-#-------------------------------------------------------------------------
-set LIBCORE = (/usr/old/libcore77.a /usr/old/libcore.a)
-#	Ignore if you are not compiling the Sunview version.
-#
-#	The sunview display server is unavailable under Solaris because
-#	these libraries no longer work with Solaris.
-#
-#       These libraries are no longer available at NRAO and hence the dependent
-#       is likely to no longer work.
-#
-#-------------------------------------------------------------------------
-set FILLIB = -xlibmil
-set CILLIB = -xlibmil
-#       These trigger the use of inline functions.  This may make the
-#       program run faster.  Set these as appropriate to your machine.
-#	If you don't have one of the libm.il's then replace that
-#	variable with simply -lm (the standard math library).  
-#
-#-------------------------------------------------------------------------
-set XHOME=/opt/local/X11R5
-#       Change this to point to the top-level of an X11R5 installation.
-#       We recommend against using /usr/openwin since that introduces 
-#       dependencies that are not well covered in the standard makefiles.
-#       Send e-mail to "popsmail@nrao.edu" if /usr/openwin is your only option.
-#    .  The X libraries should be in $XHOME/lib and the X include files should be
-#       in $XHOME/include
-#
-#-------------------------------------------------------------------------
-set USEHACK =
-#	The above refers to a hack suggested by Sun customer support
-#	to turn off some annoying IEEE error messages.  This hack is
-#	only appropriate for Fortran 1.4 and is not necessary.
-#	There is no guarantee that this will work in subsequent releases of
-#	of Sun Fortran.  Hopefully Sun will have an easier way of ignoring
-#	these flags.  IF you need to use this hack, use: 
-#	set USEHACK = "-DIEEEHACK"
-#       This hack hasn't been necessary in some time and the related code
-#       has been untested for years and is likely unreliable.
-#-------------------------------------------------------------------------
-set SOLARIS = 
-#       Comment out the above line when building on old SunOS system.
-#       NRAO no longer has any non-Solaris machines hence, any non-solaris
-#       depenencies are no longer tested and are likely to be unreliable.
-#-------------------------------------------------------------------------
-set LOCALMAILLIST = " "
-#	Comments.exe sends users comments (started via the REPORT verb
-#	in unipops) to selected mail addresses.  LOCALMAILLIST allows
-#	you to define a list of local mail addresses which are to receive 
-#	these comments (all comments are, in addition, always sent to:
-#	unipops-comments@nrao.edu mail).  Edit this field to include any
-#	valid mail address (e.g.: set LOCALMAILLIST = myname@whatsamatau.edu).
-#
-#-------------------------------------------------------------------------
-set USEX = TRUE
-set USESUNVIEW = FALSE
-#       The value of USEX indicates whether you want to create the UniPOPS
-#       X11 display server while the value of USESUNVIEW indicates
-#       whether you want to create the UniPOPS sunview display server.
-#       When set to TRUE the corresponding display server will be created.
-#       Both settings are independant (i.e. both may be FALSE, both TRUE, etc.).
-#       Since sunview is becoming increasingly obsolete, it is strongly
-#       recommended that you stick to using the X11 display server
-#       (USEX = TRUE and USESUNVIEW = FALSE).  The sunview display server
-#       is unavailable under Solaris since there are no sunview libraries
-#       available for Solaris.
-#       The sunview libraries and environment are no longer available at
-#       NRAO and so the related code has been untested for years and may
-#       no longer work.
-#
-#-------------------------------------------------------------------------
-#
-# DO NOT ALTER the following 
-#
-if ($?SOLARIS) then
-#	This is for Solaris
-   make USEX="$USEX" USESUNVIEW="$USESUNVIEW" CCMP="$CCMP" FCMP="$FCMP" \
-	CDEBOROPT="$CDEBOROPT" FDEBOROPT="$FDEBOROPT" FLOATOPT="$FLOATOPT" \
-	F77VS="$F77VS" LIBCORE="$LIBCORE" FILLIB="$FILLIB" CILLIB="$CILLIB" \
-	XHOME="$XHOME" USEHACK="$USEHACK" LOCALMAILLIST="$LOCALMAILLIST" \
-	AR=ar CPP=/usr/ccs/lib/cpp SUNOS=-DSOLARIS \
-	LLIBS="-lsocket -lnsl -lm" $*
-else
-#	This is for old SunOS
-   make USEX="$USEX" USESUNVIEW="$USESUNVIEW" CCMP="$CCMP" FCMP="$FCMP" \
-	CDEBOROPT="$CDEBOROPT" FDEBOROPT="$FDEBOROPT" FLOATOPT="$FLOATOPT" \
-	F77VS="$F77VS" LIBCORE="$LIBCORE" FILLIB="$FILLIB" CILLIB="$CILLIB" \
-	XHOME="$XHOME" USEHACK="$USEHACK" LOCALMAILLIST="$LOCALMAILLIST" $*
-endif
diff -uNr 3.5/sunbin/man.exe unipops-3.6/sunbin/man.exe
--- 3.5/sunbin/man.exe	2000-03-16 11:31:31.000000000 -0700
+++ unipops-3.6/sunbin/man.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-#! /bin/csh -f
-# @(#)man.exe.sh	5.1 06/22/94
-# Utility for displaying Unix Manual pages; uses some of the ideas
-# from B. Barnett's MANTOOL/HELPTOOL facility.
-#
-set noglob
-if ($#argv < 1) then
-  echo -n 'Enter name of the UNIX command: '
-  set cmnd1 = $<
-  set cmnd = ($cmnd1[1])
-else
-  set cmnd = $argv[1]
-endif
-# Use supplied command name or ask for one.
-#
-man $cmnd[1] | ul -tdumb > /tmp/man$$
-# Create temporay file containing manual pages
-#
-set count = `wc -l /tmp/man$$`
-if ($count[1] <= 1) then
-     echo "Cannot find anything on" $cmnd[1]
-     rm /tmp/man$$
-#    Make sure that user input is legit
-#
-else
-    if ($?WINDOW_PARENT || $?DISPLAY) then
-      if ($?WINDOW_PARENT) then
-         exec cmdtool -WL "SYSHELP"  -Wl "SYSHELP" \
-	      -WI ${popsdir}sunbin/man.icon ${popsdir}sunbin/prcdir.exe \
-		/tmp/man$$ &
-      else
-	 exec xterm -j -sb -wf -sl 1000 -title "SYSHELP" -n "SYSHELP"  \
-		-e ${popsdir}sunbin/prcdir.exe /tmp/man$$ &
-      endif
-    else
-	exec prcdir.exe $cmnd[1]
-    endif
-#   Use cmdtool or xterm to display manual page, if in a window environment, else
-#   just display the manualpages
-#
-endif
diff -uNr 3.5/sunbin/man.icon unipops-3.6/sunbin/man.icon
--- 3.5/sunbin/man.icon	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/man.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x7401,
-	0x8060,0x0000,0x0001,0x9401,0x805C,0x0000,0x0006,0x0A01,
-	0x8043,0x8000,0x0038,0x0A01,0x8080,0x7000,0x00C0,0x0A01,
-	0x8080,0x0E00,0x0700,0x0501,0x8090,0x01C0,0x1801,0x0501,
-	0x8100,0x0038,0x600A,0x0501,0x8111,0x0007,0x8070,0x0281,
-	0x8100,0x4001,0x0180,0x0281,0x8200,0x2001,0x0003,0x0281,
-	0x8218,0x0801,0x3008,0x0141,0x8200,0x9021,0x0028,0x0141,
-	0x8400,0x8001,0x03C0,0x2141,0x8430,0x4001,0x0C00,0x40A1,
-	0x8404,0x0181,0x1000,0x80A1,0x8406,0x0021,0x0000,0x00A1,
-	0x8881,0x0009,0x0028,0x0891,0x8800,0x6011,0x0300,0x0051,
-	0x8818,0x1001,0x0800,0x0050,0x900C,0x0201,0x0801,0x0048,
-	0x9000,0x8081,0x0003,0x0028,0x1040,0x1041,0x000C,0x0028,
-	0x2020,0x0409,0x0070,0x0C24,0x2006,0x0161,0x0800,0x0014,
-	0x2000,0x0051,0x0010,0xE014,0x40E0,0x0401,0x0050,0x0212,
-	0xC010,0x0001,0x2080,0x000A,0x7006,0x0081,0x2200,0x180E,
-	0x4E00,0x0001,0x0200,0xE033,0x8180,0x2005,0x001B,0x01C3,
-	0xC070,0x0005,0x0000,0x0603,0x3C0C,0x0501,0x00C0,0x383C,
-	0x03C3,0x0061,0x2301,0xC3C0,0x003C,0xE001,0x100E,0x3C0E,
-	0x0003,0xD801,0x0073,0xC3F0,0x0000,0x3F01,0x01BC,0xFC00,
-	0x0000,0x03C1,0x0FFF,0x0000,0x0000,0x003F,0xFFC0,0x0000,
-	0x0000,0x0003,0xF000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
diff -uNr 3.5/sunbin/menu.icon unipops-3.6/sunbin/menu.icon
--- 3.5/sunbin/menu.icon	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/menu.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8880,0x0000,0x0000,0x0001,
-	0x8D98,0xA247,0x0000,0x0001,0x8AA4,0xD248,0x0000,0x0001,
-	0x8AB8,0x9246,0x0000,0x0001,0x88A0,0x92C1,0x0000,0x0001,
-	0x889C,0x914E,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x87FF,0xF000,0x0000,0x0001,
-	0x8400,0x7000,0x0003,0xFF01,0x8401,0x9000,0x0002,0x0101,
-	0x820E,0x1000,0x0002,0x0101,0x8230,0x0800,0x0001,0x0201,
-	0x83C0,0x0800,0x0000,0x8401,0x8600,0x0BFF,0xFFFF,0xFFFF,
-	0x9800,0x0C00,0x0000,0x7801,0x9000,0x0800,0x0000,0x3001,
-	0x9000,0x0C00,0x3FFF,0x3001,0x8800,0x0400,0x1B51,0x3001,
-	0x8800,0x0400,0x0676,0x3001,0x8800,0x040E,0x0198,0x3001,
-	0x8800,0x0417,0x0060,0x3001,0x8400,0x021D,0x0040,0x7801,
-	0x8400,0x021B,0x0000,0x8401,0x8400,0x020E,0x0000,0x8401,
-	0x8400,0x0200,0x0000,0x7801,0x8200,0x0200,0x0000,0x0011,
-	0x8200,0x0114,0x03B8,0x0711,0x8200,0x0114,0x0EEE,0x0891,
-	0x8200,0x0114,0x1777,0x0891,0x8100,0x031C,0x1DDD,0x8791,
-	0x8100,0x0C08,0x3BBB,0x8211,0x8100,0x3008,0x6EEE,0xC219,
-	0x8100,0xC008,0x7777,0x4219,0x8283,0x0008,0x5DDD,0xC219,
-	0x828C,0x0008,0x3BBB,0x8219,0x84B0,0x0008,0x2EEE,0x8219,
-	0x9800,0x0008,0x3777,0x0219,0x9000,0x0008,0x0DDD,0x0219,
-	0x9000,0x0008,0x03B8,0x0219,0xB000,0x0000,0x0000,0x0011,
-	0xC000,0x0000,0x0000,0x0001,0xD555,0x5555,0x5555,0x5555,
-	0xA8A2,0xA2AA,0xAA28,0xAAAB,0xD555,0x5545,0x1555,0x5545,
-	0xAAAA,0xAAAA,0xAA2A,0xA2AB,0xD555,0x5555,0x1555,0x5555,
-	0xAAAA,0xAAAA,0xAA2A,0xA2A3,0xD551,0x5555,0x1455,0x5555,
-	0xA8AA,0xAA8A,0xAAAA,0x22A3,0xD555,0x5545,0x1455,0x5555,
-	0xA8A2,0xA2AA,0xAAAA,0xA2A3,0xD555,0x5555,0x1554,0x5555,
-	0xC30C,0x2146,0x0428,0x40C1,0xA300,0x0000,0x0000,0x00C1,
-	0x8300,0x0000,0x0000,0x00C1,0x8300,0x0000,0x0000,0x00C1,
-	0x8300,0x0000,0x0000,0x00C1,0x8300,0x0000,0x0000,0x00C1,
-	0x8300,0x0000,0x0000,0x00C1,0xFFFF,0xFFFF,0xFFFF,0xFFFF
diff -uNr 3.5/sunbin/mess.exe unipops-3.6/sunbin/mess.exe
--- 3.5/sunbin/mess.exe	2000-03-16 11:31:31.000000000 -0700
+++ unipops-3.6/sunbin/mess.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,18 +0,0 @@
-#! /bin/csh -f
-# @(#)mess.exe.sh	5.1 06/22/94 
-# POPS message facility; uses messages.exe and news.exe shell scripts
-#
-set noglob
-if ($#argv < 1) then
-   echo 'USAGE: l or c for line or condar messages'
-else
-  if ($1 == "c") then
-   ${popsdir}sunbin/messages.exe ${popsdir}cmessages .cmessages
-   ${popsdir}sunbin/news.exe ${popsdir}cnews .cnews
-  else if ($1 == "l") then
-   ${popsdir}sunbin/messages.exe ${popsdir}lmessages .lmessages
-   ${popsdir}sunbin/news.exe ${popsdir}lnews .lnews
-  else
-   echo 'USAGE: l or c for line or condar messages'
-  endif
-endif
diff -uNr 3.5/sunbin/messages.exe unipops-3.6/sunbin/messages.exe
--- 3.5/sunbin/messages.exe	2000-03-16 11:31:31.000000000 -0700
+++ unipops-3.6/sunbin/messages.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,106 +0,0 @@
-#!  /bin/csh -f
-# @(#)messages.exe.sh	5.1 06/22/94
-#Shell script which dispalys various kinds of messages
-#   1.  A startup message
-#   2.  A message of the day
-#   3.  Messages for all recipients which are to be always displayed
-#   4.  Messages geared for a particular recipient which are to be
-#	always displayed.
-#   5.  Messages for all recipients but which are to be displayed only
-#       once for each recipient
-#   6.  Messages for a particular recipient but which are to be
-#	displayed only once for that recipient
-#
-#   Usage:  message.exe  <directory>  <filename>
-#   where <directory> = directory in which the various message
-#               subdirectories can be found.  
-#		The directory can contain any of the following:
-#		two files: startup motd
-#		subdirectories: AlwaysAll OnceAll Always_<name> Once_<name>
-#	        (substitute for <name> the login name of all recipients.
-#		i.e., Always_rmaddale, Once_mclark, Always_mclark, ...)
-#		Note: if a directories exist, it cannot be empty.
-#
-#   and where <filename> = the name of a dummy log file.  If it doesn't exist,
-#	                 one is created and all messages are displayed.
-#		  	 If it does exist, than all messages created after 
-#			 that file was last altered will be displayed.  
-#			 <filename> will be "touch"ed by this shell script .
-#			 It is best to have this a hidden file (i.e., 
-#			 one whost name begins with a dot.)
-#
-#
-if ($#argv >= 2) then
- if (-e $1) then
-# Checks for bad input
-#
-  set tmpfile=/tmp/${LOGNAME}.msgs
-  if (-f $tmpfile) rm $tmpfile
-# file where messages are going to be stored
-#
-  if (-f ${1}/startup) cat $1/startup >>! $tmpfile
-  if (-f $1/motd) cat $1/motd >>! $tmpfile
-  if (-d $1/AlwaysAll) then
-    set NAMES = `find $1/AlwaysAll \! -type d -print | grep -v SCCS` 
-    echo $NAMES
-    if ($#NAMES != 0) cat $NAMES >>! $tmpfile
-  endif
-  if (-d $1/Always_$LOGNAME) then
-    set NAMES = `find $1/Always_$LOGNAME \! -type d -print | grep -v SCCS`
-    echo $NAMES
-    if ($#NAMES != 0) cat $NAMES >>! $tmpfile
-  endif
-# Puts startup, motd and those messages which are always to be
-# displayed, if they exist, into $tmpfile
-#
-  if (-f $2) then
-   if (-d $1/OnceAll) then
-     set NAMES = `find $1/OnceAll -newer $2 \! -type d -print | grep -v SCCS`
-     if ($#NAMES != 0) cat $NAMES >>! $tmpfile
-   endif
-   if (-d $1/Once_$LOGNAME) then
-     set NAMES = `find $1/Once_$LOGNAME -newer $2 \! -type d -print | grep -v SCCS` 
-     if ($#NAMES != 0) cat $NAMES >>! $tmpfile
-   endif
-   if (-w $2) then
-    touch $2
-   else
-    echo "ERROR: Cannot write to" $2 "... Continuing..." >>! $tmpfile
-   endif
-#  If <filename> exists, then check for all messages that have been
-#  created/modified since <filename> was created/modified.  Modify <filename>,
-#  if possible, so that messages will not be displayed again.
-#
-  else
-#
-   if (-e $1/OnceAll) then
-     set NAMES = `find $1/OnceAll \! -type d -print | grep -v SCCS`
-     if ($#NAMES != 0) cat $NAMES >>! $tmpfile
-   endif
-   if (-e $1/Once_$LOGNAME) then
-     set NAMES = `find $1/Once_$LOGNAME \! -type d -print | grep -v SCCS`
-     if ($#NAMES != 0) cat $NAMES >>! $tmpfile
-   endif
-   date >! $2 
-#
-#  If filename doesn't exist, display all old messages and create filename
-#
-  endif
-#
-  setenv MORE -d
-  if (! -z $tmpfile) more $tmpfile
-  rm $tmpfile
-#
-#Use more to display $tmpfile containing all messages
-#
- else
-  echo "USAGE: <directory> <filename> "
-  echo "<directory> = name of root directory of messages"
-  echo "<filename> = name of log file; logs the last time messages were read"
- endif
-else
- echo "USAGE: <directory> <filename> "
- echo "<directory> = name of root directory of messages"
- echo "<filename> = name of log file; logs the last time messages were read"
-endif
-
diff -uNr 3.5/sunbin/mkfiles.unipops unipops-3.6/sunbin/mkfiles.unipops
--- 3.5/sunbin/mkfiles.unipops	2000-03-16 12:04:53.000000000 -0700
+++ unipops-3.6/sunbin/mkfiles.unipops	1969-12-31 17:00:00.000000000 -0700
@@ -1,43 +0,0 @@
-#!/bin/csh -f
-#
-#  @(#)mkfiles.unipops.sh	5.1 06/22/94
-#
-#	Put the default empty files into the current directory
-#
-if ( ! $?popsdir ) then
-  if (! $?popsversion) setenv popsversion 3.5
-  setenv popsdir ~unipops/$popsversion/
-endif 
-echo -n "preparing directory - be patient ."
-#
-#	first, do any local stuff
-#
-if (-e ${popsdir}sunbin/`domainname`.mkfiles.unipops) then
-  source ${popsdir}sunbin/`domainname`.mkfiles.unipops
-endif
-#		and then the standard stuff
-if (! -e LMEMORY) ${popsdir}sunbin/makefile.exe LMEMORY
-echo -n " ."
-if (! -e LDATA) ${popsdir}sunbin/makefile.exe LDATA
-echo -n " ."
-if (! -e LKEEP) ${popsdir}sunbin/makefile.exe LKEEP
-echo -n " ."
-if (! -e LSAVE) ${popsdir}sunbin/makefile.exe LSAVE
-echo -n " ."
-if (! -e LPRINTOUT) touch LPRINTOUT
-echo -n " ."
-if (! -e LCMDLOG) touch LCMDLOG
-#
-if (! -e CMEMORY) ${popsdir}sunbin/makefile.exe CMEMORY
-echo -n " ."
-if (! -e CDATA) ${popsdir}sunbin/makefile.exe CDATA
-echo -n " ."
-if (! -e CKEEP) ${popsdir}sunbin/makefile.exe CKEEP
-echo -n " ."
-if (! -e CSAVE) ${popsdir}sunbin/makefile.exe CSAVE
-echo -n " ."
-if (! -e CPRINTOUT) touch CPRINTOUT
-echo -n " ."
-if (! -e CCMDLOG) touch CCMDLOG
-#
-echo " finished."
diff -uNr 3.5/sunbin/more.exe unipops-3.6/sunbin/more.exe
--- 3.5/sunbin/more.exe	2000-03-16 11:31:31.000000000 -0700
+++ unipops-3.6/sunbin/more.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,42 +0,0 @@
-#! /bin/csh -f
-# @(#)more.exe.sh	5.1 06/22/94
-# POPS utility for listing the contents of a file.
-#
-unset noglob
-if ($#argv < 1) then
-  echo -n 'Enter names of the files you want to list: '
-  set filename = $<
-else
-  set filename = ($argv)
-endif
-# Use supplied filename or ask for one.
-#
-foreach file ($filename)
-if (! -f $file || -z $file) then
-    echo $file": Cannot find file or file is not printable or file is empty"
-#   Make sure that user input is legit
-#
-else
-    echo '------------' $file '---------------' >> /tmp/more.$$
-    cat $file >> /tmp/more.$$
-endif
-end
-#
-if (-f /tmp/more.$$) then
-    if ($?WINDOW_PARENT || $?DISPLAY) then
-      if ($?WINDOW_PARENT) then
-        exec cmdtool -WL "TYPE" -Wl "TYPE" \
-	      -WI ${popsdir}sunbin/more.icon ${popsdir}sunbin/prcdir.exe \
-		/tmp/more.$$ &
-      else
-	exec xterm -j -sb -wf -sl 1000 -title "TYPE" -n "TYPE" \
-		-e ${popsdir}sunbin/prcdir.exe /tmp/more.$$ &
-      endif
-    else
-      exec prcdir.exe /tmp/more.$$
-    endif
-#   Use cndtool to display file, if in a window environment, else
-#   just display the file using more.
-#
-endif
-#
diff -uNr 3.5/sunbin/more.icon unipops-3.6/sunbin/more.icon
--- 3.5/sunbin/more.icon	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/more.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x5DDD,0xDDDD,0xD001,
-	0x8000,0x7FFF,0xFFFF,0xE001,0x8000,0x7FFF,0xFFFF,0xE001,
-	0x8000,0xFFFF,0xFFFF,0xE001,0x8000,0xF87B,0xCFFF,0x8001,
-	0x8000,0xFBFF,0xEF3F,0xC001,0x8000,0xF8F3,0xEEDF,0x0001,
-	0x8001,0xFBFB,0xEE3F,0x8001,0x8001,0xFBFB,0xEEFD,0x8001,
-	0x8003,0xFBFB,0xEF1F,0x0001,0x8003,0xFFFF,0xFFFF,0x0001,
-	0x8001,0xFFFF,0xFFFF,0x8001,0xBFFE,0x2222,0x222A,0x7FE1,
-	0xA003,0x7777,0x7777,0x0021,0xA003,0x7777,0x7777,0x0021,
-	0xBBBB,0xBBBB,0xBBBB,0xBBB9,0xB111,0x1111,0x1111,0x1135,
-	0xA888,0x8888,0x8888,0x88AD,0xDDDD,0xDDDD,0xDDDD,0xDDDD,
-	0xA000,0x0000,0x0000,0x0021,0xA000,0x0000,0x0000,0x0021,
-	0xBFFF,0xFFFF,0xFFFF,0xFFE1,0x8080,0x0000,0x0000,0x0401,
-	0x8082,0x0000,0x0000,0x0401,0x8042,0x24B9,0x4D24,0x2401,
-	0x8040,0x4A44,0x3C09,0x0801,0x8048,0x0041,0x8280,0x4801,
-	0x8040,0x0000,0x0000,0x0801,0x807F,0xFFFF,0xFFFF,0xF801,
-	0x8040,0x0000,0x0000,0x1001,0x8040,0x0000,0x0000,0x1001,
-	0x8040,0x0000,0x0000,0x1001,0x804D,0xB6DB,0x6DB6,0xD001,
-	0x804D,0xB6DB,0x6DB6,0xD001,0x8040,0x0000,0x0000,0x1001,
-	0x804D,0xB6DB,0x6DB6,0xD001,0x804D,0xB6DB,0x6DB6,0xD001,
-	0x8040,0x0000,0x0000,0x1001,0x804D,0xB6DB,0x6DB6,0xD001,
-	0x8045,0xB6DB,0x6DB6,0x9001,0x8040,0x0000,0x0000,0x1001,
-	0x8040,0x0000,0x0000,0x1001,0x8040,0xE7FF,0xFFCE,0x1001,
-	0x8040,0xE7FF,0xFFCE,0x1001,0x8040,0x0000,0x0000,0x1001,
-	0x807F,0xFFFF,0xFFFF,0xF001,0x807F,0xFFFF,0xFFFF,0xF001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0x8000,0x3F33,0x3E3F,0x0001,
-	0x8000,0x0C33,0x3330,0x0001,0x8000,0x0C33,0x3330,0x0001,
-	0x8000,0x0C1E,0x3330,0x0001,0x8000,0x0C0C,0x3E3E,0x0001,
-	0x8000,0x0C0C,0x3030,0x0001,0x8000,0x0C0C,0x3030,0x0001,
-	0x8000,0x0C0C,0x3030,0x0001,0x8000,0x0C0C,0x303F,0x0001,
-	0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
diff -uNr 3.5/sunbin/news.exe unipops-3.6/sunbin/news.exe
--- 3.5/sunbin/news.exe	2000-03-16 11:31:31.000000000 -0700
+++ unipops-3.6/sunbin/news.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,119 +0,0 @@
-#!  /bin/csh -f 
-# @(#)news.exe.sh	5.1 06/22/94
-# Shell script which dispalys topics for various kinds of messages
-# and then allows one to pick a topic to be displayed.  4 kinds of
-# topics can be listed:
-#
-#   1.  Topics for news items for all recipients; topics are not 
-#	removed from the list even after one reads the news item
-#   2.  Topics geared for a particular recipient; again, topics are
-#	not removed.
-#   3.  Topics for all recipients but which are removed from the list
-#	once the user has read the news item.
-#   4.  Topics for a particular recipient but again are removed once 
-#	the user has read the item.
-#
-#   Usage:  news.exe  <directory>  <filename>
-#   where <directory> = directory in which the various news subdirectories 
-#		can be found.  The directory contain the following 
-#		subdirectories: AlwaysAll OnceAll Always_<name> Once_<name>
-#		(substitute for <name> the login name of all recipients;  
-#		i.e.,  Always_rmaddale, Once_mclark, Always_rmaddale,...)
-#		NOTE:  If a directory exists, it cannot be empty!!
-#		All the names of files in these directories should be unique
-#		and should represent the contents of the files
-#
-#   and where <filename> = the name of a file containing log of news items 
-#		which have not been read yet.  If file doesn't exist,
-#	        one is created and all topics are inserted into file.  
-#		If it does exist, than all news topics which have been
-#		created after that file was last modified are added to the 
-#		file.  It is best to have the file as a hidden file
-#               (i.e., one whose name begins with a dot.)
-#
-#
-if ($#argv >= 2) then
-  set tmpfile=/tmp/${LOGNAME}.news
-  if (-f $tmpfile) rm $tmpfile
-# Temporary files will be called $tmpfile..
-#
-  if (-f $2) then
-   if (-w $2) then
-#    Checks that you can write to $2
-#
-     if (-e $1/OnceAll) find $1/OnceAll -newer $2 \! -type d -print | grep -v SCCS >>! ${tmpfile}E
-     if (-e $1/Once_$LOGNAME) find $1/Once_$LOGNAME \! -type d -newer $2 -print | grep -v SCCS >>! ${tmpfile}E
-     cat ${tmpfile}E >>! $2
-#    If <filename> exists, then check for all news items that have been
-#    created/modified since <filename> was created/modified. Add these items
-#    to <filename>.  
-#
-   else
-     echo "ERROR: Cannot write to file " $2 "... Continuing..."
-   endif
-  else
-#
-   if (-e $1/OnceAll) find $1/OnceAll \! -type d -print | grep -v SCCS >>! $2
-   if (-e $1/Once_$LOGNAME) find $1/Once_$LOGNAME \! -type d -print | grep -v SCCS >>! $2
-#  If filename doesn't exist, display all old messages and create filename
-#
-  endif
-#
-  if (-e $1/AlwaysAll) find $1/AlwaysAll \! -type d -print | grep -v SCCS >>! $tmpfile
-  if (-e $1/Always_$LOGNAME) find $1/Always_$LOGNAME \! -type d -print | grep -v SCCS >>! $tmpfile
-# Puts those news items which are to be always displayed into $tmpfile
-#
-  if (-f $tmpfile) then
-# (i.e., there are news items to list)
-#
-  awk -F/ '{ print $NF }' $2 $tmpfile | sort -u -o ${tmpfile}B
-# Strips out trailing file names, which should be names of news items
-# and stores results into a different $tempfile
-#
-  set c = "garbage"
-# Needs to set C for the first test in the while statement
-#
-#
-  while ($c != "" )
-   if (! -z ${tmpfile}B) then
-     echo " "
-     echo "News Items"
-     echo "----------------"
-     cat ${tmpfile}B
-     echo "----------------"
-     echo -n "Enter the name of the item you want to read or <cr> to quit: "
-     set c = $<
-     echo " "
-#    prints out header, list of news items, and asks for input
-#    for item desired
-#
-     if ($c != "") then
-      egrep -h "(/$c)"$ $2 $tmpfile >! ${tmpfile}A
-      if (! -z ${tmpfile}A) eval `echo more -d ; head -1 ${tmpfile}A`     
-#     prints out desired news item
-#
-      egrep -v "(/$c)"$ $2 >! ${tmpfile}C
-      mv -f ${tmpfile}C $2
-#
-#     Removes news item which have been read from log file
-#
-     endif
-   else
-     rm $tmpfile*
-     exit
-   endif
-  end
-  rm $tmpfile*
-#
- else
-#
-  exit
-# $tmpfile has not been created (i.e., there are no news items) so exit
- endif
-#
-else
- echo "USAGE: <directory> <filename>"
- echo "<directory> = root directory for news items"
- echo "<filename> = log file of unread news items"
-endif
-#
diff -uNr 3.5/sunbin/nogprint unipops-3.6/sunbin/nogprint
--- 3.5/sunbin/nogprint	2000-03-16 11:31:33.000000000 -0700
+++ unipops-3.6/sunbin/nogprint	1969-12-31 17:00:00.000000000 -0700
@@ -1,6 +0,0 @@
-#! /bin/csh -f
-# @(#)nogprint.sh	5.1 06/22/94
-# Script for printing text to the system printer
-#
-echo "nogprint is no longer used.  Report this message to a unipops guru."
-exit(1)
diff -uNr 3.5/sunbin/postprint unipops-3.6/sunbin/postprint
--- 3.5/sunbin/postprint	2000-03-16 11:31:33.000000000 -0700
+++ unipops-3.6/sunbin/postprint	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-#! /bin/csh -f
-# @(#)postprint.sh	5.1 06/22/94
-# Script to print to a postscript printer
-#
-if ($#argv < 2) exit(1)
-if (-z $2) exit(0)
-#
-echo "cat ${popsdir}sunbin/poststart $2 ${popsdir}sunbin/postterm | $1" | /bin/csh -f
diff -uNr 3.5/sunbin/poststart unipops-3.6/sunbin/poststart
--- 3.5/sunbin/poststart	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/poststart	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-%!PS-Adobe-2.0 EPSF-1.2
-% @(#)poststart	5.1 06/22/94
-%%Creator: UniPops
-%%Title: UniPops
-%%BoundingBox: 0 0 612 774
-%%EndComments
-%%EndProlog
- /c{setrgbcolor}def  /m{moveto} def /v{lineto currentpoint stroke moveto}def /hc {/Courier-Bold findfont 2 1 roll scalefont setfont}def /bx {newpath moveto lineto lineto lineto closepath fill} def 1 setlinejoin 1 setlinecap 1 setlinewidth 590 30 translate 90 rotate 0.7 0.7 scale 22 hc newpath gsave
diff -uNr 3.5/sunbin/postterm unipops-3.6/sunbin/postterm
--- 3.5/sunbin/postterm	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/postterm	1969-12-31 17:00:00.000000000 -0700
@@ -1,2 +0,0 @@
-% @(#)postterm	5.1 06/22/94
- stroke showpage
diff -uNr 3.5/sunbin/prcdir.exe unipops-3.6/sunbin/prcdir.exe
--- 3.5/sunbin/prcdir.exe	2000-03-16 11:31:32.000000000 -0700
+++ unipops-3.6/sunbin/prcdir.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,29 +0,0 @@
-#! /bin/csh -f
-# @(#)prcdir.exe.sh	5.1 06/22/94
-# Lists the files given as arguments 
-#
-if ($#argv < 1) exit(0)
-#
-set domore = "Anything."
-if ($?INFANTS) then
-   echo $$ >> $INFANTS
-endif
-while ($domore != "")
-   if (-e $1) then
-	more -d $1
-   	echo " "
-  	echo -n "Enter <cr> to exit, anything else to repeat : "
-   	set domore = $<
-   else
-	echo "Nothing to list"
-   	echo " "
-  	echo -n "Enter <cr> to exit : "
-   	set domore = $<
- 	set domore = ""
-   endif
-   echo " "
-end
-rm -f $1
-#
-
-
diff -uNr 3.5/sunbin/prcdir.icon unipops-3.6/sunbin/prcdir.icon
--- 3.5/sunbin/prcdir.icon	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/prcdir.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x7E00,0x0000,0x01C0,
-	0x03FF,0xC3FF,0x0000,0x0120,0x0200,0x0001,0x0000,0x01C0,
-	0x03F8,0x0001,0x0000,0x0120,0x1F0F,0xFFF9,0x0000,0x0120,
-	0x1000,0x0009,0x0000,0x01C0,0x1000,0x1F89,0x0070,0x0000,
-	0xFFFF,0xF0C9,0x0038,0x0000,0x8000,0x0049,0x001C,0x00C0,
-	0x8C4C,0x6049,0x000E,0x0120,0x8AAA,0x8049,0x1FFF,0x0120,
-	0x8AAA,0x4049,0x1FFF,0x81E0,0x8C4C,0x2049,0x1FFF,0xC120,
-	0x8808,0xC049,0x1FFF,0x8120,0x8808,0x0049,0x1FFF,0x0000,
-	0x8000,0x2049,0x000E,0x0000,0x8080,0x6049,0x001C,0x03E0,
-	0x8CE6,0x2049,0x0038,0x0080,0x8A88,0x204F,0x0070,0x0080,
-	0x8A88,0x2048,0x0000,0x0080,0x8C86,0x2048,0x0000,0x0080,
-	0x8800,0x0078,0x0000,0x0080,0x8800,0x0040,0x0000,0x0000,
-	0x8000,0x0040,0x0000,0x0000,0xFFFF,0xFFC0,0x0000,0x00C0,
-	0x0000,0x0000,0x0000,0x0120,0x0000,0x0000,0x0000,0x0100,
-	0x0000,0x0000,0x0000,0x0100,0x0000,0x0000,0x0000,0x0120,
-	0x0000,0x0000,0x0000,0x00C0,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0120,
-	0x0000,0x0000,0x0000,0x0120,0x0000,0x0000,0x0000,0x01E0,
-	0x0000,0x0000,0x0000,0x0120,0x0000,0x0000,0x0000,0x0120,
-	0x0000,0x0000,0x0000,0x0120,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0F8F,0x878F,0x0FCF,0x8000,
-	0x0CCC,0xCCCD,0x830C,0xC000,0x0CCC,0xCC4C,0xC30C,0xC000,
-	0x0CCC,0xCC0C,0xC30C,0xC000,0x0F8F,0x8C0C,0xC30F,0x8000,
-	0x0C0D,0x8C0C,0xC30D,0x8000,0x0C0C,0xCC4C,0xC30C,0xC000,
-	0x0C0C,0xCCCD,0x830C,0xC000,0x0C0C,0xC78F,0x0FCC,0xC000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
diff -uNr 3.5/sunbin/prcdir2.exe unipops-3.6/sunbin/prcdir2.exe
--- 3.5/sunbin/prcdir2.exe	2000-03-16 11:31:32.000000000 -0700
+++ unipops-3.6/sunbin/prcdir2.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,46 +0,0 @@
-#! /bin/csh -f
-# @(#)prcdir2.exe.sh	5.1 06/22/94
-# Lists the contents of the directories which may contain
-# procedures (i.e., the present directory and those specified
-# by the $popsproc1 and $popsproc2 variables
-#
-# Pops open a window to run prcdir in it if necessary
-#
-echo ' ' >! /tmp/proc.$$
-echo -n 'PRCDIR as of ' >> /tmp/proc.$$
-date >> /tmp/proc.$$
-echo ' ' >> /tmp/proc.$$
-echo '---------' $cwd '------------' >> /tmp/proc.$$ 
-ls *.prc >>& /tmp/proc.$$
-if ($?popsproc1) then
-  if ($popsproc1 != "") then
-    if (-d $popsproc1) then
-       cd $popsproc1
-       echo '---------' $popsproc1 '--------------' >> /tmp/proc.$$ 
-       ls *.prc >>& /tmp/proc.$$
-    endif
-  endif
-endif
-if ($?popsproc2) then
-   if ($popsproc2 != "") then
-   if (-d $popsproc2) then
-       cd $popsproc2
-       echo '---------' $popsproc2 '--------------' >> /tmp/proc.$$ 
-       ls *.prc >>& /tmp/proc.$$
-    endif
-  endif
-endif
-# Make up a file containing list of procedures
-#
-if ($?WINDOW_PARENT || $?DISPLAY) then
-      if ($?WINDOW_PARENT) then
-         exec cmdtool -Wl "PRCDIR" -WL "" -WI ${popsdir}sunbin/prcdir.icon \
-	        ${popsdir}sunbin/prcdir.exe /tmp/proc.$$ &
-      else
-	 exec xterm -j -sb -wf -sl 1000 -title "PRCDIR" -n "PRCDIR"  \
-		-e ${popsdir}sunbin/prcdir.exe /tmp/proc.$$ &
-      endif
-else
-     exec prcdir.exe /tmp/proc.$$
-endif
-
diff -uNr 3.5/sunbin/print.awk unipops-3.6/sunbin/print.awk
--- 3.5/sunbin/print.awk	2000-03-16 11:31:39.000000000 -0700
+++ unipops-3.6/sunbin/print.awk	1969-12-31 17:00:00.000000000 -0700
@@ -1,5 +0,0 @@
-BEGIN {FS = ":"; sq = sprintf("%c", 39);ORS=";"}
-$1 !~ /#/ { if ($1==printer) print sprintf("set printtype=%s%s%s",sq,$2,sq)
-            if ($1==printer) print sprintf("set printcmd=%s%s%s",sq,$3,sq)
-            if ($1==printer) print sprintf("set textfilter=%s%s%s",sq,$4,sq)
-            if ($1==printer) exit }
diff -uNr 3.5/sunbin/print.exe unipops-3.6/sunbin/print.exe
--- 3.5/sunbin/print.exe	2000-03-16 11:31:32.000000000 -0700
+++ unipops-3.6/sunbin/print.exe	1969-12-31 17:00:00.000000000 -0700
@@ -1,20 +0,0 @@
-#! /bin/csh -f
-# @(#)print.exe.sh	5.1 06/22/94
-#  Shell script for printing out a file 
-#
-if ($#argv < 3) then
-   echo "print.exe: at least 3 arguments needed."
-   echo "   print.exe printcmd textfilter filename[s]"
-   exit(1)
-endif
-foreach file ($argv[3-])
-   if (-f $file && ! -z $file) then 
-      if ($2 != "") then
-        echo "pr -f $file | $2 | $1" | /bin/csh -f
-      else
-        echo "pr -f $file | $1" | /bin/csh -f
-      endif
-   else
-	echo "Cannot print" $file".  Does not exist, empty, or unprintable."
-   endif
-end
diff -uNr 3.5/sunbin/printers.cv unipops-3.6/sunbin/printers.cv
--- 3.5/sunbin/printers.cv	2000-03-16 11:39:48.000000000 -0700
+++ unipops-3.6/sunbin/printers.cv	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-#  printers file for vangogh/cv
-none:text:/usr/ucb/lpr:lwf:text only default
-ps0:postscript:/usr/ucb/lpr -Pps0:lwf:Library printer
-ps1:postscript:/usr/ucb/lpr -Pps1:lwf:remote HP PS printer 1st floor
-ps2:postscript:/usr/ucb/lpr -Pps2:lwf:remote HP laserjet III, Rm. 215
-ps3:postscript:/usr/ucb/lpr -Pps3:lwf:Library printer
-PRINTER:postscript:/usr/ucb/lpr:lwf:Uses your PRINTER env variable
-capture:postscript:cat - > capture.file.$$;echo postscript captured in capture.file.$$:lwf:Capture postscript to capture.file.$$
diff -uNr 3.5/sunbin/printers.example unipops-3.6/sunbin/printers.example
--- 3.5/sunbin/printers.example	2000-03-16 11:31:39.000000000 -0700
+++ unipops-3.6/sunbin/printers.example	1969-12-31 17:00:00.000000000 -0700
@@ -1,44 +0,0 @@
-# @(#)printers.example	5.2 11/30/98
-#  Lines having a "#" ANYWHERE in them are totally ignored
-#  Fields are separated by :
-#  There are 5 fields for each entry, the first 3 must have values.
-#
-#  The fields are:
-#   printer:printertype:print command:text filter:description
-#
-#  Rules:
-#     There should be NO white space in the first 2.
-#     The first 2 fields should be no longer than 16 characters
-#     Only the first entry for a given printer is used.
-#     printer names are currently limited to 16 characters.
-#     recognized printer types are: postscript, qms, quic, hpgl, and text.
-#        "text" is an indication that the printer is not capable of graphics
-#     The entry "none" is a special entry that should contain the commands
-#       necessary for sending text to a printer when the user indicates 
-#       no graphics commands should be used.
-#     The print command field should expect standard input.
-#       It is guaranteed to be the last command in a pipeline.
-#     The text filter is a filter that translates text into an appropriate
-#       format for printing on that printer.  It can be left blank.
-#       textfilter is used in a pipe and should act appropriately.
-#     The final field, description, is used during program startup if
-#       $popsprinter is not set, or if $popsprinter is not found in this file.
-#     $popsprinter must match the printer field exactly.
-#     There can be, at most, 100 valid entries in this file.
-#     print command and text filter must work in csh pipes
-#
-ps0:postscript:lpr -Pps0:lwf:Library printer
-ps1:postscript:lpr -Pps1:lwf:remote HP PS printer 1st floor
-ps2:postscript:lpr -Pps2:lwf:remote HP laserjet III, Rm. 215
-ps3:postscript:lpr -Pps3:lwf:Library printer
-PRINTER:postscript:lpr:lwf:Uses your PRINTER env variable
-capture:postscript:cat - > capture.file.$$:lwf:Capture postscript to capture.file.$$
-#  In this example, remote.printer is a shell script, see the
-#  installation guide for a complete example of remote printing.
-remote:postscript:remote.printer:lwf:Remote printing shell script
-#  If your spooling area is small, large print jobs may fail with the
-#  above examples, here is how that can be dealt with.
-ps3large:postcsript:cat - > /tmp/large.$$;lpr -Pps3 /tmp/large.$$;rm -f /tmp/large.$$:lwf:
-#  In other words, multiple commands can appear in the printcommand field
-#  as long as the field works appropriately (under csh) at the end of
-#  a pipeline.
diff -uNr 3.5/sunbin/printit unipops-3.6/sunbin/printit
--- 3.5/sunbin/printit	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/printit	1969-12-31 17:00:00.000000000 -0700
@@ -1,60 +0,0 @@
-#!/bin/csh -f
-#
-#    @(#)printit.sh	5.1 06/22/94
-#
-#	unipops printer selection : chooses which script to use
-#  Usage: printit printer printtype filename[s]
-#     where printer is the name of a printer appearing in the printers file
-#     printtype is the printer type needed to print filename
-#     filename[s] is[are] the name[s] of the file[s] to be printed
-#     
-#   If printtype doesn't match the string found in printers for the
-#   indicated printer, the files are NOT printed and an error is issued.
-#
-if ($#argv < 3) then
-   echo "Usage: printit printer printtype filename[s]"
-   exit(1)
-endif
-set printer=$1
-set inprinttype=$2
-eval `awk -f ${popsdir}sunbin/print.awk printer=$printer ${popsdir}sunbin/printers`
-if ($?printtype == 0 && printer != "none") then
-   echo "printit: printer $printer not found\!"
-   exit(1)
-else if ($?printtype == 0 && printer == "none") then
-#		use nogprint and a default printer, whatever it is
-   set printcmd="lpr"
-   nogprint $argv[3-]
-   exit(0)
-endif
-endif
-if ("$printtype" != "$inprinttype" && "$inprinttype" != "text") then
-   echo "printit: invalid printer type, $inprinttype, for printer ${printer}\!"
-   exit(1)
-endif
-if ("$printcmd" == "") then
-   echo "printit: missing print command for printer ${printer}\!"
-   exit(1)
-endif
-switch ($inprinttype)
-   case text:
-      print.exe "$printcmd" "$textfilter" $argv[3-]
-      breaksw
-   case postscript:
-      postprint "$printcmd" $argv[3-]
-      breaksw
-   case qms:
-      qmsprint "$printcmd" $argv[3-]
-      breaksw
-   case hpgl:
-      hpprint "$printcmd" $argv[3-]
-      breaksw
-   case quic:
-      quicprint "$printcmd" $argv[3-]
-      breaksw
-   default:
-      echo "Unrecognized printer type: $printtype"
-      exit(1)
-      breaksw
-endsw
-exit(0)
diff -uNr 3.5/sunbin/qmsprint unipops-3.6/sunbin/qmsprint
--- 3.5/sunbin/qmsprint	2000-03-16 11:31:33.000000000 -0700
+++ unipops-3.6/sunbin/qmsprint	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-#! /bin/csh -f
-# @(#)qmsprint.sh	5.1 06/22/94
-# Script for printing in TEK4010 format to QMS printer
-#
-if ($#argv < 2) exit(1)
-if (-z $2) exit(0)
-#
-echo "cat ${popsdir}sunbin/qmsstart $2 ${popsdir}sunbin/qmsterm | $1" | /bin/csh -f
diff -uNr 3.5/sunbin/qmsstart unipops-3.6/sunbin/qmsstart
--- 3.5/sunbin/qmsstart	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/qmsstart	1969-12-31 17:00:00.000000000 -0700
@@ -1,7 +0,0 @@
-
-^PY^-
-^IOL^-
-^IMH0038010620^IMV0010008100^-
-^IGT1^-
-^PN^-
-
diff -uNr 3.5/sunbin/qmsterm unipops-3.6/sunbin/qmsterm
--- 3.5/sunbin/qmsterm	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/qmsterm	1969-12-31 17:00:00.000000000 -0700
@@ -1,4 +0,0 @@
-
-^PY^-
-^IGE^-
-^PN^-
diff -uNr 3.5/sunbin/quicprint unipops-3.6/sunbin/quicprint
--- 3.5/sunbin/quicprint	2000-03-16 11:31:33.000000000 -0700
+++ unipops-3.6/sunbin/quicprint	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-#! /bin/csh -f
-# @(#)quicprint.sh	5.1 06/22/94
-# Script for printing in QUIC format to QMS printer
-#
-if ($#argv < 2) exit(1)
-if (-z $2) exit(0)
-#
-echo "cat ${popsdir}sunbin/quicstart $2 ${popsdir}sunbin/quicterm | $1" | /bin/csh -f
diff -uNr 3.5/sunbin/quicstart unipops-3.6/sunbin/quicstart
--- 3.5/sunbin/quicstart	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/quicstart	1969-12-31 17:00:00.000000000 -0700
@@ -1,4 +0,0 @@
-^PY^-
-^IOL^-
-^IMH0038010620^IMV0005008450^-
-^M01601200000^DL^IGV
diff -uNr 3.5/sunbin/quicterm unipops-3.6/sunbin/quicterm
--- 3.5/sunbin/quicterm	2000-03-16 11:31:37.000000000 -0700
+++ unipops-3.6/sunbin/quicterm	1969-12-31 17:00:00.000000000 -0700
@@ -1 +0,0 @@
-^A^IGE^PN^-
diff -uNr 3.5/sunbin/rundaemon.c unipops-3.6/sunbin/rundaemon.c
--- 3.5/sunbin/rundaemon.c	2000-03-16 11:32:35.000000000 -0700
+++ unipops-3.6/sunbin/rundaemon.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,96 +0,0 @@
-/*    @(#)rundaemon.c	5.2 07/08/94     */
-
-/*  Runs a process as a daemon  */
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <signal.h>
-#ifdef SOLARIS
-# include <sys/types.h>
-#else
-# include <sys/ioctl.h>
-#endif
-
-static int file2;
-
-void sessdetach(init_flag)
-int init_flag;
-{
-	int file0,file1, fd;	/* file descriptors */
-/* If launched by init (process 1), there's no need to detach.
- * Note: this test is unreliable due to an unavoidable race
- * condition if the process is orphaned.
- */
-	if (init_flag)
-		goto out;
-/* Ignore terminal stop signals */
-#ifdef SIGTTOU
-	signal(SIGTTOU, SIG_IGN);
-#endif
-#ifdef SIGTTIN
-	signal(SIGTTIN, SIG_IGN);
-#endif
-#ifdef SIGTSTP
-	signal(SIGTSTP, SIG_IGN);
-#endif
-/* Allow parent shell to continue.
- * Ensure the process is not a process group leader.
- */
-	if (fork() != 0)
-		exit(0);	/* parent terminates */
-/* child code follows: */
-/* Disassociate from controlling terminal and process group.
- *
- * Ensure daemon can't reacquire a new controlling terminal.
- *
-*/
-
-#ifdef SOLARIS
-/*		This may work for both SOLARIS and SunOS */
-/*		but for now, leave the old code as is    */
-	setsid();
-#else
-	setpgrp(0, getpid());
-	if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
-		ioctl(fd, TIOCNOTTY, 0);
-		close(fd);
-	}
-#endif
-out:
-	/* close all files except for stderr, which now goes to the console */
-	close(0);
-	close(1);
-	close(2);
-	if ((file0 = open("/dev/console",O_WRONLY)) == -1) /* file number 0 */
-		exit(2);
-	if ((file1 = open("/dev/console",O_WRONLY)) == -1) /* file number 1 */
-		exit(3);
-	if ((file2 = open("/dev/console",O_WRONLY)) == -1) /* file number 2 */
-		exit(4);
-	close(0);
-	close(1);
-	return;		/* from sessdetach() call */
-}
-
-
-main(argc, argv)
-int argc;
-char *argv[];
-{
-	if (argc < 2) {
-		fprintf(stderr, "Usage: rundaemon command [args]\n");
-		exit(2);
-	}
-
-	if (access(argv[1], 1) == -1) {
-		fprintf(stderr, "rundaemon: can't execute\n");
-		perror(argv[1]);
-		exit(2);
-	}
-	sessdetach(0);
-	execv(argv[1], &argv[1]);
-	exit(2);
-}
-
-
-
diff -uNr 3.5/sunbin/testarray.prc unipops-3.6/sunbin/testarray.prc
--- 3.5/sunbin/testarray.prc	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/testarray.prc	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-proc testarray
-array c1(10)
-array c2(2,2,3)
-array c3(2,2,2,2,2)
-array c4(-10 to 10)
-array c5(-1 to 1, -3 to -1)
-return
-finish
diff -uNr 3.5/sunbin/testerr.prc unipops-3.6/sunbin/testerr.prc
--- 3.5/sunbin/testerr.prc	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/testerr.prc	1969-12-31 17:00:00.000000000 -0700
@@ -1,11 +0,0 @@
-proc testerr
-for nsave = 1 to 20
-   erroff
-   recall
-   if errcode = 0 then
-       baseline
-   else
-       print 'ERROR-- code:', errcode
-   end; end
-erron return
-finish
diff -uNr 3.5/sunbin/testif.prc unipops-3.6/sunbin/testif.prc
--- 3.5/sunbin/testif.prc	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/testif.prc	1969-12-31 17:00:00.000000000 -0700
@@ -1,27 +0,0 @@
-proc testif(a)
-if a > 10 then
-   print 'a>10'; end
-if a < 10 then
-   print 'a<10'; end
-if a=10 then
-   print 'a=10'; end
-if a ~= 10 then
-   print 'a~=10'; end
-if a >= 10 then
-   print 'a>=10'; end
-if a <= 10 then
-   print 'a<=10'; end
-if a>0 & a<10 then
-   print 'a>0 & a<10'
-else
-   print 'not a>0 & a,10';end
-if a>10 | a<0 then
-   print 'a>10 | a<0'; end
-if ~(a>10 | a<0) then
-   print '~(a>10 | a<0)'; end
-if ~(a>10) & a<0 then
-  print '~(a>10) & a<0'; end
-if a~=10 & a=5 then
-  print 'a~=10 & a=5'; end
-return
-finish
diff -uNr 3.5/sunbin/testrtrn.prc unipops-3.6/sunbin/testrtrn.prc
--- 3.5/sunbin/testrtrn.prc	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/testrtrn.prc	1969-12-31 17:00:00.000000000 -0700
@@ -1,5 +0,0 @@
-proc testrtrn(a)
-scalar b
-b = 23**ifix(a)
-return b
-finish
diff -uNr 3.5/sunbin/testwhile.prc unipops-3.6/sunbin/testwhile.prc
--- 3.5/sunbin/testwhile.prc	2000-03-16 11:31:36.000000000 -0700
+++ unipops-3.6/sunbin/testwhile.prc	1969-12-31 17:00:00.000000000 -0700
@@ -1,16 +0,0 @@
-proc testwhile(b)
-scalar a
-a=b
-while a>= 10
-   print a; a=a-1; end
-a=b
-while a<=10
-   print a; a=a+1; end
-a=b
-while a~=10
-   print a; a=10; end
-a=b
-while a~=10 & a~=20
-   print a; a=10; end
-return a
-finish
diff -uNr 3.5/sunbin/tuc.nrao.edu.mkfiles.unipops unipops-3.6/sunbin/tuc.nrao.edu.mkfiles.unipops
--- 3.5/sunbin/tuc.nrao.edu.mkfiles.unipops	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/tuc.nrao.edu.mkfiles.unipops	1969-12-31 17:00:00.000000000 -0700
@@ -1,11 +0,0 @@
-# @(#)tuc.nrao.edu.mkfiles.unipops	5.1 06/22/94
-#
-#   Tucson (downtown) specific mkfiles.unipops
-#   handles empty GAINS file and copying default SETUP files
-#
-if (! -e LGAINS) ${popsdir}sunbin/makefile.exe LGAINS
-echo -n "."
-if (! -e LSETUP && -e ~obs/LSETUP) cp ~obs/LSETUP LSETUP
-echo -n "."
-if (! -e CSETUP && -e ~obs/CSETUP) cp ~obs/CSETUP CSETUP
-echo -n "."
diff -uNr 3.5/sunbin/tuccondar unipops-3.6/sunbin/tuccondar
--- 3.5/sunbin/tuccondar	2000-03-16 11:31:34.000000000 -0700
+++ unipops-3.6/sunbin/tuccondar	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-#!/bin/csh -f
-#
-#   @(#)tuccondar.sh	5.1 06/22/94
-#
-# Determines whether to call condar or condar.rmt
-#
-onintr ERROR
-#
-setenv INFANTS /tmp/Infants.$$
-if (-e $INFANTS) rm -f $INFANTS
-touch $INFANTS
-#
-${popsdir}sunbin/tuccondar.exe
-#
-ERROR:
-${popsdir}sunbin/infantcide $INFANTS
-rm $INFANTS
diff -uNr 3.5/sunbin/tucline unipops-3.6/sunbin/tucline
--- 3.5/sunbin/tucline	2000-03-16 11:31:34.000000000 -0700
+++ unipops-3.6/sunbin/tucline	1969-12-31 17:00:00.000000000 -0700
@@ -1,17 +0,0 @@
-#!/bin/csh -f
-#
-#   @(#)tucline.sh	5.1 06/22/94
-#
-# Determines whether to call line or line.rmt
-#
-onintr ERROR
-#
-setenv INFANTS /tmp/Infants.$$
-if (-e $INFANTS) rm -f $INFANTS
-touch $INFANTS
-#
-${popsdir}sunbin/tucline.exe
-#
-ERROR:
-${popsdir}sunbin/infantcide $INFANTS
-rm $INFANTS
diff -uNr 3.5/sunbin/twodim.mask unipops-3.6/sunbin/twodim.mask
--- 3.5/sunbin/twodim.mask	2000-03-16 11:31:38.000000000 -0700
+++ unipops-3.6/sunbin/twodim.mask	1969-12-31 17:00:00.000000000 -0700
@@ -1,36 +0,0 @@
-SIMPLE  =                    T      / Fits 2-D image file; Processed by UniPops
-BITPIX  =                   16      /               
-NAXIS   =                    2      /            
-NAXIS1  =                    1      /                                           
-NAXIS2  =                    1      /                                           
-CTYPE1  = '        '                /                                           
-CRVAL1  =      0.000000000E+00      /                                           
-CDELT1  =      0.000000000E+00      /                                           
-CRPIX1  =      1.000000000E+00      /                                           
-CTYPE2  = '        '                /                                           
-CRVAL2  =      0.000000000E+00      /                                           
-CDELT2  =      0.000000000E+00      /                                           
-CRPIX2  =      1.000000000E+00      /                                           
-OBJECT  = '                '        /                                           
-ORIGIN  = 'NRAO-GB '                /
-DATE    =                           /                                           
-BLANK   =               -32768      /                                           
-BSCALE  =      1.000000000E+00      /                                           
-BZERO   =      0.000000000E+00      /                                           
-BUNIT   = 'K       '                /                                           
-DATAMIN =     -3.276700000E+04      /                                           
-DATAMAX =      3.276700000E+04      /                                           
-EQUINOX =      1.950000000E+03      /
-COMMENT 1                                                                       
-COMMENT 2                                                                       
-COMMENT 3                                                                       
-COMMENT 4                                                                       
-COMMENT 5                                                                       
-COMMENT 6                                                                       
-COMMENT 7                                                                       
-COMMENT 8                                                                       
-COMMENT 9                                                                       
-COMMENT 0                                                                       
-COMMENT A                                                                       
-COMMENT B                                                                       
-END                                                                             
diff -uNr 3.5/sunview/Makefile unipops-3.6/sunview/Makefile
--- 3.5/sunview/Makefile	2000-03-16 12:02:30.000000000 -0700
+++ unipops-3.6/sunview/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -1,58 +0,0 @@
-# @(#)Makefile	5.2 11/02/94
-#
-FCMP = f77
-CCMP = cc
-FC = $(FCMP)
-CC = cc
-FDEBOROPT = -g
-CDEBOROPT = -g
-FLOATOPT = 
-F77INLINE = -libmil
-CINLINE = -libmil
-LIBCORE = /usr/old/libcore77.a /usr/old/libcore.a
-FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(F77INLINE)
-CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CINLINE)
-FFLAGS = -i2 -u $(FFLOAT)
-CFLAGS = -I. $(CFLOAT) 
-CLLIBS  = -lsuntool -lsunwindow -lpixrect -lm
-FLLIBS  = -lsunwindow -lpixrect -lm 
-#
-# Macros which define compilation and linking parameters
-# [FC]DEBOROPT (debug or optimize flag, for fortan or c) = 'g' as a default 
-# for using the debugger (reset for optimization using command line 
-# substitution).
-#
-
-BINLIST = popstool.exe scgraphics.exe 
-
-all:	$(BINLIST)
-
-clean:
-	rm -f popstool.exe scgraphics.exe
-	rm -f *.o
-	rm -f shm_graph.c
-	-sccs clean
-	rm -f shm_graph.c
-
-install: popstool.exe scgraphics.exe
-	\cp -p scgraphics.exe popstool.exe ${popsdir}sunbin
-
-popstool.exe: popstool.c pops.icon
-	$(CC) popstool.c $(CFLAGS) -o popstool.exe $(CLLIBS)
-
-scgraphics.exe: scgraphics.o shm_graph.o keystroke.o
-	$(FC) scgraphics.o shm_graph.o  keystroke.o $(FFLAGS) -o scgraphics.exe $(LIBCORE) -lsunwindow -lpixrect $(FLLIBS)
-
-shm_graph.o: shm_graph.c
-	$(CC) -c shm_graph.c $(CFLAGS) 
-
-keystroke.o: keystroke.c
-	$(CC) -c keystroke.c $(CFLAGS) 
-
-shm_graph.c: $(popsdir)source/conline/shm_graph.c
-	rm -f shm_graph.c
-	cp -p $(popsdir)source/conline/shm_graph.c .
-	chmod +w shm_graph.c
-
-scgraphics.o: scgraphics.f
-	$(FC) -c scgraphics.f $(FFLAGS)
diff -uNr 3.5/sunview/keystroke.c unipops-3.6/sunview/keystroke.c
--- 3.5/sunview/keystroke.c	2000-03-16 12:02:30.000000000 -0700
+++ unipops-3.6/sunview/keystroke.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-
-/*   @(#)keystroke.c	5.1 06/22/94      */
-
-#include <termio.h>
-#include <stdio.h>
-
-static struct termio tbufsave;
-
-void setraw_()  /* sets up raw terminal  */
-
-{
-
-	struct termio tbuf;
-
-	if (ioctl(0, TCGETA, &tbuf) == -1)
-		exit(-1);
-
-	tbufsave = tbuf;
-	tbuf.c_lflag &= ~ICANON;
-	tbuf.c_cc[4] = 4;
-	tbuf.c_cc[5] = 2;
-	if (ioctl(0, TCSETAF, &tbuf) == -1)
-		exit(-2);
-}
-
-void keystroke_(ierr, result, length)  /* gets character from terminal  */
-
-char *result;
-int *ierr, length;
-
-{
-	*ierr = read(0, result, 1);
-
-}
-
-void restore_()  /* Restore terminal flags */
-{
-	if (ioctl(0, TCSETAF, &tbufsave) == -1)
-		exit(-5);
-}
-
diff -uNr 3.5/sunview/pops.icon unipops-3.6/sunview/pops.icon
--- 3.5/sunview/pops.icon	2000-03-16 12:02:30.000000000 -0700
+++ unipops-3.6/sunview/pops.icon	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
-	0xC080,0x0400,0x8008,0x0103,0xC080,0x0400,0x8008,0x0103,
-	0xC080,0x0400,0x8008,0x0103,0xC000,0x0000,0x0000,0x0003,
-	0xC000,0x0000,0x0000,0x0003,0xC000,0x0000,0x0000,0x0003,
-	0xC000,0x0000,0x000E,0x5A03,0xC000,0x0000,0x000A,0xDA03,
-	0xC000,0x0000,0x0006,0x5A03,0xF800,0x0000,0x0000,0x001F,
-	0xC000,0x0000,0x0000,0x0003,0xC000,0x0000,0x0000,0x0003,
-	0xC000,0x0002,0x0000,0x0003,0xC000,0x0002,0x0000,0x0003,
-	0xC000,0x0005,0x0000,0x0003,0xC000,0x0005,0x0000,0x0003,
-	0xC000,0x0005,0x0000,0x0003,0xC000,0x0008,0x8000,0x0003,
-	0xC000,0x0008,0x8000,0x0003,0xF800,0x0008,0x8000,0x001F,
-	0xC000,0x0010,0x4000,0x0003,0xC000,0x0010,0x4000,0x0003,
-	0xC000,0x0010,0x4000,0x0003,0xC000,0x0020,0x2000,0x0003,
-	0xC000,0x0020,0x2000,0x0003,0xC000,0x0020,0x2000,0x0003,
-	0xC000,0x0040,0x1000,0x0003,0xC000,0x0040,0x1000,0x0003,
-	0xC000,0x0040,0x1000,0x0003,0xC000,0x0080,0x0800,0x0003,
-	0xF800,0x0080,0x0800,0x001F,0xC000,0x0080,0x0800,0x0003,
-	0xC000,0x1100,0x0400,0x0003,0xE100,0x1100,0x0410,0x0003,
-	0xE100,0x3100,0x0430,0x0003,0xE280,0x2900,0x0228,0x2003,
-	0xE284,0x4A00,0x0248,0x6003,0xD24C,0x4A00,0x0284,0x9083,
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xD452,0x8600,0x0103,0x1227,
-	0xD431,0x0400,0x0002,0x0C2B,0xC821,0x0000,0x0000,0x0813,
-	0xC880,0x0400,0x8008,0x0103,0xC080,0x0400,0x8008,0x0103,
-	0xC080,0x0400,0x8008,0x0103,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
-	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x0000,0x0000,0x0000,0x0000,
-	0x0000,0x0000,0x0000,0x0000,0x7C00,0x0000,0x7E00,0x003C,
-	0x6600,0x0000,0x1800,0x000C,0x663C,0x6C3C,0x183C,0x3C0C,
-	0x6666,0x7666,0x1866,0x660C,0x7C66,0x6660,0x1866,0x660C,
-	0x6066,0x663C,0x1866,0x660C,0x6066,0x6606,0x1866,0x660C,
-	0x6066,0x7666,0x1866,0x660C,0x603C,0x6C3C,0x183C,0x3C0C,
-	0x0000,0x6000,0x0000,0x0000,0x0000,0x6000,0x0000,0x0000,
-	0x0000,0x6000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
diff -uNr 3.5/sunview/popstool.c unipops-3.6/sunview/popstool.c
--- 3.5/sunview/popstool.c	2000-03-16 12:02:30.000000000 -0700
+++ unipops-3.6/sunview/popstool.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,111 +0,0 @@
-/* @(#)popstool.c	5.1 06/22/94 
-* Creates a new tty window that wont die when QUIT is clicked
-* and that will run a process specified on the command line
-*/
-
-#include <sys/wait.h>
-#include <stdio.h>
-#include <suntool/sunview.h>
-#include <suntool/tty.h>
-#include <ctype.h>
-
-static Notify_value donot_destroy();
-static Notify_value destroy();
-
-static Frame frame;
-static Tty tty;
-
-int child_death, child_status;
-
-static short ic_image[258] = {
-#include <pops.icon>
-};
-mpr_static(gfxic_mpr, 64, 64, 1, ic_image);
-
-static	struct icon icon = {64, 64, (struct pixrect *)NULL, 0, 0, 64, 64,
-	    &gfxic_mpr, 0, 0, 0, 0, NULL, (struct pixfont *)NULL,
-	    ICON_BKGRDCLR};
-
-main(argc, argv)
-	int argc;
-	char **argv;
-{
-	static	char *label_default = "PopsTool";
-	int child_pid, j;
-
-	child_death = 0;
-	child_status = 0;
-
-	/*
-	 * Create tool window
-	 */
-	frame = window_create(NULL, FRAME,
-	    FRAME_LABEL,		label_default,
-	    FRAME_ICON,			&icon,
-	    FRAME_ARGC_PTR_ARGV,	&argc, argv,
-/*	    WIN_ROWS,			25,
-	    WIN_COLUMNS,		80, */
-	    WIN_ERROR_MSG,		"Cannot create frame",
-	    0);
-
- 	/*
-	 * Create tty tool subwindow
-	 */
-	tty = window_create(frame, TTY,
-	    TTY_QUIT_ON_CHILD_DEATH,	FALSE,
-	    TTY_ARGV,			&argv[1],
-	    0);
-
-	child_pid = (int)window_get(tty, TTY_PID);
-	(void) notify_interpose_wait3_func(tty, destroy, child_pid);
-	(void) notify_interpose_destroy_func(frame, donot_destroy);
-	window_main_loop(frame);
-	exit(child_status);
-
-}
-
-
-static Notify_value
-donot_destroy(frame, status)
-
-Frame frame;
-Destroy_status status;
-
-{
-	if (status == DESTROY_CHECKING) 
-	{
-		if (child_death == 0)
-		{
-		   (void) notify_veto_destroy(frame);
-		    return(NOTIFY_DONE);
-		}
-		else
-		{
-		    window_set(frame, FRAME_NO_CONFIRM, TRUE, 0);
-		}
-	}
-	else
-	{
-		window_set(frame, FRAME_NO_CONFIRM, TRUE, 0);
-	} 
-	return (notify_next_destroy_func(frame, status) );
-}
-
-static Notify_value
-destroy(tty, pid, status, rusage)
-
-Tty tty;
-int pid;
-union wait *status;
-struct rusage *rusage;
-
-{
-	if ((*status).w_termsig) 
-	    child_status = (*status).w_termsig;
-	else
-	    child_status = (*status).w_retcode;
-	child_death = -1;
-	window_done(tty);
-	return(NOTIFY_DONE);
-}
-
diff -uNr 3.5/sunview/scgraphics.f unipops-3.6/sunview/scgraphics.f
--- 3.5/sunview/scgraphics.f	2000-03-16 12:02:30.000000000 -0700
+++ unipops-3.6/sunview/scgraphics.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,607 +0,0 @@
-      program graphics
-c
-c     @(#)scgraphics.f	5.1 06/22/94
-c
-c     Accepts graphics commands from the Fifo specified as the second arguement
-c     on the command line and does the graphics command using SunCore.  If the
-c     command is Flush, then it will read graphics commands from the
-c     shared memory (which has the same name as this Fifo).  When a
-c     cursor is asked for, the position and button pushed are returned to the
-c     Fifo specified as the first command-line arguement. 
-c
-c     Starts up the 'CHECKUP.EXE' script to make sure that both this process
-c     and its parrent process (whose ID is given as the third arguement)
-c     remain running
-c
-      character*80 string
-      character*16 fifoin, fifoout, shove, popsprocid, procid,
-     .		   stch
-      character*18 blank  
-      character*1 char 
-      character*5 memname
-      logical front, open, testopen   
-      integer*2 ilen, lastblnk, icp, icpx, icpy, short
-      integer*4 iargc, inumarg, long, irtn, readshm2, cmnd, pos1, pos2,
-     .          getpid, system, ifpread, ifpwrite, unlink, i, j
-c
-      data blank/'                  '/
-c
-      open(unit=0, form="print")
-c
-      inumarg = iargc()
-c
-      if (inumarg .lt. 3) then
-	write(0,*) 'GRAPHICS: bad parameter list'
-	call exit(long(6))
-      else
-	call getarg(long(1),fifoin)
-	call getarg(long(2),fifoout)
-	call getarg(long(3),popsprocid)
-      endif
-c     Gets the shared memory and Fifo names from the command line
-c
-      irtn = getpid()
-      write(procid, 1) irtn
-1     format(i8)
-      irtn = system('checkup.exe ' // procid // ' ' // 
-     .              popsprocid // ' & ')
-c     Get this processes PID and start up 'CHECKUP.EXE'
-c
-      call openwrite(ifpwrite, fifoin(1:lastblnk(fifoin)) // '\0')
-      call openread(ifpread, fifoout(1:lastblnk(fifoout)) // '\0')
-c     open FIFO's
-c
-      ilen = lastblnk(memname)
-c                               only 4 characters can be used for the
-c                               shared memory name (its a long int)
-c                               So, we use the last 4 digits of popsprocid
-c                               substitute 0's if less than 4 digits
-      ilen = lastblnk(popsprocid)
-      j = 1
-      do 105 i = ilen-3, ilen
-         if (i .le. 0) then
-            memname(j:j) = '0'
-         else
-            memname(j:j) = popsprocid(i:i)
-         endif
-         j = j + 1
- 105  continue
-c                               null terminate it
-      memname(5:5) = char(0)
-c
-      call accessshm(memname)
-c     Start up shared memory
-c
-      call coreint
-c     Start up SunCore
-c
-10    call readfifo(ifpread, irtn, shove)
-c     Read from FIFO
-c
-      if (shove(1:4) .eq. 'exit') then
-	call coreclose()
-	call closefifo(ifpread, irtn)
-	call closefifo(ifpwrite, irtn)
-	irtn = unlink(fifoin)
-	irtn = unlink(fifoout)
-	stop
-c	Close down program
-c
-      else if (shove(1:6) .eq. 'cursor') then
-	if ( testopen() ) then
-	   write(0,*) char(27), '[5t'
-	else
-	   write(0,*) char(27), '[1t'
-	endif
-c	Opens window if it was closed; brings window forward if open.
-c
-	call corecursor(icp, icpx, icpy)
-	write(stch,15) icp, icpx, icpy
-15	format(3i5)
-        call writefifo(ifpwrite, irtn, stch // '\0')
-c       Start up a CURSOR session and return position and button number
-c
-      else if (shove(1:5) .eq. 'clear') then
- 	call coreclrpage
-c       Clear the screen
-c
-      else if (shove(1:5) .eq. 'flush') then
-c       We have something in shared memory that needs to be processed
-c
-	if ( testopen() ) then
-	   front = .false.
-	   open = .true.
-	else
-	   front = .true.
-	   open = .false.
-	endif
-c	Find out if window is opened.  If it is closed, then assume window will
-c	be in front when opened; else, assume it is behind (you suffer no penalty
-c	if it were in front and you assume it were behind).
-c
-20      irtn = readshm2(cmnd, pos1, pos2, string)
-	if (irtn .gt. 0) then
-c	   We haven't gotten to the end of shared memory yet
-c
-	   if (cmnd .eq. 2 .or. cmnd .ge. 10) then
-	      if (.not. open) write(0,*) char(27), '[1t'
-	      if (.not. front) write(0,*) char(27), '[5t'
-	      open = .true.
-	      front = .true.
-	   endif
-c	   Opens window (if it were closed); Fronts window;
-c	   Only need to do this for VCTR, DITHER, BOX, and CHAR commands.
-c
-	   if (cmnd .eq. 1) then
-	      call coreplace(short(pos1), short(pos2))
-c	      Place command
-c
-	   else if (cmnd .eq. 2) then
-	      call corevctr(short(pos1), short(pos2))
-c	      Vctr command
-c
-	   else if (cmnd .eq. 4) then
-	      call corecolor(pos1)
-c	      Command for updating or changing the color table.
-c
-	   else if (cmnd .eq. 15) then
-	      call corebox(string)
-c	      Command for drawing a filled box.
-c
-	   else if (cmnd .eq. 16) then
-	      call coredither(short(pos1), short(pos2), string)
-c	      Command for half-tone box.
-c
-c***           else
-c***	      write(0,*) 'Bad command:', cmnd
-	   endif
-	   goto 20
-c
-	else
-c
-	   call writefifo(ifpwrite, irtn, 'done')
-c	   Shared memory is exausted and we should ask for more graphics commands
-c
-	endif
-c
-c***      else
-c***	write(0,*) 'Bad shove'
-      endif
-c
-      goto 10
-c
-99    write(0,*) 'GRAPHICS: Problem opening file'
-      stop
-      end
-c
-c
-      subroutine coreflush
-c
-c     Dummy routine needed for linking purposes only.
-c
-      return
-c
-      end
-c
-c
-      subroutine corebox(string)
-c
-c     Draws a filled box at the coordinate cooded into STRING
-c
-      character*(*) string
-c
-      real*4 boxx(4), boxy(4), xscale, yscale
-      integer*4 long
-      integer*2 i
-c
-      data xscale/0.8/, yscale/ 0.8/
-c
-      read(string,10) boxx, boxy
-10    format(8f10.0)
-c
-      do 11 i = 1, 4
-	boxx(i) = boxx(i)*xscale
-	boxy(i) = boxy(i)*yscale
-11	continue
-c
-      call polygonabs2(boxx, boxy, long(4))
-c
-      return
-      end
-c
-c
-      subroutine coredither(ix, iy, string)
-c
-c     Draws a half-tone box at the coordinate cooded into STRING
-c
-      character*(*) string
-c
-      integer*4 long, levmax, long 
-      integer*2 nx, ny, ix, iy, nxold, nyold, ixdt(16384), iydt(16384),
-     .		matset(16384), i, ii3, ierr
-      real percent, rand, xscale, yscale, xdt4, ydt4
-c
-      data xscale/0.8/, yscale/ 0.8/
-c
-      save nxold, nyold
-c
-      read(string,10,iostat=ierr) nx, ny, percent
-10    format(i5, i5, f10.0)
-      nx = nint(xscale * nx)
-      ny = nint(yscale * ny)     
-      levmax = long(nx) * long(ny)
-      levmax = min(long(16384),levmax)
-c
-      if (nx .ne. nxold .or. ny .ne. nyold) then
-         do 100 i = 1, levmax
-	   matset(i) = 0
-100	   continue
-c          Clear out set matrix
-c
-         do 130 i = 1, levmax
-120	   ixdt(i) = nint(rand(long(0))*float(nx-1)+1.0)
-	   iydt(i) = nint(rand(long(0))*float(ny-1)+1.0)
-	   ii3 = ny*(ixdt(i)-1) + iydt(i)
-	   if (matset(ii3) .eq. 1) goto 120
-	   matset(ii3) = 1
-130	   continue
-      endif
-c     Fill in pixel arrays and set metrix.
-c
-      ii3 = nint(rand(long(0))*float(levmax-1)+1.0)
-      do 310 i = 1, nint(percent*float(levmax))
-		ii3 = ii3 + 1
-		if (ii3 .gt. levmax) ii3 = 1
-		xdt4 = xscale*float(ix) + float(ixdt(ii3) - 1)
-		ydt4 = yscale*float(iy) + float(iydt(ii3) - 1)
-      		call MoveAbs2(xdt4, ydt4)
-		call LineAbs2(xdt4, ydt4)
-310		continue
-c     Draw pixels
-c
-      nxold = nx
-      nyold = ny
-      return
-      end
-c
-      subroutine corevctr(ix, iy)
-c
-c     Draws a line from the position last specified by
-c     move to the position ix, iy -- SUNCORE
-c
-      integer*2 ix, iy
-      real*4 xscale, yscale, x2, y2
-c
-      data xscale/0.8/, yscale/ 0.8/
-c     Ratios between LINE/CONDAR internal screen units and SUNCORE
-c	screen units
-c
-      x2 = xscale*ix
-      y2 = yscale*iy
-      call LineAbs2(x2, y2)
-c
-      return
-      end
-c
-      subroutine coreplace (ix, iy)
-c
-c     Places cursor for next VCTR, BOX, CHAR call 
-c
-      integer*2 ix, iy
-      real*4 xscale, yscale, x1, y1
-c
-      data xscale/0.8/, yscale/0.8/
-c     Ratios between LINE/CONDAR screen size and SUNCORE screen size
-c
-      x1 = xscale*ix
-      y1 = yscale*iy
-      call MoveAbs2(x1,y1)
-c
-      return
-      end
-c
-      subroutine corecursor(irtn, ix, iy)
-c
-c     Returns cursor position in SUNCORE
-c
-      integer*4 long, ibutton 
-      integer*2 irtn, ix, iy
-      real*4 xscale, yscale, xfact, yfact, xshift, yshift, x1, y1, x, y
-c
-      data xscale/1025/, yscale/1066.7/
-      data xfact/1./, yfact/0.935266/, xshift/-0.5/, yshift/-0.375/
-c     xscale, yscale = number of pixels in SUNCORE screen; used to convert
-c	from screen coords to those used by the program
-c     After button on mouse is pushed, the x,y coords of the center of the
-c	cursor are given by x = (x + xshift)*xfact; y = (y + yshift)*yfact
-c
-c
-      call SetSegVisibility(long(1), long(1))
-      call SetSegHighlight(long(1), long(0))
-c     Turns cursor on
-c
-      irtn = 0
-      x1 = 0
-      y1 = 0
-c
-10       call AwtButtonGetLoc2(long(0), long(1), ibutton, x, y)
-         if (ibutton .eq. 0) then
-	     if(x1.ne.x .or. y1.ne.y) then
-                 call SetSegImgXLate2(long(1), xfact*(x+xshift), 
-     1					   yfact*(y+yshift))
-		 x1 = x
-		 y1 = y
-	     endif
-	     goto 10
-         endif
-c     Main loop which updates cursor if the mouse is moved; exits loop
-c	if buttons 1 or 3 are pushed
-c
-      call SetSegVisibility(long(1), long(0))
-c     Turns cursor off
-c
-      if (ibutton .eq. 3) then
-	irtn = -1
-      else
-	irtn = -2
-      endif
-      ix = x*xscale
-      iy = y*yscale
-c
-      return
-      end
-c
-      subroutine coreclrpage
-c
-c     Clears SUNCORE graphics screen
-c
-      integer*4 long
-c
-      call DelAllRetainSegs()
-c
-      call SetImgXFormType(long(2))
-      call SetRasterOp(long(1))
-      call CreateRetainSeg(long(1))
-      call MoveAbs2(410.,320.)
-      call LineRel2(0.,640.)
-      call MoveAbs2(410.,320.)
-      call LineRel2(0.,-640.)
-      call MoveAbs2(410.,320.)
-      call LineRel2(820.,0.)
-      call MoveAbs2(410.,320.)
-      call LineRel2(-820.,0.)
-      call CloseRetainSeg()
-      call SetSegVisibility(long(1),long(0))
-c     Creates image of crosshair
-c
-      Call SetImgXFormType(long(1))
-      call SetRasterOp(long(0))
-      call CreateRetainSeg(long(2))
-c     Opens Standard Graphics Segment
-c
-c
-      return
-      end
-c
-      subroutine coreint
-c
-c     Initializes SUNCORE Graphics Screen
-c
-      integer*4 loc, long, idx, i, vsurf(21), ncolor, icolor(128), 
-     .		ddin, dynb, twod, fals, loc2, but2, iprec, ilast,
-     .		cgpixwindd, noinpt, mapsize, cmapsize, InitializeCore,
-     .		InitializeVwsurf, SelectVwsurf, pixwindd
-      real cred(128), cblue(128), cgreen(128)
-c
-      external cgpixwindd
-      external pixwindd
-c
-      save ncolor, cred, cgreen, cblue, icolor, ilast
-c
-      data ddin/12/, dynb/3/, twod/0/, fals/0/, loc2/3/, but2/2/, 
-     .     iprec/1/, noinpt/0/, cmapsize/14/
-c     These SUNCORE parameters were gotten from 'usr/include/f77/usercore77.h'
-c
-      data vsurf /21*0/,mapsize/127/,icolor/0,127*15790320/,ncolor/2/,
-     1     cred/0.0,127*1.0/, cgreen/0.0,127*1.0/,cblue/0.0,127*1.0/,
-     2     ilast/1/
-c     Parameters used by or passed to SUNCORE routines. 
-c     VSURF = array containing SUNCORE surface definistions. 
-c     MAPSIZE = 1 less than number of colors in color table.
-c     ICOLOR = array containing coded colors in table. -- first two colors
-c		are black (background) and white.
-c     NCOLOR = number of colors used in table.
-c     CRED, CGREEN, CBLUE = colors in table.
-c     ILAST = entry in color table that was last used.
-c
-      if(InitializeCore(dynb, noinpt, twod).ne.0) then
-	write(0,*) 'Cannot initialize SUNCORE... Terminating'
-	call exit(long(6))
-      endif
-c
-      vsurf(ddin) = loc(cgpixwindd)
-      vsurf(cmapsize) = mapsize + 1
-      if (InitializeVwsurf(vsurf, fals) .ne. 0) then
-        vsurf(ddin) = loc(pixwindd)
-        vsurf(cmapsize) = mapsize + 1
-        if (InitializeVwsurf(vsurf, fals) .ne. 0) then
-	  write(0,*) 'Cannot initialize View Surface... Terminating'
-	  call exit(long(6))
-        endif
-      endif
-c     First, try COLOR; if unsuccessful, try B&W
-c
-      if(SelectVwsurf(vsurf) .ne. 0) then
-	write(0,*) 'Cannot Select View Surface... Terminating'
-	call exit(long(6))
-      endif
-c
-      call SetViewport2(0., 1., 0., 0.7)
-      call SetWindow(0., 820., 0., 640.)
-      call SetOutputClip(long(1))
-c     Sets up graphics window sizes
-c
-      call InitializeDevice(loc2, long(1))
-      call InitializeDevice(but2, long(3))
-      call InitializeDevice(but2, long(1))
-      call SetEcho(loc2, long(1), long(0))
-      call SetEchoSurface(loc2, long(1), vsurf)
-c     Initializes the mouse for input
-c
-      call SetImgXFormType(long(2))
-      call SetRasterOp(long(1))
-      call CreateRetainSeg(long(1))
-      call SetLineIndex(long(1))
-      call MoveAbs2(410.,320.)
-      call LineRel2(0.,640.)
-      call MoveAbs2(410.,320.)
-      call LineRel2(0.,-640.)
-      call MoveAbs2(410.,320.)
-      call LineRel2(820.,0.)
-      call MoveAbs2(410.,320.)
-      call LineRel2(-820.,0.)
-      call CloseRetainSeg()
-      call SetSegVisibility(long(1), long(0))
-c     Creates image of crosshair
-c
-      Call SetImgXFormType(long(1))
-      call SetRasterOp(long(0))
-      call CreateRetainSeg(long(2))
-c     Opens Standard Graphics Segment
-c
-      call DefColorIndices(vsurf, long(0), mapsize, cred, cgreen,
-     .		 cblue)
-      call SetFillIndex(long(1))
-      call SetLineIndex(long(1))
-      call SetTextIndex(long(1))
-c     Sets up default color table
-c
-      return
-c
-      entry coreclose
-c    
-c     Close down SUNCORE
-c
-      call TerminateDevice(loc2, long(1))
-      call TerminateDevice(but2, long(3))
-      call TerminateDevice(but2, long(1))
-      call CloseTempSeg()
-      call DeselectVwsurf(vsurf)
-      call TerminateCore()
-c
-      return
-c
-      entry corecolor(idx)
-c
-c     Adds a color to the color table
-c
-c     Color stored in IDX in RGB notation in compact format
-c     IDX = RED*(16^5) + GREEN*(16^3) + BLUE*16 where RED,GREEN,BLUE goes
-c	from 0 thru 15.  IDX for black = 0, for white = 15790320 
-c
-      do 100 i = 1, ncolor
-	if (idx .eq. icolor(i)) goto 200
-100	continue
-c
-      ncolor = ncolor+1
-      if (ncolor .gt. mapsize + 1) ncolor = 3
-c     Reset index to color in table if table overflows -- don't overwrite
-c     first two default colors.
-c
-      icolor(ncolor) = idx
-      i = ncolor
-      cred(i) = and(rshift(idx,16),255)/255.
-      cgreen(i) = and(rshift(idx,8),255)/255.
-      cblue(i) = and(idx,255)/255.
-      call DefColorIndices(vsurf, long(0), mapsize, cred, cgreen,
-     .			   cblue)
-c     Creates new color in index if the same color doesn't already exist.
-c
-200   if (i .ne. ilast) then
-	call SetFillIndex(i-1)
-        call SetLineIndex(i-1)
-        call SetTextIndex(i-1)
-	ilast = i
-      endif
-c     New graphics will now be done in new color (if different from 
-c     color just previously done).     
-c
-      return
-c
-      end
-c
-      SUBROUTINE COPY (N,KFROM,KTO)
-C
-C     COPY TRANSFERS N INTEGER WORDS FROM KFROM TO KTO.
-C
-      integer*2 KFROM(*), KTO(*)
-      integer*2 n, i
-c
-      DO 10 I=1,N
-         KTO(I) = KFROM(I)
-   10    CONTINUE
-      RETURN
-      END
-c
-      integer*2 function lastblnk(string)
-c
-c     Finds the position of the last non-blank character in STRING
-c
-      character*(*) string
-      integer*4 lnblnk
-c
-      lastblnk = lnblnk(string)
-c     MASSCOMP/SUN function LNBLNK
-c
-      return
-      end
-c
-      INTEGER*2 FUNCTION IWPC (IP)
-c
-C----------------------------------------------------------------------
-C	 IWPC calculates the number of integer words required to
-C     hold IP number of	characters.
-C----------------------------------------------------------------------
-c
-      integer*2 ncpi, ip
-c
-      DATA NCPI/2/
-      IWPC = (IP-1)/NCPI + 1
-      RETURN
-      END
-c
-      logical function testopen()
-c
-c     Returns TRUE if the window is open, else it returns FALSE
-c
-      character*1 char, ans1
-      integer*4 irtn
-      logical first
-c
-      data first/.true./
-c
-      if (first) call setraw
-c     Set terminal in RAW mode if this is the first time you are testing window.
-c
-      write(0,*) char(27), '[11t'
-c     Write string out that terminal will respond to so that we can tell
-c	whether window is open or closed.
-c
-5	continue
-	call keystroke(irtn, ans1)
-c	Read in terminal's response to above string
-c	irtn = -1 for EOF, = 1 if keystroke successful, 0 if we have to wait 
-c	a bit more.
-c
-	if (irtn .lt. 0 .or. (irtn .gt. 0 .and. ans1 .eq. '2')) then
-	    testopen = .false.
-	else if (irtn .gt. 0 .and. ans1 .eq. '1') then
-	    testopen = .true.
-	else 
-	    goto 5
-	endif
-c	If string contains a 1 then window is open else if a 2 then closed;
-c
-      return
-      end
-        
diff -uNr 3.5/sys.unipops/.openwin-init unipops-3.6/sys.unipops/.openwin-init
--- 3.5/sys.unipops/.openwin-init	2000-03-16 11:31:39.000000000 -0700
+++ unipops-3.6/sys.unipops/.openwin-init	1969-12-31 17:00:00.000000000 -0700
@@ -1,33 +0,0 @@
-#!/bin/sh
-# .openwin-init - OpenWindows initialization script.
-# WARNING: This file is automatically generated.
-#          Any changes you make here will be lost!
-export DISPLAY
-IFS=.
-SETBASEDISPLAY() { BASEDISPLAY=$1; }
-SETBASEDISPLAY ${DISPLAY}
-IFS=
-SETDISPLAYSCREEN() {
-	DISPLAY=${BASEDISPLAY}.$1
-	if winsysck x11 ; then
-		:
-	else
-		echo No display available for screen $1
-		exit 1
-	fi
-	eval `svenv -env`
-}
-# Note: toolwait is a utility to control client startup.
-#       For more information, see the toolwait(1) man page.
-#
-# Start clients on screen 0
-#
-SETDISPLAYSCREEN 0
-#
-toolwait cmdtool -Wp 0 0 -Ws 627 161 -WP 3 833 +Wi -C 
-toolwait cmdtool -Wp 523 311 -Ws 593 461 -WP 988 825 +Wi 
-toolwait clock -Wp 120 120 -Ws 150 150 -WP 831 826 -Wi +Wn -alarmtime 0:0 
-toolwait cmdtool -Wp 549 0 -Ws 593 461 -WP 1081 5 -Wi 
-toolwait mailtool -Wp 2 185 -Ws 585 281 -WP 1068 818  -Wi  
-toolwait calctool -Wp 150 150 -Ws 454 296 -WP 746 829 -Wi -2 -c -l +Wn -a 2 
-toolwait helpviewer -Wp 3 192 -Ws 510 602 -WP 917 824  -Wi 'handbooks/desktop.intro.handbook.Z'
diff -uNr 3.5/sys.unipops/Makefile unipops-3.6/sys.unipops/Makefile
--- 3.5/sys.unipops/Makefile	2000-03-16 11:31:39.000000000 -0700
+++ unipops-3.6/sys.unipops/Makefile	2008-12-29 14:36:32.000000000 -0700
@@ -2,7 +2,7 @@
 #
 # Recreates Unipops sys.unipops directory
 #
-EXECLIST = unipops.sunview prepare.unipops .openwin-init
+EXECLIST = prepare.unipops
 
 OTHERS = .cshrc .login .defaults .rootmenu .sunview unipops.login \
 	  unipops.logout unipops.cshrc .logout .mailrc .dtprofile \
@@ -19,4 +19,3 @@
 all:	$(EXECLIST) $(OTHERS)
 
 clean:
-	-sccs clean
diff -uNr 3.5/sys.unipops/aro.prepare.unipops unipops-3.6/sys.unipops/aro.prepare.unipops
--- 3.5/sys.unipops/aro.prepare.unipops	1969-12-31 17:00:00.000000000 -0700
+++ unipops-3.6/sys.unipops/aro.prepare.unipops	2008-12-29 14:36:37.000000000 -0700
@@ -0,0 +1,8 @@
+# @(#)kp.nrao.edu.prepare.unipops	5.1 06/22/94
+#
+# 12m (Kitt Peak) version of prepare.unipops
+#
+set EDITORS = (emacs vi)
+set WINDOWS = (openlook)
+set popsproc2 = ~/unipops/
+#
diff -uNr 3.5/sys.unipops/prepare.unipops unipops-3.6/sys.unipops/prepare.unipops
--- 3.5/sys.unipops/prepare.unipops	2000-03-16 12:07:59.000000000 -0700
+++ unipops-3.6/sys.unipops/prepare.unipops	2008-12-29 14:36:32.000000000 -0700
@@ -58,7 +58,7 @@
   echo setenv popswindow $popswindow >> .unipops
   echo setenv popsversion $popsversion >> .unipops
   echo setenv popsdir '~unipops/$popsversion/' >> .unipops
-  echo set path = '($path ${popsdir}sunbin ${popsdir}utilities)' >> .unipops
+  echo set path = '($path ${popsdir}bin ${popsdir}utilities)' >> .unipops
   echo setenv popsproc1 '${popsdir}procedures/' >> .unipops
   if ( $?popsproc2 ) then
 	echo setenv popsproc2 $popsproc2 >> .unipops
@@ -73,7 +73,7 @@
   echo export popswindow=$popswindow >> .unipops_bash
   echo export popsversion=$popsversion >> .unipops_bash
   echo export popsdir='~unipops/$popsversion/' >> .unipops_bash
-  echo export PATH='$PATH:${popsdir}sunbin:${popsdir}utilities' >> .unipops_bash
+  echo export PATH='$PATH:${popsdir}bin:${popsdir}utilities' >> .unipops_bash
   echo export popsproc1='${popsdir}procedures/' >> .unipops_bash
   if ( $?popsproc2 ) then
 	echo export popsproc2=$popsproc2 >> .unipops_bash
@@ -86,5 +86,5 @@
   echo " "
 endif
 #
-if (-e $popsdir/sunbin/mkfiles.unipops) $popsdir/sunbin/mkfiles.unipops
+if (-e $popsdir/bin/mkfiles.unipops) $popsdir/bin/mkfiles.unipops
 #		and finally put the required empty files here.
diff -uNr 3.5/sys.unipops/unipops.sunview unipops-3.6/sys.unipops/unipops.sunview
--- 3.5/sys.unipops/unipops.sunview	2000-03-16 11:31:39.000000000 -0700
+++ unipops-3.6/sys.unipops/unipops.sunview	1969-12-31 17:00:00.000000000 -0700
@@ -1,9 +0,0 @@
-#  @(#)unipops.sunview.sh	5.1 06/22/94
-#  Standard UniPOPS .sunview file
-#
-cmdtool    -Wp    0   0 -Ws 669 449 -WP    0   0 -Wf 255 255 150 -C  &
-mailtool   -Wp    0 130 -Ws 684 770 -WP 1088 836 -Wi -Wf 150 150 225  &
-cmdtool    -Wp  479 444 -Ws 673 388 -WP  768 836 -Wf 255 150 255  &
-cmdtool    -Wp  463   2 -Ws 689 443 -WP 1088   0 -Wi -Wf 150 255 150  & 
-clock      -Wp  820 801 -Ws 210  47 -WP 1024 836 -Wi -r -Wf 255 150 150 &
-
diff -uNr 3.5/utilities/Makefile unipops-3.6/utilities/Makefile
--- 3.5/utilities/Makefile	2000-03-16 11:29:43.000000000 -0700
+++ unipops-3.6/utilities/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -1,348 +0,0 @@
-# @(#)Makefile	5.8 09/10/98
-#
-ARCH = `uname -m`
-CCMP = cc
-FCMP = f77
-CC = @cd $(@D); echo $@; $(CCMP)
-FC = @cd $(@D); $(FCMP)
-FDEBOROPT = -g
-CDEBOROPT = -g
-FLOATOPT = 
-FILLIB = /usr/lang/SC1.0/libm.il
-CILLIB = /usr/lib/libm.il
-FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(FILLIB)
-CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CILLIB)
-FFLAGS = -Nn1500 -i2 -DI2ON -u $(FFLOAT) -D$(ARCH)
-#	remove the -DI2ON if your remove the -i2 flag
-CFLAGS = $(CFLOAT) -I$(popsdir)includes/tuc/ -I$(popsdir)includes/  -D$(ARCH) 
-LFLAGS = $(FFLOAT)
-LLIBS  = -lm
-AR = /usr/5bin/ar
-# Macros which define compilation and linking parameters
-# Note redefinition of FC and CC.  
-# [FC]DEBOROPT (debug or optimize flag for fortran or c) = 'g' as a default 
-# for using the debugger (reset for optimization using command line 
-# substitution).
-#
-#---------------------------------------------------------------
-
-DIRECT = $(popsdir)utilities/
-POINT = $(DIRECT)point/
-VLBCL = $(DIRECT)vlbcl/
-VLBFO = $(DIRECT)vlbfo/
-CONV = $(DIRECT)conversion/
-DISK = $(DIRECT)diskfiles/
-CUBE = $(DIRECT)cube/
-FITS = $(DIRECT)fits/
-CONVLIB = $(CONV)library.a
-ANAL = $(popsdir)source/conline/gb/
-INCS = $(popsdir)includes/
-TUCINCS = $(popsdir)includes/tuc/
-MAC2 =
-# Macros which define directories containing source code 
-# popsdir = external shell script variable and gives the home directory
-#	of the source code directory
-#
-
-ANALOBJO = $(MAC2)access_2.o $(MAC2)heapsort.o \
-	   $(MAC2)modcomp.o $(MAC2)cvtmoddbl.o $(MAC2)cvtmodflt.o \
-	   $(MAC2)lconvert.o $(MAC2)unpadraz.o $(MAC2)gbrecio.o \
-	   $(MAC2)jdtodate.o $(MAC2)inrange.o
-ANALOBJR = $(ANAL)data_client.o 
-POINTOBJ = $(POINT)apch.o $(POINT)apfs.o $(POINT)baseline.o $(POINT)cnps.o \
-	   $(POINT)convolve.o $(POINT)cptgauss.o $(POINT)cptlsq.o \
-	   $(POINT)cptprep.o $(POINT)cptshape.o $(POINT)cptuinit.o \
-	   $(POINT)gel.o $(POINT)mfs.o $(POINT)mis.o $(POINT)point.o \
-	   $(POINT)rns.o $(POINT)uppercase.o $(POINT)lastblnk.o
-VLBCLOBJ = $(VLBCL)vlbcl.o $(VLBCL)vpt.o $(POINT)rns.o $(POINT)uppercase.o \
-	   $(POINT)lastblnk.o
-VLBFOOBJ = $(VLBFO)vlbfo.o $(VLBFO)opt.o $(POINT)rns.o $(POINT)uppercase.o \
-	   $(POINT)lastblnk.o
-CONVLIBOBJ = $(CONV)average.o $(CONV)checkdate.o $(CONV)dayofyear.o \
-	  $(CONV)cvtieeedbl.o $(CONV)cvtieeeflt.o \
-	  $(CONV)cvtieeemod.o $(CONV)lconvert.o $(CONV)cvtmoddbl.o \
-	  $(CONV)cvtmodflt.o $(CONV)cvtmodieee.o $(CONV)cvtpcieee.o \
-	  $(CONV)cvtsddieee.o $(CONV)jd.o $(CONV)jdtodate.o \
-	  $(CONV)rearrange.o $(CONV)unpadraz.o $(CONV)rwbuff.o \
-	  $(CONV)rwbuffer.o $(CONV)tuc2uni.o $(CONV)tucalign.o \
-	  $(CONV)tucconvert.o $(CONV)tucraz.o $(CONV)vax2sun.o \
-	  $(CONV)uppercase.o $(CONV)lastblnk.o $(CONV)getsprec.o \
-	  $(CONV)conversion2.o
-# Macros which list the object files in the various subdirectories 
-#
-#----------------------------------------------------------------
-
-POINTINC = $(POINT)baseline.o $(POINT)convolve.o $(POINT)cptgauss.o \
-	   $(POINT)cptlsq.o $(POINT)cptprep.o $(POINT)cptuinit.o \
-	   $(POINT)point.o
-CVTINC = $(CONV)average.o $(CONV)rearrange.o $(CONV)tele2ieee.o
-I140H = $(CONV)lconvert.o $(CONV)cvtsddieee.o
-SDDH = $(CONV)lconvert.o $(CONV)cvtpdflsdd.o $(CONV)cvtsddieee.o \
-	  $(CONV)unpadraz.o $(CONV)tuc2uni.o \
-	  $(CONV)tucalign.o $(CONV)tucconvert.o \
-	  $(CONV)tucraz.o $(DISK)makeindex.o
-SPHDR = $(CONV)lconvert.o
-PDFLH = $(CONV)cvtpdflsdd.o
-TUCONLINESDDH = $(CONV)cvtpdflsdd.o $(CONV)tuc2uni.o $(CONV)tucalign.o \
-	        $(CONV)tucconvert.o
-MODESH = $(DISK)modefn.o
-# Macros which list the 'Include' file dependencies
-#
-#---------------------------------------------------------------
-
-BINLIST = checkfile.exe makeempty.exe makeindex.exe point.rmt.exe  \
-	  vlbcl.rmt.exe vlbfo.rmt.exe ldump.rmt.exe cdump.rmt.exe ieee2ascii.exe \
-	  ascii2ieee.exe ieee2keep.exe keep2ieee.exe tele2ieee.exe pcieee.exe \
-	  ieee2sdd.exe sdd2ieee.exe cvtpdflsdd.exe ieeesummary.exe  \
-	  ieee2pcpops.exe  makerecindex.exe tele2recs.exe makeoldindex.exe \
-	  makeoldrecindex.exe
-OLLIST = point.exe vlbcl.exe vlbfo.exe ldump.exe cdump.exe 
-EXECS = cvt.disk-disk cvt.disk-tape cvt.tape-disk fits2uni uni2fits readfits \
-	vsst.sourcetemp vsst.systemp pointing cdump ldump cvt.tele-recs \
-	expandsdd mergesdd pdfl2sdd new2old bootstrap
-# Macro which lists executables 
-#
-#---------------------------------------------------------------
-# End of Macros
-#
-# Target and dependencies:
-#
-# General targets first
-#
-
-all:	EXECUTABLES $(CONVLIB) $(BINLIST)
-	(cd $(CUBE);\
-		 make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-			CCMP="$(CCMP)" FCMP="$(FCMP)" all; \
-		 cp -p $(CUBE)cube.exe $(DIRECT))
-	(cd $(FITS);\
-		 make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-			CCMP="$(CCMP)" FCMP="$(FCMP)" all; \
-		 cp -p $(FITS)u2f $(FITS)f2u $(DIRECT))
-
-gbonline: $(OLLIST)
-
-clean:
-	rm -f $(BINLIST)
-	rm -f conversion/*.o
-	rm -f conversion/*.a
-	rm -f diskfiles/*.o
-	rm -f point/*.o
-	rm -f vlbcl/*.o
-	(cd $(CUBE); make clean)
-	(cd $(FITS); make clean)
-	rm -f vlbfo/*.o
-	-sccs clean
-	rm -f *.trace
-	rm -f core
-	-(cd $(POINT); sccs clean; rm -f apch.f apfs.f cmps.f uppercase.f \
-		lastblnk.f)
-	-(cd $(VLBCL); sccs clean)
-	-(cd $(VLBFO); sccs clean)
-	-(cd $(CONV); sccs clean; rm -f raz.c tucraz.c jdtodate.f \
-		uppercase.f lastblnk.f)
-	-(cd $(DISK); sccs clean; rm -f modefn.c)
-
-# Executable targets next
-#
-
-checkfile.exe: $(DISK)checkfile.o $(DISK)modefn.o
-	$(FC) $(LFLAGS) -o checkfile.exe $(DISK)checkfile.o \
-		$(DISK)modefn.o $(LLIBS)
-
-makeempty.exe: $(DISK)makeempty.o
-	$(FC) $(LFLAGS) -o makeempty.exe $(DISK)makeempty.o  $(LLIBS)
-
-ieeesummary.exe: $(DISK)summary.o
-	$(CC) $(CFLAGS) -o ieeesummary.exe $(DISK)summary.o  $(LLIBS)
-
-makeindex.exe: $(DISK)makeindex.o $(DISK)modefn.o
-	$(CC) $(CFLAGS) -o makeindex.exe $(DISK)makeindex.o \
-		$(DISK)modefn.o $(LLIBS)
-
-makerecindex.exe: makeindex.exe
-	\rm -f makerecindex.exe
-	\ln -s makeindex.exe makerecindex.exe
-
-makeoldindex.exe: makeindex.exe
-	\rm -f makeoldindex.exe
-	\ln -s makeindex.exe makeoldindex.exe
-
-makeoldrecindex.exe: makeindex.exe
-	\rm -f makeoldrecindex.exe
-	\ln -s makeindex.exe makeoldrecindex.exe
-
-vlbfo.exe: $(VLBFOOBJ) $(ANALOBJO) 
-	$(FC) $(LFLAGS) -o vlbfo.exe $(VLBFOOBJ) $(ANALOBJO) $(LLIBS)
-
-vlbfo.rmt.exe: $(VLBFOOBJ) $(ANALOBJR) 
-	$(FC) $(LFLAGS) -o vlbfo.rmt.exe $(VLBFOOBJ) $(ANALOBJR) $(LLIBS)
-
-vlbcl.exe: $(VLBCLOBJ) $(ANALOBJO) 
-	$(FC) $(LFLAGS) -o vlbcl.exe $(VLBCLOBJ) $(ANALOBJO) $(LLIBS)
-
-vlbcl.rmt.exe: $(VLBCLOBJ) $(ANALOBJR) 
-	$(FC) $(LFLAGS) -o vlbcl.rmt.exe $(VLBCLOBJ) $(ANALOBJR) $(LLIBS)
-
-point.exe: $(POINTOBJ) $(ANALOBJO) 
-	$(FC) $(LFLAGS) -o point.exe $(POINTOBJ) $(ANALOBJO) $(LLIBS)
-
-point.rmt.exe: $(POINTOBJ) $(ANALOBJR) 
-	$(FC) $(LFLAGS) -o point.rmt.exe $(POINTOBJ) $(ANALOBJR) $(LLIBS)
-
-ldump.exe: $(CONV)ldump.o $(CONVLIB) $(ANALOBJO)
-	$(FC) $(LFLAGS) -o ldump.exe $(CONV)ldump.o $(CONVLIB) $(ANALOBJO) $(LLIBS)
-
-ldump.rmt.exe: $(CONV)ldump.o $(CONVLIB) $(ANALOBJR) 
-	$(FC) $(LFLAGS) -o ldump.rmt.exe $(CONV)ldump.o $(CONVLIB) $(ANALOBJR) $(LLIBS)
-
-cdump.exe: $(CONV)cdump.o $(CONVLIB) $(ANALOBJO) 
-	$(FC) $(LFLAGS) -o cdump.exe $(CONV)cdump.o $(CONVLIB) $(ANALOBJO) $(LLIBS)
-
-cdump.rmt.exe: $(CONV)cdump.o $(CONVLIB) $(ANALOBJR) 
-	$(FC) $(LFLAGS) -o cdump.rmt.exe $(CONV)cdump.o $(CONVLIB) $(ANALOBJR) $(LLIBS)
-
-ieee2ascii.exe: $(CONV)ieee2ascii.o $(CONVLIB)
-	$(CC) $(CFLAGS) -o ieee2ascii.exe $(CONV)ieee2ascii.o $(CONVLIB) $(LLIBS)
-
-ascii2ieee.exe: $(CONV)ascii2ieee.o $(CONVLIB)
-	$(FC) $(LFLAGS) -o ascii2ieee.exe $(CONV)ascii2ieee.o $(CONVLIB) $(LLIBS)
-
-ieee2keep.exe: $(CONV)ieee2keep.o $(CONVLIB)
-	$(FC) $(LFLAGS) -o ieee2keep.exe $(CONV)ieee2keep.o $(CONVLIB) $(LLIBS)
-
-keep2ieee.exe: $(CONV)keep2ieee.o $(CONVLIB)
-	$(FC) $(LFLAGS) -o keep2ieee.exe $(CONV)keep2ieee.o $(CONVLIB) $(LLIBS)
-
-tele2ieee.exe: $(CONV)tele2ieee.o $(CONVLIB)
-	@echo tele2ieee
-	$(FC) $(LFLAGS) -o tele2ieee.exe $(CONV)tele2ieee.o $(CONVLIB) $(LLIBS)
-
-tele2recs.exe: $(CONV)tele2recs.o $(CONVLIB)
-	@echo tele2recs
-	$(FC) $(LFLAGS) -o tele2recs.exe $(CONV)tele2recs.o $(CONVLIB) $(LLIBS)
-
-pcieee.exe: $(CONV)pcieee.o $(CONVLIB)
-	$(FC) $(LFLAGS) -o pcieee.exe $(CONV)pcieee.o $(CONVLIB) $(LLIBS)
-
-ieee2pcpops.exe: $(CONV)ieee2pcpops.o $(CONVLIB)
-	$(FC) $(LFLAGS) -o ieee2pcpops.exe $(CONV)ieee2pcpops.o $(CONVLIB) $(LLIBS)
-
-ieee2sdd.exe: $(CONV)ieee2sdd.o $(CONVLIB) $(ANALOBJR) $(CONV)params.inc
-	$(FC) $(LFLAGS) -o ieee2sdd.exe $(CONV)ieee2sdd.o $(CONVLIB) \
-		$(ANALOBJR) $(LLIBS)
-
-sdd2ieee.exe: $(CONV)sdd2ieee.o $(CONVLIB)
-	$(FC) $(LFLAGS) -o sdd2ieee.exe $(CONV)sdd2ieee.o $(CONVLIB) $(LLIBS)
-
-cvtpdflsdd.exe: $(CONV)cvtpdflsdd.o $(CONVLIB)
-	$(CC) $(CFLAGS) -o cvtpdflsdd.exe $(CONV)cvtpdflsdd.o $(CONVLIB) $(LLIBS)
-#
-# Start of Miscelaneous dependencies
-#
-
-EXECUTABLES: $(EXECS) keep.label head.mask U2f_trans
-
-$(CONVLIB): $(CONVLIBOBJ)
-	rm -f $(CONVLIB)
-	$(AR) r $(CONVLIB) $(CONVLIBOBJ)
-
-$(DISK)makeindex.o: $(DISK)makeindex.c
-	$(CC) -c -u $(CFLAGS) $(DISK)makeindex.c
-
-$(CONV)unpadraz.o: $(popsdir)source/conline/line/raz.c
-	rm -f $(CONV)unpadraz.c
-	\cp $(popsdir)source/conline/line/raz.c $(CONV)unpadraz.c
-	$(CC) -c $(CFLAGS) $(CONV)unpadraz.c
-
-$(CONV)tucraz.o: $(popsdir)source/conline/line/raz.c
-	rm -f $(CONV)tucraz.c
-	rm -f $(CONV)tucraz.o
-	\cp $(popsdir)source/conline/line/raz.c $(CONV)tucraz.c
-	$(CC) -c -DUSETUC $(CFLAGS) $(CONV)tucraz.c
-
-$(CONV)jdtodate.o: $(popsdir)source/conline/line/jdtodate.f
-	rm -f $(CONV)jdtodate.f
-	\cp $(popsdir)source/conline/line/jdtodate.f $(CONV)jdtodate.f
-	$(FC) -c $(FFLAGS) $(CONV)jdtodate.f
-
-$(CONV)uppercase.o: $(popsdir)source/conline/uppercase.f
-	rm -f $(CONV)uppercase.f
-	\cp $(popsdir)source/conline/uppercase.f $(CONV)uppercase.f
-	$(FC) -c $(FFLAGS) $(CONV)uppercase.f
-
-$(CONV)lastblnk.o: $(popsdir)source/lastblnk.f
-	rm -f $(CONV)lastblnk.f
-	\cp $(popsdir)source/lastblnk.f $(CONV)lastblnk.f
-	$(FC) -c $(FFLAGS) $(CONV)lastblnk.f
-
-$(CONV)conversion2.o: $(popsdir)source/conline/line/conversion2.f $(CONV)cform.inc $(CONV)params.inc
-	rm -f $(CONV)conversion2.f
-	\cp $(popsdir)source/conline/line/conversion2.f $(CONV)conversion2.f
-	$(FC) -c $(FFLAGS) $(CONV)conversion2.f
-
-$(POINT)apch.o: $(popsdir)source/conline/apch.f
-	rm -f $(POINT)apch.f
-	\cp $(popsdir)source/conline/apch.f $(POINT)apch.f
-	$(FC) -c $(FFLAGS) $(POINT)apch.f
-
-$(POINT)apfs.o: $(popsdir)source/conline/apfs.f
-	rm -f $(POINT)apfs.f
-	\cp $(popsdir)source/conline/apfs.f $(POINT)apfs.f
-	$(FC) -c $(FFLAGS) $(POINT)apfs.f
-
-$(POINT)cnps.o: $(popsdir)source/conline/cnps.f
-	rm -f $(POINT)cnps.f
-	\cp $(popsdir)source/conline/cnps.f $(POINT)cnps.f
-	$(FC) -c $(FFLAGS) $(POINT)cnps.f
-
-$(POINT)uppercase.o: $(popsdir)source/conline/uppercase.f
-	rm -f $(POINT)uppercase.f
-	\cp $(popsdir)source/conline/uppercase.f $(POINT)uppercase.f
-	$(FC) -c $(FFLAGS) $(POINT)uppercase.f
-
-$(POINT)lastblnk.o: $(popsdir)source/lastblnk.f
-	rm -f $(POINT)lastblnk.f
-	\cp $(popsdir)source/lastblnk.f $(POINT)lastblnk.f
-	$(FC) -c $(FFLAGS) $(POINT)lastblnk.f
-
-$(DISK)modefn.o: $(popsdir)source/conline/modefn.c
-	rm -f $(DISK)modefn.c
-	\cp $(popsdir)source/conline/modefn.c $(DISK)modefn.c
-	$(CC) -c $(CFLAGS) $(DISK)modefn.c
-#
-# Start of include file targets
-#
-
-$(POINTINC): $(POINT)concfmt.inc $(POINT)condappl.inc $(POINT)coneappl.inc
-
-$(CVTINC): $(CONV)cvttele.inc
-
-$(I140H): $(INCS)140.h
-
-$(SDDH): $(INCS)sdd.h
-
-$(SPHDR): $(INCS)sp_hdr.h
-
-$(PDFLH): $(TUCINCS)pdfl.h
-
-$(TUCONLINESDDH): $(TUCINCS)tuc_online_sdd.h
-
-$(CONV)cform.inc: $(INCS)cform.inc
-	rm -f $(CONV)cform.inc
-	\cp $(INCS)cform.inc $(CONV)cform.inc
-
-$(CONV)params.inc: $(INCS)params.inc
-	rm -f $(CONV)params.inc
-	\cp $(INCS)params.inc $(CONV)params.inc
-
-$(MODESH): $(INCS)modes.h
-
-$(ANALOBJO):
-	(cd $(MAC2); make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-		CCMP="$(CCMP)" FCMP="$(FCMP)" gbonline)
-
-$(ANALOBJR):
-	(cd $(ANAL); make FFLOAT="$(FFLOAT)" CFLOAT="$(CFLOAT)" LLIBS="$(LLIBS)" \
-		CCMP="$(CCMP)" FCMP="$(FCMP)" all)
-
diff -uNr 3.5/utilities/U2f_trans unipops-3.6/utilities/U2f_trans
--- 3.5/utilities/U2f_trans	2000-03-16 11:29:47.000000000 -0700
+++ unipops-3.6/utilities/U2f_trans	1969-12-31 17:00:00.000000000 -0700
@@ -1,313 +0,0 @@
-/*  @(#)U2f_trans	5.3 09/10/98	*/
-/************************************************************************/
-/* Translation:  Line UNIPOPS to FITS, First version: Jan 16,1991       */
-/*    revisions:  version 1.1 (Aug 30, 1991) adjust format of headers.  */
-/*                  so that "=" always in col.9, etc.                   */
-/*    ver 1.2 (Sep.12, 1991) move DELTAVEL to UNIPOPS general area.     */
-/*    ver 1.3 (Jan.23, 1992) add DURTIME and change CFFORM size to 24.  */
-/*    ver 1.4 (Jan.24, 1993) added several new header words,esp ucl 11  */
-/*    ver 1.5 (Sept.,  1993) continuum                                  */
-/************************************************************************/
-/* TTYPE   - column name in binary table = value of FITS TTYPE keyword. */
-/* TFORM   - format descriptor.  Same meaning as for FITS tables.       */
-/*           E=32bit float; D=64bit float; I=16bit integer.             */
-/*           A=8bit ASCII                                               */
-/*           note that multiplicity is a separate number.               */
-/* TUNIT   - name of unit in FITS table. (use "-" for pure number)      */
-/* K       - for kategory - c=core, s=shared, l=local, g=GB, k=KP       */
-/*           a=axis, v=velocity defn, p=position define,                */
-/*           t=prototype class 11 (implies KP)                          */
-/* OPN     - option: 0=always use; 1=freq axis; 2=veloc axis,           */
-/*                                 3=Sample axis;                       */
-/* AXIS    - axis number if matrix axis.  = axnumber*10 + index, where  */
-/*           index=1 for MAXIS# (# pixels on axis),                     */
-/*            =2 for type(name of axis), =3 for CRDELT, =4 for CRPIX,   */
-/*            =5 for CRVAL, =6 for CROTA                                */
-/* UCL     - class number in UNIPOPS header                             */
-/* UOFF    - byte offset wrt start of UNIPOPS class.                    */
-/*           value of -1 if param is not found in UNIPOPS record.       */
-/* INTYPE  - format in Keep record (same meanings as for TFORM)         */
-/* FACTOR  - multiply value from UNIPOPS record to get value in FITS.   */
-/*           If "-", do not apply any scaling.                          */
-/* SPECIAL - code number for special handling of this table column.     */
-/*           Code is -1  if this is a header-only parameter, ie,        */
-/*           its value is not stored in the table.  (= -2 for comment)  */
-/* descrip - description goes in comments part of FITS header           */
-/************************************************************************/
-/*                                                                    012345678901234567890123456789012345678901234567890*/
-/* TTYPE     TFORM   TUNIT    K OPN AXIS UCL UOFF INTYPE  FACTOR  SPECIAL / description   5555555555666666666677777777778*/ 
-   CTYPE1      8 A   'FREQ'   a  1   12  -1   -1   8 A      -      -1     / Frequency Axis.
-   MAXIS1      1 I      -     a  1   11  12  112   1 D      -       0     / Number of data points in series.
-   CRVAL1      1 D     HZ     a  1   15  12    0   1 D    MHZTHZ    0     / Frequency at reference Pixel.
-   CRPIX1      1 E      -     a  1   14  12   80   1 D      -       0     / Frequency Reference Pixel. 
-   CDELT1      1 E     HZ     a  1   13  12   16   1 D    MHZTHZ    0     / Frequency increment.
-/*
-   CTYPE1      8 A      -     a  2   12   7   40   8 A      -       1     / Velocity Axis Name.
-   MAXIS1      1 I      -     a  2   11  12  112   1 D      -       0     / Number of data points in series.
-   CRVAL1      1 D    M/SEC   a  2   15  12   88   1 D     KTM      0     / Velocity at reference Pixel.
-   CRPIX1      1 E      -     a  2   14  12   80   1 D      -       0     / Velocity Reference Pixel. 
-   CDELT1      1 E    M/SEC   a  2   13  12   96   1 D     KTM      0     / Velocity increment.
-/*
-   CTYPE1      8 A   'SAMPLE' a  3   12  -1   -1   8 A      -      -1     / Sample Axis.
-   MAXIS1      1 I      -     a  3   11  12  112   1 D      -       0     / Number of data points in series.
-   CRVAL1      1 I      1     a  3   15  -1   -1   1 D      -      -1     / Sample Number at Reference Pixel.
-   CRPIX1      1 I      1     a  3   14  -1   -1   1 D      -      -1     / Sample Reference Pixel.
-   CDELT1      1 I      1     a  3   13  -1   -1   1 D      -      -1     / Sample increment.
-/*
-   MAXIS2      1 I      1     a  0   21   6   48   1 D      -      -1     / Number points on longitude-like axis.
-   CTYPE2      8 A      -     a  0   22   4  128   8 A      -       2     / Name of longitude-like axis.
-   CRVAL2      1 D   DEGREES  a  0   25   4    8   1 D      -       2     / Value at longitude reference pixel.
-   CRPIX2      1 E      -     a  0   24  -1   -1   1 D      -       2     / Longitude reference pixel.
-   CDELT2      1 E   DEGREES  a  0   23   6   24   1 D      -       2     / Longitude increment.
-/*   
-   MAXIS3      1 I      1     a  0   31   6   56   1 D      -      -1     / Number points on latitude-like axis.
-   CTYPE3      8 A      -     a  0   32   4  128   8 A      -       3     / Name of latitude-like axis.
-   CRVAL3      1 D   DEGREES  a  0   35   4   16   1 D      -       3     / Value at latitude reference pixel.
-   CRPIX3      1 E      -     a  0   34  -1   -1   1 D      -       3     / Latitude reference pixel.
-   CDELT3      1 E   DEGREES  a  0   33   6   32   1 D      -       3     / Latitude increment.
-   CROTA3      1 E   DEGREES  a  0   36   4  120   1 D      -       3     / Rotation of Axes.
-/*
-   MAXIS4      1 I      1     a  0   41  -1   -1   1 D      -      -1     / Number points on time axis.
-   CTYPE4      8 A   'TIME'   a  0   42  -1   -1   8 A      -      -1     / 
-   CRPIX4      1 E    1.0     a  0   44  -1   -1   1 D      -      -1     / Reference pixel on time axis.
-   CRVAL4      1 E   SECONDS  a  0   45   3    8   1 D     HTS      0     / UT time in seconds.
-/*
-   MAXIS5      1 I      1     a  0   51  -1   -1   1 D      -      -1     / Number points on RECEIVER axis.
-   CTYPE5      8 A 'RECEIVER' a  0   52  -1   -1   8 A      -      -1     / 
-   CRPIX5      1 E    1.0     a  0   54  -1   -1   1 D      -      -1     / Reference pixel on RECEIVER axis.
-   CRVAL5      1 E      -     a  0   55   1   16   1 D     x100     4     / RECEIVER or BEAM number.  
-/*
-   COMMENT     0 A      -     -  0    0   0    0   0 A      -      -2     / The following defines the velocity system.
-   VELDEF      8 A      -     s  0    0   7   40   8 A      -       5     / Velocity Definition and reference.  
-   VELOCITY    1 D    M/SEC   c  0    0   7   32   1 D     KTM      0     / Velocity at reference pixel. 
-   VCORR       1 E    M/SEC   s  0    0   7   24   1 D     KTM      0     / Velocity Correction, Vref-Vtel.
-   DELTAVEL    1 E    M/SEC   l  0    0  12   96   1 D     KTM      0     / Channel spacing in Velocity.
-   RESTFREQ    1 D      HZ    l  0    0  12    8   1 D    MHZTHZ    8     / Rest Frequency at ref. pixel.
-   OBSFREQ     1 D      HZ    s  0    0  12    0   1 D    MHZTHZ    0     / Sky Frequency at ref. pixel.
-/*
-   COMMENT     0 A      -     -  0    0   0    0   0 A      -      -2     / The following defines the celestial coordinate frame.
-   RADECSYS    8 A      -     c  0    0   4  128   8 A      -       6     / Position Reference Frame code.
-   EQUINOX     1 E    YEAR    c  0    0   4    0   1 D      -       2     / Equinox of position ref. frame.
-/*          (remaining CORE keywords)
-   COMMENT     0 A      -     -  0    0   0    0   0 A      -      -2     / Remaining Single-dish CORE keywords follow.
-   SCAN        1 D      -     s  0    0   1   16   1 D      -       0     / Scan number (frac.part may be rcvr no.)
-   LST         1 E   SECONDS  s  0    0   3   16   1 D     HTS      0     / Local sidereal time.
-   DATE-OBS   10 A      -     c  0    0   3    0   1 D      -       7     / Date of observation
-   OBJECT     16 A      -     s  0    0   1   64  16 A      -       0     / Observed object name.
-   TELESCOP    8 A      -     c  0    0   1   48   8 A      -       0     / Telescope designation.
-   OBSERVER   16 A      -     s  0    0   1   32  16 A      -       0     / Observer's name
-   OBSMODE     8 A      -     s  0    0   1   80   8 A      -       0     / Observing mode.
-   EXPOSURE    1 E   SECONDS  c  0    0  12  168   1 D      -       0     / Effective on-source integration time.
-   TSYS        1 E    KELVIN  c  0    0  12   48   1 D      -       0     / System Temperature on source.
-   DATAMAX     1 E       -    c  0    0  -1   -1   1 E      -      17     / Max value in series.
-   DATAMIN     1 E       -    c  0    0  -1   -1   1 E      -      18     / Min value in series.
-/*          (remaining SHARED keywords)
-   COMMENT     0 A      -     -  0    0   0    0   0 A      -      -2     / The following are single-dish SHARED keywords.
-   OBSID       8 A      -     s  0    0   1   24   8 A      -       0     / Observer's ID code.
-   PROJECT     8 A      -     s  0    0   1   56   8 A      -       0     / Project ID code
-   FRONTEND    8 A      -     s  0    0   1   88   8 A      -       0     / Front-end receiver description.
-   BACKEND     8 A      -     s  0    0   1   96   8 A      -       0     / Backend description.
-   TCAL        1 E    KELVIN  s  0    0  12   40   1 D      -       0     / Calibration Temperature.  
-   TRX         1 E    KELVIN  k  0    0  12   32   1 D      -       0     / Receiver Temperature.
-   FREQRES     1 E      HZ    l  0    0  12   16   1 D    MHZTHZ   10     / Frequency resolution of a channel.
-   BANDWIDT    1 E      HZ    s  0    0  12   24   1 D    MHZTHZ    0     / Total Receiver Bandwidth.
-   TOUTSIDE    1 E    KELVIN  s  0    0   5    0   1 D     CTK      0     / Ambient Temperature at the 140-ft.  
-   PRESSURE    1 E    PASCAL  s  0    0   5    8   1 D    cmHgTP    0     / Atmospheric Pressure in Pascals.  
-   HUMIDITY    1 E      -     s  0    0   5   16   1 D     %Tf      0     / Relative Humidity (fraction).
-   DEWPOINT    1 E    KELVIN  s  0    0   5   32   1 D     CTK      0     / DewPoint (Kelvin).  
-   APEREFF     1 E      -     s  0    0   8    0   1 D      -       0     / Aperture Efficiency.
-   BEAMEFF     1 E      -     s  0    0   8    8   1 D      -       0     / Main Beam Efficiency.
-   ANTGAIN     1 E    K/JY    s  0    0   8   16   1 D      -       0     / Antenna Gain, Kelvins per Jy.
-   ETAL        1 E      -     s  0    0   8   24   1 D      -       0     / Rear spillover and scattering eff.
-   ETAFSS      1 E      -     s  0    0   8   32   1 D      -       0     / Forward spillover and scattering eff.
-   BEAMWIDT    1 E   DEGREES  s  0    0   7    0   1 D     STD      0     / Beam full width at half-max.
-   AZIMUTH     1 D   DEGREES  s  0    0   4   72   1 D      -       0     / Commanded azimuth.
-   ELEVATIO    1 D   DEGREES  s  0    0   4   80   1 D      -       0     / Commanded elevation angle.
-/*           (UNIPOPS- and site-specific- keywords)
-   COMMENT     0 A      -     -  0    0   0    0   0 A      -      -2     / NRAO UNIPOPS GENERAL keywords follow.
-   SAVENUM     1 I      -     l  0    0   1  112   1 D      -       0     / Scan index number (used by UNIPOPS).
-   NORECORD    1 I      -     l  0    0   1  120   1 D      -       0     / Number of indiv. rec. for this scan.
-   RECORDID    1 I      -     l  0    0   1  128   1 D      -       0     / Record ID of this data
-   UXPNT       1 E   DEGREES  l  0    0   2   16   1 D     STD      0     / User x pointing correction.
-   UYPNT       1 E   DEGREES  l  0    0   2   24   1 D     STD      0     / User Y pointing correction.
-   PTCON1      1 E   DEGREES  l  0    0   2   32   1 D     MTD      0     / Pointing constant 1.
-   PTCON2      1 E   DEGREES  l  0    0   2   40   1 D     MTD      0     / Pointing constant 2.
-   PTCON3      1 E   DEGREES  l  0    0   2   48   1 D     MTD      0     / Pointing constant 3.
-   PTCON4      1 E   DEGREES  l  0    0   2   56   1 D     MTD      0     / Pointing constant 4.
-   ORIENT      1 E   DEGREES  l  0    0   2   64   1 D      -       0     / Box orientation, east of north.
-   FOCUSR      1 E    METERS  l  0    0   2   72   1 D     mmTM     0     / Radial box focus
-   FOCUSV      1 E    METERS  k  0    0   2   80   1 D     mmTM     0     / N-S box focus.
-   FOCUSH      1 E    METERS  k  0    0   2   88   1 D     mmTM     0     / E-W box focus.
-   NCHAN       1 E      -     l  0    0   3   24   1 D      -       0     / Number of channels for this frontend.
-   NSWVAR      1 I      -     l  0    0   3   32   1 D      -       0     / Number of switching variables.
-   NPHASE      1 I      -     l  0    0   3   40   1 D      -       0     / Number of phases per cycle.
-   CYCLELEN    1 E   SECONDS  l  0    0   3   48   1 D      -       0     / Cycle Length
-   TSAMPLE     1 E   SECONDS  l  0    0   3   56   1 D      -       0     / Record or Sample Integration Time.
-   PHASEID     1 I      -     l  0    0   3   72   1 D      -       0     / Phase ID for this data.
-   INTTIME     1 E   SECONDS  l  0    0  12  104   1 D      -       0     / Duration time of scan.
-   XSOURCE     1 D   DEGREES  l  0    0   4    8   1 D      -       9     / Commanded X position.
-   YSOURCE     1 D   DEGREES  l  0    0   4   16   1 D      -       9     / Commanded Y position.
-   XREF        1 D   DEGREES  k  0    0   4   24   1 D      -       9     / Commanded reference X. 
-   YREF        1 D   DEGREES  k  0    0   4   32   1 D      -       9     / Commanded reference Y. 
-   EPOCRA      1 D   DEGREES  l  0    0   4   40   1 D      -       9     / RA at epoch of EQUINOX.
-   EPOCDEC     1 D   DEGREES  l  0    0   4   48   1 D      -       9     / DEC at epoch of EQUINOX.
-   GLON-ARC    1 D   DEGREES  l  0    0   4   56   1 D      -       9     / Galactic longitude
-   GLAT-ARC    1 D   DEGREES  l  0    0   4   64   1 D      -       9     / Galactic latitude
-   XINDIC      1 D   DEGREES  l  0    0   4   88   1 D      -       9     / Indicated RA
-   YINDIC      1 D   DEGREES  l  0    0   4   96   1 D      -       9     / Indicated Declination.
-   USERORG1    1 D   DEGREES  l  0    0   4  104   1 D      -       9     / User Origin - R.A (1950).
-   USERORG2    1 D   DEGREES  l  0    0   4  112   1 D      -       9     / User Origin - DEC (1950).
-   USERPA      1 D   DEGREES  l  0    0   4  120   1 D      -       9     / User Origin - Coord. sys. Pos.Ang.
-   COORDCD     8 A       -    l  0    0   4  128   8 A      -       9     / Coordinate Type Code.
-   OFFSCAN     1 E       -    l  0    0   7    8   1 D      -       0     / Off scan number  
-   RTSYS       1 E    KELVIN  l  0    0  12   56   1 D      -       0     / Reference System Temp.
-   TSOURCE     1 E    KELVIN  l  0    0  12   64   1 D      -       0     / Antenna temp of Source
-   TRMS        1 E    KELVIN  l  0    0  12   72   1 D      -       0     / RMS of mean source temperature. 
-   SPN         1 E      -     l  0    0  12  120   1 D      -       0     / Starting point number.
-   TAUH2O      1 E      -     l  0    0  12  128   1 D      -       0     / Model H2O Opacity.
-   NSTACK      1 E      -     l  0    0  13    0   1 D      -       0     / Number of scans stacked.
-   FSCAN       1 E      -     l  0    0  13    8   1 D      -       0     / First scan number in stack.
-   LSCAN       1 E      -     l  0    0  13   16   1 D      -       0     / Last scan number in stack.
-/*
-   COMMENT     0 A      -     k  0    0   0    0   0 A      -      -2     / The following are NRAO Kitt-Peak-specific.
-   XPOINT      1 E   DEGREES  k  0    0   2    0   1 D     STD      0     / X-coordinate pointing correction.
-   YPOINT      1 E   DEGREES  k  0    0   2    8   1 D     STD      0     / Y-coordinate pointing correction.
-   PTMODEL     8 A      -     k  0    0   2   96   8 A      -       0     / Pointing model
-   CL11TYPE    8 A      -     k  0    0   3   64   8 A      -       0     / Class 11 type
-   REFRAC      1 E      -     k  0    0   5   24   1 D      -       0     / Index of refraction.
-   MH2O        1 E   METERS   k  0    0   5   40   1 D    mmTM      0     / Atmospheric H2O vapor column height.
-   SCANANG     1 E   DEGREES  k  0    0   6    0   1 D      -       0     / Scan angle wrt FRAME code.
-   XZERO       1 E   DEGREES  k  0    0   6    8   1 D      -       0     / X at map ref. zero.
-   YZERO       1 E   DEGREES  k  0    0   6   16   1 D      -       0     / Y at map ref. zero.
-   DELTAX      1 E   DEGREES  k  0    0   6   24   1 D     STD      0     / X size of cell mapping grid.  
-   DELTAY      1 E   DEGREES  k  0    0   6   32   1 D     STD      0     / Y size of cell mapping grid.  
-   NGPTS       1 I       -    k  0    0   6   40   1 D      -       0     / Total number of grid cells in map.
-   NXPTS       1 I       -    k  0    0   6   48   1 D      -       0     / Number of X grid points.
-   NYPTS       1 I       -    k  0    0   6   56   1 D      -       0     / Number of Y grid points.
-   XCELL0      1 E       -    k  0    0   6   64   1 D      -       0     / Starting X grid cell.
-   YCELL0      1 E       -    k  0    0   6   72   1 D      -       0     / Starting Y grid cell.
-   FRAMECOD    8 A       -    k  0    0   6   80   8 A      -       0     / Frame code: {POLR|CART}{STEP|SCAN}
-   BADCHV      1 E       -    k  0    0   7   16   1 D      -       0     / Tant assigned to defective scans.
-   TYPECAL     8 A       -    k  0    0   7   48   8 A      -       0     / Type of calibration.
-   SYNFREQ     1 D     HZ     k  0    0   9    0   1 D    MHZTHZ    0     / Synthesizer frequency.
-   LOFACT      1 E      -     k  0    0   9    8   1 D      -       0     / LO factor.
-   HARMONIC    1 E      -     k  0    0   9   16   1 D      -       0     / Which harmonic used for LO.
-   LOIF        1 E     HZ     k  0    0   9   24   1 D    MHZTHZ    0     / Value of LO IF.
-   FIRSTIF     1 E     HZ     k  0    0   9   32   1 D    MHZTHZ    0     / Value of First IF.
-   RAZOFF      1 E   DEGREES  k  0    0   9   40   1 D     STD      0     / Reference Azimuth offset.
-   RELOFF      1 E   DEGREES  k  0    0   9   48   1 D     STD      0     / Reference Elevation offset.
-   BMTHROW     1 E   DEGREES  k  0    0   9   56   1 D     STD      0     / Beam Throw.
-   BMORENT     1 E   DEGREES  k  0    0   9   64   1 D     STD      0     / Beam Orientation.
-   OBSTOL      1 E   DEGREES  k  0    0   9   80   1 D     STD      0     / Pointing Tolerance.
-   SIDEBAND    1 I      -     k  0    0   9   88   1 D      -       0     / Sideband, 2=USB, 3=LSB.
-   WL          1 E   METERS   k  0    0   9   96   1 D    mmTM      0     / Focus parameter.
-   GAINS       1 E      -     k  0    0   9  104   1 D      -       0     / Scan number of calibration scan.
-   PBEAM1      1 E   DEGREES  k  0    0   9  112   1 D     STD      0     / Offset of plus beam.
-   PBEAM2      1 E   DEGREES  k  0    0   9  120   1 D     STD      0     / Offset of plus beam.
-   MBEAM1      1 E   DEGREES  k  0    0   9  128   1 D     STD      0     / Offset of minus beam.
-   MBEAM2      1 E   DEGREES  k  0    0   9  136   1 D     STD      0     / Offset of minus beam.
-   SROFF1      1 E   DEGREES  k  0    0   9  144   1 D     STD      0     / RA/DEC offsets.
-   SROFF2      1 E   DEGREES  k  0    0   9  152   1 D     STD      0     / RA/DEC offsets.
-   SROFF3      1 E   DEGREES  k  0    0   9  160   1 D     STD      0     / RA/DEC offsets.
-   SROFF4      1 E   DEGREES  k  0    0   9  168   1 D     STD      0     / RA/DEC offsets.
-   FOFFSIG     1 D     HZ     k  0    0   9  176   1 D    MHZTHZ    0     / Frequency offset, signal
-   FOFFREF1    1 D     HZ     k  0    0   9  184   1 D    MHZTHZ    0     / Frequency offset, reference 1
-   FOFFREF2    1 D     HZ     k  0    0   9  192   1 D    MHZTHZ    0     / Frequency offset, reference 2
-   REDUCCOM   80 A      -     k  0    0  10    0  80 A      -       0     / Observer's comments on data reduction.
-   VARVALUE    1 D      -     k  0    0  11    0   1 D      -       0     / Value of a single switch state.
-   VARDESCR    8 A      -     k  0    0  11    8   8 A      -       0     / Descriptor of the switching variable.
-   PHASETAB    8 A      -     k  0    0  11   16   8 A      -       0     / Phase Table.
-   NSWVARF     1 I      -     t  0    0  11    0   1 D      -       0     / Number of fast switching variables
-   NSWCYC      1 I      -     t  0    0  11    8   1 D      -       0     / Number of slow switching cycles
-   NSWCYCF     1 I      -     t  0    0  11   16   1 D      -       0     / Number of fast switching cycles
-   NPHASEF     1 I      -     t  0    0  11   24   1 D      -       0     / Number of phases per fast cycle
-   CYCLENF     1 E   SECONDS  t  0    0  11   32   1 D      -       0     / Length of fast cycle
-   SAMPTIMF    1 E   SECONDS  t  0    0  11   40   1 D      -       0     / Length of fast phase
-   VARVAL01    1 D      -     t  0    0  11   48   1 D      -       0     / Variable value
-   VARDES01    8 A      -     t  0    0  11   56   8 A      -       0     / Variable descriptor
-   PHASTB01   32 A      -     t  0    0  11   64  32 A      -       0     / Phase Table
-   VARVAL02    1 D      -     t  0    0  11   96   1 D      -       0     / Variable value
-   VARDES02    8 A      -     t  0    0  11  104   8 A      -       0     / Variable descriptor
-   PHASTB02   32 A      -     t  0    0  11  112  32 A      -       0     / Phase Table
-   VARVAL03    1 D      -     t  0    0  11  144   1 D      -       0     / Variable value
-   VARDES03    8 A      -     t  0    0  11  152   8 A      -       0     / Variable descriptor
-   PHASTB03   32 A      -     t  0    0  11  160  32 A      -       0     / Phase Table
-   VARVAL04    1 D      -     t  0    0  11  192   1 D      -       0     / Variable value
-   VARDES04    8 A      -     t  0    0  11  200   8 A      -       0     / Variable descriptor
-   PHASTB04   32 A      -     t  0    0  11  208  32 A      -       0     / Phase Table
-   VARVAL05    1 D      -     t  0    0  11  240   1 D      -       0     / Variable value
-   VARDES05    8 A      -     t  0    0  11  248   8 A      -       0     / Variable descriptor
-   PHASTB05   32 A      -     t  0    0  11  256  32 A      -       0     / Phase Table
-   DSF         1 E      -     k  0    0  12    8   1 D      -      11     / Data Scale Factor - 12m continuum only.
-   NT          1 I      -     k  0    0  12   16   1 D      -      12     / Noise Tube flag - 12m continuum only.
-   TH20        1 E    KELVIN  k  0    0  12  136   1 D      -       0     / Model H2O temperature.
-   TAUO2       1 E      -     k  0    0  12  144   1 D      -       0     / Model O2 opacity.
-   TO2         1 E    KELVIN  k  0    0  12  152   1 D      -       0     / Model O2 temperature.
-   POLARCOD    8 A      -     k  0    0  12  160   8 A      -       0     / Rcvr polarization code: {RC|LC|LIN}{ang}
-   RXINFO     16 A      -     k  0    0  12  176  16 A      -       0     / Receiver info.
-   LAMP        1 E      -     k  0    0  13   24   1 D      -       0     / Reduced line amplitude.
-   LWID        1 E      -     k  0    0  13   32   1 D      -       0     / Reduced line width.
-   ILI         1 E      -     k  0    0  13   40   1 D      -       0     / Integrated line intensity.
-   DRMS        1 E      -     k  0    0  13   48   1 D      -       0     / RMS noise level in reduced scan.
-/*
-   COMMENT     0 A       -    g  0    0   0    0   0 A      -      -2     / The following are NRAO-Green-Bank-specific keywords.
-   DELTAXR     1 E   DEG/SEC  g  0    0   6   24   1 D     STD      0     / X-rate of position scanning.  
-   DELTAYR     1 E   DEG/SEC  g  0    0   6   32   1 D     STD      0     / Y-rate of position scanning.  
-   L1          1 D      HZ    g  0    0   9    0   1 D    MHZTHZ    0     / LO ref frequency.
-   L1F1        1 D      HZ    g  0    0   9    8   1 D    MHZTHZ    0     / LO ref frequency.
-   L1F2        1 D      HZ    g  0    0   9   16   1 D    MHZTHZ    0     / LO ref frequency.
-   L2          1 D      HZ    g  0    0   9   24   1 D    MHZTHZ    0     / LO ref frequency.
-   L2F1        1 D      HZ    g  0    0   9   32   1 D    MHZTHZ    0     / LO ref frequency.
-   L2F2        1 D      HZ    g  0    0   9   40   1 D    MHZTHZ    0     / LO ref frequency.
-   LA          1 E      HZ    g  0    0   9   48   1 D    MHZTHZ    0     / LO settings.
-   LB          1 E      HZ    g  0    0   9   56   1 D    MHZTHZ    0     / LO settings.
-   LC          1 E      HZ    g  0    0   9   64   1 D    MHZTHZ    0     / LO settings.
-   LD          1 E      HZ    g  0    0   9   72   1 D    MHZTHZ    0     / LO settings.
-   LEVCORR     1 E    VOLTS   g  0    0   9   80   1 D      -       0     / Level Correction.
-   PTFUDGE1    1 E   DEGREES  g  0    0   9   88   1 D     MTD      0     / User's RA Pointing "fudge".
-   PTFUDGE2    1 E   DEGREES  g  0    0   9   96   1 D     MTD      0     / User's DEC Pointing "fudge".
-   RHO         1 E   DEGREES  g  0    0   9  104   1 D      -       0     / Feed offset rotation.
-   THETA       1 E   DEGREES  g  0    0   9  112   1 D      -       0     / Feed offset, lateral.
-   CFFORM     24 A      -     g  0    0   9  120  24 A      -       0     / Center Frequency Formula.
-   COMMENT     0 A      -     -  0    0   0    0   0 A      -      -2     / Here is the data matrix.
-   SERIES  16384 E      -     c  0    0  -1   -1   1 E      -      20     / Observed Data Series
-END
-/*                                                                   012345678901234567890123456789012345678901234567890*/
-/* Format for Main File FITS header */
-/* 45678901234567890123456789012345678901234567890123456789012345678901234567890 */
-SIMPLE  =                    T      / File conforms to FITS standards.
-BITPIX  =                    8      /                                          
-NAXIS   =                    0      / No image data array present.        
-EXTEND  =                    T      / Standard table extensions follow.    
-BLOCKED =                    T      / Tape block may be 1-10 times 2880 bytes.
-ORIGIN  = '%18s              '      / Written by the UNIPOPS u2f utility
-DATE    = '%18s              '      / Date this file was written.       
-COMMENT    Single dish data from NRAO-UNIPOPS. 
-END                
-
-/* Format for the single dish TABLE HEADER */    
-/* 45678901234567890123456789012345678901234567890123456789012345678901234567890 */
-XTENSION= 'BINTABLE'                / FITS binary table.                   
-BITPIX  =                    8      / Binary data.                             
-NAXIS   =                    2      / Table is a Matrix.                      
-NAXIS1  =                %5d        / Width of table in bytes.                
-NAXIS2  =                %5d        / Number of entries (rows) in Table.      
-PCOUNT  =                    0      / No Random Parameters.                  
-GCOUNT  =                    1      / Only one group.                             
-TFIELDS =                %5d        / Number of fields in each row.           
-EXTNAME = 'UNIPOPS SNGLE DISH'      / Table format type.     
-EXTVER  =                    3      / Version number of Table. (14Feb92)  
-NMATRIX =                    1      / No.matrixes following SD convention.     
-           / The following global keywords apply, at least, to the first scan.
-TELESCOP= '%18s              '      / Designation of Telescope.
-OBJECT  = '%18s              '      / Name of observed object.
-OBSERVER= '%18s              '      / Name of observer.
-DATE-OBS= '%18s              '      / UT date of observation.
-DATAMAX =         %12.4e            / Max spectral value (K) - %17s
-DATAMIN =         %12.4e            / Min spectral value (K) - %17s
-           / The following defines the data matrix.
-MAXIS   =                 %4d       / No. axes in data matrix.
-END       
-/* the remaining table column info is filled in here from the above 
-/* translation table.
-
diff -uNr 3.5/utilities/bootstrap unipops-3.6/utilities/bootstrap
--- 3.5/utilities/bootstrap	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/bootstrap	1969-12-31 17:00:00.000000000 -0700
@@ -1,63 +0,0 @@
-#!/bin/csh -f
-#
-# @(#)bootstrap.sh	1.2 07/17/97
-#
-# A number of utilities need access to bootstrap information (in SDD for
-# the most part, however pdfl2sdd gets info from PDFL files).  These 
-# requests are of the form:
-#
-#   set bb = `dd if=file bs=size count=1 | /usr/bin/od -lv
-#
-# However, the l flag to od is specific to SunOS.  This script is used
-# by those utilities to isolate the Solaris/SunOS differences in one
-# location.
-#
-# Od also differs in that the Solaris version has fills each output value
-# with leading zeros so that all are of the same width.  Since most of
-# this script that depend on od use the "==" operator in csh to compare
-# values and since this is a string comparison, these comparisons will
-# fail under Solaris.  So, the final thing this script does is to
-# convert each value of the output of the dd/od pipe to a true numerical
-# value using the @ built-in to csh and echo's the result.
-#
-# Usage: bootstrap arg1 arg2 LONG|SHORT
-#
-# where arg1 is the file name, arg2 is the blocksize in bytes and the
-# third argument is either LONG or SHORT, specifying that LONG words
-# are to be interpreted as signed integers or SHORT words are to be
-# interpreted as signed integers.  count=1 is assumed.
-#
-if ($#argv != 3) then
-   echo Usage: bootstrap arg1 arg2 LONG|SHORT
-   exit(1)
-endif
-#
-# get proper form of OD argument, Solaris vs SunOS
-#
-switch ($3)
-case LONG:
-   if (`isSolaris` == "YES") then
-      set odarg = "-Sv"
-   else
-      set odarg = "-lv"
-   endif
-   breaksw
-case SHORT:
-   if (`isSolaris` == "YES") then
-      set odarg = "-sv"
-   else
-      set odarg = "-iv"
-   endif
-   breaksw
-default:
-   echo bootstrap: illegal 3rd argument $3, only LONG and SHORT are allowed
-   exit(1)
-   breaksw
-endsw
-#
-set bs = `dd if=$1 bs=$2 count=1 | /usr/bin/od $odarg`
-#
-foreach word ($bs)
-   @ val = $word
-   echo -n $val " "
-end
diff -uNr 3.5/utilities/cdump unipops-3.6/utilities/cdump
--- 3.5/utilities/cdump	2000-03-16 11:29:45.000000000 -0700
+++ unipops-3.6/utilities/cdump	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-#!  /bin/csh
-#
-#   @(#)cdump.sh	5.2 08/02/94
-#
-# Determines whether to call cdump or cdump.rmt
-#
-if (`hostname` == "fahd") then
-   ${popsdir}utilities/cdump.exe $argv
-   exit($status)
-else
-   ${popsdir}utilities/cdump.rmt.exe $argv
-   exit($status)
-endif
-#
diff -uNr 3.5/utilities/conversion/ascii2ieee.f unipops-3.6/utilities/conversion/ascii2ieee.f
--- 3.5/utilities/conversion/ascii2ieee.f	2000-03-16 11:30:28.000000000 -0700
+++ unipops-3.6/utilities/conversion/ascii2ieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,235 +0,0 @@
-c
-      program ascii2ieee
-c
-c     @(#)ascii2ieee.f	5.1 06/22/94
-c
-c     Converts a scan from ASCII format to IEEE KEEP; uses standard
-c     input and output.  The user can specify if only continuum or
-c     spectral line scans are to be processed by including a c or
-c     l on the command line; no arguement implies both kinds of scans
-c     are desired.
-c
-      character*12 indicator
-      character*1 arg
-      character*5120 cbuf
-      character*80 ctemp
-      real*4 rbuf(1280)
-      integer*4 iargc, ierr, ibytes, long
-      logical cont, line, headerok, isitline, isitcont
-      integer*2 ibuf(2560), jj, itype, li
-      real*8 dbuf(640)
-c
-      equivalence (dbuf, rbuf), (dbuf,cbuf), (dbuf, ibuf)
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ibytes/5120/
-c
-      cont = .true.
-      line = .true.     
-      if (iargc() .gt. 0) then
-	call getarg(long(1), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	endif
-      endif
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-999   continue
-c
-      headerok = .false.
-c     HEADEROK will only be true if all of the header can be read in
-c     correctly.
-c
-      read(5,1,err=200) rbuf(1), rbuf(2)
-1     format(2e15.7)
-c     On and Off scan number
-c
-      read(5,2,err=200,end=300) cbuf(9:20)
-2     format(a12)
-c     Source name
-c
-      read(5,3,err=200,end=300) ibuf(11)
-3     format(i6)
-c     Observer's number
-c
-      read(5,4,err=200,end=300) cbuf(23:40)
-4     format(a18)
-c     Observer's name
-c
-      read(5,5,err=200,end=300) dbuf(6)
-5     format(d20.12)
-c     Modified Julian date
-c
-      read(5,6,err=200,end=300) (ibuf(jj),jj=25,28)
-6     format(4i6)
-c     Day of year, month, day, year
-c
-      read(5,7,err=200,end=300) rbuf(15), rbuf(16)
-7     format(2e15.7)
-c     LST, EST
-c
-      read(5,81,err=200,end=300) ctemp
-81    format(a80)
-      read(ctemp,8,err=200,end=300) (ibuf(jj),jj=33,39)
-8     format(7i6)
-c     Telescope, Observing type, scan type, etc.
-c
-      itype = ibuf(34)
-      if (.not. isitcont(itype) .and. .not. isitline(itype)) then
-	   write(0,*) "ASCII2IEEE: Bad scan type:", itype
-	   goto 200
-      endif
-c     ITYPE tells whether this is a spectral line (<=2) or continuum (>2)
-c     scan.
-c
-      if (isitline(itype) .and. line) then
-c        Current scan is a spectral line scan and is desired.
-c
-         read(5,9,err=200,end=300) (ibuf(jj),jj=40,52)
-9        format(8i6,/,5i6)
-c	 ISTART, ISTOP, VREF, VDEF, etc.
-c
-         read(5,11,err=200,end=300) rbuf(27)
-11       format(e15.7)
-c	 Scan Duration
-c
-         read(5,12,err=200,end=300) ibuf(55), ibuf(56)
-12       format(2i6)
-c 	 Status Words
-c
-         read(5,13,err=200,end=300) (rbuf(jj),jj=29,49)
-13       format(2(4e15.7,/),2(3e15.7,/),5e15.7,/,2e15.7)
-c	 INtg. Time, Unused, Epoch, H rate, V rate, etc.
-c
-         read(5,19,err=200,end=300) (ibuf(jj),jj=99,106)
-19       format(8i6)
-c	 Environmental values.
-c
-         read(5,20,err=200,end=300) (rbuf(jj),jj=54,125)
-20       format(4e15.7)
-c	 APP RA, DEC; Epoch RA, DEC; Gal. coords.; etc.
-c
-         read(5,38,err=200,end=300) ibuf(251), ibuf(252)
-38       format(2i6)
-c	 Unused
-c
-         read(5,39,err=200,end=300) (dbuf(jj),jj=64,71)
-39       format(4d20.12)
-c	 Center frequencies, Rest Frequencies
-c
-         read(5,41,err=200,end=300) cbuf(569:686)
-         read(5,41,err=200,end=300) cbuf(587:604)
-         read(5,41,err=200,end=300) cbuf(605:622)
-         read(5,41,err=200,end=300) cbuf(623:640)
-41       format(a18)
-c	 Center frequency formulae
-c
-         read(5,45,err=200,end=300) (dbuf(jj),jj=81,86)
-45       format(3d20.12)
-c 	 L1, L1F1, L1F2, L2, etc.
-c
-         read(5,47,err=200,end=300) (rbuf(jj),jj=173,176)
-47       format(4e15.7)
-c	 LA, LB, LC, LD
-c
-         read(5,48,err=200,end=300) (ibuf(jj),jj=353,464)
-48       format(10i6)
-c	 A/C words
-c
-         read(5,60,err=200,end=300) (rbuf(jj),jj=233,256)
-60       format(4e15.7)
-c	 Ref. System. temps., Power counters, Channel zero values
-c
-	 headerok = .true.
-         read(5,66,err=200,end=300) (rbuf(jj),jj=257,1280)
-66       format(5e15.7)
-c	 Spectral values
-c
-         read(5,67,err=200,end=300) indicator
-67       format(a12)
-c	 End of scan indicator
-c
-      else if (isitcont(itype) .and. cont) then
-c	  Current scan is a continuum scans and is desired
-c
-          read(ctemp,801,err=200,end=300) (ibuf(jj),jj=33,44)
-801	  format(12i6)
-c         Reread Telescope, etc. for continuum scans
-c
-	  read(5,91,err=200,end=300) rbuf(23)	
-91	  format(e15.7)
-c	  DCR cal. factor
-c
-	  read(5,101,err=200,end=300) (ibuf(jj),jj=47,54)
-101	  format(8i6)
-c	  VREF, VDEF, POsition Code, etc.
-c
-	  read(5,111,err=200,end=300) (rbuf(jj),jj=28,49)
-111	  format(5e15.7)
-c	  DCR Sys. temp., LAMBDA, Beam size factor, etc.
-c
-	  read(5,116,err=200,end=300) (ibuf(jj),jj=99,106)
-116 	  format(8i6)
-c	  Environmental values
-c
-	  read(5,171,err=200,end=300) (rbuf(jj),jj=54,68)
-171	  format(5e15.7)
-c	  Epoch RA, DEC; App. RA, DEC; Gal. coords.; etc.
-c
-	  read(5,201,err=200,end=300) ibuf(137), ibuf(138)
-201	  format(2i6)
-c	  Unused and scans accummed.
-c
-	  read(5,211,err=200,end=300) (rbuf(jj),jj=70,87)
-211	  format(5e15.7)
-c	  ACCUM stack
-c
-	  headerok = .true.
-	  read(5,212,err=200,end=300) (rbuf(jj),jj=88,687)
-212	  format(6e12.4)
-c	  Data points
-c
-          read(5,213,err=200,end=300) indicator
-213       format(/,a12)
-c	  End of scan indicator
-c
-      else
-c       Scan of the current type is not desired.
-c
-	goto 200
-c
-      endif
-c
-      call writebuff(ierr, ibytes, cbuf)
-      if (ierr .ne. 5120) then
-	goto 300
-      else
-	goto 999
-      endif
-c     Scan is of the desired type and has been converted so write it out.
-c     IF error on reading, stop the program else read in next scan.
-c
-200   continue
-	if (headerok) then
-      		call writebuff(ierr, ibytes, cbuf)
-      		if (ierr .ne. 5120) goto 300
-	endif
-c	An error was detected while reading data... Write out scan anyway.
-c
-250	read(5,251,end=300) indicator
-251	format(a12)
-	if (indicator .eq. 'SCAN #######') then
-	   goto 999
-	else
-	   goto 250
-	endif
-c       If an error on reading, keep reading file until end of file or until
-c	another 'SCAN' string is seen
-c
-300   stop
-      end
diff -uNr 3.5/utilities/conversion/average.f unipops-3.6/utilities/conversion/average.f
--- 3.5/utilities/conversion/average.f	2000-03-16 11:29:47.000000000 -0700
+++ unipops-3.6/utilities/conversion/average.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,130 +0,0 @@
-      logical function average(lnew)
-c
-c     @(#)average.f	5.1 06/22/94
-c
-c     Creates (Sig-Ref)*Tref/Ref for switched data in cvtbuff.
-c     For both TPOWER and Switched data, averages cvtbuff into
-c     outbuff.
-c
-      real rweight(4), sweight(4), ffactor(4)
-      logical lnew
-      integer*2 j, i
-      real*4 effint(4), swnext, rwnext, swnew, rwnew
-c
-      save rweight, sweight, ffactor
-c
-      include 'cvttele.inc'
-c
-      average = .false.
-c
-      if (icvtbuff(ktos) .eq. 1) then
-c     (i.e., Switched power scan)
-c
-        do 200 j = icvtbuff(kir), min(4,icvtbuff(klr)), icvtbuff(kin)
-	  do 100 i = icvtbuff(kst+j), icvtbuff(ksp+j)
-	    if (rcvtbuff(i+lrs) .ne. 0. ) then
-		rcvtbuff(i+lss) = (rcvtbuff(i+lss) - rcvtbuff(i+lrs)) * 
-     1				   rcvtbuff(j+lstp) / rcvtbuff(i+lrs)
-	    else
-		rcvtbuff(i+lss) = 1.e30
-	    endif
-100	    continue
-c
-c         Creates (Sig-Ref)*Tref / Ref if Switched Powers scan and stores
-c         results over the old Sig values.  Prevents possible overflow.
-c
-c         NOTE: Sig and Ref part of Total power scans are already averaged 
-c         when they hit the telescope tape.
-c
-200	  continue
-c
-      endif
-c
-      if (lnew) then
-c	(i.e., a new scan so we can overwrite previous outbuff and skip
-c	any averaging.)
-c
-	do 50 i = 1, outbuffsize/4
-		routbuff(i,1) = rcvtbuff(i)
-50      	continue
-c
-        do 60 j = icvtbuff(kir), min(4,icvtbuff(klr)), icvtbuff(kin)
-	  effint(j) = rcvtbuff(lint+j)
-	  if (rcvtbuff(lstp+j).le.0. .or. rcvtbuff(ltrf+j).le.0.) then
-	     ffactor(j) = 1.
-	     return
-	  else
-	     ffactor(j) = rcvtbuff(lrms+j) * sqrt(rcvtbuff(lint+j)) /
-     .			rcvtbuff(lstp+j)
-             if (icvtbuff(ktos) .eq. 1) then
-	         sweight(j) = effint(j) / 
-     .		     ( (rcvtbuff(j+lstp)**2 + rcvtbuff(j+ltrf)**2)/2.)
-	     else
-	         sweight(j) = effint(j) / (rcvtbuff(lstp+j) ** 2)
-	     endif
-	     rweight(j) = effint(j) / (rcvtbuff(ltrf+j) ** 2)
-	  endif
-60        continue
-	routbuff(lstm,1) = rcvtbuff(lsrt)
-c       Resets outbuff and the weights if a new scan has just been read in and
-c	if system temps make sense.  Skip record if Sys temp do not make sense.
-c	Clear out Duration Time.
-c
-      else
-c	(i.e., there is data for the same scan in outbuff then we must average)
-c
-        do 400 j = icvtbuff(kir), min(4,icvtbuff(klr)), icvtbuff(kin)
-c
-	  if (rcvtbuff(lstp+j).le.0. .or. rcvtbuff(ltrf+j).le.0.) then
-	     return
-c	     Skip this record if sys. temp make no sense
-	  else
-             if (icvtbuff(ktos) .eq. 1) then
-	         swnext = effint(j) / 
-     .		     ( (rcvtbuff(j+lstp)**2 + rcvtbuff(j+ltrf)**2)/2.)
-	     else
-	         swnext = effint(j) / (rcvtbuff(lstp+j) ** 2)
-	     endif
-	     swnew = sweight(j) + swnext
-	     rwnext = effint(j) / (rcvtbuff(ltrf+j) ** 2)
-	     rwnew = rweight(j) + rwnext
-c	     Calculate necessary weight factors
-c	     *WNEW = sum of previous weight factors + present wieght factors
-c            *WNEXT = weight factor for present record
-c            *WIEGHT = sum of previous weights.  The r and s signify reference
-c	              and signal
-c
-	     routbuff(lint+j,1) = routbuff(lint+j,1) + effint(j) 
-c	     Update effective integration time
-c
-	     do 300 i = icvtbuff(kst+j), icvtbuff(ksp+j)
-	        routbuff(lss+i,1) = ( routbuff(lss+i,1)*sweight(j) + 
-     1		                     rcvtbuff(lss+i)*swnext ) / swnew
-300             continue
-c	     Average data with Int/Tsys**2 weighing
-c
-             routbuff(lstp+j,1) = sqrt( routbuff(lint+j,1) / swnew)
-	     routbuff(ltrf+j,1) = sqrt( routbuff(lint+j,1) / rwnew)
-c	     Average sys temps [see memo by RJM dated 1/22/92].
-c
-	     routbuff(lrms+j,1) = ffactor(j)* routbuff(lstp+j,1) / 
-     .					sqrt(routbuff(lint+j,1) )
-c	     Update rms
-c
-	     sweight(j) = swnew
-	     rweight(j) = rwnew
-c	     Update weight factors for the next record in scan, if one exists
-	  endif
-c
-400       continue
-	  routbuff(lstm,1) = routbuff(lstm,1) + rcvtbuff(lsrt)
-c	  Update Duration time.
-c
-      endif
-c
-      average = .true.
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/cdump.f unipops-3.6/utilities/conversion/cdump.f
--- 3.5/utilities/conversion/cdump.f	2000-03-16 11:30:26.000000000 -0700
+++ unipops-3.6/utilities/conversion/cdump.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,136 +0,0 @@
-C
-      PROGRAM CDUMP
-C
-c      @(#)cdump.f	5.1 06/22/94
-c
-C Searches through scans and finds only those spectral line scans with
-C matching projectcodes.  These matching scans are placed in a file
-C ldata.'projectcode'
-C
-      INTEGER*2 IBUF(2560), j, ifeed, istp, istrt, numarg, ierr
-      character*8 projcode, cstrt, cstp, cfeed,site,oobs, projcod1
-      integer*4 irtn, iargc, ii1, ii2, ii3, i5120, ierr4, ii4, m1, n0
-      integer*4 i4a,nactual,i4b,iscan, maxdata
-      integer*4 kfeed, lfeed, hostnm, getlog
-      logical pos
-      real RBUF(1280), stp, strt, rscans(32766)
-      real*8 dprojcode,doobs,dsite
-c
-      equivalence (ibuf(1),rbuf(1))
-      equivalence (projcode,dprojcode),(oobs,doobs),(site,dsite)
-c
-      DATA   ii1/1/, ii2/2/, ii3/3/, i5120/5120/, ii4/4/, maxdata/1190/,
-     .	     m1/-1/, n0/0/ 
-C
-      numarg = iargc()
-      if (numarg .le. 0) then
-	write(0,*) 'Must specify projectcode'
-	call exit(ii1)
-      else
-	call getarg(ii1, projcod1)
-	call uppercase(projcod1, projcode)
-	irtn = hostnm(site)
-	irtn = getlog(oobs)
-      endif
-      call openaccess(dprojcode,doobs,dsite,irtn)
-c
-      if (irtn .ne. 0) then
-         write (0,*) 'Trouble with on-line data -- Terminating'
-         call exit(ii1)
-      endif
-C
-      if (numarg .gt. 1) then
-	call getarg(ii2, cstrt)
-	read(cstrt, 10,iostat=ierr) istrt
-10	format(i8)
-	if (ierr .ne. 0 .or. istrt .lt. 0) then
-	   write(0,*) 'Bad starting scan number: ', cstrt
-	   call exit(ii1)
-	endif
-	strt = float(istrt)
-      else
-	strt = 0.0
-      endif
-c
-      if (numarg .gt. 2) then
-	call getarg(ii3, cstp)
-	read(cstp, 10,iostat=ierr) istp
-	if (ierr .ne. 0 .or. istp .lt. istrt) then
-	   write(0,*) 'Bad starting or stoping scan number: ',
-     .		 cstrt, ' ', cstp
-	   call exit(ii1)
-	endif
-	stp = float(istp)
-      else
-	stp = 999999.0
-      endif
-c
-      pos = .false.
-      kfeed = 0
-      if (numarg .gt. 3) then
-	call getarg(ii4, cfeed)
-	if (cfeed .eq. 'P' .or. cfeed .eq. 'p') then
-	   pos = .true.
-	else
-	   read(cfeed, 10,iostat=ierr) ifeed
-	   if (ierr .ne. 0) then
-	      write(0,*) 'Bad feed number: ',cfeed
-	      call exit(ii1)
-	   endif
-           if (ifeed .eq. 99) then 
-	      kfeed = -1
-           else if (ifeed .eq. 98) then
-	      kfeed = 0
-           else if (ifeed .gt. 0 .and. ifeed .le. 16) then
-	      kfeed = ifeed
-           else if (ifeed .ne. 0) then
-	      write(0,*) 'Bad feed number: ',cfeed
-	      call exit(ii1)
-           endif
-	endif
-      endif
-C
-  70  nactual = 32766
-      i4a = 0
-      i4b = 32766
-      call gcontlist2(nactual,i4b,rscans,i4a)
-      do 90 j = 1, nactual
-         iscan = rscans(j)
-	 if (iscan.ge.strt .and. iscan.le.stp) then
-	    if (ifeed.ne.0) then
-               call gcont(iscan,kfeed,i4a,maxdata,ibuf(1),irtn)
-               if ((irtn.eq.0).and.(rbuf(1).ge.strt).and.
-     +            (rbuf(1).le.stp)) then
-		  rbuf(1)=rbuf(1)+float(ifeed)/100
-                  call writebuff (ierr4, i5120, rbuf)
-	       endif
-	    else
-	       do 80 lfeed=1,16
-                 call gcont(iscan,lfeed,i4a,maxdata,ibuf(1),irtn)
-                 if ((irtn.eq.0).and.(rbuf(1).ge.strt).and.
-     +              (rbuf(1).le.stp)) then
-		    rbuf(1)=rbuf(1)+float(lfeed)/100
-                    call writebuff (ierr4, i5120, rbuf)
-	 	 else
-		    goto 81
-		 endif
-  80           continue
-  81	       if (pos) then
-		 call gcont(iscan,n0,i4a,maxdata,ibuf(1),irtn)
-                 if (irtn.eq.0) then
-		    rbuf(1)=rbuf(1)+.98
-                    call writebuff (ierr4, i5120, rbuf)
-		 endif
-		 call gcont(iscan,m1,i4a,maxdata,ibuf(1),irtn)
-                 if (irtn.eq.0) then
-		    rbuf(1)=rbuf(1)+.99
-                    call writebuff (ierr4, i5120, rbuf)
-		 endif
-	       endif
-	    endif
-	 endif
-  90  CONTINUE
-      call closeaccess()
-      STOP
-C----------------------------------------------------------------------
-      END
diff -uNr 3.5/utilities/conversion/cform.inc unipops-3.6/utilities/conversion/cform.inc
--- 3.5/utilities/conversion/cform.inc	2000-03-16 11:30:03.000000000 -0700
+++ unipops-3.6/utilities/conversion/cform.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,127 +0,0 @@
-c***************************************************
-c* Modified 8903 [RJM] See CHANGES.DOC
-c***************************************************
-C-------------------------------------------------------------------------------
-C  @(#)cform.inc	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C
-C       Class 1 :  Basic Information
-C       Class 2 :  Pointing Parameters
-C       Class 3 :  Observing Parameters
-C       Class 4 :  Positions
-C       Class 5 :  Environment
-C       Class 6 :  Map Parameters
-C       Class 7 :  Data Parameters
-C       Class 8 :  Engineering Parameters
-C       Class 9 :  Telescope Dependent Parameters
-C       Class 10:  Open Parameters
-C       Class 11:  Phase Block
-C       Class 12:  Receiver Descriptor Block
-C       Class 13:  Reduced Data Values
-C
-C       C pointers for the currently referenced array
-C
-      INTEGER*2  C1HLN,  C1DLN,  C1SNO,  C1OBS,  C1ONA,  C1TEL,
-     .   C1PID,  C1SNA,  C1STC,  C1RCV,  C1BKE,  C1DP,   c1save, 
-     .   c1norec,c1recid,C2XPC,  C2YPC,  C2UXP,  C2UYP,  C2PC,   
-     .   C2ORI,  C2FR,   C2FV,   C2FL,   C2PTM,
-     .   C3DAT,  C3UT,   C3LST,  C3NRC,  C3NSV,  C3PPC,  C3CYL,  
-     .   C3SRT,  C3TYP11,c3phsid,
-     .   C4EPH,  C4SX,   C4SY,   C4RX,   C4RY,   C4ERA,  C4EDC,  
-     .   C4GL,   C4GB,   C4AZ,   C4EL,   C4IX,   C4IY,   C4DO,   
-     .   C4CSC,  
-     .   C5AT,   C5PRS,  C5RH,   C5IR,   C5DP,   C5MM,   
-     .   C6MSA,  C6XZ,   C6YZ,   C6DX,   C6DY,   C6NP,   C6XNP,  
-     .   C6YNP,  C6XGC,  C6YGC,  C6FC,      
-     .   C7FW,   C7OSN,  C7BCV,  C7VC,   C7VR,   C7VRD,  C7CAL,    
-     .   C8AAE,  C8ABE,  C8GN,   C8EL,   C8EF,   
-     .   C9L1,   C9L1F1, C9L1F2, C9L2,   C9L2F1, C9L2F2, C9LA,   
-     .   C9LB,   C9LC,   C9LD,   C9LVC,  C9PF,   C9RHO,  C9THE,  
-     .   C9CFF,  
-     .   C9SYN,  C9LOF,  C9HM,   C9LOI,  C9FIF,  C9RAO,  C9REO,  
-     .   C9BT,   C9BOR,  C9BO,   C9OT,   C9SB,   C9WL,   C9GS,   
-     .   C9PBM,  C9MBM,  C9SRO,  C9FOFS, C9FOFR1,C9FOFR2
-      integer*2  C10PV,  
-     .   C11OVV(22),  C11OVD(22),  C11OPT(22),  
-     .   C11NSVF,C11NCY, C11NCYF,C11PPCF,C11CYLF,C11SRTF,
-     .   C11PVV(10), C11PVD(10), C11PPT(10),
-     .   C12CF,  C12RF,  C12FR,  C12BW,  C12RT,  C12CT,  C12SST, 
-     .   C12RST, C12ST,  C12RMS, C12RP,  C12X0,  C12DX,  C12IT,  
-     .   C12NI,  C12SPN, C12WO,  C12WT,  C12OO,  C12OT,  C12SP,  
-     .   C12EIT, C12RXI,
-     .   C13NS,  C13FS,  C13LS,  C13LAM, C13LW,  C13ILI, C13RMS
-C
-      integer*2 idatoff, astrings(92), numastrings
-c
-      data C1HLN/5/,    C1DLN/6/,    C1SNO/7/,   C1OBS/8/,   C1ONA/9/, 
-     1     C1TEL/11/,   C1PID/12/,   C1SNA/13/,  C1STC/15/,  C1RCV/16/,
-     2     C1BKE/17/,   C1DP/18/,    c1save/19/, C1norec/20/,c1recid/21/
-      data C2XPC/30/,   C2YPC/31/,   C2UXP/32/,  C2UYP/33/,  C2PC/34/,   
-     1     C2ORI/38/,   C2FR/39/,    C2FV/40/,   C2FL/41/, C2PTM/42/
-      data C3DAT/55/,   C3UT/56/,    C3LST/57/,  C3NRC/58/,  C3NSV/59/,
-     1     C3PPC/60/,   C3CYL/61/,   C3SRT/62/, C3TYP11/63/, c3phsid/64/
-      data C4EPH/80/,   C4SX/81/,    C4SY/82/,   C4RX/83/,   C4RY/84/,   
-     1     C4ERA/85/,   C4EDC/86/,   C4GL/87/,   C4GB/88/,   C4AZ/89/,   
-     2     C4EL/90/,    C4IX/91/,    C4IY/92/,   C4DO/93/,   C4CSC/96/
-      data C5AT/105/,   C5PRS/106/,  C5RH/107/,  C5IR/108/,  C5DP/109/,   
-     1     C5MM/110/
-      data C6MSA/130/,  C6XZ/131/,   C6YZ/132/,  C6DX/133/,  C6DY/134/, 
-     1     C6NP/135/,   C6XNP/136/,  C6YNP/137/, C6XGC/138/, C6YGC/139/,  
-     2     C6FC/140/
-      data C7FW/155/,   C7OSN/156/,  C7BCV/157/, C7VC/158/,  C7VR/159/, 
-     1     C7VRD/160/,  C7CAL/161/
-      data C8AAE/180/,  C8ABE/181/,  C8GN/182/,  C8EL/183/,  C8EF/184/
-      data C9L1/205/,   C9L1F1/206/, C9L1F2/207/,C9L2/208/,  C9L2F1/209/, 
-     1     C9L2F2/210/, C9LA/211/,   C9LB/212/,  C9LC/213/,  C9LD/214/,  
-     2     C9LVC/215/,  C9PF/216/,   C9RHO/218/, C9THE/219/, C9CFF/220/
-      data C9SYN/205/,  C9LOF/206/,  C9HM/207/,  C9LOI/208/, C9FIF/209/,
-     1     C9RAO/210/,  C9REO/211/,  C9BT/212/,  C9BOR/213/, C9BO/214/,   
-     2     C9OT/215/,   C9SB/216/,   C9WL/217/,  C9GS/218/,  C9PBM/219/,  
-     3     C9MBM/221/,  C9SRO/223/,  C9FOFS/227/,C9FOFR1/228/,
-     4     C9FOFR2/229/
-      data C10PV/230/
-      data C11OVV /255, 258, 261, 264, 267, 270, 273, 276, 279, 282,
-     1             285, 288, 291, 294, 297, 300, 303, 306, 309, 312,
-     2             315, 318/
-      data C11OVD /256, 259, 262, 265, 268, 271, 274, 277, 280, 283,
-     1             286, 289, 292, 295, 298, 301, 304, 307, 310, 313,
-     2             316, 319/
-      data C11OPT /257, 260, 263, 266, 269, 272, 275, 278, 281, 284,
-     1             287, 290, 293, 296, 299, 302, 305, 308, 311, 314,
-     2             317, 320/
-      data C11NSVF/255/, C11NCY/256/, C11NCYF/257/, C11PPCF/258/,
-     1     C11CYLF/259/, C11SRTF/260/
-      data C11PVV /261, 267, 273, 279, 285, 291, 297, 303, 309, 315/
-      data C11PVD /262, 268, 274, 280, 286, 292, 298, 304, 310, 316/
-      data C11PPT /263, 269, 275, 281, 287, 293, 299, 305, 311, 317/
-      data C12CF/321/,  C12RF/322/, C12FR/323/,  C12BW/324/, C12RT/325/,  
-     1     C12CT/326/,  C12SST/327/,C12RST/328/, C12ST/329/, C12RMS/330/, 
-     2     C12RP/331/,  C12X0/332/, C12DX/333/,  C12IT/334/, C12NI/335/, 
-     3     C12SPN/336/, C12WO/337/, C12WT/338/,  C12OO/339/, C12OT/340/,  
-     4     C12SP/341/,  C12EIT/342/,C12RXI/343/
-      data C13NS/346/,  C13FS/347/, C13LS/348/,  C13LAM/349/, C13LW/350/,  
-     1     C13ILI/351/, C13RMS/352/
-c
-      data idatoff/790/
-c
-c     IDATOFF+1 = position of first data point in arrays in R*4 words
-c
-c     idatoff = (25*13 + 66 + 4) * 2
-c                  25 = size of padded classes in R*8 words
-c                  13 = number of padded classes (class 14 is not used)
-c                  66 = size of class 11 in R*8 words
-c	           2 converts R*8's to R*4's
-c
-      data astrings  /8,  9, 11, 12, 13, 15, 16, 17, 18, 42, 63, 
-     .               96,140,160,161,220,230,231,232,233,234,235,
-     .              236,237,238,239,256,259,262,265,268,271,274,
-     .              277,280,283,286,289,292,295,298,301,304,307,
-     .              310,313,316,319,257,260,263,266,269,272,275,
-     .              278,281,284,287,290,293,296,299,302,305,308,
-     .              311,314,317,320,262,268,274,280,286,292,298,
-     .              304,310,316,263,269,275,281,287,293,299,305,
-     .              311,317,341,343/
-      data numastrings/92/
-c     Locations in array headers of strings; number of string
-c	header words
-c
diff -uNr 3.5/utilities/conversion/checkdate.f unipops-3.6/utilities/conversion/checkdate.f
--- 3.5/utilities/conversion/checkdate.f	2000-03-16 11:29:48.000000000 -0700
+++ unipops-3.6/utilities/conversion/checkdate.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,86 +0,0 @@
-      subroutine checkdate(iyr,imth,idy,ihr,imin,isec)
-c
-c     @(#)checkdate.f	5.1 06/22/94
-c
-c     Checks and corrects year, month, day, hour, min, and sec are within 
-c     the correct limits
-c
-c     iyr, imth, idy, ihr, im, is = (I*4) year, month, day, hour, min, sec
-c
-      integer*4 iyr, imth, idy, ihr, imin, isec, imonth(12)
-      logical correct
-c
-      data imonth/31,28,31,30,31,30,31,31,30,31,30,31/
-c
-1     correct = .true.
-c
-      if ( (iyr .le. 1582 .and. mod(iyr,4) .eq. 0) .or. (iyr .gt. 1582 
-     1     .and. mod(iyr,100) .ne. 0 .and. mod(iyr,4) .eq. 0) ) 
-     2     imonth(2) = 29
-c     Checks for whether it is leap year
-c
-      if (isec .gt. 59) then
-	imin = imin + 1
-	isec = isec - 60
-        correct = .false.
-      endif
-c
-      if (isec .lt. 0) then
-	imin = imin - 1
-	isec = isec + 60
-        correct = .false.
-      endif
-c
-      if (imin .gt. 59) then
-	ihr = ihr + 1
-	imin = imin - 60
-        correct = .false.
-      endif
-c
-      if (imin .lt. 0) then
-	ihr = ihr - 1 
-	imin = imin + 60
-        correct = .false.
-      endif
-c
-      if (ihr .gt. 23) then
-	idy = idy + 1
-	ihr = ihr - 24
-        correct = .false.
-      endif
-c
-      if (ihr .lt. 0) then
-	idy = idy - 1
-	ihr = ihr + 24
-        correct = .false.
-      endif
-c
-      if (imth .gt. 12) then
-	iyr = iyr + (imth-1)/12
-	imth = mod(imth-1,12) + 1
-	correct = .false.
-      endif
-c
-      if (imth .le. 0) then
-	iyr = iyr + (imth-12)/12
-	imth = mod(imth-12,12) + 12
-        correct = .false.
-      endif
-c
-      if (idy .gt. imonth(imth) ) then
-	idy = idy - imonth(imth)
-	imth = imth + 1
-	correct = .false.
-      endif
-c
-      if (idy .le. 0) then
-	if (imth .eq. 1) imth = 13
-	idy = idy + imonth(imth-1)
-	imth = imth - 1
-      endif
-c
-      if (.not. correct) goto 1
-c
-      return
-c
-      end
diff -uNr 3.5/utilities/conversion/conversion2.f unipops-3.6/utilities/conversion/conversion2.f
--- 3.5/utilities/conversion/conversion2.f	2000-03-16 11:30:03.000000000 -0700
+++ unipops-3.6/utilities/conversion/conversion2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,119 +0,0 @@
-      subroutine conversion2(input, output, ier)
-C-------------------------------------------------------------------------------
-C  @(#)conversion2.f	5.2 09/10/98
-C-------------------------------------------------------------------------------
-c
-c     Converts from SDD #1 format to internal format of UniPOPS
-c
-      include 'params.inc'
-      integer*4 maxclass, i, nextout, inclasses, ifirst, j, ilast,
-     .		i1, i2, headsize, datalen, noint, spn, 
-     .           maxperclass(20), bootsize
-      double precision input(*), output(*)
-c
-      integer*2 iindat(16), ioutdat(16), ier
-      double precision dindat(4), doutdat(4)
-c
-      equivalence (dindat, iindat), (doutdat, ioutdat)
-c
-      include 'cform.inc'
-c
-      data maxclass/14/
-      data maxperclass/25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-     .                 66, 25, 25, 25,  0,  0,  0,  0,  0,  0/
-c     MAXCLASS = max. number of classes
-c     MAXPERCLASS = max. number of R*8 entries in each class
-c
-      ier = 0
-      bootsize = (maxclass+5)/4
-      do 10 i = 1, bootsize
-	dindat(i) = input(i)
-10	continue
-c     Move class descriptors into DINDAT
-c
-      nextout = bootsize + 1
-c     nextout = location in OUTPUT where next class starts
-c
-      headsize = input(iindat(2))/8.d0
-      if (headsize*8 .ne. nint(input(iindat(2)))) 
-     .		headsize = headsize + 1
-c     headsize = num. R*8 words in input header
-c
-      inclasses = min(maxclass,iindat(1))
-      ioutdat(1) = inclasses
-      ioutdat(2) = (inclasses+5)/4 + 1
-c     Find max number of classes needed, up to above limit and
-c     start puting new class descriptors into DOUTDAT
-c
-      do 100 i = 1, inclasses
-	ifirst = iindat(i+1)
-	if (ifirst .lt. 0) then
-	   ier = -1
-	   goto 99
-	endif
-	ilast = ifirst + min(maxperclass(i), iindat(i+2)-ifirst) - 1
-        if (i .eq. inclasses .and. ilast .lt. ifirst) then
-	    ilast = min(ifirst+maxperclass(i), headsize )
-	else if (i .ne. inclasses .and. ilast .lt. ifirst) then
-	    ier = -1
-	    goto 99
-	endif
-	ioutdat(i+2) = ioutdat(i+1) + ilast - ifirst + 1
-	if (i .ne. 1) nextout = nextout + maxperclass(i-1)
-        do 50 j = ifirst, ilast
-	   output(j-ifirst+nextout) = input(j)
-50	   continue
-c	Move header items from INPUT to OUTPUT at their correct locations
-c
-100	continue
-c
-      do 200 i = inclasses+1, maxclass
-	ioutdat(i+2) = 0
-	nextout = nextout + maxperclass(i-1)
-200	continue
-      nextout = nextout + maxperclass(maxclass)
-c     Zero out any unused class descriptors in DOUTDAT.
-c     Bump nextout pointer to end of output header.
-c
-      do 250 i = 1, ioutdat(2) - 1
-	output(i) = doutdat(i)
-250	continue
-c	Move class descriptors in DOUTDAT back to OUTPUT
-c
-      datalen = output(c1dln)
-      if (datalen .gt. MAX_DATA_POINTS * 4) 
-     .     datalen = MAX_DATA_POINTS * 4
-      if (datalen .lt. 0) datalen = 0
-      noint = output(c12ni)
-      spn = output(c12spn)
-      if (noint .lt. 0) noint = 0
-      if (spn .lt. 1) spn = 1
-      if (noint + spn - 1 .gt. MAX_DATA_POINTS) then
-         if (spn .gt. MAX_DATA_POINTS) spn = MAX_DATA_POINTS
-         noint = MAX_DATA_POINTS - spn + 1
-      endif
-c		make sure header values won't point to invalid array elements
-      i1 = output(c1hln)/8 + 1
-      i2 = i1 + datalen/8 - 1
-      if (mod(datalen, 8) .ne. 0) i2 = i2 + 1
-      if (i1 .lt. 0) then
-	ier = -1
-	goto 99
-      endif
-c     Find where the data is in INPUT give up if no header info
-c
-      if (i2 .ge. i1) then
-c	Move the data from INPUT to OUTPUT
-c		only do this if there really is some data there
-c		this isn't strictly necessary, but I think its clearer
-         do 300 i = i1, i2
-	    output(i-i1+nextout) = input(i)
-300	 continue
-      endif
-c
-      output(c1hln) = (nextout - 1) * 8
-c     Changes the Header Length in the OUTPUT array to its new value.
-c   
-99    return
-      end
-c
diff -uNr 3.5/utilities/conversion/cvtieeedbl.f unipops-3.6/utilities/conversion/cvtieeedbl.f
--- 3.5/utilities/conversion/cvtieeedbl.f	2000-03-16 11:29:49.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtieeedbl.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,87 +0,0 @@
-      subroutine cvtieeedbl(cieee, cmod)
-c
-c     @(#)cvtieeedbl.f	5.1 06/22/94
-c
-c     Converts input R*8 IEEE word into its equivalent 6 byte 
-c     Modcomp word.  
-c
-c     cieee = (C*8) input IEEE real
-c     cmod = (C*6) output modcomp character string equivalent to modcomp
-c		6-byte double precision word
-c
-c     Modcomp double precision contains a sign bit, a 9 bit exponent, and
-c     a 38 bit mantissa.  For positive values, the representation is
-c     F * 2**(exp-256) where the exponent ranges from 0 to 511 and F is
-c     between 0.5 and 1.  For negative values, the representation is the
-c     two's complement of the absolute value.
-c
-c     IEEE double precision contains a sign bit, 11 bit exponent, and a
-c     52 bit mantissa.  The representation is 1.F * 2**(exp-1023) where the
-c     exponent ranges from 0 to 2047 and F from 0. to 0.9999999.
-c
-c
-      character*8 cieee
-      character*6 cmod
-c
-      dimension ir(2)
-      character*6 cdr, cnulls
-      integer*4 nulls(2), ir, isign, ir2, iexp, ifrac2, ifrac1, itemp,
-     .		iexpmod, ifracmod1, ifracmod2
-      real*8 dr, frac, two16, two20, two22, two36, fracmod
-c
-      equivalence (dr, ir(1)),(cdr, dr),(cnulls,nulls)
-c
-      data nulls/z'00000000',z'00000000'/, two20/1048576.d0/,
-     1     two16/65536.d0/, two22/4194304.d0/, two36/68719476736.d0/
-c
-      cdr = cieee
-c
-      if (dr .eq. 0.0d0) then
-	cmod = cnulls(1:6)
-      else
-        isign = rshift(ir(1),31)
-        ir2 = ir(1) - lshift(isign, 31)
-        iexp = rshift(ir2, 20)  
-        ifrac1 = ir2 - lshift(iexp, 20)
-        ifrac2 = rshift(ir(2), 16)
-        if (ifrac2 .lt. 0) ifrac2 = ifrac2 + two16 + 0.5
-        frac = 1.d0 + dble(ifrac1)/two20 + dble(ifrac2)/two36
-c       Get the correct power of two for the exponent and the mantissa
-c
-        iexpmod = iexp - 766
-        fracmod = frac / 2.d0
-        if (iexpmod.gt.511) then
-	   iexpmod=511
-	   fracmod = 0.99999999999
-        else if(iexpmod.lt.0) then
-	   iexpmod=0
-	   fracmod=0.
-        endif
-        ifracmod1 = fracmod*two22
-        ifracmod2 = (fracmod*two22 - ifracmod1)*two16
-c       Find Modcomp exponent and mantissa.  Calculate the two integer word
-c       representation of the mantissa.  
-c
-        ir(1) = or(lshift(iexpmod,22),ifracmod1)
-        ir(2) = lshift(ifracmod2,16)
-c       Pack the bits back into dr ( = ir).  Second half of ir(2) is zeros
-c
-        if (isign.ne.0) then
-  	  itemp = ir(2)
-	  ir(2) = not(ir(2)) + 1
-	  ir(1) = not(ir(1))
-	  if (itemp .eq. 0) ir(1)=ir(1)+1
-c         Checks if all the low order bits were off before the two's complement
-c         If they were, then a bit must be added to the complement of the high
-c         order bits.
-c
-        endif
-c       If negative, take two's complement of result
-c
-        cmod = cdr(1:6)
-c
-      endif
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/conversion/cvtieeeflt.f unipops-3.6/utilities/conversion/cvtieeeflt.f
--- 3.5/utilities/conversion/cvtieeeflt.f	2000-03-16 11:29:49.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtieeeflt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,55 +0,0 @@
-      subroutine cvtieeeflt(cieee, cmod)
-c
-c     @(#)cvtieeeflt.f	5.1 06/22/94
-c
-c     Converts IEEE single precision floating point into Modcomp 
-c     floating point.
-c     cieee = (C*4) input IEEE real
-c     cmod = (C*4) output modcomp real
-c
-c     Modcomp real contains a sign bit, a 9 bit exponent, and
-c     a 22 bit mantissa.  For positive values, the representation is
-c     F * 2**(exp-256) where the exponent ranges from 0 to 511 and F is
-c     between 0.5 and 1.  For negative values, the representation is the
-c     two's complement of the absolute value.
-c
-c     IEEE real contain a sign bit, 8 bit exponent, and a 23 bit
-c     mantissa.  The representation is 1.F * 2**(exp-127) where exp ranges
-c     from 0 to 255 and F is between 0. and 0.9999999. 
-c 
-      character*4 cieee, cmod
-c
-      character*4 cin, cout, cnulls
-      integer*4 nulls, iin, iout, isign, ir2, iexp, ifrac, iexpmod,
-     .		ifracmod
-      real*4 rin, rout, frac, fracmod
-      real*8 two22, two23
-c
-      equivalence (cin, rin),(cout,rout),(cin,iin),(nulls,cnulls),
-     1		  (rout,iout)
-c
-      data nulls /z'00000000'/, two22/4194304.d0/, two23/8388608.d0/
-c
-      cin = cieee
-c
-      if (rin .eq. 0.0) then
-	cmod = cnulls
-      else
-        isign = rshift(iin,31)
-        ir2 = iin - lshift(isign,31)
-        iexp = rshift(ir2,23)
-        ifrac = ir2 - lshift(iexp,23)
-        frac = 1. + dble(ifrac) / two23
-c
-        iexpmod = iexp + 130
-        fracmod = frac / 2. 
-        ifracmod = fracmod * two22
-c
-        iout = or(lshift(iexpmod,22),ifracmod)
-        if(isign.ne.0) iout = not(iout) + 1
-        cmod = cout
-      endif
-c
-      return
-c
-      end
diff -uNr 3.5/utilities/conversion/cvtieeemod.f unipops-3.6/utilities/conversion/cvtieeemod.f
--- 3.5/utilities/conversion/cvtieeemod.f	2000-03-16 11:29:49.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtieeemod.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,54 +0,0 @@
-      subroutine cvtieeemod(cinbuff, ccvtbuff, type, ntype, num)
-c
-c     @(#)cvtieeemod.f	5.1 06/22/94
-c
-c     Converts from IEEE to Modcomp binary representation
-c
-      character*(*) cinbuff, ccvtbuff
-      character*1 type(*)
-      integer*4 ntype(*), num, j, l
-c
-      character*1 null
-      integer*4 kin, kcvt
-c
-      data null /z'00'/
-c
-      kin = 1
-      kcvt = 1
-c     kin, kcvt = position to work in next within cinbuff, ccvtbuff
-c
-      do 90 j = 1, num
-		do 70 l = 1, ntype(j)
-		   if (type(j) .eq. 'i') then
-			ccvtbuff(kcvt:kcvt+1) = cinbuff(kin:kin+1)
-			kin = kin + 2
-			kcvt = kcvt + 2
-		   else if (type(j) .eq. 'b') then
-			kin = kin + 1
-		   else if (type(j) .eq. 's') then
-			ccvtbuff(kcvt:kcvt) = null
-			kcvt = kcvt + 1
-		   else if (type(j) .eq. 'r') then
-			call cvtieeeflt(cinbuff(kin:kin+3),
-     1				        ccvtbuff(kcvt:kcvt+3) )
-			kcvt = kcvt + 4
-			kin = kin + 4
-		   else if (type(j) .eq. 'd') then
-			call cvtieeedbl(cinbuff(kin:kin+7), 
-     1					ccvtbuff(kcvt:kcvt+5) )
-			kcvt = kcvt + 6
-			kin = kin + 8
-		   else if (type(j) .eq. 'c') then
-			ccvtbuff(kcvt:kcvt) = cinbuff(kin:kin)
-			kin = kin + 1
-			kcvt = kcvt + 1
-		   endif
-c
-70		   continue
-c
-90	     continue
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/cvtmoddbl.f unipops-3.6/utilities/conversion/cvtmoddbl.f
--- 3.5/utilities/conversion/cvtmoddbl.f	2000-03-16 11:29:51.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtmoddbl.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,77 +0,0 @@
-      subroutine cvtmoddbl( cmod, cieee)
-c
-c     @(#)cvtmoddbl.f	5.1 06/22/94
-c
-c     Converts input R*6 Modcomp word into its equivalent 8 byte 
-c     IEEE word.  
-c
-c     cieee = (C*8) output IEEE real
-c     cmod = (C*6) input modcomp character string equivalent to modcomp
-c		6-byte double precision word
-c
-c     Modcomp double precision contains a sign bit, a 9 bit exponent, and
-c     a 38 bit mantissa.  For positive values, the representation is
-c     F * 2**(exp-256) where the exponent ranges from 0 to 511 and F is
-c     between 0.5 and 1.  For negative values, the representation is the
-c     two's complement of the absolute value.
-c
-c     IEEE double precision contains a sign bit, 11 bit exponent, and a
-c     52 bit mantissa.  The representation is 1.F * 2**(exp-1023) where the
-c     exponent ranges from 0 to 2047 and F from 0. to 0.9999999.
-c
-c
-      character*8 cieee
-      character*6 cmod
-c
-      dimension ir(2)
-      character*8 cdr
-      real*8 two16, two20, two22, two32, two38, dr, frac, fracieee
-      integer*4 izerosgn, ir, isign, ir2, iexp, ifrac2, ifrac1, 
-     .		iexpieee, ifracieee1, ifracieee2
-c
-      equivalence (dr, ir(1)),(cdr, dr)
-c
-      data two20/1048576./,two32/4294967296./,izerosgn/z'7fffffff'/,
-     1     two16/65536.d0/, two22/4194304.d0/, two38/274877906944.d0/
-c
-      cdr = cmod
-c
-      isign = rshift(ir(1),31)
-      ir(2) = rshift(ir(2),16)
-      if(isign.ne.0) then
-	if(ir(2).eq.0) then
-	   ir(1)=not(ir(1))+1
-        else
-	   ir(2) = not(ir(2)) + 1
-           ir(1) = not(ir(1))
-	endif
-      endif
-      ir2 = and(ir(1),izerosgn)
-      iexp = rshift(ir2, 22) 
-      ifrac1 = ir2 - lshift(iexp, 22)
-      ifrac2 = ir(2)
-      if (ifrac2 .lt. 0) ifrac2 = ifrac2 + two16 + 0.5
-      frac = dble(ifrac1)/two22 + dble(ifrac2)/two38
-c     Get the correct power of two for the exponent and the mantissa
-c
-      if(iexp.eq. 0 .and. frac.eq.0) then
-	iexpieee=0
-	fracieee=0.
-      else
-        iexpieee = iexp + 766
-        fracieee = frac * 2.d0 - 1.
-      endif
-      ifracieee1 = fracieee*two20
-      ifracieee2 = (fracieee*two20 - ifracieee1)*two16
-c     Find IEEE exponent and mantissa.  Calculate the two integer word
-c     representation of the mantissa.  
-c
-      ir(1) = or(lshift(isign,31),or(lshift(iexpieee,20),ifracieee1))
-      ir(2) = lshift(ifracieee2,16)
-c     Pack the bits back into dr ( = ir).  
-c
-      cieee = cdr
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/conversion/cvtmodflt.f unipops-3.6/utilities/conversion/cvtmodflt.f
--- 3.5/utilities/conversion/cvtmodflt.f	2000-03-16 11:29:52.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtmodflt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,59 +0,0 @@
-      subroutine cvtmodflt(cmod, cieee)
-c
-c     @(#)cvtmodflt.f	5.1 06/22/94
-c
-c     Converts Modcomp single precision floating point into IEEE
-c     floating point.
-c
-c     cieee = (C*4) output IEEE real
-c     cmod = (C*4) input modcomp real
-c
-c     Modcomp real contains a sign bit, a 9 bit exponent, and
-c     a 22 bit mantissa.  For positive values, the representation is
-c     F * 2**(exp-256) where the exponent ranges from 0 to 511 and F is
-c     between 0.5 and 1.  For negative values, the representation is the
-c     two's complement of the absolute value.
-c
-c     IEEE real contain a sign bit, 8 bit exponent, and a 23 bit
-c     mantissa.  The representation is 1.F * 2**(exp-127) where exp ranges
-c     from 0 to 255 and F is between 0. and 0.9999999.  
-c
-      character*4 cmod, cieee, cin, cout
-      real*8 two22, two20, two23
-      real*4 frac, rout, rin, fracieee
-      integer*4 ifracieee, iexpieee, iout, iin, ifrac, iexp, ir2, 
-     .		isign, izerosgn
-c
-      equivalence (cin, rin),(cout,rout),(cin,iin),(rout,iout)
-c
-      data two22/4194304.d0/, two20/1048576.d0/, two23/8388608.d0/,
-     1     izerosgn/z'7fffffff'/
-c
-      cin = cmod
-c
-      isign = rshift(iin,31)
-      if(isign.ne.0) iin = not(iin) + 1
-      ir2 = and(iin,izerosgn)
-      iexp = rshift(ir2,22)
-      ifrac = ir2 - lshift(iexp,22)
-      frac = dble(ifrac) / two22
-c
-      iexpieee = iexp - 130
-      fracieee = frac * 2.  - 1.
-      if(iexpieee.ge.255) then
-	iexpieee=254
-	ifracieee=0
-      else if(iexpieee.le.0) then
-	iexpieee=0
-	ifracieee=0
-      else
-        ifracieee = fracieee * two23
-      endif
-c
-      iout = or(lshift(iexpieee,23),ifracieee)
-      iout = or(lshift(isign,31),iout)
-      cieee = cout
-c
-      return
-c
-      end
diff -uNr 3.5/utilities/conversion/cvtmodieee.f unipops-3.6/utilities/conversion/cvtmodieee.f
--- 3.5/utilities/conversion/cvtmodieee.f	2000-03-16 11:29:52.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtmodieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,54 +0,0 @@
-      subroutine cvtmodieee(cinbuff, ccvtbuff, type, ntype, num)
-c
-c     @(#)cvtmodieee.f	5.1 06/22/94
-c
-c     Converts from Modcomp to IEEE binary representation
-c
-      character*(*) cinbuff, ccvtbuff
-      character*1 type(*)
-      integer*4 ntype(*), num, j, l
-c
-      character*1 null
-      integer*4 kin, kcvt
-c
-      data null /z'00'/
-c
-      kin = 1
-      kcvt = 1
-c     kin, kcvt = position to work in next within cinbuff, ccvtbuff
-c
-      do 90 j = 1, num
-		do 70 l = 1, ntype(j)
-		   if (type(j) .eq. 'i') then
-			ccvtbuff(kcvt:kcvt+1) = cinbuff(kin:kin+1)
-			kin = kin + 2
-			kcvt = kcvt + 2
-		   else if (type(j) .eq. 'b') then
-			kin = kin + 1
-		   else if (type(j) .eq. 's') then
-			ccvtbuff(kcvt:kcvt) = null
-			kcvt = kcvt + 1
-		   else if (type(j) .eq. 'r') then
-			call cvtmodflt(cinbuff(kin:kin+3),
-     1				        ccvtbuff(kcvt:kcvt+3) )
-			kcvt = kcvt + 4
-			kin = kin + 4
-		   else if (type(j) .eq. 'd') then
-			call cvtmoddbl(cinbuff(kin:kin+5), 
-     1					ccvtbuff(kcvt:kcvt+7) )
-			kcvt = kcvt + 8
-			kin = kin + 6
-		   else if (type(j) .eq. 'c') then
-			ccvtbuff(kcvt:kcvt) = cinbuff(kin:kin)
-			kin = kin + 1
-			kcvt = kcvt + 1
-		   endif
-c
-70		   continue
-c
-90	     continue
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/cvtpcieee.f unipops-3.6/utilities/conversion/cvtpcieee.f
--- 3.5/utilities/conversion/cvtpcieee.f	2000-03-16 11:29:53.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtpcieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,63 +0,0 @@
-      subroutine cvtpcieee(cinbuff, ccvtbuff, type, ntype, num)
-c
-c     @(#)cvtpcieee.f	5.1 06/22/94
-c
-c     Converts from IEEE to PC binary representation
-c
-      character*(*) cinbuff, ccvtbuff
-      character*1 type(*)
-      integer*4 ntype(*), num
-c
-      character*1 null
-      integer*4 kin, kcvt, j, l
-c
-      data null /z'00'/
-c
-      kin = 1
-      kcvt = 1
-c     kin, kcvt = position to work in next within cinbuff, ccvtbuff
-c
-      do 90 j = 1, num
-		do 70 l = 1, ntype(j)
-		   if (type(j) .eq. 'i') then
-			ccvtbuff(kcvt:kcvt) = cinbuff(kin+1:kin+1)
-			ccvtbuff(kcvt+1:kcvt+1) = cinbuff(kin:kin)
-			kin = kin + 2
-			kcvt = kcvt + 2
-		   else if (type(j) .eq. 'b') then
-			kin = kin + 1
-		   else if (type(j) .eq. 's') then
-			ccvtbuff(kcvt:kcvt) = null
-			kcvt = kcvt + 1
-		   else if (type(j) .eq. 'r') then
-			ccvtbuff(kcvt:kcvt) = cinbuff(kin+3:kin+3)
-			ccvtbuff(kcvt+1:kcvt+1) = cinbuff(kin+2:kin+2)
-			ccvtbuff(kcvt+2:kcvt+2) = cinbuff(kin+1:kin+1)
-			ccvtbuff(kcvt+3:kcvt+3) = cinbuff(kin:kin)
-			kcvt = kcvt + 4
-			kin = kin + 4
-		   else if (type(j) .eq. 'd') then
-			ccvtbuff(kcvt:kcvt) = cinbuff(kin+7:kin+7)
-			ccvtbuff(kcvt+1:kcvt+1) = cinbuff(kin+6:kin+6)
-			ccvtbuff(kcvt+2:kcvt+2) = cinbuff(kin+5:kin+5)
-			ccvtbuff(kcvt+3:kcvt+3) = cinbuff(kin+4:kin+4)
-			ccvtbuff(kcvt+4:kcvt+4) = cinbuff(kin+3:kin+3)
-			ccvtbuff(kcvt+5:kcvt+5) = cinbuff(kin+2:kin+2)
-			ccvtbuff(kcvt+6:kcvt+6) = cinbuff(kin+1:kin+1)
-			ccvtbuff(kcvt+7:kcvt+7) = cinbuff(kin:kin)
-			kcvt = kcvt + 8
-			kin = kin + 8
-		   else if (type(j) .eq. 'c') then
-			ccvtbuff(kcvt:kcvt) = cinbuff(kin:kin)
-			kin = kin + 1
-			kcvt = kcvt + 1
-		   endif
-c
-70		   continue
-c
-90	     continue
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/cvtpdflsdd.c unipops-3.6/utilities/conversion/cvtpdflsdd.c
--- 3.5/utilities/conversion/cvtpdflsdd.c	2000-03-16 11:30:36.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtpdflsdd.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,403 +0,0 @@
-
-/* @(#)cvtpdflsdd.c	5.3 07/08/94 */
-
-/* converts pdfl files into sdd format files */
-
-#include <stdio.h>
-#include <malloc.h>
-#ifdef SOLARIS
-# include <string.h>
-#endif
-
-#define USETUC
-#include <pdfl.h>
-#include <sdd.h>
-#include <tuc_online_sdd.h>
-
-/* This program reads the pdfl file and writes the sdd records */
-/* to stdout.  It will be necessary to run "makeindex.exe" over the resulting */
-/* file to appropriately index it.  The index information contained in the */
-/* pdfl file is totally ignored.  The bootstrap information is not. */
-/* This routine will work on pdfl and gzfl files.  */
-/* It may also work on pkfl files.  */
-/* PDFL files can hold up to 2048 * 2 separate scans in their index. */
-/* The value of nextent in the bootstrap block will determine */
-/* the size of the PDFL file to create.  Enough space will be reserved so */
-/* that the nearest multiple of 1024 larger than nextent * 2 scans */
-/* can be indexed.  If the user wishes the outgoing file to be larger */
-/* an optional parameter equal to the number of index entries to reserve */
-/* in the sdd file can be specified.  */
-
-/* useage is therefore :  cvtpdflsdd pdfl_file [size] > sdd_file */
-
-main(argc, argv)
-int argc;
-char **argv; 
-
-{
-   int size = 1024;
-   int i, j, n, numout, ndbl,isize;
-   int totlen, ndir, extra, nchan, feed, irtn, c3nrch;
-   long int offset, curplace, newplace;
-   double hdrlen, datalen, norchan, *backend;
-   pdfl_bs_block pdflbs;
-   pdfl_index_entry index[MAXENT];
-   old_pdfl_index_entry old_index[MAXENT];
-   pkfl_index_entry pkindex[MAXENT];
-   int indsize;
-   FILE *infile;
-   sdd_bs_block sddbs;
-#define FULL_ARRAY_SIZE ((sizeof(sddformat)/SDDBUFSIZE + 1) * SDDBUFSIZE)
-   double inbuf[FULL_ARRAY_SIZE/sizeof(double)];
-   double outbuf[FULL_ARRAY_SIZE/sizeof(double)];
-   short int shortswap_();
-   double vax2dbl_();
-   char nullc = '\0';
-   void tucconvert_();
-   union {
-      short class_0[16];
-      double d[4];
-   } u;
-
-/*	see if a size is specified on the command line */
-
-   if (argc <= 1 || argc > 3) {
-      fprintf(stderr,"cvtpdflsdd pdfl_file [size] \n"); 
-      fprintf(stderr,"  where size is an optional integer number of index\n");
-      fprintf(stderr,"  entries to create in the output stream.\n");
-      fprintf(stderr,"  The default size is 1024\n");
-      fprintf(stderr,"  The sdd file is written to stdout.\n");
-      exit(1);
-   } else {
-      infile = fopen(*++argv, "r");
-      if (infile == NULL) {
-         fprintf(stderr,"cvtpdflsdd: could not open file %s\n", *argv);
-         exit(1);
-      } 
-   }
-
-   if (argc == 3) {
-      if (sscanf(*++argv,"%i", &size) != 1) {
-         fprintf(stderr,"cvtpdflsdd: invalid argument %s\n", *argv);
-         exit(1);
-      }
-      if (size < 0 ) {
-         fprintf(stderr,"size must be greater than 0\n");
-         exit(1);
-      }
-/*		conver size to correspond to an integer number of */
-/*		SDDBUFSIZE records */
-/*		This assumes that there are an integer number of */
-/*		index entries in each record */
-      size = size * sizeof(sdd_index_entry);
-      size = (size % SDDBUFSIZE) ? (size/SDDBUFSIZE + 1) : (size/SDDBUFSIZE);
-      size = size * SDDBUFSIZE / sizeof(sdd_index_entry);
-   }
-
-/* read in and translate the pdfl bootstrap block */
-
-   if ((n = fread(&pdflbs, sizeof(char), PDBUFSIZE, infile)) != PDBUFSIZE) {
-      if (n == 0) perror("cvtpdflsdd :");
-      fprintf(stderr,"Bad read of pdfl bs block n = %i\n",n);
-      exit(1);
-   }
-   pdflbs.ndir = shortswap_(pdflbs.ndir);
-   pdflbs.maxent = shortswap_(pdflbs.maxent);
-   pdflbs.nextent = shortswap_(pdflbs.nextent);
-   pdflbs.bytperent = shortswap_(pdflbs.bytperent);
-
-/* minimal sanity check, make sure that nextent is not > maxent + 1 */
-/* and that both are positive as is ndir */
-
-   if (pdflbs.ndir < 0 || pdflbs.nextent < 0 || pdflbs.maxent < 0 ||
-       pdflbs.nextent > pdflbs.maxent + 1) {
-      fprintf(stderr,"Bad parameters found in bootstrap block of pdfl file.\n");
-      fprintf(stderr,"  ndir = %i\n", pdflbs.ndir);
-      fprintf(stderr,"  maxent = %i\n", pdflbs.maxent);
-      fprintf(stderr,"  nextent = %i\n", pdflbs.nextent);
-      exit(1);
-   }
-
-/* make up the empty sdd bs block and write it to stdout followed by enough */
-/* null characters for size index entries */
-
-   sddbs.num_data_rec = 0;
-   sddbs.bytperrec = SDDBUFSIZE;
-   sddbs.bytperent = sizeof(sdd_index_entry);
-   sddbs.num_index_rec = size * sddbs.bytperent / SDDBUFSIZE + 1;
-   sddbs.num_entries_used = 0;
-   sddbs.counter = 0;
-   sddbs.typesdd = 0;
-   sddbs.sddversion = 1;
-   for (i=0;i<BSZERO;i++) sddbs.zeros[i] = 0;
-
-   if ((n = fwrite(&sddbs, sizeof(char), SDDBUFSIZE, stdout)) != SDDBUFSIZE) {
-      if (n == 0) perror("cvtpdflsdd :");
-      fprintf(stderr,"Problem writting sdd bootstrap block to stdout.");
-      fprintf(stderr," n = %i\n", n);
-      exit(1);
-   }
-
-   size = size * sddbs.bytperent;
-   for (i=0;i<size;i++) {
-      if ((n = fwrite(&nullc, sizeof(char), 1, stdout)) != 1) {
-         if (n == 0) perror("cvtpdflsdd :");
-         fprintf(stderr,"Problem writting empty sdd index to stdout.");
-         fprintf(stderr," n = %i\n", n);
-         exit(1);
-      }
-   }
-
-/*	read index and translate important parts (block locations) */
-
-   pdflbs.maxent = (pdflbs.maxent > MAXENT) ? MAXENT : pdflbs.maxent;
-
-   if (pdflbs.bytperent == BYTPERENT) {
-      indsize = pdflbs.bytperent;
-      for (i=0;i<pdflbs.maxent;i++) {
-         if ((n = fread(&(index[i]), sizeof(char), indsize, infile)) 
-                    != indsize) {
-            if (n == 0) perror("cvtpdflsdd :");
-            fprintf(stderr,"Problem reading index\n");
-            exit(1);
-         }
-      }
-
-      for (i=0;i<(pdflbs.nextent-1);i++) {
-         index[i].scan_number = longswap_(index[i].scan_number);
-         index[i].blk1 = longswap_(index[i].blk1);
-         index[i].blk2 = longswap_(index[i].blk2);
-         index[i].nblk1 = longswap_(index[i].nblk1);
-         index[i].nblk2 = longswap_(index[i].nblk2);
-         index[i].subscan = shortswap_(index[i].subscan);
-      }
-   } else if (pdflbs.bytperent == sizeof(old_pdfl_index_entry)) {
-      indsize = pdflbs.maxent * pdflbs.bytperent;
-      if ((n = fread(old_index, sizeof(char), indsize, infile)) != indsize) {
-         if (n == 0) perror("cvtpdflsdd :");
-         fprintf(stderr,"Problem reading old style index\n");
-         exit(1);
-      }
-
-      for (i=0;i<(pdflbs.nextent-1);i++) {
-         index[i].scan_number = longswap_(old_index[i].scan_number);
-         index[i].blk1 = longswap_(old_index[i].blk1);
-         index[i].blk2 = longswap_(old_index[i].blk2);
-         index[i].nblk1 = longswap_(old_index[i].nblk1);
-         index[i].nblk2 = longswap_(old_index[i].nblk2);
-         index[i].subscan = 0;
-      }
-   } else if (pdflbs.bytperent == sizeof(pkfl_index_entry)) {
-      indsize = pdflbs.maxent * pdflbs.bytperent;
-      if ((n = fread(pkindex, sizeof(char), indsize, infile)) != indsize) {
-         if (n == 0) perror("cvtpdflsdd :");
-         fprintf(stderr,"Problem reading index\n");
-         exit(1);
-      }
-      for (i=0;i<(pdflbs.nextent-1);i++) {
-         index[i].scan_number = longswap_(pkindex[i].scan_number);
-         index[i].blk1 = shortswap_(pkindex[i].blk);
-         index[i].nblk1 = shortswap_(pkindex[i].nblk);
-         index[i].blk2 = 0;
-         index[i].nblk2 = 0;
-         index[i].subscan = 0;
-      }
-   } else {
-      fprintf(stderr,"Unrecognized index format in input file\n");
-      exit(1);
-   }
-
-
-/* loop through index */
-
-   size = size / sddbs.bytperent;
-   numout = 0;
-
-/* begin converting it */
-
-   fprintf(stderr,"  Begin conversion of %i index entries.\n", 
-                  (pdflbs.nextent-1));
-
-   for (i=0;i<(pdflbs.nextent-1);i++) {
-
-      if (index[i].blk1 > 0) {
-
-/*	seek to blk1 */
-
-         curplace = ftell(infile);
-         newplace = PDBUFSIZE * (index[i].blk1 - 1);
-         offset = newplace - curplace;
-         if (fseek(infile, offset, 1) < 0) {
-          fprintf(stderr,"Error finding start of data indexed by entry %i\n",i);
-          fprintf(stderr,"   scan %i, start at block %i\n",
-                          index[i].scan_number, index[i].blk1);
-          fprintf(stderr,"   attempting to skip this one\n");
-          continue;
-         }
-
-/*	read it  */
-
-         isize = PDBUFSIZE * index[i].nblk1;
-         if (isize > sizeof(inbuf)) {
-            fprintf(stderr,"Scan number %i, subscan %i, is too large, ",
-                           index[i].scan_number, index[i].subscan);
-            fprintf(stderr,"it will be truncated at %i data points\n", 
-                           MAX_DATA_POINTS);
-            isize = sizeof(inbuf);
-         }
-         if ((n = fread(inbuf, sizeof(char), isize, infile)) != isize) {
-            fprintf(stderr," Bad read of indexed data entry %i\n",i);
-            fprintf(stderr," Read returned %i bytes instead of %i",n,isize);
-            fprintf(stderr," Scan number %i\n", index[i].scan_number);
-            fprintf(stderr," Subscan number %\n", index[i].subscan);
-            fprintf(stderr," skipping\n");
-            continue;
-         }
-
-/*	Ok, now convert it  */
-
-         u.d[0] = inbuf[0];
-         c3nrch = shortswap_(u.class_0[3]) + 3;
-         norchan = vax2dbl_(&(inbuf[c3nrch - 1]));
-         nchan = norchan;
-         if (nchan <= 0) nchan = 1;
-
-         for (j=0;j<nchan;j++) {
-
-/*	copy inbuf to outbuf  */
-
-#ifdef SOLARIS
-            memcpy(outbuf, inbuf, FULL_ARRAY_SIZE);
-#else
-            bcopy(inbuf, outbuf, FULL_ARRAY_SIZE);
-#endif
-
-            if (index[i].subscan != 0) {
-/*			it's the new index, no need to be fancy here */
-               feed = index[i].subscan + j;
-            } else {
-/*			is this a HySpec data set */ 
-               backend = outbuf + 16;
-               if (strncmp((char *)backend, "HySpec", 6) == 0) {
-   	          feed = j + 11;
-               } else {
-                  feed = j + 1;
-               }
-            }
-
-            size = FULL_ARRAY_SIZE;
-            tucconvert_(outbuf, &feed, &size, &irtn);
-
-            if (irtn != 0) {
-               fprintf(stderr,"Error during conversion\n");
-               fprintf(stderr,"Will attempt to go on\n");
-               break;
-            }
-
-/*	write it to stdout  */
-
-            hdrlen  = outbuf[4];
-            datalen = outbuf[5];
-            totlen = hdrlen + datalen;
-            ndir = ((totlen % SDDBUFSIZE) == 0) ? totlen / SDDBUFSIZE :
-                                                  totlen / SDDBUFSIZE + 1;
- 
-            if ((n= fwrite(outbuf, sizeof(char), ndir*SDDBUFSIZE, stdout)) !=
-                       ndir*SDDBUFSIZE) {
-               fprintf(stderr,"Problems writing to scan to stdout\n");
-               fprintf(stderr,"After %i scans successfully converted", numout);
-               fprintf(stderr,"Write of %i bytes expected, only wrote %i bytes",
-                         ndir*SDDBUFSIZE, n);
-               exit(1);
-            }
-
-            numout++;
-         }
-      }
-
-      if (index[i].blk2 > 0) {
-
-/*	seek to blk1 */
-
-         curplace = ftell(infile);
-         newplace = PDBUFSIZE * (index[i].blk2 - 1);
-         offset = newplace - curplace;
-         if (fseek(infile, offset, 1) < 0) {
-          fprintf(stderr,"Error finding start of data indexed by entry %i\n",i);
-          fprintf(stderr,"   scan %i, start at block %i\n",
-                          (index[i].scan_number+1), index[i].blk2);
-          fprintf(stderr,"   attempting to skip this one\n");
-          continue;
-         }
-
-/*	read it  */
-
-         isize = PDBUFSIZE * index[i].nblk2;
-         if (isize > sizeof(inbuf)) {
-            fprintf(stderr,"Scan number %i, is too large, ",
-                           index[i].scan_number);
-            fprintf(stderr,"it will be truncated at %i data points\n", 			  MAX_DATA_POINTS);
-            isize = sizeof(inbuf);
-         }
-         if ((n = fread(inbuf, sizeof(char), isize, infile)) != isize) {
-            fprintf(stderr," Bad read of indexed data entry %i\n",i);
-            fprintf(stderr," Read returned %i bytes instead of %i",n,isize);
-            fprintf(stderr," Scan number %i\n", (index[i].scan_number+1));
-            fprintf(stderr," skipping\n");
-            continue;
-         }
-
-/*	Ok, now convert it  */
-
-         u.d[0] = inbuf[0];
-         c3nrch = shortswap_(u.class_0[3]) + 3;
-         norchan = vax2dbl_(&(inbuf[c3nrch - 1]));
-         nchan = norchan;
-         if (nchan <= 0) nchan = 1;
-
-         for (j=0;j<nchan;j++) {
-
-/*	copy inbuf to outbuf  */
-
-#ifdef SOLARIS
-            memcpy(outbuf, inbuf, FULL_ARRAY_SIZE);
-#else
-            bcopy(inbuf, outbuf, FULL_ARRAY_SIZE);
-#endif
-            feed = j + 1;
-            size = FULL_ARRAY_SIZE;
-            tucconvert_(outbuf, &feed, &size, &irtn);
-
-            if (irtn != 0) {
-               fprintf(stderr,"Error during conversion\n");
-               fprintf(stderr,"Will attempt to go on\n");
-               break;
-            }
-
-/*	write it to stdout  */
-
-            hdrlen  = outbuf[4];
-            datalen = outbuf[5];
-            totlen = hdrlen + datalen;
-            ndir = ((totlen % SDDBUFSIZE) == 0) ? totlen / SDDBUFSIZE :
-                                                  totlen / SDDBUFSIZE + 1;
- 
-            if ((n= fwrite(outbuf, sizeof(char), ndir*SDDBUFSIZE, stdout)) !=
-                       ndir*SDDBUFSIZE) {
-               fprintf(stderr,"Problems writing scan to stdout\n");
-               fprintf(stderr,"After %i scans successfully converted", numout);
-               fprintf(stderr,"Write of %i bytes expected, only wrote %i bytes",
-                         ndir*SDDBUFSIZE, n);
-               exit(1);
-            }
-
-            numout++;
-         }
-      }
-   }
-
-/*	all finished	*/
-
-   fprintf(stderr,"   Finished ... %i scans written.\n", numout);
-   exit(0);
-}
diff -uNr 3.5/utilities/conversion/cvtsddieee.c unipops-3.6/utilities/conversion/cvtsddieee.c
--- 3.5/utilities/conversion/cvtsddieee.c	2000-03-16 11:29:53.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvtsddieee.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,515 +0,0 @@
-
-/*   @(#)cvtsddieee.c	5.1 06/22/94   */
-
-#include <string.h>
-#include <math.h>
-#include <140.h> 
-#define USEPAD
-#include <sdd.h>
-
-#define NINT(a)		((a) - floor(a) >= 0.5 ? ceil(a) : floor(a))
-
-/*
-lcvtsddieee takes an input structure of the sddformat format and
-turns it into a structure of the Line140 format
-*/
-void lcvtsddieee_(istruct,ostruct,ind,errcode)
-	sddformat *istruct;
-	Line140 *ostruct;
-	int *ind, *errcode;  /*  *ind is always 1   */ 
-
-{
-#define in istruct->header 
-#define out ostruct->hdr
-
-/* Constants */ 
-
-        double pi = 3.141592654; 
-	double lat140 = pi *38.43679111 / 180.;
-
-/* Variables */  
- 
-	int i,j,k;
-	int idayofyear,iday,imonth, iyear;
-	char s[16];
-	double hour_angle, elevation, day, est, tjd;
-	extern double jdtodate(); 
-        extern int dayofyear(); 
-        extern double jd(); 
-       
-/* Header and data lengths */
-
-        out.istart[*ind-1] = 1;  
-        out.istop[*ind-1] = (in.data_length/4);  
-	if ( (in.data_length/4) > 1024.) out.istop[*ind-1] = 1024;
-
-/* Basic information */
-
-	out.scan_number = in.scan_number; 
-        out.observer_number = atoi(in.observer_initials);
-	for (i=0;i<14;i++) out.observer_name[i] = in.observer_name[i]; 
-        for (i=0;i<4;i++) out.observer_name[i+14] = in.project_ident[i]; 
-  
-        for (i=0;i<8;i++) s[i] = in.telescope[i]; 
-        if (strncmp(s,"NRAO 43M",8) == 0) 
-		out.telescope = 140;
-        else if (strncmp(s,"NRAO 93M",8) == 0) 
-		out.telescope = 300;
-        else {
-		*errcode = 3; return;
-	} 
-
-	for(i=0;i<12;i++) out.source_name[i] = in.source_name[i]; 
-       
-        for (i=0;i<8;i++) s[i] = in.type_data[i];
-        if (strncmp(s,"LINETLPW",8) == 0){
-           out.observing_program = 2;
-           out.scan_type = 0; 
-        }  
-        else if (strncmp(s,"LINEFQSW",8) == 0) {
-           out.observing_program = 1;
-           out.scan_type = 2;
-        }
-        else if (strncmp(s,"LINEBMSW",8) == 0) {
-           out.observing_program = 1;
-           out.scan_type = 2;
-	}
-        else if (strncmp(s,"LINETPOF",8) == 0) {
-           out.observing_program = 2;
-           out.scan_type = 0;
-	}
-        else if (strncmp(s,"LINETPON",8) == 0) {
-           out.observing_program = 2;
-           out.scan_type = 1;
-	}
-        else {
-	   *errcode = 4; return;
-	}  
-   
-        for (i=0;i<8;i++) s[i] = in.back_end_desc[i];
-        if (strncmp(s,"SPECPROC",8) == 0) 
-	    out.observing_program = out.observing_program + 3;
-	 
-/* Pointing parameters */ 
-
-        out.ra_pointing_fudge = in.user_azra_pointing/15; 
-        out.dec_pointing_fudge = in.user_eldec_pointing;
-        out.pvls_p1 = in.pointing_constant[0];
-        out.pvls_p2 = in.pointing_constant[1];  
-        out.pvls_p3 = in.pointing_constant[2]; 
-        out.orientation = (pi*in.orient_angle)/180; 
-        out.focus = in.radial_focus; 
-
-/* Observing parameters */
- 
-        iyear = in.ut_date; 
-        imonth = (in.ut_date - iyear)*100; 
-        day = ((in.ut_date - iyear)*100 - imonth)*100; 
-        iday = NINT(day); 
-        jd_(&iyear,&imonth,&iday,&tjd);
-	tjd += in.utime / 24.;
-        out.julian_date = tjd - 2400000.; 
-        tjd -= 5./24.;  
-        est = in.utime - 5.0; 
-        if( est < 0.0)  est += 24.0; 
-	jdtodate_(&tjd,&iyear,&imonth,&day);
-        out.day = day; 
-        iday = day;  
-        out.month = imonth; 
-        out.year = iyear - 1900;     
-        dayofyear_(&iyear,&imonth,&iday,&idayofyear); 
-        out.day_of_year = idayofyear; 
-        out.est = (est*pi*15)/180; 
-        out.lst = (in.lst*pi*15)/180;  
-        out.integration_time = in.length_sample; 
- 
-        if ((in.deltax_rate == 0) && (in.deltay_rate == 0))      
-            out.scan_direction = 0; 
-        else if (in.deltax_rate > 0) 
-            out.scan_direction = 1;
-        else if (in.deltax_rate < 0) 
-            out.scan_direction = -1;
-        else if (in.deltay_rate > 0) 
-            out.scan_direction = 2;
-        else out.scan_direction = -2; 
-
-        out.mode = 1; 
-        out.irec = 1;
-        out.lrec = 1;
-        out.incr = 1;
-
-/* Positions */  
-   
-        out.epoch_of_obs = in.epoch;
-        out.obs_h[*ind-1] = (pi*in.sourcex)/180;
-        out.obs_v[*ind-1] = (pi*in.sourcey)/180;  
-        out.epoch_ra[*ind-1] = (pi*in.epoch_ra)/180;
-        out.epoch_dec[*ind-1] = (pi*in.epoch_dec)/180;
-        out.gal_l[*ind-1] = (pi*in.galactic_l)/180;
-        out.gal_b[*ind-1] = (pi*in.galactic_b)/180;
-        out.ra_ind = (pi*in.xposition)/180;
-        out.dec_ind = (pi*in.yposition)/180;
-	for (i=0;i<3;i++) out.descriptive_origin[i] = in.desc_origin[i];
-        out.zenith_distance = pi*(90.-in.elevation)/180.;    
-
-        hour_angle = pi + atan2(sin(pi*in.azimuth/180), 
-	    sin(lat140)*cos(pi*in.azimuth/180) - tan(pi*in.elevation/180)*cos(lat140) ); 
-        out.app_ra[*ind-1] = out.lst - hour_angle;
-	if (out.app_ra[*ind-1] < 0) 
-	    out.app_ra[*ind-1] += 2*pi;
-	else if (out.app_ra[*ind-1] >= 2*pi)
-	    out.app_ra[*ind-1] -= 2*pi;
-        out.app_dec[*ind-1] = asin( sin(pi*in.elevation/180)*sin(lat140) +
-	    cos(pi*in.elevation/180)*cos(lat140)*cos(pi*in.azimuth/180) ); 
-
-        for (i=0;i<8;i++) s[i] = in.coord_sys_code[i];
-        if (strncmp(s,"        ",8) == 0) 
-		out.position_code = 0;
-        else if (strncmp(s,"APPHADC ",8) == 0) 
-		out.position_code = 1;
-        else if (strncmp(s,"EPOCRADC",8) == 0) 
-		out.position_code = 2;
-        else if (strncmp(s,"APPRADC ",8) == 0) 
-		out.position_code = 3;
-        else if (strncmp(s,"GALACTIC",8) == 0) 
-		out.position_code = 4;
-        else if (strncmp(s,"AZEL    ",8) == 0) 
-		out.position_code = 5;
-        else if (strncmp(s,"USERDEF ",8) == 0) 
-		out.position_code = 6;
-        else {
-		*errcode = 5; return;
-	}    
-
-/* Environment */
-
-        out.environment_values_1[0] = 128*in.amb_temp; 
-        out.environment_values_2[2] = 12.8*in.pressure;
-        out.environment_values_2[0] = 128*in.dew_point;
- 
-/* Map parameters */
-
-        out.h_coord_rate = (pi*in.deltax_rate)/(180*60); 
-        out.v_coord_rate = (pi*in.deltay_rate)/(180*60); 
- 
-/* Data parameters */
-
-        out.off_scan_number = in.off_scan_nb;
-        out.center_vel[*ind-1] = in.velocity_ref; 
-        out.rvsys[*ind-1] = in.velocity_correct;  
-
-        for(i=0;i<4;i++) s[i] = in.velocity_def_ref[i]; 
-        if (strncmp(s,"RADI",4) == 0) 
-		out.vdef = 1;
-        else if (strncmp(s,"OPTL",4) == 0) 
-		out.vdef = 2;
-        else if (strncmp(s,"REVL",4) == 0) 
-		out.vdef = 3;
-        else {
-		*errcode = 6; return;
-	} 
-
-        for (i=0;i<4;i++) s[i] = in.velocity_def_ref[i+4];   
-        if (strncmp(s,"OBS ",4) == 0) 
-		out.vref = 1;
-        else if (strncmp(s,"LSR ",4) == 0) 
-		out.vref = 2;
-        else if (strncmp(s,"HELO",4) == 0) 
-		out.vref = 3; 
-        else if (strncmp(s,"EART",4) == 0) 
-		out.vref = 4; 
-        else {
-		*errcode = 7; return;
-	} 
- 
-/* Telescope dependent parameters */
-
-	out.l1 = in.l1;
-	out.l1f1 = in.l1f1;
-	out.l1f2 = in.l1f2;
-	out.l2 = in.l2;
-	out.l2f1 = in.l2f1;
-	out.l2f2 = in.l2f2;
-	out.la = in.la;
-	out.lb =  in.lb;
-	out.lc = in.lc;
-	out.ld = in.ld; 
-        out.rho[*ind-1] = (pi*in.rho)/180;
-        out.theta[*ind-1] = (pi*in.theta)/180;
-	if (in.center_freq_formula[22] == 'L')
-	{   
-	   for (i=6;i<24;i++) 
-              out.c_f_formula[*ind-1][i-6] = in.center_freq_formula[i]; 
-	}
-	else
-	{
-	   for (i=0;i<16;i++) 
-              out.c_f_formula[*ind-1][i+2] = in.center_freq_formula[i]; 
-	}
-
-/* Receiver descriptor block */
- 
-        out.center_freq[*ind-1] = in.obs_freq;
-        out.rest_freq[*ind-1] = in.rest_freq; 
-        out.bandwidth[*ind-1] = in.bandwidth;
-        out.noise_tube[*ind-1] = in.calibration_temp;
-        out.sig_system_temp[*ind-1] = in.source_syst_temp;
-        out.ref_sys_temp[*ind-1] = in.ref_sys_temp; 
-        out.theoretical_rms[*ind-1] = in.std_deviation_mean;
-        out.center_vel[*ind-1] = in.xvalue_ref_pt;
-        out.delta_vel[*ind-1] = in.deltax;
-        out.scan_duration = in.tot_integ_time;
-        out.zenith_opacity = in.h2o_opacity; 
-        out.integration[*ind-1] = in.effint;
- 
-/*  Data  */
-
-	j = out.istart[*ind-1] - 1; 
-	for (i=0;i< (out.istop[*ind-1] - out.istart[*ind-1] + 1);i++) 
-            ostruct->signal[j++] = istruct->data[i];
-
-/* End of conversion */
-	*errcode=0;
-	return;
-}
-/*
-ccvtsddieee takes an input structure of the sddformat format and
-turns it into a structure of the Cont140 format
-*/
-void ccvtsddieee_(istruct,ostruct,ind,errcode)
-	sddformat *istruct;
-	Cont140 *ostruct;
-	int *ind, *errcode;  /*  *ind is always 1   */ 
-
-{
-#define in istruct->header 
-#define out ostruct->hdr
-
-/* Constants */ 
-
-        double pi = 3.141592654; 
-	double lat140 = pi *38.43679111 / 180.;
-
-/* Variables */  
- 
-	int i,j,k;
-	int idayofyear,iday,imonth, iyear;
-	char s[16];
-	double hour_angle, elevation, day, est, tjd;
-	extern double jdtodate(); 
-        extern int dayofyear(); 
-        extern double jd(); 
-       
-/* Header and data lengths */
-
-        out.start = 1;  
-        out.stop = (in.data_length/4);  
-	if ( (in.data_length/4) > 1193.) out.stop = 1193;
-
-/* Basic information */
-
-	out.scan_number = in.scan_number; 
-        out.observer_number = atoi(in.observer_initials);
-	for (i=0;i<14;i++) out.observer_name[i] = in.observer_name[i]; 
-        for (i=0;i<4;i++) out.observer_name[i+14] = in.project_ident[i]; 
-  
-        for (i=0;i<8;i++) s[i] = in.telescope[i]; 
-        if (strncmp(s,"NRAO 43M",8) == 0) 
-		out.telescope = 140;
-        else if (strncmp(s,"NRAO 93M",8) == 0) 
-		out.telescope = 300;
-        else {
-		*errcode = 3; return;
-	} 
-
-	for(i=0;i<12;i++) out.source_name[i] = in.source_name[i]; 
-       
-        for (i=0;i<8;i++) s[i] = in.back_end_desc[i];
-        if (strncmp(s,"STD A/D ",8) == 0) {
-           for (i=0;i<8;i++) s[i] = in.type_data[i];
-           if (strncmp(s,"CONTNOCL",8) == 0) {
-              if ((in.deltax_rate == 0) && (in.deltay_rate == 0)) {     
-                 out.observing_program = 3;
-                 out.scan_type = 0;   
-	      } 
-	      else {
-                 out.observing_program = 3;
-                 out.scan_type = 4;  
-	      } 
-	   }
-           else if (strncmp(s,"CONTPLCL",8) == 0) {
-              out.observing_program = 3;
-              out.scan_type = 1;
-	   }
-           else if (strncmp(s,"CONTCAL ",8) == 0) {
-              out.observing_program = 3;
-              out.scan_type = 2;
-	   }
-           else if (strncmp(s,"CONTONOF",8) == 0) {
-              out.observing_program = 4;
-              out.scan_type = 3;
-	   }
-           else {
-	      *errcode = 4; return;
-	   }  
-        }  
-        else if (strncmp(s,"DIGITAL ",8) == 0){
-           out.observing_program = 8;
-           out.scan_type = 0;   
-        }  
-        else {*errcode = 1; return;}  
-
-   
-/* Pointing parameters */ 
-
-        out.ra_pointing_fudge = in.user_azra_pointing/15; 
-        out.dec_pointing_fudge = in.user_eldec_pointing;
-        out.pvls_p1 = in.pointing_constant[0];
-        out.pvls_p2 = in.pointing_constant[1];  
-        out.pvls_p3 = in.pointing_constant[2]; 
-        out.orientation = (pi*in.orient_angle)/180; 
-        out.focus = in.radial_focus; 
-
-/* Observing parameters */
- 
-        iyear = in.ut_date; 
-        imonth = (in.ut_date - iyear)*100; 
-        day = ((in.ut_date - iyear)*100 - imonth)*100; 
-        iday = NINT(day); 
-        jd_(&iyear,&imonth,&iday,&tjd);
-	tjd += in.utime / 24.;
-        out.julian_date = tjd - 2400000.; 
-        tjd -= 5./24.;  
-        est = in.utime - 5.0; 
-        if( est < 0.0)  est += 24.0; 
-	jdtodate_(&tjd,&iyear,&imonth,&day);
-        out.day = day; 
-        iday = day;  
-        out.month = imonth; 
-        out.year = iyear - 1900;     
-        dayofyear_(&iyear,&imonth,&iday,&idayofyear); 
-        out.day_of_year = idayofyear; 
-        out.est = (est*pi*15)/180; 
-        out.lst = (in.lst*pi*15)/180;  
-        out.sample_rate = in.tot_integ_time; 
- 
-        if ((in.deltax_rate == 0) && (in.deltay_rate == 0))      
-            out.scan_direction = 0; 
-        else if (in.deltax_rate > 0) 
-            out.scan_direction = 1;
-        else if (in.deltax_rate < 0) 
-            out.scan_direction = -1;
-        else if (in.deltay_rate > 0) 
-            out.scan_direction = 2;
-        else out.scan_direction = -2; 
-
-        out.mode = 1; 
-        out.first_channel = 1;
-        out.number_of_channels = 1;
-        out.samples_per_record = 1;
-
-/* Positions */  
-   
-        out.epoch_of_obs = in.epoch;
-        out.epoch_ra = (pi*in.epoch_ra)/180;
-        out.epoch_dec = (pi*in.epoch_dec)/180;
-        out.gal_l = (pi*in.galactic_l)/180;
-        out.gal_b = (pi*in.galactic_b)/180;
-        out.ra_ind = (pi*in.xposition)/180;
-        out.dec_ind = (pi*in.yposition)/180;
-        out.azimuth = (pi*in.azimuth)/180;
-        out.elevation = (pi*in.elevation)/180; 
-	for (i=0;i<3;i++) out.descriptive_origin[i] = in.desc_origin[i];
-        out.zenith_distance = pi*(90.-in.elevation)/180.;    
-	out.horizontal_desc = (pi*in.sourcex)/180;
-	out.vertical_desc = (pi*in.sourcey)/180;
-
-        hour_angle = pi + atan2(sin(pi*in.azimuth/180), 
-	    sin(lat140)*cos(pi*in.azimuth/180) - tan(pi*in.elevation/180)*cos(lat140) ); 
-        out.app_ra = out.lst - hour_angle;
-	if (out.app_ra < 0) 
-	    out.app_ra += 2*pi;
-	else if (out.app_ra >= 2*pi)
-	    out.app_ra -= 2*pi;
-        out.app_dec = asin( sin(pi*in.elevation/180)*sin(lat140) +
-	    cos(pi*in.elevation/180)*cos(lat140)*cos(pi*in.azimuth/180) ); 
-
-        for (i=0;i<8;i++) s[i] = in.coord_sys_code[i];
-        if (strncmp(s,"        ",8) == 0)
-		out.position_code = 0;
-        else if (strncmp(s,"APPHADC ",8) == 0)
-		out.position_code = 1;
-        else if (strncmp(s,"EPOCRADC",8) == 0)
-		out.position_code = 2;
-        else if (strncmp(s,"APPRADC ",8) == 0)
-		out.position_code = 3;
-        else if (strncmp(s,"GALACTIC",8) == 0)
-		out.position_code = 4;
-        else if (strncmp(s,"AZEL    ",8) == 0)
-		out.position_code = 5;
-        else if (strncmp(s,"USERDEF ",8) == 0)
-		out.position_code = 6;
-        else {
-		*errcode = 5; return;
-	}    
-
-/* Environment */
-
-        out.environment_values_1[0] = 128*in.amb_temp; 
-        out.environment_values_2[2] = 12.8*in.pressure;
-        out.environment_values_2[0] = 128*in.dew_point;
- 
-/* Map parameters */
-
-        out.h_coord_rate = (pi*in.deltax_rate)/(180*60); 
-        out.v_coord_rate = (pi*in.deltay_rate)/(180*60); 
-  
-/* Telescope dependent parameters */
-
-        out.rho = (pi*in.rho)/180;
-        out.theta = (pi*in.theta)/180;
-
-/* Receiver descriptor block */
- 
-        out.DCR_scale_factor = in.freq_resolution;
-        out.noise_tube = in.calibration_temp;
-        out.DCR_system_temp = in.source_syst_temp;
-        out.zenith_opacity = in.h2o_opacity; 
- 
-/*  Data  */
-
-	j = out.start - 1; 
-	for (i=0;i< (out.stop - out.start + 1);i++) 
-           out.signal[j++] = istruct->data[i];
-
-
-/* End of conversion */
-	*errcode=0;
-	return;
-}
-/*
-Lineorcont takes an input structure of the sddformat format and
-checks whether it is a line or continuum structure
-*/
-void lineorcont_(istruct,retncode)
-
-	sddformat *istruct;
-	int *retncode;  
-
-{
-#define in istruct->header 
-
-	int i;
-	char s[4];
-
-        for (i=0;i<4;i++) s[i] = in.type_data[i];
-
-        if (strncmp(s,"CONT",4) == 0)
-           *retncode = 0;
-        else if (strncmp(s,"LINE",4) == 0)
-           *retncode = 1;
-        else *retncode = -1;
-
-	return;  
-}
-
diff -uNr 3.5/utilities/conversion/cvttele.inc unipops-3.6/utilities/conversion/cvttele.inc
--- 3.5/utilities/conversion/cvttele.inc	2000-03-16 11:29:47.000000000 -0700
+++ unipops-3.6/utilities/conversion/cvttele.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,82 +0,0 @@
-c     CVTELE.INC
-c
-c     @(#)cvttele.inc	5.1 06/22/94
-c
-c     Used by the routines for converting between a telescope tape and
-c     the IEEE KEEP format.
-c
-      character*9600 cinbuff
-      character*9600 ccvtbuff
-      character*5120 coutbuff(18)
-c
-      integer*2 ioutbuff(2560,18), iinbuff(4800), icvtbuff(4608)
-      real routbuff(1280,18), rinbuff(2400), rcvtbuff(2304)
-      double precision doutbuff(640,18), dinbuff(1200), dcvtbuff(1152)
-      integer*2 lsno, ktos, kstc, kmd, kir, klr, kin, kst, ksp, lstm, 
-     .		lsrt, lstp, lint, ltrf, lss, lrs, ktosin, lrho, lthe, 
-     .		lnt, lscle, lstm2, kdb, kstart, kstop, kmpst, kmpstp, 
-     .		kfeed, lrhoout, ltheout, lntout, lscleout, lstm2out, 
-     .		ldbout, lrms
-c
-c     *inbuff = input record (Modcomp binary)
-c     *cvtbuff = binary converted input record.  Some items are
-c		 skipped over in inbuff to create cvtbuff.
-c     *outbuff = averaged records.  Sig and Ref are combined in outbuff for
-c		 Spectral line scans or data are added together for continuum
-c		 scans.  It is the output buffer
-c     Four versions of the these arrays exist: Char, Int, Real., D Prec.
-c
-      integer*2 outbuffsize, cinbuffsize, linbuffsize
-c
-      common /editor/ coutbuff, ccvtbuff, cinbuff
-c
-      equivalence (cinbuff, iinbuff), (cinbuff, rinbuff)
-      equivalence (rinbuff, dinbuff)
-      equivalence (ccvtbuff, icvtbuff), (ccvtbuff, rcvtbuff)
-      equivalence (rcvtbuff, dcvtbuff)
-      equivalence (coutbuff, ioutbuff), (coutbuff, routbuff)
-      equivalence (routbuff, doutbuff)
-c
-      data outbuffsize/5120/, linbuffsize/9600/, cinbuffsize/4800/
-c     Record sizes of the two types of input arrays and the output arrays
-c
-c     Below are the locations in the various buffers of the necessary header
-c     words.
-c     k... = integer words, l... = real words.
-c     Items described with a star after their names are one less than
-c	the actual values.
-c
-      data lsno/ 1/, ktos/34/, kstc/35/, kmd/36/, kir/37/, klr/38/,
-     1     kin /39/
-c     Locations in cvtbuff and outbuff where necessary items are contained. 
-c     These are common to both line and continuum records.
-c     lsno = scan no.      ktos = obs. program     kstc = scan type
-c     kmd = MODE           kir = IREC              klr = LREC
-c     kin = INCR (spectral line)  or Samples/record (cont)
-c 
-      data kst /39/, ksp /43/, lstm/27/, lsrt/29/, lstp/97/,
-     1     lint/113/, ltrf/232/, lss/256/, lrs/1280/, lrms/121/
-c     Location in cvtbuff of items specific to line records.  Except for
-c     LRS, these are common to line outbuff too.
-c     kst* = ISTART(4)	   ksp* = ISTOP(4)
-c     lstm = scan duration lsrt = int. time	   lstp* = Sig.Sys.temp.(4)
-c     lint* = int time(4)  tref* = Ref.Sys.temp(4) lss* = Sig. Spec values
-c     lrs* = Ref. Spec values  lrms* = rms values
-c
-      data ktosin/34/
-c     Locations in inbuff.   ktosin = obs. program
-c
-      data lrho/63/,lthe/71/, lnt/79/, lscle/87/, lstm2/91/, kdb/198/,
-     1     kstart/40/, kstop/41/, kmpst/42/, kmpstp/43/, kfeed/53/
-c     Locations in cvtbuff specific to continuum records.  
-c     lrho* = RHO value       lthe*, = THETA     lnt* = Noise Tube 
-c     lscle* = scale factor   lstm2* = DCR Sys temp.
-c     kdb* = start data point  kstart = START    kstop = STOP
-c     kmpst = map start       kmpstp = map stop
-c     kfeed = feed number 
-c
-      data lrhoout/64/,ltheout/65/,lntout/66/,lscleout/67/,lstm2out/68/,
-     1     ldbout/87/
-c     lrhoout = RHO        ltheout = THETA    lntout = Noise Tube
-c     lstm2out = Sys Temp  lscleout = Scale Factor 
-c     ldbout* = starting data point
diff -uNr 3.5/utilities/conversion/dayofyear.f unipops-3.6/utilities/conversion/dayofyear.f
--- 3.5/utilities/conversion/dayofyear.f	2000-03-16 11:29:48.000000000 -0700
+++ unipops-3.6/utilities/conversion/dayofyear.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      subroutine dayofyear(iyear, imth, iday, idoy)
-c
-c     @(#)dayofyear.f	5.1 06/22/94
-c
-c     Calculates day of the year from month (IMTH) and day (IDAY)
-c
-c     iyear = (I*4) Year (needed to check for leap year (bissextile year)
-c     imth = (I*4) Month number
-c     iday = (I*4) Day number
-c     idoy = (I*4) day of year number generated
-c
-      integer*4 imth, iday, idoy, iyear, i1
-      double precision  jdate, jnewyear, tjd
-c 
-      data i1/1/
-c
-      call checkdate(iyear,imth,iday,0,0,0) 
-c 
-      call jd(iyear, imth, iday, tjd) 
-      jdate = tjd 
-      call jd(iyear, i1, i1,tjd)  
-      jnewyear = tjd
-c
-      idoy = jdate - jnewyear + 1 
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/conversion/getsprec.c unipops-3.6/utilities/conversion/getsprec.c
--- 3.5/utilities/conversion/getsprec.c	2000-03-16 11:30:02.000000000 -0700
+++ unipops-3.6/utilities/conversion/getsprec.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-
-/* @(#)getsprec.c	5.1 06/22/94 */
-
-/* Stubbed version of getsprec_() */
-/*   Used during linking by utilities using lconversion that do not have */
-/*   access to the online gb data */
-
-void getsprec_(buffer, ind, phase, rec, errcode)
-/*		buffer is really an sddformat struct, but isn't used here */
-int *buffer, *ind, *phase, *rec, *errcode;
-{
-/*		just return a non-zero errcode */
-   *errcode = 1;
-}
diff -uNr 3.5/utilities/conversion/ieee2ascii.c unipops-3.6/utilities/conversion/ieee2ascii.c
--- 3.5/utilities/conversion/ieee2ascii.c	2000-03-16 11:30:27.000000000 -0700
+++ unipops-3.6/utilities/conversion/ieee2ascii.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,385 +0,0 @@
-/*  @(#)ieee2ascii.c	5.1 06/22/94
-** program to print converted telescope tape
-*/
-
-#include <stdio.h>
-#include <math.h>
-
-/*
-** Structure for converted telescope tape format:
-**   Continuum Data 
-** Record length in bytes:  5120
-*/
-typedef struct telescope_tape_cont
-	{
-		float    f_01[2];
-		char     c_02[12];
-		short    i_03;
-		char     c_04[18];
-		double   d_05;
-		short    i_06[4];
-		float    f_07[2];
-		short    i_08[12];
-		float    f_09;
-		short    i_10[8];
-		float    f_11[22];
-		short    i_12[8];
-		float    f_13[15];
-		short    i_14[2];
-		float    f_15[18];
-		float    f_16[1193];
-	}  Tfcont;
-
-/*
-** Structure for converted telescope tape format:
-**   Spectral Line Data - 140 or 300 Foot
-** Record length in bytes:  5120
-*/
-typedef struct telescope_tape_line
-	{
-		float    f_01[2];
-		char     c_02[12];
-		short    i_03;
-		char     c_04[18];
-		double   d_05;
-		short    i_06[4];
-		float    f_07[2];
-		short    i_08[20];
-		float    f_09;
-		short    i_10[2];
-		float    f_11[21];
-		short    i_12[8];
-		float    f_13[72];
-		short    i_14[2];
-		double   d_15[8];
-		char     c_16[4][18];
-		double   d_17[6];
-		float    f_18[4];
-		short    i_19[112];
-		float    f_20[4];
-		float    f_21[16];
-		float    f_22[4];
-		float    f_23[1024];
-	} Tfline;
-
-main(argc,argv)
-	int argc;
-	char *argv[];
-{
-	int buffsize, readbuff();
-	int iline, icont;
-	short	buff[2560];
-
-/* begin the program */
-
-/* start the main body of the program */
-	icont = 1;
-	iline = 1;	
-	if (argc > 1) 
-	{
-		if (*argv[1] == 'c' | *argv[1] == 'C') iline = 0;
-		if (*argv[1] == 'l' | *argv[1] == 'L') icont = 0;
-	}
-
-	buffsize = 5120;
-	while (readbuff(buffsize, buff) == buffsize)
-	{
-		if ( (buff[33] == 1 || buff[33] == 2 || buff[33] == 5 || 
-		      buff[33] == 6) && iline > 0) pr_recno_line(buff);
-		if ( (buff[33] == 3 || buff[33] == 4 || buff[33] == 8)
-			&& icont > 0) pr_recno_cont(buff);
-	}
-
-/* end the program */
-
-	exit(0);
-}
-
-pr_recno_cont(tfcont)
-
-	Tfcont	*tfcont;
-
-{
-	int i;
-
-	/* scan number, sub scan number */
-	printf("%#15.7E%#15.7E\n",(*tfcont).f_01[0],(*tfcont).f_01[1]);
-
-	/* source */
-	for (i = 0; i < 12; i++)
-		printf("%c",(*tfcont).c_02[i]);
-	printf("\n");
-
-	/* observer number */
-	printf("%#6d\n",(*tfcont).i_03);
-
-	/* observer name */
-	for (i = 0; i < 18; i++)
-		printf("%c",(*tfcont).c_04[i]);
-	printf("\n");
-
-	/* Julian date */
-	printf("%#20.12E\n",(*tfcont).d_05);
-	
-	/* Solar day of year, Month, Day, Year */
-	printf("%#6d%#6d%#6d%#6d\n",(*tfcont).i_06[0],
-		(*tfcont).i_06[1],(*tfcont).i_06[2],(*tfcont).i_06[3]);
-
-	/* LST, EST */
-	printf("%#15.7E%#15.7E\n",(*tfcont).f_07[0],(*tfcont).f_07[1]);
-
-	/* telescope, etc. */
-	for (i = 0; i < 12; i++)
-	{
-		printf("%#6d",(*tfcont).i_08[i]);
-	}
-	printf("\n");
-
-	/* DCR Cal factor */
-	printf("%#15.7E\n",(*tfcont).f_09);
-
-	/* VREF, VDEF, etc. */
-	for (i = 0; i < 8; i++)
-	{
-		printf("%#6d",(*tfcont).i_10[i]);
-	}
-	printf("\n");
-
-	/* DCR System Temperature, etc. */
-	for (i = 0; i < 22; i++)
-	{
-		printf("%#15.7E",(*tfcont).f_11[i]);
-		if (((i + 1) % 5) == 0)
-			printf("\n");
-	}
-	printf("\n");
-
-	/* environment values */
-	for (i = 0; i < 8; i++)
-		printf("%#6d",(*tfcont).i_12[i]);
-	printf("\n");
-
-	/* Epoch RA, Apparent RA, etc. */
-	for (i = 0; i < 15; i++)
-	{
-		printf("%#15.7E",(*tfcont).f_13[i]);
-		if (((i + 1) % 5) == 0)
-			printf("\n");
-	}
-
-	/* unused, # scans ACCUM'ed */
-	printf("%#6d%#6d\n",(*tfcont).i_14[0],(*tfcont).i_14[1]);
-
-	/* ACCUM stack */
-        for (i = 0; i < 18; i++)
-	{
-		printf("%#15.7E",(*tfcont).f_15[i]);
-		if (((i + 1) % 5) == 0)
-			printf("\n");
-	}
-	printf("\n");
-
-	/* data points */
-	for (i = 0; i < 600; i++)
-	{
-		printf("%#12.4E",(*tfcont).f_16[i]);
-		if (((i + 1) % 6) == 0)
-			printf("\n");
-	}
-	printf("\n");
-	printf("SCAN ###################################\n");
-}
-pr_recno_line(tfline)
-
-	Tfline	*tfline;
-	
-{
-	int i;
-	int j;
-
-	/* scan number, off scan number */
-	printf("%#15.7E%#15.7E\n",(*tfline).f_01[0],(*tfline).f_01[1]);
-
-	/* source */
-	for (i = 0; i < 12; i++)
-		printf("%c",(*tfline).c_02[i]);
-	printf("\n");
-
-	/* observer number */
-	printf("%#6d\n",(*tfline).i_03);
-
-	/* observer name */
-	for (i = 0; i < 18; i++)
-		printf("%c",(*tfline).c_04[i]);
-	printf("\n");
-
-	/* Julian date */
-	printf("%#20.12E\n",(*tfline).d_05);
-	
-	/* Solar day of year, Month, Day, Year */
-	printf("%#6d%#6d%#6d%#6d\n",(*tfline).i_06[0],
-		(*tfline).i_06[1],(*tfline).i_06[2],(*tfline).i_06[3]);
-
-	/* LST, EST */
-	printf("%#15.7E%#15.7E\n",(*tfline).f_07[0],(*tfline).f_07[1]);
-
-	/* telescope, etc. */
-	for (i = 0; i < 20; i++)
-	{
-		printf("%#6d",(*tfline).i_08[i]);
-		if ((i + 1) == 7)
-			printf("\n");
-		if ((i + 1) == 15)
-			printf("\n");
-		if ((i + 1) == 20)
-			printf("\n");
-	}
-
-	/* scan time */
-	printf("%#15.7E\n",(*tfline).f_09);
-
-	/* statuc word 1-2 */
-	printf("%#6d%#6d\n",(*tfline).i_10[0],(*tfline).i_10[1]);
-
-	/* integration time, etc. */
-	for (i = 0; i < 21; i++)
-	{
-		printf("%#15.7E",(*tfline).f_11[i]);
-		if ((i + 1) == 4)
-			printf("\n");
-		if ((i + 1) == 8)
-			printf("\n");
-		if ((i + 1) == 11)
-			printf("\n");
-		if ((i + 1) == 14)
-			printf("\n");
-		if ((i + 1) == 19)
-			printf("\n");
-		if ((i + 1) == 21)
-			printf("\n");
-	}
-
-	/* environment values */
-	for (i = 0; i < 8; i++)
-		printf("%#6d",(*tfline).i_12[i]);
-	printf("\n");
-
-	/* Apparent RA, etc. */
-	for (i = 0; i < 72; i++)
-	{
-		printf("%#15.7E",(*tfline).f_13[i]);
-		if (((i + 1) % 4) == 0)
-			printf("\n");
-	}
-
-	/* unused */
-	printf("%#6d%#6d\n",(*tfline).i_14[0],(*tfline).i_14[1]);
-
-	/* center freq, etc */
-	for (i = 0; i < 8; i++)
-	{
-		printf("%#20.12E",(*tfline).d_15[i]);
-		if (((i + 1) % 4) == 0)
-			printf("\n");
-	}
-
-	/* C-F formula */
-	for (i = 0; i < 4; i++)
-	{
-		for (j = 0; j < 18; j++)
-			printf("%c",(*tfline).c_16[i][j]);
-		printf("\n");
-	}
-
-	/* L1, etc. */
-	for (i = 0; i < 6; i++)
-	{
-		printf("%#20.12E",(*tfline).d_17[i]);
-		if (((i + 1) % 3) == 0)
-			printf("\n");
-	}
-
-	/* LA, etc. */
-	for (i = 0; i < 4; i++)
-		printf("%#15.7E",(*tfline).f_18[i]);
-	printf("\n");
-
-	/* A/C words, unused */
-	for (i = 0; i < 112; i++)
-	{
-		printf("%#6d",(*tfline).i_19[i]);
-		if (((i + 1) % 10) == 0)
-			printf("\n");
-	}
-	printf("\n");
-
-	/* ref system temp */
-	for (i = 0; i < 4; i++)
-		printf("%#15.7E",(*tfline).f_20[i]);
-	printf("\n");
-
-	/* power counters */
-	for (i = 0; i < 16; i++)
-	{
-		printf("%#15.7E",(*tfline).f_21[i]);
-		if (((i + 1) % 4) == 0)
-			printf("\n");
-	}
-
-	/* channel zero values */
-	for (i = 0; i < 4; i++)
-		printf("%#15.7E",(*tfline).f_22[i]);
-	printf("\n");
-
-	/* spectrum - signal Only convert the number of channels */
- 	/* specific to the telescope */
-        if ((*tfline).i_08[0] == 140)
-	{
-	for (i = 0; i < 1024; i++)
-	{
-		printf("%#15.7E",(*tfline).f_23[i]);
-		if (((i + 1) % 5) == 0)
-			printf("\n");
-	}
-	}
-        if ((*tfline).i_08[0] == 300)
-	{
-	for (i = 0; i < 384; i++)
-	{
-		printf("%#15.7E",(*tfline).f_23[i]);
-		if (((i + 1) % 5) == 0)
-			printf("\n");
-	}
-	}
-		printf("\n");
-	printf("SCAN ###################################\n");
-}
-
-
-#include <stdio.h>
-
-/*	BUFSIZ is set in stdio.h 	*/
-
-int readbuff(igoal, buffer)
-
-int	igoal;
-char	*buffer;
-
-{
-	int	iread, n;
-
-	iread = 0;
-	while (igoal > 0) {
-		if ((n = read(0,buffer+iread, 
-			(igoal > BUFSIZ) ? BUFSIZ: igoal)) > 0) {
-			iread = iread + n;
-			igoal = igoal - n;
-		}
-		else	{
-			iread = n;
-			igoal = 0;
-		}
-	}
-	return iread;
-}
-
diff -uNr 3.5/utilities/conversion/ieee2keep.f unipops-3.6/utilities/conversion/ieee2keep.f
--- 3.5/utilities/conversion/ieee2keep.f	2000-03-16 11:30:30.000000000 -0700
+++ unipops-3.6/utilities/conversion/ieee2keep.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,132 +0,0 @@
-      program ieee2keep
-c
-c     @(#)ieee2keep.f	5.1 06/22/94
-c
-c     Reads in a record from presumably a IEEE keep file and outputs a 
-c     record in Modcomp KEEP format.  Uses Standard Input and Standard
-c     Output so that the user can implement pipes to do further conversions.
-c
-c     Works for both continuum and line keep files.  Scans of different
-c     types can be intermixed in the input file.
-c
-c     The user can specify whether continuum or line records are to be ignored
-c     by specifying a 'c' (for continuum only), an 'l' (for line only), or
-c     nothing (for both line and continuum) on the command line.
-c
-c     NOTE: the user should redirect both input and output when using this 
-c     program. Program uses standard error to report on its progress
-c
-      character*1 ltype(21), ctype(18), arg
-      character*5120 cinbuff, coutbuff
-      integer*4 nltype(21), nctype(18), iargc, icnum, ilnum, ibuffsize,
-     .		ierr, long
-      integer*2 iinbuff(2560), ioutbuff(2560), lsno, ktos, ktel, nin,
-     .		itype, li
-      real rinbuff(1280), routbuff(1280)
-      logical cont, line, isitline, isitcont
-c
-      equivalence (rinbuff, cinbuff), (iinbuff, cinbuff)
-      equivalence (routbuff, coutbuff), (ioutbuff, coutbuff)
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ltype/'r','c','i','c','s','d','i','r','i','r','i','r','i',
-     1		 'r','d','c','d','r','i','s','r'/
-      data nltype/2 , 12, 1 , 18,  2, 1 , 4 , 2 , 20, 23, 2 , 1 , 4 ,
-     1            73, 8 , 72, 6 , 4 ,112, 28, 0 /
-c
-      data ctype/'r','i','c','i','c','s','d','i','r','i','r','i','r',
-     1		 'i','r','i','r','r'/
-      data nctype/1 , 2 , 12, 1 , 18,  2, 1 , 4 , 2 , 12, 1 , 8 , 22,
-     1            2 , 1 , 4 , 16,1211/
-c
-      data icnum/18/, ilnum/21/
-c
-c     Defines the format of the spectral line and continuum record read in.  
-c     *TYPE defines the order of word types (d = d.prec, r = real, i = int*2, 
-c     c = char*1, b = byte to bypass in input record, s = byte to skip in output
-c     record) and *NTYPE the number of succesive words of the corresponding 
-c     type (e.g. 2 reals, followed by 12 C*1, 1 Integer, 18 C*1, skip two 
-c     ouput bytes, 1 double precision ...).
-c
-c     *CNUM and *LNUM give number of entries in the continuum and line versions
-c     of *type and *ntype
-c
-      data ibuffsize/5120/, lsno/1/, ktos/34/, ktel/33/
-c     IBUFFSIZE = Size of input/output buffers
-c     LSNO = location of scan number in input and output buffers
-c     KTOS = location of obs. type
-c     KTEL = telescope name (140 or 300)
-c
-      nin = 0
-c     NIN = number of records read in so far
-c
-      cont = .true.
-      line = .true.     
-      if (iargc() .gt. 0) then
-	call getarg(long(1), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	endif
-      endif
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-100   continue
-c
-	call readbuff(ierr, ibuffsize, cinbuff)
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. ibuffsize) then
-	  write(0,*) "IEEE2KEEP: Error on read"
-	  goto 999
-	endif
-	nin = nin + 1
-c	Read in a record
-c
- 	itype = iinbuff(ktos)
-	if (.not. isitcont(itype) .and. .not. isitline(itype)) then
-	   write(0,*) "IEEE2KEEP: Bad scan type:", itype
-	   goto 999
-	endif
-c	ITYPE = a flag telling whether this is a continuum or spectral line
-c	        scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c
-c
-	if ( (line .and. isitline(itype)) .or.
-     .       (cont .and. isitcont(itype)) ) then
-c
-	   if (isitline(itype)) then
-	      if (iinbuff(ktel) .eq. 300) then
-		nltype(ilnum) = 408
-	      else
-		nltype(ilnum) = 1048
-	      endif
-c	      Converts only the number of data points specific for each
-c	      telescope.
-c
-	      call cvtieeemod(cinbuff,coutbuff,ltype,nltype,ilnum)
-	   else
-	      call cvtieeemod(cinbuff,coutbuff,ctype,nctype,icnum)
-	   endif
-c	   Converts from input IEEE binary to the binary format of the 
-c	   Modcomp KEEP. 
-c
-	   call writebuff(ierr, ibuffsize, coutbuff)
-	   if (ierr .ne. ibuffsize) then
-		write(0,*) "IEEE2KEEP: Error on write"
-		goto 999
-	   endif
-c	   Writes out converted scan
-c
-	endif
-c
-	goto 100
-c
-999   stop
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/ieee2pcpops.f unipops-3.6/utilities/conversion/ieee2pcpops.f
--- 3.5/utilities/conversion/ieee2pcpops.f	2000-03-16 11:30:38.000000000 -0700
+++ unipops-3.6/utilities/conversion/ieee2pcpops.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,155 +0,0 @@
-c
-c     @(#)ieee2pcpops.f	5.1 06/22/94
-c
-      character*1 ltype(19)
-      character*3 filesuf
-      character*7 dataout
-      character*8 tableout
-      character*5120 ctwh, couttwh
-      real scannum
-      character*79 ctable, filein, tablein
-      integer*4 nltype(19), ilnum
-      integer*2 itwh(2560), lsno, ktos, ktel, in, i, ierr, irecnum,
-     .		irecmax, iout, itype, ijkl, li
-      logical isitline
-      real*4 twh(1280), outtwh(1280)
-c
-      equivalence (twh, itwh), (ctwh, twh)
-      equivalence (outtwh, couttwh)
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-c
-      data ltype/'r','c','i','c','d','i','r','i','r','i','r','i','r',
-     1          'd','c','d','r','i','r' /
-      data nltype/2 , 12, 1 , 18, 1 , 4 , 2 , 20, 23, 2 , 1 , 4 , 73,
-     1           8 , 72, 6 , 4 ,112, 0/
-      data ilnum/19/, lsno/1/, ktos/34/, ktel/33/
-c
-c     Defines the format of the spectral line and continuum record read in.  
-c     *TYPE defines the order of word types (d = d.prec, r = real, i = int*2, 
-c     c = char*1, b = byte to bypass in input record, s = byte to skip in output
-c     record) and *NTYPE the number of succesive words of the corresponding 
-c     type (e.g. 2 reals, followed by 12 C*1, 1 Integer, 18 C*1, skip two 
-c     ouput bytes, 1 double precision ...).
-c
-c     *CNUM and *LNUM give number of entries in the continuum and line versions
-c     of *type and *ntype
-c
-c     LSNO = location of scan number in input and output buffers
-c     KTOS = location of obs. type
-c     KTEL = telescope name (140 or 300)
-c
-901   write(6,*) 'What is the name of the input data file?'
-      read(5,*) filein
-      open(unit=10,access='direct',form='unformatted',status='old',
-     1     recl=5120,file=filein,err=901)
-c
-9013  write(6,*) 'What is the name of the input table file?'
-      read(5,*) tablein
-      open(unit=9,access='sequential',form='formatted',status='old',
-     1     file=tablein,err=9013)
-      rewind(9)
-c
-1     write(6,*) 'What is the number of scans in one output file'
-      read(5,*) irecmax
-      if (irecmax .lt. 1) goto 1
-c
-      iout = 0
-      in = 0
-c
-15      iout = iout + 1
-        if (iout .gt. 999) then
-		write(6,*) ' DATA file is too large.  999 data files'
-		write(6,*) ' have already been generated'
-		write(6,*) ' Abnormal termination at input record', in
-		stop
-	endif
-c
-	write(unit=filesuf,fmt='(i3)') iout
-	dataout = 'DATA' // filesuf
-	if (iout .lt. 100) dataout = 'DATA0' // filesuf(2:3)
-	if (iout .lt. 10) dataout = 'DATA00' // filesuf(3:3)
-	tableout = 'TABLE' // filesuf
-	if (iout .lt. 100) tableout = 'TABLE0' // filesuf(2:3)
-	if (iout .lt. 10) tableout = 'TABLE00' // filesuf(3:3)
-c
-	write(6,*) 'Attempting to create files ', dataout, ' ',tableout
-c
-	open(unit=11,access='direct',form='unformatted',status='new',
-     1       recl=5120,file=dataout)
-	open(unit=12,access='direct',form='formatted',status='new',
-     1       recl=79,file=tableout)
-c
-        do 100 i = 1, irecmax
-	  in = i + irecmax*(iout-1)
-	  read(10, rec=in, end=999, err=999) twh
- 	  itype = itwh(ktos)
-c	  ITYPE = a flag telling whether this is a continuum or spectral line
-c	        scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c
-	  if (.not. isitline(itype)) then
-		write(6,*) 'Skipping continuum scan ', twh(lsno)
-		in = in + 1
-		goto 100
-	  endif
-c
-          if (mod(twh(lsno),1.) .ge. .005) twh(lsno)=twh(lsno)*100
-	  if (twh(lsno) .gt. 32767.) then
-		write(6,*) 'Scan number out of range!!'
-		write(6,*) 'Scan number changed from', twh(lsno), ' to ',
-     .				aint(mod(twh(lsno),32767.))
-		twh(lsno) = aint(mod(twh(lsno), 32767.))
-	  endif
-	  scannum = twh(lsno)
-c	  Alter the scan number if it is out of range for PC-POPS.
-c
-9011      read(9, 16, end=999, err=999) ctable
-16	  format(a79)
-	  read(ctable(1:5), 17, iostat=ierr) irecnum
-17	  format(i5)
-	  if (ierr .ne. 0 .or. irecnum .ne. in) goto 9011
-c	  Skip headers in TABLE file.
-c
-	  if (itwh(ktel) .eq. 300) then
-		nltype(ilnum) = 408
-	  else
-		nltype(ilnum) = 1048
-	  endif
-	  call cvtpcieee(ctwh,couttwh,ltype,nltype,ilnum)
-c	  Converts only the number of data points specific for each
-c	  telescope.
-c	  
-95	  write(11, rec=i) outtwh
-	  write(ctable(7:13),96) nint(scannum)
-96	  format(i7)
-	  write(12, 16, rec=i) ctable
-100	  continue
-c
-        write(12, 101, rec=irecmax+1) (' ', ijkl = 1, 79)
-101     format(79a1)
-c
-	write(6,*) irecmax, ' records written to ', dataout, ' ',tableout
-c
-	close (11)
-	close (12)
-c
-        write(6,*) ' '
-c
-	goto 15
-c
-999   if (i .gt. 1) write(12, 101, rec=i) (' ', ijkl = 1, 79)
-c
-      close (11)
-      close (12)
-      close (9)
-      close (10)
-c
-      write(6,*) 'Error at input and output records ',in, i
-      write(6,*) i-1, ' records written to ', dataout, ' ', tableout
-      write(6,*) ' '
-      write(6,*) 'Terminating execution'
-c
-      stop
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/ieee2sdd.f unipops-3.6/utilities/conversion/ieee2sdd.f
--- 3.5/utilities/conversion/ieee2sdd.f	2000-03-16 11:30:34.000000000 -0700
+++ unipops-3.6/utilities/conversion/ieee2sdd.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,123 +0,0 @@
-      program ieee2sdd
-c
-c     @(#)ieee2sdd.f	5.2 09/10/98
-c
-c     Reads in a record from presumably a IEEE keep file and outputs a 
-c     record in SDD#1 format.  Uses Standard Input and Standard
-c     Output so that the user can implement pipes to do further conversions.
-c
-c     NOTE: the user should redirect both input and output when using this 
-c     program. Program uses standard error to report on its progress
-c
-      include 'params.inc'
-c
-      character*5120 cinbuff
-      character*(HDU_FLOAT_SIZE*4) coutbuff
-      integer*4 ibuffsize, ierr, ioutsize1, ioutsize2, ifeed, iargc,
-     .		long, nskipped, ifd
-      character*1 arg
-      integer*2 iinbuff(2560), kmd, numfeed, itype, ktos, ksno, li
-      real rinbuff(1280)
-      real*8 dinbuff(640), doutbuff(HDU_FLOAT_SIZE/2)
-      logical cont, line, isitline, isitcont
-c
-      equivalence (dinbuff, cinbuff), (iinbuff, cinbuff)
-      equivalence (rinbuff, cinbuff)
-      equivalence (doutbuff, coutbuff)
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ibuffsize/5120/, kmd/36/, ktos/34/, ksno/1/
-c     IBUFFSIZE = Size of input/output buffers
-c     KMD = Location in input format where number of feeds is stored.
-c     KTOS = Location of obs. type.
-c
-      cont = .true.
-      line = .true.     
-      if (iargc() .gt. 0) then
-	call getarg(long(1), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	endif
-      endif
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-      nskipped = 0
-100   continue
-c
-	call readbuff(ierr, ibuffsize, cinbuff)
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. ibuffsize) then
-	  write(0,*) "IEEE2SDD: Error on read"
-	  goto 999
-	endif
-c	Read in a record
-c
-        itype = iinbuff(ktos)
-	if (.not. isitcont(itype) .and. .not. isitline(itype)) then
-	   write(0,*) "IEEE2SDD: Bad scan type:", itype
-	   goto 999
-	endif
-c	ITYPE = flag telling whether this is a continuum or spectral line
-c		scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c
-	if ( (line .and. isitline(itype)) .or.
-     .       (cont .and. isitcont(itype)) ) then
-c
-	  if (isitline(itype)) then
-	    numfeed = iinbuff(kmd)
-	  else
-	    numfeed = 1
-	  endif
-c
-	  do 120 ifeed = 1, numfeed
-	    call unpadraz(doutbuff)
-c
-	    if (isitline(itype)) then
-	       ifd = ifeed
-	       if ( nint( 100*mod(rinbuff(ksno),1.) ) .ne. 0) 
-     .		   rinbuff(ksno) = rinbuff(ksno) - float(ifd)/100.
-	       call lconversion(dinbuff, doutbuff(1), ifd, ierr)
-	    else
-	       ifd = nint( 100.*mod(rinbuff(ksno),1.) )
-	       rinbuff(ksno) = rinbuff(ksno) - float(ifd)/100.
-	       if ( ifd .eq. 0) ifd = 1
-	       call cconversion(dinbuff, doutbuff(1), ifd, ierr)
-	    endif
-c			on error, write message to stderr (unit 0) and go on
-            if (ierr .ne. 0) then
-	       write(0, 1000) rinbuff(ksno), ifd, ierr
- 1000          format('IEEE2SDD: conversion of scan ',f9.2,', feed ',i2,
-     .               ' failed with error, ', i2,'.')
-               goto 999
-            endif
-c
-c	    Converts from input IEEE binary to SDD#1 format. 
-c
-	    ioutsize1 = doutbuff(5) + doutbuff(6) + 4
-	    ioutsize2 = ioutsize1 / 512
-	    if (mod(ioutsize1,512) .ne. 0) ioutsize2 = ioutsize2 + 1
-c	    Must write out a multiple of 512 bytes
-c
-	    call writebuff(ierr, ioutsize2*512, coutbuff)
-	    if (ierr .ne. ioutsize2*512) then
-		write(0,*) "IEEE2SDD: Error on write"
-		goto 999
-	    endif
-c	    Writes out converted scan, one feed at a time.
-c
-120	    continue
-c
-	endif
-c
-      goto 100
-c
-999   stop
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/jd.f unipops-3.6/utilities/conversion/jd.f
--- 3.5/utilities/conversion/jd.f	2000-03-16 11:29:55.000000000 -0700
+++ unipops-3.6/utilities/conversion/jd.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,35 +0,0 @@
-      subroutine jd(iy, im, id, tjd)
-c
-c      @(#)jd.f	5.1 06/22/94
-c
-c     Calculates Julian date from date
-c
-c     iy, im, id = (I*4) Year, month, and day
-c     tjd = (R*8) julian date generated 
-c
-      double precision tjd, ttjd, yy, rmm, a, b 
-      integer*4 iy, im, id, ijd
-c
-      if (im .gt. 2) then
-	yy = iy
-	rmm = im
-      else
-	yy = iy -1
-	rmm = im+12
-      endif
-c
-      if (iy .gt. 1582 .or. (iy .eq. 1582 .and. im .gt. 10) .or.
-     1    (iy .eq. 1582 .and. im .eq. 10 .and. id .ge. 15)  ) then
-	a = int(yy/100.)
-	b = 2 - a+int(a/4.)
-      else
-	b = 0.
-      endif
-c
-      ijd = 365.25*yy
-      ttjd = ijd + int(30.6001*(rmm+1)) + id + 1720994.5d0 + b
-      tjd = ttjd
-c
-      return 
-      end
-c
diff -uNr 3.5/utilities/conversion/jdtodate.f unipops-3.6/utilities/conversion/jdtodate.f
--- 3.5/utilities/conversion/jdtodate.f	2000-03-16 11:29:55.000000000 -0700
+++ unipops-3.6/utilities/conversion/jdtodate.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,49 +0,0 @@
-      subroutine jdtodate(jd, iyear, imonth, day)
-C-------------------------------------------------------------------------------
-C  @(#)jdtodate.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Converts from JD to Calender date
-c     jd = (R*8) Julian date
-c     iyear, imonth, day = (I*4) , (I*4), (R*8)
-c                    Calculated year, month, and day
-c
-      double precision jd, day, z, f, a, alpha, b, c, d, e
-      integer*4 iyear, imonth
-c 
-      if (jd .lt. 0) then
-	stop
-      endif
-c
-      z = aint(jd + 0.5d0)
-      f = mod(jd + 0.5d0, 1.d0)
-c
-      if (z .lt. 229161.d0) then
-	a = z
-      else
-	alpha = aint ((z - 1867216.25d0) / 36524.25d0)
-	a = z + 1.d0 + alpha - aint(alpha / 4.d0)
-      endif
-c
-      b = a + 1524.d0
-      c = aint((b - 122.1d0)/365.25d0)
-      d = aint(365.25d0*c)
-      e = aint((b - d) / 30.6001d0)
-c
-      day = b - d - aint(30.6001*e) + f
-c
-      if (e .lt. 13.5) then
-	imonth = int(e - 1.d0)
-      else
-	imonth = int(e - 13d0)
-      endif
-c
-      if (imonth .ge. 3) then
-	iyear = int(c - 4716.d0)
-      else
-	iyear = int(c - 4715.d0)
-      endif
-c
-      return
-      end
-
diff -uNr 3.5/utilities/conversion/keep2ieee.f unipops-3.6/utilities/conversion/keep2ieee.f
--- 3.5/utilities/conversion/keep2ieee.f	2000-03-16 11:30:31.000000000 -0700
+++ unipops-3.6/utilities/conversion/keep2ieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,131 +0,0 @@
-      program keep2ieee
-c
-c     @(#)keep2ieee.f	5.1 06/22/94
-c
-c     Reads in a record from presumably a Modcomp KEEP file and outputs a 
-c     record in IEEE KEEP format.  Uses Standard Input and Standard
-c     Output so that the user can implement pipes to do further conversions.
-c
-c     Works for both continuum and line keep files.  Scans of different
-c     types can be intermixed in the input file.
-c
-c     The user can specify whether continuum or line records are to be ignored
-c     by specifying a 'c' (for continuum only), an 'l' (for line only), or
-c     nothing (for both line and continuum) on the command line.
-c
-c     NOTE: the user should redirect both input and output when using this 
-c     program. Program uses standard error to report on its progress
-c
-      character*1 ltype(21), ctype(18), arg
-      character*5120 cinbuff, coutbuff
-      integer*4 nltype(21), nctype(18), iargc, icnum, ilnum, ibuffsize,
-     .		ierr, long
-      integer*2 iinbuff(2560), ioutbuff(2560), itype, nin, ktel,
-     .		lsno, ktos, li
-      real rinbuff(1280), routbuff(1280)
-      logical cont, line, isitline, isitcont
-c
-      equivalence (rinbuff, cinbuff), (iinbuff, cinbuff)
-      equivalence (routbuff, coutbuff), (ioutbuff, coutbuff)
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ltype/'r','c','i','c','b','d','i','r','i','r','i','r','i',
-     1		 'r','d','c','d','r','i','b','r'/
-      data nltype/2 , 12, 1 , 18, 2 , 1 , 4 , 2 , 20, 23, 2 , 1 , 4 ,
-     1            73, 8 , 72, 6 , 4 ,112, 28, 0 /
-c
-      data ctype/'r','i','c','i','c','b','d','i','r','i','r','i','r',
-     1		 'i','r','i','r','r' /
-      data nctype/1 , 2 , 12, 1 , 18, 2 , 1 , 4 , 2 , 12, 1 , 8 , 22,
-     1            2 , 1 , 4 , 16,1211/
-c
-      data icnum/18/, ilnum/21/
-c
-c     Defines the format of the spectral line and continuum record read in.  
-c     *TYPE defines the order of word types (d = d.prec, r = real, i = int*2, 
-c     c = char*1, b = byte to bypass in input record, s = byte to skip in output
-c     record) and *NTYPE the number of succesive words of the corresponding 
-c     type (e.g. 2 reals, followed by 12 C*1, 1 Integer, 18 C*1, skip two 
-c     ouput bytes, 1 double precision ...).
-c
-c     *CNUM and *LNUM give number of entries in the continuum and line versions
-c     of *type and *ntype
-c
-      data ibuffsize/5120/, lsno/1/, ktos/34/, ktel/33/
-c     IBUFFSIZE = Size of input/output buffers
-c     LSNO = location of scan number in input and output buffers
-c     KTOS = location of obs. type
-c     KTEL = telescope name (140 or 300)
-c
-      nin = 0
-c     NIN = number of records read in so far
-c
-      cont = .true.
-      line = .true.     
-      if (iargc() .gt. 0) then
-	call getarg(long(1), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	endif
-      endif
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-100   continue
-c
-	call readbuff(ierr, ibuffsize, cinbuff)
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. ibuffsize) then
-	  write(0,*) "KEEP2IEEE: Error on read"
-	  goto 999
-	endif
-	nin = nin + 1
-c	Read in a record
-c
- 	itype = iinbuff(ktos)
-	if (.not. isitcont(itype) .and. .not. isitline(itype)) then
-	   write(0,*) "KEEP2IEEE: Bad scan type:", itype
-	   goto 999
-	endif
-c	ITYPE = a flag telling whether this is a continuum or spectral line
-c	        scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c
-	if ( (line .and. isitline(itype)) .or.
-     .       (cont .and. isitcont(itype)) ) then
-c
-	   if (isitline(itype)) then
-	      if (iinbuff(ktel) .eq. 300) then
-		nltype(ilnum) = 408
-	      else
-		nltype(ilnum) = 1048
-	      endif
-c	      Converts only the number of data points specific for each
-c	      telescope.
-c
-	      call cvtmodieee(cinbuff,coutbuff,ltype,nltype,ilnum)
-	   else
-	      call cvtmodieee(cinbuff,coutbuff,ctype,nctype,icnum)
-	   endif
-c	   Converts from input MODCOMP binary to the binary format of the 
-c	   IEEE KEEP. 
-c
-	   call writebuff(ierr, ibuffsize, coutbuff)
-	   if (ierr .ne. ibuffsize) then
-		write(0,*) "KEEP2IEEE: Error on write"
-		goto 999
-	   endif
-c	   Writes out converted scan
-c
-	endif
-c
-	goto 100
-c
-999   stop
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/lastblnk.f unipops-3.6/utilities/conversion/lastblnk.f
--- 3.5/utilities/conversion/lastblnk.f	2000-03-16 11:30:02.000000000 -0700
+++ unipops-3.6/utilities/conversion/lastblnk.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,20 +0,0 @@
-      integer*2 function lastblnk(string)
-C-------------------------------------------------------------------------------
-C  @(#)lastblnk.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Finds the position of the last non-blank character in STRING
-c*********************************************
-c     [RJM] March 89
-c*********************************************
-c
-      character*(*) string
-      integer*4 lnblnk
-c
-c***********************************************************
-      lastblnk = lnblnk(string)
-c     MASSCOMP/SUN function LNBLNK
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/conversion/lconvert.c unipops-3.6/utilities/conversion/lconvert.c
--- 3.5/utilities/conversion/lconvert.c	2000-03-16 11:29:50.000000000 -0700
+++ unipops-3.6/utilities/conversion/lconvert.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,502 +0,0 @@
-
-/* @(#)lconvert.c	5.1 06/22/94 */
-
-#include <string.h>
-#include <math.h>
-#include <140.h>
-#include <sdd.h>
-
-
-/* Fillarray writes the string st into the array arr from arr[f] */
-void fillarray (arr,st,f)
-	char arr[];
-	char *st;
-	int f;
-{
-	char *u=st;
-	int i,lg;
-	lg=strlen(st);
-	for (i=f;i<(f+lg);i++) {
-	arr[i] = *u;
-	u++;}
-	return;
-}
-
-/*
-Lconversion takes an input structure of the Line140 format and
-turns it into a structure of the sddformat format
-*/
-void lconversion_(istruct,ostruct,ind,errcode)
-	Line140 *istruct;
-	sddformat *ostruct;
-	int *ind, *errcode;
-
-{
-#define in istruct->hdr 
-#define out ostruct->header
-
-	int i,j,k,return_code, infeed, scanno, n0;
-	int imonth, iyear, iday;
-	char s[8];
-	double pi=3.141592654;
-	double diff = in.istop[*ind-1] - in.istart[*ind-1] + 1;
-	double temp, day, hour_angle;
-	double lat140 = pi *38.43679111 / 180.;
-	extern double jdtodate();
-
-/* test; converts only spectral line data file */
-	switch(in.observing_program) {
-	   case 1: case 2: break;
-	   case 5: case 6: in.mode = 2*in.mode; break ;
-	   default: *errcode = 1; return; 
-	}
-
-/* tests if the ind value corresponds to the number of one of the 
-utilized receivers */
-    	if (*ind < 1 || *ind > in.mode ) 
-	{
-	   *errcode=2; 
-	   return;
-	}
-
-/*			class 0 information 	*/
-
-	out.number_header_class = NUMBER_HEADER_CLASS;
-	out.class_location[0] = CLASS_0 + 1;
-	out.class_location[1] = out.class_location[0] + CLASS_1;
-	out.class_location[2] = out.class_location[1] + CLASS_2;
-	out.class_location[3] = out.class_location[2] + CLASS_3;
-	out.class_location[4] = out.class_location[3] + CLASS_4;
-	out.class_location[5] = out.class_location[4] + CLASS_5;
-	out.class_location[6] = out.class_location[5] + CLASS_6;
-	out.class_location[7] = out.class_location[6] + CLASS_7;
-	out.class_location[8] = out.class_location[7] + CLASS_8;
-	out.class_location[9] = out.class_location[8] + CLASS_9;
-	out.class_location[10] = out.class_location[9] + CLASS_10;
-	out.class_location[11] = out.class_location[10] + CLASS_11;
-	out.class_location[12] = out.class_location[11] + CLASS_12;
-	out.class_location[13] = out.class_location[12] + CLASS_13;
-	out.class_location[14] = out.class_location[13] + CLASS_14;
-
-/* Header and data lengths */
-
-	out.header_length = sizeof(sddheader);
-	out.data_length = diff*4;
-
-/* Basic information */
-
-	out.scan_number = in.scan_number + (*ind) / 100.0;
-
-	i=0;
-	do{
-	   s[i++]=in.observer_number % 10 + '0';
-	} while ((in.observer_number /= 10) > 0);
-
-	for (k=0,j=i-1;j>=0;k++,j--) out.observer_initials[k] = s[j];
-	for (i=0;i<14;i++) out.observer_name[i]=in.observer_name[i];
-
-	switch (in.telescope){
-	case 140 : fillarray(out.telescope,"NRAO 43M",0);
-	           switch (in.observing_program) {
-		      case 1: case 2: fillarray(out.back_end_desc,"1024ACIV",0);
-				      break;
-		      case 5: case 6: fillarray(out.back_end_desc,"SPECPROC",0);
-				      break;
-		      default: *errcode = 3; return;
-		      }
-	           break;	
-	case 300 : fillarray(out.telescope,"NRAO 93M",0);
-	           fillarray(out.back_end_desc,"384ACIII",0);
-	           break;
-	case 45  : fillarray(out.telescope,"NRAO 43M",0);
-	           fillarray(out.back_end_desc,"        ",0);
-	           break;
-	default :  *errcode = 3; return;
-	}
-
-	for (i=0;i<4;i++) out.project_ident[i] = in.observer_name[i+14];
-	for(i=0;i<12;i++) out.source_name[i] = in.source_name[i];
-
-	switch(in.scan_type){
-	case 0: fillarray(out.type_data,"LINETPOF",0); 	
-		out.phase_id = 0;
-		out.nb_phases = 1;
-		break;
-	case 1: fillarray(out.type_data,"LINETPON",0);
-		out.phase_id = 0;
- 		out.nb_phases = 1;
-		break;
-	case 2: if (in.l1 == in.l1f1 && in.l1 == in.l1f2) 
-		{
-			out.phase_id = 0;
-			out.nb_phases = 2;
-			fillarray(out.type_data,"LINEBMSW",0);
-		} 
-		else
-		{
-			out.phase_id = 0;
-			out.nb_phases = 2;
-			fillarray(out.type_data,"LINEFQSW",0);
-		} 
-		break;
-	default:*errcode = 4; return;
-	}
-
-	fillarray(out.data_precision,"R*4     ",0);
-	out.nb_records = in.scan_duration/in.integration_time;
-	out.record_id = 0;
-
-/* Pointing parameters */
-
-	out.user_azra_pointing = 15*in.ra_pointing_fudge;
-	out.user_eldec_pointing = in.dec_pointing_fudge;
-	out.pointing_constant[0] = in.pvls_p1;
-	out.pointing_constant[1] = in.pvls_p2;
-	out.pointing_constant[2] = in.pvls_p3;
-	out.orient_angle = (180*in.orientation)/pi;
-	out.radial_focus = in.focus;
-
-/* Observing parameters */
-
-	temp=in.julian_date + 2400000;
-	jdtodate_(&temp,&iyear,&imonth,&day);
-	iday = day;
-	out.ut_date = (iday + (imonth*100.) + (iyear*10000.)) / 10000;
-	temp = ((in.est*180)/(pi*15)) + 5;
-	if(temp > 24)
-	   out.utime = temp - 24;
-	else
-	   out.utime = temp;
-	out.lst = ((in.lst*180)/(pi*15));
-	out.nb_receiv_channels = in.mode;
-	out.nb_sw_variables = 1;
-	out.length_cycle = 1;
-	out.length_sample = in.integration_time;
-
-/* Positions */
-
-	out.epoch = in.epoch_of_obs;
-	out.sourcex = (180*in.obs_h[*ind-1]) / pi;
-	out.sourcey = (180*in.obs_v[*ind-1]) / pi;
-	out.epoch_ra =(180*in.epoch_ra[*ind-1]) / pi;
-	out.epoch_dec = (180*in.epoch_dec[*ind-1]) / pi;
-	out.galactic_l = (180*in.gal_l[*ind-1]) / pi;
-	out.galactic_b = (180*in.gal_b[*ind-1]) / pi;
-	out.xposition = (180*in.ra_ind) / pi;
-	out.yposition = (180*in.dec_ind) / pi;
-
-	hour_angle = in.lst-in.app_ra[*ind-1];
-	temp = cos(hour_angle)*sin(lat140)-tan(in.app_dec[*ind-1])*cos(lat140);
-	out.azimuth = 180.+180.*atan2(sin(hour_angle),temp)/pi;
-	temp = sin(in.app_dec[*ind-1])*sin(lat140) + 
-		cos(in.app_dec[*ind-1])*cos(lat140)*cos(hour_angle);
-	out.elevation = 180*asin(temp) / pi;
-
-	for (i=0;i<3;i++) out.desc_origin[i] = in.descriptive_origin[i];
-
-	switch (in.position_code) {
-	case 0: fillarray(out.coord_sys_code,"        ",0); break;
-	case 1: fillarray(out.coord_sys_code,"APPHADC ",0); break;
-	case 2: fillarray(out.coord_sys_code,"EPOCRADC",0);break;
-	case 3: fillarray(out.coord_sys_code,"APPRADC ",0); break;
-	case 4: fillarray(out.coord_sys_code,"GALACTIC",0); break;
-	case 5: fillarray(out.coord_sys_code,"AZEL    ",0); break;
-	case 6: fillarray(out.coord_sys_code,"USERDEF ",0); break;
-	default: *errcode = 5; return;
-	}
-
-/* Environment */
-
-	out.amb_temp = in.environment_values_1[0] / 128.0;
-	out.pressure = in.environment_values_2[2] / 12.80;
-	out.dew_point = in.environment_values_2[0] / 128.0;
-
-/* Map parameters */
-
-	out.deltax_rate = 60*in.h_coord_rate*180/pi;
-	out.deltay_rate = 60*in.v_coord_rate*180/pi;
-	fillarray(out.xy_ref_frame_code,"CARTSCAN",0);
-
-/* Data parameters */
-
-	out.off_scan_nb = in.off_scan_number;
-	out.velocity_ref = in.center_vel[*ind-1];
-	out.velocity_correct = in.rvsys[*ind-1];
-
-	switch (in.vdef) {
-	case 1: fillarray(out.velocity_def_ref,"RADI",0); break;
-	case 2: fillarray(out.velocity_def_ref,"OPTL",0); break;
-	case 3: fillarray(out.velocity_def_ref,"REVL",0); break;
-	default: *errcode = 6; return;
-	}
-
-	switch (in.vref) {
-	case 1: fillarray(out.velocity_def_ref,"OBS ",4); break;
-	case 2: fillarray(out.velocity_def_ref,"LSR ",4); break;
-	case 3: fillarray(out.velocity_def_ref,"HELO",4); break;
-	case 4: fillarray(out.velocity_def_ref,"EART",4); break;
-	default: *errcode = 7; return;
-	}
-
-/* Telescope dependent parameters */
-
-	out.l1 = in.l1;
-	out.l1f1 = in.l1f1;
-	out.l1f2 = in.l1f2;
-	out.l2 = in.l2;
-	out.l2f1 = in.l2f1;
-	out.l2f2 = in.l2f2;
-	out.la = in.la;
-	out.lb =  in.lb;
-	out.lc = in.lc;
-	out.ld = in.ld;
-	out.rho = (180*in.rho[*ind-1]) / pi;
-	out.theta = (180*in.theta[*ind-1]) / pi;
-	for (i=0;i<6;i++) out.center_freq_formula[i] = ' ';
-	for (i=6;i<24;i++) 
-		out.center_freq_formula[i] = in.c_f_formula[*ind-1][i-6];
-
-/* Receiver descriptor block */
-
-	out.obs_freq = in.center_freq[*ind-1];
-	out.rest_freq = in.rest_freq[*ind-1];
-	out.freq_resolution = - in.bandwidth[*ind-1] / diff; 
-	out.bandwidth = in.bandwidth[*ind-1];  
-	out.calibration_temp = in.noise_tube[*ind-1];
-	out.source_syst_temp = in.sig_system_temp[*ind-1];
-	out.ref_sys_temp = in.ref_sys_temp[*ind-1];
-	out.std_deviation_mean = in.theoretical_rms[*ind-1];
-	out.ref_point_nb = (diff / 2) + 1;
-	out.xvalue_ref_pt = in.center_vel[*ind-1];
-	out.deltax = in.delta_vel[*ind-1];
-	out.tot_integ_time = in.scan_duration;
-	out.nb_integrations = diff;
-	out.starting_pt_nb = 1;
-	out.h2o_opacity = in.zenith_opacity;
-	out.effint = in.integration[*ind-1];
-
-/*  Data  */
-
-	switch(in.observing_program) {
-	case 1: case 2:
-	   j = in.istart[*ind-1] -1;
-	   for (i=0;i<diff;i++) ostruct->data[i] = istruct->signal[j++];
-	   break;
- 	case 5: case 6:
-	   /* Request for SP data  */
-	   n0 = 0;
-	   getsprec_(ostruct,ind,&n0,&n0,errcode);
-	   if (*errcode != 0) return;
-	   break;
-	default: *errcode = 5; return;
-	}
-
-
-/* End of conversion */
-	*errcode=0;
-	return;
-}
-
-/*
-Cconversion takes an input structure of the Cont140 format and
-turns it into a structure of the sddformat format
-*/
-void cconversion_(istruct,ostruct,ind,errcode)
-	Cont140 *istruct;
-	sddformat *ostruct;
-	int *ind, *errcode;
-
-{
-#define in istruct->hdr 
-#define out ostruct->header
-
-	int i,j,k;
-	int imonth, iyear, iday;
-	char s[8];
-	double pi=3.141592654;
-	double diff = in.stop - in.start + 1;
-	double temp, day, temp2, hour_angle;
-	extern double jdtodate();
-	double lat140 = pi *38.43679111 / 180.;
-
-/* test; converts only continuum data file */
-	switch(in.observing_program) {
-	case 3: case 4: fillarray(out.back_end_desc,"STD A/D ",0); break ;
-	case 8:         fillarray(out.back_end_desc,"DIGITAL ",0); break ;
-	default: *errcode = 1; return;
-	}
-
-/*		class 0		*/
-
-	out.number_header_class = NUMBER_HEADER_CLASS;
-	out.class_location[0] = CLASS_0 + 1;
-	out.class_location[1] = out.class_location[0] + CLASS_1;
-	out.class_location[2] = out.class_location[1] + CLASS_2;
-	out.class_location[3] = out.class_location[2] + CLASS_3;
-	out.class_location[4] = out.class_location[3] + CLASS_4;
-	out.class_location[5] = out.class_location[4] + CLASS_5;
-	out.class_location[6] = out.class_location[5] + CLASS_6;
-	out.class_location[7] = out.class_location[6] + CLASS_7;
-	out.class_location[8] = out.class_location[7] + CLASS_8;
-	out.class_location[9] = out.class_location[8] + CLASS_9;
-	out.class_location[10] = out.class_location[9] + CLASS_10;
-	out.class_location[11] = out.class_location[10] + CLASS_11;
-	out.class_location[12] = out.class_location[11] + CLASS_12;
-	out.class_location[13] = out.class_location[12] + CLASS_13;
-	out.class_location[14] = out.class_location[13] + CLASS_14;
-
-/* Header and data lengths */
-
-	out.header_length = sizeof(sddheader);
-	out.data_length = diff*4;
-
-/* Basic information */
-
-	if (*ind > 0 && *ind <= 99) out.scan_number = in.scan_number + (*ind) / 100.0;
-	else if (*ind == 0) out.scan_number = in.scan_number + .98;
-	else out.scan_number = in.scan_number + .99;
-
-	i=0;
-	do{
-	s[i++]=in.observer_number % 10 + '0';
-	} while ((in.observer_number /= 10) > 0);
-
-	for (k=0,j=i-1;j>=0;k++,j--) out.observer_initials[k] = s[j];
-	for (i=0;i<14;i++) out.observer_name[i]=in.observer_name[i];
-
-	switch (in.telescope){
-	case 140 : fillarray(out.telescope,"NRAO 43M",0);
-	           break;	
-	case 300 : fillarray(out.telescope,"NRAO 93M",0);
-	           break;
-	case 45  : fillarray(out.telescope,"NRAO 43M",0);
-	           break;
-	default :  *errcode = 3; return;
-	}
-
-	for (i=0;i<4;i++) out.project_ident[i] = in.observer_name[i+14];
-	for(i=0;i<12;i++) out.source_name[i] = in.source_name[i];
-
-	switch(in.scan_type){
-	case 0: fillarray(out.type_data,"CONTNOCL",0); break;
-	case 1: fillarray(out.type_data,"CONTPLCL",0); break;
-	case 2: fillarray(out.type_data,"CONTCAL ",0); break;
-	case 3: fillarray(out.type_data,"CONTONOF",0); break;
-	case 4: fillarray(out.type_data,"CONTNOCL",0); break;
-	default:*errcode = 4; return;
-	}
-
-	fillarray(out.data_precision,"R*4     ",0);
-
-/* Pointing parameters */
-
-	out.user_azra_pointing = 15*in.ra_pointing_fudge;
-	out.user_eldec_pointing = in.dec_pointing_fudge;
-	out.pointing_constant[0] = in.pvls_p1;
-	out.pointing_constant[1] = in.pvls_p2;
-	out.pointing_constant[2] = in.pvls_p3;
-	out.orient_angle = (180*in.orientation)/pi;
-	out.radial_focus = in.focus;
-
-/* Observing parameters */
-
-	temp=in.julian_date + 2400000;
-	jdtodate_(&temp,&iyear,&imonth,&day);
-	iday = day;
-	out.ut_date = (iday + (imonth*100.) + (iyear*10000.)) / 10000;
-	temp = ((in.est*180)/(pi*15)) + 5;
-	if(temp > 24)
-	   out.utime = temp - 24;
-	else
-	   out.utime = temp;
-	out.lst = ((in.lst*180)/(pi*15));
-	out.nb_receiv_channels = 1;
-	out.nb_sw_variables = 1;
-	out.nb_phases = 1;
-	out.length_cycle = 1;
-	out.length_sample = in.sample_rate;
-
-/* Positions */
-
-	out.epoch = in.epoch_of_obs;
-	out.epoch_ra =(180*in.epoch_ra) / pi;
-	out.epoch_dec = (180*in.epoch_dec) / pi;
-	out.galactic_l = (180*in.gal_l) / pi;
-	out.galactic_b = (180*in.gal_b) / pi;
-	out.xposition = (180*in.ra_ind) / pi;
-	out.yposition = (180*in.dec_ind) / pi;
-
-	hour_angle = in.lst-in.app_ra;
-	temp = cos(hour_angle)*sin(lat140)-tan(in.app_dec)*cos(lat140);
-	out.azimuth = 180.+180.*atan2(sin(hour_angle),temp)/pi;
-	temp = sin(in.app_dec)*sin(lat140) + 
-		cos(in.app_dec)*cos(lat140)*cos(hour_angle);
-	out.elevation = 180*asin(temp) / pi;
-
-	for (i=0;i<3;i++) out.desc_origin[i] = in.descriptive_origin[i];
-
-	switch (in.position_code) {
-	case 0: fillarray(out.coord_sys_code,"        ",0); break;
-	case 1: fillarray(out.coord_sys_code,"APPHADC ",0); 
-		out.sourcex = (180*(in.lst-in.app_ra)) / pi;
-		out.sourcey = (180*in.app_dec) / pi;break;
-	case 2: fillarray(out.coord_sys_code,"EPOCRADC",0);
-		out.sourcex = (180*in.epoch_ra) / pi;
-		out.sourcey = (180*in.epoch_dec) / pi;break;
-	case 3: fillarray(out.coord_sys_code,"APPRADC ",0);
-		out.sourcex = (180*in.app_ra) / pi;
-		out.sourcey = (180*in.app_dec) / pi;break;
-	case 4: fillarray(out.coord_sys_code,"GALACTIC",0);
-		out.sourcex = (180*in.gal_l) / pi;
-		out.sourcey = (180*in.gal_b) / pi;break;
-	case 5: fillarray(out.coord_sys_code,"AZEL    ",0);
-		out.sourcex = (180*in.azimuth) / pi;
-		out.sourcey = (180*in.elevation) / pi;break;
-	case 6: fillarray(out.coord_sys_code,"USERDEF ",0);
-		out.sourcex = (180*in.horizontal_desc) / pi;
-		out.sourcey = (180*in.vertical_desc) / pi;break;
-	default: *errcode = 5; return;
-	}
-
-/* Environment */
-
-	out.amb_temp = in.environment_values_1[0] / 128.0;
-	out.pressure = in.environment_values_2[2] / 12.80;
-	out.dew_point = in.environment_values_2[0] / 128.0;
-
-/* Map parameters */
-
-	out.deltax_rate = 60*in.h_coord_rate*180/pi;
-	out.deltay_rate = 60*in.v_coord_rate*180/pi;
-	fillarray(out.xy_ref_frame_code,"CARTSCAN",0);
-
-/* Telescope dependent parameters */
-
-	out.rho = (180*in.rho) / pi;
-	out.theta = (180*in.theta) / pi;
-
-/* Receiver descriptor block */
-
-	out.freq_resolution = in.DCR_scale_factor; 
-	out.bandwidth = 0.0;
-	out.calibration_temp = in.noise_tube;
-	out.source_syst_temp = in.DCR_system_temp;
-	out.ref_point_nb = 1;
-	temp = out.deltax_rate * cos(out.sourcey*pi/180.);
-	temp2 = out.deltay_rate;
-	out.deltax = in.sample_rate * hypot(temp, temp2) / 3600.;
-	out.xvalue_ref_pt = 0.0;
-	out.tot_integ_time = in.sample_rate;
-	out.nb_integrations = diff;
-	out.starting_pt_nb = 1;
-	out.h2o_opacity = in.zenith_opacity;
-
-/*  Data  */
-
-	for (i=0;i<diff;i++) ostruct->data[i] = in.signal[i];
-
-/* End of conversion */
-	*errcode=0;
-	return;
-}
-
diff -uNr 3.5/utilities/conversion/ldump.f unipops-3.6/utilities/conversion/ldump.f
--- 3.5/utilities/conversion/ldump.f	2000-03-16 11:30:25.000000000 -0700
+++ unipops-3.6/utilities/conversion/ldump.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,79 +0,0 @@
-C
-      PROGRAM LDUMP
-C
-c      @(#)ldump.f	5.1 06/22/94
-c
-C Searches through scans and finds only those spectral line scans with
-C matching projectcodes.  These matching scans are placed in a file
-C ldata.'projectcode'
-C
-      INTEGER*2 IBUF(2560), j, istrt, ierr, numarg, istp
-      character*8 projcode, cstrt, cstp, oobs, site, projcod1
-      integer*4 irtn, iargc, ii1, ii2, ii3, i5120, ierr4
-      integer*4 i4a,nactual,i4b,iscan, hostnm, getlog, if4
-      real RBUF(1280), strt, stp, rscans(32766)
-      real*8 dprojcode,doobs,dsite
-c
-      equivalence (ibuf(1),rbuf(1))
-      equivalence (projcode,dprojcode),(oobs,doobs),(site,dsite)
-c
-      DATA   ii1/1/, ii2/2/, ii3/3/, i5120/5120/ 
-C
-      numarg = iargc()
-      if (numarg .le. 0) then
-	write(0,*) 'Must specify projectcode'
-	call exit(ii1)
-      else
-	call getarg(ii1, projcod1)
-	call uppercase(projcod1, projcode)
-	irtn = hostnm(site)
-	irtn = getlog(oobs)
-      endif
-      call openaccess(dprojcode,doobs,dsite,irtn)
-c
-      if (irtn .ne. 0) then
-         write (0,*) 'Trouble with on-line data -- Terminating'
-         call exit(ii1)
-      endif
-C
-      if (numarg .gt. 1) then
-	call getarg(ii2, cstrt)
-	read(cstrt, 10,iostat=ierr) istrt
-10	format(i8)
-	if (ierr .ne. 0 .or. istrt .lt. 0) then
-	   write(0,*) 'Bad starting scan number: ', cstrt
-	   call exit(ii1)
-	endif
-	strt = float(istrt)
-      else
-	strt = 0.0
-      endif
-c
-      if (numarg .gt. 2) then
-	call getarg(ii3, cstp)
-	read(cstp, 10,iostat=ierr) istp
-	if (ierr .ne. 0 .or. istp .lt. istrt) then
-	   write(0,*) 'Bad starting or stoping scan number: ',
-     .		 cstrt, ' ', cstp
-	   call exit(ii1)
-	endif
-	stp = float(istp)
-      else
-	stp = 999999.0
-      endif
-C
-  70  nactual = 32766
-      i4a = 0
-      i4b = 32766
-      call gscanlist2(nactual,i4b,rscans,i4a)
-      do 90 j = 1, nactual
-         iscan = rscans(j)
-	 if (iscan.ge.strt .and. iscan.le.stp) then
-            call gscan(iscan,if4,ibuf(1),irtn)
-            if (irtn.eq.0) call writebuff (ierr4, i5120, rbuf)
-	 endif
-  90  CONTINUE
-      call closeaccess()
-      STOP
-C----------------------------------------------------------------------
-      END
diff -uNr 3.5/utilities/conversion/params.inc unipops-3.6/utilities/conversion/params.inc
--- 3.5/utilities/conversion/params.inc	2000-03-16 11:30:03.000000000 -0700
+++ unipops-3.6/utilities/conversion/params.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,35 +0,0 @@
-C-------------------------------------------------------------------------------
-C  @(#)params.inc	1.1 09/10/98
-C-------------------------------------------------------------------------------
-C
-C   This contains parameters used in appl.inc and elsewhere 
-C   in the code which specify the size of the data array and
-C   the headers.  They are placed here because there are a
-C   few places which need to know these values without also
-C   including appl.inc.  Changing these values does most
-C   of the work, but care must also be taken to change the
-C   values sdd.h and tuc_online_sdd.h.  In addition, any
-C   change to MAX_DATA_POINTS must be reflect in amathparser.f
-C   which contains a POPS line which is not interpreted until
-C   run-time:   'amathon; for n_n = 1 to 16384'.
-C   In the utility area, in fits you need to change unipops.h
-C   and in the main utility area you need to change U2f_trans.
-C   There are also a number of occurances in the explain
-C   text.  Simply search for the current value of MAX_DATA_POINTS.
-C   Finally, make sure that the RAPPLSIZE in appl.inc is large enough.
-C
-C                the maximum number of data points found in
-C                one of the data arrays
-      integer*4 MAX_DATA_POINTS 
-C                the size of the HDR in terms of R*8 values
-C                taking into account any padding (i.e. this
-C                is after the SDD structure on disk has been
-C                passed through conversion2).
-      integer*4 PADDED_HDR_SIZE
-C                size of padded header + data in r*4 units
-      integer*4 HDU_FLOAT_SIZE
-c	and actually set their values here
-      parameter (PADDED_HDR_SIZE=395)
-      parameter (MAX_DATA_POINTS=16384)
-      parameter (HDU_FLOAT_SIZE=(PADDED_HDR_SIZE*2 + MAX_DATA_POINTS))
-C
diff -uNr 3.5/utilities/conversion/pcieee.f unipops-3.6/utilities/conversion/pcieee.f
--- 3.5/utilities/conversion/pcieee.f	2000-03-16 11:30:33.000000000 -0700
+++ unipops-3.6/utilities/conversion/pcieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,135 +0,0 @@
-      program pcieee
-c
-c     @(#)pcieee.f	5.1 06/22/94
-c
-c     Reads in a record from either a IEEE KEEP and outputs a record in PC
-c     KEEP or reads in a PC KEEP record and outputs a IEEE KEEP record.
-c     Uses Standard Input and Standard Output so that the user can implement
-c     pipes to do further conversions.
-c
-c     Works for both continuum and line keep files.  Scans of different
-c     types can be intermixed in the input file.
-c
-c     The user can specify whether continuum or line records are to be ignored
-c     by specifying a 'c' (for continuum only), an 'l' (for line only), or
-c     nothing (for both line and continuum) on the command line.
-c
-c     NOTE: the user should redirect both input and output when using this 
-c     program. Program uses standard error to report on its progress
-c
-      character*1 ltype(19), ctype(17), arg
-      character*5120 cinbuff, coutbuff
-      integer*4 nltype(19), nctype(17), icnum, ilnum, iargc, ibuffsize,
-     .		ierr, long
-      integer*2 iinbuff(2560), ioutbuff(2560), itype, nin, ktel,
-     .		ktos, lsno, li 
-      real rinbuff(1280), routbuff(1280)
-      logical cont, line, isitline, isitcont
-c
-      equivalence (rinbuff, cinbuff), (iinbuff, cinbuff)
-      equivalence (routbuff, coutbuff), (ioutbuff, coutbuff)
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ltype/'r','c','i','c','d','i','r','i','r','i','r','i',
-     1		 'r','d','c','d','r','i','r'/
-      data nltype/2 , 12, 1 , 18, 1 , 4 , 2 , 20, 23, 2 , 1 , 4 ,
-     1            73, 8 , 72, 6 , 4 ,112, 0 /
-c
-      data ctype/'r','i','c','i','c','d','i','r','i','r','i','r',
-     1		 'i','r','i','r','r' /
-      data nctype/1 , 2 , 12, 1 , 18, 1 , 4 , 2 , 12, 1 , 8 , 22,
-     1            2 , 1 , 4 , 16,1211/
-c
-      data icnum/17/, ilnum/19/
-c
-c     Defines the format of the spectral line and continuum record read in.  
-c     *TYPE defines the order of word types (d = d.prec, r = real, i = int*2, 
-c     c = char*1, b = byte to bypass in input record, s = byte to skip in output
-c     record) and *NTYPE the number of succesive words of the corresponding 
-c     type (e.g. 2 reals, followed by 12 C*1, 1 Integer, 18 C*1, skip two 
-c     ouput bytes, 1 double precision ...).
-c
-c     *CNUM and *LNUM give number of entries in the continuum and line versions
-c     of *type and *ntype
-c
-      data ibuffsize/5120/, lsno/1/, ktos/34/, ktel/33/
-c     IBUFFSIZE = Size of input/output buffers
-c     LSNO = location of scan number in input and output buffers
-c     KTOS = location of obs. type
-c     KTEL = telescope name (140 or 300)
-c
-      nin = 0
-c     NIN = number of records read in so far
-c
-      cont = .true.
-      line = .true.     
-      if (iargc() .gt. 0) then
-	call getarg(long(1), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	endif
-      endif
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-100   continue
-c
-	call readbuff(ierr, ibuffsize, cinbuff)
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. ibuffsize) then
-	  write(0,*) "PCIEEE: Error on read"
-	  goto 999
-	endif
-	nin = nin + 1
-c	Read in a record
-c
- 	itype = iinbuff(ktos)
-	if (itype .ge. 256) itype = itype / 256
-	if (.not. isitcont(itype) .and. .not. isitline(itype)) then
-	   write(0,*) "PCIEEE: Bad scan type:", itype
-	   goto 999
-	endif
-c	ITYPE = a flag telling whether this is a continuum or spectral line
-c	        scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c	If already converted, 256 = SPOWER, 512 = TPOWER, 768 = ONOFF, 
-c	1024 = CONT, 2048 = DCR
-c
-	if ( (line .and. isitline(itype)) .or.
-     .       (cont .and. isitcont(itype)) ) then
-c
-	   if (isitline(itype)) then
-	      if (iinbuff(ktel) .eq. 300) then
-		nltype(ilnum) = 408
-	      else
-		nltype(ilnum) = 1048
-	      endif
-c	      Converts only the number of data points specific for each
-c	      telescope.
-c
-	      call cvtpcieee(cinbuff,coutbuff,ltype,nltype,ilnum)
-	   else
-	      call cvtpcieee(cinbuff,coutbuff,ctype,nctype,icnum)
-	   endif
-c	   Converts from input MODCOMP binary to the binary format of the 
-c	   IEEE KEEP. 
-c
-	   call writebuff(ierr, ibuffsize, coutbuff)
-	   if (ierr .ne. ibuffsize) then
-		write(0,*) "PCIEEE: Error on write"
-		goto 999
-	   endif
-c	   Writes out converted scan
-c
-	endif
-c
-	goto 100
-c
-999   stop
-c
-      end
-c
diff -uNr 3.5/utilities/conversion/rearrange.f unipops-3.6/utilities/conversion/rearrange.f
--- 3.5/utilities/conversion/rearrange.f	2000-03-16 11:29:56.000000000 -0700
+++ unipops-3.6/utilities/conversion/rearrange.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,156 +0,0 @@
-      logical function rearrange(lnew, posit)
-c
-c     @(#)rearrange.f	5.1 06/22/94
-c
-c     Rearranges a continuum scan into 1 scan per feed, max of
-c     1190 data points. If POSIT is TRUE, then the positions are
-c     stored in the last two feeds
-c
-      logical lnew, posit
-c
-      character*4 ctempin, ctempout
-      real*4 rtempin, rtempout
-      integer*4 numfeed, numreal, j, i, j1, jincr, nextpoint, npts
-c
-      equivalence (rtempin, ctempin), (rtempout, ctempout)
-c
-      save nextpoint
-c
-      include 'cvttele.inc'
-c
-      rearrange = .false.
-c
-      numfeed = min(icvtbuff(klr),16)
-      numreal = numfeed
-      if (posit) numfeed = numfeed + 2
-c     NUMFEED = number of records to be used in output (if POSIT is true,
-c	this includes two records for x and y positions).
-c     NUMREAL = number of feeds of real data (NUMREAL = NUMFEED if POSIT
-c	is FALSE).
-c
-      if (lnew) then
-c	(i.e., this is a new scan)
-c
-	do 50 j = 1, numfeed
-c
-	   do 45 i = 1, lrho
-		routbuff(i,j) = rcvtbuff(i)
-45		continue
-	   do 46 i = lrho+1, outbuffsize/4
-		routbuff(i,j) = 0.0
-46		continue
-c	   Move the header stuff common to all feeds into the output buffers.
-c	   Clear out remainder of buffer.
-c
-	   ioutbuff(kstart,j) = ldbout+1
-	   ioutbuff(kmpst,j) = ioutbuff(kstart,j)
-c	   Add header info that is not passed in cvt buffers
-c
-	   if (j .le. numreal) then
-	     routbuff(lsno,j) = rcvtbuff(lsno) + float(j)/100.
-	     ioutbuff(kfeed,j) = j
-	   else 
-	     routbuff(lsno,j) = rcvtbuff(lsno) + (99-numfeed+j)/100.
-	     ioutbuff(kfeed,j) = 99-numfeed+j
-	   endif
-c	   Modify scans numbers to be old scan no. + feed no. / 100. or
-c	   a false feed number (near 99) if POSIT is true for posiition
-c	   records
-c
-	   if (icvtbuff(klr) .le. 4 .and. j .le. numreal) then
-	     routbuff(lrhoout,j) = rcvtbuff(lrho+j)
-	     routbuff(ltheout,j) = rcvtbuff(lthe+j)
-	     routbuff(lntout,j) = rcvtbuff(lnt+j)
-	     if (rcvtbuff(lscle+j) .gt. 0.0) then
-		routbuff(lscleout,j) = rcvtbuff(lscle+j)
- 	     else
-		routbuff(lscleout,j) = 1.0
-	     endif
-c	     Protect against a bad scale factor.
-c
-	     routbuff(lstm2out,j) = rcvtbuff(lstm2+j)
-	   else
-	     routbuff(lrhoout,j) = 0.0
-	     routbuff(ltheout,j) = 0.0
-	     routbuff(lntout,j) = 1.0
-	     routbuff(lscleout,j) = 1.0
-	     routbuff(lstm2out,j) = 0.0	  
-	   endif   
-50	   continue
-c       Move over RHO, THETA, Noise Tube, Scale Factor, and System Temp for the
-c	individual feeds into their correct locations in the output buffers.  
-c	Use default values if number of feed is greater than 4.  
-c
-	nextpoint = 1
-c	NEXTPOINT = the next data point to be written into the output buffers
-c
-      endif
-c
-c     For both old and new scans, do the following:
-c
-      if (nextpoint .le. 1190) then
-c	(i.e., there is more room to add another subscan)
-c
-	npts = min(icvtbuff(kin)+nextpoint-1,1190)
-c	NPTS = number of data points in this scan so far. Can't exceed 1190
-c
-	do 100 j = 1, numreal
-c
-	   ioutbuff(kstop,j) = npts + ioutbuff(kstart,j) - 1
-	   ioutbuff(kmpstp,j) = ioutbuff(kstop,j)
-	   ioutbuff(kin,j) = npts
-c	   Update some header info
-c
-	   j1 = kdb + 4 + j
-	   jincr= icvtbuff(klr) + 4
-c	   J1 = starting I*2 data point in converted buffer
-c	   JINCR = number of I*2 words between data points for the same feed.
-c		NOTE: the number 4 comes from the 4 i*2 words (or 2 R*4 words)
-c		which make up the H and V coordinates attached to each data
-c		point.  (See description of telescope tape format.)
-c
-	    do 90 i = ldbout+nextpoint, ldbout+npts
-		routbuff(i,j) = routbuff(lscleout,j)*float(icvtbuff(j1))
-		j1 = j1 + jincr
-90		continue
-100	    continue
-c	Scale data by appropriate scale factors and store in output buffer
-c	as reals.
-c
-        if (posit) then
-	 do 110 j = numreal+1, numfeed
-c
-	   ioutbuff(kstop,j) = npts + ioutbuff(kstart,j) - 1
-	   ioutbuff(kmpstp,j) = ioutbuff(kstop,j)
-	   ioutbuff(kin,j) = npts
-c	   Update some header info
-c
-	   j1 = kdb/2 + (j-numreal)
-	   jincr= (icvtbuff(klr) + 1)/2 + 2
-c	   J1 = starting point in buffer for positions
-c	   JINCR = number of R*4 words between positions words
-	    do 109 i = ldbout+nextpoint, ldbout+npts
-		rtempin = rcvtbuff(j1)
-		call cvtmodflt(ctempin, ctempout)
-		routbuff(i,j) = rtempout
-		j1 = j1 + jincr
-109		continue
-110	    continue
-	endif
-c
-        nextpoint = npts + 1
-c
-      endif
-c
-      rearrange = .true.
-c
-      return
-      end
-
-
-
-
-
-
-c
-
diff -uNr 3.5/utilities/conversion/rwbuff.c unipops-3.6/utilities/conversion/rwbuff.c
--- 3.5/utilities/conversion/rwbuff.c	2000-03-16 11:29:57.000000000 -0700
+++ unipops-3.6/utilities/conversion/rwbuff.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,30 +0,0 @@
-#include <stdio.h>
-
-/*  @(#)rwbuff.c	5.1 06/22/94   */
-
-readb_(num_read, try_read, buffer, char_len)
-
-char *buffer;
-int *try_read, *num_read, char_len;
-
-{
-      int try_to_read;
-
-      try_to_read = *try_read;
-      *num_read = read(0,buffer,try_to_read);
-
-} 
-
-int writeb_(num_write, try_write, buffer, char_len)
-
-char*buffer;
-int *try_write, *num_write, char_len;
-
-{
-  	int try_to_write;
-
-	try_to_write = *try_write;
-	*num_write = write(1,buffer,try_to_write);
-
-}
-
diff -uNr 3.5/utilities/conversion/rwbuffer.f unipops-3.6/utilities/conversion/rwbuffer.f
--- 3.5/utilities/conversion/rwbuffer.f	2000-03-16 11:29:57.000000000 -0700
+++ unipops-3.6/utilities/conversion/rwbuffer.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,48 +0,0 @@
-      subroutine readbuff(ierr, ibytes, buffer)
-c
-c     @(#)rwbuffer.f	5.1 06/22/94
-c
-c     Reads in a buffer from standard input
-c
-      character*(*) buffer
-      integer*4 ierr, ibytes, iinbytes, iin
-c
-      iinbytes = ibytes
-      ierr= 0
-c
-10    continue
-         call readb(iin, iinbytes, buffer(ierr+1:) )
-	 if(iin .le. 0) then
-	    ierr = iin
-         else
-	    iinbytes = iinbytes - iin
-	    ierr = ierr + iin
-	    if (iinbytes .gt. 0) goto 10
-	 endif
-c
-      return
-      end
-c
-      subroutine writebuff(ierr, ibytes, buffer)
-c
-c     Writes out a buffer to standard output
-c
-      character*(*) buffer
-      integer*4 ierr, ibytes, iout, ioutbytes, iin
-c
-      ioutbytes = ibytes
-      ierr= 0
-c
-10    continue
-         call writeb(iout, ioutbytes, buffer(ierr+1:) )
-	 if(iout .le. 0) then
-	    ierr = iin
-         else
-	    ioutbytes = ioutbytes - iout
-	    ierr = ierr + iout
-	    if (ioutbytes .gt. 0) goto 10
-	 endif
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/conversion/sdd2ieee.f unipops-3.6/utilities/conversion/sdd2ieee.f
--- 3.5/utilities/conversion/sdd2ieee.f	2000-03-16 11:30:35.000000000 -0700
+++ unipops-3.6/utilities/conversion/sdd2ieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,108 +0,0 @@
-      program sdd2ieee
-c
-c     @(#)sdd2ieee.f	5.1 06/22/94
-c
-c     Reads in the data part of a SDD SAVE/KEEP/DATA file and converts the
-c     data to IEEE KEEP format.
-c
-      character*512 cindat(100), garbage, cpaddat(100)
-      character*5120 cout
-      character*1 arg
-      real rout(1280)
-      integer*2 iindat(256,100), numclass, maxsize, iout(2560), i,
-     .          ier2
-      integer*4 insize, outsize, ierr, numbytes, numtoread, i1, lorc,
-     .		long, iargc
-      logical cont, line
-      real*8 dout(640), dindat(64,100)
-c
-      equivalence (cindat, iindat, dindat), (cout, dout, iout, rout)
-c
-      data insize/512/, outsize/5120/, maxsize/100/, i1/1/
-c
-      cont = .true.
-      line = .true.     
-      if (iargc() .gt. 0) then
-	call getarg(long(1), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	endif
-      endif
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-100	call readbuff(ierr, insize, cindat(1))
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. insize) then
-	  write(0,*) "SDD2IEEE: Error on read"
-	  goto 999
-	endif
-c       Read in the first possible data record of the scan
-c 
-	numclass = iindat(1,1)
-        if (numclass .le. 0 .or. numclass .gt. 14) goto 100
-c
-        numbytes = dindat(5,1)+dindat(6,1)+4
-	if (mod(numbytes, insize) .ne. 0) then
-	   numtoread = numbytes/insize + 1
-	else
-	   numtoread = numbytes/insize
-	endif
-c
-        do 50 i = 2, numtoread
-	   if (i .le. maxsize) then
-		call readbuff(ierr, insize, cindat(i))
-	   else
-		call readbuff(ierr, insize, garbage)
-	   endif
-	   if (ierr .ne. insize) then
-		write(0,*) "SDD2IEEE: Error on read"
-		goto 999
-	   endif
-50	   continue
-c       Read in the rest of the scan and store as much as can be stored in indat
-c
-	do 60 i = 1, outsize/2
-	   iout(i) = 0
-60	   continue
-c       Zero out the output buffer
-c
-        call conversion2(cindat, cpaddat, ier2)
-        if (ier2 .ne. 0) then
-           write(0, *) 'SDD2IEEE: Internal conversion of scan failed ',
-     .                 'with error', ierr
-           goto 999
-        endif
-        call lineorcont(cpaddat,lorc)
-c	Is this a line or continuum scan?  LORC = 0 for CONT, 1 for LINE, 
-c	-1 for unknown.
-c
-	if (lorc .eq. 1 .and. line) then
-	   call lcvtsddieee(cpaddat, dout, i1, ierr)
-	else if (lorc .eq. 0 .and. cont) then
-	   call ccvtsddieee(cpaddat, dout, i1, ierr)
-	else
-	   write(0,*) "SDD2IEEE: Bad type of scan"
-	   goto 999
-	endif
-        if (ierr .ne. 0) then
-	    write(0, *) 'SDD2IEEE: conversion of scan failed with error',
-     .			    ierr
-            goto 999
-        endif
-c	Convert from SDD to IEEE
-c
-	call writebuff(ierr, outsize, cout)
-	if (ierr .ne. outsize) then
-	   write(0,*) "SDD2IEEE: Error on write"
-	   goto 999
-	endif
-c
-      goto 100
-c
-999   stop
-      end
-c
diff -uNr 3.5/utilities/conversion/tele2ieee.f unipops-3.6/utilities/conversion/tele2ieee.f
--- 3.5/utilities/conversion/tele2ieee.f	2000-03-16 11:30:32.000000000 -0700
+++ unipops-3.6/utilities/conversion/tele2ieee.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,215 +0,0 @@
-      program tele2ieee
-c
-c     @(#)tele2ieee.f	5.1 06/22/94
-c
-c     Reads in a record presumably from a 140-ft telescope tape and outputs
-c     a record in IEEE KEEP format.  Uses Standard Input and Standard
-c     Output so that the user can implement pipes to do further conversions.
-c
-c     NOTE:  WORKS only for telescope tapes made AFTER JUNE 1989 when all 
-c     continuum scans were made to have the same record size.
-c
-c     For Spectral line records, records within a scan are averaged using
-c     the appropriate INT/Tsys**2 weighing so one output record is produced for
-c     every scan regardless of number of input records in scan.
-c
-c     For continuum records, data for scans which exceed one record are tacked 
-c     together to the maximum allowed by the output record size (1024 data 
-c     points).  One output record is generated for each feed so, in principle, 
-c     one input record could produce up to 18 output records (the maximum # of
-c     feeds allowed plus two for positions), or many input records could produce 
-c     only one output record.
-c
-c     The user can specify whether continuum or line records are to be ignored
-c     by specifying a 'c' (for continuum only), an 'l' (for line only), or
-c     nothing (for both line and continuum) on the command line.
-c
-c     NOTE: the user should redirect both input and output when using this 
-c     program. Program uses standard error to report on its progress
-c
-      character*1 ltype(23), ctype(17), arg
-      integer*4 lntype(23), cntype(17), iargc, icnum, ilnum, ierr, 
-     .		inbytes, long	
-      logical average, rearrange, cont, line, lnew, posit, first,
-     .	      isitline, isitcont
-      integer*2 nin, i, itype, nextbyte, nfeednew, nfeedold, li
-c
-      include 'cvttele.inc'
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ltype/'r','c','i','c','b','d','i','r','i','r','i',
-     1           'r','i','r','d','c','d','r','i','b','i','b','r'/
-      data lntype/2 , 12, 1 , 18, 2 , 1 , 4 , 2 , 20, 23, 2 ,
-     1            1 , 4 , 73, 8 , 72, 6 , 4 , 22,392, 90, 20, 0 /
-c
-      data ctype/'r','i','c','i','c','b','d','i','r','i','r','i','r',
-     1           'i','r','b','i'/
-      data cntype/1 , 2 , 12, 1 , 18, 2 , 1 , 4 , 2 , 22, 22, 2 , 1 , 
-     1            4 , 46,372,2016/
-c
-      data icnum/17/, ilnum/23/
-c
-c     Defines the format of the spectral line and continuum record read in.  
-c     *TYPE defines the order of word types (d = d.prec, r = real, i = int*2, 
-c     c = char*1, b = byte to bypass in input record, s = byte to skip in output
-c     record) and *NTYPE the number of succesive words of the corresponding 
-c     type (e.g. 2 reals, followed by 12 C*1, 1 Integer, 18 C*1, skip two 
-c     ouput bytes, 1 double precision ...).
-c
-c     *CNUM and *LNUM give number of entries in the continuum and line versions
-c     of *type and *ntype
-c
-      lnew = .true.
-      first = .true.
-      nin = 0
-c     NIN = number of records read in so far
-c     NOUT = number of records read in so far in the present scan
-c     LNEW = true if the record just read in is for a new scan else it is
-c     	     false.
-c     FIRST = TRUE if this is the first scan successfully read in 
-c
-      cont = .true.
-      line = .true.     
-      posit = .false.
-c
-      do 9 i = 1, min(2,iargc())
-	call getarg(long(i), arg)
-	if (arg .eq. 'c') then
-	  line = .false.
-	else if (arg .eq. 'l') then
-	  cont = .false.
-	else if (arg .eq. 'p') then
-	  posit = .true.
-	endif
-9       continue
-c     Reads command line and determines whether to eliminate either
-c     spectral line or continuum scans
-c	
-99    continue
-c
-	call readbuff(ierr, long(ktosin*2), cinbuff)
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. ktosin*2) then
-	  write(0,*) "TELE2IEEE: Error on read"
-	  goto 999
-	endif
-c	Read in first KTOSIN*2 bytes (or KTOSIN I*2 words).  Must stop reading
-c	in order to determine what kind of record (cont or line) and then how 
-c	many more bytes are to be read.
-c
-	itype = iinbuff(ktosin)
-	nextbyte = ktosin*2 + 1
-	if (isitcont(itype)) then
-	   inbytes = cinbuffsize - ktosin*2
-	else if (isitline(itype)) then
-	   inbytes = linbuffsize - ktosin*2
-	   if (itype .eq. 1) then
-		lntype(ilnum) = 2072
-	   else
-		lntype(ilnum) = 1048
-	   endif
-c	   Modify the last entry in LNTYPE depending upon whether the scan
-c	   is Switched or Total power.  No need to convert the last 1024
-c	   data points for a T-power scan.
-c
-	else
-	   write(0,*) "TELE2IEEE: Bad scan type:", itype
-	   goto 999
-	endif
-c	ITYPE = a flag telling whether this is a continuum or spectral line
-c	        scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c		NOTE:  We are relying on the fact that the integer*2 
-c		representations in MODCOMP and in the host machines are 
-c		identical.  More work would be needed if they weren't.
-c	NEXTBYTE = number of byte which should be next read in.
-c	INBYTES = number of bytes still to read to get to end of record.
-c	
-	call readbuff(ierr, inbytes, cinbuff(nextbyte:) )
-	if (ierr .ne. inbytes) then
-	   write(0,*) "TELE2IEEE: Error on read"
-	   goto 999
-	endif
-c
-	nin = nin + 1
-c	Finish reading record
-c
-	if ( (line .and. isitline(itype)) .or.
-     .       (cont .and. isitcont(itype)) ) then
-c
-	   if (isitline(itype)) then
-	      call cvtmodieee(cinbuff,ccvtbuff,ltype,lntype,ilnum)
-	      nfeednew = 1
-	   else 
-	      call cvtmodieee(cinbuff,ccvtbuff,ctype,cntype,icnum)
-	      nfeednew = min(icvtbuff(klr),16)
-	      if (posit) nfeednew = nfeednew + 2
-	   endif
-c	   Converts from input binary to the binary format of the host 
-c	   machine.  Finds the number of output records possible (1 for
-c	   line scans, up to 16 for cont scans; if positions are desired,
-c	   then 18 feeds are allowed (two for x and y pos.) )
-c
-	   if (.not.lnew .and. 
-     1	      int(rcvtbuff(lsno)).ne.int(routbuff(lsno,1)) ) then
-		do 101 i = 1, nfeedold
-			call writebuff(ierr, long(outbuffsize), 
-     .					           coutbuff(i))
-	   		if (ierr .ne. outbuffsize) then
-				write(0,*) "TELE2IEEE: Error on write"
-				goto 999
-	  		endif
-101			continue
-c	    	Writes out already processed scan if a new scan has been
-c	    	read in. Uses change in scan number to trigger a new scan.
-c
-		lnew = .true.
-		nfeedold = nfeednew
-c  	        Reset new scan flag (LNEW) and feed number for next record/scan.
-c
-	    endif
-c
-            if (isitline(itype)) then
-c
-	       if (average(lnew) ) then
-		lnew = .false.
-		if(first) then
-		   nfeedold = nfeednew
-		   first = .false.
-		endif
-	       endif
-c	       Averages the record in cvtbuff into outbuff 
-c
-	    else
-c
-	       if (rearrange(lnew, posit) ) then
-		lnew = .false.
-		if(first) then
-		   nfeedold = nfeednew
-		   first = .false.
-		endif
-	       endif
-c	       Adds Subscans together from cvtbuff to outbuff
-c
-	    endif
-c
-        endif
-c
-	goto 99
-c
-999   if (.not.lnew) then
-	do 102 i = 1, nfeedold	
-		call writebuff(ierr, long(outbuffsize), coutbuff(i))
-	        if (ierr .ne. outbuffsize) then
-		     write(0,*) "TELE2IEEE: Error on write"
-		     stop
-	        endif
-102		continue
-      endif
-c     Writes the last scan out
-c
-      stop
-      end
-c
diff -uNr 3.5/utilities/conversion/tele2recs.f unipops-3.6/utilities/conversion/tele2recs.f
--- 3.5/utilities/conversion/tele2recs.f	2000-03-16 11:30:40.000000000 -0700
+++ unipops-3.6/utilities/conversion/tele2recs.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,122 +0,0 @@
-      program tele2recs
-c
-c     @(#)tele2recs.f	5.1 06/22/94
-c
-c     Reads in a record presumably from a 140-ft telescope tape and outputs
-c     a record in IEEE KEEP format.  Uses Standard Input and Standard
-c     Output so that the user can implement pipes to do further conversions.
-c
-c     NOTE:  WORKS only for telescope tapes made AFTER JUNE 1989 when all 
-c     continuum scans were made to have the same record size.
-c
-c     For Spectral line records, records are simply read and written (with
-c     translation to IEEE).
-c
-c     For continuum records, data is SKIPPED.
-c
-c     NOTE: the user should redirect both input and output when using this 
-c     program. Program uses standard error to report on its progress
-c
-      character*1 ltype(23)
-      integer*4 lntype(23), ilnum, ierr, inbytes, long	
-      integer*2 i, itype, nextbyte, li
-      logical isitline, isitcont
-c
-      include 'cvttele.inc'
-c
-      isitline(li) =  (li.eq.1 .or. li.eq.2 .or. li.eq.5 .or. li.eq.6)
-      isitcont(li) =  (li.eq.3 .or. li.eq.4 .or. li.eq.8)
-c
-      data ltype/'r','c','i','c','b','d','i','r','i','r','i',
-     1           'r','i','r','d','c','d','r','i','b','i','b','r'/
-      data lntype/2 , 12, 1 , 18, 2 , 1 , 4 , 2 , 20, 23, 2 ,
-     1            1 , 4 , 73, 8 , 72, 6 , 4 , 22,392, 90, 20, 0 /
-c
-      data ilnum/23/
-c
-c     Defines the format of the spectral line and continuum record read in.  
-c     *TYPE defines the order of word types (d = d.prec, r = real, i = int*2, 
-c     c = char*1, b = byte to bypass in input record, s = byte to skip in output
-c     record) and *NTYPE the number of succesive words of the corresponding 
-c     type (e.g. 2 reals, followed by 12 C*1, 1 Integer, 18 C*1, skip two 
-c     ouput bytes, 1 double precision ...).
-c
-c     *LNUM give number of entries in the continuum and line versions
-c     of *type and *ntype
-c
-99    continue
-c
-	call readbuff(ierr, long(ktosin*2), cinbuff)
-	if (ierr .eq. 0) then
-	  goto 999
-	else if (ierr .ne. ktosin*2) then
-	  write(0,*) "TELE2RECS: Error on read"
-	  goto 999
-	endif
-c	Read in first KTOSIN*2 bytes (or KTOSIN I*2 words).  Must stop reading
-c	in order to determine what kind of record (cont or line) and then how 
-c	many more bytes are to be read.
-c
-	itype = iinbuff(ktosin)
-	nextbyte = ktosin*2 + 1
-	if (isitcont(itype)) then
-	   inbytes = cinbuffsize - ktosin*2
-	else if (isitline(itype)) then
-	   inbytes = linbuffsize - ktosin*2
-	   if (itype .eq. 1) then
-		lntype(ilnum) = 2072
-	   else
-		lntype(ilnum) = 1048
-	   endif
-c	   Modify the last entry in LNTYPE depending upon whether the scan
-c	   is Switched or Total power.  No need to convert the last 1024
-c	   data points for a T-power scan.
-c
-	else
-	   write(0,*) "TELE2RECS: Bad scan type:", itype
-	   goto 999
-	endif
-c	ITYPE = a flag telling whether this is a continuum or spectral line
-c	        scan (1 = SPOWER, 2 = TPOWER, 3 = ONOFF, 4 = CONT, 8 = DCR)
-c		NOTE:  We are relying on the fact that the integer*2 
-c		representations in MODCOMP and in the host machines are 
-c		identical.  More work would be needed if they weren't.
-c	NEXTBYTE = number of byte which should be next read in.
-c	INBYTES = number of bytes still to read to get to end of record.
-c	
-	call readbuff(ierr, inbytes, cinbuff(nextbyte:) )
-	if (ierr .ne. inbytes) then
-	   write(0,*) "TELE2RECS: Error on read"
-	   goto 999
-	endif
-c	Finish reading record
-c
-        if (isitline(itype)) then
-	      call cvtmodieee(cinbuff,ccvtbuff,ltype,lntype,ilnum)
-	      call writebuff(ierr, long(outbuffsize), ccvtbuff)
-	      if (ierr .ne. outbuffsize) then
-		     write(0,*) "TELE2RECS: Error on write"
-		     goto 999
-	      endif
-	      if (itype .eq. 1) then
-c
-c	        SPOWER so we have two records to write, one for
-c	        each phase.  Have already written the 1st phase data but
-c	        must move the data for the 2nd phase into the corect place.
-c
-		do 100 i = 1, 1024
-		   rcvtbuff(i+256) = rcvtbuff(i+1280)
-100		   continue
-	        call writebuff(ierr, long(outbuffsize), ccvtbuff)
-	     	if (ierr .ne. outbuffsize) then
-		     write(0,*) "TELE2RECS: Error on write"
-		     goto 999
-	        endif
-	      endif
-        endif
-c
-	goto 99
-c
-999   stop
-      end
-c
diff -uNr 3.5/utilities/conversion/tuc2uni.c unipops-3.6/utilities/conversion/tuc2uni.c
--- 3.5/utilities/conversion/tuc2uni.c	2000-03-16 11:29:58.000000000 -0700
+++ unipops-3.6/utilities/conversion/tuc2uni.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,255 +0,0 @@
-
-/* @(#)tuc2uni.c	5.1 06/22/94 */
-
-/* Converts from the on_line sdd format to the internal unipops format */
-/* sdd_struct should probably have been appropriately initialized first */
-/* on_line_struct should be aligned appropriately but still in vax binary */
-
-
-#include <string.h>
-#include <math.h>
-#include <ctype.h>
-
-#define USETUC
-#include <sdd.h>
-#include <tuc_online_sdd.h>
-
-void tuc2uni(on_line_struct, sdd_struct, size, feed_number)
-
-tucsddformat *on_line_struct;
-sddformat *sdd_struct;
-int *size;
-int *feed_number;
-
-{
-#define O on_line_struct->header
-#define S sdd_struct->header
-   int i, j, num_pt, start_pt, iscan, datalen;
-   int noswvar, noswvarf;
-   unsigned int opch;
-   float feed;
-
-   double vax2dbl_();
-   float vax2flt_();
-
-   feed = *feed_number;
-   S.scan_number = vax2dbl_(&(O.scan_number));
-   iscan = S.scan_number;
-   S.scan_number = iscan + feed/100.;
-   for (i=0;i<8;i++) S.observer_initials[i] = O.observer_initials[i];
-   for (i=0;i<16;i++) S.observer_name[i] = O.observer_name[i];
-   for (i=0;i<8;i++) S.telescope[i] = O.telescope[i];
-   for (i=0;i<8;i++) S.project_ident[i] = O.project_ident[i];
-   for (i=0;i<16;i++) S.source_name[i] = O.source_name[i];
-   for (i=0;i<8;i++) S.type_data[i] = O.type_data[i];
-   for (i=0;i<8;i++) S.front_end_desc[i] = O.front_end_desc[i];
-   for (i=0;i<8;i++) S.back_end_desc[i] = O.back_end_desc[i];
-   for (i=0;i<8;i++) S.data_precision[i] = O.data_precision[i];
-
-   S.tot_azra_pointing = vax2dbl_(&(O.tot_azra_pointing));
-   S.tot_eldec_pointing = vax2dbl_(&(O.tot_eldec_pointing));
-   S.user_azra_pointing = vax2dbl_(&(O.user_azra_pointing));
-   S.user_eldec_pointing = vax2dbl_(&(O.user_eldec_pointing));
-   for (i=0;i<4;i++) S.pointing_constant[i] = vax2dbl_(&(O.pointing_constant[i]));
-   S.orient_angle = vax2dbl_(&(O.orient_angle));
-   S.radial_focus = vax2dbl_(&(O.radial_focus));
-   S.north_south_focus = vax2dbl_(&(O.north_south_focus));
-   S.east_west_focus = vax2dbl_(&(O.east_west_focus));
-   for (i=0;i<8;i++) S.pt_model[i] = O.pt_model[i];
-
-   S.ut_date = vax2dbl_(&(O.ut_date));
-   S.utime = vax2dbl_(&(O.utime));
-   S.lst = vax2dbl_(&(O.lst));
-   S.nb_receiv_channels = vax2dbl_(&(O.nb_receiv_channels));
-   S.nb_sw_variables = vax2dbl_(&(O.nb_sw_variables));
-   S.nb_phases = vax2dbl_(&(O.nb_phases));
-   S.length_cycle = vax2dbl_(&(O.length_cycle));
-   S.length_sample = vax2dbl_(&(O.length_sample));
-   for (i=0;i<8;i++) S.class11_type[i] = O.class11_type[i];
-
-   S.epoch = vax2dbl_(&(O.epoch));
-   S.sourcex = vax2dbl_(&(O.sourcex));
-   S.sourcey = vax2dbl_(&(O.sourcey));
-   S.referencex = vax2dbl_(&(O.referencex));
-   S.referencey = vax2dbl_(&(O.referencey));
-   S.epoch_ra = vax2dbl_(&(O.epoch_ra));
-   S.epoch_dec = vax2dbl_(&(O.epoch_dec));
-   S.galactic_l = vax2dbl_(&(O.galactic_l));
-   S.galactic_b = vax2dbl_(&(O.galactic_b));
-   S.azimuth = vax2dbl_(&(O.azimuth));
-   S.elevation = vax2dbl_(&(O.elevation));
-   S.xposition = vax2dbl_(&(O.xposition));
-   S.yposition = vax2dbl_(&(O.yposition));
-   for (i=0;i<3;i++) S.desc_origin[i] = vax2dbl_(&(O.desc_origin[i]));
-   for (i=0;i<8;i++) S.coord_sys_code[i] = O.coord_sys_code[i];
-
-   S.amb_temp = vax2dbl_(&(O.amb_temp));
-   S.pressure = vax2dbl_(&(O.pressure));
-   S.relative_humidity = vax2dbl_(&(O.relative_humidity));
-   S.index_refraction = vax2dbl_(&(O.index_refraction));
-   S.dew_point = vax2dbl_(&(O.dew_point));
-   S.mm_h2o = vax2dbl_(&(O.mm_h2o));
-
-   S.map_scan_angle = vax2dbl_(&(O.map_scan_angle));
-   S.xposition_zero = vax2dbl_(&(O.xposition_zero));
-   S.yposition_zero = vax2dbl_(&(O.yposition_zero));
-   S.deltax_rate = vax2dbl_(&(O.deltax_rate));
-   S.deltay_rate = vax2dbl_(&(O.deltay_rate));
-   S.nb_grid_pt = vax2dbl_(&(O.nb_grid_pt));
-   S.x_grid_pt = vax2dbl_(&(O.x_grid_pt));
-   S.y_grid_pt = vax2dbl_(&(O.y_grid_pt));
-   S.x_grid_cell_nb = vax2dbl_(&(O.x_grid_cell_nb));
-   S.y_grid_cell_nb = vax2dbl_(&(O.y_grid_cell_nb));
-   for (i=0;i<8;i++) S.xy_ref_frame_code[i] = O.xy_ref_frame_code[i];
-
-   S.beam = vax2dbl_(&(O.beam));
-   S.off_scan_nb = vax2dbl_(&(O.off_scan_nb));
-   S.bad_channel_value = vax2dbl_(&(O.bad_channel_value));
-   S.velocity_correct = vax2dbl_(&(O.velocity_correct));
-   S.velocity_ref = vax2dbl_(&(O.velocity_ref));
-   for (i=0;i<8;i++) S.velocity_def_ref[i] = O.velocity_def_ref[i];
-   for (i=0;i<8;i++) S.type_calibration[i] = O.type_calibration[i];
-
-   S.antenna_aperature_eff = vax2dbl_(&(O.antenna_aperature_eff));
-   S.antenna_beam_eff = vax2dbl_(&(O.antenna_beam_eff));
-   S.antenna_gain = vax2dbl_(&(O.antenna_gain));
-   S.etal = vax2dbl_(&(O.etal));
-   S.etalfss = vax2dbl_(&(O.etalfss));
-
-   S.synth_freq = vax2dbl_(&(O.synth_freq));
-   S.lo_factor = vax2dbl_(&(O.lo_factor));
-   S.harmonic = vax2dbl_(&(O.harmonic));
-   S.lo_if = vax2dbl_(&(O.lo_if));
-   S.first_if = vax2dbl_(&(O.first_if));
-   S.ref_AZ_offset = vax2dbl_(&(O.ref_AZ_offset));
-   S.ref_EL_offset = vax2dbl_(&(O.ref_EL_offset));
-   S.beam_throw = vax2dbl_(&(O.beam_throw));
-   S.beam_orient = vax2dbl_(&(O.beam_orient));
-   S.bl_offset = vax2dbl_(&(O.bl_offset));
-   S.obs_tol = vax2dbl_(&(O.obs_tol));
-   S.sideband = vax2dbl_(&(O.sideband));
-   S.wavelength = vax2dbl_(&(O.wavelength));
-   S.gain_scan = vax2dbl_(&(O.gain_scan));
-   for (i=0;i<2;i++) S.p_beam[i] = vax2dbl_(&(O.p_beam[i]));
-   for (i=0;i<2;i++) S.m_beam[i] = vax2dbl_(&(O.m_beam[i]));
-   for (i=0;i<4;i++) S.RA_DEC_offsets[i] = vax2dbl_(&(O.RA_DEC_offsets[i]));
-   S.freq_off_signal = vax2dbl_(&(O.freq_off_signal));
-   S.freq_off_ref_1 = vax2dbl_(&(O.freq_off_ref_1));
-   S.freq_off_ref_2 = vax2dbl_(&(O.freq_off_ref_2));
-
-   for (i=0;i<80;i++) {
-      if (isalpha(O.open_param_values[i]))
-         S.open_param_values[i] = O.open_param_values[i];
-   }
-
-   if (strncmp(S.class11_type, "PROTO12M", 8) == 0) {
-      S.cl11.proto.nb_sw_variables_fast = vax2dbl_(&(O.nb_sw_variables_fast));
-      S.cl11.proto.nb_cycles = vax2dbl_(&(O.nb_cycles));
-      S.cl11.proto.nb_cycles_fast = vax2dbl_(&(O.nb_cycles_fast));
-      S.cl11.proto.nb_phases_fast = vax2dbl_(&(O.nb_phases_fast));
-      S.cl11.proto.length_cycle_fast = vax2dbl_(&(O.length_cycle_fast));
-      S.cl11.proto.length_sample_fast = vax2dbl_(&(O.length_sample_fast));
-      noswvar = S.nb_sw_variables;
-      noswvarf = S.cl11.proto.nb_sw_variables_fast;
-      for (j=0;j<(noswvar+noswvarf);j++) {
-         S.cl11.proto.ent[j].variable_value = 
-                              vax2dbl_(&(O.cl11ent[j].variable_value));
-         for (i=0;i<8;i++) S.cl11.proto.ent[j].variable_desc[i] = 
-                                         O.cl11ent[j].variable_desc[i];
-         for (i=0;i<32;i++) S.cl11.proto.ent[j].phase_table[i] = 
-                                         O.cl11ent[j].phase_table[i];
-      }
-      for (j=(noswvar+noswvarf);j<10;j++) {
-         S.cl11.proto.ent[j].variable_value = 0.0;
-         for (i=0;i<8;S.cl11.proto.ent[j].variable_desc[i++]=' ');
-         for (i=0;i<32;S.cl11.proto.ent[j].phase_table[i++]=' ');
-      }
-   }
-/*		tucson has never used the original class 12 */
-
-   S.obs_freq = vax2dbl_(&(O.obs_freq));
-   S.rest_freq = vax2dbl_(&(O.rest_freq));
-   S.freq_resolution = vax2dbl_(&(O.freq_resolution));
-   S.bandwidth = vax2dbl_(&(O.bandwidth));
-   S.receiver_temp = vax2dbl_(&(O.receiver_temp));
-   S.calibration_temp = vax2dbl_(&(O.calibration_temp));
-   S.source_syst_temp = vax2dbl_(&(O.source_syst_temp));
-   S.ref_sys_temp = vax2dbl_(&(O.ref_sys_temp));
-   S.source_temp = vax2dbl_(&(O.source_temp));
-   S.std_deviation_mean = vax2dbl_(&(O.std_deviation_mean));
-   S.ref_point_nb = vax2dbl_(&(O.ref_point_nb));
-   S.xvalue_ref_pt = vax2dbl_(&(O.xvalue_ref_pt));
-   S.deltax = vax2dbl_(&(O.deltax));
-   S.tot_integ_time = vax2dbl_(&(O.tot_integ_time));
-   S.nb_integrations = vax2dbl_(&(O.nb_integrations));
-   S.starting_pt_nb = vax2dbl_(&(O.starting_pt_nb));
-   S.h2o_opacity = vax2dbl_(&(O.h2o_opacity));
-   S.h2o_temp = vax2dbl_(&(O.h2o_temp));
-   S.o2_opacity = vax2dbl_(&(O.o2_opacity));
-   S.o2_temp = vax2dbl_(&(O.o2_temp));
-   for (i=0;i<8;i++) S.polarization[i] = O.polarization[i];
-   S.effint = vax2dbl_(&(O.effint));
-   for (i=0;i<16;i++) S.receiver_info[i] = O.receiver_info[i];
-
-   S.nb_scans_stacked = vax2dbl_(&O.nb_scans_stacked);
-   S.f_scan_stack = vax2dbl_(&(O.f_scan_stack));
-   S.l_scan_stack = vax2dbl_(&(O.l_scan_stack));
-   S.line_amplitude = vax2dbl_(&(O.line_amplitude));
-   S.line_width = vax2dbl_(&(O.line_width));
-   S.integrated_line_int = vax2dbl_(&(O.integrated_line_int));
-   S.rms_noise = vax2dbl_(&(O.rms_noise));
-
-   S.number_header_class = NUMBER_HEADER_CLASS;
-   S.class_location[0] = CLASS_0 + 1;
-   S.class_location[1] = S.class_location[0] + CLASS_1;
-   S.class_location[2] = S.class_location[1] + CLASS_2;
-   S.class_location[3] = S.class_location[2] + CLASS_3;
-   S.class_location[4] = S.class_location[3] + CLASS_4;
-   S.class_location[5] = S.class_location[4] + CLASS_5;
-   S.class_location[6] = S.class_location[5] + CLASS_6;
-   S.class_location[7] = S.class_location[6] + CLASS_7;
-   S.class_location[8] = S.class_location[7] + CLASS_8;
-   S.class_location[9] = S.class_location[8] + CLASS_9;
-   S.class_location[10] = S.class_location[9] + CLASS_10;
-   S.class_location[11] = S.class_location[10] + CLASS_11;
-   S.class_location[12] = S.class_location[11] + CLASS_12;
-   S.class_location[13] = S.class_location[12] + CLASS_13;
-   S.class_location[14] = S.class_location[13] + CLASS_14;
-
-/*		set the sense of the frequency axis based on deltax */
-/*		if deltax is 0, don't change freq_resolution */
-
-   if (strncmp(S.type_data, "LINE", 4) == 0) {
-      if (S.deltax < 0) {
-         S.freq_resolution = fabs(S.freq_resolution);
-      } else if (S.deltax > 0) {
-         S.freq_resolution = - fabs(S.freq_resolution);
-      }
-/*		also, for LINE data, use nb_integrations and starting_pt_nb */
-/*		to get the data for the appropriate receiver block */
-/*		For CONT data, just get everything */
-      num_pt = S.nb_integrations;
-      start_pt = S.starting_pt_nb;
-   } else {
-      datalen = vax2dbl_(&(O.data_length));
-      num_pt = (datalen % sizeof(float)) ?
-                  ((datalen/sizeof(float)) + 1) : (datalen/sizeof(float));
-      start_pt = 1;
-   }
-
-   S.header_length = sizeof(sddheader);
-
-   num_pt = (num_pt < MAX_DATA_POINTS) ? num_pt : MAX_DATA_POINTS;
-
-   S.data_length = num_pt * sizeof(float);
-   *size = S.header_length + S.data_length;
-
-   for (i=0;i<num_pt;i++) {
-      sdd_struct->data[i] = vax2flt_(&(on_line_struct->data[i + start_pt - 1]));
-   }
-
-   S.starting_pt_nb = 1;
-   S.ref_point_nb = S.ref_point_nb - start_pt + 1;
-
-   return;
-}
diff -uNr 3.5/utilities/conversion/tucalign.c unipops-3.6/utilities/conversion/tucalign.c
--- 3.5/utilities/conversion/tucalign.c	2000-03-16 11:29:59.000000000 -0700
+++ unipops-3.6/utilities/conversion/tucalign.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,289 +0,0 @@
-
-/* @(#)tucalign.c	5.1 06/22/94 */
-#include <malloc.h>
-#include <tuc_online_sdd.h>
-
-int tucalign(ibuff, feed_number)
-int *feed_number;
-double *ibuff;
-
-{
-   int i, j, norchan;
-   double *tbuff, dscan;
-   int hdrlen, datalen, iptr, tptr, feedtmp, cl12_size, c3nrch;
-   int hdrelem, dataelem, maxelem, elemin, elemout, doagain;
-   int scan, subscan, c1scn;
-   tucsddheader *TH;
-   tucsddformat *TF;
-
-   short shortswap_();
-   double vax2dbl_();
-   union {
-      short class_0[16];
-      double d[4];
-   } u;
-   short def_class_0[16];
-
-   for(i=0;i<4;i++) u.d[i] = *(ibuff+i);
-   for(i=0;i<16;i++) {
-      u.class_0[i] = shortswap_(u.class_0[i]);
-      if (u.class_0[i] < 0) return(1);
-      if (i>0) {
-         --u.class_0[i];
-      } else {
-         if (u.class_0[0] > 15) return(1);
-      }
-   }
-
-   hdrlen = vax2dbl_((ibuff + u.class_0[1]));
-   datalen = vax2dbl_((ibuff + u.class_0[1] + 1));
-
-   hdrelem =  (hdrlen % sizeof(double)) ? 
-             ((hdrlen/sizeof(double)) + 1) : (hdrlen/sizeof(double));
-
-   dataelem = (datalen % sizeof(double)) ? 
-             ((datalen/sizeof(double)) + 1) : (datalen/sizeof(double));
-
-   tbuff = (double *)malloc (sizeof(tucsddformat));
-   if (tbuff == 0) {
-      perror("Align:");
-      return(1);
-   }
-   maxelem = sizeof(tucsddformat) / sizeof(double);
-   maxelem = (maxelem*sizeof(double) == sizeof(tucsddformat)) ? 
-             maxelem  : (maxelem + 1);
-/*	and zero out this allocated array  */
-   for(i=0;i<maxelem;i++) *(tbuff+i)=0;
-
-/*	make sure that the class pointers are > zero   */
-   u.class_0[u.class_0[0]+1] = hdrelem;
-   doagain = 1;
-   while (doagain) {
-      doagain = 0;
-      for(i=1;i<u.class_0[0]+1;i++) {
-         if (u.class_0[i] <= 0) {
-            u.class_0[i] = u.class_0[i+1];
-            doagain = 1;
-         }
-      }
-   }
-
-   def_class_0[0] = TUC_NUMBER_HEADER_CLASS;
-   def_class_0[1] = TUC_CLASS_1 - 1;
-   def_class_0[2] = TUC_CLASS_2 - 1;
-   def_class_0[3] = TUC_CLASS_3 - 1;
-   def_class_0[4] = TUC_CLASS_4 - 1;
-   def_class_0[5] = TUC_CLASS_5 - 1;
-   def_class_0[6] = TUC_CLASS_6 - 1;
-   def_class_0[7] = TUC_CLASS_7 - 1;
-   def_class_0[8] = TUC_CLASS_8 - 1;
-   def_class_0[9] = TUC_CLASS_9 - 1;
-   def_class_0[10] = TUC_CLASS_10 - 1;
-   def_class_0[11] = TUC_CLASS_11 - 1;
-   def_class_0[12] = TUC_CLASS_12 - 1;
-   def_class_0[13] = TUC_CLASS_13 - 1;
-   def_class_0[14] = TUC_CLASS_14 - 1;
-
-/*	select class 12 start based on value of feed_number  */
-/*	first, get number of receiver changes */
-   c1scn = u.class_0[1]+2;
-   dscan = vax2dbl_(&(ibuff[c1scn]));
-   scan = dscan;
-   subscan = (int)((dscan - scan) * 100.0 + 0.5);
-   c3nrch = u.class_0[3] + 3;
-   norchan = vax2dbl_(&(ibuff[c3nrch]));
-   if (norchan <= 0) norchan = 1;
-   if (subscan <= 0) subscan = 1;
-   feedtmp = *feed_number - subscan + 1;
-   if (feedtmp > 10) feedtmp = feedtmp - 10;
-   if (feedtmp > norchan) {
-      free(tbuff);
-      return(2);
-   }
-/*	Now figure out the class_12 size */
-   cl12_size = (u.class_0[13] - u.class_0[12]) / norchan;
-   if (cl12_size < 21) cl12_size = 21;
-/*		that should catch old style class 12s */
-/*	now set the appropriate class_12 */
-   for (i=0;i<(feedtmp - 1);i++) 
-                  u.class_0[12] = u.class_0[12] + cl12_size;
-/*	check that class 12 is not larger than class 13 */
-   if (u.class_0[12] > u.class_0[13]) {
-      free(tbuff);
-      return(1);
-   }
-
-/*		set the default header values in tbuff */
-/*		since this will eventually get translated from VAX to IEEE */
-/*		and since VAX doesn't have any representation for inf */
-/*		the best we can do is set the values to 0 */
-/*		characters, however, can be set to spaces */
-
-   TH = (tucsddheader *)tbuff;
-   TF = (tucsddformat *)tbuff;
-   TH->scan_number = 0.0;
-   for (i=0;i<8;TH->observer_initials[i++]=' ');
-   for (i=0;i<16;TH->observer_name[i++]=' ');
-   for (i=0;i<8;TH->telescope[i++]=' ');
-   for (i=0;i<8;TH->project_ident[i++]=' ');
-   for (i=0;i<16;TH->source_name[i++]=' ');
-   for (i=0;i<8;TH->type_data[i++]=' ');
-   for (i=0;i<8;TH->front_end_desc[i++]=' ');
-   for (i=0;i<8;TH->back_end_desc[i++]=' ');
-   for (i=0;i<8;TH->data_precision[i++]=' ');
-
-   TH->tot_azra_pointing = 0.0;
-   TH->tot_eldec_pointing = 0.0;
-   TH->user_azra_pointing = 0.0;
-   TH->user_eldec_pointing = 0.0;
-   for (i=0;i<4;TH->pointing_constant[i++] = 0.0);
-   TH->orient_angle = 0.0;
-   TH->radial_focus = 0.0;
-   TH->north_south_focus = 0.0;
-   TH->east_west_focus = 0.0;
-   for (i=0;i<8;TH->pt_model[i++]=' ');
-
-   TH->ut_date = 0.0;
-   TH->utime = 0.0;
-   TH->lst = 0.0;
-   TH->nb_receiv_channels = 0.0;
-   TH->nb_sw_variables = 0.0;
-   TH->nb_phases = 0.0;
-   TH->length_cycle = 0.0;
-   TH->length_sample = 0.0;
-   for (i=0;i<8;TH->class11_type[i++]=' ');
-
-   TH->epoch = 0.0;
-   TH->sourcex = 0.0;
-   TH->sourcey = 0.0;
-   TH->referencex = 0.0;
-   TH->referencey = 0.0;
-   TH->epoch_ra = 0.0;
-   TH->epoch_dec = 0.0;
-   TH->galactic_l = 0.0;
-   TH->galactic_b = 0.0;
-   TH->azimuth = 0.0;
-   TH->elevation = 0.0;
-   TH->xposition = 0.0;
-   TH->yposition = 0.0;
-   for (i=0;i<3;TH->desc_origin[i++] = 0.0);
-   for (i=0;i<8;TH->coord_sys_code[i++]=' ');
-
-   TH->amb_temp = 0.0;
-
-   TH->map_scan_angle = 0.0;
-   TH->xposition_zero = 0.0;
-   TH->yposition_zero = 0.0;
-   TH->deltax_rate = 0.0;
-   TH->deltay_rate = 0.0;
-   TH->nb_grid_pt = 0.0;
-   TH->x_grid_pt = 0.0;
-   TH->y_grid_pt = 0.0;
-   TH->x_grid_cell_nb = 0.0;
-   TH->y_grid_cell_nb = 0.0;
-   for (i=0;i<8;TH->xy_ref_frame_code[i++]=' ');
-
-   TH->beam = 0.0;
-   TH->off_scan_nb = 0.0;
-   TH->bad_channel_value = 0.0;
-   TH->velocity_correct = 0.0;
-   TH->velocity_ref = 0.0;
-   for (i=0;i<8;TH->velocity_def_ref[i++]=' ');
-   for (i=0;i<8;TH->type_calibration[i++]=' ');
-
-   TH->antenna_aperature_eff = 0.0;
-
-   TH->synth_freq = 0.0;
-   TH->lo_factor = 0.0;
-   TH->harmonic = 0.0;
-   TH->lo_if = 0.0;
-   TH->first_if = 0.0;
-   TH->ref_AZ_offset = 0.0;
-   TH->ref_EL_offset = 0.0;
-   TH->beam_throw = 0.0;
-   TH->beam_orient = 0.0;
-   TH->bl_offset = 0.0;
-   TH->obs_tol = 0.0;
-   TH->sideband = 0.0;
-   TH->wavelength = 0.0;
-   TH->gain_scan = 0.0;
-   for (i=0;i<2;TH->p_beam[i++] = 0.0);
-   for (i=0;i<2;TH->m_beam[i++] = 0.0);
-   for (i=0;i<2;TH->RA_DEC_offsets[i++] = 0.0);
-   TH->freq_off_signal = 0.0;
-   TH->freq_off_ref_1 = 0.0;
-   TH->freq_off_ref_2 = 0.0;
-
-   for (i=0;i<80;TH->open_param_values[i++]=' ');
-
-   TH->nb_sw_variables_fast = 0.0;
-   TH->nb_cycles = 0.0;
-   TH->nb_cycles_fast = 0.0;
-   TH->nb_phases_fast = 0.0;
-   TH->length_cycle_fast = 0.0;
-   TH->length_sample_fast = 0.0;
-   for (i=0;i<10;i++) {
-      TH->cl11ent[i].variable_value = 0.0;
-      for (j=0;j<8;TH->cl11ent[i].variable_desc[j++]=' ');
-      for (j=0;j<32;TH->cl11ent[i].phase_table[j++]=' ');
-   }
-
-   TH->obs_freq = 0.0;
-   TH->rest_freq = 0.0;
-   TH->freq_resolution = 0.0;
-   TH->bandwidth = 0.0;
-   TH->receiver_temp = 0.0;
-   TH->calibration_temp = 0.0;
-   TH->source_syst_temp = 0.0;
-   TH->ref_sys_temp = 0.0;
-   TH->source_temp = 0.0;
-   TH->std_deviation_mean = 0.0;
-   TH->ref_point_nb = 0.0;
-   TH->xvalue_ref_pt = 0.0;
-   TH->deltax = 0.0;
-   TH->tot_integ_time = 0.0;
-   TH->nb_integrations = 0.0;
-   TH->starting_pt_nb = 0.0;
-   TH->h2o_opacity = 0.0;
-   TH->h2o_temp = 0.0;
-   TH->o2_opacity = 0.0;
-   TH->o2_temp = 0.0;
-   for (i=0;i<8;TH->polarization[i++]=' ');
-   TH->effint = 0.0;
-   for (i=0;i<16;TH->receiver_info[i++]=' ');
-
-   TH->nb_scans_stacked = 0.0;
-   TH->f_scan_stack = 0.0;
-   TH->l_scan_stack = 0.0;
-   TH->line_amplitude = 0.0;
-   TH->line_width = 0.0;
-   TH->integrated_line_int = 0.0;
-   TH->rms_noise = 0.0;
-   for (i=0;i<47;TH->save[i++] = 0.0);
-
-   for (i=0;i<MAX_DATA_POINTS;TF->data[i++]=0.0);
-
-/*		ok, now move it from ibuff to tbuff */
-
-   for(i=1;i<(u.class_0[0]+1) && i<(def_class_0[0]+1);i++) {
-      tptr = def_class_0[i];
-      iptr = u.class_0[i];
-      for(;iptr<u.class_0[i+1] && tptr<def_class_0[i+1]; iptr++, tptr++) {
-         if (i==12 && ((iptr >= (cl12_size + u.class_0[i])) ||
-                       (tptr >= (cl12_size + def_class_0[i])))) break;
-         *(tbuff+tptr) = *(ibuff+iptr);
-      }
-   }
-
-   for(iptr=hdrelem,tptr=def_class_0[14];
-       iptr<(dataelem+hdrelem) && tptr<maxelem; 
-       *(tbuff + tptr++) = *(ibuff + iptr++));
-
-   hdrelem = def_class_0[14];
-   for(iptr=0,tptr=0;iptr<(dataelem+hdrelem) && tptr<maxelem;
-       *(ibuff + iptr++) = *(tbuff + tptr++));
-
-   free(tbuff);
-
-   return(0);
-}
diff -uNr 3.5/utilities/conversion/tucconvert.c unipops-3.6/utilities/conversion/tucconvert.c
--- 3.5/utilities/conversion/tucconvert.c	2000-03-16 11:30:00.000000000 -0700
+++ unipops-3.6/utilities/conversion/tucconvert.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,40 +0,0 @@
-
-/* @(#)tucconvert.c	5.1 06/22/94 */
-
-#include <malloc.h>
-#include <tuc_online_sdd.h>
-#define USETUC
-#include <sdd.h>
-
-void tucconvert_(buffer, feed_number, size, irtn)
-char *buffer;
-int *feed_number, *irtn, *size;
-{
-   char *sdd, *sddptr ;
-   void tuc2uni();
-   int tucalign();
-   void tucraz_();
-   int i;
-
-   sdd = (char *)malloc (sizeof(sddformat));
-   if (sdd ==0) {
-      perror("Server: convert");
-      *irtn = 1;
-      return;
-   }
-   sddptr = sdd;
-
-   tucraz_(sdd);
-   if ((*irtn = tucalign((tucsddformat *) buffer, feed_number)) != 0) {
-      free(sdd);
-      return;
-   }
-   tuc2uni((tucsddformat *) buffer,(sddformat *) sdd, size, feed_number);
-   
-   for (i=0;i<*size;i++) {
-      *(buffer++) = *(sddptr++);
-   }
-   free(sdd);
-   *irtn = 0;
-}
-   
diff -uNr 3.5/utilities/conversion/tucraz.c unipops-3.6/utilities/conversion/tucraz.c
--- 3.5/utilities/conversion/tucraz.c	2000-03-16 11:30:00.000000000 -0700
+++ unipops-3.6/utilities/conversion/tucraz.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,262 +0,0 @@
-
-/* @(#)raz.c	5.2 08/12/98 */
-
-/* For non-USETUC use : */
-/* If USEPAD is definied before compilation, raz_ results */
-/* If USEPAD is UNDEFINIED -> unpadraz_ results */
-
-/* For USETUC use : */
-/* USETUC implies NO padding (USEPAD undefined) */
-/* tucraz_ is generated */
-
-/* undefine USEPAD if USETUC is definied, if necessary */
-
-#ifdef USETUC
-#  undef USEPAD
-#endif
-
-#include <sdd.h>
-
-#ifdef USETUC
-void tucraz_(ostruct)
-#else
-#  ifdef USEPAD 
-void raz_(ostruct)
-#  else
-void unpadraz_(ostruct)
-#  endif
-#endif
-sddformat *ostruct;
-
-{
-#define O ostruct->header
-int i,j;
-double dinf;
-float rinf;
-
-long int *xx;
-long int *yy;
-xx = (long *) &dinf;
-xx[0] = 0x7FF00000;
-xx[1] = 0x00000000; 
-/* xx[0] = 0x7FFFFFFF;
-xx[1] = 0x00000001; */
-yy = (long *) &rinf;
-yy[0] = 0x7F800000; 
-/* yy[0] = 0x7FFFFFFF; */
-
-O.number_header_class = NUMBER_HEADER_CLASS;
-O.class_location[0] = CLASS_0 + 1;
-O.class_location[1] = O.class_location[0] + CLASS_1;
-O.class_location[2] = O.class_location[1] + CLASS_2;
-O.class_location[3] = O.class_location[2] + CLASS_3;
-O.class_location[4] = O.class_location[3] + CLASS_4;
-O.class_location[5] = O.class_location[4] + CLASS_5;
-O.class_location[6] = O.class_location[5] + CLASS_6;
-O.class_location[7] = O.class_location[6] + CLASS_7;
-O.class_location[8] = O.class_location[7] + CLASS_8;
-#ifdef USEPAD
-O.class_location[9] = O.class_location[8] + CLASS_9 + SPARE_9;
-#else
-O.class_location[9] = O.class_location[8] + CLASS_9;
-#endif
-O.class_location[10] = O.class_location[9] + CLASS_10;
-O.class_location[11] = O.class_location[10] + CLASS_11;
-O.class_location[12] = O.class_location[11] + CLASS_12;
-O.class_location[13] = O.class_location[12] + CLASS_13;
-O.class_location[14] = O.class_location[13] + CLASS_14;
-
-O.header_length = (O.class_location[14] + CLASS_15  - 1) * 8;
-O.data_length = 0;
-O.scan_number = dinf;
-for (i=0;i<8;O.observer_initials[i++]=' ');
-for (i=0;i<16;O.observer_name[i++]=' ');
-for (i=0;i<8;O.telescope[i++]=' ');
-for (i=0;i<8;O.project_ident[i++]=' ');
-for (i=0;i<16;O.source_name[i++]=' ');
-for (i=0;i<8;O.type_data[i++]=' ');
-for (i=0;i<8;O.front_end_desc[i++]=' ');
-for (i=0;i<8;O.back_end_desc[i++]=' ');
-O.data_precision[0]='R';
-O.data_precision[1]='*';
-O.data_precision[2]='4';
-for (i=3;i<8;O.data_precision[i++]=' ');
-O.save_bin = dinf;
-O.nb_records = dinf;
-O.record_id = 0.;
-
-O.tot_azra_pointing = dinf;
-O.tot_eldec_pointing = dinf;
-O.user_azra_pointing= dinf;
-O.user_eldec_pointing = dinf;
-for (i=0;i<4;O.pointing_constant[i++]=dinf);
-O.orient_angle = dinf;
-O.radial_focus = dinf;
-O.north_south_focus = dinf;
-O.east_west_focus = dinf;
-for (i=0;i<8;O.pt_model[i++]=' ');
-
-O.ut_date = dinf;
-O.utime = dinf;
-O.lst = dinf;
-O.nb_receiv_channels = dinf;
-O.nb_sw_variables = dinf;
-O.nb_phases = dinf;
-O.length_cycle = dinf;
-O.length_sample = dinf;
-for (i=0;i<8;O.class11_type[i++]=' ');
-O.phase_id = 0.;
-
-O.epoch = dinf;
-O.sourcex = dinf;
-O.sourcey = dinf;
-O.referencex = dinf;
-O.referencey = dinf;
-O.epoch_ra = dinf;
-O.epoch_dec = dinf;
-O.galactic_l = dinf;
-O.galactic_b= dinf;
-O.azimuth = dinf;
-O.elevation = dinf;
-O.xposition = dinf;
-O.yposition = dinf;
-for (i=0;i<3;O.desc_origin[i++]=dinf);
-for (i=0;i<8;O.coord_sys_code[i++]=' ');
-
-O.amb_temp = dinf;
-O.pressure = dinf;
-O.relative_humidity = dinf;
-O.index_refraction = dinf;
-O.dew_point = dinf;
-O.mm_h2o = dinf;
-
-O.map_scan_angle = dinf;
-O.xposition_zero = dinf;
-O.yposition_zero = dinf;
-O.deltax_rate = dinf;
-O.deltay_rate = dinf;
-O.nb_grid_pt = dinf;
-O.x_grid_pt = dinf;
-O.y_grid_pt = dinf;
-O.x_grid_cell_nb = dinf;
-O.y_grid_cell_nb = dinf;
-for (i=0;i<8;O.xy_ref_frame_code[i++] = ' ');
-
-O.beam=dinf;
-O.off_scan_nb = dinf;
-O.bad_channel_value = dinf;
-O.velocity_correct = dinf;
-O.velocity_ref = dinf;
-for (i=0;i<8;O.velocity_def_ref[i++]=' ');
-for (i=0;i<8;O.type_calibration[i++]=' ');
-
-O.antenna_aperature_eff = dinf;
-O.antenna_beam_eff = dinf;
-O.antenna_gain = dinf;
-O.etal = dinf;
-O.etalfss = dinf;
-
-#ifdef USETUC
-   O.synth_freq = dinf;
-   O.lo_factor = dinf;
-   O.harmonic = dinf;
-   O.lo_if = dinf;
-   O.first_if = dinf;
-   O.ref_AZ_offset = dinf;
-   O.ref_EL_offset = dinf;
-   O.beam_throw = dinf;
-   O.beam_orient = dinf;
-   O.bl_offset = dinf;
-   O.obs_tol = dinf;
-   O.sideband = dinf;
-   O.wavelength = dinf;
-   O.gain_scan = dinf;
-   for (i=0;i<2;O.p_beam[i++] = dinf);
-   for (i=0;i<2;O.m_beam[i++] = dinf);
-   for (i=0;i<4;O.RA_DEC_offsets[i++] = dinf);
-   O.freq_off_signal = dinf;
-   O.freq_off_ref_1 = dinf;
-   O.freq_off_ref_2 = dinf;
-#else
-   O.l1 = dinf;
-   O.l1f1 = dinf;
-   O.l1f2= dinf;
-   O.l2 = dinf;
-   O.l2f1 = dinf;
-   O.l2f2 = dinf;
-   O.la = dinf;
-   O.lb = dinf;
-   O.lc = dinf;
-   O.ld = dinf;
-   O.level_correct = dinf;
-   for (i=0;i<2;O.pointing_fudge[i++] = dinf);
-   O.rho = dinf;
-   O.theta = dinf;
-   for (j=0;j<24;j++)
-   O.center_freq_formula[j]=' ';
-#endif
-
-for (i=0;i<80;O.open_param_values[i++]=' ');
-
-/*	the original class 11 is the default */
-
-for (j=0;j<22;j++) {
-   O.cl11.orig.ent[j].variable_value = dinf;
-   for (i=0;i<8;O.cl11.orig.ent[j].variable_desc[i++]=' ');
-   for (i=0;i<8;O.cl11.orig.ent[j].phase_table[i++]=' ');
-}
-
-O.obs_freq = dinf;
-O.rest_freq = dinf;
-O.freq_resolution = dinf;
-O.bandwidth = dinf;
-O.receiver_temp = dinf;
-O.calibration_temp = dinf;
-O.source_syst_temp = dinf;
-O.ref_sys_temp = dinf;
-O.source_temp = dinf;
-O.std_deviation_mean = dinf;
-O.ref_point_nb= 0.;
-O.xvalue_ref_pt = 0.;
-O.deltax = 0.;
-O.tot_integ_time = dinf;
-O.nb_integrations = 0.;
-O.starting_pt_nb = 1.;
-O.h2o_opacity = dinf;
-O.h2o_temp= dinf;
-O.o2_opacity = dinf;
-O.o2_temp = dinf;
-for (i=0;i<8;O.polarization[i++]=' ');
-O.effint = dinf;
-for (i=0;i<16;O.receiver_info[i++]=' ');
-
-O.nb_scans_stacked = 0.;
-O.f_scan_stack = dinf;
-O.l_scan_stack = dinf;
-O.line_amplitude = dinf;
-O.line_width = dinf;
-O.integrated_line_int = dinf;
-O.rms_noise = dinf;
-
-for (i=0;i<MAX_DATA_POINTS;ostruct->data[i++] = rinf); 
-
-#ifdef USEPAD
-for (i=0;i<SPARE_1;O.spares_1[i++]=dinf);
-for (i=0;i<SPARE_2;O.spares_2[i++]=dinf);
-for (i=0;i<SPARE_3;O.spares_3[i++]=dinf);
-for (i=0;i<SPARE_4;O.spares_4[i++]=dinf);
-for (i=0;i<SPARE_5;O.spares_5[i++]=dinf);
-for (i=0;i<SPARE_6;O.spares_6[i++]=dinf);
-for (i=0;i<SPARE_7;O.spares_7[i++]=dinf);
-for (i=0;i<SPARE_8;O.spares_8[i++]=dinf);
-#ifndef USETUC
-for (i=0;i<SPARE_9;O.spares_9[i++]=dinf);
-#endif
-for (i=0;i<SPARE_10;O.spares_10[i++]=dinf);
-for (i=0;i<SPARE_12;O.spares_12[i++]=dinf);
-for (i=0;i<SPARE_13;O.spares_13[i++]=dinf);
-for (i=0;i<SPARE_14;O.spares_14[i++]=dinf);
-#endif
-
-return;
-}
diff -uNr 3.5/utilities/conversion/unpadraz.c unipops-3.6/utilities/conversion/unpadraz.c
--- 3.5/utilities/conversion/unpadraz.c	2000-03-16 11:29:57.000000000 -0700
+++ unipops-3.6/utilities/conversion/unpadraz.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,262 +0,0 @@
-
-/* @(#)raz.c	5.2 08/12/98 */
-
-/* For non-USETUC use : */
-/* If USEPAD is definied before compilation, raz_ results */
-/* If USEPAD is UNDEFINIED -> unpadraz_ results */
-
-/* For USETUC use : */
-/* USETUC implies NO padding (USEPAD undefined) */
-/* tucraz_ is generated */
-
-/* undefine USEPAD if USETUC is definied, if necessary */
-
-#ifdef USETUC
-#  undef USEPAD
-#endif
-
-#include <sdd.h>
-
-#ifdef USETUC
-void tucraz_(ostruct)
-#else
-#  ifdef USEPAD 
-void raz_(ostruct)
-#  else
-void unpadraz_(ostruct)
-#  endif
-#endif
-sddformat *ostruct;
-
-{
-#define O ostruct->header
-int i,j;
-double dinf;
-float rinf;
-
-long int *xx;
-long int *yy;
-xx = (long *) &dinf;
-xx[0] = 0x7FF00000;
-xx[1] = 0x00000000; 
-/* xx[0] = 0x7FFFFFFF;
-xx[1] = 0x00000001; */
-yy = (long *) &rinf;
-yy[0] = 0x7F800000; 
-/* yy[0] = 0x7FFFFFFF; */
-
-O.number_header_class = NUMBER_HEADER_CLASS;
-O.class_location[0] = CLASS_0 + 1;
-O.class_location[1] = O.class_location[0] + CLASS_1;
-O.class_location[2] = O.class_location[1] + CLASS_2;
-O.class_location[3] = O.class_location[2] + CLASS_3;
-O.class_location[4] = O.class_location[3] + CLASS_4;
-O.class_location[5] = O.class_location[4] + CLASS_5;
-O.class_location[6] = O.class_location[5] + CLASS_6;
-O.class_location[7] = O.class_location[6] + CLASS_7;
-O.class_location[8] = O.class_location[7] + CLASS_8;
-#ifdef USEPAD
-O.class_location[9] = O.class_location[8] + CLASS_9 + SPARE_9;
-#else
-O.class_location[9] = O.class_location[8] + CLASS_9;
-#endif
-O.class_location[10] = O.class_location[9] + CLASS_10;
-O.class_location[11] = O.class_location[10] + CLASS_11;
-O.class_location[12] = O.class_location[11] + CLASS_12;
-O.class_location[13] = O.class_location[12] + CLASS_13;
-O.class_location[14] = O.class_location[13] + CLASS_14;
-
-O.header_length = (O.class_location[14] + CLASS_15  - 1) * 8;
-O.data_length = 0;
-O.scan_number = dinf;
-for (i=0;i<8;O.observer_initials[i++]=' ');
-for (i=0;i<16;O.observer_name[i++]=' ');
-for (i=0;i<8;O.telescope[i++]=' ');
-for (i=0;i<8;O.project_ident[i++]=' ');
-for (i=0;i<16;O.source_name[i++]=' ');
-for (i=0;i<8;O.type_data[i++]=' ');
-for (i=0;i<8;O.front_end_desc[i++]=' ');
-for (i=0;i<8;O.back_end_desc[i++]=' ');
-O.data_precision[0]='R';
-O.data_precision[1]='*';
-O.data_precision[2]='4';
-for (i=3;i<8;O.data_precision[i++]=' ');
-O.save_bin = dinf;
-O.nb_records = dinf;
-O.record_id = 0.;
-
-O.tot_azra_pointing = dinf;
-O.tot_eldec_pointing = dinf;
-O.user_azra_pointing= dinf;
-O.user_eldec_pointing = dinf;
-for (i=0;i<4;O.pointing_constant[i++]=dinf);
-O.orient_angle = dinf;
-O.radial_focus = dinf;
-O.north_south_focus = dinf;
-O.east_west_focus = dinf;
-for (i=0;i<8;O.pt_model[i++]=' ');
-
-O.ut_date = dinf;
-O.utime = dinf;
-O.lst = dinf;
-O.nb_receiv_channels = dinf;
-O.nb_sw_variables = dinf;
-O.nb_phases = dinf;
-O.length_cycle = dinf;
-O.length_sample = dinf;
-for (i=0;i<8;O.class11_type[i++]=' ');
-O.phase_id = 0.;
-
-O.epoch = dinf;
-O.sourcex = dinf;
-O.sourcey = dinf;
-O.referencex = dinf;
-O.referencey = dinf;
-O.epoch_ra = dinf;
-O.epoch_dec = dinf;
-O.galactic_l = dinf;
-O.galactic_b= dinf;
-O.azimuth = dinf;
-O.elevation = dinf;
-O.xposition = dinf;
-O.yposition = dinf;
-for (i=0;i<3;O.desc_origin[i++]=dinf);
-for (i=0;i<8;O.coord_sys_code[i++]=' ');
-
-O.amb_temp = dinf;
-O.pressure = dinf;
-O.relative_humidity = dinf;
-O.index_refraction = dinf;
-O.dew_point = dinf;
-O.mm_h2o = dinf;
-
-O.map_scan_angle = dinf;
-O.xposition_zero = dinf;
-O.yposition_zero = dinf;
-O.deltax_rate = dinf;
-O.deltay_rate = dinf;
-O.nb_grid_pt = dinf;
-O.x_grid_pt = dinf;
-O.y_grid_pt = dinf;
-O.x_grid_cell_nb = dinf;
-O.y_grid_cell_nb = dinf;
-for (i=0;i<8;O.xy_ref_frame_code[i++] = ' ');
-
-O.beam=dinf;
-O.off_scan_nb = dinf;
-O.bad_channel_value = dinf;
-O.velocity_correct = dinf;
-O.velocity_ref = dinf;
-for (i=0;i<8;O.velocity_def_ref[i++]=' ');
-for (i=0;i<8;O.type_calibration[i++]=' ');
-
-O.antenna_aperature_eff = dinf;
-O.antenna_beam_eff = dinf;
-O.antenna_gain = dinf;
-O.etal = dinf;
-O.etalfss = dinf;
-
-#ifdef USETUC
-   O.synth_freq = dinf;
-   O.lo_factor = dinf;
-   O.harmonic = dinf;
-   O.lo_if = dinf;
-   O.first_if = dinf;
-   O.ref_AZ_offset = dinf;
-   O.ref_EL_offset = dinf;
-   O.beam_throw = dinf;
-   O.beam_orient = dinf;
-   O.bl_offset = dinf;
-   O.obs_tol = dinf;
-   O.sideband = dinf;
-   O.wavelength = dinf;
-   O.gain_scan = dinf;
-   for (i=0;i<2;O.p_beam[i++] = dinf);
-   for (i=0;i<2;O.m_beam[i++] = dinf);
-   for (i=0;i<4;O.RA_DEC_offsets[i++] = dinf);
-   O.freq_off_signal = dinf;
-   O.freq_off_ref_1 = dinf;
-   O.freq_off_ref_2 = dinf;
-#else
-   O.l1 = dinf;
-   O.l1f1 = dinf;
-   O.l1f2= dinf;
-   O.l2 = dinf;
-   O.l2f1 = dinf;
-   O.l2f2 = dinf;
-   O.la = dinf;
-   O.lb = dinf;
-   O.lc = dinf;
-   O.ld = dinf;
-   O.level_correct = dinf;
-   for (i=0;i<2;O.pointing_fudge[i++] = dinf);
-   O.rho = dinf;
-   O.theta = dinf;
-   for (j=0;j<24;j++)
-   O.center_freq_formula[j]=' ';
-#endif
-
-for (i=0;i<80;O.open_param_values[i++]=' ');
-
-/*	the original class 11 is the default */
-
-for (j=0;j<22;j++) {
-   O.cl11.orig.ent[j].variable_value = dinf;
-   for (i=0;i<8;O.cl11.orig.ent[j].variable_desc[i++]=' ');
-   for (i=0;i<8;O.cl11.orig.ent[j].phase_table[i++]=' ');
-}
-
-O.obs_freq = dinf;
-O.rest_freq = dinf;
-O.freq_resolution = dinf;
-O.bandwidth = dinf;
-O.receiver_temp = dinf;
-O.calibration_temp = dinf;
-O.source_syst_temp = dinf;
-O.ref_sys_temp = dinf;
-O.source_temp = dinf;
-O.std_deviation_mean = dinf;
-O.ref_point_nb= 0.;
-O.xvalue_ref_pt = 0.;
-O.deltax = 0.;
-O.tot_integ_time = dinf;
-O.nb_integrations = 0.;
-O.starting_pt_nb = 1.;
-O.h2o_opacity = dinf;
-O.h2o_temp= dinf;
-O.o2_opacity = dinf;
-O.o2_temp = dinf;
-for (i=0;i<8;O.polarization[i++]=' ');
-O.effint = dinf;
-for (i=0;i<16;O.receiver_info[i++]=' ');
-
-O.nb_scans_stacked = 0.;
-O.f_scan_stack = dinf;
-O.l_scan_stack = dinf;
-O.line_amplitude = dinf;
-O.line_width = dinf;
-O.integrated_line_int = dinf;
-O.rms_noise = dinf;
-
-for (i=0;i<MAX_DATA_POINTS;ostruct->data[i++] = rinf); 
-
-#ifdef USEPAD
-for (i=0;i<SPARE_1;O.spares_1[i++]=dinf);
-for (i=0;i<SPARE_2;O.spares_2[i++]=dinf);
-for (i=0;i<SPARE_3;O.spares_3[i++]=dinf);
-for (i=0;i<SPARE_4;O.spares_4[i++]=dinf);
-for (i=0;i<SPARE_5;O.spares_5[i++]=dinf);
-for (i=0;i<SPARE_6;O.spares_6[i++]=dinf);
-for (i=0;i<SPARE_7;O.spares_7[i++]=dinf);
-for (i=0;i<SPARE_8;O.spares_8[i++]=dinf);
-#ifndef USETUC
-for (i=0;i<SPARE_9;O.spares_9[i++]=dinf);
-#endif
-for (i=0;i<SPARE_10;O.spares_10[i++]=dinf);
-for (i=0;i<SPARE_12;O.spares_12[i++]=dinf);
-for (i=0;i<SPARE_13;O.spares_13[i++]=dinf);
-for (i=0;i<SPARE_14;O.spares_14[i++]=dinf);
-#endif
-
-return;
-}
diff -uNr 3.5/utilities/conversion/uppercase.f unipops-3.6/utilities/conversion/uppercase.f
--- 3.5/utilities/conversion/uppercase.f	2000-03-16 11:30:02.000000000 -0700
+++ unipops-3.6/utilities/conversion/uppercase.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-      subroutine uppercase(lc,uc)
-C-------------------------------------------------------------------------------
-C  @(#)uppercase.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Converts any lower case characters in string lc to upper case
-c     and stores results in string uc
-c
-      character*(*) uc, lc
-c
-      character*2 c1
-      integer*2 ic1, izero, lastblnk, ilen, i
-c
-      equivalence (ic1, c1)
-c
-      data izero/x'0000'/
-c
-      ilen = min(100,lastblnk(lc))
-c
-      ic1 = izero
-c
-      uc = ' '
-      do 100 i = 1, ilen
-	c1(2:2) = lc(i:i)
-        if (ic1 .ge. 97 .and. ic1 .le. 122) ic1 = ic1 - 32
-        uc(i:i) = c1(2:2)
-100     continue
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/conversion/vax2sun.c unipops-3.6/utilities/conversion/vax2sun.c
--- 3.5/utilities/conversion/vax2sun.c	2000-03-16 11:30:01.000000000 -0700
+++ unipops-3.6/utilities/conversion/vax2sun.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,151 +0,0 @@
-
-/* @(#)vax2sun.c	5.1 06/22/94 */
-
-#include <stdio.h>
-
-/* VAX2SUN.C -- Conversion routines for short, long, float and double types.
- * These functions convert and return a value for one storage location
- * of the named type.
- *
- * C. D. Biemesderfer, NRAO, 30 November 1989
- * double conversion fixed R.Garwood, NRAO, November 1990
- */
-
-
-/* SHORTSWAP -- Byte swap a short int.
- */
-
-short int
-shortswap_ (le_short)
-short int	le_short;
-{
-	union	{
-		short	bs;
-		char	bc[2];
-	} bsbuf;
-	char	chold;
-
-	bsbuf.bs = le_short;
-	chold = bsbuf.bc[0];
-	bsbuf.bc[0] = bsbuf.bc[1];
-	bsbuf.bc[1] = chold;
-
-	return (bsbuf.bs);
-}
-
-
-/* LONGSWAP -- Word and byte swap a long int.
- */
-
-long int
-longswap_ (le_long)
-long int	le_long;
-{
-	union	{
-		long	wl;
-		unsigned short	ws[2];
-	} wsbuf;
-	short	shold;
-
-	wsbuf.wl = le_long;
-	shold = wsbuf.ws[0];
-	wsbuf.ws[0] = wsbuf.ws[1];
-	wsbuf.ws[1] = shold;
-
-	wsbuf.ws[0] = shortswap_ (wsbuf.ws[0]);
-	wsbuf.ws[1] = shortswap_ (wsbuf.ws[1]);
-
-	return (wsbuf.wl);
-}
-
-
-/* VAX2FLT -- Convert 32-bit VAX F-floating number to IEEE float.
- */
-
-float
-vax2flt_ (le_flt)
-unsigned short *le_flt;
-{
-	union {
-	    float  ff;
-	    unsigned short fs[2];
-	    struct {				/* VAX F-floating */
-		unsigned int sign:1;
-		unsigned int exponent:8;
-		unsigned int mantissa:23;
-	    } v;
-	} vaxbuf;
-       
-        union {
-            float ff;
-            unsigned short fs[2];
-            struct {
-                unsigned int sign:1;
-                unsigned int exponent:8;
-                unsigned int mantissa:23;
-            } v;
-        } ieeebuf;
-        int i;
-
-        for (i=0;i<2;i++) vaxbuf.fs[i] = *(le_flt++);
-
-	ieeebuf.fs[0] = shortswap_ (vaxbuf.fs[0]);
-	ieeebuf.fs[1] = shortswap_ (vaxbuf.fs[1]);
-
-	if (ieeebuf.v.exponent < 3) 		/* prevent underflow */
-	    	ieeebuf.ff = 0.0;
-	else
-		ieeebuf.ff = ieeebuf.ff / 4.0;
-	
-	return (ieeebuf.ff);
-}
-
-
-/* VAX2DBL -- Convert 64-bit VAX D-floating number to IEEE double.
- */
-
-double
-vax2dbl_ (le_dbl)
-unsigned short *le_dbl;
-{
-	union {
-	    double dd;
-	    unsigned short ds[4];
-	    struct {				/* IEEE 64-bit floating */
-		unsigned int sign:1;
-		unsigned int exponent:11;
-		unsigned int mantissa:20;
-	    	unsigned long lomant;
-	    } d;
-	} ieeebuf;
-	union {
-	    double dd;
-	    unsigned short ds[4];
-	    struct {				/* VAX D-floating */
-		unsigned int sign:1;
-		unsigned int exponent:8;
-		unsigned int mantissa:23;
-	    	unsigned long lomant;
-	    } v;
-	} vaxbuf;
-	int	i;
-	
-        for (i=0; i<4; i++) vaxbuf.ds[i] = *(le_dbl++);
-
-	for (i=0; i<4; i++)
-		vaxbuf.ds[i] = shortswap_ (vaxbuf.ds[i]);
-
-	if (vaxbuf.v.exponent < 3) 		/* prevent underflow */
-	    	ieeebuf.dd = 0.0;
-	else {
-		ieeebuf.d.sign = vaxbuf.v.sign;
-		ieeebuf.d.exponent = vaxbuf.v.exponent - 127 + 1023;
-						/* shift fraction right 3 */
-                ieeebuf.d.lomant = vaxbuf.v.lomant >> 3;
-                ieeebuf.d.lomant |= vaxbuf.v.mantissa << 29;
-                ieeebuf.d.mantissa = vaxbuf.v.mantissa >> 3;
-		ieeebuf.dd = ieeebuf.dd / 4.0;
-	}
-	
-	return (ieeebuf.dd);
-}
diff -uNr 3.5/utilities/cube/Makefile unipops-3.6/utilities/cube/Makefile
--- 3.5/utilities/cube/Makefile	2000-03-16 11:30:41.000000000 -0700
+++ unipops-3.6/utilities/cube/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -1,53 +0,0 @@
-# @(#)Makefile	5.4 03/01/99
-#
-FCMP = f77
-CCMP = cc
-FC = $(FCMP)
-CC = $(CCMP)
-FDEBOROPT = -g
-CDEBOROPT = -g
-FLOATOPT =
-FILLIB = -libmil
-CILLIB = -xlibmil
-FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(FILLIB)
-CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CILLIB)
-FFLAGS = -u $(FFLOAT)
-CFLAGS = $(CFLOAT)
-LFLAGS = $(FFLOAT)
-LLIBS  = -lm
-# Macros which define compilation and linking parameters
-# FDEBOROPT (debug or optimize flag) = 'g' as a default for using the debugger 
-# 	(reset for optimization using command line substitution).
-#
-
-CUBEOBJ = adjustclass.o cube.o cvrt.o ddtoddmmss.o fitsdates.o headline.o \
-	  init.o lchkdate.o position.o readindex.o readscan.o setuphead.o \
-	  toilet2.o vask.o velocity.o xask.o yask.o
-
-CUBEINC = adjustclass.o cube.o headline.o init.o position.o setuphead.o toilet2.o \
-	  velocity.o 
-
-DFORMINC = adjustclass.o cube.o position.o setuphead.o velocity.o
-
-all: cube.exe
-
-clean:
-	rm -f cube.exe
-	rm -f *.o
-	-sccs clean
-
-cube.exe: $(CUBEOBJ) $(CUBEINC)
-	$(FC) $(LFLAGS) -o cube.exe $(CUBEOBJ) $(LLIBS)
-
-fitsdates.o: $(popsdir)/source/conline/fitsdates.c
-	rm -f fitsdates.c
-	\cp $(popsdir)source/conline/fitsdates.c fitsdates.c
-	$(CC) -c $(CFLAGS) fitsdates.c
-
-$(CUBEINC): params.inc cube.inc
-
-$(DFORMINC): dform.inc
-
-params.inc: $(popsdir)includes/params.inc
-	rm -f params.inc
-	\cp $(popsdir)includes/params.inc params.inc
diff -uNr 3.5/utilities/cube/adjustclass.f unipops-3.6/utilities/cube/adjustclass.f
--- 3.5/utilities/cube/adjustclass.f	2000-03-16 11:30:41.000000000 -0700
+++ unipops-3.6/utilities/cube/adjustclass.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,53 +0,0 @@
-      subroutine adjustclass
-c
-c      @(#)adjustclass.f	5.1 06/22/94
-c
-c     Alters the header pointers to the values which correctly correspond to
-c     the contents of the scan in the TWH array.
-c
-      integer class(15), numclass, i
-c
-      include 'cube.inc'
-      include 'dform.inc'
-c
-      numclass = min(15, itwh(1)+1)
-      do 10 i = 1, numclass
-	class(i) = itwh(i+1)
-10	continue
-c     CLASS contains the location in the scan of the starting R*8 words
-c     for each header class
-c
-      c1sno = d1sno + class(1)
-      c1tel = d1tel + class(1)
-      c1ona = d1ona + class(1)
-      c1stc = d1stc + class(1)
-      c3dat = d3dat + class(3)
-      c4epo = d4epo + class(4)
-      c4sx = d4sx + class(4)
-      c4sy = d4sy + class(4)
-      c4era = d4era + class(4)
-      c4edc = d4edc + class(4)
-      c4gl = d4gl + class(4)
-      c4gb = d4gb + class(4)
-      c4az = d4az + class(4)
-      c4el = d4el + class(4)
-      c4ix = d4ix + class(4)
-      c4iy = d4iy + class(4)
-      c4csc = d4csc + class(4)
-      c7osn = d7osn + class(7)
-      c12spn = d12spn + class(12)
-      c12ni = d12ni + class(12)
-      c12x0 = d12x0 + class(12)
-      c12dx = d12dx + class(12)
-      c12rp = d12rp + class(12)
-c     Find out where each header parameter is using CLASS to find each class in
-c     the header and the offsets D1... from the start of each class for each
-c     parameter
-c
-      idatoff = 2*(class(14)-1)
-c     Find the location of the end of the header (and the start of the data).
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/cube.f unipops-3.6/utilities/cube/cube.f
--- 3.5/utilities/cube/cube.f	2000-03-16 11:30:42.000000000 -0700
+++ unipops-3.6/utilities/cube/cube.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,205 +0,0 @@
-      program cube
-c
-c     @(#)cube.f	5.3 03/01/99
-c
-      integer ierr, irtn, getenv, lnblnk, ilen, jold, iargc
-      logical exs, position, readindex, readscan, headline, toilet2
-      character*3 dir
-      character*1 answr
-      character*70 filename1, filename2, input
-      real first, last, ffirst, flast
-c
-      include 'cube.inc'
-      include 'dform.inc'
-c                   look for undocumented -y2k argument
-      if (iargc() .eq. 1) then
-         call getarg(1, input)
-         if (input .eq. "-y2k") then
-            irtn = 1
-            call datestyle(irtn)
-         endif
-      endif
-c
-      open(unit=6, form="print")
-      open(unit=0, form="print")
-c
-      write(6,*) ' '
-      write(6,*) 'Program for creating a new CUBE file or updating an',
-     .           ' existing CUBE file.'
-      write(6,*) 'Input is a file of scans in the SDD#1 format and the',
-     .	         ' output is a 3-d Fits '
-      write(6,*) 'Image file which can be read into AIPS, IRAF, etc.'
-      write(6,*) ' '
-      write(6,*) 'The final cube can have a maximum of 47 x 10^6 pixels'
-      write(6,*) ' '
-c
-91    write(6,*) 'Do you want debugging on?'
-      write(6,101) 'Y or N'
-101   format(1x,a,' -> ',$)
-      read(5,110) answr
-110   format(a)
-      write(6,*) ' '
-      if (answr .eq. 'y' .or. answr .eq. 'Y') then
-	debug = .true.
-      else if (answr .eq. 'n' .or. answr .eq. 'N') then
-	debug = .false.
-      else
-	write(6,*) 'Bad answer... Try again...'
-	goto 91
-      endif
-      write(6,*) ' '
-c
-      irtn = getenv('popsdir', headerfile)
-      ilen = lnblnk(headerfile)
-      if (irtn .ne. 0 .or. ilen .eq. 0 .or. ilen .gt. 50) then
-	write(0,*) 'Environmental variable POPSDIR is improperly set'
-	goto 99
-      endif
-      headerfile = headerfile(1:ilen) // 'utilities/head.mask'
-c     Find out where FITS template is found.
-c
-      write(6,101) 'Enter name of the SDD file (70 chars. max.)'
-      read(5,110) filename1
-      write(6,*) ' '
-c
-      if (.not. readindex(filename1, indev, inreclngth, jrec)) goto 99
-c
-      jold = jrec
-      if (.not. readscan(indev, inreclngth, jrec, (HDU_FLOAT_SIZE*4), 
-     .     itwh)) goto 99
-      jrec = jold
-      call adjustclass
-c     Read in the first scan so that we can be sure that file is readable,
-c     that a scan exists in the file, and for possible later use.  Make sure
-c     that when we get to the meat of the program that we again read in the 
-c     first scan (i.e., we must reset JREC back to its original value).	
-c
-      write(6,101) 'Enter name of the output CUBE file (70 chars. max.)'
-      read(5,110) filename2
-      write(6,*) ' '
-c
-      inquire (file=filename2,exist=exs,direct=dir)
-      if (exs .and. (dir .eq. 'NO' .or. dir .eq. 'no') ) then
-        write(0,*) 'File exist, but wrong format...'
-        goto 99
-      endif
-c
-      open (unit=ioutdev,file=filename2,status='unknown',
-     1	    access='direct',form='unformatted',recl=outreclngth,
-     2      iostat=ierr)
-      if (ierr .ne. 0) then
-	write(0,*) 'Cannot open....'
-	goto 99
-      endif
-c
-      if (exs) then
-c
-        write(6,*) 'CUBE file already exists.'
-      	write(6,*) ' '
-	if (.not. toilet2()) goto 99
-c
-      else
-c
-	call setuphead(filename2)
-c       Initializes header parameters; uses scan read in above.
-c
-      	call init  
-      	if (.not. headline()) goto 99
-c	Initializes the cube with bad data points.  Writes out header
-c
-      endif
-c
-3     write(6,*) 'What scans do you want to process (enter zeros for',
-     .		 ' all scans)?'
-309   write(6,101) 'Enter lowest scan number'
-      read(5,110) input
-      read(input,*,iostat=ierr) first
-      write(6,*) ' '
-      if (ierr .gt. 0) then
-	write(6,*) 'Bad entry... Try again...'
-	goto 309
-      endif
-31    write(6,101) 'Enter highest scan number'
-      read(5,110) input
-      read(input,*,iostat=ierr) last
-      write(6,*) ' '
-      if (ierr .gt. 0) then
-	write(6,*) 'Bad entry... Try again...'
-	goto 31
-      endif
-      if (first .eq. 0. .and. last .eq. 0) then
-	last = 1.e10
-	first = -1.e10
-      else if (first .gt. last) then
-	write(6,*) 'Bad entries.... Try again...'
-	goto 3
-      endif
-c
-4     write(6,*) 'What feeds do you want to process (enter zeros for',
-     .		 ' all feeds)?'
-409   write(6,101) 'Enter lowest feed number'
-      read(5,110) input
-      read(input,*,iostat=ierr) ffirst
-      write(6,*) ' '
-      if (ierr .gt. 0) then
-	write(6,*) 'Bad entry... Try again...'
-	goto 409
-      endif
-41    write(6,101) 'Enter highest feed number'
-      read(5,110) input
-      read(input,*,iostat=ierr) flast
-      write(6,*) ' '
-      if (ierr .gt. 0) then
-	write(6,*) 'Bad entry... Try again...'
-	goto 41
-      endif
-      if (ffirst .eq. 0. .and. flast .eq. 0) then
-	flast = 1.e10
-	ffirst = -1.e10
-      else if (ffirst .gt. flast) then
-	write(6,*) 'Bad entries.... Try again...'
-	goto 4
-      endif
-c
-5     if (readscan(indev, inreclngth, jrec, HDU_FLOAT_SIZE*4, itwh)) 
-     .     then
-c
-        call adjustclass	
-        write(6,51) '------- Scan no. = ',dtwh(c1sno),' --------'
-51	format(1x,a,1pg16.9,a)
-c
-        if (dtwh(c7osn) .lt. 0.) then
-	   write(6,*) 'Scan has been labelled as bad.... Skipping....'
-c
-	else if (dtwh(c1sno) .lt. first .or. dtwh(c1sno) .ge. (last+1)) then
-	   write(6,*) 'Scan number out of range... Skipping....'
-c
-	else if (nint(100.*mod(dtwh(c1sno),1.d00)) .lt. ffirst .or.
-     .	         nint(100.*mod(dtwh(c1sno),1.d00)) .gt. flast) then
-	   write(6,*) 'Feed number out of range... Skipping....'
-c
-	else if (isys .le. 14 .and. ctwh(c4csc).ne.testcoord(isys)) then
-	   write(6,*) 'Data not taken in ', testcoord(isys),'... Skipping...'
-c
-	else if (ctwh(c1stc)(1:4) .ne. 'LINE') then
-	   write(6,*) 'Not a spectral-line observation... Skipping....'
-c
-	else
-c
-           if (position() ) call velocity
-c
-        endif
-        go to 5
-c
-      endif
-c
-99    write(6,*) ' '
-      write(6,*) 'Terminating...'
-c
-      close (ioutdev)
-      close (indev)
-c
-      stop
-c
-      end
-c
diff -uNr 3.5/utilities/cube/cube.inc unipops-3.6/utilities/cube/cube.inc
--- 3.5/utilities/cube/cube.inc	2000-03-16 11:30:41.000000000 -0700
+++ unipops-3.6/utilities/cube/cube.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,113 +0,0 @@
-c
-c     @(#)cube.inc	5.3 03/01/99
-c
-      include 'params.inc'
-c
-      real*8 dtwh(HDU_FLOAT_SIZE/2)
-      real*4 twh(HDU_FLOAT_SIZE), a0, d0, v0, dac, ddc, dvc, ap, dp, vp, 
-     .	     erra, errd, errv, tzero, tmin, tscale, tmax, equinox
-      integer*2 lout(1440), itwh(HDU_FLOAT_SIZE*2)
-      integer na, nd, nv, isys, ibad, maxrec,inreclngth, outreclngth,
-     .	      jrec, mleft, irec, idigit, numhead, numdata, irange, indev,
-     .	      ioutdev, iheadmask
-      character*8 ctwh(HDU_FLOAT_SIZE/2), testcoord(14)
-      character*24 date
-      character*70 headerfile
-      character*60 label(10)
-      character*8 coorda,coordd,coordv,object(2),appepch,origin,
-     .            units
-      character*4 caxis(2,18)
-      logical cosv, debug, afirst
-c
-      equivalence (dtwh,ctwh),(dtwh,twh),(dtwh,itwh)
-c
-      common /header/a0,d0,v0,dac,ddc,dvc,ap,dp,vp,erra,errd,
-     1               errv,coorda,coordd,coordv,tzero,tscale,tmin,
-     2		     tmax,date,object,appepch,origin,units,na,nd,nv,
-     3		     ibad,label,equinox
-      common /scan/twh,maxrec,mleft,irec,idigit,numhead,jrec,
-     .		   inreclngth,isys,cosv, debug, afirst,
-     .             headerfile, lout
-c
-c     A0 = x-axis start or reference position
-c     D0 = y-axis start or reference position
-c     V0 = velocity reference value
-c     NA, ND, NV = number of pixels in the 3 directions
-c     DAC, DDC, DVC = step size in the 3 directions
-c     AP,DP,VP = reference pixel in cube... Usually  = 1.
-c     TZERO, TSCALE = scaling representation of data
-c           (i.e. tape value*TSCALE + TZERO = Ta)
-c     COORDA, COORDD, COORDV = strings containing x,y,z axis labels.
-c     LABEL = string arrays containing user comments
-c     DATE = date stored in header of cube
-c     OBJECT = name of the object in cube 
-c     ORIGIN = place of cube's origin
-c     UNITS = units of pixel values in cube    
-c     TMAX, TMIN = maximum, minimum data values to be represented in cube 
-c     IBAD = value given to bad data points or points with no data
-c     ERRA, ERRD, ERRV = if a data point is within these errors in the 3 
-c          directions from a cube position, then that data point overwrites
-c          the previous data at that position in cube
-c     APPEPCH = More descriptive then COORD, COORDA in recording coordinate
-c   	   system
-c     EQUINOX = equinox of coordinate system, only used if the Y axis is
-c               "DEC-"
-c
-c     DTWH = array containing present scan; DTWH, TWH, ITWH, and CTWH
-c     LOUT has dimension OUTRECLENGTH/2 or NUMDATA; contains the
-c	 present output record
-c     HEADERFILE = name of header file on disk.
-c     COSV = TRUE if cosine y-coord is to be corrected for (GLS projection).
-c     AFIRST = TRUE if x-axis in data corresponds to 2nd axis in cube
-c              i.e. the FIRST spatial axis in the cube is also the first
-c              spatial axis in the data.
-c     INRECLNGTH = input file record lengths.
-c     JREC = Record number of scan about to be read in input file  
-c     MAXREC = number of records in cube file
-c     MLEFT = number of data items stored in last record of cube.  The
-c	remaining items are blank.
-c     IREC = output record currently in use
-c     IDIGIT = position within output record where data is to go
-c     NUMHEAD = number of header records (usually 1).
-c     ISYS = coordinate system code: Follows that given by TESTCOORD.
-c
-      data outreclngth/2880/,numdata/1440/
-c     OUTRECLNGTH = output record lengths.  
-c     NUMDATAY = # of data elements in each output record 
-c	   (= outeclngth/2 for 16 bit data representation)
-c
-      data irange/32767/
-c     output records will have data between -irange and + irange.  
-c
-      data caxis/'RA--','DEC-',
-     .		 'RA--','DEC-',
-     .		 'RA--','DEC-',
-     .		 'RA--','DEC-',
-     .		 'RA--','DEC-',
-     .		 'RA--','DEC-',
-     .		 'HA--','DEC-',
-     .		 'ELON','ELAT',
-     .		 'ELON','ELAT',
-     .		 'ELON','ELAT',
-     .		 'ELON','ELAT',
-     .		 'GLON','GLAT',
-     .		 'AZ--','EL--',
-     .		 'HUSR','VUSR',
-     .		 'RA--','DEC-',
-     .		 'GLON','GLAT',
-     .		 'AZ--','EL--',
-     .		 'INDX','INDY'/
-      data testcoord/'1950RADC','EPOCRADC','MEANRADC','APPRADC ',
-     .		     '2000RADC','INDRADC ','APPHADC ',
-     .		     '1950ECL ','EPOCECL ','MEANECL ','APPECL  ',
-     .		     'GALACTIC','AZEL    ','USERDEF '/
-c     Possible x/y axis labels and coordinate systems. The 1st 14 values
-c     of CAXIS refer to the coordinates in TESTCOORD.  The last 4 values
-c     of CAXIS are special cases and refer to the always present entries in 
-c     the SDD#1 header.  These last four are equivalent to EPOCRADC, GALACTIC,
-c     AZEL, and INDICATD.
-c
-      data indev/25/, ioutdev/27/, iheadmask/29/
-c     Input/output device numbers of scan and cube file.  Device number
-c     where head.mask file will be found
-c
diff -uNr 3.5/utilities/cube/cvrt.f unipops-3.6/utilities/cube/cvrt.f
--- 3.5/utilities/cube/cvrt.f	2000-03-16 11:30:43.000000000 -0700
+++ unipops-3.6/utilities/cube/cvrt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,75 +0,0 @@
-      logical function cvrt(cstring,value)
-c
-c     @(#)cvrt.f	5.1 06/22/94
-c
-c     Converts a character string which contains coordinates in the 
-c     format SDD MM SS.SS to a fractional degree (DD.ddddd).
-c     If the decimal point is not implicately typed in the seconds portion of 
-c     the input field, it is assumed to lie between the second and third 
-c     character in that field (i.e., '1234' and '12.34' are equivalent; 
-c     ' 123' and '1.23' are equivalent).
-c
-c     CVRT is set to false if there is an error in CSTRING
-c
-c     cstring = (c*13) Character string to be converted
-c
-      character*13 cstring
-      real value, sgn
-c
-      logical lperiod
-      character*13 string
-      integer i, idd, imm
-      real ss
-c
-      string = cstring
-      cvrt = .false.
-c
-      if (string(5:5) .ne. ' ' .or. string(8:8) .ne. ' ') then
-	write(6,*) 'Bad field in input line'
-	return
-      endif
-c
-      if (string(1:1) .ne. ' ' .and. string(1:1) .ne. '+' .and.
-     1    string(1:1) .ne. '-') then
-	write(6,*) 'First character must be blank, +, or -'
-	return
-      endif
-c
-c
-      lperiod = .true.
-c
-      do 100 i = 2, 13
-c
-       if( string(i:i) .eq. ' ') string(i:i) = '0'
-	if ( llt(string(i:i),'0') .or. lgt(string(i:i),'9') ) then
-	   if(i .ge. 9 .and. string(i:i) .eq. '.' .and. lperiod) then
-		lperiod = .false.
-	   else
-		write(6,*) 'Bad character in input line=> ',string(i:i)
-		return
-	   endif
-	endif
-c
-100	continue
-c
-      sgn = +1.
-      if (string(1:1) .eq. '-') sgn = -1.
-c
-      read(unit=string,fmt=110) idd,imm,ss
-110   format(1x,i3,1x,i2,1x,f5.3)
-c
-c***      write(6,*) idd, imm, ss
-c
-      if (imm .gt. 60 .or. ss .gt. 60.) then
-	write(6,*) 'Either minutes or seconds are > 60'
-	return
-      endif
-c
-c
-      value = sgn*(float(idd) + (float(imm) + ss/60.)/60.)
-      cvrt = .true.
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/ddtoddmmss.f unipops-3.6/utilities/cube/ddtoddmmss.f
--- 3.5/utilities/cube/ddtoddmmss.f	2000-03-16 11:30:43.000000000 -0700
+++ unipops-3.6/utilities/cube/ddtoddmmss.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,34 +0,0 @@
-      subroutine ddtoddmmss(din, ideg, imin, sec)
-c
-c     @(#)ddtoddmmss.f	5.1 06/22/94
-c
-c     Converts from DDD.ddddd to DD, MM, SS
-c
-c     din = (R*8) Angle to be converted
-c     ideg, imin, sec = (I*4), (I*4), (R*8) Calculated Deg, min, secs.
-c
-      double precision din
-      integer ideg, imin
-      real sec
-c
-      double precision absdin, rmin
-c 
-      absdin = abs(din)
-      ideg = int(absdin)
-      rmin = 60.d0*(absdin - float(ideg))
-      imin = int(rmin)
-      sec = 60.d0*(rmin - float(imin))
-c
-      if (abs(sec-60.d0) .lt. 0.001d00) then
-	sec = 0.d0
-	imin = imin + 1
-      endif
-      if (imin .ge. 60) then
-	imin = imin - 60
-	ideg = ideg + 1
-      endif
-c
-      if (din .lt. 0.d0) ideg = -ideg
-c
-      return
-      end
diff -uNr 3.5/utilities/cube/dform.inc unipops-3.6/utilities/cube/dform.inc
--- 3.5/utilities/cube/dform.inc	2000-03-16 11:30:41.000000000 -0700
+++ unipops-3.6/utilities/cube/dform.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,41 +0,0 @@
-c
-c     @(#)dform.inc	5.1 06/22/94
-c
-C       Class 1 :  Basic Information
-C       Class 2 :  Pointing Parameters
-C       Class 3 :  Observing Parameters
-C       Class 4 :  Positions
-C       Class 5 :  Environment
-C       Class 6 :  Map Parameters
-C       Class 7 :  Data Parameters
-C       Class 8 :  Engineering Parameters
-C       Class 9 :  Telescope Dependent Parameters
-C       Class 10:  Open Parameters
-C       Class 11:  Phase Block
-C       Class 12:  Receiver Descriptor Block
-C       Class 13:  Reduced Data Values
-C
-C       C pointers for the currently referenced array
-C
-      common/dform/c1sno,c1tel,c1ona,c1stc,c3dat,c4epo,c4sx,c4sy,c4era,
-     .             c4edc,c4gl,c4gb,c4az,c4el,c4ix,c4iy,c4csc,c7osn,
-     .             c12spn,c12ni,c12x0,c12dx,c12rp,idatoff
-c
-      integer c1sno,c1tel,c1ona,c1stc,c3dat,c4epo,c4sx,c4sy,c4era,c4edc,
-     .        c4gl,c4gb,c4az,c4el,c4ix,c4iy,c4csc,c7osn,c12spn,c12ni,
-     .        c12x0,c12dx,c12rp,idatoff
-c
-      integer d1sno,d1tel,d1ona,d1stc,d3dat,d4epo,d4sx,d4sy,d4era,d4edc,
-     .        d4gl,d4gb,d4az,d4el,d4ix,d4iy,d4csc,d7osn,d12spn,d12ni,
-     .        d12x0,d12dx,d12rp
-c
-      data d1sno/2/,d1tel/6/,d1ona/8/,d1stc/10/
-      data d3dat/0/
-      data d4epo/0/,d4sx/1/,d4sy/2/,d4era/5/,d4edc/6/,d4gl/7/,d4gb/8/,
-     .     d4az/9/,d4el/10/,d4ix/11/,d4iy/12/,d4csc/16/
-      data d7osn/1/
-      data d12spn/15/,d12ni/14/,d12x0/11/,d12dx/12/,d12rp/10/
-c
-c     D1... = Offsets from start of each class to the required header parameter
-c     C1... = Actual pointers to each header parameter.
-c     IDATOFF+1 = position of first data point in arrays in R*4 words
diff -uNr 3.5/utilities/cube/fitsdates.c unipops-3.6/utilities/cube/fitsdates.c
--- 3.5/utilities/cube/fitsdates.c	2000-03-16 11:30:44.000000000 -0700
+++ unipops-3.6/utilities/cube/fitsdates.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,239 +0,0 @@
-
-/* @(#)fitsdates.c	1.1 05/04/98 */
-
-#include <time.h>
-
-/* set and query the date style */
-/* a style of 0 is the old FITS style of dd/mm/yy */
-/* a style of 1 is the new FITS style of yyyy-mm-dd[Thh:mm:ss[.sss]] */
-/* if whichStyle is a valid pointer, sets the style to that */
-/* if whichStyle is not a valid pointer AND the style has not */
-/* been set, set the style as appropriate for today */
-/* Once the style has been set (is not -1) it can not be reset */
-/* the style is returned */
-
-int datestyle_(whichStyle)
-     int *whichStyle;
-{
-  static int style = -1;
-  time_t cltime;
-  struct tm *ltime;
-
-  if (style == -1) {
-    if (whichStyle) {
-      style = *whichStyle;
-    } else {
-      cltime = time((time_t *)0);
-      ltime = localtime(&cltime);
-      if (ltime->tm_year > 98) style = 1;
-      else style = 0;
-    }
-  }
-  return style;
-}
-
-/* The DATE fields in matrix and cube headers are stored as DOUBLES */
-/* but they behave like strings.  This was to maintain the initial  */
-/* behavior while keeping the ability to store full FITS compatable */
-/* dates of the new form YYYY-MM-DD[Thh:mm:ss.[sss]] */
-/* Since this requires more than 8 characters, the decision was made */
-/* to convert these strings to/from doubles so that they can be */
-/* stored in the same 8-character space in the header and hence */
-/* POPSDAT does not need to change */
-
-/* These are the function which do that conversion */
-
-/* the value is stored as a modified JD number */
-
-/* slen gives the max number of chars possibly in sdate */
-/* sdate contains the string */
-/* ddate will contain the result */
-/* oldfits is 1 if this is the buggy old unipops with dd/mm reversed */
-void todate_(slen, sdate, ddate, oldfits)
-     int *slen;
-     char *sdate;
-     double *ddate;
-     int *oldfits;
-{
-  static int days[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 ,31 };
-  int first, last, len;
-  int yr, mon, day, hr, min, mday, mjd, csize, tmp;
-  float secs;
-  
-  yr = mon = day = hr = min = 0;
-  secs = 0.0;
-
-  *ddate = -1.0;
-  
-  first=last=-1;
-  while (last < *slen && sdate[++last] != '\0');
-  while (last >= 0 && sdate[--last] == ' ' && last >= 0);
-  while (first <= last && sdate[++first] == ' ');
-  /* first points to the first non_blank char and last to the last */
-  len = last - first + 1;
-  /* try some forms */
-  if ((len == 8 || (len == 7 && first == 1)) && 
-      sdate[2] == '/' && sdate[5] == '/')
-  {
-    /* original fits format */
-    sscanf(sdate, "%d/%d/%d", &day, &mon, &yr);
-    if (*oldfits) {
-      tmp = day;
-      day = mon;
-      mon = tmp;
-    } 
-    yr += 1900;
-  } else if (len == 10 && sdate[4] == '-' && sdate[7] == '-') {
-    /* new format, short form */
-    sscanf(sdate, "%d-%d-%d", &yr, &mon, &day);    
-  } else if (len >= 19 && sdate[4] == '-' && sdate[7] == '-' &&
-	     sdate[10] == 'T' && sdate[13] == ':' && sdate[16] == ':') {
-    /* new format, long form */
-    sscanf(sdate, "%d-%d-%dT%d:%d:%f", &yr, &mon, &day,
-	   &hr, &min, &secs);
-  } else {
-    /* anything else is unknown */
-    return;
-  }
-
-  /* convert to decimal days if everything is ok so far */
-  if (secs >= 60.0 || min >= 60 || hr >= 24 || mon > 12) return;
-  
-  mday = days[mon-1];
-  if ((yr%400 == 0) || ((yr%4 == 0) && (yr%100 != 0))) mday++;
-
-  if (day > mday) return;
-
-  mjd = (1461*(yr+4800+(mon-14)/12))/4 + 
-    (367*(mon-2-12*((mon-14)/12)))/12 -
-    (3*((yr+4900+(mon-14)/12)/100))/4 + day-32075;
-  mjd = mjd - 2400001;
-  *ddate = mjd + (hr + (min + secs/60.0)/60.0)/24.0;
-}
-
-/* slen gives the number of available chars to set */
-/* sset gives the number of chars actually set */
-/* ddate contains the modified julian date to be turned into a string */
-/* sdate will contain the string result it is filled with blanks if necessary
-/* to pad out all slen chars */
-void fromdate_(slen, sset, ddate, sdate)
-     int *slen, *sset;
-     double *ddate;
-     char *sdate;
-{
-  double jdf;
-  int jd, l, n, i, j, day, mon, yr, hr, min, nchars, tchars;
-  float secs;
-  *sset = 0;
-  if (*ddate >= 0.0) {
-    /* .0005 seconds is the resolution of the output string */
-    double mindayfract = .0005/60.0/60.0/24.0;
-
-    jdf = *ddate - (int)(*ddate); 
-    jd = *ddate - jdf + 2400001; 
-  
-
-    l = jd+68569; 
-    n=(4*l)/146097; 
-    l=l-(146097*n+3)/4; 
-    i=(4000*(l+1))/1461001; 
-    l=l-(1461*i)/4+31; 
-    j=(80*l)/2447; 
-    day=l-(2447*j)/80; 
-    l=j/11; 
-    mon=j+2-12*l; 
-    yr = 100*(n-49)+i+l;
-    /* is there any fractional day to display */
-    /* this forces the new style output */
-    if (jdf > mindayfract) {
-      if (*slen < 24) *sset = 0;
-      else {
-	jdf *= 24.0; 
-	hr = jdf; 
-	jdf = (jdf - hr)*60.0; 
-	min = jdf ; 
-	secs = (jdf - min)*60.0; 
-	if (secs >= 59.999) { 
-	  min += 1; 
-	  secs -= 60.0;
-	} 
-	if (min >= 60) { 
-	  hr += 1; 
-	  min -= 60; 
-	}
-	if (secs < mindayfract) secs = 0.0;
-	sprintf(sdate,"%04d-%02d-%02dT%02d:%02d:%06.3f",yr, mon, day, hr, min, secs);
-	*sset = 23;
-      }
-    } else {
-      if (*slen < 10) *sset = 0;
-      else {
-	/* which style to use, new or old */
-	if (datestyle_(0) || yr >= 2000) {
-	  /* for dates over 2000, we are forced to use this */
-	  sprintf(sdate,"%04d-%02d-%02d",yr, mon, day);
-	  *sset = 10;
-	} else {
-	  sprintf(sdate,"%02d/%02d/%02d",day,mon,(yr-1900));
-	  *sset = 8;
-	}
-      }
-    }
-  }
-  /* pad with spaces */
-  for (i=*sset;i<*slen;i++) sdate[i] = ' ';
-}
-
-/* format iarr into an approprate FITS date string */
-/* iarr has 3 elements, day, month, year */
-/* the result will be padded with blanks out to nchars */
-/* there is no sanity check that nchars is long enough */
-void makedate_(nchars, sdate, iarr)
-     int *nchars;
-     char *sdate;
-     int *iarr;
-{
-  int i, nc;
-  if (datestyle_(0) || iarr[2] >= 2000) {
-    sprintf(sdate, "%04d-%02d-%02d", iarr[2], iarr[1], iarr[0]);
-    nc = 10;
-  } else {
-    sprintf(sdate, "%02d/%02d/%02d", iarr[0], iarr[1], (iarr[2]-1900));
-    nc = 8;
-  }
-  for (i=nc;i<*nchars;i++) sdate[i] = ' ';
-}
-
-/* extract a fits keyword string value from the input string */
-/* to the output string */
-/* It is assumed that the input string is at least 80 chars */
-/* long and that the output string can hold at least 80-11 chars */
-/* nchars returns the number of chars of the output string actually set */
-/* String values start after the first ' and end before the next ' or
-/* column 80, whichever appears first */
-
-void fitskeyvalue_(nchars, card, value)
-     int *nchars;
-     char *card, *value;
-{
-  int icount, ocount;
-  icount = ocount = 0;
-  /* move to the start */
-  while (*card != '\0' && *card != '\'' && icount < 80) {
-    card++;
-    icount++;
-  }
-  if (*card == '\'') {
-    card++;
-    icount++;
-    while (*card != '\0' && *card != '\'' && icount < 80) {
-      *value = *card;
-      value++;
-      card++;
-      ocount++;
-      icount++;
-    }
-  }
-  *nchars = ocount;
-}
-
diff -uNr 3.5/utilities/cube/headline.f unipops-3.6/utilities/cube/headline.f
--- 3.5/utilities/cube/headline.f	2000-03-16 11:30:44.000000000 -0700
+++ unipops-3.6/utilities/cube/headline.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,112 +0,0 @@
-      logical function headline()
-c
-c     @(#)headline.f	5.3 05/04/98
-c
-c     Produces and writes the one record header for the cube file
-c
-      character*80 hmask(36)
-      integer ierr, nend, ndchars, lnblnk
-c
-      include 'cube.inc'
-c
-      write(6,*) 'Creating FITS header'
-      write(6,*) ' '
-      headline = .false.
-c
-      open(unit=iheadmask,file=headerfile,
-     1     access='sequential',form='formatted',status='old',
-     2     iostat=ierr)
-c
-      if (ierr .ne. 0) then
-	write(0,*) 'Major error!  Template header-file not found...'
-	goto 99
-      endif
-c
-      read(iheadmask,10,iostat=ierr) hmask
-10    format(a)
-c
-      if (ierr .ne. 0) then
-	write(0,*) 'Major error!  Template header-file cannot be read...'
-	goto 99
-      endif
-c     Reads in FITS header template.  Program must know of any changes to
-c     template.
-c
-      close (iheadmask)
-      numhead = 1
-c		We now always write (v,a,d) but we can add to (v,d,a) if nec.
-      afirst = .true.
-      write(unit=hmask(4) (24:30),fmt=20) nv
-      write(unit=hmask(5) (24:30),fmt=20) na
-      write(unit=hmask(6) (24:30),fmt=20) nd
-      write(unit=hmask(26) (24:30),fmt=20) ibad
-20    format(i7)
-c
-      hmask(7) (12:19) = coordv
-      hmask(12) (12:19) = coorda
-      hmask(17) (12:19) = coordd
-      hmask(22) (12:19) = appepch
-      hmask(23) (12:19) = object(1)
-      hmask(23) (20:27) = object(2)
-      hmask(24) (12:19) = origin
-      write(*,*) hmask(25)
-      hmask(25) (11:11) = '\''
-      write(*,*) hmask(25)
-      ndchars = lnblnk(date)
-      nend = ndchars + 11
-      write(*,*) ndchars, nend
-      write(*,*) date(1:ndchars)
-      hmask(25) (12:nend) = date(1:ndchars)
-      write(*,*) hmask(25)
-      nend = nend + 1
-      hmask(25) (nend:nend) = '\''
-      write(*,*) hmask(25)
-      hmask(29) (12:19) = units
-c
-      write(unit=hmask(8) (15:30),fmt=40) v0*1.e03
-      write(unit=hmask(9) (15:30),fmt=40) dvc*1.e03
-      write(unit=hmask(10) (15:30),fmt=40) vp
-      write(unit=hmask(11) (15:30),fmt=40) errv*1.e03
-c     Converts velocities from km/sec to m/sec
-c
-      write(unit=hmask(13) (15:30),fmt=40) a0
-      write(unit=hmask(14) (15:30),fmt=40) dac
-      write(unit=hmask(15) (15:30),fmt=40) ap
-      write(unit=hmask(16) (15:30),fmt=40) erra
-      write(unit=hmask(18) (15:30),fmt=40) d0
-      write(unit=hmask(19) (15:30),fmt=40) ddc
-      write(unit=hmask(20) (15:30),fmt=40) dp
-      write(unit=hmask(21) (15:30),fmt=40) errd
-      write(unit=hmask(27) (15:30),fmt=40) tscale
-      write(unit=hmask(28) (15:30),fmt=40) tzero
-      write(unit=hmask(30) (15:30),fmt=40) tmin
-      write(unit=hmask(31) (15:30),fmt=40) tmax
-      if (coordd(1:4) .eq. 'DEC-') then
-         write(unit=hmask(32) (15:30),fmt=40) equinox
-         hmask(33) (11:70) = label(1)
-         hmask(34) (11:70) = label(2)
-         hmask(35) (11:70) = label(3)
-      else
-	 hmask(32) = "COMMENT 0"
-         hmask(33) (11:70) = label(1)
-         hmask(34) (11:70) = label(2)
-         hmask(35) (11:70) = label(3)
-      endif
-40    format(1pe16.9)
-c
-      write(6,*) 'Header = '
-      write(6,*) hmask
-      write(6,*) '  '
-c
-      write(ioutdev,rec=1,iostat=ierr) hmask
-      if (ierr .ne. 0) then
-	write(0,*) 'Error on writing header to CUBE file...'
-	goto 99
-      endif
-c
-      headline = .true.
-c	
-99    return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/init.f unipops-3.6/utilities/cube/init.f
--- 3.5/utilities/cube/init.f	2000-03-16 11:30:45.000000000 -0700
+++ unipops-3.6/utilities/cube/init.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,56 +0,0 @@
-      subroutine init 
-c
-c     @(#)init.f	5.1 06/22/94
-c
-c     Initializes the cube file.  Header records are filled with blanks
-c     Data records are filled with IBADs.  Determines maxrec and mleft
-c     (the # records in Cube and # of positions used in last record)
-c
-      integer*2 lzero
-      integer j, i
-      character*2 spaces
-c
-      include 'cube.inc'
-c
-      data spaces/'  '/,lzero/0/
-c
-      write(6,*) 'Initializing data cube...'
-      write(6,*)
-c
-      do 50 j=1, numdata
-        lout(j) = ibad
-50    continue
-c
-      maxrec = (na * nd * nv) / numdata + 1
-      mleft = mod(na*nd*nv, numdata)
-      if (mleft .ne. 0) maxrec = maxrec + 1
-c
-      write(6,*) 'Max record number :', maxrec
-      write(6,*) 'Number of items used in last record :',mleft
-      write(6,*) ' '
-c
-      write(ioutdev,rec=1) (spaces,i=1,numdata)
-      if (maxrec .gt. 2) then
-         if (debug) write(6,89) 'Rec:     0'
-89       format(1x,a,1x,$)
-	 do 100 irec = 2, maxrec
-	    if (debug .and. mod(irec-2,20) .eq. 0 .and. irec .ne. 2) 
-     .			write(6,90) irec-2
-90	    format(1x,i5,1x,$)
-	    if (debug .and. mod(irec-2,240) .eq. 0 .and. irec .ne. 2)
-     .			write(6,*) ' '
-            write(ioutdev,rec=irec) lout
-100         continue
-         if (debug .and. (mod(maxrec-2,240) .ne. 0 .or. maxrec .eq. 2))
-     .			write(6,*) ' '
-      endif
-c
-      if (mleft .ne. 0) then
-	write(ioutdev,rec=maxrec) (lout(i),i=1,mleft),
-     1			     (lzero,j=mleft+1,numdata)
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/lchkdate.f unipops-3.6/utilities/cube/lchkdate.f
--- 3.5/utilities/cube/lchkdate.f	2000-03-16 11:30:46.000000000 -0700
+++ unipops-3.6/utilities/cube/lchkdate.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,29 +0,0 @@
-      logical function lchkdate(iyr,imth,iday)
-c
-c     @(#)lchkdate.f	5.1 06/22/94
-c
-c     Returns a TRUE if the date make sense
-c
-c     iyr, imth, ... = (I*4) date
-c
-      integer iyr, imth, iday
-c
-      integer imonth(12)
-c
-      data imonth/31,28,31,30,31,30,31,31,30,31,30,31/
-c
-      lchkdate = .true.
-c
-      if ( (iyr .le. 1582 .and. mod(iyr,4) .eq. 0) .or. (iyr .gt. 1582 
-     1     .and. mod(iyr,100) .ne. 0 .and. mod(iyr,4) .eq. 0) ) then
-           imonth(2) = 29
-      else
-	   imonth(2) = 28
-      endif
-c     Checks for whether it is leap year
-c
-      if (imth .le. 0 .or. imth .gt. 12 .or. iday .le. 0 .or. 
-     1    iday .gt. imonth(imth)) lchkdate = .false.
-c
-      return
-      end
diff -uNr 3.5/utilities/cube/params.inc unipops-3.6/utilities/cube/params.inc
--- 3.5/utilities/cube/params.inc	2000-03-16 11:30:41.000000000 -0700
+++ unipops-3.6/utilities/cube/params.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,35 +0,0 @@
-C-------------------------------------------------------------------------------
-C  @(#)params.inc	1.1 09/10/98
-C-------------------------------------------------------------------------------
-C
-C   This contains parameters used in appl.inc and elsewhere 
-C   in the code which specify the size of the data array and
-C   the headers.  They are placed here because there are a
-C   few places which need to know these values without also
-C   including appl.inc.  Changing these values does most
-C   of the work, but care must also be taken to change the
-C   values sdd.h and tuc_online_sdd.h.  In addition, any
-C   change to MAX_DATA_POINTS must be reflect in amathparser.f
-C   which contains a POPS line which is not interpreted until
-C   run-time:   'amathon; for n_n = 1 to 16384'.
-C   In the utility area, in fits you need to change unipops.h
-C   and in the main utility area you need to change U2f_trans.
-C   There are also a number of occurances in the explain
-C   text.  Simply search for the current value of MAX_DATA_POINTS.
-C   Finally, make sure that the RAPPLSIZE in appl.inc is large enough.
-C
-C                the maximum number of data points found in
-C                one of the data arrays
-      integer*4 MAX_DATA_POINTS 
-C                the size of the HDR in terms of R*8 values
-C                taking into account any padding (i.e. this
-C                is after the SDD structure on disk has been
-C                passed through conversion2).
-      integer*4 PADDED_HDR_SIZE
-C                size of padded header + data in r*4 units
-      integer*4 HDU_FLOAT_SIZE
-c	and actually set their values here
-      parameter (PADDED_HDR_SIZE=395)
-      parameter (MAX_DATA_POINTS=16384)
-      parameter (HDU_FLOAT_SIZE=(PADDED_HDR_SIZE*2 + MAX_DATA_POINTS))
-C
diff -uNr 3.5/utilities/cube/position.f unipops-3.6/utilities/cube/position.f
--- 3.5/utilities/cube/position.f	2000-03-16 11:30:46.000000000 -0700
+++ unipops-3.6/utilities/cube/position.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,98 +0,0 @@
-      logical function position ()
-c
-c     @(#)position.f	5.2 10/14/94
-c
-c     Gets coordinates of the present scan.  Correctly handles going through
-c     360 deg in the X directions.  Calculates where in the cube the position
-c     would fall.  If the position is not in the cube or if the distance
-c     between the cube position and the actual position is larger than the user
-c     supplied errors, that scan is skipped over.  POSITION is false if the
-c     scan is to be skipped. 
-c
-      real rad, xposs, xposc, cosy, yposs, yposc
-      integer ixc, iyc, startcube
-c
-      include 'cube.inc'
-      include 'dform.inc'
-c
-      data rad /57.29577951/
-c
-      position = .false.
-c
-      if ( isys .le. 14) then
-        xposs = dtwh(c4sx)
-        yposs = dtwh(c4sy)
-      else if ( isys .eq. 15) then
-        xposs = dtwh(c4era)
-        yposs = dtwh(c4edc)
-      else if ( isys .eq. 16) then
-        xposs = dtwh(c4gl)
-        yposs = dtwh(c4gb)
-      else if ( isys .eq. 17) then
-        xposs = dtwh(c4az)
-        yposs = dtwh(c4el)
-      else if ( isys .eq. 18) then
-        xposs = dtwh(c4ix)
-        yposs = dtwh(c4iy)
-      endif
-c     Gets the desired X and Y coordinates 
-c
-      cosy = 1.
-      if (cosv) cosy = cos(yposs/rad)
-      xposc = cosy*(xposs - a0)/dac + ap
-      if (nint(xposc) .lt. 1) xposc = xposc + abs(360.*cosy/dac)
-      if (nint(xposc) .gt. na) xposc = xposc - abs(360.*cosy/dac)
-      ixc = nint ( xposc)
-c     Turns X position into PIXEL values; corrects, if desired, for COSV.
-c     Watches out for going thru 360 degrees.
-c
-      yposc = (yposs-d0)/ddc + dp
-      iyc = nint ( yposc)
-c     Turns Y position into PIXEL values.
-c
-      if (debug) write(6,*) 'Pos:',xposs,yposs,' Cube:',xposc,yposc,
-     .				ixc,iyc
-c
-      if (ixc.gt.na .or. iyc.gt.nd .or. ixc.lt.1 .or. iyc.lt.1) then
-        write (6,*) ' Position is NOT in the data cube... Skipping...'
-c
-      else
-c
-	if ( abs((xposc - float(ixc))*dac) .gt. erra .or. 
-     1       abs((yposc - float(iyc))*ddc) .gt. errd )  then
-          write(6,*) 'Error in position is too large... Skipping....'
-	  if (debug) write(6,*) abs((xposc - float(ixc))*dac), erra,
-     1			        abs((yposc - float(iyc))*ddc), errd
-
-c
-        else 
-c
-          if (afirst) then
-             startcube = nv*(na*(iyc -1) + ixc -1)
-          else
-             startcube = nv*(nd*(ixc -1) + iyc -1)
-          endif
-c
-          irec = startcube/numdata + numhead + 1
-          idigit = mod (startcube,numdata)
-c	  STARTCUBE = pixel -1 where scan will start in cube
-c	  IREC = record number corresponding to that pixel
-c	  IDIGIT = location - 1 in that record where scan is to start
-c 
-          if (irec.le.numhead .or. irec .gt. maxrec .or.
-     1        idigit.lt.0 .or. idigit.ge.numdata) then
-		write(0,*) 'POSITION: INTERNAL ERROR -- Continuing'
-	  else
-                position = .true.
-	  endif
-c
-          if (debug) write(6,*) 'Output Record no. ',irec,
-     .			         ' Location within record ', idigit
-c
-        endif
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/readindex.f unipops-3.6/utilities/cube/readindex.f
--- 3.5/utilities/cube/readindex.f	2000-03-16 11:30:47.000000000 -0700
+++ unipops-3.6/utilities/cube/readindex.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,90 +0,0 @@
-      logical function readindex(filename, idev, numbytes, firstrec  )
-c
-c     @(#)readindex.f	5.1 06/22/94
-c
-c     Reads in the bootstrap block of an SDD#1 file.  Attaches the
-c     file to device IDEV.  Returns the record length (NUMBYTES) and the 
-c     first record number of the first scan in the data section of the file
-c     (FIRSTREC).
-c
-c     READINDEX is true if the reading is successful, otherwise it is false.
-c
-      character*70 filename
-      integer idev, numbytes, firstrec
-c
-      integer*2 i2nhead, i2ndata, i2ibprec, i2ibphead, i2lastind,
-     .          i2counter, i2type
-      integer*4 numheadrecs, numdatarecs, ibytperrec, ibytperheaditem,
-     .          counter, lastindexitem, typesdd, verssdd
-      integer itrybyte, ierr
-c
-      data itrybyte/512/
-c
-      readindex = .false.
-c
-      open(unit=idev,file=filename,status='old',access='direct',
-     1		recl=itrybyte,form='unformatted',iostat=ierr)
-      if (ierr .ne. 0) then
-	write(0,*) 'Problem opening SDD file...'
-	goto 999
-      endif
-c
-c     Read in the bootstrap record
-      read(idev,rec=1,iostat=ierr) numheadrecs, numdatarecs, ibytperrec, 
-     1		      ibytperheaditem, lastindexitem, counter, typesdd,
-     2                verssdd
-      if (ierr .ne. 0) then
-	write(0,*) 'Problem reading SDD bootstrap record...'
-	goto 999
-      endif
-c
-      if (verssdd .ne. 1) then
-         rewind(10)
-         read(idev,rec=1,iostat=ierr) i2nhead, i2ndata, i2ibprec, 
-     1		      i2ibphead, i2lastind, i2counter, i2type
-         if (ierr .ne. 0) then
-	   write(0,*) 'Problem reading SDD bootstrap record...'
-	   goto 999
-         endif
-         numheadrecs = i2nhead
-         numdatarecs = i2ndata
-         ibytperrec = i2ibprec
-         ibytperheaditem = i2ibphead
-         lastindexitem = i2lastind
-         counter = i2counter
-         typesdd = i2type
-         verssdd = 0
-      endif
-c
-      if (numheadrecs.le.1 .or. ibytperrec.le.10 .or. ibytperheaditem
-     1    .gt.ibytperrec .or. ibytperrec.gt.2048) then
-	write(0,*)  'SDD file is in an improper format...'
-	goto 999
-      endif
-c
-      if (typesdd .ne. 0) then
-	write(0,*)  'SDD file is in RECORDS format...'
-	goto 999
-      endif
-c
-      if (ibytperrec.ne.itrybyte) then
-	close(idev,iostat=ierr)
-        if (ierr .ne. 0) open(unit=idev,file=filename,status='old',
-     1		access='direct',recl=ibytperrec,form='unformatted',
-     2	        iostat=ierr)
-        if (ierr .ne. 0) then
-	  write(0,*) 'Problem opening SDD file...'
-	  goto 999
-        endif
-      endif
-c     Reopens file if the guessed record size doesn't correspond to the
-c	record size stored in the first record of the file
-c
-      readindex = .true.
-      numbytes = ibytperrec
-      firstrec = numheadrecs + 1
-      return
-c
-999   return
-      end
-c
diff -uNr 3.5/utilities/cube/readscan.f unipops-3.6/utilities/cube/readscan.f
--- 3.5/utilities/cube/readscan.f	2000-03-16 11:30:47.000000000 -0700
+++ unipops-3.6/utilities/cube/readscan.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,106 +0,0 @@
-      logical function readscan(idev,numbytes,recnumber,maxbytes,idat)
-c
-c     @(#)readscan.f	5.1 06/22/94
-c
-c     Reads in the next scan from the SDD#1 file attached to IDEV.
-c     NUMBYTES = number of bytes in each record of the file
-c     MAXBYTES = maximum number of bytes in scan that can be returned
-c     RECNUMBER is a suggetsed record number at which to look for data in
-c		file.  Returns the last record + 1 read in so as to
-c		be prepared for a future call to READSCAN.
-c     IDAT = Array in which scan is returned
-c  
-c     Returns FALSE if an error on read or EOF; else it returns TRUE.
-c
-      integer*2 idat(*)
-      integer numbytes, recnumber, maxbytes 
-c
-      integer irec, idev, numclass, j, i, bytesinscan,
-     .		numtoread, j1, j2, ierr
-      integer*2 idat1(28)
-      real*8 ddat1(7)
-c
-      equivalence (ddat1, idat1)
-c
-      readscan = .false.
-c
-      irec = recnumber - 1
-c
-100     irec = irec + 1
-	read(idev,rec=irec,iostat=ierr) (idat(j),j=1,numbytes/2)
-c       Read in the first possible data record of the scan
-c 
- 	if (ierr .lt. 0) then
-	   write(0,*) 'End of SDD File....'
-	   goto 999
-	else if (ierr .gt. 0) then
-	   write(0,*) 'Error reading from SDD file...'
-	   goto 999
-	endif
-c
-	numclass = idat(1)
-        if (numclass .le. 0 .or. numclass .gt. 14) goto 100
-	do 40 i = 2, numclass+1
-	   if (idat(i) .lt. 0) goto 100
-40	   continue
-c       Skip over any unused or bad scans/records by checking PREAMBLE
-c
- 	do 101 i = 1, 28
-	   idat1(i) = idat(i)
-101	   continue
-c       Store first few words in scan into IDAT1/DDAT1
-c
-        bytesinscan = ddat1(5)+ddat1(6)
-        if (bytesinscan .le. 0) goto 100
-c	    
-	if (mod(bytesinscan, numbytes) .ne. 0) then
-	   numtoread = bytesinscan/numbytes + 1
-	else
-	   numtoread = bytesinscan/numbytes
-	endif
-c       Number of records in scan
-c
-	if (bytesinscan .gt. maxbytes) then
-	    write(0,*) 'Too many bytes in scan', ddat1(7),
-     .		       '.... Skipping.....'
-            do 45 i = 2, numtoread
-	        irec = irec + 1   
-	        read(idev,rec=irec,iostat=ierr) (idat(j),j=1,numbytes)
- 		if (ierr .lt. 0) then
-	   		write(0,*) 'End of SDD File....'
-	   		goto 999
-		else if (ierr .gt. 0) then
-	   		write(0,*) 'Error reading from SDD file...'
-	   		goto 999
-		endif
-45	        continue
-	    goto 100
-c           Skip the rest of the scan since it is TOO big
-c
-	else    
-           do 50 i = 2, numtoread
-	        j1 = (i-1)*numbytes/2 + 1
-	        j2 = i*numbytes/2
-	        irec = irec + 1   
-	        read(idev,rec=irec,iostat=ierr) (idat(j),j=j1,j2)
- 		if (ierr .lt. 0) then
-	   		write(0,*) 'End of SDD File....'
-	   		goto 999
-		else if (ierr .gt. 0) then
-	   		write(0,*) 'Error reading from SDD file...'
-	   		goto 999
-		endif
-50	        continue
-c           Read in the rest of the scan
-c
-	endif
-c
-      recnumber = irec + 1
-c     Prepare RECNUMBER for next call to READSCAN.
-c
-      readscan = .true.
-c
-999   return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/setuphead.f unipops-3.6/utilities/cube/setuphead.f
--- 3.5/utilities/cube/setuphead.f	2000-03-16 11:30:48.000000000 -0700
+++ unipops-3.6/utilities/cube/setuphead.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,463 +0,0 @@
-      subroutine setuphead(objectname)
-c
-c     @(#)setuphead.f	5.2 05/04/98
-c
-c     Asks the user for values in order tp setup the FITS cube header
-c
-      integer iarray(3),ilen,iobj,istart,istop,i,id,im,lnblnk,
-     .	      hostnm, ierr, irtn, isys1
-      character*1 answr
-      character*(*) objectname
-      character*16 object1
-      character*24 date1, date2
-      character*8 hostname
-      character*72 input
-      real tmin1, tmax1, sec, aref, xask, yask, vask
-      logical lchkdate, hourdeg, inuse
-      
-      include 'cube.inc'
-      include 'dform.inc'
-c
-c
-      ilen = max(16,lnblnk(objectname))
-      object1 = objectname(ilen-15:ilen)
-19    ilen = index(object1,'/')
-      if (ilen .ne. 0) then
-	object1 = object1(ilen+1:)
-	goto 19
-      endif
-c     Packs into OBJECT1 the last sixteen chars in objectname.  Watch out for
-c	slashes (i.e., directories).
-c
-1 	write(6,*) 'What OBJECT name do you want in the CUBE header?'
-	write(6,*) '1: ', object1   
-	write(6,*) '2: ', ctwh(c1ona) // ctwh(c1ona+1)
-	write(6,*) '3: Other'
-	write(6,101) 'Enter 1, 2, or 3'
-101     format(1x,a,' -> ',$)
-	read(5,991) input
-991     format(a)
-	read(input,*,iostat=ierr) iobj
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad choice... Try again...'
-	   goto 1
-	endif
-	if (iobj .eq. 1) then
-	    object(1) = object1(1:8)
-            object(2) = object1(9:16)
-	else if (iobj .eq. 2) then
-	    object(1) = ctwh(c1ona)
-	    object(2) = ctwh(c1ona+1)
-	else if (iobj. eq. 3) then
-	    write(6,101) 'Enter OBJECT (16 chars. max.)'
-	    read(5,991) object1
-	    write(6,*) ' '
-            object(1) = object1(1:8)
-            object(2) = object1(9:16)
-	else
-	    write(6,*) 'Bad choice... Try again...'
-	    goto 1
-	endif
-c	Takes care of OBJECT
-c
-      call idate( iarray)
-      call makedate(24, date1, iarray)
-      iarray(3) = int(dtwh(c3dat))
-      iarray(2) = 100.d00*mod(dtwh(c3dat),1.d00)
-      iarray(1) = 100.d00*mod(dtwh(c3dat)*100.,1.d00)
-      call makedate(24, date2, iarray)
-c     Gets the system date and that from the present scan
-c
-2	write(6,*) 'What DATE do you want in the header?'
-	write(6,*) '1: ', date1
-	write(6,*) '2: ', date2
-	write(6,*) '3: Other'
-	write(6,101) 'Enter 1, 2, or 3'
-	read(5,991) input
-	read(input,*,iostat=ierr) iobj
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad choice... Try again...'
-	   goto 2
-	endif
-	if (iobj .eq. 1) then
-	    date = date1
-	else if (iobj .eq. 2) then
-	    date = date2
-	else if (iobj .eq. 3) then
-	    write(6,101) 'Enter date in the format of YYYY-MM-DD'
-	    read(5,102,iostat=ierr) iarray(3), iarray(2), iarray(1)
-102	    format(i4,1x,i2,1x,i2)
-	     write(6,*) ' '
-	    if (ierr .ne. 0 .or. 
-     .		.not. lchkdate(iarray(3),iarray(2), iarray(1))) then
-		write(6,*) 'Bad entry... Try again...'
-		goto 2
-	    endif
-            call makedate(24, date, iarray)
-	else
-	    write(6,*) 'Bad choice... Try again...'
-	    goto 2
-	endif
-c	Takes care of DATE
-c
-      ibad = -(irange + 1)
-c     BAD values are assigned the value of the negative range of data
-c     representation.
-c
-      irtn = hostnm(hostname)
-3	write(6,*) 'What PLACE OF ORIGIN do you want in the header?'
-	write(6,*) '1: ', hostname
-	write(6,*) '2: ',ctwh(c1tel)
-	write(6,*) '3: Other'
-	write(6,101) 'Enter 1, 2, or 3'
-	read(5,991) input
-	read(input,*,iostat=ierr) iobj
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad choice... Try again...'
-	   goto 3
-	endif
-	if (iobj .eq. 1) then
-	    origin = hostname
-	else if (iobj .eq. 2) then
-	    origin = ctwh(c1tel)
-	else if (iobj. eq. 3) then
-	    write(6,101) 'Enter ORIGIN (8 chars. max)'
-	    read(5,991) origin
-	    write(6,*) ' '
-	else
-	    write(6,*) 'Bad choice... Try again...'
-	    goto 3
-	endif
-c	Takes care of ORIGIN
-c
-4	write(6,*) 'What UNITS are the data in the SDD file?'
-	write(6,*) '1: K'
-	write(6,*) '2: Jy'
-	write(6,*) '3: Other'
-	write(6,101) 'Enter 1, 2, or 3'
-	read(5,991) input
-	read(input,*,iostat=ierr) iobj
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad choice... Try again...'
-	   goto 4
-	endif
-	if (iobj .eq. 1) then
-	    units = 'K'
-	else if (iobj .eq. 2) then
-	    units = 'JY'
-	else if (iobj. eq. 3) then
-	    write(6,101) 'Enter UNITS (8 chars. max.)'
-	    read(5,991) units
-	    write(6,*) ' '
-	else
-	    write(6,*) 'Bad choice... Try again...'
-	    goto 4
-	endif
-c	Takes care of UNITS
-c
-
-      istart = dtwh(c12spn)+idatoff      
-      istop = istart + dtwh(c12ni) - 1
-      tmin1 = 1.e30
-      tmax1 = -1.e30
-      do 6 i = istart, istop
- 	   tmin1 = min(tmin1, twh(i))
-	   tmax1 = max(tmax1, twh(i))
-6	   continue
-c     Finds guesses for TMIN and TMAX
-c
-7       write(6,*) 'The first scan has min. and max. data values of',
-     .			tmin1, tmax1,'.'
-701	write(6,101) 'What min. value do you expect to find in the data?'
-	read(5,991) input
-        read(input,*,iostat=ierr) tmin
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-  	  write(6,*) 'Bad entry.... Try again...'
-	  go to 701
-        endif
-702	write(6,101) 'What max. value do you expect to find in the data?'
-	read(5,991) input
-        read(input,*,iostat=ierr) tmax
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-  	  write(6,*) 'Bad entry.... Try again...'
-	  go to 702
-        endif
-        if (tmin .ge. tmax) then
-  	  write(6,*) 'Bad entry.... Try again...'
-	  go to 7
-        endif
-c
-      tscale = (tmax-tmin) / float(2*irange)
-      tzero = tmin + float(irange)*tscale
-c     Calculates the MAX/MIN/SCALE factors for the data to be stored.
-c
-      if (ctwh(c4csc).eq.'EPOCRADC' .or. 
-     .	    ctwh(c4csc).eq.'GALACTIC' .or.
-     .	    ctwh(c4csc).eq.'AZEL    ' .or. 
-     .	    ctwh(c4csc).eq.'INDICATD' .or.
-     .      ctwh(c4csc).eq.'        ' ) then
-	    inuse = .true.
-      else
-	    inuse = .false.
-      endif
-c     INUSE will be true if the coordinate system that the the observation
-c     was taken in corresponds to those always existing in the header.
-c
-8       write(6,*) 'What coordinate system do you want to use?'
-        if (.not.inuse) write(6,*) '1: ', ctwh(c4csc)
-	write(6,*) '2: EPOCRADC'
-	write(6,*) '3: GALACTIC'
-        write(6,*) '4: AZEL'
-        write(6,*) '5: INDICATD'
-        write(6,*) '6: Other'
-	if (inuse) then
-	  write(6,101) 'Enter 2 - 6'
-	else
-	  write(6,101) 'Enter 1 - 6'
-	endif
-	read(5,991) input
-        read(input,*,iostat=ierr) isys1
-	write(6,*) ' '
-	if (ierr .gt. 0) then
-	    write(6,*) 'Bad choice... Try again...'
-	    goto 8
-	endif
-c
-	if (isys1 .eq. 1 .and. .not. inuse) then
-	   do 61 i = 1, 14
-		if (ctwh(c4csc) .eq. testcoord(i)) then
-		   isys = i
-		   goto 69
-		endif
-61		continue
-	   write(6,*) 'Apparently the header in the scan has an improper',
-     .		      ' coordinate code. Pick another system...'
-	   goto 8
-c
-	else if (isys1 .gt. 1 .and. isys1 .lt. 6) then
-	    isys = isys1 + 13
-	else if (isys1 .eq. 6) then
-	    write(6,*) 'Program will pick out only those observations',
-     .		       ' which were made in one of the'
-	    write(6,*) ' systems listed below.  Any observation not made',
-     .		       ' in the given system will be ignored.'
-	    write(6,*) ' '
-	    write(6,*) ' Which of the following systems do you want to use?'
-	    write(6,64) (i, ':', testcoord(i),i=1,14)
-64	    format(1x,i2, 1x, a1, 1x, a8)
-	    write(6,101) 'Enter 1 - 14'
-	    read(5,991) input
-            read(input,*,iostat=ierr) isys
-            write(6,*) ' '
-	    if (isys .lt. 1 .or. isys .gt. 14 .or. ierr .ne. 0) then
-		write(6,*) 'Bad choice... Try again...'
-		goto 8
-	    endif
-	else
-	    write(6,*) 'Bad choice... Try again...'
-	    goto 8
-	endif
-c
-69    if (isys .le. 14) then
-	  appepch = testcoord(isys)
-      else
-	  appepch = ' '
-      endif
-c     Assigns value to APPEPCH header word for storing more descriptive
-c     name for coord system
-c
-      coorda = caxis(1, isys)
-      coordd = caxis(2, isys)
-      coordv = 'VELO    '
-c     Assign values to coordinate codes for header.
-c		try and get Equinox right
-      if (coordd .eq. 'DEC-') then
-         equinox = 1950.0
-         if (appepch(1:4) .eq. '2000') then
-            equinox = 2000.0
-         else
-            equinox = dtwh(c4epo)
-         endif
-      endif
-c
-20	write(6,101) 'Do you want the map projection to be GLS ' //
-     .               '(COSV correction) ?  Answer Y or N'
-	read(5,991) answr
-	write(6,*) ' '
-        if (answr .eq. 'y' .or. answr .eq. 'Y') then
-	   cosv = .true.
-	else if (answr .eq. 'n' .or. answr  .eq. 'N') then
-	   cosv = .false.
-	else
-	   write(6,*) 'Bad choice... Try again...'
-	   goto 20
-        endif
-c	Set up COSV flag
-c
-      write(6,*) 'The first scan in the input file has the following',
-     .		   ' parameters:'
-      if (isys .eq. 15) then
-	   call ddtoddmmss(dtwh(c4era)/15.d00, id, im, sec)
-	   write(6,71) coorda, ' = ', id, ':', im, ':', sec
-71	   format(1x,a,a,i3,a,i2,a,f4.1)
-	   call ddtoddmmss(dtwh(c4edc), id, im, sec)
-	   write(6,71) coordd, ' = ', id, ':', im, ':', sec
-	   hourdeg = .true.
-      else if (isys .eq. 16) then
-	   write(6,74) coorda, ' = ', dtwh(c4gl)
-74	   format(1x,a,a,f10.5)
-	   write(6,74) coordd, ' = ', dtwh(c4gb)
-	   hourdeg = .false.
-      else if (isys .eq. 17) then
-	   write(6,74) coorda, ' = ', dtwh(c4az)
-	   write(6,74) coordd, ' = ', dtwh(c4el)
-	   hourdeg = .false.
-      else if (isys .eq. 18) then
-	   write(6,74) coorda, ' = ', dtwh(c4ix)
-	   write(6,74) coordd, ' = ', dtwh(c4iy)
-	   hourdeg = .false.
-      else if (isys .le. 7) then
-	   call ddtoddmmss(dtwh(c4sx)/15.d00, id, im, sec)
-	   write(6,71) coorda, ' = ', id, ':', im, ':', sec
-	   call ddtoddmmss(dtwh(c4sy), id, im, sec)
-	   write(6,71) coordd, ' = ', id, ':', im, ':', sec
-	   hourdeg = .true.
-      else
-	   write(6,74) coorda, ' = ', dtwh(c4sx)
-	   write(6,74) coordd, ' = ', dtwh(c4sy)
-	   hourdeg = .false.
-      endif
-      write(6,72) 'Velocity in channel one = ', 
-     .			dtwh(c12x0)+dtwh(c12dx)*(1.-dtwh(c12rp))
-72    format(1x,a,1pg16.7)
-      write(6,72) 'Delta velocity = ', dtwh(c12dx)
-      write(6,*) 'Number of channels = ', nint(dtwh(c12ni))
-      write(6,*) ' '
-c     Prints out info from scan in memory that may help observer choose some
-c     cube parameters.
-c     HOURDEG = true if the coordinate system uses hours for the x-axis.
-c
-c
-      write(6,*) 'Enter the corner position in ',coorda(1:4),
-     1		   ', ', coordd(1:4),', and ',coordv(1:4),' for the CUBE.'
-      if (cosv) write(6,*) 'COSV ON: Position should be specified as',
-     .		       ' if the data were taken at equator.'
-      a0 = xask(hourdeg,.false.)
-      d0 = yask(hourdeg,.true.)
-      v0 = vask(.true.)
-c
-21      write(6,*) 'Enter step size in ',coorda(1:4),', ',coordd(1:4),
-     .		   ', and ',coordv(1:4),'.'
-	if (cosv) then
-	    write(6,*) 'COSV ON: Step should be specified as if the data',
-     .		       ' were taken at equator.'
-	endif
-	dac = xask(hourdeg,.true.)
-	ddc = yask(hourdeg,.true.)
-	dvc = vask(.true.)
-	if (dac .eq. 0. .or. ddc .eq. 0. .or. dvc .eq. 0) then
-	  write(6,*) 'Bad step sizes... Try again...'
-	  goto 21
-        endif
-c
-      write(6,*) 'Enter errors in ',coorda(1:4),', ',coordd(1:4),
-     .		   ', and ',coordv(1:4),'.  Any data point which is'
-      write(6,*) 'further than these errors from a position',
-     .	 	   ' of the center of a pixel in the CUBE '
-      write(6,*) 'will NOT be used.  (Must be > 0 ; if >',
-     .		  ' 1/2, then 1/2 step size will be used.'
-c
-      erra = xask(hourdeg,.false.)
-      errd = yask(hourdeg,.false.)
-      errv = vask(.false.)
-      if (2*erra .gt. abs(dac) .or. 2*errd .gt. abs(ddc) .or. 
-     .	    2*errv .gt. abs(dvc)) then
-            write(6,*) 'Error is greater than 1/2 stepsize... Setting',
-     .                 ' the error to default of'
-	    write(6,*) '1/2 the step size. ' 
-	    write(6,*) ' '
-      endif     
-      if (2*erra .gt. abs(dac)) erra = abs(dac)/2.
-      if (2*errd .gt. abs(ddc)) errd = abs(ddc)/2.
-      if (2*errv .gt. abs(dvc)) errv = abs(dvc)/2.
-c  
-30      write(6,*) 'Enter number of points in ',coorda(1:4),', ',
-     .		   coordd(1:4),', and ',coordv(1:4),' directions (>= 1)'
-301	write(6,101) 'Enter number of ' // coorda(1:4) // ' pixels'
-	read(5,991) input
-        read(input,*,iostat=ierr) na
-        write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad entry... Try again...'
-	   goto 301
-	endif
-302	write(6,101) 'Enter number of ' // coordd(1:4) // ' pixels'
-	read(5,991) input
-        read(input,*,iostat=ierr) nd
-        write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad entry... Try again...'
-	   goto 302
-	endif
-303	write(6,101) 'Enter number of ' // coordv(1:4) // ' pixels'
-	read(5,991) input
-        read(input,*,iostat=ierr) nv
-        write(6,*) ' '
-	if (ierr .gt. 0) then
-	   write(6,*) 'Bad entry... Try again...'
-	   goto 303
-	endif
-	if (na .lt. 1 .or. nd .lt. 1 .or. nv .lt. 1) then
-	   write(6,*) 'Bad number of points... Try again...'
-	   goto 30
-        endif
-	if (na*nd*nv .gt. 47.e6 ) then
-	   write(6,*) 'Too many points (47 x 10^6 max)... Try again...'
-	   goto 30
-        endif
-c
-      if (cosv) then
-	   write(6,*) 'COSV ON: Enter Reference position in ', 
-     .			coorda(1:4),' for COS V affect.'
-	   aref = xask(hourdeg,.false.)
-	   ap = (aref-a0)/dac + 1
-	   a0 = aref
-c			Also set d ref to be 0 for GLS projection
-           dp = -d0/ddc + 1
-           d0 = 0.0
-c
-	   coorda(5:8) = '-GLS'
-	   coordd(5:8) = '-GLS'
-c	   Get reference coordinate of map.  Update coordinate codes
-c
-      else
-	   ap = 1.
-           dp = 1.
-      endif
-      vp = 1.
-c     Also, assign values to reference pixels.
-c
-      write(6,*) 'Enter the 3 comments you may want to add to the',
-     1             ' header in the cube file (60 x 3  characters)'
-      write(6,*) '                                                  ',
-     1             '           |'
-      read (5,991) label(1)
-      write(6,*) '                                                  ',
-     1             '           |'
-      read (5,991) label(2)
-      write(6,*) '                                                  ',
-     1             '           |'
-      read (5,991) label(3)
-      write(6,*) ' '
-c
-      return
-c
-      end
-c
-c
diff -uNr 3.5/utilities/cube/toilet2.f unipops-3.6/utilities/cube/toilet2.f
--- 3.5/utilities/cube/toilet2.f	2000-03-16 11:30:51.000000000 -0700
+++ unipops-3.6/utilities/cube/toilet2.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,404 +0,0 @@
-      logical function toilet2()
-c
-c     @(#)toilet2.f	5.2 05/04/98
-c
-c     Reads the header for an existing cube file
-c
-      character*80 head(36), hmask(36), stch
-      character*1 quote 
-      character*4 oldyaxis(2)
-      logical lend
-      integer ierr, j, jmax, i, k, n2, n3, oldfits, nchars, n24, lnblnk
-      real*8 ddate
-c
-      include 'cube.inc'
-c
-      data quote /''''/
-      data oldyaxis /'DEC ','EL  '/
-      data n24 /24/
-c
-      write(6,*) 'Reading in Header record(s) in CUBE file' 
-      write(6,*) ' '
-      toilet2 = .false.
-c
-      lend = .false.
-      cosv = .false.
-      afirst = .true.
-      isys = 0
-      a0 = 1.
-      d0 = 1.
-      v0 = 1
-      n2 = 0
-      n3 = 0
-      nv = 0
-      dac = 1.
-      ddc = 1.
-      dvc = 1.
-      erra = 1.e30
-      errd = 1.e30
-      errv = 1.e30
-      vp = 1.
-      dp = 1.
-      ap = 1.
-      tzero = 0.
-      tscale = 1.
-      equinox = 0.0
-      coorda = '        '
-      coordd = '        '
-      coordv = '        '
-      appepch = '        '
-      label(1) = ' '
-      label(2) = ' '
-      label(3) = ' '
-      date = '        '
-      object(1) = '        '
-      object(2) = '        '
-      origin = '        '
-      units = '        '
-      tmin = -irange
-      tmax = irange
-      ibad = -irange-1
-c     Sets up defaults if the header doesn't contain the necessary
-c     information.  No gaurentees if one of the above is not in the header
-c
-      open(unit=iheadmask,file=headerfile,
-     1     access='sequential',form='formatted',status='old',
-     2     iostat=ierr)
-c
-      if (ierr .ne. 0) then
-	write(0,*) 'Major error!  Template header-file not found...'
-	goto 99
-      endif
-c
-      read(iheadmask,10,iostat=ierr) hmask
-10    format(a80)
-      close (iheadmask,iostat=ierr)
-c
-      if (ierr .ne. 0) then
-	write(0,*) 'Major error!  Template header-file cannot be read...'
-	goto 99
-      endif
-c     Reads in FITS header template.  Program must know of any changes to
-c     template.
-c
-      close (iheadmask,iostat=ierr)
-c
-      irec = 0
-c
-1       irec = irec + 1
-	write(6,*) 'Reading the ', irec, ' header record from cube'
-      	read(ioutdev,rec=irec,iostat=ierr) head
-	if (ierr .ne. 0) then
-	   write(0,*) 'Cannot read cube header...'
-	   goto 99
-        endif
-c
-	write(6,*) ' '
- 	write(6,*) head
-	write(6,*) ' '
-c
-	if (irec .eq. 1) then
-c
-	if (head(1)(1:30) .ne. hmask(1)(1:30)) then
-	   write(0,*) 'FITS header is not in the required format...'
-	   write(0,*) head(1)
-	   goto 99
-	endif
-	if (head(2)(1:30) .ne. hmask(2)(1:30)) then
-	   write(0,*) 'FITS header is not in the required format...'
-	   write(0,*) head(2)
-	   goto 99
-	endif
-	if (head(3)(1:30) .ne. hmask(3)(1:30)) then
-	   write(0,*) 'FITS header is not in the required format...'
-	   write(0,*) head(3)
-	   goto 99
-	endif
-c       Checks for SIMPLE, BITPIX, NAXIS=3
-c
-        if (hmask(4) (1:10) .ne. head(4) (1:10) ) then
-	   write(0,*) 'FITS header is not in the required format...'
-	   write(0,*) head(4)
-	   goto 99
-	else
-	   read(unit=head(4) (11:30),fmt=20) nv
-20    	   format(i20)
-	endif
-        if (hmask(5) (1:10) .ne. head(5) (1:10) ) then
-	   write(0,*) 'FITS header is not in the required format...'
-	   write(0,*) head(5)
-	   goto 99
-	else
-	   read(unit=head(5) (11:30),fmt=20) n2
-	endif
-        if (hmask(6) (1:10) .ne. head(6) (1:10) ) then
-	   write(0,*) 'FITS header is not in the required format...'
-	   write(0,*) head(6)
-	   goto 99
-	else
-	   read(unit=head(6) (11:30),fmt=20) n3
-	endif
-c       Checks NAXIS1,NAXIS2,NAXIS3, NAXIS1 is nv, the others depend
-c	 and get sorted out later
-c
-        endif
-c
-	do 50 j = 36, 1, -1
-	   if (hmask(36)(1:10) .eq. head(j)(1:10) ) then
-		write(6,*) 'Last header record found'
-		numhead = irec
-		jmax = j - 1
-		lend = .true.
-		goto 60
-	   endif
-50	   continue
-        jmax = 36
-c       Checks if this is the last header record
-c
-60      continue
-c           try and see if this is an old style unipops header
-c           this had the DATE keyword with the order of mm/dd reversed
-c           and its signaled by the following heuristic
-        oldfits = 0
-        if (head(2)(32:32) .eq. '/' .and.
-     +      head(2)(53:59) .eq. 'UniPops') then
-           oldfits = 1
-        endif
-c
-        do 200 i = 1, 36
-	   do 100 j = 1, jmax
-	      if (hmask(i) (1:10) .eq. head(j) (1:10) ) then
-                if (i .eq. 7) then
-		  if (head(j) (12:15) .ne. 'VELO' .and.
-     .		      head(j) (12:15) .ne. 'FELO') then
-	   	    write(0,*) 'FITS header is not in the required format...',
-     .			'  Velocity axis must be first...'
-	   	    write(0,*) head(j)
-	   	    goto 99
-		  else
-	   	    coordv = head(j) (12:19)
-		  endif
-		endif
-c		Checks CTYPE1 = VELO or FELO
-c
-		if (i .eq. 12) then
-c			make sure this is an "X" coord
-                   afirst = .true.
-                   do 210 k = 1, 18
-                      if (head(j) (12:15) .eq. caxis(2,k)) 
-     .                    afirst = .false.
- 210               continue
-c			these were some old Y coord labels we used to use
-                   do 215 k = 1, 2
-                      if (head(j) (12:15) .eq. oldyaxis(k))
-     .                    afirst = .false.
- 215               continue
-                endif
-c			after i = 12, it is assumed that afirst is set correctly
-                if (i .ge. 12 .and. i .le. 21) then
-                   if (afirst) then
-                      if (i .eq. 12) coorda = head(j) (12:19)
-      		      if (i .eq. 17) coordd = head(j) (12:19) 
-      		      if (i .eq. 13) 
-     .                      read(unit=head(j) (11:30),fmt=40) a0
-      		      if (i .eq. 14) 
-     .                      read(unit=head(j) (11:30),fmt=40) dac
-		      if (i .eq. 15) 
-     .                      read(unit=head(j) (11:30),fmt=40) ap
-		      if (i .eq. 16) 
-     .                      read(unit=head(j) (11:30),fmt=40) erra
-      		      if (i .eq. 18) 
-     .                      read(unit=head(j) (11:30),fmt=40) d0
-      		      if (i .eq. 19) 
-     .                      read(unit=head(j) (11:30),fmt=40) ddc
-		      if (i .eq. 20) 
-     .                      read(unit=head(j) (11:30),fmt=40) dp
-		      if (i .eq. 21) 
-     .                      read(unit=head(j) (11:30),fmt=40) errd
-                   else
-                      if (i .eq. 12) coordd = head(j) (12:19)
-      		      if (i .eq. 17) coorda = head(j) (12:19) 
-      		      if (i .eq. 13) 
-     .                      read(unit=head(j) (11:30),fmt=40) d0
-      		      if (i .eq. 14) 
-     .                      read(unit=head(j) (11:30),fmt=40) ddc
-		      if (i .eq. 15) 
-     .                      read(unit=head(j) (11:30),fmt=40) dp
-		      if (i .eq. 16) 
-     .                      read(unit=head(j) (11:30),fmt=40) errd
-      		      if (i .eq. 18) 
-     .                      read(unit=head(j) (11:30),fmt=40) a0
-      		      if (i .eq. 19) 
-     .                      read(unit=head(j) (11:30),fmt=40) dac
-		      if (i .eq. 20) 
-     .                      read(unit=head(j) (11:30),fmt=40) ap
-		      if (i .eq. 21) 
-     .                      read(unit=head(j) (11:30),fmt=40) erra
-                   endif
-                endif
-c
-      		if (i .eq. 22) appepch = head(j) (12:19) 
-		if (i .eq. 23) then
-                   object(1) = head(j) (12:19) 
-                   if (head(j) (20:20) .ne. quote) 
-     .                object(2) = head(j) (20:27)
-                endif
-		if (i .eq. 24) origin = head(j) (12:19) 
-		if (i .eq. 25) then
-                   call fitskeyvalue(nchars, head(j), stch)
-                   call todate(nchars, stch, ddate, oldfits)
-                   call fromdate(n24, nchars, ddate, date)
-                   if (oldfits) then
-c                        we need to rewrite this record to fix the problem
-c                        if its oldfits, then it must have 8 chars currently
-c                        occupied by the data
-c                        The new string will either be 8 chars or 10 chars
-c                        depending on whether the y2k format is being used
-                       nchars = lnblnk(date)
-                       if (nchars .eq. 8) then
-c                           a simple overwrite
-                          head(j)(12:19) = date(1:8)
-                       else if (nchars .eq. 10) then
-c                           overwrite
-                          head(j)(12:21) = date(1:10)
-c                           and put the closing quote in the right place
-                          head(j)(22:22) = quote
-                       else
-c                           this should never happen
-                          write(0,*) 'Impossible DATE string found...'
-                          write(0,*) 'Please report this error'
-                          goto 99
-                       endif
-c                           now update this record
-                       write(ioutdev,rec=irec,iostat=ierr) head
-                       if (ierr .ne. 0) then
-                          write(0,*) 'Cannot update cube header...'
-                          goto 99
-                       endif
-                   endif
-                endif
-		if (i .eq. 29) units = head(j) (12:19) 
-c
-      		if (i.eq.8) read(unit=head(j)(11:30),fmt=40) v0
-      		if (i.eq.9) read(unit=head(j)(11:30),fmt=40) dvc
-		if (i.eq.10) read(unit=head(j)(11:30),fmt=40) vp
-		if (i.eq.11) read(unit=head(j)(11:30),fmt=40) errv
-      		if (i .eq. 27) read(unit=head(j)(11:30),fmt=40)tscale
-      		if (i .eq. 28) read(unit=head(j) (11:30),fmt=40)tzero
-      		if (i .eq. 30) read(unit=head(j) (11:30),fmt=40) tmin
-      		if (i .eq. 31) read(unit=head(j) (11:30),fmt=40) tmax
-      		if (i .eq. 32) read(unit=head(j) (11:30),fmt=40) equinox
-40    		format(1g20.0)
-c
-      		if (i .eq. 33) label(1) = head(j) (11:70) 
-      		if (i .eq. 34) label(2) = head(j) (11:70) 
-      		if (i .eq. 35) label(3) = head(j) (11:70)
-c
-		if (i .eq. 26) read(unit=head(j) (11:30),fmt=20) ibad
-c
-	      endif
-100           continue
-200	   continue
-c
-        if ( .not. lend) goto 1
-c
-      write(6,*) 'Checking input FITS header parameters'
-      write(6,*) ' '
-c
-      v0 = v0 / 1.e03
-      dvc = dvc / 1.e03
-      errv = errv / 1.e03
-c     Convert from FITS m/sec to internal km/sec.
-c		Assign n2, n3 to na, nd as appropriate
-      if (afirst) then
-         na = n2
-         nd = n3
-      else
-         nd = n2
-         na = n3
-      endif
-c
-      if (nv*na*nd .gt. 47.e6 .or. nv*na .lt. 0 .or. na*nd .lt. 0 .or.
-     1    nv*na*nd .le. 0) then
-	write(0,*) 'Bad NAXIS#:: ',na,nd,nv
-	goto 99
-      endif
-c			set equinox if not already set
-      if (coordd(1:4) .eq. 'DEC-' .and. equinox .eq. 0) equinox=1950.0
-c
-      maxrec = (na*nd*nv) / numdata + numhead
-      mleft = mod(na*nd*nv, numdata)
-      if (mleft .ne. 0) maxrec = maxrec + 1
-c
-      if (tscale .eq. 0.) then
-	write(0,*) 'Bad BSCALE: ',tscale
-	goto 99
-      endif
-c
-      if (a0 .lt. 0. .or. a0 .gt. 360. .or. d0 .lt .-90. .or.
-     1    d0 .gt. 90.) write(6,*) 'Possibly bad CRVAL1 : ',a0, d0, v0
-c     Corrects the starting coords if the header refeerences it to a
-c     new point.
-c
-      if (erra .lt. 0. .or. errd .lt. 0. .or. errv .lt. 0.) 
-     .		write(6,*) 'Possibly bad COMMENT ERR# : ',erra, errd, errv
-c
-      erra = min(abs(erra), abs(dac) / 2.)
-      errd = min(abs(errd), abs(ddc) / 2.)
-      errv = min(errv, abs(dvc) / 2.)
-c
-      if (ibad .ne. -32768) write(6,*) 'Possibly bad BLANK : ',ibad
-c
-      do 101 isys = 1, 14
-	if (appepch .eq. testcoord(isys)) goto 120
-101     continue
-      do 102 isys = 15, 18
-	if (coorda(1:4) .eq. caxis(1,isys) .and. 
-     .	    coordd(1:4) .eq. caxis(2,isys)) goto 120
-102	continue
-c
-      write(0,*) 'Bad CTYPE# :', coorda, coordd, appepch
-      goto 99
-c
-120   if (coorda(5:8) .eq. '-GLS') then
-	if (coordd(5:8) .ne. '-GLS') then
-	   write(0,*) 'Cannot have X and Y in different coordinate systems...'
-	   goto 99
-	else
-	   cosv = .true.
-	endif
-      endif
-c
-      tmax = float(irange)*tscale + tzero
-      tmin = float(-irange)*tscale + tzero
-c     Recalculates tmax and tmin for 16 bit representation.  Ignores Header
-c     values.
-c
-      if (debug) then
-      	write(6,*) 'Internal variable values (for debugging only) :'
-      	write(6,*) 'a0,d0,v0', a0,d0,v0
-      	write(6,*) 'na,nd,nv', na,nd,nv
-      	write(6,*) 'dac,ddc,dvc', dac,ddc,dvc
-      	write(6,*) 'ap,dp,vp',ap,dp,vp
-      	write(6,*) 'erra,errd,errv',erra,errd,errv
-      	write(6,*) 'isys,coorda,coordd,coordv', isys,' ',coorda, ' ',
-     1	          coordd,' ',coordv
-      	write(6,*) 'tzero,tscale', tzero,tscale
-      	write(6,*) 'tmin,tmax,ibad',tmin,tmax,ibad
-      	write(6,*) 'date,object,appepch ', date,' ',object,' ',appepch
-      	write(6,*) 'origin,units,cosv ', origin,' ',units,' ',cosv
-        write(6,*) 'equinox ',equinox
-      	write(6,*) 'label ',label(1)
-      	write(6,*) 'label ',label(2)
-      	write(6,*) 'label ',label(3)
-      	write(6,*) 'maxrec,mleft,numhead',maxrec,mleft,numhead
-        write(6,*) 'afirst ', afirst
-	write(6,*) ' '
-      endif 
-c
-      toilet2 = .true.     
-c
-99    return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/vask.f unipops-3.6/utilities/cube/vask.f
--- 3.5/utilities/cube/vask.f	2000-03-16 11:30:54.000000000 -0700
+++ unipops-3.6/utilities/cube/vask.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,37 +0,0 @@
-      real function vask (sign)
-c     
-c     @(#)vask.f	5.1 06/22/94
-c
-c     Routine for asking for and returning velocities.
-c 
-c     If SIGN = TRUE, will ask for an optional preceeding sign.  
-c
-      logical sign
-c
-      real value
-      integer ierr
-c     
-5     if (sign) then
-	write(6,*) 'SVVVVV.VVV km/sec (Enter number using displayed format.)'
-        read (5,10,iostat=ierr) value
-      else
-	write(6,*) 'VVVVV.VVV km/sec (Enter number using displayed format.)'
-        read (5,10,iostat=ierr) value
-10	format(f10.0)
-      endif
-      write(6,*) ' '
-      if (ierr .ne. 0) then
-	write(6,*) 'Bad input value... Try again...'
-	goto 5  
-      endif
-      vask = value
-c
-      if (value .lt. 0. .and. .not. sign) then
-	   write(6,*) 'Negative value not allowed... Try again...'
-	   goto 5
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/velocity.f unipops-3.6/utilities/cube/velocity.f
--- 3.5/utilities/cube/velocity.f	2000-03-16 11:30:54.000000000 -0700
+++ unipops-3.6/utilities/cube/velocity.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,149 +0,0 @@
-      subroutine velocity 
-c
-c     @(#)velocity.f	5.1 06/22/94
-c
-c     Reads in the next cube record which is to be processed (if it is
-c     not already in memory).  Goes through a scan and sees what channels
-c     fall within the limits of the cube and if they are within the
-c     user specified error of a cube location.  Writes out that record
-c     when the scan is completed.
-c
-      integer ib, ioldrec, lmin, lmax, kmin, kmax, irecmin, irecmax, 
-     .		idigitmax,istart, istop, i1a, i2a, i2, k, i1,
-     .		l, idigitmin, idir, itmp
-      real cvel, dvel, cc, vlowest, vhighest, v, vk, v1, v2
-      logical incube
-c
-      include 'cube.inc'
-      include 'dform.inc'
-c
-      save ioldrec
-c
-      data ioldrec/0/
-c     record number of last read record from cube file
-c
-      lmin = 32767
-      lmax = -32767
-      kmin = 32767
-      kmax = -32767
-      irecmin = 32767
-      irecmax = -32767
-      idigitmin = 32767
-      idigitmax = -32767
-c     Useful for debugging purposes
-c
-      istart = dtwh (c12spn) 
-      istop = istart + dtwh(c12ni) - 1
-      cvel = dtwh (c12x0)
-      dvel = dtwh (c12dx)
-      cc = dtwh(c12rp)
-      v1 = v0 + dvc*(1. - vp)
-      v2 = v0 + dvc*(float(nv) - vp)
-      vlowest = min(v1,v2) - errv
-      vhighest = max(v1,v2) + errv
-c
-c     Calculates start/stop channel numbers, center velocity, velocity
-c     width and center channel.  Calculates
-c     the minimum/maximum velocities which can go into the cube.
-c
-      i1a = nint ( (vlowest-cvel) / dvel + cc)
-      i2a = nint ( (vhighest-cvel) / dvel + cc)
-      i1 = max(min(i1a, i2a) - 1, istart)
-      i2 = min(max(i1a, i2a) + 1, istop)
-      idir = 1
-      if (dvel * dvc .lt. 0) then
-         idir = -1
-         itmp = i1
-         i1 = i2
-         i2 = itmp
-      endif
-      if (debug) write(6,*) 'Looking at channels : ',i1,' to ',i2,
-     .                     ' idir ', idir
-c     Calculates the range of channels numbers which should be looked at.
-c     The +/- 1 are to make sure that some edge channels aren't skipped
-c     Make sure we step through the vector in the same direction that
-c     the FITS cube is ordered.
-c
-      if (irec .ne. ioldrec) read(ioutdev,rec=irec,err=500) lout
-      ioldrec = irec
-c     Reads in a record only if desired one is not already in memory
-c
-      do 200 k = i1, i2, idir
-c
-         v = (float(k) - cc) * dvel + cvel
-         l = nint( (v - v0)/dvc + vp)
-         vk = v0 + (float (l)-vp)*dvc
-	 incube = v .ge. vlowest .and. v .le. vhighest .and. 
-     .		  abs( vk - v ) .lt. errv .and. l .gt. 0 .and. l .le. nv
-c
-c        K = channel number of interest
-c        V = velocity of center of channel K
-c	 L = closest output bin number to velocity V
-c	 VK = velocity of center of output bin L
-c	 IDIGIT = location-1 in LOUT of output record corresponding to 
-c		VLOWEST. 
-c        INCUBE = true if the channel K falls within errv of a pixel in the cube 
-c
-110	 if (l+idigit .lt. 1 .and. k .ne. i1 .and. incube) then
-		write(6,*) 'Somethings wrong... in VELOCITY',
-     .				       l,idigit,k,v,vk,irec
-		goto 200
-	 else if (l + idigit. gt. numdata) then
-   		write(ioutdev,rec=irec,err=600) lout
-		idigit = idigit - numdata
-		irec = irec + 1
- 		read(ioutdev,rec=irec,err=500) lout
-		ioldrec = irec
-	        goto 110
-c		Scan stared in one record and extends into another; write
-c		first rec. out and read in second.  
-c
-	 endif
-c
-         if ( incube ) then
-c
-            ib = nint( 2.*float(irange) * (twh(k + idatoff) - tmin)
-     1		     / (tmax-tmin) )
-            if (ib .lt. 0 .or. ib .gt. 2*irange) then
-		lout(l+idigit) = ibad
-	    else
-                lout(l+idigit) = ib - irange
-	    endif
-c	    Input channel falss within the cube pixel; set output buffer to
-c	    scaled data value in that channel.
-c
-	    kmin = min(kmin, k)
-	    kmax = max(kmax, k)
-	    lmin = min(lmin, l)
-	    lmax = max(lmax, l)
-	    irecmin = min(irecmin, irec)
-	    irecmax = max(irecmax, irec)
-	    idigitmin = min(idigitmin, idigit) 
-	    idigitmax = max(idigitmax, idigit)
-c	    Update debugging variables
-c
-         endif
-c
-200   continue
-c
-      write(ioutdev,rec=irec,err=600) lout
-c     Scan is done so write buffer out just in case program dies elswhere.
-c
-      if (debug) then
-	write(6,*) 'Max/Min k, l, irec, idigit ',  kmin, kmax, 
-     .		   lmin, lmax, irecmin, irecmax, idigitmin, idigitmax
-      endif
-c
-      if (kmin .eq. 32767) write(6,*) 'NO channels added...',
-     .				      '  Wrong velocities'
-	   
-      return
-c
-500   write(0,*) 'Error in reading from cube file'
-      return
-c
-600   write(0,*) 'Error in writing to cube file'
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/xask.f unipops-3.6/utilities/cube/xask.f
--- 3.5/utilities/cube/xask.f	2000-03-16 11:30:55.000000000 -0700
+++ unipops-3.6/utilities/cube/xask.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,61 +0,0 @@
-      real function xask (hord, sign)
-c     
-c     @(#)xask.f	5.1 06/22/94
-c
-c     Routine for asking for and returning Horizontal positions.
-c
-c     If HORD = TRUE, then will ask for input in HH MM SS.SS format and
-c     input will be multiplied by 15 to return degrees; 
-c     If HORD = FALSE, will ask for input in DDD.DDDD format. 
-c 
-c     If SIGN = TRUE, will ask for an optional preceeding sign.  
-c
-      logical hord, sign
-c
-      logical cvrt
-      character*13 coord
-      real value
-      integer ierr
-c
-5     if (hord) then 
-	coord = ' '
-	if (sign) then
-	   write(6,*) 'SHH MM SS.SS (Enter number using displayed format.)'
-      	   read (5,11) coord(1:1),coord(3:13)
-11         format(a,a)
-	else
-	   write(6,*) 'HH MM SS.SS (Enter number using displayed format.)'
-      	   read (5,11) coord(3:13)
- 	endif
-	write(6,*) ' '
-	if (.not. cvrt(coord,value) ) then
-	   write(6,*) 'Bad input value... Try again'
-	   goto 5
-	endif
-	xask = 15. * value
-      else
-	if (sign) then
-	   write(6,*) 'SDDD.DDDDD (Enter number using displayed format.)'
-	   read(5,20,iostat=ierr) value
-20	   format(f10.0)
-	else
-	   write(6,*) 'DDD.DDDDD (Enter number using displayed format.)'
-	   read(5,20,iostat=ierr) value
-	endif
-	write(6,*) ' '
-	if (ierr .ne. 0) then
-	  write(6,*) 'Bad input value... Try again'
-	  goto 5
-	endif
-	xask = value
-      endif
-c
-      if (value .lt. 0. .and. .not. sign) then
-	   write(6,*) 'Negative value not allowed... Try again...'
-	   goto 5
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cube/yask.f unipops-3.6/utilities/cube/yask.f
--- 3.5/utilities/cube/yask.f	2000-03-16 11:30:56.000000000 -0700
+++ unipops-3.6/utilities/cube/yask.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,60 +0,0 @@
-      real function yask (hord, sign)
-c     
-c     @(#)yask.f	5.1 06/22/94
-c
-c     Routine for asking for and returning Vertical positions.
-c
-c     If HORD = TRUE, then will ask for input in DD MM SS.SS format 
-c     If HORD = FALSE, will ask for input in DDD.DDDD format. 
-c 
-c     If SIGN = TRUE, will ask for an optional preceeding sign.  
-c
-      logical hord, sign
-c
-      logical cvrt
-      character*13 coord
-      real value
-      integer ierr
-c
-5     if (hord) then 
-	coord = ' '
-	if (sign) then
-	   write(6,*) 'SDD MM SS.SS (Enter number using displayed format.)'
-      	   read (5,11) coord(1:1),coord(3:13)
-11         format(a,a)
-	else
-	   write(6,*) 'DD MM SS.SS (Enter number using displayed format.)'
-      	   read (5,11) coord(3:13)
- 	endif
-	write(6,*) ' '
-	if (.not. cvrt(coord,value) ) then
-	   write(6,*) 'Bad input value... Try again'
-	   goto 5
-	endif
-	yask = value
-      else
-	if (sign) then
-	   write(6,*) 'SDD.DDDDD (Enter number using displayed format.)'
-	   read(5,20,iostat=ierr) value
-20	   format(f10.0)
-	else
-	   write(6,*) 'DD.DDDDD (Enter number using displayed format.)'
-	   read(5,20,iostat=ierr) value
-	endif
-	write(6,*) ' '
-	if (ierr .ne. 0) then
-	  write(6,*) 'Bad input value... Try again'
-	  goto 5
-	endif
-	yask = value
-      endif
-c
-      if (value .lt. 0. .and. .not. sign) then
-	   write(6,*) 'Negative value not allowed... Try again...'
-	   goto 5
-      endif
-c
-      return
-c
-      end
-c
diff -uNr 3.5/utilities/cvt.disk-disk unipops-3.6/utilities/cvt.disk-disk
--- 3.5/utilities/cvt.disk-disk	2000-03-16 11:29:44.000000000 -0700
+++ unipops-3.6/utilities/cvt.disk-disk	1969-12-31 17:00:00.000000000 -0700
@@ -1,391 +0,0 @@
-#! /bin/csh -f
-#  @(#)cvt.disk-disk.sh	5.2 10/27/94
-echo " "
-echo "Converts a disk file in Online, IEEE Keep, Modcomp Keep, Telescope Tape, "
-echo "ASCII, SDD, or PCPOPS format to disk in either IEEE Keep, Modcomp Keep, "
-echo "ASCII, SDD, or PCPOPS format.  All of the file or only the records "
-echo "specified by the user will be converted"
-echo " "
-#
-informat:
-echo " "
-echo "Enter one of the following to specify the format of the file to be converted"
-echo -n "IEEE, MOD, ASCII, TELE, ONLINE, SDD, or PC? "
-set informat = $<
-set informat = `echo $informat | tr "[a-z]" "[A-Z]"`
-if ($informat == "IEEE" || $informat == "MOD" || $informat == "PC") then
-	set recl = 5120
-else if ($informat == "TELE") then
-	set recl = 9600
-else if ($informat == "ASCII") then
-	set recl = 21680
-else if ($informat == "SDD") then
-	echo " "
-	echo "NOTE:  Due to the limitations of the SDD and the IEEE, PC, etc."
-	echo "formats, the conversion from SDD format on occasion may produce"
-	echo "bad output files.  Use with some caution."
-else if ($informat != "ONLINE") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto informat
-endif
-#
-echo " "
-if ($informat == "ONLINE") then
-	echo -n "Enter project code: "
-	set projcode = $<
-else
- 	echo -n "Enter input file name: "
-  	set infile = $<
-  	if ($infile != "" && ! -e $infile) then
-		echo " "
-		echo "ERROR: Input file" $infile "does not exist... Try again"
-		echo " "
-		exit(256)
-  	endif
-	if ($informat == "SDD") then
-      	   set bb = `bootstrap $infile 512 LONG`
-           if ( $bb[10] != 1) then
-      	      set bb = `bootstrap $infile 512 SHORT`
-              set typesdd = $bb[8]
-	      set skiprec = $bb[2]
-	      set recl = $bb[4]
-           else
-              set typesdd = $bb[9]
-	      set skiprec = $bb[2]
-	      set recl = $bb[4]
-           endif
-      	   if ( $typesdd != 0 ) then
-	      echo "Input SDD file is in RECORDS format... Terminating"
-	      exit 0
-           endif
-	endif
-endif
-#
-outformat:
-echo " "
-echo "Enter one of the following to specify the format of output file"
-echo -n "IEEE, MOD, ASCII, SDD, or PC? "
-set outformat = $<
-set outformat = `echo $outformat | tr "[a-z]" "[A-Z]"`
-if ($outformat != "IEEE" && $outformat != "MOD" && $outformat != "PC" && $outformat != "ASCII" && $outformat != "SDD") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto outformat
-endif
-#
-set cmnd2 = ""
-set pos = ""
-if ($informat != $outformat) then
-intype:
-   echo " "
-   echo "Enter L or C or B if you want line, continuum, or both"
-   echo -n "types of scans: "
-   set scntype = $<
-   set cmnd2 = ""
-   if ($scntype == "l" || $scntype == "L") then
-	set cmnd2 = "l"
-   else if($scntype == "c" || $scntype == "C") then
-	set cmnd2 = "c"
-   else if($scntype != "b" && $scntype != "B") then
-	echo "WARNING: Incorrect entry... Try again"
-	goto intype
-   endif
-#
-   if ($cmnd2 == "c" || $cmnd2 == "") then
-  	if ($informat == "TELE" || $informat == "ONLINE") then
-	   echo " "
-	   echo -n "Enter a Y if you want positional scans (feeds 98 and 99): "
-	   set postype = $<
-	   if ($postype == "Y" || $postype == "y") set pos = "p"
-	endif
-   endif
-endif
-#
-newfile:
-echo " "
-echo -n "Enter output file name: "
-set outfile = $<
-if ($?infile) then
-   if ($infile == $outfile) then
-	echo " "
-	echo "ERROR: Input file cannot be the same as output file... Try again"
-	echo " "
-	exit(256)
-   endif
-endif
-#
-unset overwrite
-if (-e $outfile) then
-	echo " "
-	echo "WARNING: Output file" $outfile "exists..."
-	echo "Do you want to overwrite output file or append to it?"
-	echo -n "Enter o for overwrite, anything else to append: "
-	set answr = $<
-	if ($answr == "o" || $answr == "O") set overwrite
-else
-	set overwrite
-endif
-#
-inrecords:
-echo " "
-if ($informat != "ONLINE") then
-  echo -n "Enter first record number to convert (1 for first record in file): "
-  set first = $<
-  echo -n "Enter last record number to convert (0 for last record in file): "
-  set last = $<
-else
-  echo -n "Enter first scan number to convert (1 for first scan in file): "
-  set first = $<
-  echo -n "Enter last scan number to convert (0 for last scan in file): "
-  set last = $<
-endif
-#
-if ($first <= 0) set first = 1
-if ($last <= 0 && $informat == "ONLINE") set last = 32767
-if ($last <= 0 && $informat != "ONLINE") set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last "
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-@ count=1 + $last - $first 
-@ skip=$first - 1
-if ($informat == "SDD") then
-   @ skip=$skip + $skiprec
-endif
-#
-echo " "
-if ($?overwrite) then
-   echo "Creating" $outfile
-   if (-e $outfile) \rm $outfile
-   if ($status != 0) then
-	echo "Cannot remove ${outfile}"
-	exit(256)
-   endif
-   if ($outformat == "SDD") then
-	echo " "
-        echo "How many output scans do you want the SDD file "    
-        echo -n "to hold (Default = 1024) ? " 
-        set nscans = $< 
-        if ($nscans == "") set nscans = 1024 
-        makeempty.exe $outfile $nscans
-	if ($status != 0) then
-	   echo "Cannot create ${outfile}"
-	   exit(256)
-	endif
-   endif
-else
-   if ($outformat == "SDD") then
-      set bb = `bootstrap $outfile 512 LONG`
-      if ( $bb[10] != 1) then
-         set bb = `bootstrap $outfile 512 SHORT`
-         set typesdd = $bb[8]
-      else
-         set typesdd = $bb[9]
-      endif
-      if ( $typesdd != 0 ) then
-	  echo "Output SDD file is in RECORDS format... Terminating"
-	  exit 256
-      endif
-   endif
-#
-   echo "Appending to" $outfile
-endif
-touch $outfile
-if ($status != 0) then
-   echo "Cannot modify ${outfile}"
-   exit(256)
-endif
-#
-if ($informat == "ONLINE" && $outformat == "PC") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | pcieee.exe >> $outfile 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos | pcieee.exe >> $outfile
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | pcieee.exe >> $outfile
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "MOD") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | ieee2keep.exe >> $outfile 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos | ieee2keep.exe >> $outfile
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | ieee2keep.exe >> $outfile
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "IEEE") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos >> $outfile 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos >> $outfile
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos >> $outfile
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "ASCII") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | ieee2ascii.exe | dd \
-	   obs=21680 cbs=80 conv=block >> $outfile 
-	   cdump $projcode $first $last $pos | ieee2ascii.exe | dd \
-	   obs=21680 cbs=80 conv=block >> $outfile 
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | ieee2ascii.exe | dd \
-	   obs=21680 cbs=80 conv=block >> $outfile 
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "SDD") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | ieee2sdd.exe >> $outfile 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos | ieee2sdd.exe >> $outfile
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | ieee2sdd.exe >> $outfile
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "TELE" && $outformat == "PC") then
-        dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "MOD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | ieee2keep.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "IEEE") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | ieee2ascii.exe | dd \
-	obs=21680 cbs=80 conv=block >> $outfile 
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "SDD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "PC") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 | pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "IEEE") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 | ieee2ascii.exe | dd \
-	obs=21680 cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "SDD") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "IEEE") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "MOD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 | ieee2keep.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 | ieee2ascii.exe | dd \
-	obs=21680 cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "SDD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "PC") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "MOD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | ieee2keep.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | ieee2ascii.exe $cmnd2  | dd \
-	obs=21680 cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "SDD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | ieee2sdd.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "IEEE") then
-	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "MOD") then
-	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 | ieee2keep.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "PC") then
- 	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 | pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "SDD") then
-	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "PC") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	| pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "MOD") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	| ieee2keep.exe	>> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "IEEE") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	>> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	| ieee2ascii.exe | dd obs=21680 cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == $outformat) then
-        dd if=$infile bs=$recl skip=$skip count=$count >> $outfile
-	if ($status != 0) goto cnverr
-endif
-#
-unset overwrite
-#
-if ($outformat == "SDD") then
-   makeindex.exe $outfile > /dev/null
-   if ($status != 0) then
-      echo "Some problem encountered in recreating index for ${outfile}"
-      exit(256)
-   endif
-endif
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-	goto newfile
-else if($answr == "n" || $answr == "N") then
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorect entry... Try again"
-	goto more
-endif
-#
-cnverr:
-   echo "Some problem encountered in converting data"
-   exit(256)
diff -uNr 3.5/utilities/cvt.disk-tape unipops-3.6/utilities/cvt.disk-tape
--- 3.5/utilities/cvt.disk-tape	2000-03-16 11:29:44.000000000 -0700
+++ unipops-3.6/utilities/cvt.disk-tape	1969-12-31 17:00:00.000000000 -0700
@@ -1,438 +0,0 @@
-#! /bin/csh -f
-#  @(#)cvt.disk-tape.sh	5.3 10/04/96
-echo " "
-echo "Converts a disk file in ONLINE, IEEE Keep, Modcomp Keep, Telescope Tape, "
-echo "ASCII, SDD, or PCPOPS format to tape in either IEEE Keep, Modcomp Keep, "
-echo "ASCII, or PCPOPS format.  All of the file or only the records specified "
-echo "by the user will be converted."
-echo " "
-echo "NOTE: The tape drive must be attached to" `hostname`
-echo " "
-#
-informat:
-echo " "
-echo "Enter one of the following to specify the format of the file to be converted"
-echo -n "IEEE, MOD, ASCII, TELE, ONLINE, SDD, or PC? "
-set informat = $<
-set informat = `echo $informat | tr "[a-z]" "[A-Z]"`
-if ($informat == "IEEE" || $informat == "MOD" || $informat == "PC") then
-	set recl = 5120
-else if ($informat == "TELE") then
-	set recl = 9600
-else if ($informat == "ASCII") then
-	set recl = 21680
-else if ($informat == "SDD") then
-	echo " "
-	echo "NOTE:  Due to the limitations of the SDD and the IEEE, PC, etc."
-	echo "formats, the conversion from SDD format on occasion may produce"
-	echo "bad output files.  Use with some caution."
-else if ($informat != "ONLINE") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto informat
-endif
-#
-echo " "
-if ($informat == "ONLINE") then
-	echo " "
-	echo -n "Enter project code: "
-	set projcode = $<
-else
-  	echo " "
-  	echo -n "Enter input file name: "
-  	set infile = $<
- 	if ($infile != "" && ! -e $infile) then
-		echo " "
-		echo "ERROR: Input file" $infile "does not exist... Try again"
-		echo " "
-		exit(256)
-  	endif
-	if ($informat == "SDD") then
-      	   set bb = `bootstrap $infile 512 LONG`
-           if ( $bb[10] != 1 ) then
-      	      set bb = `bootstrap $infile 512 SHORT`
-              set typesdd = $bb[8]
-	      set skiprec = $bb[2]
-	      set recl = $bb[4]
-           else
-              set typesdd = $bb[9]
-	      set skiprec = $bb[2]
-	      set recl = $bb[4]
-           endif
-      	   if ( $typesdd != 0 ) then
-	      echo "Input SDD file is in RECORDS format... Terminating"
-	      exit 0
-           endif
-	endif
-endif
-#
-outformat:
-echo " "
-echo "Enter one of the following to specify the format of output file"
-echo -n "IEEE, MOD, ASCII, or PC? "
-set outformat = $<
-set outformat = `echo $outformat | tr "[a-z]" "[A-Z]"`
-if ($outformat != "IEEE" && $outformat != "MOD" && $outformat != "PC" && $outformat != "ASCII") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto outformat
-endif
-if ($outformat == "ASCII") then
-	set outrecl = 21680
-else
-	set outrecl = 5120
-endif
-#
-set cmnd2 = ""
-set pos = ""
-if ($informat != $outformat) then
-intype:
-   echo " "
-   echo "Enter L or C or B if you want line, continuum, or both"
-   echo -n "types of scans: "
-   set scntype = $<
-   set cmnd2 = ""
-   if ($scntype == "l" || $scntype == "L") then
-	set cmnd2 = "l"
-   else if($scntype == "c" || $scntype == "C") then
-	set cmnd2 = "c"
-   else if($scntype != "b" && $scntype != "B") then
-	echo "WARNING: Incorrect entry... Try again"
-	goto intype
-   endif
-#
-   if ($cmnd2 == "c" || $cmnd2 == "") then
-  	if ($informat == "TELE" || $informat == "ONLINE") then
-	   echo " "
-	   echo -n "Enter a Y if you want positional scans (feeds 98 and 99): "
-	   set postype = $<
-	   if ($postype == "Y" || $postype == "y") set pos = "p"
-	endif
-   endif
-endif
-#
-echo " "
-if (`isSolaris` == "YES")  then
-   echo -n "Enter unit number of input tape drive (e.g., 0, 1, 2, ...) : "
-   set outfile = $<
-   set drv = /dev/rmt/$outfile
-   set ndrv = /dev/rmt/${outfile}bn
-else
-   echo -n "Enter device name of output tape drive (e.g., rst0, rst1, rmt0,...): "
-   set outfile = $<
-   set drv = /dev/$outfile
-   set ndrv = /dev/n$outfile
-endif
-if (! -e $drv || ! -e $ndrv) then
-   echo " "
-   echo "ERROR: Output drive" $drv " or "  $ndrv " does not exist... Try again"
-   echo " "
-   exit(256)
-endif
-#
-echo " "
-echo "Rewinding output tape"
-mt -f $drv rewind
-if ($status != 0) then
-   echo "Cannot rewind ${drv}"
-   exit(256)
-endif
-#
-if ($outformat != "MOD") then
-  echo " "
-  echo -n "How many files do you want to skip on the output tape? "
-  set nfiles = $<
-  if ($nfiles > 0) then
-     echo " "
-     echo "Skiping" $nfiles "files"
-     mt -f $ndrv fsf $nfiles
-     if ($status != 0) then
-        echo "Cannot advance files on ${drv}"
-        exit(256)
-     endif
-  endif
-endif
-#
-echo " "
-echo "If file already has data in it, do you want to append data to it"
-echo "or do you want to overwrite it?"
-echo -n "Enter o for overwrite, anything else to append: "
-set answr = $<
-#
-if ($answr == "o" || $answr == "O") then 
-   set seek2 = 0
-   if ($outformat == "MOD") then
-	set nfiles = 1
-	echo " "
-	echo "Writing label to tape"
-	dd if=${popsdir}utilities/keep.label of=$ndrv bs=80 count=1 conv=block
-     	if ($status != 0) then
-           echo "Cannot write label to ${drv}"
-           exit(256)
-     	endif
-   endif
-else 
-    if ($outformat == "MOD") then
-	set nfiles = 1
-	echo " "
-	echo "Reading label on tape"
-	set labeltape = `dd if=$ndrv bs=80 count=1 | grep "MODCOMP USERTAPE" | wc`
-     	if ($status != 0) then
-           echo "Cannot read label on ${drv}"
-           exit(256)
-     	endif
-	if ($labeltape[2] == 0) then
-	   echo " "
-	   echo "ERROR: Tape is NOT a MODCOMP KEEP tape... Try again"
-	   echo " "
-	   echo "Rewinding and exiting"
-	   mt -f $drv rewind
-	   echo " "
-	   exit(256)
-        else
-	   mt -f $drv rewind
-     	   if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	   endif
-	   mt -f $ndrv fsf 1
-     	   if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	   endif
-	endif
-     endif
-#
-     echo " "
-     echo "Positioning tape at End of Data file"
-     set seek = `dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-     if ($status != 0) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-     endif
-     echo " "
-     echo $seek[1] "records on tape"
-     set seek2 = $seek[1]
-     mt -f $ndrv bsf 1
-     if ($status != 0) then
-          echo "Cannot position tape on ${drv}"
-          exit(256)
-     endif
-     mt -f $ndrv fsr $seek2
-     if ($status != 0) then
-          echo "Cannot position tape on ${drv}"
-          exit(256)
-     endif
-#
-endif
-#
-inrecords:
-echo " "
-if ($informat != "ONLINE") then
-  echo -n "Enter first record number to convert (1 for first record in file): "
-  set first = $<
-  echo -n "Enter last record number to convert (0 for last record in file): "
-  set last = $<
-else
-  echo -n "Enter first scan number to convert (1 for first scan in file): "
-  set first = $<
-  echo -n "Enter last scan number to convert (0 for last scan in file): "
-  set last = $<
-endif
-#
-if ($first <= 0) set first = 1
-if ($last <= 0 && $informat == "ONLINE") set last = 32767
-if ($last <= 0 && $informat != "ONLINE") set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last"
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-@ count=1 + $last - $first 
-@ skip=$first - 1
-if ($informat == "SDD") then
-   @ skip=$skip + $skiprec
-endif
-#
-echo " "
-echo "Writing to" $drv
-if ($informat == "ONLINE" && $outformat == "PC") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | pcieee.exe >> $drv 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos | pcieee.exe >> $drv
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | pcieee.exe >> $drv
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "MOD") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | ieee2keep.exe >> $drv 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos | ieee2keep.exe >> $drv
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | ieee2keep.exe >> $drv
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "IEEE") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos >> $drv 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos >> $drv
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos >> $drv
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "ONLINE" && $outformat == "ASCII") then
-	if ($cmnd2 == "") then
-	   ldump $projcode $first $last $pos | ieee2ascii.exe | dd \
-	   obs=21680 cbs=80 conv=block >> $drv 
-	   if ($status != 0) goto cnverr
-	   cdump $projcode $first $last $pos | ieee2ascii.exe | dd \
-	   obs=21680 cbs=80 conv=block >> $drv 
-	   if ($status != 0) goto cnverr
-	else 
-	   ${cmnd2}dump $projcode $first $last $pos | ieee2ascii.exe | dd \
-	   obs=21680 cbs=80 conv=block >> $drv 
-	   if ($status != 0) goto cnverr
-	endif
-else if ($informat == "TELE" && $outformat == "PC") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | pcieee.exe > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "MOD") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | ieee2keep.exe > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "IEEE") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos > $drv 
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | tele2ieee.exe $cmnd2 $pos | ieee2ascii.exe | dd \
-	obs=21680 cbs=80 conv=block > $drv 
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "PC") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 | pcieee.exe > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "IEEE") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | keep2ieee.exe $cmnd2 | ieee2ascii.exe | dd \
-	obs=21680 cbs=80 conv=block > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "IEEE") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "MOD") then
-	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 | ieee2keep.exe > $ndrv
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 | ieee2ascii.exe | dd \
-	obs=21680 cbs=80 conv=block > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "PC") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | pcieee.exe $cmnd2 > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "MOD") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | ieee2keep.exe $cmnd2  > $drv 
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl \
-	skip=$skip count=$count | ieee2ascii.exe $cmnd2 | dd \
-	obs=21680 cbs=80 conv=block > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "PC") then
- 	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 | pcieee.exe > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "MOD") then
- 	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 | ieee2keep.exe > $drv 
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "IEEE") then
- 	dd if=$infile ibs=$recl cbs=80 conv=unblock \
-	skip=$skip count=$count | ascii2ieee.exe $cmnd2 > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "PC") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	| pcieee.exe > $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "MOD") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	| ieee2keep.exe > $drv 
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "IEEE") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	> $drv
-	if ($status != 0) goto cnverr
-else if ($informat == "SDD" && $outformat == "ASCII") then
- 	dd if=$infile bs=$recl skip=$skip count=$count | sdd2ieee.exe $cmnd2 \
-	| ieee2ascii.exe | dd obs=21680 cbs=80 conv=block >> $drv 
-	if ($status != 0) goto cnverr
-else if ($informat == $outformat) then
- 	dd if=$infile of=$drv bs=$recl skip=$skip count=$count 
-	if ($status != 0) goto cnverr
-endif
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-     echo " "
-     echo "Positioning tape at End of Data file."
-     mt -f $drv rewind
-     if ($status != 0) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-     endif
-     set seek = `dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-     if ($status != 0) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-     endif
-     echo " "
-     echo $seek[1] "records on tape"
-     set seek2 = $seek[1]
-     mt -f $ndrv bsf 1
-     if ($status != 0) then
-          echo "Cannot position tape on ${drv}"
-          exit(256)
-     endif
-     mt -f $ndrv fsr $seek2
-     if ($status != 0) then
-          echo "Cannot position tape on ${drv}"
-          exit(256)
-     endif
-#
-     goto inrecords
-else if($answr == "n" || $answr == "N") then
-	echo "Rewinding...."
-	mt -f $drv rewind
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto more
-endif
-#
- cnverr:
-   echo "Some problem encountered in converting data"
-   exit(256)
diff -uNr 3.5/utilities/cvt.disk-tape.cv unipops-3.6/utilities/cvt.disk-tape.cv
--- 3.5/utilities/cvt.disk-tape.cv	2000-03-16 11:41:00.000000000 -0700
+++ unipops-3.6/utilities/cvt.disk-tape.cv	1969-12-31 17:00:00.000000000 -0700
@@ -1,587 +0,0 @@
-#! /bin/csh -f
-# %W% %G%
-# Charlottesville version.  Uses remote tape on rhesus.
-set tapehost = rhesus
-#		make sure that they can rsh to tapehost
-set username = `whoami`
-rsh -l $username $tapehost ls >& /dev/null
-if ($status != 0) then
-   set username = unipops
-   rsh -l $username $tapehost ls >& /dev/null
-   if ($status != 0) then
-      echo "This will not work from your login."
-      echo "See the local unipops guru for help."
-      exit(256)
-   endif
-endif
-set rmtcsh = "rsh -l $username $tapehost /bin/csh -f"
-set rmt = "rsh -l $username $tapehost"
-#
-echo " "
-echo "Converts a disk file in ONLINE, IEEE Keep, Modcomp Keep, Telescope Tape, "
-echo "ASCII, SDD, or PCPOPS format to tape in either IEEE Keep, Modcomp Keep, "
-echo "ASCII, or PCPOPS format.  All of the file or only the records specified "
-echo "by the user will be converted."
-echo " "
-echo "NOTE: The tape drive must be attached to" $tapehost
-echo " "
-#
-informat:
-echo " "
-echo "Enter one of the following to specify the format of the file to be converted"
-echo -n "IEEE, MOD, ASCII, TELE, ONLINE, SDD, or PC? "
-set informat = $<
-set informat = `echo $informat | tr "[a-z]" "[A-Z]"`
-if ($informat == "IEEE" || $informat == "MOD" || $informat == "PC") then
-	set recl = 5120
-else if ($informat == "TELE") then
-	set recl = 9600
-else if ($informat == "ASCII") then
-	set recl = 21680
-else if ($informat == "SDD") then
-	echo " "
-	echo "NOTE:  Due to the limitations of the SDD and the IEEE, PC, etc."
-	echo "formats, the conversion from SDD format on occasion may produce"
-	echo "bad output files.  Use with some caution."
-else if ($informat != "ONLINE") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto informat
-endif
-#
-echo " "
-if ($informat == "ONLINE") then
-	echo " "
-	echo -n "Enter project code: "
-	set projcode = $<
-else
-  	echo " "
-  	echo -n "Enter input file name: "
-  	set infile = $<
- 	if ($infile != "" && ! -e $infile) then
-		echo " "
-		echo "ERROR: Input file" $infile "does not exist... Try again"
-		echo " "
-		exit(256)
-  	endif
-	if ($informat == "SDD") then
-      	   set bb = `bootstrap $infile 512 LONG`
-           if ( $bb[10] != 1 ) then
-      	      set bb = `bootstrap $infile 512 SHORT`
-              set typesdd = $bb[8]
-	      set skiprec = $bb[2]
-	      set recl = $bb[4]
-           else
-              set typesdd = $bb[9]
-	      set skiprec = $bb[2]
-	      set recl = $bb[4]
-           endif
-      	   if ( $typesdd != 0 ) then
-	      echo "Input SDD file is in RECORDS format... Terminating"
-	      exit 0
-           endif
-	endif
-endif
-#
-outformat:
-echo " "
-echo "Enter one of the following to specify the format of output file"
-echo -n "IEEE, MOD, ASCII, or PC? "
-set outformat = $<
-set outformat = `echo $outformat | tr "[a-z]" "[A-Z]"`
-if ($outformat != "IEEE" && $outformat != "MOD" && $outformat != "PC" && $outformat != "ASCII") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto outformat
-endif
-if ($outformat == "ASCII") then
-	set outrecl = 21680
-else
-	set outrecl = 5120
-endif
-#
-set cmnd2 = ""
-if ($informat != $outformat) then
-intype:
-   echo " "
-   echo "Enter L or C or B if you want line, continuum, or both"
-   echo -n "types of scans: "
-   set scntype = $<
-   if ($scntype == "l" || $scntype == "L") then
-	set cmnd2 = "l"
-   else if($scntype == "c" || $scntype == "C") then
-	if ($informat == "TELE") then
-		set cmnd2 = "c p"
-	else
-		set cmnd2 = "c"
-	endif
-   else if($scntype == "b" || $scntype == "B") then
-	if ($informat == "TELE") then
-		set cmnd2 = "p"
-	else
-		set cmnd2 = ""
-	endif
-   else
-	echo "WARNING: Incorrect entry... Try again"
-	goto intype
-   endif
-endif
-#
-echo " "
-echo -n "Enter device name of output tape drive (e.g., rst0, rst1, rmt0,...): "
-set outfile = $<
-set drv = /dev/$outfile
-#			on IBM machines, the odd drive number extensions are the
-#			non-rewind devices
-set ndrv = /dev/$outfile.1
-set ifstr = "if ( -e $drv ) echo YES"
-set EXIST = `echo $ifstr | $rmtcsh`
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ( $EXIST !~ YES ) then
-   echo " "
-   echo "ERROR: Input drive" $drv "does not exist on $tapehost.  Try again"
-   goto intape
-endif
-#
-echo " "
-echo "Rewinding output tape"
-onintr -
-set cmdout = `echo mt -f $drv rewind\; echo \$status | $rmtcsh `
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ($cmdout[$#cmdout] != 0) then
-   echo "Cannot rewind ${drv} on $tapehost"
-   exit(256)
-endif
-onintr
-#
-if ($outformat != "MOD") then
-  echo " "
-  echo -n "How many files do you want to skip on the output tape? "
-  set nfiles = $<
-  if ($nfiles > 0) then
-     echo " "
-     echo "Skiping" $nfiles "files"
-     onintr -
-     set cmdout = `echo mt -f $ndrv fsf $nfiles\; echo \$status | $rmtcsh`
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     if ($cmdout[$#cmdout]) then
-        echo "Cannot position tape on ${drv}"
-        exit(256)
-     endif
-     onintr
-  endif
-endif
-#
-echo " "
-echo "If file already has data in it, do you want to append data to it"
-echo "or do you want to overwrite it?"
-echo -n "Enter o for overwrite, anything else to append: "
-set answr = $<
-#
-if ($answr == "o" || $answr == "O") then 
-   set seek2 = 0
-   if ($outformat == "MOD") then
-	set nfiles = 1
-	echo " "
-	echo "Writing label to tape"
-        onintr -
-        set rmtdd = "$rmt dd of=$ndrv obs=80 count=1 conv=block"
-	cat ${popsdir}utilities/keep.label | $rmtdd
-        if ($status != 0) then
-           echo "Cannot write label to ${drv}"
-           exit(256)
-        endif
-        onintr
-   endif
-else 
-    if ($outformat == "MOD") then
-	set nfiles = 1
-	echo " "
-	echo "Reading label on tape"
-        onintr -
-	set labeltape = `$rmt dd if=$ndrv bs=80 count=1 | grep "MODCOMP USERTAPE" | wc`
-        if ($status != 0) then
-           echo "Cannot read label on ${drv}"
-           exit(256)
-        endif
-	if ($labeltape[2] == 0) then
-	   echo " "
-	   echo "ERROR: Tape is NOT a MODCOMP KEEP tape... Try again"
-	   echo " "
-	   echo "Rewinding and exiting"
-           set rmtrew = "$rmt mt -f $drv rewind"
-           $rmtrew
-	   echo " "
-	   exit(256)
-        else
-	   set cmdout = `echo mt -f $drv rewind\; echo \$status | $rmtcsh`
-           if ($status != 0) then
-              echo "Problems communicating with $tapehost."
-              exit(256)
-           endif
-           if ($cmdout[$#cmdout]) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-           endif
-	   set cmdout = `echo mt -f $ndrv fsf 1\; echo \$status | $rmtcsh`
-           if ($status != 0) then
-              echo "Problems communicating with $tapehost."
-              exit(256)
-           endif
-           if ($cmdout[$#cmdout]) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-           endif
-	endif
-        onintr
-     endif
-#
-     echo " "
-     echo "Positioning tape at End of Data file"
-     onintr -
-     set seek = `$rmt dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     echo " "
-     echo $seek[1] "records on tape"
-     set seek2 = $seek[1]
-     set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     if ($cmdout[$#cmdout]) then
-        echo "Cannot position tape on ${drv}"
-        exit(256)
-     endif
-     set cmdout = `echo mt -f $ndrv fsr $seek2\; echo \$status | $rmtcsh`
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     if ($cmdout[$#cmdout]) then
-        echo "Cannot position tape on ${drv}"
-        exit(256)
-     endif
-     onintr
-#
-endif
-#
-inrecords:
-echo " "
-if ($informat != "ONLINE") then
-  echo -n "Enter first record number to convert (1 for first record in file): "
-  set first = $<
-  echo -n "Enter last record number to convert (0 for last record in file): "
-  set last = $<
-else
-  echo -n "Enter first scan number to convert (1 for first scan in file): "
-  set first = $<
-  echo -n "Enter last scan number to convert (0 for last scan in file): "
-  set last = $<
-endif
-#
-if ($first <= 0) set first = 1
-if ($last <= 0 && $informat == "ONLINE") set last = 32767
-if ($last <= 0 && $informat != "ONLINE") set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last"
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-@ count=1 + $last - $first 
-@ skip=$first - 1
-if ($informat == "SDD") then
-   @ skip=$skip + $skiprec
-endif
-#
-echo " "
-echo "Writing to" $drv
-if ($informat != "ONLINE") then
-   set DD = "dd if=$infile bs=$recl skip=$skip count=$count"
-endif
-onintr -
-switch ($informat)
-case TELE:
-   set TOIEEE = "tele2ieee.exe $cmnd2"
-   breaksw
-case PC:
-   set TOIEEE = "pcieee.exe $cmnd2"
-   breaksw
-case MOD:
-   set TOIEEE = "keep2ieee.exe $cmnd2"
-   breaksw
-case ASCII:
-   set TOIEEE = "ascii2ieee.exe $cmnd2"
-   if ($outformat != "ASCII") then
-      set DD = "dd if=$infile ibs=$recl cbs=80 conv=unblock skip=$skip count=$count"
-   endif
-   breaksw
-case SDD:
-   set TOIEEE = "sdd2ieee.exe $cmnd2"
-   breaksw
-case ONLINE:
-   set TOIEEE = ""
-    breaksw
-case IEEE:
-   set TOIEEE = ""
-   breaksw
-default:
-   echo "Invalid input format $informat.  This error should NOT happen."
-   echo "Contact a UniPOPS guru."
-   exit(256)
-   breaksw
-endsw
-set orecl = 5120
-switch ($outformat)
-case PC:
-   set FROMIEEE = "pcieee.exe"
-   breaksw
-case MOD:
-   set FROMIEEE = "ieee2keep.exe"
-   breaksw
-case ASCII:
-   set FROMIEEE = "ieee2ascii.exe"
-   set orecl = 21680
-   breaksw
-case IEEE:
-   set FROMIEEE = ""
-   breaksw
-default:
-   echo "Invalid output format $outformat.  This error should NOT happen."
-   echo "Contact a UniPOPS guru."
-   exit(256)
-   breaksw
-endsw
-set rmtdd = "rsh -l $username $tapehost dd of=$ndrv obs=$orecl"
-#
-if ($informat == $outformat) then
-   $DD | $rmtdd
-   if ($status != 0) goto cnverr
-else if ($informat == "ONLINE") then
-   if ($cmnd2 == "") then
-      if ($outformat == "ASCII") then
-         ldump $projcode $first $last | $FROMIEEE | \
-            dd obs=21680 cbs=80 conv=block | $rmtdd
-	 if ($status != 0) goto cnverr
-         set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         set seek = `$rmt dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         set seek2 = $seek[1]
-         set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         set cmdout = `echo mt -f $ndrv fsr $seek2\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         cdump $projcode $first $last | $FROMIEEE | \
-            dd obs=21680 cbs=80 conv=block | $rmtdd
-	 if ($status != 0) goto cnverr
-      else if ($outformat == "IEEE") then
-         ldump $projcode $first $last | $rmtdd
-	 if ($status != 0) goto cnverr
-         set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         set seek = `$rmt dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         set seek2 = $seek[1]
-         set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         set cmdout = `echo mt -f $ndrv fsr $seek2\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         cdump $projcode $first $last | $rmtdd
-	 if ($status != 0) goto cnverr
-      else
-         ldump $projcode $first $last | $FROMIEEE | $rmtdd
-	 if ($status != 0) goto cnverr
-         set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         set seek = `$rmt dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         set seek2 = $seek[1]
-         set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         set cmdout = `echo mt -f $ndrv fsr $seek2\; echo \$status | $rmtcsh`
-         if ($status != 0) then
-            echo "Problems communicating with $tapehost."
-            exit(256)
-         endif
-         if ($cmdout[$#cmdout]) then
-            echo "Cannot position tape on ${drv}"
-            exit(256)
-         endif
-         cdump $projcode $first $last | $FROMIEEE | $rmtdd
-	 if ($status != 0) goto cnverr
-      endif
-   else
-      if ($outformat == "ASCII") then
-         ${cmnd2}dump $projcode $first $last | $FROMIEEE | \
-            dd obs=21680 cbs=80 conv=block | $rmtdd
-	 if ($status != 0) goto cnverr
-      else if ($outformat == "IEEE") then
-         ${cmnd2}dump $projcode $first $last | $rmtdd
-	 if ($status != 0) goto cnverr
-      else
-         ${cmnd2}dump $projcode $first $last | $FROMIEEE | $rmtdd
-	 if ($status != 0) goto cnverr
-      endif
-    endif
-else if ($informat == "IEEE") then
-   if ($outformat == "ASCII") then
-      $DD | $FROMIEEE | dd obs=21680 cbs=80 conv=block | $rmtdd
-      if ($status != 0) goto cnverr
-   else
-      $DD | $FROMIEEE | $rmtdd
-      if ($status != 0) goto cnverr
-   endif
-else if ($outformat == "IEEE") then
-   $DD | $TOIEEE | $rmtdd
-   if ($status != 0) goto cnverr
-else
-   if ($outformat == "ASCII") then
-      $DD | $TOIEEE | $FROMIEEE | dd obs=21680 cbs=80 conv=block | $rmtdd
-      if ($status != 0) goto cnverr
-   else
-      $DD | $TOIEEE | $FROMIEEE | $rmtdd
-   endif
-endif
-onintr
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-     echo " "
-     echo "Positioning tape at End of Data file."
-     onintr -
-     set cmdout = `echo mt -f $drv rewind\; echo \$status | $rmtcsh `
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     if ($cmdout[$#cmdout] != 0) then
-        echo "Cannot position tape on ${drv}"
-        exit(256)
-     endif
-     set seek = `$rmt dd if=$ndrv of=/dev/null bs=$outrecl |& awk -F+ '{print $1}'`
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     echo " "
-     echo $seek[1] "records on tape"
-     set seek2 = $seek[1]
-     set cmdout = `echo mt -f $ndrv bsf 1\; echo \$status | $rmtcsh `
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     if ($cmdout[$#cmdout] != 0) then
-        echo "Cannot position tape on ${drv}"
-        exit(256)
-     endif
-     set cmdout = `echo mt -f $ndrv fsr $seek2\; echo \$status | $rmtcsh `
-     if ($status != 0) then
-        echo "Problems communicating with $tapehost."
-        exit(256)
-     endif
-     if ($cmdout[$#cmdout] != 0) then
-        echo "Cannot position tape on ${drv}"
-        exit(256)
-     endif
-     onintr
-#
-     goto inrecords
-else if($answr == "n" || $answr == "N") then
-	echo "Rewinding...."
-        onintr -
-        $rmt mt -f $drv rewind
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto more
-endif
-#
- cnverr:
-   echo "Some problem encountered in converting data"
-   exit(256)
diff -uNr 3.5/utilities/cvt.tape-disk unipops-3.6/utilities/cvt.tape-disk
--- 3.5/utilities/cvt.tape-disk	2000-03-16 11:29:44.000000000 -0700
+++ unipops-3.6/utilities/cvt.tape-disk	1969-12-31 17:00:00.000000000 -0700
@@ -1,379 +0,0 @@
-#! /bin/csh -f
-#  @(#)cvt.tape-disk.sh	5.3 10/04/96
-echo " "
-echo "Converts a tape file in IEEE Keep, Modcomp Keep, ASCII, Telescope Tape, or"
-echo "PCPOPS format to disk in either IEEE Keep, Modcomp Keep, ASCII, PCPOPS,"
-echo "or SDD format. All of the file or only the records specified by the user"
-echo "will be converted"
-echo " "
-echo "NOTE: The tape drive must be attached to" `hostname`
-echo " "
-#
-informat:
-echo " "
-echo "Enter one of the following to specify the format of the input tape"
-echo -n "IEEE, MOD, ASCII, TELE, or PC? "
-set informat = $<
-set informat = `echo $informat | tr "[a-z]" "[A-Z]"`
-if ($informat == "IEEE" || $informat == "MOD" || $informat == "PC") then
-	set recl = 5120
-else if ($informat == "TELE") then
-	set recl = 9600
-else if ($informat == "ASCII") then
-	set recl = 21680
-else
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto informat
-endif
-#
-echo " "
-if (`isSolaris` == "YES")  then
-   echo -n "Enter unit number of input tape drive (e.g., 0, 1, 2, ...) : "
-   set infile = $<
-   set drv = /dev/rmt/$infile
-   set ndrv = /dev/rmt/${infile}bn
-else
-   echo -n "Enter device name of input tape drive (e.g., rst0, rst1, rmt0,...): "
-   set infile = $<
-   set drv = /dev/$infile
-   set ndrv = /dev/n$infile
-endif
-
-if (! -e $drv || ! -e $ndrv) then
-   echo " "
-   echo "ERROR: Input drive" $drv " or "  $ndrv " does not exist... Try again"
-   echo " "
-   exit(256)
-endif
-#
-outformat:
-echo " "
-echo "Enter one of the following to specify the format of output file"
-echo -n "IEEE, MOD, ASCII, SDD, or PC? "
-set outformat = $<
-set outformat = `echo $outformat | tr "[a-z]" "[A-Z]"`
-if ($outformat != "IEEE" && $outformat != "MOD" && $outformat != "PC" && $outformat != "ASCII" && $outformat != "SDD") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto outformat
-endif
-#
-set cmnd2 = ""
-set pos = ""
-if ($informat != $outformat) then
-intype:
-   echo " "
-   echo "Enter L or C or B if you want line, continuum, or both"
-   echo -n "types of scans: "
-   set scntype = $<
-   set cmnd2 = ""
-   if ($scntype == "l" || $scntype == "L") then
-	set cmnd2 = "l"
-   else if($scntype == "c" || $scntype == "C") then
-	set cmnd2 = "c"
-   else if($scntype != "b" && $scntype != "B") then
-	echo "WARNING: Incorrect entry... Try again"
-	goto intype
-   endif
-#
-   if ($cmnd2 == "c" || $cmnd2 == "") then
-  	if ($informat == "TELE") then
-	   echo " "
-	   echo -n "Enter a Y if you want positional scans (feeds 98 and 99): "
-	   set postype = $<
-	   if ($postype == "Y" || $postype == "y") set pos = "p"
-	endif
-   endif
-endif
-#
-echo " "
-echo "Rewinding Input tape"
-mt -f $drv rewind
-if ($status != 0) then
-   echo "Cannot rewind ${drv}"
-   exit(256)
-endif
-#
-echo " "
-if ($informat == "MOD" || $informat == "TELE") then
-   echo "Reading label on tape"
-   if ($informat == "MOD") then
-      set labeltape = `dd if=$drv bs=512 count=1 | grep "MODCOMP USERTAPE" | wc`
-      if ($status != 0) then
-           echo "Cannot read label on ${drv}"
-           exit(256)
-      endif
-   else if($informat == "TELE") then
-      set labeltape = `dd if=$drv bs=512 count=1 | grep "VOL1ET" | wc`
-      if ($status != 0) then
-           echo "Cannot read label on ${drv}"
-           exit(256)
-      endif
-   endif
-   if ($labeltape[2] == 0) then
-      echo " "
-      echo "ERROR: Tape is of the wrong format... Try again "
-      echo " "
-      exit(256)
-   endif
-   mt -f $ndrv fsf 1
-   if ($status != 0) then
-      echo "Cannot position tape on ${drv}"
-      exit(256)
-   endif
-#
-else
-   echo "How many files do you want to skip on the input tape? "
-   set nfiles = $<
-   if ($nfiles > 0) then
-	   echo " "
-	   echo "Skiping" $nfiles "files"
-	   mt -f $ndrv fsf $nfiles
-     	   if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	   endif
-   endif	   	
-endif
-#
-set position = 0
-#
-newfile:
-echo " "
-echo -n "Enter output file name: "
-set outfile = $<
-#
-unset overwrite
-if (-e $outfile) then
-	echo " "
-	echo "WARNING: Output file" $outfile "exists..."
-	echo "Do you want to overwrite output file or append to it?"
-	echo -n "Enter o for overwrite, anything else to append: "
-	set answr = $<
-	if ($answr == "o" || $answr == "O") set overwrite
-else
-	set overwrite
-endif
-#
-inrecords:
-echo " "
-echo -n "Enter first tape record number to convert (1 for first record in file): "
-set first = $<
-echo -n "Enter last record number to convert (0 for last record in file): "
-set last = $<
-if ($first <= 0) set first = 1
-if ($last <= 0) set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last"
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-@ count=1 + $last - $first 
-@ skip=$first - 1
-@ numskip=$skip - $position 
-#
-if ($numskip > 0) then
-	echo " "
-	echo "Bypassing" $numskip "records"
-	mt -f $ndrv fsr $numskip
-     	if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-else if ($numskip < 0) then
-	echo " "
-	echo -n "WARNING: Cannot backspace records... "
-	echo -n "Do you want to quit (Y/N)? "
-	set answr = $<
-	if ($answr == "y" || $answr == "Y") then
-	   echo " "
-	   echo "Rewinding and exiting"
-	   mt -f $drv rewind
-	   echo " "
-	   exit(0)
-	else
-	   goto inrecords 
-	endif
-else if ($first >= 2) then
-	echo "Must re-position tape -- Please be patient"
-	mt -f $ndrv bsr 1
-     	if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-	mt -f $ndrv fsr 1
-     	if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-# Backspace and skip the last read record -- hopefully bypasses a problem
-# with SCSI tape drive
-endif
-#
-echo " "
-if ($?overwrite) then
-   echo "Creating" $outfile
-   if (-e $outfile) \rm $outfile
-   if ($outformat == "SDD") then
-	echo " "
-        echo "How many output scans do you want the SDD file "    
-        echo -n "to hold (Default = 1024) ? " 
-        set nscans = $<
-	if ($nscans == "") set nscans = 1024
-	makeempty.exe $outfile $nscans
-	if ($status != 0) then
-	   echo "Cannot create ${outfile}"
-	   exit(256)
-	endif
-   endif
-else
-   if ($outformat == "SDD") then
-      set bb = `bootstrap $outfile 512 LONG`
-      if ( $bb[10] != 1 ) then
-         set bb = `bootstrap $outfile 512 SHORT`
-         set typesdd = $bb[8]
-      else
-         set typesdd = $bb[9]
-      endif
-      if ( $typesdd != 0 ) then
-	  echo "Output SDD file is in RECORDS format... Terminating"
-	  exit 256
-      endif
-   endif
-#
-   echo "Appending to" $outfile
-endif
-touch $outfile
-if ($status != 0) then
-   echo "Cannot modify ${outfile}"
-   exit(256)
-endif
-#
-if ($informat == "TELE" && $outformat == "PC") then
-        dd if=$ndrv bs=$recl \
-	count=$count | tele2ieee.exe $cmnd2 $pos | pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "MOD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | tele2ieee.exe $cmnd2 $pos | ieee2keep.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "IEEE") then
-	dd if=$ndrv bs=$recl \
-	count=$count | tele2ieee.exe $cmnd2 $pos >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "ASCII") then
-	dd if=$ndrv bs=$recl \
-	count=$count | tele2ieee.exe $cmnd2 $pos | ieee2ascii.exe | dd obs=21680 \
-	cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "TELE" && $outformat == "SDD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | tele2ieee.exe $cmnd2 $pos | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "PC") then
-	dd if=$ndrv bs=$recl \
-	count=$count | keep2ieee.exe $cmnd2 | pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "IEEE") then
-	dd if=$ndrv bs=$recl \
-	count=$count | keep2ieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "ASCII") then
-	dd if=$ndrv bs=$recl \
-	count=$count | keep2ieee.exe $cmnd2 | ieee2ascii.exe | dd obs=21680 \
-	cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "MOD" && $outformat == "SDD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | keep2ieee.exe $cmnd2 | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "IEEE") then
-	dd if=$ndrv bs=$recl \
-	count=$count | pcieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "MOD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | pcieee.exe $cmnd2 | ieee2keep.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "ASCII") then
-	dd if=$ndrv bs=$recl \
-	count=$count | pcieee.exe $cmnd2 | ieee2ascii.exe | dd obs=21680 \
-	cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "PC" && $outformat == "SDD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | pcieee.exe $cmnd2 | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "PC") then
-	dd if=$ndrv bs=$recl \
-	count=$count | pcieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "MOD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | ieee2keep.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "ASCII") then
-	dd if=$ndrv bs=$recl \
-	count=$count | ieee2ascii.exe $cmnd2  | dd obs=21680 \
-	cbs=80 conv=block >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "IEEE" && $outformat == "SDD") then
-	dd if=$ndrv bs=$recl \
-	count=$count | ieee2sdd.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "PC") then
-	dd if=$ndrv ibs=$recl cbs=80 conv=unblock \
-	count=$count | ascii2ieee.exe $cmnd2 | pcieee.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "MOD") then
-	dd if=$ndrv ibs=$recl cbs=80 conv=unblock \
-	count=$count | ascii2ieee.exe $cmnd2 | ieee2keep.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "IEEE") then
-	dd if=$ndrv ibs=$recl cbs=80 conv=unblock \
-	count=$count | ascii2ieee.exe $cmnd2 >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == "ASCII" && $outformat == "SDD") then
-	dd if=$ndrv ibs=$recl cbs=80 conv=unblock \
-	count=$count | ascii2ieee.exe $cmnd2 | ieee2sdd.exe >> $outfile
-	if ($status != 0) goto cnverr
-else if ($informat == $outformat) then
-        dd if=$ndrv bs=$recl count=$count >> $outfile
-	if ($status != 0) goto cnverr
-endif
-#
-unset overwrite
-#
-if ($outformat == "SDD") then
-   makeindex.exe $outfile > /dev/null
-   if ($status != 0) then
-      echo "Some problem encountered in recreating index for ${outfile}"
-      exit(256)
-   endif
-endif
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-	set position = $last
-	goto newfile
-else if($answr == "n" || $answr == "N") then
-	echo " "
-	echo "Rewinding and exiting"
-	mt -f $drv rewind
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorect entry... Try again"
-	goto more
-endif
-#
-cnverr:
-   echo "Some problem encountered in converting data"
-   exit(256)
diff -uNr 3.5/utilities/cvt.tape-disk.cv unipops-3.6/utilities/cvt.tape-disk.cv
--- 3.5/utilities/cvt.tape-disk.cv	2000-03-16 11:41:00.000000000 -0700
+++ unipops-3.6/utilities/cvt.tape-disk.cv	1969-12-31 17:00:00.000000000 -0700
@@ -1,421 +0,0 @@
-#!/bin/csh -f 
-# @(#)cvt.tape-disk.cv.sh	5.2 10/27/94
-# Charlottesville version.  Uses remote tape on rhesus
-set tapehost = rhesus
-#		make sure that they can rsh to tapehost
-set  username = `whoami`
-rsh -l $username $tapehost ls >& /dev/null
-if ($status != 0) then
-   set username = unipops
-   rsh -l $username $tapehost ls >& /dev/null
-   if ($status != 0) then
-      echo "This will not work from your login."
-      echo "See the local unipops guru for help."
-      exit(256)
-   endif
-endif
-set rmtcmd = "rsh -l $username $tapehost /bin/csh -f"
-#
-echo " "
-echo "Converts a tape file in IEEE Keep, Modcomp Keep, ASCII, Telescope Tape, or"
-echo "PCPOPS format to disk in either IEEE Keep, Modcomp Keep, ASCII, PCPOPS,"
-echo "or SDD format. All of the file or only the records specified by the user"
-echo "will be converted"
-echo " "
-echo "NOTE: The tape drive must be attached to" $tapehost
-echo " "
-#
-informat:
-echo " "
-echo "Enter one of the following to specify the format of the input tape"
-echo -n "IEEE, MOD, ASCII, TELE, or PC? "
-set informat = $<
-set informat = `echo $informat | tr "[a-z]" "[A-Z]"`
-if ($informat == "IEEE" || $informat == "MOD" || $informat == "PC") then
-	set recl = 5120
-else if ($informat == "TELE") then
-	set recl = 9600
-else if ($informat == "ASCII") then
-	set recl = 21680
-else
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto informat
-endif
-#
-intape:
-echo " "
-echo -n "Enter device name of input tape drive (e.g., rst0, rst1, rmt0,...): "
-set infile = $<
-set drv = /dev/$infile
-#		on IBM machines, the odd drive number extensions are the
-#		non-rewind machines
-set ndrv = /dev/$infile.1
-set ifstr = "if ( -e $drv ) echo YES"
-set EXIST = `echo $ifstr | $rmtcmd` 
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ( $EXIST !~ YES ) then
-   echo " "
-   echo "ERROR: Input drive" $drv "does not exist on $tapehost.  Try again"
-   goto intape
-endif
-#
-outformat:
-echo " "
-echo "Enter one of the following to specify the format of output file"
-echo -n "IEEE, MOD, ASCII, SDD, or PC? "
-set outformat = $<
-set outformat = `echo $outformat | tr "[a-z]" "[A-Z]"`
-if ($outformat != "IEEE" && $outformat != "MOD" && $outformat != "PC" && $outformat != "ASCII" && $outformat != "SDD") then
-	echo " "
-	echo "WARNING: Incorrect entry... Try again"
-	goto outformat
-endif
-#
-set cmnd2 = " "
-if ($informat != $outformat) then
-intype:
-   echo " "
-   echo "Enter L or C or B if you want line, continuum, or both"
-   echo -n "types of scans: "
-   set scntype = $<
-   if ($scntype == "l" || $scntype == "L") then
-	set cmnd2 = "l"
-   else if($scntype == "c" || $scntype == "C") then
-	if ($informat == "TELE") then
-		set cmnd2 = "c p"
-	else
-		set cmnd2 = "c"
-	endif
-   else if($scntype == "b" || $scntype == "B") then
-	if ($informat == "TELE") then
-		set cmnd2 = "p"
-	else
-		set cmnd2 = " "
-	endif
-   else
-	echo "WARNING: Incorrect entry... Try again"
-	goto intype
-   endif
-endif
-#
-echo " "
-echo "Rewinding input tape"
-onintr -
-set cmdout = `echo mt -f $drv rewind\; echo \$status | $rmtcmd `
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ($cmdout[$#cmdout] != 0) then
-   echo "Cannot rewind ${drv} on $tapehost"
-   exit(256)
-endif
-#
-echo " "
-if ($informat == "MOD" || $informat == "TELE") then
-   echo "Reading label on tape"
-   if ($informat == "MOD") then
-      set labeltape = `echo dd if=$drv bs=512 count=1 | $rmtcmd | grep "MODCOMP USERTAPE" | wc`
-      if ($status != 0) then
-           echo "Cannot read label on ${drv}"
-           exit(256)
-      endif
-   else if($informat == "TELE") then
-      set labeltape = `echo dd if=$drv bs=512 count=1 | $rmtcmd | grep "VOL1ET" | wc`
-      if ($status != 0) then
-           echo "Cannot read label on ${drv}"
-           exit(256)
-      endif
-   endif
-   if ($labeltape[2] == 0) then
-      echo " "
-      echo "ERROR: Tape is of the wrong format... Try again "
-      echo " "
-      exit(256)
-   endif
-   set cmdout = `echo mt -f $ndrv fsf 1\; echo \$status | $rmtcmd`
-   if ($status != 0) then
-      echo "Problems communicating with $tapehost."
-      exit(256)
-   endif
-   if ($cmdout[$#cmdout] != 0) then
-      echo "Cannot position tape on ${drv}"
-      exit(256)
-   endif
-#
-else
-   onintr
-   echo -n "How many files do you want to skip on the input tape? "
-   set nfiles = $<
-   if ($nfiles > 0) then
-	   echo " "
-	   echo "Skiping" $nfiles "files"
-           onintr -
-	   set cmdout = `echo mt -f $ndrv fsf $nfiles\; echo \$status | $rmtcmd`
-           onintr
-     	   if ($cmdout[$#cmdout]) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	   endif
-   endif	   	
-endif
-#
-set position = 0
-#
-newfile:
-echo " "
-echo -n "Enter output file name: "
-set outfile = $<
-#
-unset overwrite
-if (-e $outfile) then
-	echo " "
-	echo "WARNING: Output file" $outfile "exists..."
-	echo "Do you want to overwrite output file or append to it?"
-	echo -n "Enter o for overwrite, anything else to append: "
-	set answr = $<
-	if ($answr == "o" || $answr == "O") set overwrite
-else
-	set overwrite
-endif
-#
-inrecords:
-echo " "
-echo -n "Enter first tape record number to convert (1 for first record in file): "
-set first = $<
-echo -n "Enter last record number to convert (0 for last record in file): "
-set last = $<
-if ($first <= 0) set first = 1
-if ($last <= 0) set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last"
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-onintr -
-@ count=1 + $last - $first 
-@ skip=$first - 1
-@ numskip=$skip - $position 
-#
-if ($numskip > 0) then
-	echo " "
-	echo "Bypassing" $numskip "records"
-	set cmdout = `echo mt -f $ndrv fsr $numskip\; echo \$status | $rmtcmd`
-        if ($status != 0) then
-           echo "Problems communicating with $tapehost."
-           exit(256)
-        endif
-     	if ($cmdout[$#cmdout] != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-else if ($numskip < 0) then
-	echo " "
-	echo -n "WARNING: Cannot backspace records... "
-	echo -n "Do you want to quit (Y/N)? "
-	set answr = $<
-	if ($answr == "y" || $answr == "Y") then
-	   echo " "
-	   echo "Rewinding and exiting"
-	   echo mt -f $drv rewind\; echo \$status | $rmtcmd
-	   echo " "
-	   exit(0)
-	else
-	   goto inrecords 
-	endif
-else if ($first >= 2) then
-	echo "Must re-position tape -- Please be patient"
-	set cmdout = `echo mt -f $ndrv bsr 1\;echo \$status | $rmtcmd`
-        if ($status != 0) then
-           echo "Problems communicating with $tapehost."
-           exit(256)
-        endif
-     	if ($cmdout[$#cmdout] != 0) then
-              echo "Cannot position tape on ${drv} on $tapehost."
-              exit(256)
-     	endif
-	set cmdout = `echo mt -f $ndrv fsr 1\;echo \$status | $rmtcmd`
-        if ($status != 0) then
-           echo "Problems communicating with $tapehost."
-           exit(256)
-        endif
-     	if ($cmdout[$#cmdout] != 0) then
-              echo "Cannot position tape on ${drv} on $tapehost."
-              exit(256)
-     	endif
-# Backspace and skip the last read record -- hopefully bypasses a problem
-# with SCSI tape drive
-endif
-#
-echo " "
-if ($?overwrite) then
-   onintr
-   if (-e $outfile) \rm $outfile
-   if ($outformat == "SDD") then
-	echo " "
-        echo "How many output scans do you want the SDD file "    
-        echo -n "to hold (Default = 1024) ? " 
-        set nscans = $<
-	if ($nscans == "") set nscans = 1024
-        echo "Creating" $outfile
-	makeempty.exe $outfile $nscans
-	if ($status != 0) then
-	   echo "Cannot create ${outfile}"
-	   exit(256)
-	endif
-   else 
-      echo "Creating" $outfile
-      touch $outfile
-      if ($status != 0) then
-	   echo "Cannot create ${outfile}"
-      endif
-   endif
-   onintr -
-else
-   if ($outformat == "SDD") then
-      set bb = `bootstrap $outfile 512 LONG`
-      if ( $bb[10] != 1 ) then
-         set bb = `bootstrap $outfile 512 SHORT`
-         set typesdd = $bs[8]
-      else
-         set typesdd = $bs[9]
-      endif
-      if ( $typesdd != 0 ) then
-	  echo "Output SDD file is in RECORDS format... Terminating"
-	  exit(256)
-      endif
-   endif
-#
-   echo "Appending to" $outfile
-endif
-touch $outfile
-if ($status != 0) then
-   echo "Cannot modify ${outfile}"
-   exit(256)
-endif
-#
-echo "Converting data."
-onintr -
-set DD = "dd if=$ndrv bs=$recl count=$count"
-switch ($informat)
-case TELE:
-   set TOIEEE = "tele2ieee.exe $cmnd2"
-   breaksw
-case PC:
-   set TOIEEE = "pcieee.exe $cmnd2"
-   breaksw
-case MOD:
-   set TOIEEE = "keep2ieee.exe $cmnd2"
-   breaksw
-case ASCII:
-   set TOIEEE = "ascii2ieee.exe $cmnd2"
-   if ($outformat != "ASCII") then
-      set DD = "dd if=$ndrv ibs=$recl cbs=80 conv=unblock count=$count"
-   endif
-   breaksw
-case IEEE:
-   set TOIEEE = ""
-   breaksw
-default:
-   echo "Invalid input format $informat.  This error should NOT happen."
-   echo "Contact a UniPOPS guru."
-   exit(256)
-   breaksw
-endsw
-switch ($outformat)
-case PC:
-   set FROMIEEE = "pcieee.exe"
-   breaksw
-case MOD:
-   set FROMIEEE = "ieee2keep.exe"
-   breaksw
-case ASCII:
-   set FROMIEEE = "ieee2ascii.exe"
-   breaksw
-case SDD:
-   set FROMIEEE = "ieee2sdd.exe"
-   breaksw
-case IEEE:
-   set FROMIEEE = ""
-   breaksw
-default:
-   echo "Invalid output format $outformat.  This error should NOT happen."
-   echo "Contact a UniPOPS guru."
-   exit(256)
-   breaksw
-endsw
-#
-if ($informat == $outformat) then
-   if ($outformat == "ASCII") then
-      echo $DD | $rmtcmd | dd obs=21680 >> $outfile
-      if ($status != 0) goto cnverr
-   else
-      echo $DD | $rmtcmd >> $outfile
-      if ($status != 0) goto cnverr
-   endif
-else
-   if ($TOIEEE == "") then
-      if ($outformat == "ASCII") then
-         echo $DD | $rmtcmd | $FROMIEEE | dd obs=21680 cbs=80 conv=block \
-               >> $outfile
-         if ($status != 0) goto cnverr
-      else
-         echo $DD | $rmtcmd | $FROMIEEE >> $outfile
-         if ($status != 0) goto cnverr
-      endif
-   else if ($FROMIEEE == "") then
-      echo $DD | $rmtcmd | $TOIEEE >> $outfile
-      if ($status != 0) goto cnverr
-   else
-      if ($outformat == "ASCII") then
-         echo $DD | $rmtcmd | $TOIEEE | $FROMIEEE | \
-		dd obs=21680 cbs=80 conv=block >> $outfile
-         if ($status != 0) goto cnverr
-      else
-         echo $DD | $rmtcmd | $TOIEEE | $FROMIEEE >> $outfile
-         if ($status != 0) goto cnverr
-      endif
-   endif
-endif
-#
-unset overwrite
-onintr
-#
-if ($outformat == "SDD") then
-   echo "Indexing output SDD file."
-   makeindex.exe $outfile > /dev/null
-   if ($status != 0) then
-      echo "Some problem encountered in recreating index for ${outfile}"
-      exit(256)
-   endif
-endif
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-	set position = $last
-	goto newfile
-else if($answr == "n" || $answr == "N") then
-	echo " "
-	echo "Rewinding and exiting"
-        onintr -
- 	echo mt -f $drv rewind | $rmtcmd
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorect entry... Try again"
-	goto more
-endif
-#
-cnverr:
-   echo "Some problem encountered in converting data."
-   exit(256)
diff -uNr 3.5/utilities/cvt.tele-recs unipops-3.6/utilities/cvt.tele-recs
--- 3.5/utilities/cvt.tele-recs	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/cvt.tele-recs	1969-12-31 17:00:00.000000000 -0700
@@ -1,204 +0,0 @@
-#! /bin/csh -f
-#  @(#)cvt.tele-recs.sh	5.3 10/04/96
-echo " "
-echo "Converts a 140-ft telescope tape file into SDD-Records format"
-echo "All of the file or only the records specified by the user"
-echo "will be converted"
-echo " "
-echo "NOTE: The tape drive must be attached to" `hostname`
-echo " "
-#
-informat:
-set recl = 9600
-#
-echo " "
-if (`isSolaris` == "YES")  then
-   echo -n "Enter unit number of input tape drive (e.g., 0, 1, 2, ...) : "
-   set infile = $<
-   set drv = /dev/rmt/$infile
-   set ndrv = /dev/rmt/${infile}bn
-else
-   echo -n "Enter device name of input tape drive (e.g., rst0, rst1, rmt0,...): "
-   set infile = $<
-   set drv = /dev/$infile
-   set ndrv = /dev/n$infile
-endif
-if (! -e $drv || ! -e $ndrv) then
-   echo " "
-   echo "ERROR: Input drive" $drv " or "  $ndrv " does not exist... Try again"
-   echo " "
-   exit(256)
-endif
-#
-echo " "
-echo "Rewinding Input tape"
-mt -f $drv rewind
-if ($status != 0) then
-   echo "Cannot rewind ${drv}"
-   exit(256)
-endif
-#
-echo " "
-echo "Reading label on tape"
-set labeltape = `dd if=$drv bs=512 count=1 | grep "VOL1ET" | wc`
-if ($status != 0) then
-      echo "Cannot read label on ${drv}"
-      exit(256)
-endif
-if ($labeltape[2] == 0) then
-      echo " "
-      echo "ERROR: Tape is of the wrong format... Try again "
-      echo " "
-      exit(256)
-endif
-mt -f $ndrv fsf 1
-if ($status != 0) then
-      echo "Cannot position tape on ${drv}"
-      exit(256)
-endif
-#
-set position = 0
-#
-newfile:
-echo " "
-echo -n "Enter output file name: "
-set outfile = $<
-#
-unset overwrite
-if (-e $outfile) then
-	echo " "
-	echo "WARNING: Output file" $outfile "exists..."
-	echo "Do you want to overwrite output file or append to it?"
-	echo -n "Enter o for overwrite, anything else to append: "
-	set answr = $<
-	if ($answr == "o" || $answr == "O") set overwrite
-else
-	set overwrite
-endif
-#
-inrecords:
-echo " "
-echo -n "Enter first tape record number to convert (1 for first record in file): "
-set first = $<
-echo -n "Enter last record number to convert (0 for last record in file): "
-set last = $<
-if ($first <= 0) set first = 1
-if ($last <= 0) set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last"
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-@ count=1 + $last - $first 
-@ skip=$first - 1
-@ numskip=$skip - $position 
-#
-if ($numskip > 0) then
-	echo " "
-	echo "Bypassing" $numskip "records"
-	mt -f $ndrv fsr $numskip
-     	if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-else if ($numskip < 0) then
-	echo " "
-	echo -n "WARNING: Cannot backspace records... "
-	echo -n "Do you want to quit (Y/N)? "
-	set answr = $<
-	if ($answr == "y" || $answr == "Y") then
-	   echo " "
-	   echo "Rewinding and exiting"
-	   mt -f $drv rewind
-	   echo " "
-	   exit(0)
-	else
-	   goto inrecords 
-	endif
-else if ($first >= 2) then
-	echo "Must re-position tape -- Please be patient"
-	mt -f $ndrv bsr 1
-     	if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-	mt -f $ndrv fsr 1
-     	if ($status != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-# Backspace and skip the last read record -- hopefully bypasses a problem
-# with SCSI tape drive
-endif
-#
-echo " "
-if ($?overwrite) then
-   echo "Creating" $outfile
-   if (-e $outfile) \rm $outfile
-   echo " "
-   echo "How many output scans do you want the SDD file "    
-   echo -n "to hold (Default = 1024) ? " 
-   set nscans = $<
-   if ($nscans == "") set nscans = 1024
-   makeempty.exe $outfile $nscans
-   if ($status != 0) then
-	echo "Cannot create ${outfile}"
-	exit(256)
-   endif
-else
-   set bb = `bootstrap $outfile 512 LONG`
-   if ( $bb[10] != 1 ) then
-      set bb = `bootstrap $outfile 512 SHORT`
-      set typesdd = $bb[8]
-   else
-      set typesdd = $bb[9]
-   endif
-   if ( $typesdd != 1 ) then
-	echo "Output SDD file is NOT in RECORDS format... Terminating"
-	exit 256
-   endif
-#
-   echo "Appending to" $outfile
-endif
-touch $outfile
-if ($status != 0) then
-   echo "Cannot modify ${outfile}"
-   exit(256)
-endif
-#
-dd if=$ndrv bs=$recl count=$count | tele2recs.exe | ieee2sdd.exe >> \
-	$outfile
-if ($status != 0) goto cnverr
-#
-unset overwrite
-#
-makerecindex.exe $outfile > /dev/null
-if ($status != 0) then
-      echo "Some problem encountered in recreating index for ${outfile}"
-      exit(256)
-endif
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-	set position = $last
-	goto newfile
-else if($answr == "n" || $answr == "N") then
-	echo " "
-	echo "Rewinding and exiting"
-	mt -f $drv rewind
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorect entry... Try again"
-	goto more
-endif
-#
-cnverr:
-   echo "Some problem encountered in converting data"
-   exit(256)
diff -uNr 3.5/utilities/cvt.tele-recs.cv unipops-3.6/utilities/cvt.tele-recs.cv
--- 3.5/utilities/cvt.tele-recs.cv	2000-03-16 11:41:00.000000000 -0700
+++ unipops-3.6/utilities/cvt.tele-recs.cv	1969-12-31 17:00:00.000000000 -0700
@@ -1,247 +0,0 @@
-#! /bin/csh -f
-#  @(#)cvt.tele-recs.cv.sh	5.2 10/27/94
-#  Charlottesville version
-set tapehost = rhesus
-#		make sure that they can rsh to  tapehost
-set username = `whoami`
-rsh -l $username $tapehost ls >& /dev/null
-if ($status != 0) then
-   set username = unipops
-   rsh -l $username $tapehost ls >& /dev/null
-   ls ($status != 0) then
-      echo "This will not work from your login."
-      echo "See the local unipops guru for help."
-      exit(256)
-   endif
-endif
-set rmtcmd = "rsh -l $username $tapehost /bin/csh -f"
-#
-echo " "
-echo "Converts a 140-ft telescope tape file into SDD-Records format"
-echo "All of the file or only the records specified by the user"
-echo "will be converted"
-echo " "
-echo "NOTE: The tape drive must be attached to" $tapehost
-echo " "
-#
-informat:
-set recl = 9600
-#
-echo " "
-echo -n "Enter device name of input tape drive (e.g., rst0, rst1, rmt0,...): "
-set infile = $<
-set drv = /dev/$infile
-#		On IBM machines, the odd drive number extensions are the
-#		non-rewind devices
-set ndrv = /dev/$infile.1
-set ifstr = "if ( -e $drv ) echo YES"
-set EXIST = `echo $ifstr | $rmtcmd`
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ( $EXIST !~ YES ) then
-   echo " "
-   echo "ERROR: Input drive" $drv "does not exist on $tapehost. Try again."
-   exit(256)
-endif
-#
-echo " "
-echo "Rewinding Input tape"
-onintr -
-set cmdout = `echo mt -f $drv rewind\; echo \$status | $rmtcmd`
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ($cmdout[$#cmdout] != 0) then
-   echo "Cannot rewind ${drv} on $tapehost."
-   exit(256)
-endif
-#
-echo " "
-echo "Reading label on tape"
-set labeltape = `echo dd if=$drv bs=512 count=1 | $rmtcmd | grep "VOL1ET" | wc`
-if ($status != 0) then
-      echo "Cannot read label on ${drv}"
-      exit(256)
-endif
-if ($labeltape[2] == 0) then
-      echo " "
-      echo "ERROR: Tape is of the wrong format... Try again "
-      echo " "
-      exit(256)
-endif
-set cmdout = `echo mt -f $ndrv fsf 1\; echo \$status | $rmtcmd`
-if ($status != 0) then
-   echo "Problems communicating with $tapehost."
-   exit(256)
-endif
-if ($cmdout[$#cmdout] != 0) then
-      echo "Cannot position tape on ${drv}"
-      exit(256)
-endif
-onintr
-#
-set position = 0
-#
-newfile:
-echo " "
-echo -n "Enter output file name: "
-set outfile = $<
-#
-unset overwrite
-if (-e $outfile) then
-	echo " "
-	echo "WARNING: Output file" $outfile "exists..."
-	echo "Do you want to overwrite output file or append to it?"
-	echo -n "Enter o for overwrite, anything else to append: "
-	set answr = $<
-	if ($answr == "o" || $answr == "O") set overwrite
-else
-	set overwrite
-endif
-#
-inrecords:
-echo " "
-echo -n "Enter first tape record number to convert (1 for first record in file): "
-set first = $<
-echo -n "Enter last record number to convert (0 for last record in file): "
-set last = $<
-if ($first <= 0) set first = 1
-if ($last <= 0) set last = 9999999
-if ($last < $first) then
-	echo " "
-	echo -n "WARNING: First record number must be less than or equal to last"
-	echo ".... Try agin"
-	goto inrecords
-endif
-#
-@ count=1 + $last - $first 
-@ skip=$first - 1
-@ numskip=$skip - $position 
-#
-onintr -
-if ($numskip > 0) then
-	echo " "
-	echo "Bypassing" $numskip "records"
-	set cmdout = `echo mt -f $ndrv fsr $numskip\; echo \$status | $rmtcmd`
-     	if ($status != 0) then
-           echo "Problems communicating with $tapehost"
-           exit(256)
-        endif
-        if ($cmdout[$#cmdout] != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-else if ($numskip < 0) then
-	echo " "
-	echo -n "WARNING: Cannot backspace records... "
-	echo -n "Do you want to quit (Y/N)? "
-	set answr = $<
-	if ($answr == "y" || $answr == "Y") then
-	   echo " "
-	   echo "Rewinding and exiting"
-	   echo mt -f $drv rewind | $rmtcmd
-	   echo " "
-	   exit(0)
-	else
-	   goto inrecords 
-	endif
-else if ($first >= 2) then
-	echo "Must re-position tape -- Please be patient"
-	set cmdout = `echo mt -f $ndrv bsr 1\; echo \$status | $rmtcmd`
-     	if ($status != 0) then
-           echo "Problems communicating with $tapehost"
-           exit(256)
-        endif
-        if ($cmdout[$#cmdout] != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-	set cmdout = `echo mt -f $ndrv fsr 1\; echo \$status | $rmtcmd`
-     	if ($status != 0) then
-           echo "Problems communicating with $tapehost"
-           exit(256)
-        endif
-        if ($cmdout[$#cmdout] != 0) then
-              echo "Cannot position tape on ${drv}"
-              exit(256)
-     	endif
-# Backspace and skip the last read record -- hopefully bypasses a problem
-# with SCSI tape drive
-endif
-onintr
-#
-echo " "
-if ($?overwrite) then
-   echo "Creating" $outfile
-   if (-e $outfile) \rm $outfile
-   echo "How many output scans do you want the SDD file to hold"
-   echo "(currently, SDD files CAN NOT be expanded beyond their"
-   echo -n "initial size) (Default = 1024) ? "
-   set nscans = $<
-   if ($nscans == "") set nscans = 1024
-   makeempty.exe $outfile $nscans
-   if ($status != 0) then
-	echo "Cannot create ${outfile}"
-	exit(256)
-   endif
-else
-   set bb = `bootstrap $outfile 512 LONG`
-   if ( $bb[10] != 1 ) then
-      set bb = `bootstrap $outfile 512 SHORT`
-      set typesdd = $bb[8]
-   else
-      set typesdd = $bb[9]
-   endif
-   if ( $typesdd != 1 ) then
-	echo "Output SDD file is NOT in RECORDS format... Terminating"
-	exit 256
-   endif
-#
-   echo "Appending to" $outfile
-endif
-touch $outfile
-if ($status != 0) then
-   echo "Cannot modify ${outfile}"
-   exit(256)
-endif
-#
-onintr -
-echo dd if=$ndrv bs=$recl count=$count | $rmtcmd | tele2recs.exe | ieee2sdd.exe >> \
-	$outfile
-if ($status != 0) goto cnverr
-onintr
-#
-unset overwrite
-#
-makerecindex.exe $outfile > /dev/null
-if ($status != 0) then
-      echo "Some problem encountered in recreating index for ${outfile}"
-      exit(256)
-endif
-#
-more:
-echo " "
-echo -n "Do you want to convert more records (Y/N)?: "
-set answr = $<
-if ($answr == "y" || $answr == "Y") then
-	set position = $last
-	goto newfile
-else if($answr == "n" || $answr == "N") then
-	echo " "
-	echo "Rewinding and exiting"
-        onintr -
-	echo mt -f $drv rewind | $rmtcmd
-	echo " "
-	exit(0)
-else
-	echo " "
-	echo "WARNING: Incorect entry... Try again"
-	goto more
-endif
-#
-cnverr:
-   echo "Some problem encountered in converting data"
-   exit(256)
diff -uNr 3.5/utilities/diskfiles/checkfile.f unipops-3.6/utilities/diskfiles/checkfile.f
--- 3.5/utilities/diskfiles/checkfile.f	2000-03-16 11:30:04.000000000 -0700
+++ unipops-3.6/utilities/diskfiles/checkfile.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,190 +0,0 @@
-      program checkfile
-c
-c @(#)checkfile.f	5.1 06/22/94
-c
-c     Reads in the INDEX part of a SAVE/KEEP/DATA file and produces a 
-c     summary. See MAKEFILE.F for a description of these files.
-c
-c     Will correctly summarize either the original I*2 index or the I*4 index
-c
-      character*50 filename
-      integer*2 i2dat(1024)
-      integer*4 i4dat(512), counter, typesdd, numphase, numrec
-      real*4 rdat(512), coordh, coordv, scanno, freqresol, siderialtime,
-     .       universaldate
-      character*16 cdat(128), sname
-      real*8 ddat(256), restfreq
-      integer*4 iargc, ii1, ierr, i4pc, i8pc, i16pc, itrybyte, numarg,
-     .          numheadrecs, numdatarecs, ibytperrec, ibytperheaditem,
-     .          lastindexitem, counter, typesdd, verssdd, istart, istop,
-     .          iposcode, numphase, numrec, numindexperrec,
-     .          maxheaditem, irec, i, ind, ii, j, i1
-      integer*2 i2nhead, i2ndata, i2ibprec, i2ibphead, i2lastind, 
-     .          i2counter, i2type
-      integer*2 irtn, obs, mode, iobsmode
-      character*4 obsmode(2)
-      logical isnew
-c
-      equivalence (cdat,i2dat,i4dat,rdat,ddat)
-c
-      i4pc(ii) = (ii-1)/2 + 1
-      i8pc(ii) = (ii-1)/4 + 1
-      i16pc(ii) = (ii-1)/8 + 1
-c
-      data itrybyte/512/, ii1/1/
-c
-      numarg = iargc()
-      if (numarg .le. 0) then
-	write(0,*) 'Must specify filename'
-	call exit(ii1)
-      else
-	call getarg(ii1, filename)
-      endif
-c
-      open(unit=10,file=filename,status='old',access='direct',
-     1		recl=itrybyte,form='unformatted',iostat=ierr)
-      if (ierr .ne. 0) then
-	write(0,*) 'Cannot open file: ', filename
-	call exit(ii1)
-      endif
-      rewind(10)
-c
-      read(10,rec=1) numheadrecs, numdatarecs, ibytperrec, 
-     1		      ibytperheaditem, lastindexitem, counter, typesdd,
-     2                verssdd
-c
-      if (verssdd .eq. 1) then
-         isnew = .true.
-      else
-         isnew = .false.
-         rewind(10)
-         read(10,rec=1)i2nhead, i2ndata, i2ibprec, i2ibphead, 
-     .                 i2lastind, i2counter, i2type
-         numheadrecs = i2nhead
-         numdatarecs = i2ndata
-         ibytperrec = i2ibprec
-         ibytperheaditem = i2ibphead
-         lastindexitem = i2lastind
-         counter = i2counter
-         typesdd = i2type
-      endif
-c
-      write(6,*) 'Number of index records', numheadrecs
-      write(6,*) 'Number of data records', numdatarecs
-      write(6,*) 'Number of bytes per record', ibytperrec
-      write(6,*) 'Number of bytes per index item', ibytperheaditem
-      write(6,*) 'Number of scans in file', lastindexitem
-      write(6,*) 'Counter currently set at ', counter
-      write(6,*) 'Type SDD ', typesdd
-      if (.not. isnew) then
-         write(6,*) 'Old I*2 index, consider using makeindex.exe to'
-         write(6,*) '  convert this to the new I*4 index'
-      endif
-c
-      if (numheadrecs.le.1 .or. ibytperrec.le.10 .or. ibytperheaditem
-     1    .gt.ibytperrec .or. ibytperrec.gt.2048) then
-	write(6,*)  'File is in an improper format!!!'
-	write(6,*) 'Cannot proceed'
-	stop
-      endif
-c
-      if (typesdd .ne. 0 .and. typesdd .ne. 1) then
-	write(6,*)  'File is in an improper format!!!'
-	write(6,*) 'Cannot proceed'
-	stop
-      endif
-c
-      numindexperrec = ibytperrec / ibytperheaditem
-      maxheaditem = (numheadrecs-1)*numindexperrec
-c
-      write(6,*) 'Maximum number of scans which could be stored',
-     1		  maxheaditem
-      write(6,*) 'Number of index items per record', numindexperrec
-c
-      if (ibytperrec.ne.itrybyte) then
-	close(10)
-        open(unit=10,file=filename,status='old',access='direct',
-     1		recl=ibytperrec,form='unformatted')
-        rewind(10)
-      endif
-c     Reopens file if the guessed record size doesn't correspond to the
-c	record size stored in the first record of the file
-c
-      if(lastindexitem.gt.0.and.numheadrecs.ge.2) then
-         if (typesdd .eq. 0) then
-		write(6,11)
-	 else if (typesdd .eq. 1) then
-		write(6,12)
-	 endif
-         do 100 irec=2, numheadrecs
-            read(10,rec=irec) (i4dat(j),j=1,ibytperrec/4)
-            do 50 i = 1, numindexperrec
-               ind = i + numindexperrec*(irec-2)
-               if (ind .le. lastindexitem) then
-                  i1 = (i-1)*ibytperheaditem/2 + 1
-                  if (isnew) then
-                     istart = i4dat( i4pc(i1) )
-                     istop = i4dat( i4pc(i1+2) )
-                     iposcode = i2dat(i1+30)
-                  else
-                     istart = i2dat(i1)
-                     istop = i2dat(i1+1)
-c	magic is here (i1+2) but was never used so don't bother with it
-                     iposcode = i2dat(i1+3)
-                  endif
-                  coordh = rdat( i4pc(i1+4) )
-                  coordv = rdat( i4pc(i1+6) )
-                  sname = cdat( i16pc(i1+8) )
-                  scanno = rdat( i4pc(i1+16) )
-                  freqresol = rdat( i4pc(i1+18) )
-                  restfreq = ddat( i8pc(i1+20) )
-                  siderialtime = rdat( i4pc(i1+24))
-                  universaldate = rdat( i4pc(i1+26))
-                  iobsmode = i2dat(i1+28)
-                  obs = iobsmode / 256
-                  mode = iobsmode - obs * 256
-                  if (obs .eq. 1) then
-                     obsmode(1) = 'CONT'
-                  else if (obs .eq. 2) then
-                     obsmode(1) = 'LINE'
-                  else
-                     obsmode(1) = '    '
-                  endif
-                  call modefield(mode, obsmode(2), irtn)
-	          if(istart.gt.0) then
-		    if (typesdd .eq. 0) then
-                      write(6,51) ind,istart, istop, iposcode, 
-     .                coordh, coordv, sname, scanno, freqresol,restfreq,
-     .                siderialtime, universaldate, obsmode
-		    else if (typesdd .eq. 1) then
-		      numphase = mod( i2dat(i1+29), 64)
-		      numrec = i2dat(i1+29) / 64
-                      write(6,51) ind,istart, istop, iposcode, 
-     .                coordh, coordv, sname, scanno, freqresol,restfreq,
-     .                siderialtime, universaldate, obsmode, numphase,
-     .		      numrec
-		    endif
-		  endif
-                  if (irtn .ne. 0) write(6, 52) scanno, mode
-               end if
- 50         continue
-100      continue
-      endif
-c
-      close (10)
-      stop
-11    format(//,t6,'Item',t13,'Start',t22,'Stop',t27,'PC',
-     .		  t32,'H Coord',t42,'V Coord',t50,'Source Name',
-     .            t66,'Scan No',t77,'Del F',t87,'Rest Freq',t104,'LST',
-     .            t111,'UT Date',t120,'OBSMODE',/,
-     .		  t75,'Smple Rate',t87,'Slew Rate',/)
-12    format(//,t6,'Item',t13,'Start',t22,'Stop',t27,'Poscd',
-     .		  t32,'H Coord',t42,'V Coord',t50,'Source Name',
-     .            t66,'Scan No',t77,'Del F',t87,'Rest Freq',t104,'LST',
-     .            t111,'UT Date',t120,'OBSMODE',t128,'Phse Rcrd',/,
-     .		  t75,'Smple Rate',t87,'Slew Rate',/)
- 51   format(1x,3i8,i3,2f10.4,x,a16,f8.2,f11.6,g16.9,f8.4,f10.4,x,2a4,
-     .	     i4,i4)
- 52   format(1x,'Scan ', f8.2,' has an unknown mode code = ', i5)
-      end
-c
diff -uNr 3.5/utilities/diskfiles/makeempty.f unipops-3.6/utilities/diskfiles/makeempty.f
--- 3.5/utilities/diskfiles/makeempty.f	2000-03-16 11:30:06.000000000 -0700
+++ unipops-3.6/utilities/diskfiles/makeempty.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,131 +0,0 @@
-      program makeempty
-c
-c @(#)makeempty.f	5.1 06/22/94
-c
-c   Generates an empty file.
-c     usage: makeempty filename [filesize]
-c
-c     where filesize is an optional argument indicating the number of
-c     index entries that filename will hold.  1024 is assumed if no
-c     value is give for filesize.
-c
-c     This version only generates the new I*4 index.
-c 
-c     Format for a KEEP/SAVE/DATA file is as follows:
-c     The file consists of 512 byte records and is a DADS.
-c     The minimum file size is 129 records and the maximum is, in
-c	principal, unlimited.  
-c     The first 129 records contain an index to the data records which
-c	immediately follow these index records.
-c     The index has room for 1024 entries so the maximum number of 
-c	storable scans is 1024.
-c     The first index record (i.e., record 1) contains information about the
-c	index.  This information follows the following structure:
-c	      Integer*4:  Number of Records in Index including the first
-c		  	  record (default 129).
-c	      Integer*4:  Number of data records which follow index records;
-c			  initially set to zero
-c	      Integer*4:  Bytes per record (512)
-c	      Integer*4:  Number of bytes per entry in index (64)
-c	      Integer*4:  Largest index entry number in use, initially zero.
-c             Integer*4:  An incremental counter used by the disk access
-c                         routines, initially set to zero
-c             Integer*4:  The type of SDD file, 0 => normal, 1 => records;
-c                         initially set to zero.
-c             Integer*4:  SDD version number = 1 for this version
-c	      Integer*4:  120 zeros to pad out the record to its 512 byte size;
-c			  future entries can be placed there.
-c
-c     One index entry describes one scan in the data section of the file.
-c     These index entries, as specified above, take up 64 bytes and start in
-c	record 2 of the file and go through the end of record 129.  8 index
-c	entries are in each of these 128 records for a maximum of 1024 entries;
-c     Each entry in the index has the following format (sdd version = 1):
-c		Integer*4:    Starting record number for the scan about to be
-c			         described in the index.
-c		Integer*4:    Last record number for that scan.
-c	        Real*4:	      Horizontal Coordinate in degrees
-c		Real*4:       Vertical Coordinate in degrees
-c		Character*16: Source name
-c		Real*4:	      Scan number
-c		Real*4:       Frequency resolution in MHz
-c		Real*8:	      Rest Frequency of the observation in MHz
-c		Real*4:       LST in hours
-c		Real*4:       UT date in YYYY.MMDD format
-c		Integer*2:    OBSMODE coded (see cookbook and modes.h)
-c		Integer*2:    Phase & record information
-c		Integer*2:    Position Code (1 through 14, see cdcodes.h)
-c		Integer*2:    1 zero for padding out index item to 64 bytes;
-c				a future index item could be stored here.
-c
-c	All of the above are 0s at file creation.
-c
-c     The data records, when a file is created, do not exist but are added
-c	either sequentially or by its position in the index.  For example, in
-c	the case of the later, the application program could store a scan in
-c	records 130-135 but put the index information for those records in
-c	the 134 index entry (i.e., record 134/8+2 = 17, bytes 64*mod(134,8)+1
-c	=384 to 384+63=447 within that record)
-c     The number of records per scan is arbitrary in this system.  The format
-c	of the data records is also arbitrary.
-c
-      character*50 filename
-      character*10 cnumindex
-      integer*4 idat(128) 
-      integer*4 iargc, i1, i2, lastindexitem, numheadrecs,
-     .          numdatarecs, ibytperrec, ibytperheaditem, numarg,
-     .          icounter, itypesdd, isddversion, i, ierr, 
-     .          numindex, irec
-c
-      data lastindexitem/0/, i1/1/, i2/2/
-      data numheadrecs/129/
-      data numdatarecs/0/
-      data idat/128*0/
-      data ibytperrec/512/
-      data ibytperheaditem/64/
-      data icounter /0/
-      data itypesdd /0/
-      data isddversion /1/
-c
-      numarg = iargc()
-      if (numarg .le. 0) then
-	write(0,*) 'Must specify filename and an optional file size'
-	call exit(i1)
-      else
-	call getarg(i1, filename)
-	if (numarg .gt. 1) then
-	  call getarg(i2, cnumindex)
-	  read(cnumindex,10,iostat=ierr) numindex
-10	  format(i)
-	  if (ierr .ne. 0 .or. numindex .le. 2) then
-		write(0,*) 'Bad number of index items:', cnumindex
-		call exit(i1)
-	  else
-		numheadrecs = (numindex * ibytperheaditem) / ibytperrec + 1
-		if (mod(numindex*ibytperheaditem,ibytperrec) .ne. 0)
-     .		   numheadrecs = numheadrecs + 1
-	  endif
-	endif
-      endif
-c
-      open(unit=10,file=filename,status='new',access='direct',
-     1		recl=ibytperrec,form='unformatted',iostat=ierr)
-      if (ierr .ne. 0) then
-	write(0,*) 'Cannot create new file: ', filename
-	call exit(i1)
-      endif
-c
-      rewind(10)
-c
-      write(10,rec=1) numheadrecs, numdatarecs, ibytperrec, 
-     1		      ibytperheaditem, lastindexitem, icounter,
-     2                itypesdd, isddversion,
-     3		      (idat(i),i=1,120)
-      do 100 irec=2, numheadrecs
-	write(10,rec=irec) idat
-100	continue
-c
-      close (10)
-      stop
-      end
-c
diff -uNr 3.5/utilities/diskfiles/makeindex.c unipops-3.6/utilities/diskfiles/makeindex.c
--- 3.5/utilities/diskfiles/makeindex.c	2000-03-16 11:30:06.000000000 -0700
+++ unipops-3.6/utilities/diskfiles/makeindex.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,792 +0,0 @@
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <math.h>
-
-/*	The following are defined in unistd.h in 4.1 and later but */
-/*	are found in sys/file.h in 4.0.3, define them here if */
-/*	they have no already been definied */
-/*	If one has been definied, its probably safe to assume they all */
-/*	have been definied */
-
-#ifndef F_OK
-#define F_OK 0
-#define X_OK 1		/* not actually used here */
-#define W_OK 2
-#define R_OK 4
-#endif
-
-#define max(A,B) ((A) > (B)) ? (A) : (B)
-
-#include <sdd.h>
-
-/*		Keywords used in this program */
-/*		They don't have to be the POPS keywords, but it makes it */
-/*		easier to tell what is being used. */
-
-enum keyword {HEADLEN=0, DATALEN, SCAN, OBJECT, OBSMODE, SAVENUM,
-                 UTDATE, LST, SAMPRAT, XSOURCE, YSOURCE, COORDCD, 
-                 DELTAXR, DELTAYR, RESTFREQ, FREQRES};
-/*		This should be the last one in the above enumeration */
-#define MAXHDR (FREQRES+1)
-struct header {
-   int coffset, hoffset, class, size;
-   double **ptr;
-} hdr[MAXHDR];
-
-main(argc, argv)
-   int argc;
-   char *argv[];
-{
-   double *buf;
-   char *cbuf;
-   sdd_bs_block bsblock;
-   old_sdd_bs_block oldbsblock;
-   sdd_index_entry *indexed, *un_indexed, *index;
-   old_sdd_index_entry oldindex;
-   short *class_0;
-   char *coord_sys_code, *source_name, *type_data;
-   double *sourcex, *sourcey, *scan_number, *freq_resolution, *rest_freq;
-   double *deltax_rate, *deltay_rate, *length_sample;
-   double *lst, *ut_date, *save_bin;
-   double *headlen, *datalen;
-
-   char *fname, *pname, field[4];
-   int acmode, fd, i, n, numindexperrec, maxindexent, offset, maxunindexed=0;
-   int numbytes, numrecords, numhdr;
-   int irec, irec1, irec2, sbin, numdata = 0, isold = 0, makeold = 0;
-   int curpos, j, recindx=0, rec_num, phase_num, iscan,ifeed ;
-   int oldscan = -32767, doagain, indsize, lastused, old_save_bin;
-   double oldlst = 1.e34;
-   short id, irtn;
-   void modeid_(), modefield_(), copybytes(), sethdr();
-   double temp, temp2;
-   double zero = 0;
-   char *blank8 = "        ", *blank16 = "                ";
-
-   int maxhoff = 0;
-
-#define MAXCTYPE 15
-   char *ctype[MAXCTYPE];
-
-/*   sethdr syntax: keyword, class#, class offset (R*8s), size (R*8s), &ptr */
-/*		This could have been done outside of a function, but */
-/*		it is MUCH easier to read (and get right) this way */
-
-   sethdr(HEADLEN , 1, 0,1,&headlen);
-   sethdr(DATALEN , 1, 1,1,&datalen);
-   sethdr(SCAN    , 1, 2,1,&scan_number);
-   sethdr(OBJECT  , 1, 8,2,(double **)&source_name);
-   sethdr(OBSMODE , 1,10,1,(double **)&type_data);
-   sethdr(SAVENUM , 1,14,1,&save_bin);
-   sethdr(UTDATE  , 3, 0,1,&ut_date);
-   sethdr(LST     , 3, 2,1,&lst);
-   sethdr(SAMPRAT , 3, 7,1,&length_sample);
-   sethdr(XSOURCE , 4, 1,1,&sourcex);
-   sethdr(YSOURCE , 4, 2,1,&sourcey);
-   sethdr(COORDCD , 4,16,1,(double **)&coord_sys_code);
-   sethdr(DELTAXR , 6, 3,1,&deltax_rate);
-   sethdr(DELTAYR , 6, 4,1,&deltay_rate);
-   sethdr(RESTFREQ,12, 1,1,&rest_freq);
-   sethdr(FREQRES ,12, 2,1,&freq_resolution);
-
-   ctype[0] = "        ";   /*	not used, default is 2 */
-   ctype[1] = "GALACTIC";
-   ctype[2] = "1950RADC";
-   ctype[3] = "EPOCRADC";
-   ctype[4] = "MEANRADC";
-   ctype[5] = "APPRADC ";
-   ctype[6] = "APPHADC ";
-   ctype[7] = "1950ECL ";
-   ctype[8] = "EPOCECL ";
-   ctype[9] = "MEANECL ";
-   ctype[10]= "APPECL  ";
-   ctype[11]= "AZEL    ";
-   ctype[12]= "USERDEF ";
-   ctype[13]= "2000RADC";
-   ctype[14]= "INDRADC ";
-
-   if (argc != 2) {
-      printf("Usage : makeindex.exe filename\n");
-      exit(1);
-   }
-
-   pname = *argv++;
-   fname = *argv++;
-
-   if (strncmp("makerecindex.exe",pname,16)==0) recindx = 1;
-   if (strncmp("makeoldindex.exe",pname,16)==0) makeold = 1;
-   if (strncmp("makeoldrecindex.exe",pname,19)==0) {
-      recindx = 1;
-      makeold = 1;
-   }
-
-/*		check for existance and access permissions */
-   acmode = F_OK | R_OK | W_OK;
-   if (access(fname, acmode) != 0) {
-      printf("Filename, %s, does not exist or has the wrong permissions.\n", 
-                 fname);
-      exit(1);
-   }
-
-/*		open it for read and write */
-   if ((fd = open(fname, O_RDWR, 0)) < 0) {
-/*		hmm, couldn't open it after all, bizzare */
-      perror("");
-      printf("Filename, %s, could not be opened\n", fname);
-   }
-
-/*		Ok, now read in the bootstrap block */
-
-   if (read(fd, &bsblock, SDDBUFSIZE) != SDDBUFSIZE) {
-      printf("Error reading bootstrap block: too few bytes read.\n");
-      printf("Cannot continue.\n");
-      exit(1);
-   }
-
-/*		Is it an old type */
-   if (bsblock.sddversion == 0) isold = 1;
-   if (isold == 1) {
-/*		reread the bs block into oldbsblock */
-      lseek(fd, 0, SEEK_SET);
-      if (read(fd, &oldbsblock, SDDBUFSIZE) != SDDBUFSIZE) {
-         printf("Error reading bootstrap block: too few bytes read. \n");
-         printf("Cannot continue.\n");
-         exit(1);
-      }
-/*		copy values to new bs block */
-      bsblock.num_index_rec = oldbsblock.num_index_rec;
-      bsblock.num_data_rec = oldbsblock.num_data_rec;
-      bsblock.bytperrec = oldbsblock.bytperrec;
-      bsblock.bytperent = oldbsblock.bytperent;
-      bsblock.num_entries_used = oldbsblock.num_entries_used;
-      bsblock.counter = oldbsblock.counter;
-      bsblock.typesdd = oldbsblock.typesdd;
-   }
-
-
-/*		Print out the contents of the bootstrap block */
-   printf("Number of index records %i\n", bsblock.num_index_rec);
-   printf("Number of data records %i\n", bsblock.num_data_rec);
-   printf("Number of bytes per record %i\n", bsblock.bytperrec);
-   printf("Number of bytes per index item %i\n", bsblock.bytperent);
-   printf("Number of scans in file %i\n", bsblock.num_entries_used);
-   printf("Counter %i will be reset to 0\n", bsblock.counter);
-   if (recindx) {
-      printf("Type SDD %i will be reset to 1\n", bsblock.typesdd);
-   } else {
-      printf("Type SDD %i\n", bsblock.typesdd);
-   }
-   if (isold == 1) {
-      if (makeold == 1) {
-        printf("Old I*2 index.\n");
-      } else {
-        printf("Old I*2 index, a new I*4 index will be generated.\n");
-        printf("  The old I*2 index can be regenerated using \n");
-        printf("  makeoldindex.exe or makeoldrecindex.exe\n");
-      }
-   } else {
-      if (makeold == 1) {
-         printf("Replacing I*4 index with old I*2 index.\n");
-      }
-   }
-
-/*		At this point, set isold to value of makeold */
-/*		isold now indicates the output format which may */
-/*		not be the input format */
-  isold = makeold;
-
-/*		Sanity check on the values in the bootstrap block */
-
-   if ((bsblock.num_index_rec <= 1) ||
-       (bsblock.num_data_rec < 0)  ||
-       (bsblock.bytperrec <= 0) ||
-       (bsblock.bytperent > bsblock.bytperrec)) {
-      printf("File is in an improper format!!!\n");
-      printf("Cannot proceed\n");
-      exit(-1);
-   }
-
-   if (bsblock.typesdd != 0 && ! recindx) {
-      printf("File is in RECORDS format!!!\n");
-      printf("Cannot proceed\n");
-      exit(-1);
-   }
-   
-   numindexperrec = bsblock.bytperrec / bsblock.bytperent;
-   maxindexent = (bsblock.num_index_rec - 1)*numindexperrec;
-
-   if (recindx) {
-      printf("Maximum number of records which could be stored %i\n",maxindexent);
-   } else {
-      printf("Maximum number of scans which could be stored %i\n",maxindexent);
-   }
-   printf("Number of index items per record %i\n", numindexperrec);
-
-/*		set up two internal indexes, each large enough to hold
- *		the entire index.  NOTE: this currently requires that
- *		both fit in available memory. */
-
-   if ((indexed = (sdd_index_entry *)calloc(maxindexent, sizeof(sdd_index_entry))) == NULL) {
-      perror("Can not make first index, sorry.\n");
-      printf("This is probably due to a lack of memory.\n");
-      printf("Try stopping some other processes to free up memory\n");
-      exit(1);
-   }
-
-   if ((un_indexed = (sdd_index_entry *)calloc(maxindexent, sizeof(sdd_index_entry))) == NULL) {
-      perror("Can not make second index, sorry.\n");
-      printf("This is probably due to a lack of memory.\n");
-      printf("Try stopping some other processes to free up memory\n");
-      exit(1);
-   }
-
-/*		reset bootstrap values to default values */
-
-   bsblock.num_data_rec = 0;
-   bsblock.num_entries_used = 0;
-   bsblock.counter = 0;
-   if (recindx) bsblock.typesdd = 1;
-   for(n=0;n<INDZERO;n++) bsblock.zeros[n]=0;
-
-/*		seek to end of index records */
-
-   offset = bsblock.num_index_rec * bsblock.bytperrec;
-   if (lseek(fd,offset,SEEK_SET) != offset) {
-      printf("Error reading to the end of the index\n");
-      printf("Can not continue\n");
-      exit(1);
-   }
-   irec = bsblock.num_index_rec;
-
-/*		read from the file until a valid first record is identified
- *              or the end of the file is reached */
-
-   if ((buf = (double *)malloc(bsblock.bytperrec)) == NULL) {
-      perror("Unable to read in data\n");
-      printf("Can not continue\n");
-      exit(1);
-   }
-   printf("\n\n     Item   Start    Stop PC   H Coord   V Coord Source Name");
-   printf("     Scan No    Del F     Rest Freq        LST    UT Date  OBSMODE");
-   if (recindx) printf(" Phse Rcrd");
-   printf("\n                                                            ");
-   printf("              Smple Rate  Slew Rate\n\n");
-
-
-   while((n=read(fd,buf,bsblock.bytperrec)) == bsblock.bytperrec &&
-          numdata < maxindexent) {
-      irec++;
-/*		set up some pointers, first class_0 */
-/*		sanity check on class 0 values */
-/*		make sure all >= 0 */
-      class_0 = (short *)buf;
-      if (class_0[0] <= 0 || class_0[0] > 14) continue;
-      for (i=1;i<=class_0[0];i++) {
-         if (class_0[i] < 0) break;
-      }
-      if (i <= class_0[0]) continue;
-/*		Class 0 looks ok, set up pointers to needed header items */
-/*		remember, class_0 is 1 relative !! */
-/*		first, we need headlen to set class_0 limit */
-/*		headlen & datalen should be in the first record just read */
-/*		if not, skip this scan without warning */
-      hdr[HEADLEN].hoffset = (class_0[hdr[HEADLEN].class] - 1) + 
-                                hdr[HEADLEN].coffset;
-      hdr[DATALEN].hoffset = (class_0[hdr[DATALEN].class] - 1) + 
-                                hdr[DATALEN].coffset;
-      if ((hdr[HEADLEN].hoffset+1)*sizeof(double) >= bsblock.bytperrec) continue;
-      if ((hdr[DATALEN].hoffset+1)*sizeof(double) >= bsblock.bytperrec) continue;
-
-      headlen = buf + hdr[HEADLEN].hoffset;
-      datalen = buf + hdr[DATALEN].hoffset;
-/*		set class_0 values so that they are useful for sanity checks */
-      class_0[class_0[0]+1] = *headlen / sizeof(double) + 1;
-      doagain = 1;
-      while (doagain) {
-         doagain = 0;
-         for (i=1;i<class_0[0]+1;i++) {
-            if (class_0[i] <= 0) {
-               class_0[i] = class_0[i+1];
-               doagain = 1;
-            }
-         }
-      }
-
-/*		Ok, now we can set and check each header pointer */
-      maxhoff = 0;
-      for (i=0;i<MAXHDR;i++) {
-/*		set hoffset to -1 in case it can't be set */
-         hdr[i].hoffset = -1;
-/*		check that desired class exists */
-         if (hdr[i].class <= class_0[0]) {
-/*		check that coffset doesn't go into the next class */
-            if (hdr[i].coffset < (class_0[hdr[i].class+1] - class_0[hdr[i].class])) {
-/*		if size = 2, make sure the second one is also OK */
-               if ((hdr[i].size == 2 && hdr[i].coffset+1 < class_0[hdr[i].class+1]) ||
-                    hdr[i].size == 1) {
-/*		Ok, set hoffset */
-                  hdr[i].hoffset = hdr[i].coffset +
-                                   class_0[hdr[i].class] - 1;
-               }
-            }
-         }
-         maxhoff = max(maxhoff, hdr[i].hoffset);
-      }
-
-      numbytes = *headlen + *datalen;
-     
-      if (numbytes < bsblock.bytperrec) continue;
-      numrecords = (numbytes % bsblock.bytperrec) ? 
-                  (numbytes / bsblock.bytperrec + 1) :
-                  (numbytes / bsblock.bytperrec);
-      numbytes = numrecords * bsblock.bytperrec;
-/*		read in enough for 1 extra double */
-      numhdr = (maxhoff+2)*sizeof(double);
-
-/*		remember location of this scan */
-      irec1 = irec;
-      irec2 = irec + numrecords - 1;
-
-/*		read the header into buf, make sure its big enough */
-
-      if ((buf = (double *)realloc (buf, numhdr)) == NULL) {
-         perror("");
-         printf("Unable to read scan %f8.2, too many bytes\n", *scan_number);
-         printf("HEADLEN = %f\n", *headlen);
-         printf("DATALEN = %f\n", *datalen);
-         printf("Skipping this scan\n");
-         continue;
-      }
-
-      numhdr = numhdr - bsblock.bytperrec;
-      if (read(fd,(buf+bsblock.bytperrec/8), numhdr) != numhdr) {
-         perror("");
-         printf("Unexpected problem reading data for scan %f8.2\n",*scan_number);
-         printf("Can not continue\n");
-         exit(1);
-      }
-/*		lseek to end of this data block */
-      numbytes = numbytes - (numhdr + bsblock.bytperrec);
-      lseek(fd, numbytes, SEEK_CUR);
-
-      irec = irec2;
-      numdata++;
-
-/*		OK, NOW we can set all of the valid header pointers */
-      for (i=0;i<MAXHDR;i++) {
-         if (hdr[i].hoffset < 0) {
-/*		point at zero if not set, deal with char ptrs as special case*/
-            *(hdr[i].ptr) = &zero;
-         } else {
-            *(hdr[i].ptr) = buf + hdr[i].hoffset;
-         }
-      }
-      if (hdr[OBJECT].hoffset < 0) *(hdr[OBJECT].ptr) = (double *)blank16;
-      if (hdr[OBSMODE].hoffset < 0) *(hdr[OBSMODE].ptr) = (double *)blank8;
-      if (hdr[COORDCD].hoffset < 0) *(hdr[COORDCD].ptr) = (double *)blank8;
-
-/*			Ok, you've got it, now make the index */
-/*			Is it already indexed, and if so, does it fit */
-/*			in the available index and is that space open */
-      
-      if (*save_bin == infinity())  *save_bin = 0;
-      sbin = *save_bin;
-      if (sbin > 0 && sbin <= maxindexent) {
-         index = (indexed + sbin - 1);
-         if (index->start_rec > 0) {
-            index = (un_indexed + maxunindexed);
-            maxunindexed++;
-            sbin = 0;
-         } else {
-/*			alter the bs block copy to reflect this change */
-            bsblock.num_data_rec = max(bsblock.num_data_rec,(irec2-bsblock.num_index_rec));
-            bsblock.num_entries_used = 
-                max(bsblock.num_entries_used, sbin);
-         }
-      } else {
-         index = (un_indexed + maxunindexed);
-         maxunindexed++;
-         sbin = 0;
-      }
-
-      index->start_rec = irec1;
-      index->end_rec = irec2;
-      index->h_coord = *sourcex;
-      index->v_coord = *sourcey;
-      for(i=0;i<16;i++) index->source[i] = source_name[i];
-      index->scan = *scan_number;
-      index->lst = *lst;
-      index->UT = *ut_date;
-      if (recindx) {
-
-/*   	   records file */
-/*	   Use change in LST to reset number of phases and increment record */
-/*         counter; use change in scan number to reset record and phase number */
-/*	   Code record/phase numbers as 64*record_num + phase_num */
-/*	   This only works for GB data, but there is currently no check */
-/*	   that it is, in fact, GB data */
-
-         iscan = *scan_number;
-         if (iscan != oldscan) {
-            rec_num = 1;
-            phase_num = 1;
-            oldscan = iscan;
-            oldlst = *lst;
-         } else {
-            if (*lst == oldlst) {
-               ifeed = ((*scan_number - iscan) * 100.0 + 0.5);
-               if (ifeed == 0 || ifeed == 1) phase_num++;
-            } else {
-               rec_num++;
-               phase_num = 1;
-               oldlst = *lst;
-            }
-         }
-         index->phase_rec = 64*rec_num + phase_num;
-      } else {
-         index->phase_rec = -1;
-      }
-      for (i=0;i<INDZERO;i++) index->zeros[i] = 0;
-/*		default pos_code is 2 = 1950RADC */
-      index->pos_code = 2;
-      for (i=1;i<MAXCTYPE;i++) {
-         if (strncmp(coord_sys_code, ctype[i],8) == 0) {
-            index->pos_code = i;
-            break;
-         }
-      }
-
-      modeid_((type_data+4),&id,&irtn);
-      index->obsmode = id;
-      index->freq_res = *freq_resolution;
-      index->rest_freq = *rest_freq;
-      if (strncmp("LINE",type_data,4) == 0) {
-         index->obsmode = index->obsmode + 512;
-      } else if (strncmp("CONT",type_data,4) == 0) {
-         index->obsmode = index->obsmode + 256;
-         temp = *deltax_rate * cos(*sourcey * M_PI / 180.0);
-         temp2 = *deltay_rate;
-         index->freq_res = sqrt(temp*temp + temp2*temp2);
-         index->rest_freq = *length_sample;
-      }
-
-      if (sbin != 0) {
-         printf(" %8i",sbin);
-         printf("%8i",index->start_rec);
-         printf("%8i",index->end_rec);
-         printf("%3i",index->pos_code);
-         printf("%10.4f",index->h_coord);
-         printf("%10.4f",index->v_coord);
-         printf(" %16.16s",index->source);
-         printf("%8.2f",index->scan);
-         printf("%11.6f",index->freq_res);
-         printf("%- #16.9g",index->rest_freq);
-         printf("%8.4f",index->lst);
-         printf("%10.4f",index->UT);
-         printf(" %8.8s",type_data);
-         if (recindx) {
-            printf("%4i",phase_num);
-            printf("%4i\n", rec_num);
-         } else {
-            printf("\n");
-         }
-         if (irtn != 0) {
-            printf(" Scan number %8.2f OBSMODE %8.8s is not standard\n",
-                     index->scan, type_data);
-         }
-      }
-   }
-/*		Did it fail because the index is full? */
-   if (numdata >= maxindexent) {
-      printf("\n\nOut of space in index, too much data!!!.\n");
-      printf("The index needs to be expanded before all of the data\n");
-      printf("can be accessed.  Use the expandsdd utility.\n");
-      printf("Wait while I write the index back to disk.\n");
-   } else {
-/*		Ok, the read failed, either a problem or EOF */
-      if (n != 0) {
-/*		A problem, give a warning before continuing */
-         perror("");
-         printf("Unexpected number of bytes read at end of file.\n");
-         printf("continuuing ...\n");
-      }
-   }
-
-/*		Deal with unindexed index */
-   n = 0;
-   free(buf);
-   if ((buf = (double *)malloc(bsblock.bytperrec)) == NULL) {
-      perror("Can not finish indexing the file.\n");
-      maxunindexed = 0;
-   }
-   for (i=0; i < maxunindexed; i++) {
-/*		find an empty spot in the real index, don't reset n */
-      for (;n<maxindexent;n++) {
-         if (indexed[n].start_rec == 0) break;
-      }
-/*		double check that its really empty */
-      if (indexed[n].start_rec != 0) {
-/*		This indicates a bug someplace !! */
-         printf("The index is too small, but at this point in makeindex\n");
-         printf("this should NEVER happen.  This is a bug.  Please report\n");
-         printf("it to a unipops guru.\n");
-         printf("Please wait while I write the index as I have it to disk.\n");
-         break;
-      }
-/*		copy the index */
-      indexed[n].start_rec = un_indexed[i].start_rec;
-      indexed[n].end_rec = un_indexed[i].end_rec;
-      indexed[n].pos_code = un_indexed[i].pos_code;
-      indexed[n].h_coord = un_indexed[i].h_coord;
-      indexed[n].v_coord = un_indexed[i].v_coord;
-      for (j=0;j<16;j++) indexed[n].source[j] = un_indexed[i].source[j];
-      indexed[n].scan = un_indexed[i].scan;
-      indexed[n].freq_res = un_indexed[i].freq_res;
-      indexed[n].rest_freq = un_indexed[i].rest_freq;
-      indexed[n].lst = un_indexed[i].lst;
-      indexed[n].UT = un_indexed[i].UT;
-      indexed[n].obsmode = un_indexed[i].obsmode;
-      indexed[n].phase_rec = un_indexed[i].phase_rec;
-      for(j=0;j<INDZERO;j++) indexed[n].zeros[j] = 0;
-/*		Update the bootstrap block */
-      bsblock.num_data_rec = max(bsblock.num_data_rec,
-                 (indexed[n].end_rec-bsblock.num_index_rec));
-      bsblock.num_entries_used = max(bsblock.num_entries_used, n+1);
-/*		Ok, now the tricky part, find the data in the file and */
-/*		modify save_bin for this scan */
-      curpos = lseek(fd,0,SEEK_CUR);
-      offset = (indexed[n].start_rec - 1) * bsblock.bytperrec - curpos;
-      if (lseek(fd, offset, SEEK_CUR) != (curpos + offset)) {
-         printf("Unable to find previously indexed data in file.\n");
-         printf("The file has changed since this program started.\n");
-         printf("Unable to continue\n");
-         exit(1);
-      }
-      curpos = lseek(fd,0,SEEK_CUR);
-      if (read(fd,buf,bsblock.bytperrec) != bsblock.bytperrec) {
-         printf("Unable to read previously indexed data in file.\n");
-         printf("The file has changed since this program started.\n");
-         printf("Unable to continue\n");
-         exit(1);
-      }
-/*		no sanity check this time on class_0 values */
-/*		Note, this assumes that save_bin can be found in the first */
-/*              bytperrec bytes, if not, continue */
-      
-      class_0 = (short *)buf;
-
-      hdr[SAVENUM].hoffset = -1;
-      if (hdr[SAVENUM].class <= class_0[0]) {
-         if (hdr[SAVENUM].coffset < 
-             (class_0[hdr[SAVENUM].class+1] - class_0[hdr[SAVENUM].class])) {
-            hdr[SAVENUM].hoffset = hdr[SAVENUM].coffset +
-                                   class_0[hdr[SAVENUM].class] - 1;
-         }
-      }
-      if ((hdr[SAVENUM].hoffset+1)*sizeof(double) >= bsblock.bytperrec) continue;
-      if (hdr[SAVENUM].hoffset < 0) {
-         *(hdr[SAVENUM].ptr) = &zero;
-      } else {
-         *(hdr[SAVENUM].ptr) = buf + hdr[SAVENUM].hoffset;
-      }
-      if (*save_bin != infinity() && *save_bin != 0) {
-/*		Don't change anything if it wasn't already set */
-/*		remember old value */
-         old_save_bin = (int) (*save_bin+0.5);
-         *save_bin = n+1;
-         offset = - bsblock.bytperrec;
-         if (lseek(fd, offset, SEEK_CUR) != curpos){
-            printf("Unable to find previously indexed data in file.\n");
-            printf("The file has changed since this program started.\n");
-            printf("Unable to continue\n");
-            exit(1);
-         }
-         if (write(fd, buf, bsblock.bytperrec) != bsblock.bytperrec) {
-            perror("Unable to update indexed data in file.\n");
-            printf("Unable to continue\n");
-            exit(1);
-         }
-      } else {
-         old_save_bin = 0;
-      }
-/*		Ok, finally, show the user this index entry in full */
-      printf(" %8i",n+1);
-      printf("%8i",indexed[n].start_rec);
-      printf("%8i",indexed[n].end_rec);
-      printf("%3i",indexed[n].pos_code);
-      printf("%10.4f",indexed[n].h_coord);
-      printf("%10.4f",indexed[n].v_coord);
-      printf(" %16.16s",indexed[n].source);
-      printf("%8.2f",indexed[n].scan);
-      printf("%11.6f",indexed[n].freq_res);
-      printf("%- #16.9g",indexed[n].rest_freq);
-      printf("%8.4f",indexed[n].lst);
-      printf("%10.4f",indexed[n].UT);
-      id = indexed[n].obsmode % 256;
-      modefield_(&id, field, &irtn);
-      switch (indexed[n].obsmode - id) {
-         case 256:
-            printf(" CONT%4.4s", field);
-            break;
-         case 512:
-            printf(" LINE%4.4s", field);
-            break;
-         default:
-            printf("     %4.4s", field);
-            break;
-      }
-      if (recindx) {
-         phase_num = indexed[n].phase_rec % 64;
-         rec_num = (indexed[n].phase_rec - phase_num)/64;
-         printf("%4i",phase_num);
-         printf("%4i\n",rec_num);
-      } else {
-         printf("\n");
-      }
-/*		issue a warning if old_save_bin was non-zero and different */
-      if (old_save_bin != 0 && old_save_bin != (n+1)) {
-         printf(" ^^^^^^^^ New SAVENUM value (old value was %i)\n",old_save_bin);
-      }
-   }
-/*		Write out the bootstrap and index */
-
-   if (lseek(fd, 0, SEEK_SET) != 0) {
-      perror("");
-      printf("Can not continue\n");
-      exit(1);
-   }
-   if (isold == 1) {
-/*		check for overflows, don't make old index if anything too large */
-/*		first, the 3 likely places in the bs block */	
-      if (bsblock.num_index_rec >= 32768 ||
-          bsblock.num_data_rec >= 32768 ||
-          bsblock.num_entries_used >= 32768) isold = 0;
-/*		Then each index entry */
-      for (i=0;i<bsblock.num_entries_used;i++) {
-         if (indexed[i].start_rec >= 32768 ||
-             indexed[i].end_rec >= 32768) {
-            isold = 0;
-            break;
-         }
-      }
-/*		At this point, isold indicates what should be done */
-      if (isold == 1) {
-/*		transfer bsblock to oldbsblock */
-         oldbsblock.num_index_rec = bsblock.num_index_rec;
-         oldbsblock.num_data_rec = bsblock.num_data_rec;
-         oldbsblock.bytperrec = bsblock.bytperrec;
-         oldbsblock.bytperent = bsblock.bytperent;
-         oldbsblock.num_entries_used = bsblock.num_entries_used;
-         oldbsblock.counter = 0;
-         oldbsblock.typesdd = bsblock.typesdd;
-         for (i=0;i<OLDBSZERO;i++) oldbsblock.zeros[i] = 0;
-/*		and write it out */
-         if (write(fd,&oldbsblock,sizeof(oldbsblock)) != sizeof(oldbsblock)) {
-            perror("Error writing bootstrap block\n");
-            printf("Can not continue\n");
-            exit(1);
-         }
-/*		if not old, just write out bsblock */
-      } else {
-         bsblock.sddversion = 1;
-         if (write(fd,&bsblock,sizeof(bsblock)) != sizeof(bsblock)) {
-            perror("Error writing bootstrap block\n");
-            printf("Can not continue\n");
-            exit(1);
-         }
-      }
-   } else {
-      bsblock.sddversion = 1;
-      if (write(fd,&bsblock,sizeof(bsblock)) != sizeof(bsblock)) {
-         perror("Error writing bootstrap block\n");
-         printf("Can not continue\n");
-         exit(1);
-      }
-   }
-   offset = bsblock.bytperrec;
-   if (lseek(fd,offset,SEEK_SET) != offset) {
-      perror("");
-      printf("Can not continue\n");
-      exit(1);
-   }
-/*		first, copy index to cbuf and write out each cbuf */
-/*		make sure cbuf is one record */
-   if ((cbuf = (char *)malloc(bsblock.bytperrec)) == NULL) {
-      perror("Can not finish indexing the file.\n");
-      maxunindexed = 0;
-   }
-/*		then loop over the total number of records */
-   index = indexed;
-   indsize = bsblock.bytperent;
-   numbytes = bsblock.bytperrec;
-   lastused = (indsize*numindexperrec) / sizeof(char);
-   for(i=0;i<(bsblock.num_index_rec-1);i++) {
-/*		And over the number of index ent/record */
-      for(n=0;n<numindexperrec;n++) {
-/*		for old index, first copy new index values */
-/*		over to old index structure, then copy old */
-/*		index to cbuf */
-         if (isold == 1) {
-            oldindex.start_rec = index->start_rec;
-            oldindex.end_rec = index->end_rec;
-            oldindex.magic = 2;
-            oldindex.pos_code = index->pos_code;
-            oldindex.h_coord = index->h_coord;
-            oldindex.v_coord = index->v_coord;
-            for(j=0;j<16;j++) {
-               oldindex.source[j] = index->source[j];
-            }
-            oldindex.scan = index->scan;
-            oldindex.freq_res = index->freq_res;
-            oldindex.rest_freq = index->rest_freq;
-            oldindex.lst = index->lst;
-            oldindex.UT = index->UT;
-            oldindex.obsmode = index->obsmode;
-            oldindex.phase_rec = index->phase_rec;
-            for(j=0;j<OLDINDZERO;j++) oldindex.zeros[j]=0;
-/*		copy the bytes over */
-            copybytes((char *)&oldindex, (cbuf+n*indsize), indsize);
-         } else {
-/*		copy the bytes over */
-            copybytes((char *)index, (cbuf+n*indsize), indsize);
-         }
-/*		increment index pointer */
-         index++;
-      }
-/*		make sure the rest of cbuf is zero */
-      for (j=lastused;j<(numbytes/sizeof(char));j++) {
-         cbuf[j] = '\0';
-      }
-/*		write cbuf out */
-      if (write(fd,cbuf,numbytes) != numbytes) {
-         perror("Error writing index.\n");
-         printf("Can not continue\n");
-         exit(1);
-      }
-   }
-   exit(0);
-}
-
-void copybytes(inbuf, outbuf, size) 
-   char *inbuf, *outbuf;
-   int size;
-{
-   int j;
-   for (j=0;j<size;j++) {
-      outbuf[j] = inbuf[j];
-   }
-}
-
-void sethdr(kword, class, coffset, size, ptr)
-   int kword, coffset, class, size;
-   double **ptr;
-{
-   hdr[kword].class = class;
-   hdr[kword].coffset = coffset;
-   hdr[kword].hoffset = -1;
-   hdr[kword].size = size;
-   hdr[kword].ptr = ptr;
-}
-
diff -uNr 3.5/utilities/diskfiles/modefn.c unipops-3.6/utilities/diskfiles/modefn.c
--- 3.5/utilities/diskfiles/modefn.c	2000-03-16 11:30:05.000000000 -0700
+++ unipops-3.6/utilities/diskfiles/modefn.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,75 +0,0 @@
-
-/* @(#)modefn.c	5.1 06/22/94 */
-
-/* 2 functions for using modes.h and the modes array */
-/* both set *irtn to zero if successfull and to 1 if an error occured */
-
-#include <modes.h>
-
-void modeid_ (field, id, irtn) 
-
-   char *field;
-   short int *id, *irtn;
-
-/*	given field (a pointer to a 4 char string) return the matching id */
-
-{
-   int i, i4 = 4;
-
-   for (i=0;i<NUMMODES;i++) {
-      if (strncmp(modes[i].field,field,i4) == 0) break;
-   }
-
-   if (i != NUMMODES) {
-      *irtn = 0;
-      *id = i;
-   } else {
-/*	Not found, set it to the null id and report an error */
-      *irtn = 1;
-      *id = 0;
-   }
-}
-
-void modedesc_ (id, desc, irtn)
-
-   short int *id, *irtn;
-   char *desc;
-
-/*	given an id, set *desc to the description of that mode */
-/*	this is currently 32 character string, pad *desc out to */
-/* 	32 characters if necessary. */
-
-{
-   int i;
-
-   if (*id >= 0 || *id < NUMMODES) {
-      *irtn = 0;
-      strcpy(desc, modes[*id].description);
-      for (i=strlen(desc);i<32;i++) {
-         *(desc+i) = ' ';
-      }
-   } else {
-/*	a bad id, don't change desc and report error */
-      *irtn = 1;
-   }
-}
-
-void modefield_(id, field, irtn)
-
-   short int *id, *irtn;
-   char *field;
-
-/*	given an id, return the field associated with it */
-
-{
-   int i, i4 = 4;
-
-   if (*id >= 0 || *id < NUMMODES) {
-      *irtn = 0;
-      strncpy(field, modes[*id].field, i4);
-   } else {
-/*	a bad id, set field to 0 and report error */
-      strncpy(field, modes[0].field, i4);
-      *irtn = 1;
-   }
-}
diff -uNr 3.5/utilities/diskfiles/summary.c unipops-3.6/utilities/diskfiles/summary.c
--- 3.5/utilities/diskfiles/summary.c	2000-03-16 11:30:37.000000000 -0700
+++ unipops-3.6/utilities/diskfiles/summary.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,183 +0,0 @@
-/*  @(#)summary.c	5.1 06/22/94
-** program to print converted telescope tape
-*/
-#define buffsize 5120
-/*
-** Structure for converted telescope tape format:
-**   Spectral Line Data - 140 Foot and 300 Foot
-** Record length in bytes:  5120
-*/
-struct telescope_tape
-{
-	float    f_01[2];
-	char     c_02[12];
-	short    i_03;
-	char     c_04[18];
-	double   d_05;
-	short    i_06[4];
-	float    f_07[2];
-	short    i_08[20];
-	float    f_09;
-	short    i_10[2];
-	float    f_11[21];
-	short    i_12[8];
-	float    f_13[72];
-	short    i_14[2];
-	double   d_15[8];
-	char     c_16[4][18];
-	double   d_17[6];
-	float    f_18[4];
-	short    i_19[112];
-	float    f_20[4];
-	float    f_21[16];
-	float    f_22[4];
-	float    f_23[1024];
-} Tfline;
-
-#define readmode 0
-#define openerr -1
-#include <stdio.h>
-#include <math.h>
-
-main(argc,argv)
-	int argc;
-	char *argv[];
-{
-	int i, n, recno, fd;
-	extern struct telescope_tape Tfline;
-
-/* begin the program */
-
-/* start the main body of the program */
-	if (argc == 0)
-	{
-		printf ("Filename must be supplied\n\0");
-		exit(0);
-	}
-	if (argc > 0 && (fd=open(argv[1],readmode)) == openerr)
-	{
-		printf ("Can't open %s\n", argv[1]);
-		exit(0);
-	}
-
-	recno = 1;
-	n = read(fd,&Tfline,buffsize);
-
-	printf("\n\n\t--------          Index of Input Tape           --------\n\n");
-	printf("Record  Scan   Off    Source     Observer  RA(1950)  \
-DEC(1950)   Date     LST\n");
-	printf("No      No     Scan   Name          No    hh mm ss  \
-dd mm ss  mm/dd/yy hh:mm:ss\n\n");
-
-	while (n == buffsize)
-	{
-		pr_summary(recno);
-		recno++;
-		n = read(fd,&Tfline,buffsize);
-	}
-	if (n == 0)
-		printf("\nEnd of Input\n");
-	else
-		printf("I/O error reading record number %5d\n",recno);
-	
-/* end the program */
-
-	recno--;
-	printf("Number input records  %6d\n",recno);
-
-	close(fd);
-
-	exit(0);
-}
-
-pr_summary(recno)
-	int recno;
-
-{
-	extern struct telescope_tape Tfline;
-        int i;
-	int j;
-
-	float  scan_no;
-	float  off_scan_no;
-	char source[12]; 
-	short obs_no;
-	char obs_name[18];
-	double julian_date;
-	short day_of_year;
-	short month;
-	short day;
-	short year;
-	float  lst;
-	float  est;
-	short telescope;
-	short obs_pgm;
-	float  ra_1950;
-	float  dec_1950;
-
-	int ra_hh, ra_mm, ra_ss;
-	int dec_dd, dec_mm, dec_ss;
-	int lst_hh, lst_mm, lst_ss;
-	static int lineno = 9;
-
-	scan_no = Tfline.f_01[0];
-	off_scan_no = Tfline.f_01[1];
-	for(i = 0; i != 12; i++) source[i] = Tfline.c_02[i];
-	obs_no = Tfline.i_03;
-	for(i = 0; i != 18; i++) obs_name[i] = Tfline.c_04[i];
-	julian_date = Tfline.d_05;
-	day_of_year = Tfline.i_06[0];
-	month = Tfline.i_06[1];
-	day = Tfline.i_06[2];
-	year = Tfline.i_06[3];
-	lst = Tfline.f_07[0];
-	est = Tfline.f_07[1];
-	telescope = Tfline.i_08[0];
-	obs_pgm = Tfline.i_08[1];
-        ra_1950 = Tfline.f_13[8];
-	dec_1950 = Tfline.f_13[12];
-	if (obs_pgm == 3 || obs_pgm == 4 || obs_pgm == 8) 
-	{
-	    ra_1950 = Tfline.f_13[0];
-	    dec_1950 = Tfline.f_13[1];
-        }
-
-	i = ra_1950 * 13750.98708 + 0.5; /* radians converted to seconds of time */
-	ra_hh = i/3600;
-	ra_mm = i/60 - ra_hh*60;
-	ra_ss = i - ra_mm*60 - ra_hh*3600;
-	i = dec_1950 * 206264.8063 + 0.5; /* radians converted to seconds of arc */
-	if (i < 0)
-	{
-		i = -i;
-		j = -1;
-	}
-	else
-		j = 1;
-	dec_dd = i/3600;
-	dec_mm = i/60 - dec_dd*60;
-	dec_ss = i - dec_mm*60 - dec_dd*3600;
-	i = lst * 13750.98708 + 0.5; /* radians converted to seconds of time */
-	lst_hh = i/3600;
-	lst_mm = i/60 - lst_hh*60;
-	lst_ss = i - lst_mm*60 - lst_hh*3600;
-
-	lineno++;
-	if (lineno == 51)
-	{
-		printf("Record  Scan   Off    Source     Observer RA(1950)  \
-DEC(1950)   Date     LST\n");
-		printf("No      No     Scan   Name          No    hh mm ss  \
-dd mm ss  mm/dd/yy hh:mm:ss\n\n");
-		lineno = 1;
-	}
-
-	printf("%-4d %8.2f %5.0f  %.12s %5d   %02d %02d %02d ",
-		recno,scan_no,off_scan_no,source,obs_no,ra_hh,ra_mm,ra_ss);
-	if (j < 0)
-		printf("-%02d",dec_dd);
-	else
-		printf(" %02d",dec_dd);
-	printf(" %02d %02d  %02d/%02d/%02d %02d:%02d:%02d\n",
-		dec_mm,dec_ss,month,day,year,lst_hh,lst_mm,lst_ss);
-}
diff -uNr 3.5/utilities/expandsdd unipops-3.6/utilities/expandsdd
--- 3.5/utilities/expandsdd	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/expandsdd	1969-12-31 17:00:00.000000000 -0700
@@ -1,98 +0,0 @@
-#!/bin/csh -f
-#  @(#)expandsdd.sh	5.2 10/27/94
-#
-#  expand the index size of an sdd file
-#
-#  usage: expandsdd filename newsize
-#
-if ($#argv != 2) then
-   echo "Usage: expandsdd filename newsize"
-   exit(1)
-endif
-#
-set filename = $1
-if (! -r $filename ) then
-   echo "expandsdd: can not access $filename"
-   exit(1)
-endif
-#
-set newsize = $2
-if ( $newsize < 1 ) then
-   echo "expandsdd: newsize, $newsize, must be > 0"
-   exit(1)
-endif
-#
-set bsblock = `bootstrap $filename 512 LONG`
-if ( $bsblock[10] != 1 ) then
-   set bsblock = `bootstrap $filename 512 SHORT`
-   set nindex = $bsblock[2]
-   set ndata = $bsblock[3]
-   set bssize = $bsblock[4]
-   set recsize = $bsblock[5]
-   set nused = $bsblock[6]
-   set ntype = $bsblock[8]
-else
-   set nindex = $bsblock[2]
-   set ndata = $bsblock[3]
-   set bssize = $bsblock[4]
-   set recsize = $bsblock[5]
-   set nused = $bsblock[7]
-   set ntype = $bsblock[9]
-endif
-#
-if ($bssize != 512 || $recsize <= 0 || $nindex <= 0) then
-   echo "expandsdd: $filename is not an SDD file."
-   exit(1)
-endif
-#
-if ($nused > $newsize) then
-   echo "expandsdd: $filename has $nused entries in use."
-   echo "         newsize must be larger."
-   exit(1)
-endif
-#
-@ cursize = (($nindex - 1) * $bssize) / $recsize
-#		no need to do anything if it already is newsize
-if ($cursize == $newsize) exit(0)
-#
-set tmpfile = ${filename}.$$
-makeempty.exe $tmpfile $newsize
-if ($status != 0) then
-   echo "expandsdd: problems making empty temporary file"
-   /bin/rm -f $tmpfile
-   exit(1)
-endif
-#
-dd if=$filename bs=512 skip=$nindex >> $tmpfile
-if ($status != 0) then
-   echo "expandsdd: problems copying data to temporary file."
-   /bin/rm -f $tmpfile
-   exit(1)
-endif
-#
-if ($ntype == 1) then
-   makerecindex.exe $tmpfile > /dev/null
-   if ($status != 0) then
-      echo "expandsdd: problems indexing temporary file."
-      /bin/rm -f $tmpfile
-      exit(1)
-   endif
-else
-   makeindex.exe $tmpfile > /dev/null
-   if ($status != 0) then
-      echo "expandsdd: problems indexing temporary file."
-      /bin/rm -f $tmpfile
-      exit(1)
-   endif
-endif
-#
-mv -f $tmpfile $filename
-if ($status != 0) then
-   echo "WARNING: expandsdd encountered a problem copying the new, larger"
-   echo "         sdd file in place of the original file."
-   echo "         The original file MAY be corrupted."
-   echo "         The new file MAY be fine."
-   echo "         original file = $filename."
-   echo "         new file = $tmpfile."
-   exit(1)
-endif
diff -uNr 3.5/utilities/fits/Makefile unipops-3.6/utilities/fits/Makefile
--- 3.5/utilities/fits/Makefile	2000-03-16 11:30:56.000000000 -0700
+++ unipops-3.6/utilities/fits/Makefile	1969-12-31 17:00:00.000000000 -0700
@@ -1,61 +0,0 @@
-# @(#)Makefile	5.2 11/02/94
-#
-CCMP = cc
-CC = $(CCMP)
-FDEBOROPT = -g
-CDEBOROPT = -g
-FLOATOPT =
-FILLIB = -libmil
-CILLIB = -libmil
-FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(FILLIB)
-CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CILLIB)
-CFLAGS = $(CFLOAT)
-FFLAGS = $(FFLOAT)
-LFLAGS = $(FFLOAT)
-LLIBS  = -lm
-# Macros which define compilation and linking parameters
-# [FC]DEBOROPT (debug or optimize flag for fortran or c) = 'g' as a default 
-# for using the debugger (reset for optimization using command line 
-# substitution).
-#
-#---------------------------------------------------------------
-
-U2FOBJ = u2f.o uinit.o udata.o utrans.o fitsubs.o
-F2UOBJ = f2u.o fitsubs.o ureadhdr.o umake.o uinit.o utrans.o
-#
-#---------------------------------------------------------------
-#
-U2FGLOBH = u2f.o uinit.o udata.o f2u.o umake.o utrans.o
-F2UH = utrans.o ureadhdr.o umake.o f2u.o
-UNIPOPSH = u2f.o f2u.o udata.o  utrans.o  umake.o 
-SETKWH = f2u.o 
-#
-#---------------------------------------------------------------
-#
-
-BINLIST = u2f f2u
-
-all: $(BINLIST)
-
-u2f : $(U2FOBJ)
-	$(CC) $(CFLAGS) -o u2f $(U2FOBJ) $(LLIBS)
-
-f2u : $(F2UOBJ)
-	$(CC) $(CFLAGS) -o f2u $(F2UOBJ) $(LLIBS)
-
-clean: 
-	rm -f f2u u2f
-	rm -f *.o
-	-sccs clean
-
-#
-#---------------------------------------------------------------
-#
-$(U2FGLOBH): u2fglob.h
-
-$(F2UH): f2u.h
-
-$(UNIPOPSH): unipops.h
-
-$(SETKWH): setkw.h
-
diff -uNr 3.5/utilities/fits/f2u.c unipops-3.6/utilities/fits/f2u.c
--- 3.5/utilities/fits/f2u.c	2000-03-16 11:31:04.000000000 -0700
+++ unipops-3.6/utilities/fits/f2u.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,623 +0,0 @@
-/*  @(#)f2u.c	5.3 04/23/98	*/
-/*********************************************************************
- * F2U - FITS reader for Green Bank Single Dish data.                *
- *  This is a general FITS reader - will read and list any FITS      *
- *  file.  If it is a Single-dish binary table, can convert to       *
- *  UNIPOPS file.                                                    *
- *********************************************************************/
-#include <stdio.h>
-#include <math.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-
-#ifdef THINK_C
- #include <console.h>
- #include <stdlib.h>
-#endif
-
-#include "f2u.h"  
-#include "setkw.h"
-#include "u2fglob.h"
-#include "unipops.h"
-
-char version[40] = {"f2u version 1.5 (23Apr98)"};
-
-/*  log file  */
-char logname[16]  = {"f2u.log"};   /* f2u.log file records log data */
-FILE *logfile;        
-int logflag;    
-
-/* globals for converting angles                         */
-double rth,rtd;   /* radians to hours; radians to degrees */
-
-/*  today's date  */
-  time_t *caltime, cltime;
-  char *today, rundate[16];
-  struct tm *ltime;             /* local time structure */
-
-/* user options and globals                                          */
-int rcount;           /* input record counter                        */
-int debug;            /*  =0 no debug printout; =1 some; =2 lots     */
-int qsum;             /*  =0 for 1-line summary; =1 for full headers */
-                      /*  =2 for header and data table listings.     */
-int qscanc;           /*  =1 for scan count option.                  */
-int qcont;            /*  =0 for line, =1 for continuum data         */  
-int kpflag;           /*  =1 if Tucson data; =0 otherwise            */
-int p11flag;          /*  =1 if prototype class 11, =0 otherwise     */
-int qvof;             /* declared in u2fglob.h                       */
-int prev;             /* declared in u2fglob.h, always =0 in f2u     */
-int y2k;              /* declared in u2fglob.h, not used here        */
-int ndata_start;      /*  tells which table row to start listing     */
-int nrows;            /*  tells how many table rows to list          */
-int jrows;            /*  counts table rows being listed.            */
-int qkconv;           /*  =1 to convert to IEEE UNIPOPS format.      */ 
-int qtinit;           /*  =0 if translation table not yet initialized*/
-int ircvr;            /* counts # of receivers                       */
-int uCount;           /* counts # of output records                  */
-long rrec;            /* used in utrans                              */
-double restfreq;      /* restfreq value to put in unipops record     */
-double freqres;       /* freqres value to put in unipops record      */
-double dsf;           /* dsf value to put in unipops record          */
-double nt;            /* rentalue to put in unipops record           */
-
-/* globals delcared in f2u.h */
-int head, naxes, iaxes;
-int maxes, maxisn[20];
-int headlatch;
-int Dwidth;                /* data width (bytes) in binary table        */
-int iDrow;                 /* row count in data raster or binary table  */
-int nDrow;                 /* total # rows in raster or table           */
-int flag3D;                /* =1 if binary table or 3D  table           */
-int flagGBSD;              /* =1 if GB Single Dish table                */
-
-/* buffer for binary data tables */
-char *tbuf;
-long int siz_tbuf;
-int num_tbuf;
-int tbufflag, itbuf;
-
-/* buffer for binary data column header info */
-BTAB *bt;
-int btflag, btoffs;
-int Ntfields;              
-
-/* buffer for UNIPOPS record */
-int ubufflag;
-char *ubuf;
-UPOPS up;
-long upnt[16];
-UNIAUX auxbuf;
-
-/* axis information structure */
-/* note that we assume no more than 20 axes! (FITS standard allows up to 999)
-   So watch out !                                                          */
-AXDATA axd[20];
-int Naxd;            /* = max num of axes in current map or table row.  */
-
-/* buffer for header parameters */
-KW_VAL *hk;
-int nhk, hkflag, maxhk;
-
-/* buffer for translation table */
-TRANS_TABLE *tt;
-int ttflag;
-int hbufflag;
-HEAD_TABLE *th,*mh;   /* define these because inittrans uses them */
-
-int n_bitpix, naxisn[100];
-long int n_datarecs, drec_count, drec_lim;
-int ddone;
-
-/*********************************************************************
- * MAIN starts here.                                                 *
- *********************************************************************/
-main(argc,argv)
-int argc;
-char *argv[];
-{
-  /* init output buffer */
-   uCount=0;
-   nhk=hkflag=0;
-   Naxd = 0;                 /* init axis structure */
-   qcont = -1;       /* initialize contin/line flag */
-
-  /* initialize globals for converting angles */       
-   rth = 12./3.14159265358979;
-   rtd = 180./3.14159265358979;
-   
-  /* get present date, time.                  */
-    
-    cltime = time(caltime);  today=ctime(&cltime);
-    ltime = localtime(&cltime);
-    fprintf(stderr,"\n%s,  run: %s",version,today);
-
-#ifdef THINK_C
-  argc = ccommand(&argv);   /*  use this for MAC Think-C version */ 
-#endif
-
-  getparams(argc,argv);    /* get command-line parameters      */
-  openlog();               /* open log file and type greetings */
-
-  initkw();                /*  initialize the keyword structure */
-  
-  fitread();               /* read standard input file        */
-                           /* only one file per call of f2u   */
-  
- /* close log file and free memory space  */ 
-    closem();      /* free up buffers */
-
-    if(logflag==1)
-    {  fprintf(logfile,"\nf2u ends ok.\n");
-       fclose(logfile);
-    }
-} 
-/*********************************************************************
- * end of main                                                       *
- *********************************************************************/
- 
- 
-/***************************************************************
- * ERREXIT - print error message and exit.                     *
- ***************************************************************/
-errexit(s)
-char *s;
-{
-    perror(s);  /* print message and UNIX error code, if any. */
-
- /* close memory allocations */
-    closem();
-
- /* close files, if open */
-
-    if(logflag==1)
-    {  fprintf(logfile,"\n%s\n f2u bombs!\n",s);
-       fclose(logfile);
-     }
-    exit(0);
-} /****end of errexit**********************************************/
-
-
-/*****************************************************************
- * CLOSEM -  release memory space, and flush stdout.             *
- *    this is done by main program on normal exit, or by         *
- *    errexit if abnormal exit.                                  *
- *****************************************************************/
-closem()
-{
-    if(btflag==1)    free(bt);     /* binary table struct  */
-    if(tbufflag==1)  free(tbuf);   /* binary table itself  */
-    if(hkflag==1)    free(hk);     /* header keyword data  */
-
-    if(ttflag==1)       /* translation table struct        */
-    {   free(tt);       /* this was allocated in inittrans */
-    }
-    if(ubufflag==0) free(ubuf);
-    
-    btflag=tbufflag=ttflag=hkflag=0;
-    ubufflag=0;
-    
-    fflush(stdout);
-}
-
-
-/*****************************************************************
- * GETPARAMS - get parameters from command line, or print        *
- *   usage message if no parameters, or word "help"              *
- *****************************************************************/
-getparams(argc,argv)
-int argc;
-char *argv[];
-{
-    int i, noprob, jprob, jj;
-    
-   noprob=0;  jprob=0;
-   
-   while(noprob==0)    /*  give usage message if error, or no params */
-   {
-     if((argc<2)||(strcmp(argv[1],"help")==0)
-                ||(strcmp(argv[1],"HELP")==0)
-                ||(strcmp(argv[1],"Help")==0)
-                ||(jprob==1))
-     {
-   fprintf(stderr,"f2u : read a FITS file from std input.\n");
-   fprintf(stderr,"Usage: f2u -u|-sum|-head|-dump [n]\n");
-   fprintf(stderr,"           -u | -U     : convert to UniPOPS format.\n");
-   fprintf(stderr,"           -sum or -s  : 1-line summary to stdout.\n");
-   fprintf(stderr,"           -head or -h : list full headers on stdout.\n");
-   fprintf(stderr,"           -c          : #of scans in file to stdout.\n");
-   fprintf(stderr,"           -dump or -d : list headers and 5 table rows,");
-   fprintf(stderr," starting at n.\n");
-       exit(0);
-      }     
-
-     /*  set default parameters  */
-     
-     jprob=1;
-     debug=0;        /* debug=1 for some debug info, =2 for lots. */
-     qsum=1;
-     qscanc = 0;
-     qkconv = 0;
-     qtinit = 0;
-     prev = 0;
-     y2k = 0;
-     ndata_start=0;
-     nrows=NROWS;   jrows=0;
-   
-     /*  inspect command line parameters  */ 
-    
-     for(i=1; i<argc; i++)
-     {   if((strcmp(argv[i],"-u")==0)     /* convert to IEEE UNIPOPS option */
-           ||(strcmp(argv[i],"-U")==0))
-         { qkconv=1;  noprob=1;
-           qsum = -1; 
-           i=argc;    break; 
-         }
-         if((strcmp(argv[i],"-d")==0)     /* data dump option */
-              ||(strcmp(argv[i],"-dump")==0))
-         {  qsum=2; 
-            if((i+1)<argc)
-            {  jj = atoi(argv[i+1]);    /* get starting record number */
-               if(jj>0)  ndata_start = jj;
-            }
-            noprob=1;  i=argc;
-            break;
-         }
-         if((strcmp(argv[i],"-s")==0)     /* brief summary option */
-          ||(strcmp(argv[i],"-sum")==0)) 
-         {  qsum = 0;
-            noprob=1; i=argc;
-            break; 
-         }
-         if((strcmp(argv[i],"-h")==0)      /* header summary option */
-          ||(strcmp(argv[i],"-head")==0))
-         {   qsum = 1;
-             noprob=1; i=argc;
-             break; 
-         }
-         if(strcmp(argv[i],"-c")==0)      /* Scan count to stdout  */
-         {   qsum= -1;
-             qscanc = 1;
-             noprob=1; i=argc;
-             break; 
-         }
-         if(strcmp(argv[i],"-dd")==0)     /* extra debug printing */
-         {   debug=2;                     /* undocumented option  */
-             noprob=1; i=argc;
-             break; 
-         }
-     }
-   }    /*  end of while  */
-}
-/*********end of getparams****************************************************/
-
-
-/***************************************************************************
- * OPENLOG - open log file and write initial log messages.                  *
- ***************************************************************************/
- openlog()
- {
-    char st[80];
-    
-    if((logfile=fopen(logname,"a"))==NULL)     /*  append to log file  */
-    {  sprintf(st,"Wfits: error opening logfile: %s ",logname);
-       perror(st);
-       exit(0);
-    }
-    logflag=1;
-  
-
-    fprintf(logfile,
-      "\n***********************************************************");
-    fprintf(logfile,"\n%s,  run: %s\n",version,today);
-    fprintf(logfile," f2u params: qsum=%d, qkconv=%d,  data_start=%d,",
-            qsum,qkconv, ndata_start);
-    fprintf(logfile,"  debug=%d",debug);
-    fflush(logfile);
-}
-/************end of openlog************************************************/
-
-
-/***************************************************************************
- * FITREAD - read one FITS file from standard input.                       *
- ***************************************************************************/
-fitread()
-{
-  char inbuf[FITS_REC_LEN], tmpstr[64];
-  int rcode, irec, ntoread, ipnt;
-
-  rcount=0;
-  headlatch=0;
-  btflag=0;
-  tbufflag=0;
-  btoffs = 0;
-  itbuf=0;
-  flag3D=flagGBSD=0;
-
-  /*  set up buffer for table header parameters */
-   nhk=hkflag=0;
-   maxhk = sizeof(kw)/sizeof(struct keyword);
-   if((hk=(KW_VAL *)malloc((long)(maxhk*sizeof(KW_VAL))))==0)
-       errexit("FITREAD: Cannot allocate space for hk table!");
-   hkflag=1;
-
-  head=1;    /* head is a global var =1 if expecting a header rec */
-  irec=0;
- 
-  /* if -s option, put title lines on std out */
-   if(qsum==0)
-   { printf("\n%s,  run: %s\n",version,today);
-     printf(" HdrType      Date    Telescope Observer ");
-     printf("  Bpix Nax  Nx1  Nx2 Tflds Mx\n");
-   }
-   
-  /*  loop thru all 2880-byte records in input file */
-
-  rcode=FITS_REC_LEN;
-  ntoread=FITS_REC_LEN;
-  ipnt=0;
-  while(rcode==FITS_REC_LEN)
-  {  rcode=read(0,inbuf,FITS_REC_LEN);
-     if((rcode>0)&&(rcode<ntoread))
-     {  ipnt = rcode;
-                                       /* wait for pipe to fill */
-        while((ipnt<FITS_REC_LEN)&&(rcode>0))
-        {  ntoread -= rcode;
-           rcode = read(0,(inbuf+ipnt),ntoread);
-           if(rcode<0)
-           {  errexit("FITREAD PROBLEM"); }
-           ipnt += rcode;
-        }
-        rcode=ipnt;
-     }
-     ntoread=FITS_REC_LEN;
-     ipnt=0;
-
-     irec++;
-     rcount++;
-
-     if(head) do_head(inbuf);  /* interpret header records */
-     else    do_data(inbuf);  /* unpack data records      */
-      
-                                /* exit after adequate dumping */
-     if((qsum==2)&&(jrows>=(nrows+ndata_start))) rcode=0; 
-  }
-  LOGPR"\nRead %d records, with remainder=%d, rows=%d\n",
-                                          irec, rcode, jrows);
-  LOGPR"Wrote %d UniPOPS records to stdout\n",uCount);
-  fprintf(stderr,
-    "Read %d FITS records, %d rows.  Wrote %d UniPOPS records.\n",
-          irec, jrows, uCount);
-}
-
-/***********************************************************************
- * DO_HEAD - read one 2880 size buffer of FITS header info             *
- *    exits with head=0 after keyword END is found.                    *
- ***********************************************************************/
-do_head(inbuf)
-char *inbuf;
-{
-   int i, j, ikw, lcount, fretval;
-   char lin[90], ermsg[80], cc;
-   KW_VAL kval;
-
-   lcount=0;
-   ddone=0;
-   qtinit=0;  /* reset init flag for translation table */
-   
-   /*  Check for standard header signature  */
-   if(headlatch==0)
-   {
-     if((strncmp(inbuf,"SIMPLE",(long)6)!=0)
-        && (strncmp(inbuf,"XTENSION",(long)8)!=0))
-     {   sprintf(ermsg,"Rec#%d  not standard FITS header.",rcount);
-         fprintf(logfile,"\n%s\n", ermsg);
-         return(0);          /* assume end of file if  non-stand header */
-     }
-     nhk = 0;  /* reset hk table if new header */
-
-     if(qsum>0) printf("\n******** Start of Header Record *********\n");
-    }
-   headlatch=1;  /* only check 1st record of header for FITS signature */
-
-   for(i=0; i<FITS_REC_LEN; i+=HDR_LINE_WIDTH)
-   {   strncpy(lin,inbuf+i,(long)HDR_LINE_WIDTH);
-       (void)fixline(lin, HDR_LINE_WIDTH);  /* fix IRAM zero filled header */
-       lcount++;
-       if(qsum>0)
-       {  cc = lin[HDR_LINE_WIDTH-1];  
-          lin[HDR_LINE_WIDTH-1]='\n';
-          printf("%s",lin);
-          lin[HDR_LINE_WIDTH-1] = cc;  
-       }
-       j=parseln(lin,&kval);
-       if((j<0) || (kval.nkws<=0))    
-       {  sprintf(ermsg,"FITS syntax error, rec#%d, line %d:\n%s",
-               rcount, lcount, lin);
-          errexit(ermsg);
-       }
-       else
-       {                      /* process if a kw was found */
-          /* add to hk table if non-axis keyword */
-          if(kval.naxi==0)
-          {  *(hk+nhk) = kval;
-             nhk++;
-             if(nhk>maxhk)  errexit("DOHEAD: hk table overflows!!");
-          }
-
-          ikw = kval.pntr;
-          if(ikw>=0)                    /* if kw not recognized, skip */
-          {  if(*(kw[ikw].func) != 0)
-             {  fretval= (*(kw[ikw].func)) (&kval); /*  execute function */
-                if(fretval<0)
-                {  sprintf(ermsg,"error processing keyword: %s",kw[ikw].name);
-                   errexit(ermsg);
-                }
-             }
-
-             if(strcmp(kw[ikw].name,"END")==0)   /*  if keyword=END  */
-             {  
-                drec_count=0;
-                ddone=0;        /* reset data record counter and flag */
-                jrows=0;
-                break;                       /* jump out of for loop */
-             }
-          }
-       }
-    }
-} /********end of do_head**************************************************/
-
-
-/***********************************************************************
- * DO_DATA - take an input binary data record, put into tbuf;          *
- *    when tbuf fills up to siz_tbuf, either print the contents(qsum=2)*
- *    or convert to UNIPOPS format (qkconv=1)                          *
- ***********************************************************************/
-do_data(inbuf)
-char inbuf[];
-{
-   int i;
-
-   if((tbufflag==1)&&(ddone==0))
-   {
-      for(i=0; ((i<FITS_REC_LEN)&&(tbufflag==1)); i++) 
-      {  tbuf[itbuf++] = inbuf[i];
-         if(itbuf>=siz_tbuf)
-         {   if(flag3D==1)           /* if BINTABLE, process values */
-             {  
-              /* fprintf(logfile, "\nDo_Data, got row %d, i=%d, siz=%d ",
-                      jrows, itbuf, siz_tbuf);
-               fflush(logfile);
-
-           /* convert to SUN UNIPOPS format if -u option */
-                if((qkconv==1)||(qsum==0))  convert_row();
-                else  
-                {  if(qsum==2)
-                   if(jrows>=ndata_start)  pr_tbuf(); /* dump table data */
-                }
-             }
-            itbuf=0;
-            jrows++;
-            if(jrows >= num_tbuf)
-            {  ddone=1;            /* done with data for this file */
-               fprintf(logfile,"\nRow Limit: %d %d ", jrows, num_tbuf);
-               break;
-           }
-         }
-      }
-   }
- fprintf(logfile, "\nDo_DataEnd, got row %d, i=%d, siz=%d, drec=%d n_data=%d ",
-                   jrows, itbuf, siz_tbuf, drec_count, n_datarecs);
-  fflush(logfile);
-
-   drec_count++;
-   if(drec_count>=n_datarecs)   /* switch back to header */
-   {  head=1; 
-      headlatch = 0;
-      btoffs=0;
-      if(qsum==0)  printf("\n");  /* space down for brief summary */
-   } 
-}  /*****end of do_data***********************************************/
-
-
-/***********************************************************************
- * PR_TBUF - print contents of the binary table                        *
- *  This implements the -dump or -d option of f2u.                     *
- *  This routine is a generic dump of table data, one line of info per *
- *    table column.                                                    *
- ***********************************************************************/
-pr_tbuf()
-{
-   int i,j, mm,nff, kk, tnmult, maxis1, vf;
-   char cbf[128], *tb;
-   short *sbf;
-   float *fbf, flt,  ieee_to_real();
-   double *dbf, dub, ieee_to_dub();
-
-   sbf = (short *)cbf;
-   fbf = (float *)cbf;
-   dbf = (double *)cbf;
-   tb  = tbuf;
-
-   maxis1 = 0;
-   j=0;
-   if(flag3D==1)
-   {
-       for(i=1; i<Ntfields+1; i++)  /* loop thru all table columns */
-                                    /* print name of column */
-       {  printf("\n %5d%12s ", j, (bt+i)->ttype);
-          if((bt+i)->form=='A')
-          {   strncpy(cbf, tb, (long)(bt+i)->tmul);
-              j += (bt+i)->tmul;
-              tb += (bt+i)->tmul;
-              cbf[(bt+i)->tmul]=0;
-              printf(" %s", cbf);            /* print ascii data here */
-              strcpy(cbf,"                                        ");
-          }
-          else
-          {  /* if this col is the matrix, use maxis instead of
-                 multiplicity.                                      */
-             if(((bt+i)->matflg==1)&&(maxis1>10))  tnmult = maxis1;
-              else  tnmult = (bt+i)->tmul;
-              
-             for(mm=0;mm<tnmult; mm++)
-             {  if(mm%4==3)printf("\n ");
-                if(tnmult<=1)  printf("     ");
-                else
-                     printf(" (%4d)",mm);  /* print array index, if any */
-             
-                switch ((bt+i)->form)
-                {   case 'I' :  nff=2;
-                          for(kk=0; kk<nff; kk++, j++)  
-                          {  cbf[kk] = *tb;
-                             tb++;
-                          }
-                          printf("%10d", sbf[0]);  /* print integer datum */
-                          
-                        /* for case of MAXIS1, get axis length */
-                         if(strcmp((bt+i)->ttype, "MAXIS1")==0)
-                         {  maxis1 = sbf[0];
-                         }
-                           break;
-                    case 'E' : nff = 4;
-                          for(kk=0; kk<nff; kk++, j++) 
-                          {  cbf[kk] = *tb;
-                             tb++;
-                          }
-                          flt = ieee_to_real(fbf,&vf);
-                                                   /* print floating datum */
-                          printf("%12.6E", flt);  
-                           break;
-       
-                    case 'D' : nff = 8;
-                          for(kk=0; kk<nff; kk++, j++) 
-                          {  cbf[kk] = *tb;
-                             tb++;
-                          }
-                          dub = ieee_to_dub(dbf,&vf);
-                                        /* print double precision datum */
-                          printf("%14.8E", dub);  
-                           break;
-                 }       
-              }
-          }
-       }
-   }
-   itbuf=0;
-} /********end of pr_tbuf********************************************/
-
-
-/********************************************************************
- * FIXLINE - convert all control characters or null characters      *
- *           to blanks.   Fixes problem with zero fill in headers.  *
- *           n=length of line.                                      *
- ********************************************************************/
-fixline(line, n)
-char *line;
-int n;
-{
-   int i;
-
-   for(i=0; i<n; i++)  if(line[i]<' ')  line[i] = ' ';
-   line[n] = 0;
-}
diff -uNr 3.5/utilities/fits/f2u.h unipops-3.6/utilities/fits/f2u.h
--- 3.5/utilities/fits/f2u.h	2000-03-16 11:31:01.000000000 -0700
+++ unipops-3.6/utilities/fits/f2u.h	1969-12-31 17:00:00.000000000 -0700
@@ -1,132 +0,0 @@
-/*  @(#)f2u.h	5.1 06/22/94	*/
-/* INCLUDE FILE FOR FITS READER   (F2U)                                  */
-/*   by F. Ghigo  (January, 1990)                                        */
-/*   last update June 14, 1991                                           */
-
-#define HDR_LINE_WIDTH  80  /* # bytes per line in FITS header           */
-#define HLIM             4  /* max levels of keyword Heirarchy           */
-#define MAXKWLEN        16  /* max characters in keyword string          */
-#define KWMAXCHAR        8  /* FITS standard max kw size                 */
-
-typedef
-struct keyword              /* store basic data about each kw            */
-{  char name[MAXKWLEN];     /* keyword name                              */
-   int status;              /* =1 if found in input file, else =0        */
-   int type;                /* 0=logical, 1=integer, 2=real,             */
-                            /*   3=character string                      */
-   int maxi;                /* Max allowed axis index (for NAXISn        */
-                            /*   type words                              */
-   int no;                  /* no. of values expected. normally=1        */
-                            /* =2 for a complex int or real              */
-   int (*func)();           /* pointer to function to call when          */
-                            /*   keyword is encountered.                 */ 
-} KEYWORD;
-extern KEYWORD kw[];
-
-typedef 
-struct keyword_values          /* store kw values found in input          */
-{  char names[HLIM][MAXKWLEN]; /* may have up to HLIM keywords on         */
-                               /*   any line (before the "=")             */
-   int nkws;                   /* no. of keywords found on a line.        */
-   int pntr;                   /* pointer to "keyword" array              */
-   int tpntr;                  /* pointer to binary table column          */
-   int status;                 /* maybe this will have a use later        */
-   int type;                   /* =-1 if unknown type, otherwise          */
-                               /*  type is as in "keyword" struct         */
-   int naxi;                   /* keyword axis number, e.g, if its        */
-                               /* NAXISn, n=naxi                          */
-   int no;                     /* no.of values found for kw               */
-                               /*   tells size of ival or dval            */
-   int logic;                  /* value of keyword, if logical            */
-                               /* logic=0 for False, =1 for True          */
-   long int ival[2];           /* value(s) of keyword, if integer         */
-   double dval[2];             /* value(s) of keyword, if real.           */
-   char cval[80];              /* value of keyword, if string.            */
-} KW_VAL;
-extern KW_VAL *hk;             /* holds values of kws from header         */
-extern int nhk, hkflag;        /* nhk counts # keywords in hk             */
-extern int maxhk;              /* number of keywords in kw buffer         */
-
-typedef struct btable_struct   /* store info for table column headings    */
-{   char ttype[16];            /* type of quantity                        */
-    char tunit[16];            /* units of quantity                       */
-    int  tmul;                 /* multiplicity                            */
-    char form;                 /* format type (A,I,E,D)                   */
-    int  offs;                 /* offset into binary table                */
-    int  tpntr;                /* pointer to translation table struct     */
-    int  matflg;               /* =1 if this column contains a matrix     */
- } BTAB;
-extern BTAB *bt;               /* table structure info structure          */
-extern int btflag;             /* =1 if bt has space allocated.           */
-extern int Ntfields;           /* number of table fields = items in bt    */
-extern int btoffs;             /* offset counter for bt table             */
-
-extern int head, naxes, iaxes;
-extern int headlatch;
-extern int Dwidth;             /* data width (bytes) in binary table      */
-extern int iDrow;              /* row count in data raster or binary table*/
-extern int nDrow;              /* total # rows in raster or table         */
-extern int flag3D;             /* =1 if binary table or  3D table         */
-extern int flagGBSD;           /* =1 if GB Single Dish table              */
-extern int qcont;              /* =0 for line data, =1 for continuum      */
-
-/* buffer for binary data tables */
-extern char *tbuf;
-extern long int siz_tbuf;    /* width of table row found in input.        */
-extern int num_tbuf;         /* number of table rows found in input file. */
-extern int tbufflag, itbuf;
-
-extern int n_bitpix, naxisn[100];
-extern long int n_datarecs, drec_count, drec_lim;
-extern int maxes, maxisn[20];  /* table axis lengths                      */
-
-/* Data for axes as read from header or table                             */
-typedef struct ax_data
-{  int no;                   /* axis number                               */
-   int maxis;                /* number of pixels on this axis             */
-   double crpix;             /* reference pixel number                    */
-   char ctype[30];           /* name of axis                              */
-   double cdelt;             /* axis increment                            */
-   double crval;             /* value at reference pixel                  */
-   double crota;             /* rotation of axis                          */
-}  AXDATA;
-extern AXDATA axd[];
-extern int Naxd;        /* number of axes in current map or table row  */
-
-/* header summary structure for use by -s options                         */
-typedef struct header_summary
-{  char type[10], date[16];
-   char tele[10], obsr[22], omode[10];
-   int  nxis1, nxis2, mxis, tflds;
-} HSUM;
-extern HSUM hsum;
-   
-#define NROWS 5         /* number of table rows to list if dump option    */
-#define LOGPR  fprintf(logfile,  /* shorthand for printing to log file. ) */
-
-/*  log file  */
-extern FILE *logfile;        
-extern int logflag;    
-
-/*  today's date  */
-#include <sys/types.h>
-extern  time_t *caltime, cltime;
-extern  char *today, rundate[16];
-extern struct tm *ltime;             /* local time structure                */
-
-/* user options and globals                                                 */
-extern int rcount;           /* input record counter                        */
-extern int debug;            /*  =0 no debug printout; =1 some; =2 lots     */
-extern int qsum;             /*  =0 for 1-line summary; =1 for full headers */
-                             /*  =2 for header and data table listings.     */
-extern int ndata_start;      /*  tells which table row to start listing     */
-extern int nrows;            /*  tells how many table rows to list          */
-extern int jrows;            /*  counts table rows being listed.            */
-extern int quconv;           /*  =1 to convert to UNIPOPS format.           */ 
-extern int qtinit;           /*  =0 if translation table not yet initialized*/
-extern int ircvr;            /* counts # of receivers                       */
-extern int uCount;           /* counts # of output records                  */
-
-/* restfreq and freqres globals to deal with overloaded header words */
-extern double restfreq, freqres, dsf, nt;
-
diff -uNr 3.5/utilities/fits/fitsubs.c unipops-3.6/utilities/fits/fitsubs.c
--- 3.5/utilities/fits/fitsubs.c	2000-03-16 11:31:03.000000000 -0700
+++ unipops-3.6/utilities/fits/fitsubs.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,230 +0,0 @@
-/*  @(#)fitsubs.c	5.1 06/22/94	*/
-/******************************************************************************/
-/* FITSUBS - file with numeric conversion routines for FITS reader and writer */
-/******************************************************************************/
-#include <math.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <time.h>
-
-#ifdef THINK_C
- #include <stdlib.h>
- #include <unix.h>
-#else 
-#include <sys/types.h>
-#include <sys/file.h>
-#endif
-extern FILE *logfile;
-
- /**************************************************************************
-  * IEEE_TO_DUB - convert IEEE double (8-bytes in x) to local double       *
-  **************************************************************************/
-#define DMASK 0x7FF00000
- double ieee_to_dub(zx, iflg)
- char *zx;
- int *iflg;                    /* return 1 if NaN or infinity, else 0 */
- {
-    unsigned long int ii,jj, x[2];
-    char *cx,*cy;
-    double xx,yy,zz, sign, *dd, pow();
-    int i;
-
-    for(i=0,cx=zx,cy=(char *)x; i<8; i++)  *cy++ = *cx++;
-
-    *iflg = 0;
-    if( (x[0]&DMASK)==DMASK) *iflg = 1; /* check for NaN */
-    else
-       if( (x[0]&DMASK)==0)             /* check for zero  */
-       {  yy = 0.0;
-          return(yy);
-       }
-    
-  /* fprintf(logfile,"\nIEEE_2_DUB: %10lx %10lx, nan=%d ", x[0], x[1],(*iflg)); 
-    */
-    
-#ifdef THINK_C
-    sign = 1.0;
-    ii = x[0] & 0x80000000;     /* get sign bit */
-    if(ii!=0) sign = -1.0;
-    
-    ii = x[0] & 0x7FF00000;     /* get exponent  */
-    xx = ii;
-    xx /= 1048576.;
-    zz = sign * pow((double)2.0, (xx-1023.));
-    
-    xx = x[1];                 /* low-order mantissa */
-    ii = x[0] & 0xFFFFF;       /* high-order mantissa */
-    yy = ii;
-    
-    yy *= pow((double)2.0, (double)32.0);  
-    xx += yy;
-    xx /= pow((double)2.0, (double)52.0);
-    
-    yy = zz * (1.0 + xx);
-
-#else
-    dd = (double *)x;
-    yy = *dd;
-#endif
-    /* fprintf(logfile, " %8.4E", yy);  /* debug printout */
-    return(yy);    
- }
-
-/*********************************************************************
- * IEEE_TO_REAL - convert IEEE 4-byte real to local floating pt.     *
- *********************************************************************/
-#define FLMASK 0x7F800000
- float ieee_to_real(x, iflg)
- char *x;
- int *iflg;       /* iflg=1 if NaN or infinity, else 0 */
- {
-    float xx;
-    long *ll, xl;
-    int i;
-    char *cb;
-
-    for(i=0,cb=(char *)&xx; i<4; i++)  *cb++ = x[i];
-
-    ll = (long *) &xx;
-    *iflg = 0;
-    xl = *ll;
-    if( (xl&FLMASK)==FLMASK) 
-    {  *iflg = 1;                  /* check for Inf or NaN */
-       (*ll) = FLMASK;          /* set to +Inf   */
-    }
-    else  if ( (xl&FLMASK)==0)    /* check for IEEE zero */
-          {  xx = 0.0;
-             return(xx);
-          }
-    /* fprintf(logfile,"\nIEEE2REAL: %8.4E, %10x ",
-            xx, xl); */
-    return(xx);
- }
-
-/*********************************************************************
- * REAL_TO_IEEE_ - convert local real to 4-byte IEEE.                *
- *********************************************************************/
- real_to_ieee(r,a, iflg)  /* put local real into IEEE form */
-float r;
-char *a;
-int iflg;                  /* iflg=1 indicates invalid data */
-{
-   long *xx;
-   char *cf;
-   float xf;
-   int i;
-
-   xx = (long *)&xf;
-   xf = r;
-
-   if(iflg!=0)
-       *xx = 0xFFFFFFFF;    /* set IEEE all bits on for invalid data */
-
-   for(i=0, cf=(char *)xx; i<4; i++)  a[i] = *cf++;
-}
-
-/*********************************************************************
- * IEEE_TO_INT - convert IEEE 2-byte integer to local short integer. *
- *********************************************************************/
- short ieee_to_int(x, iflg)
- short *x;
- int *iflg;
- {
-    *iflg = 0;
-    if( (*x & 0x8000) == 0x8000)  *iflg = 1;
-    return(*x);
- }
-
-/*********************************************************************
- * INT_TO_IEEE_ - convert local integer to 2-byte IEEE.              *
- *********************************************************************/
- int_to_ieee(r,a, iflg)  /* put local real into IEEE form */
-short r,*a;
-int iflg;
-{
-   /* local integer is IEEE, so this is easy. */
-
-   *a = r;
-
-  /* if invalid, set to -32768 */
-   if(iflg==1)   *a = 0x8000;
-}
-
-/*********************************************************************
- * DUB_TO_IEEE - convert local double to IEEE 8-byte double.         *
- *   d is the local double;  a is address where IEEE form is put.    *
- *   iflg=0 indicates d is valid number; iflg=1 means it is invalid. *
- *   If iflg=1, uof tells what to use as invalid value.              *
- *    uof=0 means set output value to Infinity (0x7FF00000, 00000000)*
- *    uof=1 means set output to -Nan (0xFFFFFFFF,FFFFFFFF)           *
- *   The UNIPOPS record uses Inf, FITS uses -NaN.                    *
- *  (Note: when compiling on the MacIntosh in Think-C, do not set    *
- *   the 68881 compiler switch.)                                     *
- *********************************************************************/
- dub_to_ieee(d,a, iflg, uof)
-double d;
-unsigned long a[];
-int iflg, uof;            
-{
-     int iexp;
-     unsigned long p1,p2, signbit, pexp, *uu;
-     double xx,yy,z20,z52,zz;
-
-#ifdef THINK_C   /* but not so much fun for MacIntoshes */
-     if(d<0.0) {   signbit=0x80000000;  xx = -d; }
-     else      {   signbit=0;           xx = d;  }
-     
-     yy = log(xx)/log((double)2.0);  /* get exponent */
-     iexp = yy;
-     zz = iexp;
-     pexp = yy + 1023;
-     pexp = pexp*1048576;
-     pexp = (pexp & 0x7FF00000) | signbit;
-     
-     xx /= pow((double)2.0, zz);
-     xx--;
-     z20 = xx * pow((double)2.0, (double)20.0); /* hi-order 20 bits */
-     p1  = z20;
-     z52 = xx * pow((double)2.0, (double)52.0);
-     zz  = z52 - p1*pow((double)2.0, (double)32.0); /* lo-order 32 bits */
-     p2  = zz;
-     
-     a[0] = (p1&0x000FFFFF) | pexp;
-     a[1] = p2;
-     
-#else
-   /* for SUN and MASSCOMPS, this is easy.  */
-    xx = d;
-    uu = (unsigned long *)&xx;
-    a[0] = uu[0];  a[1] = uu[1];
-#endif
-   if(iflg==1)              /* set invalid data values */
-   {  if(uof==1)
-      { a[0] = 0xFFFFFFFF;   /* set all bits on for FITS invalid data   */
-        a[1] = 0xFFFFFFFF;
-      }
-      else
-      { a[0] = 0x7FF00000;   /* set IEEE Infinity for UNIPOPS bad data  */
-        a[1] = 0;
-      }
-   }
-}  /*****end of dub_to_ieee************************************/
-
-
-/***************************************************************/
-form_size(c)  /* get width of format, depending on code letter */
-char c;
-{
-    int wid;
-    
-    switch(c)
-    {   case 'A' :  wid=1;  break;  /* ASCII string   */
-        case 'I' :  wid=2;  break;  /* 16-bit integer */
-        case 'E' :  wid=4;  break;  /* IEEE float     */
-        case 'D' :  wid=8;  break;  /* IEEE double    */
-        
-        default : wid=0;
-     }
-     return(wid);
-}
-
diff -uNr 3.5/utilities/fits/setkw.h unipops-3.6/utilities/fits/setkw.h
--- 3.5/utilities/fits/setkw.h	2000-03-16 11:31:04.000000000 -0700
+++ unipops-3.6/utilities/fits/setkw.h	1969-12-31 17:00:00.000000000 -0700
@@ -1,133 +0,0 @@
-/*  @(#)setkw.h	5.1 06/22/94	*/
-/* kw[i] holds the names and types of all keywords that this      */
-/*  program recognizes.                                           */
-
-/*  Keywords with no value, ie, "END" or "HIERARCH" are viewed in */
-/*  this program as having a logical value of true if they appear.*/
-/*  An axis name ending in "#" means an axis name, in which "#"   */
-/*    may take values from 1-999.                                 */
-
-/* status = 1 if found in input file, =0 otherwise.               */
-/* type:  0=logical, 1=integer, 2=real, 3=characters              */
-/* maxi = max allowed axis index                                  */
-/* no   = number of values expected (=1 unless complex number)    */
-/* func = pointer to function to call when keyword is encountered.*/
-
-struct keyword kw[] = 
-/*  keyword    status type maxi  no    func  */
-{   "END",        0,    0,  0,    1,    0,   /* (0) fundamental words */
-    "SIMPLE",     0,    0,  0,    1,    0,   /*  1                    */
-    "BITPIX",     0,    1,  0,    1,    0,   /*  2                    */
-    "NAXIS",      0,    1,  0,    1,    0,   /*  3                    */
-    "NAXIS#",     0,    1, 99,    1,    0,   /*  4                    */   
-    "BLOCKED",    0,    0,  0,    1,    0,   /*  5                    */   
-    "BSCALE",     0,    2,  0,    1,    0,   /*  6                    */
-    "BZERO",      0,    2,  0,    1,    0,   /*  7                    */
-    "BUNIT",      0,    3,  0,    1,    0,   /*  8                    */
-    "BLANK",      0,    1,  0,    1,    0,   /*  9                    */
-    "OBJECT",     0,    3,  0,    1,    0,   /* 10                    */
-    "DATE",       0,    3,  0,    1,    0,   /* 11                    */
-    "DATE-OBS",   0,    3,  0,    1,    0,   /* 12                    */
-    "ORIGIN",     0,    3,  0,    1,    0,   /* 13                    */
-    "INSTRUME",   0,    3,  0,    1,    0,   /* 14                    */
-    "TELESCOP",   0,    3,  0,    1,    0,   /* 15                    */
-    "OBSERVER",   0,    3,  0,    1,    0,   /* 16                    */
-    "COMMENT",    0,    3,  0,    1,    0,   /* 17                    */
-    "HISTORY",    0,    3,  0,    1,    0,   /* 18                    */
-    "        ",   0,    3,  0,    1,    0,   /* 19                    */
-    "CRVAL#",     0,    2, 99,    1,    0,   /* (20)   axis descriptions */
-    "CRPIX#",     0,    2, 99,    1,    0,   /* 21                    */
-    "CDELT#",     0,    2, 99,    1,    0,   /* 22                    */
-    "CTYPE#",     0,    3, 99,    1,    0,   /* 23                    */ 
-    "CROTA#",     0,    2, 99,    1,    0,   /* 24                    */
-    "DATAMIN",    0,    2,  0,    1,    0,   /* 25                    */
-    "DATAMAX",    0,    2,  0,    1,    0,   /* 26                    */
-    "EPOCH",      0,    2,  0,    1,    0,   /* 27                    */
-    "GROUPS",     0,    0,  0,    1,    0,   /* (28)  Random Groups   */
-    "PCOUNT",     0,    1,  0,    1,    0,   /* 29                    */ 
-    "GCOUNT",     0,    1,  0,    1,    0,   /* 30                    */ 
-    "PTYPE#",     0,    3, 99,    1,    0,   /*   Random axes      */
-    "PSCAL#",     0,    2, 99,    1,    0,   /* 32                    */  
-    "GZERO#",     0,    2, 99,    1,    0,   /* 33                    */  
-    "EXTEND",     0,    0,  0,    1,    0,   /* (34) Tables extensions */
-    "XTENSION",   0,    3,  0,    1,    0,   /* 35                    */  
-    "EXTNAME",    0,    3,  0,    1,    0,   /* 36                    */  
-    "EXTVER",     0,    1,  0,    1,    0,   /* 37                    */  
-    "EXTLEVEL",   0,    1,  0,    1,    0,   /* 38                    */  
-    "TFIELDS",    0,    1,  0,    1,    0,   /* 39                    */  
-    "TFORM#",     0,    3,999,    1,    0,   /* 40                    */  
-    "TTYPE#",     0,    3,999,    1,    0,   /* 41                    */  
-    "TUNIT#",     0,    3,999,    1,    0,   /* 42                    */  
-    "TNULL#",     0,    3,999,    1,    0,   /* 43                    */  
-    "TBCOL#",     0,    1,999,    1,    0,   /* 44                    */  
-    "TSCAL#",     0,    2,999,    1,    0,   /* 45                    */  
-    "TZERO#",     0,    2,999,    1,    0,   /* 46                    */  
-    "AUTHOR",     0,    3,  0,    1,    0,   /* 47                    */  
-    "REFERENC",   0,    3,  0,    1,    0,   /* 48                    */  
-    "NMATRIX",    0,    1,  0,    1,    0,   /* S.D. binary tables    */
-    "MAXIS",      0,    1,  0,    1,    0,   /* 50                    */  
-    "MAXIS#",     0,    1,999,    1,    0,   /* 51                    */  
-    "TMATX#",     0,    0,999,    1,    0,   /* 52                    */  
-    "TDIM#",      0,    3,999,    1,    0,   /* 53                    */  
-    "HIERARCH",   0,    0,  0,    1,    0,   /* hierarchical classes  */
-    "SINGLDSH",   0,    0,  0,    1,    0,   /* 55                    */  
-    "TIME",       0,    2,  0,    1,    0,   /* SD core keywords      */
-    "MOLECULE",   0,    3,  0,    1,    0,   /* 57                    */  
-    "TRANSITI",   0,    3,  0,    1,    0,   /* 58                    */  
-    "LINE",       0,    3,  0,    1,    0,   /* 59                    */
-    "PROJID",     0,    3,  0,    1,    0,   /* SD shared keywords    */
-    "OBSID",      0,    3,  0,    1,    0,   /* 61                    */  
-    "SCAN",       0,    2,  0,    1,    0,   /*   scan number(real)   */
-    "SCAN-NUM",   0,    2,  0,    1,    0,   /*   scan number(real)   */
-    "DATE-RED",   0,    3,  0,    1,    0,
-    "OBSMODE",    0,    3,  0,    1,    0,
-    "TEMPSCAL",   0,    3,  0,    1,    0,
-    "FRONTEND",   0,    3,  0,    1,    0,
-    "BACKEND",    0,    3,  0,    1,    0,
-    "TCAL",       0,    2,  0,    1,    0,
-    "THOT",       0,    2,  0,    1,    0,
-    "TRX",        0,    2,  0,    1,    0,
-    "TSYS",       0,    2,  0,    1,    0,
-    "VELDEF",     0,    3,  0,    1,    0,
-    "RVSYS",      0,    2,  0,    1,    0,
-    "VELO",       0,    2,  0,    1,    0,
-    "VELOCITY",   0,    2,  0,    1,    0,
-    "DELTAV",     0,    2,  0,    1,    0,
-    "OBSFREQ",    0,    2,  0,    1,    0,
-    "IMAGFREQ",   0,    2,  0,    1,    0,
-    "FREQRES",    0,    2,  0,    1,    0,
-    "RESTFREQ",   0,    2,  0,    1,    0,
-    "BANDWIDT",   0,    2,  0,    1,    0,
-    "LST",        0,    2,  0,    1,    0,
-    "UT",         0,    2,  0,    1,    0,
-    "OBSTIME",    0,    2,  0,    1,    0, /* integration time */
-    "EXPOSURE",   0,    2,  0,    1,    0, /* integration time */
-    "AZIMUTH",    0,    2,  0,    1,    0,
-    "ELEVATIO",   0,    2,  0,    1,    0,
-    "TAU",        0,    2,  0,    1,    0, /* atmos.opacity     */
-    "TAU-ATM",    0,    2,  0,    1,    0, /* atmos.opacity     */
-    "TAUIMAGE",   0,    2,  0,    1,    0,
-    "TAUZENIT",   0,    2,  0,    1,    0,
-    "HUMIDITY",   0,    2,  0,    1,    0, /* weather data      */
-    "TAMBIENT",   0,    2,  0,    1,    0,
-    "TOUTSIDE",   0,    2,  0,    1,    0,
-    "PRESSURE",   0,    2,  0,    1,    0,
-    "DEWPOINT",   0,    2,  0,    1,    0,
-    "WINDSPEE",   0,    2,  0,    1,    0,
-    "WINDDIRE",   0,    2,  0,    1,    0,
-    "BEAMEFF",    0,    2,  0,    1,    0, /* tel.efficiencies  */
-    "APEREFF",    0,    2,  0,    1,    0,
-    "FORWEFF",    0,    2,  0,    1,    0,
-    "ETAL",       0,    2,  0,    1,    0, /* rear spillover    */
-    "ETAFSS",     0,    2,  0,    1,    0, /* forward spillover */
-    "ANTGAIN",    0,    2,  0,    1,    0,
-    "BEAMWIDT",   0,    2,  0,    1,    0, /* antenna beam width */
-    "BMAJ",       0,    2,  0,    1,    0, /* tel. beam         */
-    "BMIN",       0,    2,  0,    1,    0,
-    "BPA",        0,    2,  0,    1,    0,
-    "SITELONG",   0,    2,  0,    1,    0, /* geographic loc.   */
-    "SITELAT",    0,    2,  0,    1,    0,
-    "SITEELEV",   0,    2,  0,    1,    0,
-    "EQUINOX",    0,    2,  0,    1,    0, /* coordinate equinox */
-    "NPHASE",     0,    1,  0,    1,    0  /* number of obs phases */
-} ;
diff -uNr 3.5/utilities/fits/u2f.c unipops-3.6/utilities/fits/u2f.c
--- 3.5/utilities/fits/u2f.c	2000-03-16 11:30:57.000000000 -0700
+++ unipops-3.6/utilities/fits/u2f.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,345 +0,0 @@
-/*  @(#)u2f.c	5.3 04/23/98	*/
-/********************************************************************
- * u2f  - Main program for conversion of UNIPOPS IEEE format        *
- *       to FITS binary table.                                      *
- *  If u2f is typed with no command line arguments, or followed by  *
- *     "?" or "help", a USAGE message is written on stderr.         * 
- *  Command line parameters are:                                    *
- *     -L, -C          (required)  select line or continuum.        *
- *     -s scan1 scan2  (optional)  select scan number range.        *
- *     -n maxrecs      (optional)  maximum records per table.       *
- *     -t maxWscan     (optional)  #points at which to truncate scan*
- *     -v, -f          (optional) velocity or freq of 1st axis(line)*
- *     -prev           (optional) preview SDD file, output to stdout*
- *                                consists of maxrecs and maxWscan  *
- *     -y2k            (optional) force write of Y2K compliant FITS *
- *                                dates before 1999, useful for     *
- *                                debugging only                    *
- ******************************************************************** 
- *  The input file is standard input, a UNIPOPS format file.        *
- *  The output file is standard output, a FITS binary table.        *
- *  A log file is appended, "u2f.log"                               *
- ********************************************************************
- *  Note that if the "-n maxrecs" option is NOT used,  the binary   *
- *    FITS table is first written to a scratch file.  When the end  *
- *    of the input is reached, the program writes the headers and   *
- *    binary table to standard output.                              * 
- *  If the "-n maxrecs" option IS used, the output file is generated*
- *    directly onto standard output; no scratch file is written.    *
- *    Each table has maxrecs records (except for the last one, which*
- *    may be shorter.  Each header will indicate that there are     *
- *    maxrecs records, however.                                     *  
- ********************************************************************
- * Modifications:                                                   *
- *   Aug 30, 1991, ver 1.0 - adjust header columns in which "=" sign*
- *    goes, have all variables end in col. 30,                      *
- *    Put BLOCKED after EXTEND in main header. (in U2f_trans)       *   
- *   Feb 17, 1992. ver 1.1 - fix in utrans.c so that width of table *
- *    row (maxTwid) is the size of the row with the largest scan,   *
- *    and not any larger.                                           *
- ********************************************************************/
-#include <math.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-#include <stdio.h>
-
-#ifdef THINK_C
- #include <stdlib.h>
- #include <console.h>
-#endif
-
-#include "unipops.h"
-#include "u2fglob.h"      /* load global declarations */
-
-char Origin[40]  = {"UniPOPS u2f/1.5    "};
-char version[40] = {"u2f version 1.5 (22Apr98)"};
-
-/* User option parameters  */
-
-double scan1, scan2;     /*  scan number range                    */
-int qcont;               /*  qcont=0 for line, =1 for continuum   */
-int maxrecs;             /*  max allowed records in a file        */
-int maxWscan;            /*  truncate scan to maxWscan points     */
-int qvof;                /*  axis options:  qvof=0 to use velocity axis; 
-                                 =1 for frequency.                */
-int prev;                /* =1 if preview mode, else 0            */
-int y2k;                 /* =1 to force y2k FITS dates before 1999 */
-/*  log file  */
-
-char logname[16]  = {"u2f.log"};   /* u2f.log file records log data */
-FILE *logfile;        
-int logflag;    
-
-/* temp file */
-char tmpname[80];
-int tmpfileflag, tmpfid;   
-
-/* binary table temp buffer pointers */
-char  *tbuf;             /* buffer for FITS binary table rows      */
-int    tbufflag;
-int    ircvr;           /* for compatibility with rfits */
-
-/* header buffer pointers */
-int hbufflag, ttflag;             /* =1 when buffers are allocated  */
-int Ntrans, Twidth, Tfields;
-int ScanWid, ScanMult;            /* describe scan data matrix      */
-int maxTwid;
-int MHnlines, THnlines, THtotal;
-TRANS_TABLE *tt;                  /* translation table              */
-HEAD_TABLE  *mh;                  /* structure for main file header */
-HEAD_TABLE  *th;                  /* structure for table header     */
-
-/* space for UNIPOPS buffer */
-char *ubuf;
-long upnt[16];
-int ubufflag;
-UPOPS up;
-
-/* global vars that need to be declared here, but are not actually   */
-/* used by u2f, just f2u */
-double freqres, restfreq, dsf, nt;
-
-/*  today's date  */
-  time_t *caltime, cltime;
-  char *today, rundate[16];
-  struct tm *ltime;             /* local time structure */
-
-/*********************************************************************
- * MAIN starts here                                                  *
- *********************************************************************/
-main(argc,argv)
-int argc;
-char *argv[];
-{
-  /* get present date, time.                  */
-    
-    cltime = time(caltime);  today=ctime(&cltime);
-
-    fprintf(stderr,"\n%s,  run: %s",version,today);
-  
-   /* conditional compilation if MAC THINK-C version  */
-#ifdef THINK_C
-  argc = ccommand(&argv);      /*  use this for MAC Think-C version */ 
-#endif
-          
-    logflag  = tmpfileflag = 0;
-    hbufflag = 0;
-    tbufflag = 0;
-    ubufflag = 0;
-    
-    /*  get parameters from command line.  */       
-  
-    getparams(argc,argv); 
-
-    /* translate the local time into a form for use in FITS */
-    /* use the new form if after 1998, unless the y2k flag is set */
-    /* in which case always use the new form */
-    ltime = localtime(&cltime);
-    if (y2k || ltime->tm_year > 98) {
-      /* set the y2k flag here no matter what - used elsewhere to 
-       * determine the form of other DATE outputs */
-      y2k = 1;
-      sprintf(rundate,"%04d-%02d-%02d",(ltime->tm_year+1900), (ltime->tm_mon+1),
-	      ltime->tm_mday);
-    } else {
-      sprintf(rundate,"%02d/%02d/%02d",ltime->tm_mday,(ltime->tm_mon+1),
-	      ltime->tm_year);
-    }
-
-    /*  create log file and type greetings */
-    
-    openlog();
-
-    /*  initialize translation table                              */
-    
-    if (prev != 1) inittrans(qcont, "U2f", 0);
-    
-    /*   read and select data, send FITS file to stdout.          */
-    
-    getdata();
-
-
- /* close files and free up memory buffers. */
-     closem();  /* close all other files and free up memory */
-
-    if(logflag==1)
-    {  fprintf(logfile,"\nwfits ends ok.\n");
-       fclose(logfile);
-    }
-    
-    return(0);
-}
-/*********************************************************************
- * END OF MAIN                                                       *
- *********************************************************************/
-
-
-
-/***************************************************************
- * ERREXIT - print error message and exit.                     *
- ***************************************************************/
-errexit(s)
-char *s;
-{
-    perror(s);  /* print message and UNIX error code, if any */
-
- /* close files, if open */
-     closem();  /* close all other files and free up memory */
-
- /* put goodbye message in the log file and close it. */
-    if(logflag==1)
-    {  fprintf(logfile,"\n%s\n u2f bombs!\n",s);
-       fclose(logfile);
-     }
-     exit(0);  /* quit wfits, go back to the UNIX shell */
-}
-
-/*****************************************************************
- * CLOSEM - close all open files and release memory space.       *
- *    this is done by main program on normal exit, or by         *
- *    errexit if abnormal exit.                                  *
- *****************************************************************/
-closem()
-{
-    char st[36];
-    int sysreturn;
-
-    if(tmpfileflag==1)
-    {   close(tmpfid);
-#ifndef THINK_C
-       sprintf(st,"rm -f %s",tmpname);
-        sysreturn=system(st);  /* delete temporary file */
-        fprintf(logfile,"\nSystem: %s, status=%d",
-              st,sysreturn);
-#endif
-    }
-    
-    if(tbufflag==1)  free(tbuf);
-
-    if(hbufflag==1)    /* these were allocated in inittrans */
-    {   free(&tt);
-        free(&mh);
-        free(&th);
-    }
-    if(ubufflag==1) free(ubuf);
-}
-
-
-/*****************************************************************
- * GETPARAMS - get parameter from command line, or print         *
- *   usage message if no parameters, or word "help"              *
- *****************************************************************/
-getparams(argc,argv)
-int argc;
-char *argv[];
-{
-    int i, noprob, jprob;
-    
-   noprob=0;  jprob=0;
-   
-   while(noprob==0)    /*  give usage message if error, or no params */
-   {
-     if((argc<2)||(strcmp(argv[1],"help")==0)
-                ||(strcmp(argv[1],"HELP")==0)
-                ||(strcmp(argv[1],"Help")==0)
-                ||(strcmp(argv[1],"?")==0)
-                ||(jprob==1))
-     {
-        fprintf(stderr,"u2f: convert a UniPOPS file from std input to\n");
-        fprintf(stderr,"     a FITS binary table on std output.\n");
-        fprintf(stderr,"Usage:  u2f -L|C [-n max] [-t npts] [-v|-f]");
-        fprintf(stderr," [-s s1 s2] -y2k\n");
-        fprintf(stderr,"            -L -C    : select line, continuum.\n");
-        fprintf(stderr,"            -n max   : maximum records per FITS");
-        fprintf(stderr,"                       table.\n");
-        fprintf(stderr,"            -t npts  : truncate scan to length npts.\n");
-        fprintf(stderr,"            -s s1 s2 : scan number range.\n");
-        fprintf(stderr,"            -v : 1st axis is veloc; -f for frequency (line only).\n");
-	fprintf(stderr,"            -prev : preview mode.\n");
-	fprintf(stderr,"            -y2k : force y2k compliant FITS dates.\n");
-	fprintf(stderr,"                   This happens automatically after 1998.\n");
-        exit(0);
-      }     
-
-     /*  set default parameters  */
-     
-     jprob=1;
-     scan1 = scan2 = 0;  
- qcont = 0;          /* qcont=0 for line; =1 for continuum                */
- maxrecs = 0;        /* maxrecs=0 means put all records in one FITS table */
- maxWscan=0;         /* optional scan length truncation.                  */
-     qvof=1;         /* axis options  - default is FREQ */
-     prev=0;         /* preview mode is off by default */
-     y2k=0;          /* y2k mode is off by default */
-   
-     /*  inspect command line parameters  */ 
-    
-     for(i=1; i<argc; i++)
-     {   if(strcmp(argv[i],"-C")==0)  { qcont=1;  qvof=-1; noprob=1;  }
-         if(strcmp(argv[i],"-c")==0)  { qcont=1;  qvof=-1; noprob=1;  }
-         if(strcmp(argv[i],"-L")==0)  { qcont=0;  noprob=1;  }
-         if(strcmp(argv[i],"-l")==0)  { qcont=0;  noprob=1;  }
-         if(strcmp(argv[i],"-f")==0)  { qvof=1;   noprob=1;  }
-         if(strcmp(argv[i],"-v")==0)  { qvof=0;   noprob=1;  }
-         if(strcmp(argv[i],"-n")==0)  
-         {  i++;
-            if(i>=argc) { noprob=0; i=argc; break; } /* check parm missing */
-            maxrecs = atoi(argv[i]);
-         }
-         if(strcmp(argv[i],"-t")==0)  
-         {  i++;
-            if(i>=argc) { noprob=0; i=argc; break; }
-            maxWscan = atoi(argv[i]);
-         }
-         if(strcmp(argv[i],"-s")==0)
-         {  i++;
-            if(i>=argc) { noprob=0; i=argc; break; } 
-             scan1 = atof(argv[i]);
-            i++;
-            if(i>=argc) { noprob=0; i=argc; break; }
-             scan2 = atof(argv[i]);
-         }
-         if (strcmp(argv[i],"-prev")==0) { prev=1; noprob=1;}
-	 if (strcmp(argv[i],"-y2k")==0) { y2k=1;}
-     }
-   }    /*  end of while  */
-
-   /* simple error checks */
-   if(qcont!=0 && qvof!=-1) 
-   {   fprintf(stderr, "Warning: Continuum Data is incompatible with");
-       fprintf(stderr, "   frequency or velocity as the first axis.\n");
-   }
-   /*      exit(0);       */
-}
-/*********end of getparams****************************************************/
-
-
-/*****************************************************************************
- * OPENLOG - open log file and write initial log messages.                   *
- *****************************************************************************/
- openlog()
- {
-    char st[80];
-    
-    if((logfile=fopen(logname,"a"))==NULL)     /*  append to log file  */
-    {  sprintf(st,"u2f: error opening logfile: %s ",logname);
-       fflush(stdout);
-       perror(st);
-       exit(0);
-    }
-    logflag=1;
-  
-
-fprintf(logfile,"\n*********************************************************");
-    fprintf(logfile,"\n%s,  run: %s\n",version,today);
-    fprintf(logfile," u2f parameters: qcont=%d, maxrecs=%d, qvof=%d,",
-            qcont,maxrecs, qvof);
-    fprintf(logfile," scan1=%.0f, scan2=%.0f", scan1, scan2);
-    fprintf(logfile,"\n  maxWscan=%d ", maxWscan);
-    fprintf(logfile,"\n  Rundate: %s, Origin: %s ",rundate, Origin);
-    if (prev==1)
-	fprintf(logfile,"\n Preview mode, no FITS output will be generated.");
-}
-/************end of openlog**************************************************/
-
diff -uNr 3.5/utilities/fits/u2fglob.h unipops-3.6/utilities/fits/u2fglob.h
--- 3.5/utilities/fits/u2fglob.h	2000-03-16 11:30:57.000000000 -0700
+++ unipops-3.6/utilities/fits/u2fglob.h	1969-12-31 17:00:00.000000000 -0700
@@ -1,113 +0,0 @@
-/* Global variables for UNIPOPS IEEE to FITS translation program */
-
-/*   @(#)u2fglob.h	5.3 04/23/98   */
-
-/* FITS standard definitions */
-#define FITS_REC_LEN 2880       /* standard FITS logical record size */
-
-#define MAXTCOLS 70             /* max # columns in binary table     */
-#define MHLINES  12             /* max # lines in main FITS header   */
-#define THLINES 240             /* max # lines in FITS Table Header  */
-
-/* User option parameters  */
-
-extern double scan1, scan2;   /*  scan number range                    */
-extern int qcont;             /*  qcont=0 for line, =1 for continuum   */
-extern int maxrecs;           /*  max allowed records in a file        */
-extern int maxWscan;          /*  truncate scan to maxWscan points     */
-extern int qvof;              /*  qvof=0 if velocity is 1st axis, freq=1*/ 
-extern int prev;              /*  prev=1 if preview desired, no FITS then */
-extern int y2k;               /*  y2k=1 if force y2k compliant dates   */
-               
-/* operation flags */
-extern int nthead;           /* =1 if its time to make a new table header */
-extern int ftime;            /* =1 if first time thru                     */
-extern int kpflag;           /* =1 if kitt-peak (NRAO 12M) data, else =0  */
-extern int p11flag;          /* =1 if proto class 11 (PROTO12M), else = 0 */
-
-/*  log file  */
-
-extern FILE *logfile;        
-extern int logflag;       
-
-/* temporary file */
-extern char tmpname[80];
-extern int tmpfileflag, tmpfid;
-
-/* temporary binary table output buffer */
-extern char *tbuf;
-extern int   tbufflag;
-
-/*  today's date and version  */
-
-extern char *today, rundate[16];
-extern char Origin[];
-extern struct tm *ltime;             /* local time structure */
-
-
-/* Translation table structure */
-
-typedef struct trans_table
-{   char ttype[16];            /* FITS table column label                  */
-    char tunit[12];            /* FITS unit label                          */
-    int ncol;                  /* FITS table column number                 */
-    char kat[4];               /* kategory of keyword                      */
-    int opt;                   /* option: 0=always use, 1=freq ax; 2=vel.ax*/
-                               /*         3=sample ax; 4=time ax;          */
-                               /*         5=freq ax for cont data          */
-    int axis;                  /* if non-zero, matrix axis number          */
-    int mform;                 /* multiplicity of format                   */
-    char fform;                /* FITS binary format designator (I,E,D,A)  */
-    int foff;                  /* byte offset in FITS table row.           */
-    int uoff;                  /* byte offset in unipops record class      */
-    int ucl;                   /* Unipops class number                     */
-    int minf;                  /* multiplicity of input format             */
-    char inform;               /* input format designator                  */
-    char cfact[12];            /* name of conversion factor                */
-    double factor;             /* multiply by this to get FITS units       */
-    double offset;             /* constant offset to convert to FITS units */
-    int sflag;                 /* index of translation routine             */
-                               /*  -1 -> Header only - do not put in table */
-                               /*  -2 -> Header Comment line (not in table)*/
-                               /*   0 -> standard processing               */
-                               /*  >0 -> special routine for processing.   */
-    int (*fun)();              /* translation function                     */
-    char descr[66];            /* comment field of FITS header             */
- } TRANS_TABLE;
- 
- extern TRANS_TABLE *tt;
- extern int ttflag;
- 
- extern int Ntrans;              /* number of lines in table           */
- extern int Twidth;              /* width of FITS table row, in bytes  */
- extern int ScanWid;             /* bytes width of scan data matrix    */
- extern int ScanMult;            /* # points width scan data matrix    */
- extern int maxTwid;             /* min required table width for file  */
- extern int maxmaxis1;           /* max val of maxis1 for file         */
- extern float DATAmax, DATAmin;  /*  global max and min for scans      */
- 
- extern init_k2f_fun(), init_f2k_fun(); /* tt->fun initializations */
- 
-/* Structure for construction of the FITS headers. */
-
-typedef struct head_table
-{   char htext[82];            /* the entire 80-col line of header       */
-    int  icol[2];              /* col numbers at which to insert data.   */
-                               /*   =0 if nothing to be inserted.        */
-    int  iwid[2];              /* width of data to be inserted.          */
-    char kw[10];               /* name of keyword                        */
-}  HEAD_TABLE;
-extern int hbufflag;
-
-/* Main header lines */
-
- extern HEAD_TABLE *mh; 
- extern int MHnlines;         /* # lines in Main file header */
- 
-/* Table header lines */
- extern HEAD_TABLE *th;
- extern int THnlines;        /* # lines in Table header preamble.  */
- extern int THtotal;         /* total # lines in Table header      */
- 
- extern int Tfields;         /* number of table fields             */
-
diff -uNr 3.5/utilities/fits/udata.c unipops-3.6/utilities/fits/udata.c
--- 3.5/utilities/fits/udata.c	2000-03-16 11:30:59.000000000 -0700
+++ unipops-3.6/utilities/fits/udata.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,782 +0,0 @@
-/*  @(#)udata.c	5.4 04/23/98	*/
-/**************************************************************************
- * The UDATA module reads the data file from standard input and           *
- *   reformats it as a FITS binary table, directed by a translation table.*
- **************************************************************************/
-#include <math.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <time.h>
-
-#ifdef THINK_C
- #include <stdlib.h>
- #include <unix.h>
-#else 
-#include <sys/types.h>
-#include <sys/file.h>
-#endif
-
-#include "unipops.h"
-#include "u2fglob.h"
-
-/* more globals (see u2fglob.h) */
-long  siz_tbuf;          /* required size of binary table buffer   */
-long  OutCount;          /* count of table lines                   */
-int   maxmaxis1;         /* max val of maxis1 = fixed matrix wid   */
-extern int maxWscan;     /* truncated value of maxis1, user option */
-extern int ScanMult;
-int feednum;             /* current feed number (hidden in SCAN)   */
-int kpflag;              /* =1 if Kitt Peak data (NRAO 12M)        */
-int p11flag;             /* =1 if prototype class 11 (PROTO12M)    */
-
-float DATAmax, DATAmin;  /* max and min data values for whole file */
-
-char fitsbuf[FITS_REC_LEN];   /* output buffer for FITS file       */
-int  jfbuf;              /* pointer to char pos in fitsbuf         */
-int  FitCount;           /* number of fits records written         */
-long rrec;               /* selected record number - used in utrans */
-
-int Naxd, *axd;          /* dummy defns for compatibility with f2u */
-
-UNIAUX auxbuf;           /* buffer for auxiliary input data        */
-long upsize[16];         /* actual size of unipops class in bytes  */
-/*************start of getdata********************************************/
-getdata()
-{
-    long jread, qread, ipnt, itmp, usize;
-    int i;
-    unsigned int ntoread;
-    long recnum;
-    long headlen, datalen, buflen;
-    int ivf;                       /* floating validity flag */
-    char st[80], tmpstr[64];
-    float *fbf;
-    short *sbf;
-    double dtmp, ieee_to_dub();
-    
-    DATAmax = -1.0E30;  DATAmin = 1.0E30;
-    OutCount = 0;
-    FitCount = 0;
-    maxmaxis1 = 0;
-
-    up.ux = &auxbuf;   /* set pointer to unipops auxiliary buffer */
-    
-    /* make temp file for FITS table, if in non-real-time mode. */
-    if(maxrecs==0 && prev==0) create_temp();
-    /* create initial space for ubuf */
-    usize = 4096;
-    if((ubuf = (char *)malloc( usize ))==0)
-       errexit("GetData: cannot allocate space for ubuf!");
-    fprintf(logfile,"\nGetData: allocated for ubuf %ld bytes.", usize);
-    fflush(logfile);
-    ubufflag = 1;
-
-    recnum=rrec=0;
-    tbufflag=0;
-    qread=1;
-    ipnt=0;          /* pointer to next location in ubuf to be read */
-  /*----------------------------------------------------------------*/
-  /* read input UNIPOPS file from stdin until EOF                   */
-  /* one UNIPOPS record per loop                                    */
-  /*----------------------------------------------------------------*/
-    while(qread == 1)     /* qread set to zero by read error or EOF */
-    {
-     /* first read the header portion of the record */
-      if( (jread = read(0, ubuf, 32)) != 32)   { qread=0; continue; }
-      ipnt = 32;
-      sbf = (short *)ubuf;
-      /* set pointers array  - upnt is in units of bytes */
-       up.u0  = (UNICLASS0 *)ubuf;
-      /* Do some sanity checks on the values in class 0 */
-         if (up.u0->Nheadcls <= 0 || 
-             up.u0->Nheadcls >= 15 ||
-             up.u0->head_ptr[0] < 5) continue;
-      /*         Its not an error, just skip to next record */
-         upnt[0] = up.u0->Nheadcls;
-         fprintf(logfile, "\nUDATA: rec=%ld, #cls=%ld, ptr=",
-               recnum, upnt[0]);
-         fflush(logfile);
-         for(i=1; i<16; i++)   
-         {  upnt[i] = (up.u0->head_ptr[i-1] - 1) * 8 ;
-            fprintf(logfile, " %ld", upnt[i]);
-         }
-         fflush(logfile);
-
-      /* set pointers for UPOPS structure */
-        up.u1  = (UNICLASS1 *)(ubuf+upnt[1]);
-        up.u2  = (UNICLASS2 *)(ubuf+upnt[2]);
-        up.u3  = (UNICLASS3 *)(ubuf+upnt[3]);
-        up.u4  = (UNICLASS4 *)(ubuf+upnt[4]);
-        up.u5  = (UNICLASS5 *)(ubuf+upnt[5]);
-        up.u6  = (UNICLASS6 *)(ubuf+upnt[6]);
-        up.u7  = (UNICLASS7 *)(ubuf+upnt[7]);
-        up.u8  = (UNICLASS8 *)(ubuf+upnt[8]);
-        up.u9g = (UNICLASS9G *)(ubuf+upnt[9]);
-        up.u9k = (UNICLASS9K *)(ubuf+upnt[9]);
-        up.u10 = (UNICLASS10 *)(ubuf+upnt[10]);
-        up.u11 = (UNICLASS11 *)(ubuf+upnt[11]);
-        up.u11p = (UNICLASS11P *)(ubuf+upnt[11]);
-        up.u12 = (UNICLASS12 *)(ubuf+upnt[12]);
-        up.u13 = (UNICLASS13 *)(ubuf+upnt[13]);
-
-     /* get class 1 */
-      itmp = upnt[2];                  /* pointer to start of class 2 */
-      ntoread = itmp - ipnt;
-      if( (jread = read(0, (ubuf+ipnt), ntoread)) != ntoread)  
-      {  fprintf(logfile,"\nUdata: read problem1?  n= %d, read= %d ",
-                   ntoread, jread);
-         qread=0; continue;
-      }
-      ipnt += ntoread;
-      itmp = upnt[1];                         /* pointer to HEADLEN */
-      dtmp = ieee_to_dub( (ubuf+itmp), &ivf);    headlen = dtmp;
-      fprintf(logfile,"\nUDATA: Headlen = %8.4E ", dtmp);
-      dtmp = ieee_to_dub( (ubuf+itmp+8), &ivf);  datalen = dtmp;
-      fprintf(logfile,"\nUDATA: Datalen = %8.4E ", dtmp);
-      buflen = headlen + datalen;           /* total length of data record */
-      
-    /* buflen needs to be padded to the next multiple of 512 bytes */
-       if((buflen%512)>0)
-       {  itmp = buflen/512;
-          buflen = 512*(itmp+1);
-       }
-
-    /* make sure that unpt[i] point to valid things and upsize[i] is set */
-      if (upnt[15] <= 0) upnt[15] = headlen;
-      upsize[15] = headlen - upnt[15];
-      for (i=14;i>0;i--) {
-         if (upnt[i] <= 0) upnt[i] = upnt[i+1];
-         upsize[i] = upnt[i+1] - upnt[i];
-      }
-
-      up.series = (float *) (ubuf + headlen);  /* pntr to series data */
-      fprintf(logfile,"\nUdata: hdlen=%ld, datlen=%ld, buflen=%ld",
-               headlen, datalen, buflen);
-      fflush(logfile);
-
-     /* allocate more space if necessary */
-      if(buflen > usize)
-      {  if((ubuf = (char *)realloc(ubuf, buflen))==0)
-             errexit("GetData: cannot allocate more space for ubuf!");
-          fprintf(logfile,
-               "\nGetData: re-allocated for ubuf %ld bytes.", buflen);
-          usize = buflen;
-     /* Now we need to reposition the pointers that depend on ubuf */
-         sbf = (short *)ubuf;
-         up.u0 = (UNICLASS0 *)ubuf;
-         up.u1 = (UNICLASS1 *) (ubuf+upnt[1]);
-         up.u2 = (UNICLASS2 *) (ubuf+upnt[2]);
-         up.u3 = (UNICLASS3 *) (ubuf+upnt[3]);
-         up.u4 = (UNICLASS4 *) (ubuf+upnt[4]);
-         up.u5 = (UNICLASS5 *) (ubuf+upnt[5]);
-         up.u6 = (UNICLASS6 *) (ubuf+upnt[6]);
-         up.u7 = (UNICLASS7 *) (ubuf+upnt[7]);
-         up.u8 = (UNICLASS8 *) (ubuf+upnt[8]);
-         up.u9g = (UNICLASS9G *) (ubuf+upnt[9]);
-         up.u9k = (UNICLASS9K *) (ubuf+upnt[9]);
-         up.u10 = (UNICLASS10 *) (ubuf+upnt[10]);
-         up.u11 = (UNICLASS11 *) (ubuf+upnt[11]);
-         up.u11p = (UNICLASS11P *) (ubuf+upnt[11]);
-         up.u12 = (UNICLASS12 *) (ubuf+upnt[12]);
-         up.u13 = (UNICLASS13 *) (ubuf+upnt[13]);
-         up.series = (float *) (ubuf + headlen);
-      }
-     /* now read the remainder of the record */
-     /* allow repeated reads from std input to allow pipelines */
-      while( (ntoread = buflen - ipnt) > 0)
-      {  if( (jread = read(0, (ubuf+ipnt), ntoread)) <= 0)  
-         {   sprintf(tmpstr, "Udata: read problem2?  n= %d, read= %d ",
-                      ntoread, jread);
-             qread=0;
-             errexit(tmpstr);
-          }
-          ipnt += jread;
-       }
-       recnum++;
-       if(dselect(&up,recnum)==1)    /* is it within selection range? */
-       {  rrec++;
-          get_hdr_dat(&up);  /* decode various parameters from the input rec */
-   
-          /* initialize the max and min values */
-              up.ux->datamax = -1.0E30;   up.ux->datamin = 1.0E30; 
-          
-         L_pre_scan(&up);   /* pre-process scan, whether line or cont. */  
-
-       /* if preview mode continue with while */
-         if (prev==1) continue;
-                       
-      /* allocate and zero the tbuf  */
-
-          siz_tbuf = Twidth ;
-  
-         if( (tbuf=(char *)calloc(siz_tbuf, (long)1) )==NULL) 
-          {  sprintf(st,"Can't allocate tbuf, need %d bytes",siz_tbuf);
-             errexit(st);
-          } 
-          tbufflag=1;
-     
-        /* loop thru all items in translation table  */
-    
-          for(i=0; i<Ntrans; i++)
-             translate(i,ubuf,tbuf);          /* Lscan_u2f adjusts maxTwid */
-           
-         /*  fprintf(logfile,"\nmaxTwid=%d ",maxTwid); */
-          
-          if(ftime==1)  do_file_head();  /* fill and write file header */
-          ftime=0;
-          
-          if(nthead==1)                   /* make table header */
-          {   fill_Thead(); 
-              nthead=0;
-              
-              /* if maxrecs>0, write header to std out */
-              if(maxrecs>0) write_Thead();
-           } 
-          write_rec(tbuf);                /* write to temp file or std out */
- 
-          if(tbufflag==1)  {  free(tbuf);  tbufflag=0; }
-       }
-    }  /***** done reading input UNIPOPS file ****************************/
-    
-    fprintf(logfile,"\nRead %ld records from std in; %ld selected. ",
-                   recnum,rrec);
-    fflush(logfile);
-    
-    if(rrec<1) errexit("WARNING:  NO DATA SELECTED FROM INPUT FILE!!");
-    
-    if (prev==0) finish_output();             /* finish writing std out  */  
-    
-    fprintf(logfile,"\nWrote %ld table rows, %d fits records.",
-       OutCount, FitCount);
-    fflush(logfile);
-    fprintf(stderr,"Wrote %ld scans out of %ld; %d fits records written. \n",
-          OutCount, recnum, FitCount);
-    /* if preview mode, put out final statistics */
-    if (prev==1)
-	fprintf(stdout,"maxLength(-t) %d maxRecords(-n) %d\n",maxmaxis1, rrec);
-}   /*******end of getdata***********************************************/
-
-
-/************************************************************************
- * CREATE_TEMP - makes a temporary file for the binary table, if not in *
- *   real-time mode.                                                    *
- ************************************************************************/
-create_temp()
-{
-   char st[80];
-   
-   if(maxrecs==0)    /* create file only if maxrecs==0 */
-   {   
-       /* create temp file name */
-       sprintf(tmpname,".%d%d%d%d.ftmp",ltime->tm_mday,ltime->tm_hour,
-         ltime->tm_min,ltime->tm_sec);
-       
-       fprintf(logfile,"\nCreate_Temp: file= %s ",tmpname);
-       
-       /* open file name */
-       if((tmpfid=open(tmpname,(O_RDWR|O_CREAT|O_TRUNC))) <2)
-       {  sprintf(st,"Cannot create temp file: %s ",tmpname);
-          errexit(st);
-       }
-       tmpfileflag = 1;
-   }
-}
-
-
-/**********************************************************************
- * DSELECT - return 1 if scan selected, 0 if not.                     *
- *   Applies selection criteria specified on command line.            *
- *   checks if scan number is within range.                           *
- *  Line and continuum are allowed to be mixed if "-LC" option.       *
- *  Do NOT select LINEOTF scans                                       *
- **********************************************************************/
-dselect(k,recnum)
-UPOPS *k;
-long recnum;
-{
-   char mode[12];
-   
-   strncpy(mode, k->u1->obsmode, (long)8);
-   mode[8]=0;
-
-   fprintf(logfile,"\nDSelect: rec=%ld, obsmode= %s, scan#= %11.2lf, qcont=%d ",
-           recnum, mode, k->u1->scan, qcont);
-   fflush(logfile);
-
-   /* reject LINEOTF scans from NRAO 12M */
-   if ((strncmp(k->u1->obsmode,"LINEOTF ",(long)8)==0) &&
-       (strncmp(k->u1->telescop,"NRAO 12M",(long)8)==0)) {
-      fprintf(logfile,"\nDSelect: unable to convert LINEOTF data at this time");
-      return(0);
-   }
-
-   /*  reject non-line record if qcont==0  */
-   if((qcont==0)&&(strncmp(k->u1->obsmode,"LINE",(long)4)!=0) )
-      return(0);
-      
-   /*  reject non-continuum record if qcont==1  */
-   if((qcont==1)&&(strncmp(k->u1->obsmode,"CONT",(long)4)!=0) )
-       return(0);
-          
-   if((scan1!=0)||(scan2!=0))    /* check scan num range ? */
-      if((k->u1->scan<scan1)
-       ||(k->u1->scan>= (scan2+1) ))  return(0);
-       
-   return(1);
- }   /**********end of dselect*************************************/
- 
-
-
-/**********************************************************************
- * GET_HDR_DAT - get header items and other special parameters        *
- *    from the input structure.                                       *
- **********************************************************************/
-get_hdr_dat(k)
-UPOPS *k;
-{
-     long dd,mm,yy, mmdd;
-     
-     strncpy(k->ux->sourcename, k->u1->object, (long)SNAMLEN);
-     k->ux->sourcename[SNAMLEN]=0;
-     strncpy(k->ux->obsname,    k->u1->observer, (long)ONAMLEN);
-     k->ux->obsname[ONAMLEN]=0;
-     strncpy(k->ux->projcode,   k->u1->projid, (long)PRCODE);
-     k->ux->projcode[PRCODE]=0;
-     strncpy(k->ux->tele,       k->u1->telescop, (long)8);
-     k->ux->tele[8] = 0;
-     
-   /* determine if kitt peak data or not */
-     if((strncmp(k->ux->tele,"NRAO12M",(long)8)==0)
-      ||(strncmp(k->ux->tele,"NRAO 12M",(long)8)==0))  kpflag=1;
-     else  kpflag=0;
-
-  /* determine if prototype class 11 or not */
-     if (strncmp(k->u3->cl11type,"PROTO12M",(long)8)==0) p11flag=1;
-     else p11flag=0;
-          
-  /*  change utdate to FITS-type DATE-OBS */
-     yy = k->u3->utdate;
-     mmdd = (k->u3->utdate - yy)*10000. + .48;
-     mm = mmdd/100;
-     dd = mmdd % 100;
-     if (y2k) {
-       /* use the new Y2K form */
-       sprintf(k->ux->dateobs, "%04ld-%02ld-%02ld", yy,mm,dd);
-     } else {
-       /* use the original DATE form */
-       yy -= 1900;
-       sprintf(k->ux->dateobs, "%02ld/%02ld/%02ld",dd,mm,yy);
-     }
-     
-     fflush(logfile);
-     
-}  /******end of get_hdr_dat*******************************************/
-
-
-
-/***********************************************************************
- * DO_FILE_HEAD - make main file FITS header; write to std out.        *
- *   This gives standard header info, including                        *
- *      Origin, Date file written.                                     *
- ***********************************************************************/
- do_file_head()
- {
-     int i;
-     
-     initfits(' ');
-     
-     puthead(mh,0, "ORIGIN", Origin,  MHnlines);
-     puthead(mh,0, "DATE",   rundate, MHnlines);
-     
-     for(i=0; i<MHnlines; i++)
-     {
-        stuffits(80,(mh+i)->htext, ' ');
-     }
-    
-     stuffits(3,"END", ' ');     /* add END card to main header    */
-     
-    /* now let's send it to standard output                        */
-    flushfits(' ');
-    
- } /****end of do_file_head******************************************/
- 
- 
- /*********************************************************************
-  * STUFFITS - put n characters from st into fitsbuf                  *
-  *********************************************************************/
- stuffits(n,st, ch)
- char *st, ch;
- int n;
- {     
-     int i;
-     
-     for(i=0; i<n; i++, jfbuf++)
-     {           
-       /* check whether buffer is full */
-         if(jfbuf>=FITS_REC_LEN)  flushfits(ch);
-         
-         fitsbuf[jfbuf] = st[i];
-     }
- } /***end of stuff_fits*********************************************/
- 
- 
- /********************************************************************
-  * FLUSHFITS - empty FITS output buffer and fill buffer with char c *
-  ********************************************************************/
-  flushfits(c)
-  char c;
-  {
-      int j;
-      
-      if( write(1,fitsbuf, (long)FITS_REC_LEN) == -1)
-         errexit("Error writing FITS record to stdout.");
-         
-       FitCount++;
-   /*  fprintf(logfile,"\nWrote FITS rec# %d to stdout", FitCount); */
-       initfits(c);
-   }
-   
-   
- /********************************************************************
-  * INITFITS - set FITS buffer to character c, set jfbuf=0           *
-  ********************************************************************/
-  initfits(c)
-  char c;
-  {
-      int j;
-      
-      for(j=0; j<FITS_REC_LEN; j++)  fitsbuf[j] = c;
-      jfbuf=0;
-  }
-      
-   
-/**********************************************************************
- * PUTHEAD - put string st into header line with kw="key"             *
- **********************************************************************/
- puthead(hd, mm, key, st, max)
- HEAD_TABLE *hd;
- char *key, *st;
- int max,mm;
- {
-     int i, jj, len, j, nn;
-     
-     len = strlen(st);
-     
-     for(i=0; i<max; i++)
-     {   if(strcmp((hd+i)->kw,key)==0)
-         {   jj = (hd+i)->icol[mm];
-             nn = (hd+i)->iwid[mm];
-             for(j=0; j<nn; j++, jj++)
-                 /* if st is empty, blank out the space anyway */
-             {   if(j>=len)  (hd+i)->htext[jj] = ' ';
-                 else        (hd+i)->htext[jj] = st[j];
-             }
-          }
-      }
- }
- 
-    
- /********************************************************************
-  * FILL_THEAD - build Table header in hbuf.                         *
-  ********************************************************************/
- fill_Thead()
- {
-     char st[80], snam[12];
-     int maxis;
- 
-     sprintf(st,"%5d",Twidth);
-     puthead(th,0, "NAXIS1",   st,           THnlines);
-     sprintf(st,"%5d",maxrecs);
-     puthead(th,0, "NAXIS2",   st,           THnlines);
-     sprintf(st,"%5d", Tfields);
-     puthead(th,0, "TFIELDS",  st,           THnlines);
-     puthead(th,0, "TELESCOP", up.ux->tele,       THnlines);
-     puthead(th,0, "OBJECT",   up.ux->sourcename, THnlines);
-     puthead(th,0, "OBSERVER", up.ux->obsname,    THnlines);
-     puthead(th,0, "DATE-OBS", up.ux->dateobs,    THnlines);
-     sprintf(st,"%5.0f.",up.ux->time);
-     puthead(th,0, "TIME",     st,           THnlines);
-     
-  /* set MAXIS = 5   (5th axis ("reciever number") is used) */
-    maxis=5;
-    sprintf(st, "%4d", maxis);
-    puthead(th,0, "MAXIS", st, THnlines);
-
-     sprintf(st,"%12.4E", up.ux->datamax);
-     puthead(th,0, "DATAMAX",  st,           THnlines);
-     puthead(th,1, "DATAMAX", "first scan only.", THnlines);
-     
-     sprintf(st,"%12.4E", up.ux->datamin);
-     puthead(th,0, "DATAMIN",  st,           THnlines);
-     puthead(th,1, "DATAMIN", "first scan only.", THnlines);
-     
-     if(maxWscan>0)  /* put ScanMult as TFORM for the last kw */
-     {               /* only if -t option used by user.        */
-         sprintf(snam,"TFORM%d", Tfields);
-         sprintf(st,"'%dE      '  ", ScanMult);
-         puthead(th,0, snam,  st,         THnlines); 
-
-         /* set TDIM for the last kw to ScanMult */
-         sprintf(snam,"TDIM%d", Tfields);
-         sprintf(st, "'(%d,1,1,1,1)'"  , ScanMult);
-         puthead(th,0, snam, st, THnlines);
-     }
- } /***end of fill_Thead******************************************/
- 
- 
- /********************************************************************
-  * UPDATE_THEAD - add ending data to table header in hbuf.          *
-  ********************************************************************/
- update_Thead()
- {
-     char st[80], snam[12];
-     
-     sprintf(st,"%5d",maxTwid);
-     puthead(th,0, "NAXIS1",   st,           THnlines);
-     sprintf(st,"%5ld",OutCount);
-     puthead(th,0, "NAXIS2",   st,           THnlines);
-     
-     sprintf(st,"%12.4E", DATAmax);
-     puthead(th,0, "DATAMAX",  st,           THnlines);
-     puthead(th,1, "DATAMAX", "for whole file.  ", THnlines);
-     
-     sprintf(st,"%12.4E", DATAmin);
-     puthead(th,0, "DATAMIN",  st,           THnlines);
-     puthead(th,1, "DATAMIN", "for whole file.  ", THnlines);
-     
-     /* fill in the series data width = the TFORM for the last kw.
-        value comes from maxmaxis1                            */
-     sprintf(snam,"TFORM%d", Tfields);
-     sprintf(st,"'%dE          '  ", maxmaxis1);
-     puthead(th,0, snam,  st,         THnlines);
-
-     /* set TDIM for the last kw to maxmaxis1 */
-        sprintf(snam,"TDIM%d", Tfields);
-        sprintf(st, "'(%d,1,1,1,1)'"  , maxmaxis1);
-         puthead(th,0, snam, st, THnlines);
-        fprintf(logfile,"\nUPDATE: debug: putted head, %s, %s ", snam,st);
-  }   
-
-/************************************************************************
- * WRITE_THEAD - send Table Header to standard output.                  *
- ************************************************************************/
- write_Thead()
- {
-      int i;
-     
-     initfits(' ');
-     
-     for(i=0; i<THnlines; i++)
-        stuffits(80,(th+i)->htext, ' ');
-    
-     stuffits(3,"END", 0);     /* add END card to table header      */
-     
-    /* now let's send it to standard output                           */
-    if(jfbuf>0)
-       flushfits('\0');  /* (initialize next buffer for binary data.) */
- }
- 
- 
-/************************************************************************
- * WRITE_REC - write binary table lines to either std out or temp file. *
- ************************************************************************/
- write_rec(tbuf)
- char *tbuf;
- {
-     int i,j,jj;
-     
-     if(maxrecs==0)
-     {                /* write to temp file */
-         if(write(tmpfid,tbuf,(long)siz_tbuf)<0)
-            errexit("write_rec: error writing temp file");
-         OutCount += (siz_tbuf+1)/Twidth;
-            
-     }
-     else
-     {               /* write to std out */
-         for(i=0; i<siz_tbuf; i+=Twidth)
-         {   if(OutCount>=maxrecs)
-             {   flushfits(' ');    /* flush last fits buffer  */
-                 fprintf(logfile,"\nFinish Table, #outrecs=%d, #FITS recs=%d",
-                   OutCount, FitCount);
-                 fflush(logfile);
-                 fill_Thead();      /* update header info      */
-                 write_Thead();     /* write header to std out */
-                 OutCount=0;
-             }
-             stuffits(Twidth,(tbuf+i), 0);
-             OutCount++;
-          }
-      }
-
- } /*****end of write_rec***************************************************/
- 
- 
-/***************************************************************************
- * FINISH_OUTPUT - finish writing to std out.                              *
- *   If in psuedo-real-time mode (maxrecs>0), just dump last fits buffer.  *
- *   If not in pseudo-real-time mode (maxrecs=0),                          *
- *           1. update table header and write it out                       *
- *           2. rewind temp file and write to std out                      *
- ***************************************************************************/
- finish_output()
- {
-     int i, ii;
-     char *tmp;
-     
-     if(maxrecs==0)
-     {                     /* omniscient mode       */
-         update_Thead();
-         write_Thead();
-       
-#ifdef THINK_C         
-         lseek(tmpfid, (long)0, SEEK_SET);  /* reset temp file to beginning */
-#else
-         lseek(tmpfid, (long)0, L_SET); 
-#endif
-         
-         tmp = (char *)malloc((long)Twidth);
-         if(tmp==0) errexit("finish_output: cannot allocate space for tmp");
-         
-    fprintf(logfile,"\nFinishOutput: allocated for tmp %ld bytes.", Twidth);
-    fflush(logfile);
-         
-         for(i=0; i<OutCount; i++)
-         {   if(read(tmpfid,tmp, Twidth)!=Twidth)
-                errexit("finish_output: error reading tempfile.");
-             
-             stuffits(maxTwid, tmp, 0);
-         }
-         free(tmp);
-     }
-                            /* in either mode, flush buffer at end */
-         flushfits(0);
-     
- } /****end of finish_output**************************************************/
- 
- 
-
- 
-/********************************************************************
- * TRANSLATE - use translation table to convert input buffer (ubuf) *
- *     to output buffer (tbuf).                                     *
- *    i = item number in translation table.                         *
- *  Ascii fields (A) are copied directly - no byte swap.            *
- *  I,E, or D fields may be converted to any of I,E, or D with      *
- *   function calls to convert between IEEE and local form.         *
- ********************************************************************/
-#define ASIZE 24
- 
- translate(i,ubuf,tbuf)
- int i;
- char *tbuf, *ubuf;
- {
-    int iwid, nwid, fwid, ffwid, j, jj, inmult;
-    char st[80];
-    char   cbuf[SCANLEN], intype;
-    double ieee_to_dub();
-    int vf[ASIZE];              /* validity flag (=1 if invalid data) */
-    double dub[ASIZE];          /* for temporary double arrays */
-    float  ieee_to_real(), flt[ASIZE];
-    short  ieee_to_int(),  sht[ASIZE];
-
-   /* get size of table item */
-
-    if( (iwid=form_size((tt+i)->inform))==0)
-    {   sprintf(st,"Tranl: bad inp format %c, tab.line %d",
-                      (tt+i)->inform,i);
-        errexit(st);
-     }
-     nwid = (tt+i)->minf * iwid;   /* UNIPOPS size, in bytes */
-     inmult = (tt+i)->minf;
-     intype = (tt+i)->inform;
-
-  /* debug printout 
-    fprintf(logfile, "\nTRANS: %d, %s, %d %d ", i, (tt+i)->ttype,
-               (tt+i)->ucl, (tt+i)->uoff);
-    */
-   /* skip to trans function, if series */
-   if (strcmp((tt+i)->ttype,"SERIES")!=0)
-   {
-    /* get item into cbuf and scale, if necessary  */
-    if((tt+i)->uoff>=0)
-    /* make sure it is actually found in ubuff */
-    {if ((tt+i)->uoff < upsize[(tt+i)->ucl]) 
-     { jj = (tt+i)->uoff;
-       jj += upnt[(tt+i)->ucl];   /* offset to class location in ubuf */
-       for(j=0; j<nwid; j++, jj++)  cbuf[j] = ubuf[jj];
-
-       switch((tt+i)->inform)
-       {   case 'A' :  for(j=jj=0; j<nwid; j++)  if(cbuf[j]==' ') jj++;
-                       /* If UNIPOPS string is all blank, set first byte
-                          null to indicate invalid string in FITS */
-                       if(jj==nwid)  { vf[0]=1;  cbuf[0]=0; }
-                       else  vf[0]=0;
-                      cbuf[nwid]=0;
-                      /* fprintf(logfile, " %s", cbuf); */
-                      break;
-           case 'I' :  for(j=0; j<(tt+i)->minf; j++)
-                       {  sht[j] = ieee_to_int(cbuf+2*j, (vf+j));
-                       }
-                      /* fprintf(logfile, " %d, (%d)", sht[0], vf[0]); */
-                       for(j=0; j<(tt+i)->minf; j++)
-                       {  dub[j] = sht[j] * (tt+i)->factor + (tt+i)->offset;
-                          flt[j] = dub[j];
-                          sht[j] = dub[j];
-                       }
-                      /* fprintf(logfile, " %8.4f", dub[0]); */
-                       break;
-           case 'E' :  for(j=0; j<(tt+i)->minf; j++)
-                          flt[j] = ieee_to_real(cbuf+4*j, (vf+j));
-                      /* fprintf(logfile, " %8.4f, (%d),", flt[0], vf[0]); */
-                       for(j=0; j<(tt+i)->minf; j++)
-                       {  dub[j] = flt[j] * (tt+i)->factor + (tt+i)->offset;
-                          flt[j] = dub[j];
-                          sht[j] = dub[j];
-                        }
-                      /* fprintf(logfile, " %8.4f", dub[0]); */
-                       break;
-           case 'D' :  for(j=0; j<(tt+i)->minf; j++)
-                           dub[j] = ieee_to_dub(cbuf+8*j, (vf+j));
-                       /* fprintf(logfile, " %8.4f, (%d),", dub[0], vf[0]); */
-                         for(j=0; j<(tt+i)->minf; j++)
-                         {  dub[j] = dub[j] * (tt+i)->factor + (tt+i)->offset;
-                            flt[j] = dub[j];
-                            sht[j] = dub[j];
-                         }
-                       /* fprintf(logfile, " %8.4f", dub[0]); */
-       }
-       /* if class=9, check the kpflag and the category of data       */
-       /*  if this is not a KP scan, set all KP data items to invalid */
-       /*  Do complementary thing for GB scan.                        */
-        if((tt+i)->ucl==9)
-        {   if( ((kpflag==1)&&((tt+i)->kat[0]=='g'))
-              ||((kpflag==0)&&((tt+i)->kat[0]=='k')) )
-            {  for(j=0; j<(tt+i)->minf; j++)  vf[j]=1;
-            }
-        }
-        /* if class=11, check the p11flag and the category of data    */
-        /* if this is not a protype class 11 scan, set all prototype  */
-        /* class 11 items (t) to invalid.  Do complementary thing for */
-        /* the original class 11 items                                */
-        if ((tt+i)->ucl==11)
-        {    if( ((p11flag==1)&&((tt+i)->kat[0]!='t'))
-               ||((p11flag==0)&&((tt+i)->kat[0]=='t')) )
-             {  for(j=0; j<(tt+i)->minf; j++)  vf[j]=1;
-             }
-        }
-     }			/* end of if (tt+i)->uoff < upsize ... */
-     else
-     {
-        for(j=0; j<(tt+i)->minf; j++) vf[j]=1;
-     }
-    }
-   }  /* end of if (..."SERIES") */
-     
-     /* convert each parameter using its conversion function  */
-     
-     if(( (tt+i)->sflag>=0) && ((tt+i)->fun!=0) )
-     {
-        (*((tt+i)->fun)) (i, vf, cbuf, sht, flt, dub, intype, inmult, tbuf);
-     }
-}  /***********end of translate************************************/
diff -uNr 3.5/utilities/fits/uinit.c unipops-3.6/utilities/fits/uinit.c
--- 3.5/utilities/fits/uinit.c	2000-03-16 11:30:58.000000000 -0700
+++ unipops-3.6/utilities/fits/uinit.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,647 +0,0 @@
-/*  @(#)uinit.c	5.2 11/22/94	*/
-/************************************************************************
- * UINIT - read in translation table and initialize table in core.      *
- *   qcont=0 for line, =1 for continuum, = -1 for both.                 *
- *   pname is the table type:  "u2f" is used for both programs u2f and  *
- *      f2u.                                                            *
- *   direc=0 for translating UNIPOPS to FITS; =1 for FITS to UNIPOPS.   *
- *    (for the FITS to UNIPOPS version, the translation table is sorted *
- *      into order by ttype, so that the FITS reader can do a binary    *
- *      search to find the column name.                                 *
- ************************************************************************/
-#include <stdio.h>
-#include <errno.h>
-
-#ifdef THINK_C
-#include <stdlib.h>
-#else
-#define SEEK_SET 0
-#endif
-
-#include "u2fglob.h"
-int ftime, nthead;           /* define these flags */
-
-/***********************************************************************
- * procedure inittrans starts here.                                    *
- ***********************************************************************/
-inittrans(qcont,pname, direc)
-int qcont, direc;
-char pname[8];
-{
-    char tfname[80], tc[8], st[140], tmp[16], *ppfx, *getenv();
-    FILE *tfile;
-    int i, iflg, nlines, jcol;
-    int imhed, ithed, lenst;
-    
-    /* initialize flags */
-     ftime = nthead = 1;
-     iflg=0;
-     i=imhed=ithed=0;
-          
-    strcpy(tc,pname);
-
-    /* make name of translation file:  U2f_trans   */
-    
-    sprintf(tmp,"%s_trans",tc);
-    fprintf(logfile,"\nINITTRANS: qcont=%d, pname=%s, direc=%d",
-     qcont,pname,direc);
-    fflush(logfile);
-    fprintf(logfile,"\n Transfile= %s",tmp);
-    fflush(logfile);
-  
-  /* look for translation file first in local directory, then in
-     "popsdir" directory                                      */
-     
-    if((tfile=fopen(tmp,"r"))==NULL)
-    {  
-		/* clear the expected error from above */
-       errno = 0;
-       if((ppfx=getenv("popsdir"))==NULL)
-           errexit("INITTRANS: Cannot find popsdir.");
-       strcpy(tfname, ppfx);
-       strcat(tfname, "utilities/");
-       strcat(tfname, tmp);
-       if((tfile=fopen(tfname,"r"))==NULL)
-       {  sprintf(st, "Cannot open file %s", tfname);
-          errexit(st);
-       }
-    }
-    else  strcpy(tfname,tmp);
-    
-    fprintf(logfile,"\nInitTrans: opened file %s ", tfname);
-      
-    /* preview tfile, get Ntrans, MHnlines, THnlines */
-     prev_tfile(st,tfile);
-
-    /* allocate space for trans-table (tt) */
-     if((tt=(TRANS_TABLE *)
-            malloc((long)((Ntrans+1)*sizeof(TRANS_TABLE))))==0)
-     {  sprintf(st,"INITTRANS: cannot allocate %d trans_tables!",Ntrans+1);
-        errexit(st);
-     }  
-     fprintf(logfile,"\nAllocated for TRANS_TABLE %ld bytes, %d tables.",
-          (long)((Ntrans+1)*sizeof(TRANS_TABLE)), (Ntrans+1));
-     ttflag=1;
-
-     if(direc==0)   /* only allocate header strucs if making FITS */
-  
-     {  alloc_tab(&mh,MHnlines+1);  /* allocate space for table structures */
-     
-       /* estimate space required for th table */
-        THtotal = THnlines + 3*Ntrans + 5;  /* need more if >1 dim matrix */
-        alloc_tab(&th,THtotal);
-        hbufflag=1;
-      }
-
-      i=0;   jcol=1;
-    /*************************************************************************
-     * start of loop for reading trans file  table                           *
-     *************************************************************************/
-     while(fgets(st,140,tfile)!=NULL)
-     {  if(strncmp(st,"END",(long)3)==0)  iflg++;  /* check for END keyword */
-        else
-        {
-          if((iflg==0)&&(strncmp(st,"/*",(long)2)!=0)) /* get trans table */
-          {  if(ptabline(st,(tt+i))==0)
-             {   (tt+i)->ncol = 0;              /* initialize column #    */  
-                                                /* set FITS column number */      
-                if((tt+i)->sflag>= 0)  
-                 {  if((tt+i)->opt==0)  (tt+i)->ncol = jcol++;    
-                    else
-                    {   if(((tt+i)->opt==1)&&(qvof==1))
-                                      (tt+i)->ncol = jcol++;
-                        if(((tt+i)->opt==2)&&(qvof==0))
-                                      (tt+i)->ncol = jcol++;
-                        if(((tt+i)->opt==3)&&(qvof==-1))
-                                      (tt+i)->ncol = jcol++;
-                    } 
-                 }     
-                 i++;
-             }   
-          }
-          if(direc==0)
-          {  if((iflg==1)&&(strncmp(st,"/*",(long)2)!=0))
-             {   if(strlen(st)>8)    
-                 {  ghdline(st, (mh+imhed));    /* get main header lines */
-                    imhed++;
-                 }
-             }
-             if((iflg==2)&&(strncmp(st,"/*",(long)2)!=0)) 
-             {   if(strlen(st)>8)
-                 {  ghdline(st, (th+ithed));    /* get table header lines */
-                    ithed++;
-                 }
-             }
-           }
-        }   /* end of else */
-     }   /* end of while loop */
-          
-     Ntrans = i;
-     
-     fprintf(logfile,"\nRead %d of trans, %d of main, %d of tab, from %s",
-        Ntrans, MHnlines, THnlines, tfname);
-     fflush(logfile);
-     fclose(tfile);
-
-     /* calc offsets in FITS binary table row, and total width, Twidth */
-
-      getWidth(&Twidth);
-      fprintf(logfile,"\n Twidth= %d", Twidth);
-      fflush(logfile);
-          
-     /* check that multiplicities are the same for sflag=0 lines */
-      for(i=0; i<Ntrans; i++)
-      {  if((tt+i)->sflag==0)
-         {  if((tt+i)->mform != (tt+i)->minf)
-            { sprintf(st,"format multiplicities do not match, line %d %d %d %s",
-                i, (tt+i)->mform, (tt+i)->minf, (tt+i)->descr);
-               errexit(st);
-             }
-          }
-       }
-
-      /* zero out all the function pointers */
-       for(i=0; i<Ntrans; i++)  (tt+i)->fun = NULL;
- 
-    /*  turned off debug print of table  
-     fprintf(logfile,"\n       ttype      ff    tunit ncol kat/op axis");
-     fprintf(logfile,"  uf foff ucl uoff");
-     for(i=0; i<Ntrans; i++)        
-     {  fprintf(logfile,"\n %12s, %4d%c %8s%4d %4s%2d%4d %4d%c %4d",  
-           (tt+i)->ttype, (tt+i)->mform, (tt+i)->fform, (tt+i)->tunit,
-           (tt+i)->ncol, (tt+i)->kat, (tt+i)->opt, (tt+i)->axis, 
-           (tt+i)->minf, (tt+i)->inform, (tt+i)->foff);
-         fprintf(logfile," %3d %4d %8s %4d",
-           (tt+i)->ucl, (tt+i)->uoff, (tt+i)->cfact, (tt+i)->sflag); 
-         fprintf(logfile," %12.5e %6.1f, %5d",
-            (tt+i)->factor, (tt+i)->offset, (tt+i)->foff);
-         fflush(logfile);
-      }
-     /*  initialize the function pointers in the tt structs */    
-         if(direc==0)  init_u2f_fun();
-         if(direc==1)  init_f2u_fun();
-
-     /*  if translating to UNIPOPS from FITS, exit here  */
-         if(direc==1) return(0);
-
-     /*  add the table column descriptors to the table header structure */
-
-       make_col_kwds();
-
-    /* turned off debug print of main header table 
-      for(i=0; i<MHnlines; i++)
-      {  fprintf(logfile,"\nMainkw:%9s, col:%2d, wid:%2d ",
-            (mh+i)->kw, (mh+i)->icol[0], (mh+i)->iwid[0]);
-         fflush(logfile);
-       }
-    /* turned off debug print of secondary header table 
-      for(i=0; i<THnlines; i++)
-      {  fprintf(logfile,"\nTab.Head.kw:%9s, col:%2d, wid:%2d ",
-            (th+i)->kw, (th+i)->icol[0], (th+i)->iwid[0]);
-         strncpy(st,(th+i)->htext, (long)50);
-         st[50]=0;
-         fprintf(logfile,"::%s",st);
-         fflush(logfile);
-       }
-     */
-     return(0);
-}
-/**********************end of inittrans*************************************/
-
-
-
-/*************************************************************************
- * PTABLINE - read in line from translation table                        *
- *************************************************************************/
- ptabline(st,table)
- TRANS_TABLE *table;
- char *st;
- {    
-    int i,ii;
-    double pi;
-    char cc;
-    
-    pi = 3.14159265358979323;
-    
-    if(strlen(st)<8) return (-1);      /* skip if blank or line < 8 chars */
-    if((strncmp(st,"        ",(long)8)==0))
-       return(-1);
-    if((strncmp(st,"/*",(long)2)==0))  /* skip if line starts with "/*" */ 
-       return(-1);
-       
-    /* scan line - get all parameters but description */
-    
-    sscanf(st,"%11s%5d %1c %10s%2s %2d %4d %3d %4d %3d %1c %8s %d",
-      table->ttype, &table->mform, &table->fform, table->tunit, table->kat,
-      &table->opt, &table->axis, &table->ucl, &table->uoff, &table->minf, 
-      &table->inform, table->cfact, &table->sflag);
-
-     /* Make sure that if tunit starts with a ', i.e. is a string, that it */
-     /* contains 8 chars between the quotes */
-
-     if (table->tunit[0] == '\'') {
-        int tlen = strlen(table->tunit);
-        if (tlen < 2 || table->tunit[tlen-1] != '\'') {
-		/* The last non-null char MUST be the second quote */
-           sprintf(st,"Error in TUNIT field for TTYPE = %s, TUNIT = %s",
-                      table->ttype, table->tunit);
-           errexit(st);
-        }
-        for (i=tlen-1;i<9;i++) table->tunit[i] = ' ';
-        table->tunit[9] = '\'';
-        table->tunit[10] = '\0';
-    }
-        
-                
-     /* find slash, get description from last 40 cols */
-     
-     for(i=30; ((i<140)&&(st[i]!=0)); i++) 
-       if(st[i]=='/') break;
-     strcpy(table->descr, (st+i+2));
-     
-     /* remove trailing blanks */
-     ii = strlen(table->descr);
-     for(i=ii; i>1; i--)
-     {   if((table->descr[i]!='\n')&&(table->descr[i]!=0)
-            &&(table->descr[i]!=' '))
-            break;
-      }
-      table->descr[i+1]=0;     /* truncate description at blank trailer */
-     /* blank any control characters that may have been left in the line */
-      for(i=0; i<strlen(table->descr); i++)
-        if(table->descr[i]<' ')  table->descr[i]=' '; 
-    /*  blank fill the description out to char # 64 */
-      for(i=strlen(table->descr); i<64; i++)  table->descr[i]=' ';
-      table->descr[64] = 0;
-      
-    /* fix up kat */
-      for(i=0; i<strlen(table->kat); i++)
-         if(table->kat[i]!=' ')  { cc=table->kat[i];  break; };
-      table->kat[0] = cc;  table->kat[1]=0;
-      
-     /* fill in scale factor data */
-      table->factor = 1.0;
-      table->offset = 0.0;
-      
-      /* radians to degrees */
-      if(strcmp(table->cfact,"RTD")==0)  table->factor = 57.2957795;
-
-      /* radians to hours   */
-      if(strcmp(table->cfact,"RTH")==0)  table->factor = 3.819718634;
-      
-      /* radians to seconds of time */
-      if(strcmp(table->cfact,"RTS")==0)  table->factor = 13750.98708;
-
-      /* hours to seconds of time */
-      if(strcmp(table->cfact,"HTS")==0)  table->factor = 3600.;
-
-      /* arcseconds to degrees */
-      if(strcmp(table->cfact,"STD")==0)  table->factor = 1.0/3600.;
-
-      /* arcminutes to degrees */
-      if(strcmp(table->cfact,"MTD")==0)  table->factor = 1.0/60.;
-      
-      /* mm to meters */
-      if(strcmp(table->cfact,"mmTM")==0) table->factor = 0.001;
-      
-      /* cm to meters */
-      if(strcmp(table->cfact,"cmTM")==0) table->factor = 0.01;
-
-      /* KM to meters */
-      if(strcmp(table->cfact,"KTM")==0) table->factor = 1000.0;
-
-      /* MHz to Hz */
-      if(strcmp(table->cfact,"MHZTHZ")==0) table->factor = 1E6;
-      
-      /* Centigrade to Kelvin */
-      if(strcmp(table->cfact,"CTK")==0)   table->offset = 273.15;
-
-      /* times 100  */
-      if(strcmp(table->cfact,"x100")==0)  table->factor= 100.0; 
-
-      /* percent to fraction */
-      if(strcmp(table->cfact,"%Tf")==0)  table->factor= 0.01;  
-
-      /* cm of Hg to Pascals */
-      if(strcmp(table->cfact,"cmHgTP")==0) table->factor = 1333.22;
-
-    return(0);
- }
-
-
-/**********************************************************************
- * GHDLINE - get header format info from transtable                   *
- **********************************************************************/
-ghdline(st, hd)
-char *st;
-HEAD_TABLE *hd;
-{
-   int ii,j, jj;
-   char str1[64],str2[64];
-         
-   /* put total header line into htext */
-   ii=strlen(st);  if(ii>80)ii=80;
-   strncpy(hd->htext, st, (long)ii);
-   
-   /* blank remainder of htext field */
-   for(j=ii-1; j<81; j++)  hd->htext[j]=' ';
-   hd->htext[80]=0;
-   
-   /* find keyword in st */
-   sscanf(st,"%s %s", str1,str2);
-   ii=strlen(str1);
-   if(str1[ii-1]=='=')  str1[ii-1]=0;
-   if(strcmp(str1,"HISTORY")==0)  strcpy(str1,str2);
-   strcpy(hd->kw, str1);
-   
-   /* initialize icol,iwid,hform */
-   for(ii=0; ii<2; ii++)
-   {   hd->icol[ii]=0;
-       hd->iwid[ii]=0;
-    }
-   /* find the % sign - it tells the format */
-   j=0;
-   for(ii=9; ((ii<80)&&(st[ii]!='\n')); ii++)
-   {  if(st[ii]=='%')
-      {  if(j<=2)
-         {   hd->icol[j]=ii;                /* store the column number */
-             ii++;
-             jj=0;
-             while((st[ii]>='0')&&(st[ii]<='9'))
-             {  str2[jj] = st[ii];
-                jj++;
-                ii++;
-              }
-             str2[jj]=0;
-             hd->iwid[j] = atoi(str2);      /* get the field width */
-          }
-          j++;
-       }
-    }
-} /********end of ghdline**********************************************/
-
-
-/***************************************************************
- * GETWIDTH - calc byte offsets of each FITS table column      *
- *     and store into tt[i].foff.                              *
- *     Also get total table width (=Twidth)                    *
- ***************************************************************/
-getWidth(twidth)
-int *twidth;
-{
-   char st[80];
-   int tw, i, iw;
-
-   tw = 0;
-   *twidth = 0;
-   
-   for(i=0; i<Ntrans; i++)
-   {   (tt+i)->foff = tw;       /* set byte offset for FITS column i */
-
-       if( (iw=form_size((tt+i)->fform))==0)
-       {  sprintf(st,"wfits: bad format type, %c, line %d of table.",
-               (tt+i)->fform, i);
-          errexit(st);
-       }
-       if((tt+i)->ncol>0)   /* ncol=0 means it does not go in table */
-       {   iw *= (tt+i)->mform;
-           tw += iw;                       /* increment byte offset */
-       }
-   }
-   *twidth = tw;        /* Twidth is # bytes width of whole FITS table. */
-   ScanWid = iw;        /* scan width (=#bytes per scan matrix)         */
-                        /* is width of last table column                */
-                        /* ScanMultiplicity is # points per scan matrix.*/
-   ScanMult= (tt+Ntrans-1)->mform;
-   maxTwid = tw-iw;     /* get min size for maxTwid =row width, sans matrix */
-   fprintf(logfile,"\nGetWidth:  maxTwid=%d,  ScanWid=%d ",
-       maxTwid, ScanWid);
-       fflush(logfile);
-   
-   /* check whether scan length is to be truncated */
-      
-   if((maxWscan!=0)&&(maxWscan<ScanMult))  /* allow only truncation!! */
-   {  ScanMult = maxWscan;
-      ScanWid  = ScanMult * form_size((tt+Ntrans-1)->fform);
-      *twidth = tw-iw + ScanWid;
-   }
-} /****end of getWidth*************************************************/
-
-
-/**********************************************************************
- * PREV_TFILE - read thru tfile to find sizes for the 3 tables -      *
- *   Ntrans, MHnlines, THnlines                                       *
- **********************************************************************/
- prev_tfile(st,tfile)
- FILE *tfile;
- char *st;
- {
-      int i, imhed, ithed, iflg;
-      
-      i=imhed=ithed=iflg=0;
-      
-      while(fgets(st,140,tfile)!=NULL)
-     {  if(strncmp(st,"END",(long)3)==0)  iflg++;   /* check for END keyword */
-        else
-        {
-          if((iflg==0)&&(strncmp(st,"/*",(long)2)!=0)) /* get trans table */
-          {  if(strlen(st)>8)  i++;
-          }
-          if((iflg==1)&&(strncmp(st,"/*",(long)2)!=0))
-          {   if(strlen(st)>8) imhed++;
-           }
-          if((iflg==2)&&(strncmp(st,"/*",(long)2)!=0)) 
-          {   if(strlen(st)>8) ithed++;
-              
-           }
-        }   /* end of else */
-     }   /* end of while loop */
-     
-     Ntrans = i;
-     MHnlines = imhed;
-     THnlines = ithed;
-     
-     fprintf(logfile,"\nRead %d of trans, %d of main, %d of tab.",
-        Ntrans, MHnlines, THnlines);
-     fflush(logfile);
- 
-    /*  "rewind" tfile to the beginning */
-    
-    if( fseek(tfile, (long)0, SEEK_SET)!=0)
-       errexit("Cannot rewind tfile!");
-       
- } /****end of prev_tfile**********************************************/
- 
- 
-/**********************************************************************
- * ALLOC_TAB - allocate space for table structure.                    *
- **********************************************************************/
- alloc_tab(hd,nn)
- int nn;
- HEAD_TABLE **hd;
- {
-     char st[64];
-     long int mm;
-     
-     mm = nn*(long)sizeof(HEAD_TABLE);
-     
-     if( (*hd = (HEAD_TABLE *)malloc(mm))==0)
-     {   sprintf(st, "Alloc_tab:  Cannot allocate %ld bytes, %d tables.", mm, nn);
-         errexit(st);
-     }
-     fprintf(logfile,"\nAllocTab: allocated %ld bytes, %d tables.", mm, nn);
-     fflush(logfile);
- }
- 
- 
-/*********************************************************************
- * MAKE_COL_KWDS - add all the FITS binary table column descriptors, *
- *   i.e, TTYPE, TFORM, TUNIT, etc, to the "th" structure, as        *
- *   directed by the translation table.                              *
- *********************************************************************/
-make_col_kwds()
-{
-    int i, j, jt, mm, nax, tax, lastcoln;
-    char st[80];
-    
-    jt = THnlines - 1;
-    
-    for(i=0; i<Ntrans; i++)
-    {
-        /* check axis descriptor = 10*axis number plus axis part */
-        /*   n1 = axis MAXISn (dimension)
-             n2 = axis CTYPE (name of quantity)
-             n3 = axis CDELT (increment)
-             n4 = axis CRPIX (reference pixel)
-             n5 = axis CRVAL (value at reference pixel)
-         */
-         
-        /* check options, maybe ignore line altogether */
-         if( (((tt+i)->opt == 1)&&(qvof!=1)) ||
-             (((tt+i)->opt == 2)&&(qvof!=0)) ||
-             (((tt+i)->opt == 3)&&(qvof!=-1)))
-           continue;
-
-        jt++;
-        new_th(jt);     /* initialize new Table Header line */
-        
-         /* for ncol=0, insert line in header, but it is not in the table */
-         if( (tt+i)->ncol == 0)
-         {                       /* the keyword is ttype, the value is tunit */
-            strcpy((th+jt)->kw, (tt+i)->ttype);
-            if((tt+i)->sflag >= -1)   /* check for comment line */
-            {  mm = -1;
-               for(j=0; j<strlen((tt+i)->tunit); j++)
-               {  if((tt+i)->tunit[j]=='\'')       /* check for string value */
-                  { sprintf( (th+jt)->htext, "%-8s= %-10s  ",
-                               (tt+i)->ttype, (tt+i)->tunit);
-                    mm=strlen((th+jt)->htext);
-                    (th+jt)->htext[mm]=' ';
-                    break;
-                  }
-               }
-               if(mm== -1)  /* if numeric value, right justify to col.30 */
-               {  mm=strlen((tt+i)->tunit);
-                  for(j=mm-1; ((j>=0)&&((tt+i)->tunit[j]==' ')); j--) ; 
-                  (tt+i)->tunit[j+1] = '\0';
-                  sprintf( (th+jt)->htext, "%-8s= %20s ",
-                                         (tt+i)->ttype, (tt+i)->tunit);
-                  mm=strlen((th+jt)->htext);
-                  (th+jt)->htext[mm]=' ';
-               }
-               (th+jt)->htext[36] = '/';
-               mm=strlen((tt+i)->descr);
-               if(mm>42)mm=42;
-               for(j=0; j<mm; j++) (th+jt)->htext[j+38] = (tt+i)->descr[j];
-             }
-             else       /* comment line to be inserted in table header */
-             {   strcpy( (th+jt)->htext, "            / ");
-                 strncat( (th+jt)->htext, (tt+i)->descr, (long)64);
-                 (th+jt)->htext[ strlen((th+jt)->htext)]=' ';
-                 (th+jt)->htext[80]=0;
-             }
-         }
-
-         if( (tt+i)->ncol > 0)          /* normal table entry */
-         {
-             sprintf((th+jt)->kw, "TFORM%d", (tt+i)->ncol);
-             sprintf((th+jt)->htext,
-                    "TFORM%-3d= '%d%c        '",
-                    (tt+i)->ncol, (tt+i)->mform, (tt+i)->fform);
-             mm=strlen((th+jt)->htext);
-             (th+jt)->htext[mm]=' ';
-             (th+jt)->htext[36] = '/';
-             
-             /* special case for TFORM for the matrix */
-             if(i==(Ntrans-1))
-                          /* place to insert new multiplicity later */
-             {   (th+jt)->icol[0]=10; 
-                 (th+jt)->iwid[0]=8;
-             }
-             
-             jt++;
-             new_th(jt);
-             sprintf((th+jt)->kw, "TTYPE%d", (tt+i)->ncol);
-             lastcoln = (tt+i)->ncol;
-             sprintf((th+jt)->htext,
-                    "TTYPE%-3d= '%-12s '",
-                    (tt+i)->ncol, (tt+i)->ttype);
-             mm=strlen((th+jt)->htext);
-             (th+jt)->htext[mm]=' ';
-             (th+jt)->htext[36] = '/';
-             mm=strlen((tt+i)->descr);
-             if(mm>42)mm=42;
-             for(j=0; j<mm; j++)
-                (th+jt)->htext[j+38] = (tt+i)->descr[j];
-             
-             if(strcmp((tt+i)->tunit,"-")!=0)
-             {  jt++;
-                new_th(jt);
-                sprintf((th+jt)->kw, "TUNIT%d", (tt+i)->ncol);
-                sprintf((th+jt)->htext,
-                    "TUNIT%-3d= '%-12s '",
-                    (tt+i)->ncol, (tt+i)->tunit);
-                mm=strlen((th+jt)->htext);
-                (th+jt)->htext[mm]=' ';
-                (th+jt)->htext[36] = '/';
-             }
-         }
-    }  /***end of for(i=...)*********************************/
-    
-    /* put final TDIMnnn line, to designate the matrix */
-    jt++;
-    new_th(jt);
-    sprintf((th+jt)->kw, "TDIM%d", lastcoln);
-    sprintf((th+jt)->htext, 
- "TDIM%-3d = '(%d,1,1,1,1)'         / Dimensions of Matrix.",
-       lastcoln, ScanMult);
-    mm=strlen((th+jt)->htext);
-    (th+jt)->htext[mm]=' ';
-    /* place to insert new multiplicity later for TDIM */
-     {   (th+jt)->icol[0]=10; 
-         (th+jt)->iwid[0]=17;
-      }
-    jt++;
-    
-    THnlines = jt;    
-    Tfields = lastcoln;
-} /****end of make_col_kwds*********************************************/
-
-
-new_th(jt)      /* initialize new Table Header line */
-int jt;
-{        
-    char st[64];
-    int j;
-    
-    if(jt>THtotal)
-    {   sprintf(st, "make_col_kwds: th exceeds allocation %d", jt);
-        errexit(st);
-    }
-   /* zero out th struct, item #jt */
-    for(j=0;j<81;j++)  (th+jt)->htext[j] = ' ';
-    for(j=0;j<2; j++)
-    {  (th+jt)->icol[j]=0;
-       (th+jt)->iwid[j]=0;
-    }
-}
diff -uNr 3.5/utilities/fits/umake.c unipops-3.6/utilities/fits/umake.c
--- 3.5/utilities/fits/umake.c	2000-03-16 11:31:07.000000000 -0700
+++ unipops-3.6/utilities/fits/umake.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,655 +0,0 @@
-/*  @(#)umake.c	5.1 06/22/94	*/
-/**************************************************************
- * UMAKE  - make SUN UNIPOPS file for POPS from the FITS tape *
- **************************************************************/
-#include <stdio.h>
-#include <math.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-
-#ifdef THINK_C
- #include <console.h>
- #include <stdlib.h>
-#endif
-
-#include "f2u.h"
-
-/* globals for table translation */
-#include "unipops.h"
-#include "u2fglob.h"
-
-#define ASIZE 64             /* max multiplicity excepting series */
-
-extern double rth, rtd;
-
-double headlen, datalen;   /* describes length of UNIPOPS output buffer */
-long   lenhead, lendata;   /*  (ubuf)                                   */
-
-/* axis values for continuum (globals in u2fglob.h) */
-/*  float Cdelt1, Crval1, Crval2, Crota1, Crota2;
- int   feednum;
- char  Ctype1[10], Ctype2[10];
-*/
-
-int maxWscan, Ntrans, Twidth, ScanWid;
-int ScanMult, MHnlines, THnlines, THtotal, Tfields;
-int maxTwid, Maxis1, maxmaxis1;
-float DATAmax,DATAmin;
-
-int ismode, istel, isprot; /* points to "OBSMODE", "TELESCOP", and   */
-                           /* "CL11TYPE" entries in the bt structure */
-/************************************************************************
- * CONVERT_ROW - convert a binary table row to SUN UNIPOPS format.       *
- ************************************************************************/
-convert_row()
-{
-   int i, itp;
-   long scanlen, itmp;
-   short *sb;
-   char tmpstr[64], tmp2[64], tmp3[64];
- 
-  /* if the first time for this file, read in the translation table */
-  /*    and set up pointers from table columns to tt array.         */
-   if(qtinit==0) initconv();  
-   qtinit=1;
-    
-  /* set "qcont" to 0 if line data, or =1 if continuum.            */
-   if(strncmp((tbuf+(bt+ismode)->offs), "LINE", (long)4)==0)  qcont=0;
-   else  qcont=1;
-  /* set "kpflag" to 1 if Tucson data.                              */
-   if(strncmp((tbuf+(bt+istel)->offs), "NRAO 12M",(long)8)==0) kpflag=1;
-   else  kpflag=0; 
-  /* set p11flag to 1 if prototype class 11 data.                   */
-   if(strncmp((tbuf+(bt+isprot)->offs), "PROTO12M",(long)8)==0) p11flag=1;
-   else p11flag=0;
-
-   restfreq = -1.;
-   freqres = -1.;
-   dsf = -1.;
-   nt = -1.;
-   up.u12->refpt = 0.0;
-   up.u12->x0 = 0.0;
-
-   for(i=1; i<Ntfields+1; i++)     /* translate each parameter */
-   {  if((bt+i)->tpntr >= 0)
-      {   itp = (bt+i)->tpntr;
-         /* if this parameter is an axis, get the axis data into axd */
-          if( ((tt+itp)->axis > 0) && ((tt+itp)->ncol>0)) 
-                   get_axis(i, (tt+itp)->axis, tbuf); 
-  
-         /* skip translation if class 9 data of wrong type           */
-         /*  i.e., GB data ignored if it's a KP scan, and vice-versa */
-         /* or if class 11 data is of wrong type                     */
-         /*  i.e., original class 11 ignored if it's a prototype 11  */
-         /*  scan and vice-versa                                     */ 
-         if( (((tt+itp)->ucl!= 9) && ((tt+itp)->ucl!=11))
-          || (((tt+itp)->ucl==9) && (kpflag==0)&&((tt+itp)->kat[0]=='g'))
-          || (((tt+itp)->ucl==9) && (kpflag==1)&&((tt+itp)->kat[0]=='k')) 
-          || (((tt+itp)->ucl==11) && (p11flag==0)&&((tt+itp)->kat[0]!='t'))
-          || (((tt+itp)->ucl==11) && (p11flag==1)&&((tt+itp)->kat[0]=='t')) )
-            /* translate the table item and store it in the UNIPOPS record */
-               untranslate(i, tbuf);
-      }
-   }
-
-  /* put appropriate axis data into the UNIPOPS record.            */
-   do_axes();
-   if (qcont==1 && kpflag ==1) {
-      if (dsf != -1) up.u12->restfreq = dsf;
-      if (nt != -1) up.u12->freqres = nt;
-   } else {
-      if (restfreq != -1) up.u12->restfreq = restfreq;
-      if (freqres != -1) up.u12->freqres = freqres;
-   }
-  
-   LOGPR"\nConverted row: qtinit=%d, Ntfields=%d", qtinit,Ntfields); 
-   fflush(logfile);
-   
-   strncpy(tmpstr, up.u1->object, (long)16);
-   tmpstr[8]=0;
-   
-   if(qsum==0)        /* if qsum==0 print summary line on stdout */
-   {                  /* summarize all data here */
-      {  strncpy(tmp2, up.u4->coordcd, (long)8);  tmp2[8]=0;
-         strncpy(tmp3, up.u1->obsmode, (long)8);  tmp3[8]=0;
-         printf("%3d%8.2f %-9s%-9s%8s %6.2f%7.2f%5.0f %4d %8.3f%9.3f\n",
-            (jrows+1), up.u1->scan, tmpstr, tmp3, tmp2,
-            up.u4->epocra/15., up.u4->epocdec, up.u12->inttime, 
-            axd[0].maxis, up.ux->datamax, up.ux->datamin);
-      }
-   }
-   else
-   {
-     /*   get actual length of data matrix */
-        for(i=0, scanlen=1; i<maxes; i++)  scanlen *= axd[i].maxis;
-       /* do not allow scanlen to exceed max for UNIPOPS */
-        if(scanlen > SCANLEN)  scanlen=SCANLEN;
-        scanlen *= 4;          /* convert to bytes */
-        lendata = scanlen;
-        datalen = scanlen;
-        scanlen += lenhead;
-       
-     /* pad buffer length to next 512 byte block */
-        if((scanlen%512)>0)
-        {  itmp = scanlen/512;
-           scanlen = 512*(itmp+1);
-        }
-     /* put data length into ubuf */
-        dub_to_ieee(datalen, &up.u1->datalen, 0, 0);
-
-     /* fill in the precision parameter (this never changes) */
-        strncpy(up.u1->precis, "R*4     ", (long)8);
-
-     /* If KP data, put obsolete parameter BASEOFF = 0.      */
-        if(kpflag==1)
-          dub_to_ieee(0.0, &up.u9k->baseoff, 0,0);
-
-     /*   write POPS data file to stdout                     */
-      
-      if( fwrite(ubuf, (long)1, (long)scanlen, stdout)!= scanlen)
-      {  sprintf(tmpstr, "Error writing UNIPOPS record %d to stdout",
-              (uCount+1));
-          errexit(tmpstr);
-      }
-        LOGPR"\nWrote rec# %d to stdout, %d bytes", uCount, scanlen);
-        uCount++;
-   }
-    
-} /****end of convert_row**********************************************/
-
-
-/***********************************************************************
- * INITCONV - read in U2f_trans and initialize the conversion tables. *
- ***********************************************************************/
-initconv()
-{
-    int i;
-    char *tb;
-    short *sbuf;
-   
-    ismode=istel=isprot= -1;
-
-   /* first find out whether we are line or continuum */
-
-       for(i=0; i<Ntfields; i++)
-       {   if(strncmp((bt+i)->ttype, "OBSMODE", (long)7) == 0)
-           {   tb= tbuf + (bt+i)->offs;
-               if(strncmp(tb, "LINE", (long)4)==0) qcont=0;
-               if(strncmp(tb, "CONT", (long)4)==0) qcont=1;
-               ismode = i;      /* points to OBSMODE in table */
-               fprintf(logfile,"\nInitConv: Found OBSMODE, %d, qcont=%d",
-                       i,qcont);
-               fflush(logfile); 
-           }
-           if(strncmp((bt+i)->ttype, "TELESCOP", (long)8) == 0)
-           {   tb= tbuf + (bt+i)->offs;
-               if(strncmp(tb, "NRAO 12M", (long)8)==0) kpflag=1;
-               else                                    kpflag=0;
-               istel = i;       /* points to TELESCOP in table */
-               fprintf(logfile,"\nInitConv: Found TELESCOP , %d, kpflag=%d",
-                       i,kpflag);
-               fflush(logfile); 
-           }
-           if(strncmp((bt+i)->ttype, "CL11TYPE", (long)8) == 0)
-           {   tb= tbuf + (bt+i)->offs;
-               if(strncmp(tb, "PROTO12M", (long)8)==0) p11flag=1;
-               else                                    p11flag=0;
-               isprot = i;     /* points to CL11TYPE in table */
-               fprintf(logfile,"\nInitConv: Found CL11TYPE, %d, p11flag=%d",
-                       i,p11flag);
-               fflush(logfile);
-           }
-           if((ismode>0) && (istel>1) && (isprot>1)) break;
-        }
-    if(qcont<0)
-    {   qcont = 0;
-        fprintf(logfile,"\nCannot find OBSMODE !!  Assuming LINE. ");
-    }
-
-   /* for line data, set qvof appropriately.                        */
-   /*  qvof = 1 if a "FREQ" axis is present, else 0                 */
-   qvof = 0;
-   if (qcont == 0) 
-   {  for (i=0; i<Naxd; i++)
-      {  if (strncmp(axd[i].ctype,"FREQ",(long)4)==0) 
-         {  qvof=1;
-            break;
-         }
-      }
-   } else {
-      qvof = -1;
-   }
-
-   inittrans(qcont, "U2f", 1);   /* get the translation table */
-
-   /* allocate space for the ubuf array */
-    ubuf_alloc();
-       
-   /* find any header parameters that need to go in the UNIPOPS record */
-   findhdparms(); 
-    
-   /* now identify each FITS table column with the correct UNIPOPS parameter.
-      This will fill in the tpntr param in  the bt table.  
-      tpntr points to the matching line in the tt table.                  */
-    identab();
-    
-} /****end of initconv**************************************************/
-
-
-/**************************************************************************
- * FINDHDPARMS - find which header parameters (in the hk array) are       *
- *    parameters that are wanted in the output UNIPOPS data record.        *
- *    Then insert these parameters into the UNIPOPS record.                *
- **************************************************************************/
-findhdparms() 
-{
-    int i,j, nn,mm;
-    
-    fprintf(logfile,"\nFindHDParms: nhk=%d, Ntrans=%d",
-           nhk, Ntrans);
-    fflush(logfile);
-    for(i=0; i<nhk; i++)
-    {   mm=(hk+i)->nkws - 1;
-        nn=strlen((hk+i)->names[mm]);
-        for(j=0; j<Ntrans; j++)
-        {   if(strncmp((tt+j)->ttype, (hk+i)->names[mm], (long)nn)==0) 
-            {  /* fprintf(logfile,"\n FHP.t: i=%d, j=%d", i,j);
-                  fflush(logfile); */
-               headtouni(j, i);
-            }
-        }
-    }
-} /****end of findhdparms**************************************************/
-
-
- 
- 
-/**************************************************************************
- * IDENTAB - match each column label found in the FITS header             *
- *     (these labels are in the bt array)  with the matching label in the *
- *     translation table (in the tt array).                               *
- *     The bt.tpntr pointer is set to point to the matching line in tt.   *
- **************************************************************************/
-identab() 
-{
-   int i,j,mm,nn;
-   
-   for(i=0; i<Ntfields+1; i++)
-   {   nn=strlen((bt+i)->ttype);
-       if(nn>8) nn=8;
-       (bt+i)->tpntr = -1;       /* tpntr is -1 if bt item is not identified */
-       if(nn>0)
-/*                          recognize old SPECTRUM as current SERIES */
-       {  if (strcmp((bt+i)->ttype,"SPECTRUM")==0) strcpy((bt+i)->ttype,"SERIES");
-          for(j=0; j<Ntrans; j++)
-          {   if((strcmp((tt+j)->ttype, (bt+i)->ttype)==0) 
-               &&((tt+j)->ncol>0) )
-              {   (bt+i)->tpntr = j;
-                   break;
-              }
-           }
-       }
-    }
-} /******end of identab*************************************************/
-
-   
-/***********************************************************************
- * HEADTOUNI - convert an item from the FITS header to UNIPOPS form.   *
- *   i is index in translation table. (thats the tt table)             *
- *   hflag= index in hk table (header info)                            *
- ***********************************************************************/
-headtouni(i, hflag)
-int i, hflag;
-{  
-   char *cbuf, intype, *cb, st[80];
-   short *sbuf, sht[ASIZE];
-   double dbuf[ASIZE], dub[ASIZE];
-   float  *fbuf, flt[ASIZE];
-   int mm,nn, inmult, vf[ASIZE];
-   
-   sbuf = (short *)dbuf;
-   cbuf = (char  *)dbuf;
-   fbuf = (float *)dbuf;
-   
-   /*              hflag>=0 for data from header (going to k)          */
-   /*                 i is index in tt table; hflag is index in hk.    */
-   
-   /* prepare header item for ubuf */
-                                   /* (ignore if no conversion function) */
-      if( (tt+i)->fun == 0) return(0); 
-      
-      inmult = (hk+hflag)->no;
-      for(mm=0; mm<inmult; mm++) vf[mm]=0;  /* set valid flags to good */
-      
-      switch((hk+hflag)->type)
-      {   case 0 :  sbuf[0] = (hk+hflag)->logic; /* logical value */
-                    sht[0] = sbuf[0];
-                    dub[0] = flt[0] = sht[0];
-                     intype='I';  inmult=1;
-                     break;
-          case 1 :                             /* integer value */
-                     intype='I'; 
-                     for(mm=0; mm<inmult; mm++)
-                     {  sbuf[mm] = (hk+hflag)->ival[mm];
-                        dub[mm] = sbuf[mm];
-                        if(strcmp((tt+i)->cfact,"-")!=0)
-                        {  dub[mm] = dub[mm] - (tt+i)->offset;
-                           dub[mm] /= (tt+i)->factor;
-                           sbuf[mm]= dub[mm] + 0.49;
-                        }
-                        sht[mm]=sbuf[mm];
-                        flt[mm] = dub[mm];
-                     }
-                     break;
-          case 2 :                         /* floating or double value  */
-                     intype = 'D';
-                     for(mm=0; mm<inmult; mm++)
-                     {  dub[mm] = (hk+hflag)->dval[mm];
-                        if(strcmp((tt+i)->cfact,"-")!=0)
-                          dub[mm] = (dub[mm]-(tt+i)->offset)/(tt+i)->factor;
-                        flt[mm] = dub[mm];
-                        sht[mm] = dub[mm] + 0.49;
-                     }
-                     break;
-          case 3 :                        /* ascii value */
-                     intype = 'A';
-                     inmult = strlen((hk+hflag)->cval);
-                     for(mm=0, cb=cbuf; mm<inmult; mm++, cb++)
-                       *cb = (hk+hflag)->cval[mm];
-                     break;
-          default :  
-                     sprintf(st,"unknown data type in header, kw=%s",
-                         (hk+hflag)->names[(hk+hflag)->nkws-1]);
-                     errexit(st);
-          }
-          /* now call the translation function */
-          (*((tt+i)->fun)) (i, vf, cbuf, sht, flt, dub, intype, inmult, ubuf);
-         
-} /*****end of headtouni***************************************************/
-
-
-
-/***************************************************************************
- * UNTRANSLATE - get parameter i from input tbuf (FITS binary table) and   *
- *   prepare it for translation function.                                  *
- ***************************************************************************/
-untranslate(i,tbuf)
-int i;
-char *tbuf;
-{
-   char intype, *cbuf, st[80], *ccb, *ttb, *cx;
-   short *sbuf, sht[ASIZE];
-   double dbuf[ASIZE], dub[ASIZE], pi;
-   float  *fbuf, flt[ASIZE];
-   int mm,nn, inmult, itp, inwid,j;
-   int vf[ASIZE];
-   
-   float ieee_to_real();
-   double ieee_to_dub();
-   short  ieee_to_int();
-   
-   pi = 3.14159265358979323;
-   
-   /*    i is index in bt table    */
-   
-   /* prepare item for ubuf */
-                                   /* (ignore if no conversion function) */
-      itp = (bt+i)->tpntr;
-      if(itp<0)               return(0);
-      if( (tt+itp)->fun == 0) return(0); 
-      
-      inmult = (bt+i)->tmul;
-      intype = (bt+i)->form;
-      inwid = inmult * form_size(intype);
-      
-      sbuf = (short *)dbuf;
-      fbuf = (float *)dbuf;
-      cbuf = (char  *)dbuf;
-      ccb = cbuf;
-      ttb = (bt+i)->offs + tbuf;
-
-     if((bt+i)->matflg==1)         /* if series, skip to translation */
-     {   cbuf = ttb; 
-         cx = (char *)flt;
-         for(j=0;j<32;j++) *cx++ = cbuf[j];
-
-         fprintf(logfile,"\nSERIES: offs:%d, %d %8.4f", 
-              (ttb-tbuf), (bt+i)->offs, flt[0], flt[1]);
-         fflush(logfile);
-         vf[0]=0;
-         fprintf(logfile, " vf=%lx, vf[0]=%d ", vf, vf[0]);
-         fflush(logfile);
-     }
-     else
-     { for(mm=0; mm<inwid; mm++, ccb++, ttb++) 
-         *ccb = *ttb;
-      
-      switch(intype)
-      {   case 'A' :                                 /* ascii value */
-                     /* if first byte is null, set string to blanks */
-                     /* and set validity (vf) to invalid (=1)       */
-                     if(cbuf[0]==0)
-                     {  vf[0]=1;
-                        for(mm=0; mm<inwid; mm++)  cbuf[mm]=' ';
-                     }
-                     else  vf[0]=0;
-                     break;
-          case 'I' :                             /* integer value */
-                     for(mm=0; mm<inmult; mm++)
-                     {  sht[mm] = ieee_to_int((sbuf+mm),(vf+mm));
-                        dub[mm] = sht[mm];
-                       if(strcmp((tt+itp)->cfact,"-")!=0)
-                       { dub[mm] = (dub[mm]-(tt+itp)->offset)/(tt+itp)->factor;
-                          if(dub[mm]<0.0)  sbuf[mm]= dub[mm]-0.5;
-                           else            sbuf[mm]= dub[mm] + 0.5;
-                        }
-                        flt[mm] = dub[mm];
-                     }
-                     break;
-          case 'E' :                         /* floating  value  */
-                     for(mm=0; mm<inmult; mm++)
-                     {  flt[mm] = ieee_to_real((fbuf+mm),(vf+mm));
-                        dub[mm] = flt[mm];
-                       if(strcmp((tt+itp)->cfact,"-")!=0)
-                         dub[mm] = (dub[mm]-(tt+itp)->offset)/(tt+itp)->factor;
-                         
-                        flt[mm] = dub[mm];
-                        if(dub[mm]<0.0)  sht[mm] = dub[mm]-0.5;
-                         else            sht[mm] = dub[mm]+0.5;
-                     }
-                     break;
-          case 'D' :                        /* double value */
-                     for(mm=0; mm<inmult; mm++)
-                     {  dub[mm] = ieee_to_dub((dbuf+mm), (vf+mm));
-                       if(strcmp((tt+itp)->cfact, "-")!=0)
-                         dub[mm] = (dub[mm]-(tt+itp)->offset)/(tt+itp)->factor;
-                        
-                        flt[mm] = dub[mm];
-                        if(dub[mm]<0.0)  sht[mm] = dub[mm] -0.5;
-                         else            sht[mm] = dub[mm] +0.5;
-                     }
-                     break;
-          default :  
-            sprintf(st,
-               "Unknown data type in table, col %d, pntr=%d, type=%o, kw=%s ",
-                i, itp, intype, (bt+i)->ttype);
-            fprintf(logfile,"\n %s ", st);
-            fflush(logfile);
-            errexit(st);
-          }
-        }  /* end of if(...SERIES) */
-
-       /* now call the translation function */
-          
-        (*((tt+itp)->fun))(itp,vf,cbuf,sht,flt,dub,intype,inmult,ubuf);
-
-} /****end of untranslate***************************************************/
-
-
-/***************************************************************************
- * GET_AXIS - get axis info from table columns which are marked as being   *
- *   axes in the tt (trans-table).                                         *
- ***************************************************************************/
-get_axis(ii, axcode, tbuf)
-int ii, axcode;
-char *tbuf;
-{
-   int iax, nax,jax,jj, inwid, mm;
-   char cbuf[16], *ccb, *ttb, msg[64];
-   short *sbuf;
-   float *fbuf;
-   double *dbuf;
-
-   inwid = (bt+ii)->tmul * form_size((bt+ii)->form);
-   sbuf = (short *)cbuf;
-   fbuf = (float *)cbuf;
-   dbuf = (double *)cbuf;
-
-   ccb = cbuf;
-   ttb = (bt+ii)->offs + tbuf;
-   
-   for(mm=0; mm<inwid; mm++, ccb++, ttb++)
-       *ccb = *ttb;
-
-   iax = axcode%10;
-   nax = axcode/10;
-   jax = nax-1;
-   if(nax>Naxd)
-   {  sprintf(msg, "No.Axes found in table (%d) exceeds MAXIS (%d)!",
-             nax,Naxd);
-      errexit(msg);
-   }
-   axd[jax].no = nax;
-
-   switch(iax)
-   {   case 1 :   axd[jax].maxis = *sbuf;  break;     /* MAXIS */
-
-       case 2 :  jj = (bt+ii)->tmul;                  /* CTYPE */
-                 strncpy(axd[jax].ctype, cbuf, (long)jj);
-                 axd[jax].ctype[jj] = 0;
-                 break;
-       case 3 :  axd[jax].cdelt = *fbuf;  break;      /* CDELT */
-       case 4 :  axd[jax].crpix = *fbuf;  break;      /* CRPIX */
-       case 5 :  axd[jax].crval = *dbuf;  break;      /* CRVAL */
-       case 6 :  axd[jax].crota = *fbuf;  break;      /* CROTA */
-   }
-} /*****end of get_axis*********************************************/
-
-
-/******************************************************************
- * DO_AXES - process axis data and store into the UNIPOPS record  *
- *   test ver - just print out the axis data.                     *
- ******************************************************************/
-do_axes()
-{
-   int i, jmid;
-
-   for(i=0; i<Naxd; i++)
-   {  if(qcont==0)                      /* do the line case */
-      /* check for velocity axis */
-      {   if((strncmp(axd[i].ctype, "VELO", (long)4)==0)
-                ||(strncmp(axd[i].ctype, "FELO", (long)4)==0))
-          {  jmid = axd[i].maxis/2; 
-             if(kpflag!=1)  jmid++;  /* note different convention for kp */
-        /* set refpt if not already set */
-             if (up.u12->refpt == 0) up.u12->refpt = jmid;
-        /* if crpix is not = refpt, adjust V_center accordingly */
-             up.u12->x0 = 0.001 *
-                 (axd[i].crval + (up.u12->refpt-axd[i].crpix)*axd[i].cdelt);  
-             up.u12->deltax = axd[i].cdelt * 0.001;
-          }
-          else
-         /* check for frequency axis */
-            if(strncmp(axd[i].ctype, "FREQ", (long)4)==0)
-            {  jmid = axd[i].maxis/2;
-               if(kpflag!=1)   jmid++;
-         /* set these values if not already set */
-               if (up.u12->refpt == 0) up.u12->refpt = jmid;
-               if (up.u12->x0 == 0) up.u12->x0 = up.u7->velocity;
-            }
-      }
-      else             /* do the continuum case */
-      {
-         up.u12->refpt = 1.0;
-         up.u12->x0 = 0.0;
-      }
-   } /*****end of for(i=...) *********************/
-} /*****end of do_axes********************************************/
-
-
-/*******************************************************************
- * UBUF_ALLOC - allocate space for UNIPOPS buffer array            *
- *******************************************************************/
-/* ustruct defines the structure for the output UNIPOPS record */
-/*   This is the index that is to be put at the beginning of each UNIPOPS
-     record.  ustruct[0]= # header classes;
-              ustruct[j]= pointer to class j in units of R*8 s        
-    The KP structure is used for both GB and KP records  (KP is larger) 
-    and for both types of class 11 (PROTO12M is larger)                 */
-int ustruct[16] = {13,5,22,35,45,62,68,79,86,91,116,126,162,186,193,0};
-ubuf_alloc()
-{
-   long usize, itmp, i;
-   char st[64];
-
-   /* estimate max size needed for ubuf */
-   /* header structure is fixed by pre-set array "ustruct"
-      (see early part of f2u.c for definition.                 */
-    i= ustruct[0];                 /* number of header classes */
-    usize = (ustruct[i+1] - 1)*8;     /* length of header      */
-    headlen = usize;
-    lenhead = usize;
-
-   /* add max size for scan length */
-    usize += SCANLEN * 4;   /* assume series is R*4 size data */
-   
-   /* pad to the next 512 bytes */
-    itmp = usize/512;
-    usize = 512*(itmp+1);
-    
-   /* allocate the space */
-    if(ubufflag==0) 
-    {  if((ubuf=(char *)malloc(usize))==NULL)
-       {  sprintf(st, "UMAKE: cannot allocate %ld bytes for ubuf!!",
-                 usize);
-          errexit(st);
-       }
-      /* clear the ubuf array */
-       for(i=0; i<usize; i++)  ubuf[i] = 0;
-    }
-    ubufflag = 1;  /* set flag indicating space is allocated */
-
-   /* set the index part of the ubuf record */
-    up.u0  = (UNICLASS0 *)ubuf;
-    up.u0->Nheadcls = ustruct[0];
-    upnt[0] = ustruct[0];
-
-    for(i=1; i<16; i++)   
-    {  upnt[i] = (ustruct[i] - 1) * 8 ;
-       up.u0->head_ptr[i-1] = ustruct[i];
-    }
-
-      /* set pointers for UPOPS structure */
-        up.u1  = (UNICLASS1 *)(ubuf+upnt[1]);
-        up.u2  = (UNICLASS2 *)(ubuf+upnt[2]);
-        up.u3  = (UNICLASS3 *)(ubuf+upnt[3]);
-        up.u4  = (UNICLASS4 *)(ubuf+upnt[4]);
-        up.u5  = (UNICLASS5 *)(ubuf+upnt[5]);
-        up.u6  = (UNICLASS6 *)(ubuf+upnt[6]);
-        up.u7  = (UNICLASS7 *)(ubuf+upnt[7]);
-        up.u8  = (UNICLASS8 *)(ubuf+upnt[8]);
-        up.u9g = (UNICLASS9G *)(ubuf+upnt[9]);
-        up.u9k = (UNICLASS9K *)(ubuf+upnt[9]);
-        up.u10 = (UNICLASS10 *)(ubuf+upnt[10]);
-        up.u11 = (UNICLASS11 *)(ubuf+upnt[11]);
-        up.u11p = (UNICLASS11P *)(ubuf+upnt[11]);
-        up.u12 = (UNICLASS12 *)(ubuf+upnt[12]);
-        up.u13 = (UNICLASS13 *)(ubuf+upnt[13]);
-        up.ux = &auxbuf;
-        up.series = (float *)(ubuf+lenhead);
-
-    /* set header length into ubuf */
-     dub_to_ieee(headlen, &up.u1->headlen, 0,0);
-
-} /****end of ubuf_alloc******************************************/
diff -uNr 3.5/utilities/fits/unipops.h unipops-3.6/utilities/fits/unipops.h
--- 3.5/utilities/fits/unipops.h	2000-03-16 11:30:57.000000000 -0700
+++ unipops-3.6/utilities/fits/unipops.h	1969-12-31 17:00:00.000000000 -0700
@@ -1,395 +0,0 @@
-/*  @(#)unipops.h	5.2 09/10/98	*/
-/*****************************************************************************
- * unipops.h defines the structure of the UNIPOPS spectral line format.      *
- *      Scan structure is determined by the 1st 16 words                     *
- *      Created Dec 13, 1990 by F. Ghigo;   Last modified: 20 Jun 1991       *
- *		23 Jan 92:  change size of cfform to 24, add effint          *
- * When header words are added, do not forget to change the fixed ustruct    *
- * values found in umake.c                                                   *
- *****************************************************************************/
-#define SCANLEN 16384    /* max scan length supported by UNIPOPS */
-#define SNAMLEN 16       /* # characters in source name    */
-#define ONAMLEN 16       /* # characters in observers name */
-#define PRCODE 8         /* # characters in project code   */
-
-#ifdef THINK_C
-#define DOUBLE  short double
-#else
-#define DOUBLE  double
-#endif
-
-/* Length of UNIPOPS record is  uniclass1.headlen + uniclass1.datalen(bytes)*/
-
-/* UNIPOPS record is organized into up to 16 blocks, one for each class     */
-/****************************************************************************/
-/* Class zero contains pointers to each class (1-15) in input buffer.       */
-/****************************************************************************/
-typedef struct uniclass0     
-{   short Nheadcls;             /* number of header classes                 */
-    short head_ptr[15];         /* pointers to successive classes           */
-                                /* pointer= # of doubles (8-byte units) from*/
-                                /*  start of class 0                        */
-}   UNICLASS0;                  /* defining word for this class             */
-
-/****************************************************************************/
-/*  Class 1 countains general information about the scan                    */
-/****************************************************************************/
-typedef struct uniclass1 /* description                        byte offset  */
-{  DOUBLE headlen;      /* total bytes in header                      0     */
-   DOUBLE datalen;      /* total bytes in data scan                   8     */
-   DOUBLE scan;         /* scan number                               16     */
-   char   obsid[8];     /* observer initials (up to 8 chars)         24     */
-   char   observer[16]; /* observer name                             32     */
-   char   telescop[8];  /* Telescope name - possible values are:     48     */
-                        /*  NRAO12M   NRAO43M   NRAO93M   NRAO100M
-                            MPI100M   IRAM30M   NRO45M    PMO14M
-                            OSO20M    MASS14M   UTX5M     UK-D15M
-                            IRAM15M                                         */
-   char   projid[8];    /* project ID code                           56     */
-   char   object[16];   /* source name                               64     */
-   char   obsmode[8];   /* observing mode and type of data.          80     */
-                        /*  1st 4 characters are types of data:
-                              LINE  CONT  FSAM  PULS
-                            last 4 characters are observing modes:
-                              PSSW  FQSW  BMSW  TLPW  PLSW  SHSW  LDSW +more*/
-                              
-   char   frontend[8];  /* front end descriptor (KP only) values:    88     */
-                        /*  2C3MMSIS  140CASS  2.7-1.2M  2C3MMSHM
-                            21CM4CH   1.2-0.6M 2MM       11CM3CH
-                            100-30CM  .8MM     6/25-6CM  25-20CM
-                            BOLOMETER 23-17CM  6/2525CM  15-0.6CM           */
-   char   backend[8];   /* back end descriptor.  possible values:    96     */
-                        /*  DIGITAL    STD A/D   FABRITEK   384ACIII
-                            1536HYSP   .03MHZFB  .1MHZFB    1024ACIV
-                            .25MHZFB   .5MHZFB   1.MHZFB    2.5MHZFB        */
-   char   precis[8];    /* data precision of series                 104     */
-                        /*  precis may be one of the following:
-                             I*4, R*4, R*8, R*16, C*8, C*16                 */
-   DOUBLE savenum;      /* index number in UNIPOPS data base        112     */
-   DOUBLE norecord;     /* total number of individual records       120 
-                           associated with this scan number (GB only)       */
-   DOUBLE recordid;     /* the record id number of this data (GB)   128     */
-}  UNICLASS1;
-
-/****************************************************************************/
-/*  Class 2 contains pointing and focus info                                */
-/****************************************************************************/
-typedef struct uniclass2 /* description                        byte offset  */
-{  DOUBLE xpoint;        /* total AZ/RA pointing  (KP only) (arcsecs)  0    */
-   DOUBLE ypoint;        /* total EL/DEC pointing (KP only) (arcsecs)  8    */
-   DOUBLE uxpnt;         /* user AZ/RA pointing correction (arcsecs)  16    */
-   DOUBLE uypnt;         /* user EL/DEC pointing correction (arcsecs) 24    */
-   DOUBLE ptcon[4];      /* secondary pointing constants              32    */
-                         /*  GB: PVLS 1,2, and 3 in arcmins
-                             KP: 4 values used.                             */
-   DOUBLE orient;        /* orientation of receiver or reflector at   64                                                 the prime focus (degrees E of N)  
-                             as seen looking down on the dish               */
-   DOUBLE focusr;        /* radial focus  (mm)                        72    */
-   DOUBLE focusv;        /* north-south focus (KP only) (mm)          80    */
-   DOUBLE focush;        /* east-west focus (KP only) (mm)            88    */
-   char pt_model[8];     /* pointing model (KP only)                  96    */
-}  UNICLASS2;
-
-/****************************************************************************/
-/*  Class 3 contains time and observing parameters.                         */
-/****************************************************************************/
-typedef struct uniclass3 /* description                        byte offset  */
-{  DOUBLE utdate;        /* UT date in format: YYYY.MMDD               0    */
-   DOUBLE ut;            /* Universal Time (hours)                     8    */
-   DOUBLE lst;           /* Local sidereal time  (hours)              16    */
-   DOUBLE norchan;       /* no. polarizations or channel for this     24    */
-                         /*   frontend.                                     */
-   DOUBLE noswvar;       /* number of switching variables             32    */
-   DOUBLE nophase;       /* number of phases per cycle                40    */
-   DOUBLE cycllen;       /* length of cycle (seconds)                 48    */
-   DOUBLE samprat;       /* length of sample                          56    */
-                         /* (a sample may consist of multiple cycles)       */
-   char cl11type[8];     /* class 11 type  (KP only)                  64    */
-                         /* values are '        ' (original type) and       */
-                         /*            'PROTO12M' (12m prototype)           */
-   double phaseid;       /* The phase number of this data (GB)        72    */
-}  UNICLASS3;
-
-/****************************************************************************/
-/*  Class 4:  positions and coordinates                                     */
-/****************************************************************************/
-typedef struct uniclass4 /* description                        byte offset  */
-{  DOUBLE epoch;         /* epoch of coordinate equinox (in years)     0    */
-   DOUBLE xsource;       /* commanded X position (degrees)             8    */
-   DOUBLE ysource;       /* commanded Y position (degrees)            16    */
-   DOUBLE xref;          /* commanded reference X (KP only) (degrees) 24    */
-   DOUBLE yref;          /* commanded reference Y (KP only) (degrees) 32    */
-   DOUBLE epocra;        /* R.A. at epoch   (degrees)                 40    */
-   DOUBLE epocdec;       /* Dec. at epoch   (degrees)                 48    */
-   DOUBLE gallong;       /* commanded galactic longitude (degrees)    56    */
-   DOUBLE gallat;        /* commanded galactic latitude  (degrees)    64    */
-   DOUBLE az;            /* commanded azimuth   - degrees (KP only)   72    */
-   DOUBLE el;            /* commanded elevation - degrees (KP only)   80    */
-   DOUBLE indx;          /* indicated X-position - degrees            88    */
-   DOUBLE indy;          /* indicated Y-position - degrees            96    */
-   DOUBLE desorg[3];     /* descriptive origin                       104    */
-                         /*  (horizontal position, vertical position,
-                              position angle)                               */
-   char   coordcd[8];    /* coordinate system code - values:         128    */
-                         /*  GALACTIC  1950RADC  EPOCRADC  MEANRADC
-                             APPRADC   APPHADC   1950ECL   EPOCECL
-                             MEANECL   APPECL    AZEL      USERDEF
-                             2000RADC  INDRADC                              */
-}  UNICLASS4;
-
-/****************************************************************************/
-/*  Class 5:  environmental data                                            */
-/****************************************************************************/
-typedef struct uniclass5 /* description                        byte offset  */
-{  DOUBLE tamb;          /* ambient temperature (Celsius)              0    */
-   DOUBLE pressure;      /* Bar. Pressure (cm-Hg) - GB only.           8    */
-   DOUBLE humidity;      /* relative humidity (percent) - KP only     16    */
-   DOUBLE refrac;        /* index of refraction (KP only)             24    */
-   DOUBLE dewpt;         /* Dew Point in Celsius (GB only)            32    */
-   DOUBLE mmh2o;         /* atmospheric H2O vapor (mm) - KP only      40    */
-}  UNICLASS5;
-
-/****************************************************************************/
-/*  Class 6:  Mapping parameters                                            */
-/****************************************************************************/
-typedef struct uniclass6 /* description                        byte offset  */
-{  DOUBLE scanang;       /* map scanning angle (degrees) - KP only     0    */
-                         /*  orientation  wrt frame specified by
-                             "frame" code. (alternative to DESORG)          */
-   DOUBLE xzero;         /* X at map ref zero (degrees) (KP only)      8    */
-   DOUBLE yzero;         /* Y at map ref zero (degrees) (KP only)     16    */
-   DOUBLE deltax;        /* KP: X cell size (arcsecs)                 24    */
-                         /*   KP,GB: horizontal slew rate (arcsec/sec)      */
-   DOUBLE deltay;        /* KP: Y cell size (arcsecs)                 32    */
-                         /*   KP,GB: horizontal slew rate (arcsec/sec)      */
-   DOUBLE nopts;         /* total no.cells in map (KP only)           40    */
-   DOUBLE noxpts;        /* number of grid points in X  (KP only)     48    */
-   DOUBLE noypts;        /* number of grid points in Y  (KP only)     56    */
-   DOUBLE xcell0;        /* starting X grid cell number (KP only)     64    */
-   DOUBLE ycell0;        /* starting Y grid cell number (KP only)     72    */
-   char   frame[8];      /* XY reference frame code (KP only)         80    */
-                         /*  8-char code: 1st 4 tell whether the grid is
-                             polar (POLR) or Cartesian (CART);
-                             the 2nd 4 tell whether deltaxr and deltayr refer
-                             to STEP sizes or SCANning rates.               */
-                             
-}  UNICLASS6;
-
-/****************************************************************************/
-/*  Class 7:  velocity calibration and other data parameters.               */
-/****************************************************************************/
-typedef struct uniclass7 /* description                        byte offset  */
-{  DOUBLE bfwhm;         /* Beam FWHM (arcsec)  (KP only)              0    */
-   DOUBLE offscan;       /* off scan number                            8    */
-   DOUBLE badchv;        /* bad channel value (KP only)               16    */
-                         /*  ant.temp. assigned to defective chans.         */
-   DOUBLE rvsys;         /* velocity correction (km/sec)              24    */
-                         /* = the Doppler correction for the EarthUs 
-                              motion in the source direction wrt the
-                              velocity reference frame.                     */
-   DOUBLE velocity;      /* velocity wrt reference (km/sec)           32    */
-   char   veldef[8];     /* velocity definition and reference         40    */
-                         /*  1st 4 characters denotes velocity
-                              definition:  RADI, OPTL, or RELV.
-                             last 4 characters denotes vel.reference:
-                                LSR, HELO, EART, BARI, OBS                  */
-   char   typecal[8];    /* type of calibration                       48    */
-}  UNICLASS7;
-
-/****************************************************************************/
-/*  Class 8:  antenna engineering data (Kitt Peak only).                    */
-/****************************************************************************/
-typedef struct uniclass8 /* description                        byte offset  */
-{  DOUBLE appeff;        /* antenna aperture efficiency                0    */
-                         /* (ratio of power detected to power 
-                             incident on the antenna                        */
-   DOUBLE beameff;       /* antenna main beam efficiency               8    */
-   DOUBLE antgain;       /* antenna gain                              16    */
-   DOUBLE etal;          /* rear spill & scattering efficiency        24    */
-   DOUBLE etafss;        /* forward spill & scattering efficiency     32    */
-}  UNICLASS8;
-
-/****************************************************************************/
-/*  Class 9G contains Green-Bank-Specific parameters  (140-ft)              */
-/****************************************************************************/
-typedef struct uniclass9g /* description                       byte offset  */
-{  DOUBLE losynth[6];     /* L.O. frequencies (MHz)                    0    */
-   DOUBLE loparms[4];     /* If frequencies (MHz)  (LA,LB,LC,LD)      48    */
-   DOUBLE levcorr;        /* level correction  (volts)                80    */
-   DOUBLE ptfudge[2];     /* pointing fudge (arcmin)                  88    */
-   DOUBLE rho;            /* feed offset rotation (degrees)          104    */
-   DOUBLE theta;          /* feed offset, lateral (degrees)          112    */
-   char   cfform[24];     /* center frequency formulae               120    */
-}  UNICLASS9G;
-
-/****************************************************************************/
-/*  Class 9K contains Kitt-Peak-Specific parameters   (12 meter)            */
-/****************************************************************************/
-typedef struct uniclass9k /* description                       byte offset  */
-{  DOUBLE synfreq;        /* synthesizer frequency (MHz)               0    */
-   DOUBLE lofact;         /* LO factor  (1,3,or 4)                     8    */
-   DOUBLE harmonic;       /* Which harmonic of 2GHZ oscillator        16    */
-   DOUBLE loif;           /* LO IF  (MHz)                             24    */
-   DOUBLE firstif;        /* First IF  (KP only) (MHz)                32    */
-   DOUBLE razoff;         /* reference azimuth offset (arcsecs)       40    */
-   DOUBLE reloff;         /* reference elevation offset (arcsecs)     48    */
-   DOUBLE bmthrow;        /* beam throw  (arcsecs)                    56    */
-   DOUBLE bmorent;        /* beam orientation (degrees)               64    */
-   DOUBLE baseoff;        /* baseline offset (Kelvin)                 72    */
-   DOUBLE obstol;         /* observing tolerance  (arcsec)            80    */
-   DOUBLE sideband;       /* Which sideband (2=USB, 3=LSB))           88    */
-   DOUBLE wl;             /* Nothing to do with wavelength (mm)       96    */
-   DOUBLE gains;          /* scan num of cal data to be applied      104    */
-   DOUBLE pbeam[2];       /* Beam offset in plus direction (arcsec)  112    */
-   DOUBLE mbeam[2];       /* Beam offset in minus direction (arcsec) 128    */
-   DOUBLE sroff[4];       /* RA/Dec offsets  (arcsec)                144    */
-   DOUBLE foffsig;        /* Freq. offset, signal (MHz)              176    */
-   DOUBLE foffref[2];     /* Freq. offset, reference (MHz)           184    */
-}  UNICLASS9K;
-
-/****************************************************************************/
-/*  Class 10:  Open parameters (data reduction)  Kitt Peak only             */
-/****************************************************************************/
-typedef struct uniclass10 /* description                        byte offset */
-{  char   openpar[80];    /*                                           0    */
-}  UNICLASS10;
-
-/****************************************************************************/
-/*  Class 11 is phase data (Kitt Peak only)                                 */
-/****************************************************************************/
-typedef struct uniclass11 /* description                        byte offset */
-{  DOUBLE varvel;         /* variable value                            0    */
-   char   vardes[8];      /* variable descriptor                       8    */
-   char   phastb[8];      /* phase table                              16    */
-}  UNICLASS11;
-
-/****************************************************************************/
-/* Prototype Class 11 is phase data (Kitt Peak Only)                        */
-/****************************************************************************/
-typedef struct uniclass11p /* description                       byte offset */
-{  DOUBLE noswvarf;       /* Number of fast switching variables        0    */
-   DOUBLE numcyc;         /* Number of slow cycles per scan            8    */
-   DOUBLE numcycf;        /* Number of fast cycles per scan           16    */
-   DOUBLE nophasef;       /* Number of fast phases per cycle          24    */
-   DOUBLE cyclenf;        /* Length of fast cycle                     32    */
-   DOUBLE samptimf;       /* Length of fast phase sample              40    */
-   DOUBLE varval01;       /* variable value, phase 1                  48    */
-   char   vardes01;       /* variable descriptor, phase 1             56    */
-   char   phastb01[32];   /* phase table, phase 1                     64    */
-   DOUBLE varval02;       /* variable value, phase 2                  96    */
-   char   vardes02;       /* variable descriptor, phase 2            104    */
-   char   phastb02[32];   /* phase table, phase 2                    112    */
-   DOUBLE varval03;       /* variable value, phase 3                 144    */
-   char   vardes03;       /* variable descriptor, phase 3            152    */
-   char   phastb03[32];   /* phase table, phase 3                    160    */
-   DOUBLE varval04;       /* variable value, phase 4                 192    */
-   char   vardes04;       /* variable descriptor, phase 4            200    */
-   char   phastb04[32];   /* phase table, phase 4                    208    */
-   DOUBLE varval05;       /* variable value, phase 5                 240    */
-   char   vardes05;       /* variable descriptor, phase 5            248    */
-   char   phastb05[32];   /* phase table, phase 5                    256    */
-} UNICLASS11P;
-
-/****************************************************************************/
-/*  Class 12:  Descriptor block for each receiver channel                   */
-/****************************************************************************/
-typedef struct uniclass12 /* description                        byte offset */
-{  DOUBLE obsfreq;        /* observed frequency   (MHz)                0    */
-   DOUBLE restfreq;       /* rest frequency (MHz)                      8    */
-                          /* overloaded : 12m cont : data scale factor      */
-   DOUBLE freqres;        /* frequency resolution(bw per chan.in MHz) 16    */
-                          /* overloaded : 12m cont : noise tube flag        */
-   DOUBLE bw;             /* total bandwidth of filter bank in MHz    24    */
-   DOUBLE trx;            /* receiver temperature in K (KP only)      32    */
-   DOUBLE tcal;           /* calibration temperature (Kelvin)         40    */
-   DOUBLE stsys;          /* source system temperature (Kelvin)       48    */
-   DOUBLE rtsys;          /* reference system temperature (Kelvin)    56    */
-   DOUBLE tsource;        /* temp of radio source (K) - KP only       64    */
-   DOUBLE trms;           /* rms of mean source temperature (K)       72    */
-   DOUBLE refpt;          /* reference point number (center channel)  80    */
-                          /*  NRAO convention: refpt=N/2 + 1, where 
-                               N=# of channels                              */
-   DOUBLE x0;             /* velocity at the ref. point (km/sec)      88    */
-   DOUBLE deltax;         /* stepsize along x-axis                    96    */
-                          /*  (usually velocity in km/sec)                  */
-   DOUBLE inttime;        /* total scan duration (seconds)           104    */
-   DOUBLE noint;          /* number of integrations                  112    */
-   DOUBLE spn;            /* starting point number                   120    */
-   DOUBLE tauh2o;         /* H2O opacity as computed by a model      128    */
-   DOUBLE th2o;           /* H2O temperature (K) - KP only           136    */
-   DOUBLE tauo2;          /* O2 opacity computed by a model(KP only) 144    */
-   DOUBLE to2;            /* O2 temperature (K) - KP only            152    */
-   char   polariz[8];     /* polarization  (KP only)                 160    */
-                          /*  1st 2 or 3 chars give type of pol:
-                               RC, LC, or LIN
-                              last few chars give receiver angle to 
-                              a tenth of a degree                           */
-   DOUBLE effint;         /* Effective on-source integration time(s) 168    */
-   char   rxinfo[16];     /* receiver info (KP only)                 176    */
-}  UNICLASS12;
-
-/****************************************************************************/
-/*  Class 13:  Reduction parameters                                         */
-/****************************************************************************/
-typedef struct uniclass13 /* description                        byte offset */
-{  DOUBLE nostac;         /* number of scans stacked (averaged)        0    */
-   DOUBLE fscan;          /* first scan in stack                       8    */
-   DOUBLE lscan;          /* last scan in stack                       16    */
-   DOUBLE lamp;           /* line amplitude (KP only)                 24    */
-   DOUBLE lwid;           /* line width  (KP only)                    32    */
-   DOUBLE ili;            /* integrated line intensity (KP only)      40    */
-   DOUBLE drms;           /* RMS noise level (KP only)                48    */
-}  UNICLASS13;
-
-/****************************************************************************/
-/*  No Class:  Auxiliary parameters used by u2f software.                   */
-/****************************************************************************/
-typedef struct uniaux     /* description                        byte offset */
-{  char   sourcename[20];     /*  [copy of sourcename]     OBJECT       0   */  
-   char   obsname[20];        /*  [copy of observers name] OBSERV        */
-   char   projcode[10];       /*  [copy of project code]   PROJID        */
-   float  time;               /*  TIME   (= UT time of observatiosecs.)  */
-   int    istop,istart;
-   char   tele[10];           /*  TELESCOP                               */
-   char   obsmode[10];        /*  OBSMODE                                */
-   char   backend[10];        /*  BACKEND and INSTRUME                   */
-   char   dateobs[14];        /*  DATE-OBS                               */
-   char   velnam[10];         /*  velocity name = FELO-LSR, etc.         */
-   char   veldef[10];         /*  velocity ref,def = RADILSR,etc         */
-   int    nreceivers;         /*  no.of receivers in this input r        */
-   int    nbeams;             /*  no.of beams for this experiment        */
-   int    nchannels;          /*  no.of channels in series               */
-   int    maxchan;            /*  max no.of channels for this fil        */
-   float  datamax;            /*  DATAMAX (max in series   array)        */
-   float  datamin;            /*  DATAMIN (min in series   array)        */
-}  UNIAUX;
-
-typedef struct upops          /*  pointers to all the structures        */
-{  UNICLASS0  *u0;
-   UNICLASS1  *u1;
-   UNICLASS2  *u2;
-   UNICLASS3  *u3;
-   UNICLASS4  *u4;
-   UNICLASS5  *u5;
-   UNICLASS6  *u6;
-   UNICLASS7  *u7;
-   UNICLASS8  *u8;
-   UNICLASS9G *u9g;
-   UNICLASS9K *u9k;
-   UNICLASS10 *u10;
-   UNICLASS11 *u11;
-   UNICLASS11P *u11p;
-   UNICLASS12 *u12;
-   UNICLASS13 *u13;
-   float      *series;
-   UNIAUX     *ux;
-}  UPOPS;
-extern UPOPS up;
-extern long upnt[16];    /* pointers for UNIPOPS buffer          */
-extern char *ubuf;       /*  buffer for UNIPOPS file             */
-extern int ubufflag;     /* =1 if ubuf is allocated              */
-extern int ustruct[16];  /* defines structure of UNIPOPS record  */
-                         /* set in "ubuf_alloc" in file umake.c  */
-                         /* Used to create output record when    */
-                         /* translating from FITS to UNIPOPS     */
-extern UNIAUX auxbuf;
diff -uNr 3.5/utilities/fits/ureadhdr.c unipops-3.6/utilities/fits/ureadhdr.c
--- 3.5/utilities/fits/ureadhdr.c	2000-03-16 11:31:06.000000000 -0700
+++ unipops-3.6/utilities/fits/ureadhdr.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,954 +0,0 @@
-/*  @(#)ureadhdr.c	5.1 06/22/94	*/
-/*****************************************************************
- * UREADHDR - routines for parsing lines in the FITS header, and *
- *   taking appropriate action for each keyword.                 *
- *****************************************************************/
-#include <stdio.h>
-#include <math.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-
-#ifdef THINK_C          /* includes for Macintosh THINK-C */
- #include <console.h>
- #include <stdlib.h>
-#endif
-#include "f2u.h"  
-
-HSUM hsum;             /* header summary structure (see f2u.h) */
-extern int qscanc;     /* flag for scan count option.  */
-
-/************************************************************************
- * PARSELN - parse a FITS header line, find the keyword and the value.  *
- *   The input line is in 'lin', assumed to have no more than 80 chars. *
- *   The principal keyword, normally in the 1st 8 columns,              *
- *       goes into kval.names[0].                                       *
- *   If the principal kw is blank or COMMENT, cols 9-80 are             *
- *     taken to be a comment and put into cval.                         *
- *   Any other blank-delimited strings that occur before an "=" sign    *
- *      are assumed to be secondary keywords, and are put into          *
- *      kval.names[1], kval.names[2], etc (limit of HLIM).              *
- *      kval.nkws is set to the # of keywords found. It will be zero if *
- *       the whole line was blank.                                      *
- *   Anything following an "=" sign and before a "/" will be the value  *
- *     to be assigned to the keyword.                                   *
- *     If the single-quote (') is found, anything between quotes is a   *
- *     comment and put into kval.cval                                   *
- *     If "T" or "F" is found, the value is a logical true or false.    *
- *     If a decimal point, or letter "E" is found , the value is real.  *
- *     Otherwise, the value is integer.                                 *
- *  If a 2nd real or integer value is found, then it goes into ival[1]  *
- *     or dval[1].   (for the imaginary parts, if present)              *
- ************************************************************************
- *  Inputs: lin contains the input header line to be parsed.            *
- *  Outputs:  return value is 0 if everything is ok                     *
- *            return value is -1 if syntax error or unknown keyword.    *
- *           ermsg will contain an error message if return val is -1.   *
- ************************************************************************
- *  FITS rules of header syntax enforced by this program:               *
- *    The 1st keyword on the line must be left-justified in cols.1-8.   *
- *    Up to HLIM (4) keywords, blank delimited, may occur before the "="*
- *    If the 1st 8 columns are blank, the rest of the line is a comment.*
- *    Keywords must have at least 1 and no more than 8 characters.      *
- *    Keywords may not contain lower case letters.                      *
- *     (in this prog, chars with ascii code >='a' cause an error.)      *
- *    The Value to be assigned to a keyword follows an "=" sign.        *
- *    Good FITS practice is to delimit the "=" sign by blanks, but this *
- *      program does not require it.                                    *
- *    Anything following a slash (/), after at least one keyword and    *
- *      after column 8, is a comment and is ignored.                    *
- ************************************************************************
- *  parseln written by F. Ghigo, NRAO-Green Bank, Jan. 1990             *
- *      last update Apr 5, 1990.                                        *
- *      HISTORY is treated as a "heirarch": following kws are processed *
- ************************************************************************/
-parseln(lin,kval)
-KW_VAL *kval;
-char *lin;
-{
-   int i,j,ii, jj, kk, ikw, nnax, trouble;
-   char tmp[80], kwtmp[MAXKWLEN], *tmpp;
-
-   /*  initialize results to non-disastrous values */
-    trouble      =  0;
-    kval->nkws   = -1;
-    kval->pntr   = -1;
-    kval->status =  0;
-    kval->type   =  0;
-    kval->naxi   =  0;
-    kval->no     =  1;
-    kval->logic  =  0;
-    kval->ival[0] = kval->ival[1] = 0;
-    kval->dval[0] = kval->dval[1] = 0.0;
-    kval->cval[0] = 0;
-    for(i=0; i<HLIM; i++)  kval->names[i][0] = 0;
-
-    strcpy(tmp,"                   ");
-
-   /* scan thru line, skip leading blanks before keyword  */
-   for(i=0; ((i<HDR_LINE_WIDTH) && (lin[i]==' ')); i++);
-
-   if(i>0)
-   {  if(strncmp(lin,"        ",(long)8)==0)
-      {  strcpy(kval->names[0],"        ");        /* keyword is blank */
-         strncpy(kval->cval, (lin+8), (long)72);   /* rest of line is comment */
-         kval->cval[72]=0;
-         kval->nkws = 1;
-         kval->status = 1;
-         kval->type   = 3;
-         goto idstep;          /* return for blank keyword */
-       }
-       else
-       {   LOGPR"\nParseln:  1st keyword must start in col.1.");
-           trouble=1;
-           goto errorexit;
-        }
-    }
-
-   /*  LOGPR"\n checkA - i,lin[i]: %d %c \n", i,lin[i]);  
-       LOGPR"     line=%s::\n", lin);  
-    */
-   /* copy keyword into kval, stop if blank or equals sign */
-   /* also stop if "/" or control character                */
-
-   for(j=0;
-          ((i<HDR_LINE_WIDTH) && (lin[i]>' ') && (lin[i]!='=')
-            && (lin[i]!='/') );
-            j++, i++)
-   {   kval->names[0][j] = lin[i];
-
-   /* check that characters in keyword are ordinary ascii */
-       if((lin[i] <= ' ') || (lin[i]>='a'))  trouble=2;
-       if(j>KWMAXCHAR)
-       {   trouble=1;            /* keyword too long ? */
-           kval->names[0][j]=0;
-           LOGPR"\nParseln:  Keyword %s has >%d chars.", 
-              kval->names[0], KWMAXCHAR);
-           goto errorexit;
-       }
-   }
-   kval->names[0][j] = 0;  /* terminate kw string */
-
-   /*  LOGPR"\n checkB - i,j,lin[i]: %d %d %c", i,j,lin[i]); */  
-
-   if(trouble==2)
-   {   LOGPR"\nParseln: non-ascii char in keyword %s ",kval->names[0]);
-       goto errorexit;         /* return if bad grammar */
-   }
-   
-   kval->nkws = 1;                  /* a principal kw was found */
-
-   /*  check for comment keywords  */
-    if(strcmp(kval->names[0], "COMMENT")==0)
-    {  strncpy(kval->cval, (lin+8), (long)72);  /* rest of line is comment */
-       kval->cval[72]=0;
-       kval->type=3;
-       kval->status=1;
-       goto idstep;      
-    }
-
-   if(lin[i]==' ')     /*  skip blanks  if any */
-      for(j=0; ((i<HDR_LINE_WIDTH) && (lin[i]==' ')); i++);
-   if(i>=HDR_LINE_WIDTH-1)  goto idstep;
-
-   /*  advance to the equals sign  */
-
-    /*  LOGPR"\n checkC - i,j,lin[i]: %d %d %c", i,j,lin[i]); */  
-
-   for(j=0,ii=1; ((i<HDR_LINE_WIDTH) && (lin[i]!='=')); i++)
-   {  
-      if(lin[i]==' ')     /*  skip blanks  */
-      {
-         if(j>0)          /* keyword complete; check for errors */
-         {  kval->names[ii][j]=0;
-            j=0;  ii++;
-            if(ii>HLIM)
-            {  LOGPR"\nParseln: too many keywords on one line.");
-               trouble=1;
-               goto errorexit;
-            }
-            if(trouble==2)
-            {  LOGPR"\nParseln: Keyword %s has illegal characters.",
-                  kval->names[ii-1]);
-               goto errorexit;
-            }
-            trouble=0;
-          }
-      }
-      else
-      {                    /* get multiple or hierarachical kws */
-         kval->names[ii][j++] = lin[i];
-        /* check that characters in keyword are ordinary ascii */
-         if((lin[i] <= ' ') || (lin[i]>='a'))  trouble=2;
-
-         if(j>MAXKWLEN)
-         {   trouble=1;
-             kval->names[ii][j]=0;
-             LOGPR"\nParseln: keyword %s has >%d characters.",
-                  kval->names[ii], MAXKWLEN);
-             goto errorexit;
-         }
-      }
-    }
-  /* LOGPR"\n checkD - i,j,ii,lin[i]: %d %d %d %c", i,j,ii,lin[i]); */  
-
-         if(j>0)          /* last keyword complete; check for errors */
-         {  kval->names[ii][j]=0;
-            j=0;  ii++;
-            if(ii>HLIM)
-            {  LOGPR"\nParseln: too many keywords on one line.");
-               trouble=1;
-               goto errorexit;
-            }
-            if(trouble==2)
-            {  LOGPR"\nParseln: Keyword %s has illegal characters.",
-                  kval->names[ii-1]);
-               goto errorexit;
-            }
-            trouble=0;
-          }
-
-   kval->nkws = ii;
-
-
-   i++;   /* get past the equal sign */
-
-   if(i>=HDR_LINE_WIDTH-1) goto idstep;    /* if no '=' found */
-
-   kval->type = 1;   /* value will be integer if no ' . or  E found */
-
-   /* scan remaining characters after = sign; stop at slash (/)  */
-
-   for(j=0, ii=0; ((i<HDR_LINE_WIDTH) && (lin[i]!='\n'));
-             i++)
-   { 
-       if((lin[i]=='\'')&&(kval->type!=3))  
-       {   kval->type = 3;            /* found 1st single quote */
-           j=0;
-       }
-       if(kval->type==3)               /* get character value */
-       {   tmp[j++] = lin[i];
-           if((tmp[j-1]=='\'')&&(j>1)) /* found matching single quote? */
-           {  tmp[j]=0;
-              break;                   /* jump out of for loop */
-           }
-       }
-       else
-       {   if((lin[i]!=' ')&&(lin[i]!=',')) /* char is not blank or comma */
-           {  if(lin[i]=='/')   break;      /* slash(/) ends value field */
-
-              tmp[j++] = lin[i];
-              if(lin[i]=='T')
-              {   kval->type=0;          /* its a logical True */
-                  kval->logic=1;
-                  goto idstep;
-              }
-              if(lin[i]=='F')
-              {   kval->type=0;          /* its a logical False */
-                  kval->logic=0;
-                  goto idstep;
-              }
-              if((lin[i]=='.')||(lin[i]=='E')||(lin[i]=='e'))
-                 kval->type=2;          /*  its a real constant  */
-           }
-           else    /* blank or comma delim found */
-           {   if((kval->type==2)&&(j>0))
-               {   tmp[j]=0;      /* its a real string */
-                   kval->dval[ii] = atof(tmp);
-                   j=0;
-                   ii++;
-                   if(ii>2)
-                   {  trouble=1;
-                      LOGPR"\nParseln:  >2 reals in value.");
-                      goto errorexit;
-                   }
-                }
-               if((kval->type==1)&&(j>0))
-               {   tmp[j]=0;      /* its an integer string */
-                   kval->ival[ii] = atoi(tmp);
-                   j=0;
-                   ii++;
-                   if(ii>2)
-                   {  trouble=1;
-                      LOGPR"\nParseln: >2 ints in value.");
-                      goto errorexit;
-                   }
-                }
-            }
-       }
-    }
-   /*  if it was a string, remove trailing blanks */
-    if(kval->type==3) 
-    {  if(tmp[j-1]=='\'')
-       {  for(i=j-2; ((i>0) && (tmp[i]==' ')); i--) ;
-          tmp[i+1]=0;
-          tmpp = tmp;
-          if(tmp[0]=='\'') tmpp++;
-          strcpy(kval->cval,tmpp);
-       }
-       else 
-       {   trouble = 1;   /* no ending quote on the string */
-           LOGPR"\nParseln:No end quote on string value.");
-           goto errorexit;
-       }
-    }
-   /* if an int or real, find value here */
-      if((kval->type==2)&&(j>0))
-       {   tmp[j]=0;      /* its a real string */
-           kval->dval[ii] = atof(tmp);
-           j=0;
-           ii++;
-           if(ii>2)
-           {  trouble=1;
-              LOGPR"\nParseln: >2 reals in value.");
-              goto errorexit;
-           }
-        }
-       if((kval->type==1)&&(j>0))
-       {   tmp[j]=0;      /* its an integer string */
-           kval->ival[ii] = atoi(tmp);
-           j=0;
-           ii++;
-           if(ii>2)
-           {  trouble=1;
-              LOGPR"\nParseln: >2 ints in value.");
-              goto errorexit;
-           }
-        }
-        if((kval->type==1)||(kval->type==2))kval->no = ii; /* set # values */
-
-
-idstep:
-
- /* check last (or only) keyword for axis number */
-    strcpy(kwtmp," ");
-    nnax=0;
-    ii=0;
-    i=kval->nkws-1;
-    j=strlen(kval->names[i])-1;
-    for( ;((j>0)&&(kval->names[i][j]>='0')&&(kval->names[i][j]<='9'));
-            j--)  ii++;
-    if(ii>0)
-                                            /* get axis name and number */
-    {   strncpy(kwtmp, kval->names[i], (long)(j+1));  
-        kwtmp[j+1] = '#';
-        /* strcat(kwtmp,"#"); */
-        kwtmp[j+2] = 0;
-        for(jj=0; jj<ii; jj++)  tmp[jj]=kval->names[i][jj+j+1];
-        tmp[ii]=0;
-        nnax = atoi(tmp);
-    } 
-
- /* debug printout - results of each line parse */
-   if(debug>1)
-   { LOGPR"\nParseln: line:\n%s\n",lin);
-     LOGPR"\nParseln:Found %d keywords:", kval->nkws);
-     for(i=0; i<(kval->nkws); i++)  LOGPR" #%d:%s,  ",i, kval->names[i]);
-     LOGPR"\nParseln: type:%d, no:%d, logic:%d, int:%d %d, real:%8.3f %8.3f",
-          kval->type, kval->no, kval->logic, kval->ival[0], kval->ival[1],
-          kval->dval[0], kval->dval[1]);
-     LOGPR"\nParseln: kwtmp=%s,  nnax=%d", kwtmp,nnax);
-     LOGPR"\nParseln: char:%s", kval->cval);
-     fflush(logfile);
-   }
-  
- /*  Now try to identify the keywords */
-
-  kk = kval->nkws;
-  if(nnax>0)  kk--;  /* if last kw has an axis number, check it later */
-
-  for(i=0; i<kk; i++) 
-  {  
-     if((ikw=findkw(kval->names[i]))<0)
-     {   LOGPR"\nParseln: keyword %s not recognized.",
-            kval->names[i]);
-         goto normexit;            /* this line will be skipped */
-     }
-   }
-   if(nnax>0)        /* now check last kw */
-   {  /* first see if kw with number is recognized */
-      if((ikw=findkw(kval->names[kk]))<0)
-      {   if((ikw=findkw(kwtmp))<0)       /* if not, check axis kw */
-          {  LOGPR"\nParseln: keyword %s not recognized.",kwtmp);
-              goto normexit;         /* this line will be skipped */
-           }
-           else 
-           {   if((nnax>kw[ikw].maxi)||(nnax<1))
-               {  LOGPR"\nParseln: keyword %s axis %d out of range.",
-                      kwtmp, nnax);
-                  goto errorexit;
-               }
-               kval->naxi = nnax;
-           }
-        }
-   }  
-
-  /*  The last of a string of keywords has the value attached
-      to it.
-      It is assumed that all keywords are unique, regardless of
-      what hierarchy they are in.  This code will have to change
-      when this assumption becomes untrue.                        */
-
-    kval->pntr = ikw;
-    kw[ikw].status = 1;
-    
-  /*  Check that data type and "no" of keyword matches what was found */
-    if(kw[ikw].type!=kval->type)
-    {   LOGPR"\nParseln: Type of %s should be %d, but %d was found.",
-           kw[ikw].name, kw[ikw].type, kval->type);
-        goto normexit;
-    }
-    if(kw[ikw].no!=kval->no)
-    {   LOGPR"\nParseln: Nvalues for %s should be %d, but %d was found.",
-            kw[ikw].name, kw[ikw].no, kval->no);
-        goto errorexit;
-    }
-  
-normexit:
-    return(0);
-
-errorexit:   return(-1);
-}
-/****end of parseln****************************************************/
-
-
-/**********************************************************************
- * FINDKW - looks for input keyword (kwd) in structure kw.            *
- *    If kwd is found, return index of keyword (ikw), else return -1  *
- **********************************************************************/
-findkw(kwd)
-char *kwd;
-{
-   int i,ikw,flag;
-
-   flag=0;
-   for(i=0; i<maxhk; i++)
-     if(strcmp(kwd, kw[i].name)==0)
-     {  flag=1;
-        ikw=i;
-        if(debug>1)
-           LOGPR"\nFindKW: found %s is kw # %d\n", kwd,ikw);
-        break;
-     }
-   if(flag) return(ikw);
-   else 
-   {  if(debug>1)
-        LOGPR"\nFindKW: keyword %s not recognized.\n",kwd);
-      return(-1);
-   }
-}
-
-
-
-/*****************************************************************
- * INITKW - initialize the keyword function table                *
- *****************************************************************/
-initkw()             /*  initialize the keyword structure */
-{ 
-   int i,j;
-   int  simple(), naxis_proc(), process_end();
-   int  bitpix(), naxisn_proc(), xtension_proc();
-   int  tform_proc(), ttype_proc(), tunit_proc();
-   int  extname_proc(), tfields_proc(), obsmode_proc();
-   int  tmatx_proc(), maxis_proc(),maxisn_proc();
-   int  date_proc(), dateobs_proc(), tele_proc(), pid_proc();
-   int  obsr_proc(), ctype_proc(), crpix_proc(), cdelt_proc();
-   int  crval_proc(), crota_proc(), tdim_proc();
-
-  /* NOTE this program must have the right index number for 
-     each keyword - if keyword table (kw) changes, the following
-     may need to change also !   (refer to file "setkw.h")       */
-
-   kw[0].func = process_end;        /* END   is kw # 0  */
-   kw[1].func = simple;
-   kw[2].func = bitpix;
-   kw[3].func = naxis_proc;         /* NAXIS is kw # 3  */
-   kw[4].func = naxisn_proc;
-   kw[11].func = date_proc;
-   kw[12].func = dateobs_proc;
-   kw[15].func = tele_proc;         /* (15)  TELESCOP   */
-   kw[16].func = obsr_proc;         /* (16)  OBSERVER   */
-   kw[20].func = crval_proc;        /* (20)  CRVAL      */
-   kw[21].func = crpix_proc;        /* (21)  CRPIX      */
-   kw[22].func = cdelt_proc;        /* (22)  CDELT      */
-   kw[23].func = ctype_proc;        /* (23)  CTYPE      */
-   kw[24].func = crota_proc;        /* (24)  CROTA      */
-   kw[35].func = xtension_proc;     /* (35)  XTENSION   */
-   kw[36].func = extname_proc;      /* (36)  EXTNAME    */
-   kw[39].func = tfields_proc;      /* (39)  TFIELDS    */
-   kw[40].func = tform_proc;        /* (40)  TFORM      */
-   kw[41].func = ttype_proc;        /* (41)  TTYPE      */
-   kw[42].func = tunit_proc;        /* (42)  TUNIT      */
-   kw[50].func = maxis_proc;        /* (50)  MAXIS      */ 
-   kw[51].func = maxisn_proc;       /* (51)  MAXISnn    */
-   kw[52].func = tmatx_proc;        /* (52)  TMATXnn    */
-   kw[53].func = tdim_proc;         /* (53)  TDIMnn     */
-   kw[60].func = pid_proc;          /* (60)  PROJID     */
-   kw[65].func = obsmode_proc;      /* (65)  OBSMODE    */
-
-/*  initialize the header summary structure */
-   hsum.nxis1 = hsum.nxis2 = hsum.mxis = hsum.tflds = 0;
-   hsum.type[0] = hsum.date[0] = hsum.tele[0] = 0;
-   hsum.obsr[0] = hsum.omode[0] = 0;
-}
-
-
-/********************************************************************
- * PROCESS_END - evaluates header contents after END detected.      *
- *    If next record expected is data, set head to 0.               *
- ********************************************************************/
-process_end(kval)
-KW_VAL *kval;
-{
-    int i;
-    long int lim_file;
-    char ermsg[80];
-
-    head = 0;
-    headlatch=0;
-    
-    Dwidth = naxisn[0];  /* width of binary data row */
-    nDrow  = naxisn[1];  /* number of rows           */
-    iDrow  = 0;
-
-    lim_file=1;          /* calculate size of file to follow */
-    for(i=0; i<naxes; i++)
-       lim_file *= naxisn[i];
-    
-    lim_file *= n_bitpix;
-
-    n_datarecs = (lim_file + 23039)/23040;
-    
-    if((naxes==0)||(n_datarecs<1))  /* if no data expected */
-    {  head=1;
-       n_datarecs=0;
-    }
-    LOGPR"\nFound header END;  rec#%d ",rcount);
-    LOGPR"  lim_file=%ld, n_bitpix=%d", lim_file, n_bitpix);
-    LOGPR"\nExpecting %ld data records.", n_datarecs);
-     
-   if((flag3D==1)&&(debug>1))   /* debug print of table table */
-   {   for(i=0; i<Ntfields+1; i++)
-       LOGPR"\n %d, %10s %8s %5d %c", i,(bt+i)->ttype,
-         (bt+i)->tunit, (bt+i)->tmul, (bt+i)->form);
-    }
-    siz_tbuf = n_bitpix/8;
-    siz_tbuf *= naxisn[0];           /* width of table or raster row */
-    num_tbuf = naxisn[1];            /* expected number of table rows */
-
-    LOGPR"\nProcess_end: siz_tbuf=%ld, nax1=%d",siz_tbuf, naxisn[0]);
-    LOGPR", num_tbuf=%d,  n_bitpix=%d\n", num_tbuf, n_bitpix);
-
-   /* allocate a buffer for an input line from binary table or raster */
-    if(siz_tbuf>16)  
-    {  tbuf = (char *)malloc(siz_tbuf);
-       if(tbuf==0) 
-       {   sprintf(ermsg,"Can't allocate %ld bytes for tbuf!",siz_tbuf);
-           errexit(ermsg);
-       }
-       tbufflag=1;            /* mark the tbuf buffer as open */
-    }
-    
-   /* if -s option, write summary line for header on std out */
-    if(qsum==0)
-    {  printf(" %-9s  %-9s %-9s %-8s ", hsum.type, hsum.date,
-         hsum.tele, hsum.obsr);
-       printf("   %3d%3d%6d%5d%5d %3d\n",
-         n_bitpix, naxes, hsum.nxis1, hsum.nxis2, Ntfields, maxes);
-         
-       /* if this is a 3D table, put title line for summary of table
-          (summary lines will be generated in "convert_row")         */
-        if((strcmp(hsum.type, "3DTABLE")==0)
-         ||(strcmp(hsum.type, "A3DTABLE")==0)
-         ||(strcmp(hsum.type, "BINTABLE")==0) )
-        {  if(qcont==0)
-           {  printf("\n     scan# rx object   obsmode    veloc   r.a. ");
-              printf(" dec.   dur. ax1     max    min \n");
-           }
-           else
-           {  printf("\n      scan# object   obsmode  coordcd ");
-              printf("   r.a.   dec.");
-              printf(" Tint  ax1     max      min \n");
-           }
-        }
-    }  /* end of if(qsum=0)    */
-    
-   return(0);
-}
-/******end of process_end********************************************/
-
-
-/********************************************************************
- * SIMPLE - process keyword "simple"  This merely checks to see if  *
- *   The value of SIMPLE is True.  If not, then the program exits.  *
- ********************************************************************/
-simple(kval)
-KW_VAL *kval;
-{
-    strcpy(hsum.type, "MAIN");
-    
-    if(kval->logic!= 1 )
-    {  LOGPR"\n SIMPLE not = T means tape is not standard FITS !");
-       return(-1);
-    }
-    else  return(0);
-}
-
-/*********************************************************************
- * BITPIX - process keyword "BITPIX".  Stores value in global var    *
- *    "n_bitpix"                                                     *
- *********************************************************************/
-bitpix(kval)
-KW_VAL *kval;
-{
-   n_bitpix = kval->ival[0];
-   return(0);
-}
-
-/********************************************************************
- * NAXIS_PROC - get value of NAXIS from header.                     *
- ********************************************************************/
-naxis_proc(kval)
-KW_VAL *kval;
-{
-   naxes = kval->ival[0];
-   Naxd = naxes;             /* set max num of axes for axd struct */
-   iaxes = 0;
-   
-   hsum.nxis1 = hsum.nxis2 = 0;
-   
-   return(0);
-}
-
-/********************************************************************
- * NAXISN_PROC - get value of NAXISn from header.                   *
- ********************************************************************/
-naxisn_proc(kval)
-KW_VAL *kval;
-{
-   int i;
- 
-   i = kval->naxi - 1;
-   naxisn[i] = kval->ival[0];
-   axd[i].no = i+1;      /* put NAXISn value into axis descriptor struct */
-   axd[i].maxis = kval->ival[0];
-   
-   if(i==0) hsum.nxis1 = naxisn[i];
-   if(i==1) hsum.nxis2 = naxisn[i];
-
-  /* scan count option - output # scans from NAXIS2 of BINTABLE header. */
-   if((qscanc==1)&&(flag3D==1)&&(axd[i].no==2))
-   {  printf("%d", naxisn[i]);
-      exit(0);                       /* exit from program at this point */
-   }
-   
-   return(0);
-}
-
-/********************************************************************
- * MAXIS_PROC - get value of MAXIS from header.                     *
- ********************************************************************/
-maxis_proc(kval)
-KW_VAL *kval;
-{
-   maxes = kval->ival[0];
-   Naxd = maxes;             /* set max num of axes for axd struct */
-   
-   return(0);
-}
-
-/********************************************************************
- * MAXISN_PROC - get value of MAXISn from header.                   *
- ********************************************************************/
-maxisn_proc(kval)
-KW_VAL *kval;
-{
-   int i;
- 
-   i = kval->naxi - 1;
-   maxisn[i] = kval->ival[0];
-   axd[i].no = i+1;      /* put MAXISn value into axis descriptor struct */
-   axd[i].maxis = kval->ival[0];
-   return(0);
-}
-
-/********************************************************************
- * DATE_PROC - get value of DATE from header.                       *
- ********************************************************************/
-date_proc(kval)
-KW_VAL *kval;
-{
-   strcpy(hsum.date, kval->cval);
-
-   return(0);
-}
-
-/********************************************************************
- * DATEOBS_PROC - get value of DATE-OBS from header.                *
- ********************************************************************/
-dateobs_proc(kval)
-KW_VAL *kval;
-{
-   strcpy(hsum.date, kval->cval);
-
-   return(0);
-}
-
-
-/********************************************************************
- * XTENSION_PROC - get value of XTENSION from header.               *
- *     If type of xtension is BINTABLE, set flag3D.                 *
- ********************************************************************/
-xtension_proc(kval)
-KW_VAL *kval;
-{
-    strcpy(hsum.type, kval->cval);
-
-   if((strcmp(kval->cval,"3DTABLE")==0)
-     || (strcmp(kval->cval,"A3DTABLE")==0)
-     || (strcmp(kval->cval,"BINTABLE")==0) )
-         flag3D=1;
-    return(0);
-}
-
-/********************************************************************
- * EXTNAME_PROC - get value of EXTNAME from header.                 *
- *     If type of extname if UNIPOPS SINGLE DISH, then              *
- *     set flagGBSD.                                                *
- ********************************************************************/
-extname_proc(kval)
-KW_VAL *kval;
-{
-    if(strcmp(kval->cval,"UNIPOPS SINGLE DISH")==0)
-       flagGBSD=1;
-    return(0);
-}
-
-/********************************************************************
- * TFIELDS_PROC - get value of TFIELDS from header.                 *
- *    Allocate space for bt table.                                  *
- ********************************************************************/
-tfields_proc(kval)
-KW_VAL *kval;
-{
-   char ermsg[64];
-   int i;
-   
-   Ntfields = kval->ival[0];
-   
-   if((bt=(BTAB *)malloc((long)(Ntfields+2)*sizeof(BTAB)))
-     ==0)
-   {   sprintf(ermsg,"Cannot allocate space for btab %d",Ntfields);
-       errexit(ermsg);
-   }
-   btflag=1;
-   
-   LOGPR"\n Ntfields=%d", Ntfields);
-   
-   /* set all matflg s to zero */
-   for(i=0; i<=Ntfields; i++)
-      (bt+i)->matflg = 0;   
-   
-    return(0);
-}
-
-/*********************************************************************
- * TFORM_PROC - decode the format letter (A,I,E,D) from the TFORM    *
- *   keyword and put them into the bt table.                         *
- *********************************************************************/
-tform_proc(kval)
-KW_VAL *kval;
-{
-    int i,j,jj;
-    char tmp[16];
-    
-    i = kval->naxi;
-    (bt+i)->offs = btoffs;  /* set offset into FITS binary table */
-    
-  /* skip leading quote, blanks, or control chars */
-    for(j=0; ((j<32)&&
-           ((kval->cval[j]=='\'')||(kval->cval[j]<=' ')) ); j++) ; 
-    
-    jj=0;
-    for(; ((j<8)&&(kval->cval[j]>='0')&&(kval->cval[j]<='9')); j++,jj++)
-       tmp[jj]=kval->cval[j];
-    tmp[jj]=0;
-    (bt+i)->tmul = atoi(tmp);
-    (bt+i)->form = kval->cval[j];
-
-    LOGPR"\nTFORM_PROC: %s, mul=%d, form=%c ",
-           kval->names[0], (bt+i)->tmul, (bt+i)->form);
-
-    btoffs += ((bt+i)->tmul) * (form_size((bt+i)->form)) ;
-    return(0);
-}
-
-/********************************************************************
- * TTYPE_PROC - get value of TTYPE for current table column from    *
- *    header and put it into the bt structure.                      *
- ********************************************************************/
-ttype_proc(kval)
-KW_VAL *kval;
-{
-    int i;
-    
-    i = kval->naxi;
-    strcpy((bt+i)->ttype, kval->cval);
-    
-    return(0);
-}
-
-/********************************************************************
- * TUNIT_PROC - get value of TUNIT for current table column from    *
- *    header and put it into the bt structure.                      *
- ********************************************************************/
-tunit_proc(kval)
-KW_VAL *kval;
-{
-    int i;
-    
-    i = kval->naxi;
-    strcpy((bt+i)->tunit, kval->cval);
-    
-    return(0);
-}
-
-
-/********************************************************************
- * TMATX_PROC - if TMATX is true, then set flag in bt structure.    *
-  ********************************************************************/
-tmatx_proc(kval)
-KW_VAL *kval;
-{
-    int i;
-    
-    i = kval->naxi;
-    if(kval->logic>0)
-      (bt+i)->matflg = 1;
-          
-    return(0);
-}
-
-/********************************************************************
- * TDIM_PROC - if TDIM is true, then set flag in bt structure.    *
-  ********************************************************************/
-tdim_proc(kval)
-KW_VAL *kval;
-{
-    int i;
-    
-    i = kval->naxi;
-      (bt+i)->matflg = 1;
-          
-    return(0);
-}
-
-
-/******************************************************************
- * OBSMODE_PROC - find whether obsmode is line or cont and set    *
- *    qcont to 0 for line or 1 for continuum.                     *
- ******************************************************************/
- obsmode_proc(kval)
- KW_VAL *kval;
- {
-     qcont = -1;
-     if(strncmp(kval->cval, "LINE", (long)4)==0) qcont=0;
-     if(strncmp(kval->cval, "CONT", (long)4)==0) qcont=1;
-     
-     fprintf(logfile,"\nFound OBSMODE= %s, qcont=%d",
-        kval->cval, qcont);
-     fflush(logfile);
-     
-     strcpy(hsum.omode, kval->cval);
-     
-     return(0);
- }
-
-
-/***************************************************************
- * TELE_PROC - store telescope name in hsum array.             *
- ***************************************************************/
- tele_proc(kval)
- KW_VAL *kval;
- {
-    strcpy(hsum.tele, kval->cval);
-    hsum.tele[8] = 0;
-    return(0);
- }
- 
- /**************************************************************
- * PID_PROC - store project ID name in hsum array.             *
- ***************************************************************/
- pid_proc(kval)
- KW_VAL *kval;
- {
-    strcpy(hsum.obsr, kval->cval);
-    return(0);
- }
- 
- /***************************************************************
- * OBSR_PROC - store observer's name in hsum array.             *
- ***************************************************************/
- obsr_proc(kval)
- KW_VAL *kval;
- {
-    strcpy(hsum.obsr, kval->cval);
-    hsum.obsr[8]=0;
-    return(0);
-}
-
-/*****************************************************************
- * CRVAL_PROC - process this axis descriptor (#20 in kw array)   *
- *****************************************************************/
-crval_proc(kval)
-KW_VAL *kval;
-{   int i;
-    i = kval->naxi - 1;
-    axd[i].crval = kval->dval[0];
-    return(0);
-}
-
-/*****************************************************************
- * CRPIX_PROC - process this axis descriptor (#21 in kw array)   *
- *****************************************************************/
-crpix_proc(kval)
-KW_VAL *kval;
-{   int i;
-    i = kval->naxi - 1;
-    axd[i].crpix = kval->dval[0];
-    return(0);
-}
-
-/*****************************************************************
- * CDELT_PROC - process this axis descriptor (#22 in kw array)   *
- *****************************************************************/
-cdelt_proc(kval)
-KW_VAL *kval;
-{   int i;
-    i = kval->naxi - 1;
-    axd[i].cdelt = kval->dval[0];
-    return(0);
-}
-
-/*****************************************************************
- * CTYPE_PROC - process this axis descriptor (#23 in kw array)   *
- *****************************************************************/
-ctype_proc(kval)
-KW_VAL *kval;
-{   int i;
-    i = kval->naxi - 1;
-    strcpy(axd[i].ctype, kval->cval);
-    return(0);
-}
-
-/*****************************************************************
- * CROTA_PROC - process this axis descriptor (#24 in kw array)   *
- *****************************************************************/
-crota_proc(kval)
-KW_VAL *kval;
-{   int i;
-    i = kval->naxi - 1;
-    axd[i].crota = kval->dval[0];
-    return(0);
-}
-
diff -uNr 3.5/utilities/fits/utrans.c unipops-3.6/utilities/fits/utrans.c
--- 3.5/utilities/fits/utrans.c	2000-03-16 11:31:01.000000000 -0700
+++ unipops-3.6/utilities/fits/utrans.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,1073 +0,0 @@
-/********************************************************************
- * UTRANS  - this file has all the functions for converting data    *
- *    from FITS to UNIPOPS or vice-versa.                           *
- *    Pointers to each function are put into the tt struct by       *
- *    either init_f2u_fun or init_u2f_fun (called by inittrans when *
- *    the tt struct is read in from the _trans table.               *
- ********************************************************************/
-#include <stdio.h>
-#include "f2u.h"
-#include "unipops.h"
-#include "u2fglob.h"
-
-extern long rrec;          /* defined in udata.c */
-
-/*  dmons array used below in mjd2day  */
-int dmons[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
-
-/********************************************************************
- * INIT_u2f_FUN - initialize the Unipops-to-fits conversion functns.*
- ********************************************************************/
-init_u2f_fun()
-{
-    int ii;
-    int norm_u2f(), velax_u2f(), longproc_u2f(), latproc_u2f();
-    int rxnum_u2f(), veldef_u2f(), utdate_u2f();
-    int Lscan_u2f(), radecsys_u2f(), null_u2f();
-    int dmax_u2f(),  dmin_u2f(), restfreq_u2f(), freqres_u2f();
-    int dsf_u2f(), nt_u2f();
-    
-    fprintf(logfile,"\n Initializing u2f functions. ");
-    
-    for(ii=0; ii<Ntrans; ii++)
-    {
-        switch ((tt+ii)->sflag)
-        {
-             /* COORDCD, FREQRES, coordinates: normal conv in u2f */
-          case  9 :
-          case  0 : (tt+ii)->fun = norm_u2f;       break;
-          case  1 : (tt+ii)->fun = velax_u2f;      break;
-          case  2 : (tt+ii)->fun = longproc_u2f;   break;
-          case  3 : (tt+ii)->fun = latproc_u2f;    break;  
-          case  4 : (tt+ii)->fun = rxnum_u2f;      break;
-          case  5 : (tt+ii)->fun = veldef_u2f;     break;
-          case  6 : (tt+ii)->fun = radecsys_u2f;   break;
-          case  7 : (tt+ii)->fun = utdate_u2f;     break;
-          case  8 : (tt+ii)->fun = restfreq_u2f;   break;
-          case 10 : (tt+ii)->fun = freqres_u2f;    break;
-          case 11 : (tt+ii)->fun = dsf_u2f;        break;
-          case 12 : (tt+ii)->fun = nt_u2f;         break;
-          case 17 : (tt+ii)->fun = dmax_u2f;       break;
-          case 18 : (tt+ii)->fun = dmin_u2f;       break;    
-          case 20 : (tt+ii)->fun = Lscan_u2f;      break;
-          default : (tt+ii)->fun = 0; 
-        }
-     }
-}
-
-/*********************************************************************
- * INIT_f2u_FUN - initializes the fits-to-unipops conversion functns.*
- *********************************************************************/
-init_f2u_fun()
-{
-    int ii;
-    int norm_f2u(), velax_f2u(), longproc_f2u(), latproc_f2u();
-    int rxnum_f2u(), veldef_f2u(), utdate_f2u();
-    int Lscan_f2u(), coords_f2u(), null_f2u();
-    int dmax_f2u(),  dmin_f2u(), radecsys_f2u();
-    int restfreq_f2u(), freqres_f2u(), dsf_f2u(), nt_f2u();
-    
-    fprintf(logfile,"\n Initializing f2u functions.");
-    fflush(logfile);
-    
-    for(ii=0; ii<Ntrans; ii++)
-    {  
-       switch((tt+ii)->sflag)
-       {
-          case  1 : 
-          case  0 : (tt+ii)->fun = norm_f2u;       break;
-          case  2 : (tt+ii)->fun = longproc_f2u;   break;    
-          case  3 : (tt+ii)->fun = latproc_f2u;    break; 
-          case  4 : (tt+ii)->fun = rxnum_f2u;      break; 
-          case  5 : (tt+ii)->fun = veldef_f2u;     break;
-          case  6 : (tt+ii)->fun = radecsys_f2u;   break; 
-          case  7 : (tt+ii)->fun = utdate_f2u;     break;
-          case  8 : (tt+ii)->fun = restfreq_f2u;   break;
-          case  9 : (tt+ii)->fun = coords_f2u;     break;
-          case 10 : (tt+ii)->fun = freqres_f2u;    break;
-          case 11 : (tt+ii)->fun = dsf_f2u;        break;
-          case 12 : (tt+ii)->fun = nt_f2u;         break;
-          case 17 : (tt+ii)->fun = dmax_f2u;       break;
-          case 18 : (tt+ii)->fun = dmin_f2u;       break;
-          case 20 : (tt+ii)->fun = Lscan_f2u;      break;
-          default : (tt+ii)->fun = 0;
-       }   
-    }
-    
-} /****end of init_f2u_fun********************************************/
-
-
-/***********************************************************************
- * norm_u2f  is the normal translation procedure, for parameters       *
- *   whose sflag is zero.                                              *
- *   Parameters types may be converted                                 *
- *         - I, E, or D may become  I, E, or D                         *
- *         - but A can only become A.                                  *
- ***********************************************************************/
-norm_u2f(i,vf,cbuf,sht,flt,dub,intype,inmult, tbuf)
-int i, inmult, *vf;
-char *cbuf, *tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-     int j,jj,mm,nn, fwid, ffwid, nff;
-     char tmpstr[16];
-     
-     fwid = form_size((tt+i)->fform);
-     ffwid = (tt+i)->mform * fwid;
-     nff=(tt+i)->foff;
-     /* fprintf(logfile," foff=%d, vf=%d ", nff, vf[0]); */
-     
-     switch((tt+i)->fform)
-     {  case 'A' :  
-            for(j=0; j<ffwid; j++)   tbuf[j+nff] = cbuf[j];
-            break;
-        case 'I' :
-            for(j=0; j<(tt+i)->mform; j++)
-            {  int_to_ieee(sht[j],tmpstr, vf[j]);
-               for(mm=0; mm<fwid; mm++)
-                tbuf[(j*fwid)+nff+mm] = tmpstr[mm];
-            }
-          break;
-
-        case 'E' :
-            for(j=0; j<(tt+i)->mform; j++)
-            {  real_to_ieee(flt[j],tmpstr, vf[j]);
-               for(mm=0; mm<fwid; mm++)
-                 tbuf[(j*fwid)+nff+mm] = tmpstr[mm];
-            }
-          break;
-           
-        case 'D' :
-            for(j=0; j<(tt+i)->mform; j++)
-            {  dub_to_ieee(dub[j],tmpstr, vf[j], 1);
-               for(mm=0; mm<fwid; mm++)
-                tbuf[(j*fwid)+nff+mm] = tmpstr[mm];
-            }
-     }
-} /*****end of norm_u2f*************************************************/
-
-
-/**********************************************************************
- * NORM_f2u - standard FITS to UNIPOPS conversion.                    *
- *   all items with sflag=0 use this function.                        *
- **********************************************************************/
-norm_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult, *vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   char st[64], outtype, *ccb, *kkb, tmpstr[16];
-   int inwid, outwid, outmult, mm, nn;
-   
-     inwid   = inmult * form_size(intype);
-     outtype = (tt+i)->inform;
-     outmult = (tt+i)->minf;
-     outwid  = outmult * form_size(outtype);
-     kkb = ubuf + (tt+i)->uoff + upnt[(tt+i)->ucl];
-     
-     switch(outtype)
-     {  case 'A' :                                      /* Ascii data */
-           for(mm=0,ccb=cb; mm<outwid; mm++)  *kkb++ = *ccb++;
-           break;
-
-        case 'I' : 
-                for(mm=0; mm<outmult; mm++,kkb+=2)
-                     int_to_ieee(sht[mm], kkb, vf[mm]); 
-                break;
-               
-        case 'E' :
-               for(mm=0; mm<outmult; mm++, kkb+=4)
-                   real_to_ieee(flt[mm], kkb, vf[mm]);
-               break;
-        case 'D' :
-               for(mm=0; mm<outmult; mm++, kkb+=8)
-                   dub_to_ieee(dub[mm], kkb, vf[mm],0);
-                
-      } /*****end of switch******/
-     
-} /****end of norm_f2u***********************************************/
-
-
-/**********************************************************************
- * NULL_u2f - UNIPOPS to FITS  - null case (ie, no conversion!)       *
- **********************************************************************/
-null_u2f(i,vf, cb,sht,flt,dub,intype,inmult,tbuf)
-int i, inmult, *vf;
-char *cb, intype, *tbuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   /* fprintf(logfile,"\n Called NULL_u2f "); */
-}
-
-/**********************************************************************
- * NULL_f2u - FITS to UNIPOPS  - null case (ie, no conversion!)       *
- **********************************************************************/
-null_f2u(i,vf, cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult, *vf;
-char *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   /* fprintf(logfile,"\n Called NULL_f2u "); */
-}
-
-
-/**********************************************************************
- * LONGPROC_u2f - UNIPOPS to FITS  - Process long-like coordinates.   *
- *   sflag = 2                                                        *
- * The first call to longproc_u2f or latproc_u2f calculates all the   *
- *  FITS coordinate parameters for this scan.                         *
- *  One param is set for each call, depending on ttype or axis.       *
- **********************************************************************/
-static int OldRecNum = -1;    /* calculate coordinate parameters only 
-                                 if rrec (selected input rec #) changes */
-static char ctype2[10], ctype3[10];
-static char radecsys[10];
-static double crval2, crval3, crpix2, crpix3, crota3;
-static double cdelt2, cdelt3, equinox, azim, elev;
-static double rxnum;
-
-longproc_u2f(i,vf, cb,sht,flt,dub,intype,inmult,tbuf)
-int i, inmult, *vf;
-char *cb, intype, *tbuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   if(rrec != OldRecNum)
-   {  do_coords();
-      OldRecNum = rrec;
-   }
-   vf[0] = 0;       /* set valid flag to 0 (means valid) */
-   
-   switch ((tt+i)->axis)
-   {
-      case 22 :  strncpy(cb,ctype2, (long)8);     break;
-      case 23 :  flt[0] = dub[0] = cdelt2;        break;
-      case 24 :  flt[0] = dub[0] = crpix2;        break;
-      case 25 :  flt[0] = dub[0] = crval2;        break;
-      default :
-                 if(strncmp((tt+i)->ttype, "EQUINOX", (long)7)==0)
-                                          flt[0] = dub[0] = equinox;
-                 else
-                 if(strncmp((tt+i)->ttype, "RADECSYS", (long)8)==0)
-                                   strncpy(cb, radecsys, (long)8);
-                                              
-                 else vf[0] = 1;  /* data invalid if none of the above */
-   }
-   /* let norm do the rest of the work ! */
-   
-   norm_u2f(i,vf, cb,sht,flt,dub,intype,inmult,tbuf);
-}
-
-
-/**********************************************************************
- * LATPROC_u2f - UNIPOPS to FITS  - process latitude coordinates      *
- *   sflag = 3                                                        *
- **********************************************************************/
-latproc_u2f(i,vf, cb,sht,flt,dub,intype,inmult,tbuf)
-int i, inmult, *vf;
-char *cb, intype, *tbuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   /* fprintf(logfile,"\n Called latproc_u2f "); */
-   if(rrec != OldRecNum)
-   {  do_coords();
-      OldRecNum = rrec;
-   }
-   vf[0] = 0;       /* set valid flag to 0 (means valid) */
-   
-   switch ((tt+i)->axis)
-   {
-      case 32 :  strncpy(cb,ctype3, (long)8);     break;
-      case 33 :  flt[0] = dub[0] = cdelt3;        break;
-      case 34 :  flt[0] = dub[0] = crpix3;        break;
-      case 35 :  flt[0] = dub[0] = crval3;        break;
-      case 36 :  flt[0] = dub[0] = crota3;        break;
-      
-      default :  vf[0] = 1;  /* data invalid if none of the above */
-   }
-   /* let norm do the rest of the work ! */
-   
-   norm_u2f(i,vf, cb,sht,flt,dub,intype,inmult,tbuf);
-
-}
-
-
-/****************************************************************************
- * do_coords - get all FITS sky coordinate parameters, given UNIPOPS record.*
- ****************************************************************************/
-do_coords()
-{
-  char tmp[16];
-  int vf[4];
-  double ieee_to_dub();
-
-  /*  set common defaults */
-   strcpy(ctype2,   "RA---ARC");
-   strcpy(ctype3,   "DEC--ARC");
-   strcpy(radecsys, "FK4     ");
-   crota3 = 0.0;
-   crval2 = ieee_to_dub(&up.u4->xsource, vf);
-   crval3 = ieee_to_dub(&up.u4->ysource, vf);
-   crpix2 = crpix3 = 1.0;
-   cdelt2 = cdelt3 = 0.0;  
-   equinox = ieee_to_dub(&up.u4->epoch, vf);
-   
-  /* do special cases */
-   if(strncmp(up.u4->coordcd, "APPRADC", (long)7)==0)
-   {  strcpy(radecsys,"GAPPT");   return(0);
-   }
-   if((strncmp(up.u4->coordcd, "APPHADC", (long)7)==0)
-    ||(strncmp(up.u4->coordcd, "INDRADC", (long)7)==0)
-    ||(strncmp(up.u4->coordcd, "AZEL", (long)4)==0) )
-   {  crval2 = ieee_to_dub(&up.u4->epocra, vf);
-      crval3 = ieee_to_dub(&up.u4->epocdec, vf);
-      return(0);
-   }
-   if(strncmp(up.u4->coordcd, "2000RADC", (long)8)==0)
-   {  strcpy(radecsys, "FK5");
-      return(0);
-   }
-   if((strncmp(up.u4->coordcd, "1950ECL", (long)7)==0)
-    ||(strncmp(up.u4->coordcd, "EPOCECL", (long)7)==0)
-    ||(strncmp(up.u4->coordcd, "MEANECL", (long)7)==0) )
-    {  strcpy(ctype2, "ELON-ARC");
-       strcpy(ctype3, "ELAT-ARC");
-       return(0);
-    }
-    if(strncmp(up.u4->coordcd, "APPECL", (long)6)==0)
-    {  strcpy(ctype2, "ELON-ARC");
-       strcpy(ctype3, "ELAT-ARC");
-       strcpy(radecsys, "GAPPT");
-       return(0);
-    }
-    if(strncmp(up.u4->coordcd, "GALACTIC", (long)8)==0)
-    {  equinox = 1950.0;
-       strcpy(ctype2, "GLON-ARC");
-       strcpy(ctype3, "GLAT-ARC");
-       return(0);
-    }
-    if(strncmp(up.u4->coordcd, "USERDEF", (long)7)==0)
-    {  equinox = 1950.0;
-       crval2 = ieee_to_dub(&up.u4->desorg[0], vf);
-       crval3 = ieee_to_dub(&up.u4->desorg[1], vf);
-       crota3 = ieee_to_dub(&up.u4->desorg[2], vf);
-       crpix2 = crpix3 = 0.0;
-       cdelt2 = ieee_to_dub(&up.u4->xsource, vf);
-       cdelt3 = ieee_to_dub(&up.u4->ysource, vf);
-       fprintf(logfile,"\nDO_COORDS: USERDEF: desorg= %8.4e, %8.4e, %8.4e ",
-             crval2, crval3, crota3);
-       return(0);
-    }
-}
-
-/**********************************************************************
- * LONGPROC_f2u - FITS to UNIPOPS  - Process long-like coordinates.   *
- *   sflag = 2 - convert CTYPE2, CRVAL2, CRPIX2, CDELT2, EQUINOX.     *
- **********************************************************************/
-longproc_f2u(i,vf, cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult, *vf;
-char *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-
-  /* move equinox */
-     equinox = dub[0];
-     if(strncmp((tt+i)->ttype, "EQUINOX", (long)7)==0)
-         dub_to_ieee(dub[0], &up.u4->epoch,0,0);
-         
-     if(strncmp((tt+i)->ttype, "CTYPE2", (long)6)==0)
-         strncpy(ctype2, cb, (long)8);
-     if(strncmp((tt+i)->ttype, "CRVAL2", (long)6)==0) crval2 = dub[0];
-     if(strncmp((tt+i)->ttype, "CRPIX2", (long)6)==0) crpix2 = dub[0];
-     if(strncmp((tt+i)->ttype, "CDELT2", (long)6)==0) cdelt2 = dub[0];
-     
-}
-
-/**********************************************************************
- * LATPROC_f2u - FITS to UNIPOPS  - process latitude coordinates      *
- *  sflag = 3  - get CTYPE3,CRVAL3,CRPIX3,CDELT3,CROTA3               *
- **********************************************************************/
-latproc_f2u(i,vf, cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult, *vf;
-char *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-     if(strncmp((tt+i)->ttype, "CTYPE3", (long)6)==0)
-         strncpy(ctype3, cb, (long)8);
-     if(strncmp((tt+i)->ttype, "CRVAL3", (long)6)==0) crval3 = dub[0];
-     if(strncmp((tt+i)->ttype, "CRPIX3", (long)6)==0) crpix3 = dub[0];
-     if(strncmp((tt+i)->ttype, "CDELT3", (long)6)==0) cdelt3 = dub[0];
-     if(strncmp((tt+i)->ttype, "CROTA3", (long)6)==0) crota3 = dub[0];
-}
-
-/***********************************************************************
- * rxnum_u2f - insert the receiver index number in the output array.   *
- *   sflag = 4                                                         *
- ***********************************************************************/
-rxnum_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    int j,jj, nff,mm;
-    long ll;
-    float rx;
-    char tmpstr[8];
-    
-    ll = flt[0];
-    ll = ll % 100;  /* get the hundredths from the scan number.*/
-                    /* the scale factor of 100 has already been applied. */
-    rx = ll;
-    real_to_ieee(rx, tmpstr, vf[0]);
-    nff = (tt+i)->foff;
-    for(mm=0; mm<4; mm++)
-           tbuf[nff+mm] = tmpstr[mm];
-} 
-
-
-/**********************************************************************
- * RXNUM_f2u - FITS to UNIPOPS conversion - get receiver number.      *
- *  sflag = 4                                                         *
- **********************************************************************/
-rxnum_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult, *vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   rxnum = dub[0];
-}
-
-
-/**********************************************************************
- * velax_u2f - insert the velocity axis name                          *
- *   sflag = 1                                                        *
- **********************************************************************/
-velax_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    int nff,mm, jj;
-    char vname[10], tmp[4];
-    
-  /* label axis as fictitious velocity, i.e., "FELO-" */
-
-    strcpy(vname,"FELO-");
-    jj=4;
-    if(( *(cbuf+jj) == ' ')       /* skip blank space or "-" if present */
-       ||( *(cbuf+jj) == '-'))   jj=5;
-    strncpy(tmp, (cbuf+jj), (long)3);
-    tmp[3]=0;
-  /* earth centered should become "GEO" */
-    if(strcmp(tmp,"EAR")==0)  strcpy(tmp,"GEO");
-    strcat(vname,tmp);
-    
-    nff = (tt+i)->foff;
-    for(mm=0; mm<(tt+i)->mform; mm++)  tbuf[nff+mm] = vname[mm];
-    return(0);
-} 
-
-
-/*************************************************************************
- * velax_f2u - Translate velocity axis name.                             *
- *************************************************************************/
-velax_f2u(i,vf,cb, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult, *vf;
-char *cb,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    
-} 
-
-
-/*************************************************************************
- * VELDEF_u2f - insert the veldef in the output array.                   *
- *   sflag = 5                                                           *
- *************************************************************************/
-veldef_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    int j,jj, nff,mm;
-    char tmp[16], tmp2[16];
-    
-    strncpy(tmp,cbuf, (long)8);
-
-  /* FITS form has hyphen in it. */
-    jj=4;
-    if( (tmp[jj]==' ')||(tmp[jj]=='-'))  jj=5;
-    strncpy(tmp2, (tmp+jj), (long)3);
-    tmp2[3]=0;
-    tmp[4]=0;
-    
-    /* Earth centered case should become "GEO" */
-    if(strcmp(tmp2,"EAR")==0) strcpy(tmp2, "GEO");
-    strcat(tmp,"-");
-    strcat(tmp,tmp2);
-
-    fprintf(logfile,"\nVELdef: %s, %s ", tmp, tmp2);
-
-    nff = (tt+i)->foff;
-    for(mm=0; mm<8; mm++)
-         tbuf[nff+mm] = tmp[mm]; 
-} 
-
-
-
-/**********************************************************************
- * VELDEF_f2u - FITS to UNIPOPS conversion - get velocity definition. *
- *   Converts from FITS form of veldef, e.g.,  RADI-LSR  or  OPTL-GEO *
- *   to UNIPOPS form:  RADILSR  or  OPTLEART                          *
- **********************************************************************/
-veldef_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult,*vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-    char tmp1[10],tmp2[8];
-    int jj;
-    
-    jj=4;
-    
-    strncpy(tmp1,cb,(long)4);
-    if((cb[4]=='-')||(cb[4]==' ')) jj=5;
-    
-    strncpy(tmp2, (cb+jj), (long)3);
-    tmp2[3]=' ';
-    tmp1[4]=tmp2[4]=0;
-    
-    switch(tmp2[0])
-    {   case 'L' :  strcat(tmp1,"LSR ");  break;
-        case 'H' :  strcat(tmp1,"HELO");  break;
-        case 'G' :
-        case 'E' :  strcat(tmp1,"EART");  break;
-        case 'B' :  strcat(tmp1,"BARI");  break;
-        case 'O' :  strcat(tmp1,"OBS ");  break;
-        
-        default :   strcat(tmp1, tmp2);
-    }
-    tmp1[8]=0;
-    strcpy( up.u7->veldef, tmp1);
-}
-
-/**********************************************************************
- * COORDS_f2u - FITS to UNIPOPS conversion - get position data.       *
- *   sflag = 9                                                        *
- **********************************************************************/
-coords_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult,*vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   norm_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf);
-} 
-
-/*************************************************************************
- * radecsys_u2f - convert UNIPOPS COORDCD to FITS RADECSYS.              *
- *  sflag = 6                                                            *
- * For definition of RADECSYS codes, see Hanisch and Wells.              *
- * Note this may depend on other coordinate parameters in the f2u case.  *
- *************************************************************************/
-radecsys_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    int nff, mm;
-    char tmp[10];
-    double eqnx, ieee_to_dub();
-    
-    eqnx = ieee_to_dub(&up.u4->epoch, vf);
-
-    strcpy(tmp, "FK4      ");   /* default coordinate system */
-    
-    if(strncmp(cbuf,"APP", (long)3)==0)  
-                     strcpy(tmp, "GAPPT");   /* apparent place */
-                     
-    else
-      if(strncmp(cbuf,"2000", (long)4)==0)
-                     strcpy(tmp, "FK5");     /* J2000 system */
-      else if(strncmp(cbuf,"EPOCRADC", (long)8)
-              &&(eqnx == 2000.0))  strcpy(tmp, "FK5");
-        
-    nff = (tt+i)->foff;
-    for(mm=0; mm<8; mm++)
-         tbuf[nff+mm] = tmp[mm]; 
-}
-
-/*************************************************************************
- * radecsys_f2u - store FITS RADECSYS in local variable.                 *
- *  sflag = 6                                                            *
- * For definition of RADECSYS codes, see Hanisch and Wells.              *
- * Note this depends on other coordinate parameters in the f2u case.     *
- *************************************************************************/
-radecsys_f2u(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-}
-
-/**********************************************************************
- * LSCAN_f2u - FITS to KEEP conversion - process the scan data.       *
- **********************************************************************/
-Lscan_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult,*vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-     long scanlen, ii;
-     int maxlen;
-     float *fb, ff, ieee_to_real();
-     
-   /* get length of scan  */
-     for(ii=0, scanlen=1; ii<Naxd; ii++)  scanlen *= axd[ii].maxis;
-
-   /* is it longer than SCANLEN (max allowable for UNIPOPS) */
-    maxlen = SCANLEN;
-    if(scanlen>maxlen)
-    {  fprintf(logfile, "\nOutput scan (size %ld) truncated to %d ",
-               scanlen, maxlen);
-       scanlen = maxlen;
-    }
-    fb = (float *)cb;
-    fprintf(logfile,"\nLSCAN_F2U: len=%ld f0=%8.5f f1=%8.5f ",
-       scanlen, ieee_to_real(fb,vf), ieee_to_real(&fb[1],vf));
-    fflush(logfile);
-    
-    for(ii=0; ii<scanlen; ii++)
-    {  ff = ieee_to_real((fb+ii), vf);
-       real_to_ieee( ff, (up.series+ii), vf[0]);
-    }
-}
-
-
-
-/***********************************************************************
- * DMAX_F2U - FITS to UNIPOPS conversion - get DATAMAX and put it into *
- *   up.ux->datamax for use by the summary (-s) option                 *
- ***********************************************************************/
- dmax_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult,*vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   up.ux->datamax = dub[0];
-}
-
-
-/***********************************************************************
- * DMIN_F2U - FITS to UNIPOPS conversion - get DATAMIN and put it into *
- *   up.ux->datamin for use by the summary (-s) option                 *
- ***********************************************************************/
- dmin_f2u(i,vf,cb,sht,flt,dub,intype,inmult,ubuf)
-int i, inmult,*vf;
-char   *cb, intype, *ubuf;
-short  *sht;
-float  *flt;
-double *dub;
-{
-   up.ux->datamin = dub[0];
-}
-
-
-
-/*************************************************************************
- * UTDATE_u2f - insert the Date in the output array.                     *
- *  Convert UNIPOPS date in form YYYY.MMDD (d.p.number)                  *
- *  FITS format DATE-OBS string:  yyyy-mm-dd                             *
- *   sflag = 7                                                           *
- *************************************************************************/
-utdate_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    int nff,mm;
-    long yr, day, mmdd, mo;
-    double dd;
-    char tmpstr[10];
-    
-    /* UNIPOPS UT date is in form:  YYYY.MMDD */
-    yr = dub[0];    /* integer year */
-    dd = dub[0] - yr;
-    mmdd = (dd*10000.) + 0.48;
-    mo = mmdd/100;
-    day = mmdd - mo*100;
-    if (y2k) {
-      /* use the y2k compliant FITS date form */
-      sprintf(tmpstr, "%04ld-%02ld-%02ld", yr, mo, day);
-    } else {
-      /* use the original FITS date form */
-      sprintf(tmpstr, "%02ld/%02ld/%02ld", day, mo, (yr-1900));
-    }
-    
-    nff = (tt+i)->foff;
-    for(mm=0; mm<(tt+i)->mform; mm++)  tbuf[nff+mm] = tmpstr[mm];
-} 
-
-
-/*********************************************************************
- * UTDATE_f2u - get the Date from the FITS file.                     *
- *  sflag = 7                                                        *
- *********************************************************************/
-utdate_f2u(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-    int dd,mm,yy;
-    double utd;
-    
-
-    /* examine the date, its either old, dd/mm/yy, or new yyyy-mm-dd */
-    /* There's no simple way to handle the extra times possible */
-    /* in the new format, so we'll leave that for the rewrite and */
-    /* emit an warning message if we see any times like that */
-    if (cbuf[2] == '/') {
-      /* assume old format */
-      sscanf(cbuf, "%2d/%2d/%2d", &dd, &mm, &yy);
-      yy = yy + 1900;
-    } else if (cbuf[4] == '-') {
-      /* assume the new format */
-      sscanf(cbuf, "%4d-%2d-%2d", &yy, &mm, &dd);
-      /* warning message if there's a T at cbuf[10] */
-      if (cbuf[10] == 'T') {
-	fprintf(stderr, "\nUnable to digest times in DATE fields : %s", cbuf);
-      }
-    } else {
-      /* unrecognized date format */
-      fprintf(stderr, "\nUnrecognized date format : %s",cbuf);
-    }
-    utd = yy + (mm + dd*0.01)*0.01;
-    vf[0] = 0;
-    dub_to_ieee(utd, &up.u3->utdate, vf[0],0);      
-} 
-
-/*********************************************************************
- * restfreq_u2f - get RESTFREQ if appropriate                        *
- *    This routine sets vf to 1 if the data is NOT LINE and is from  *
- *    the 12m (where the overloading is the problem)                 *
- *  sflag = 8                                                        *
- *********************************************************************/
-restfreq_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   int n;
-
-   if (strncmp(up.u1->obsmode,"LINE",4) != 0 &&
-        strncmp(up.u1->telescop,"NRAO 12M",8) == 0)
-      for (n=0;n<inmult;n++) vf[n] = 1;
-
-/*		norm_u2f does all the work                           */ 
-
-   norm_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf);
-}
-
-
-/*********************************************************************
- * restfreq_f2u - get the restfreq from the FITS file                *
- * sflag = 8                                                         *
- *********************************************************************/
-restfreq_f2u(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   dub_to_ieee(dub[0], &restfreq, vf[0], 0);
-}
-
-/*********************************************************************
- * freqres_u2f - get FREQRES if appropriate                          *
- *    This routine sets vf to 1 if the data is NOT LINE and is from  *
- *    the 12m (where the overloading is the problem)                 *
- *  sflag = 10                                                        *
- *********************************************************************/
-freqres_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   int n;
-
-   if (strncmp(up.u1->obsmode,"LINE",4) != 0 &&
-        strncmp(up.u1->telescop,"NRAO 12M",8) == 0)
-      for (n=0;n<inmult;n++) vf[n] = 1;
-
-/*		norm_u2f does all the work                           */ 
-
-   norm_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf);
-}
-
-/*********************************************************************
- * freqres_f2u - get the freqres from the FITS file                  *
- * sflag = 10                                                        *
- *********************************************************************/
-freqres_f2u(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   dub_to_ieee(dub[0], &freqres, vf[0], 0);
-}
-
-
-/*********************************************************************
- * dsf_u2f - use DSF if appropriate                                  *
- *    This routine sets vf to 1 if the data is LINE or is not from   *
- *    the 12m (where the overloading is the problem)                 *
- *  sflag = 11                                                       *
- *********************************************************************/
-dsf_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   int n;
-
-   if (strncmp(up.u1->obsmode,"LINE",4) == 0 ||
-        strncmp(up.u1->telescop,"NRAO 12M",8) != 0)
-      for (n=0;n<inmult;n++) vf[n] = 1;
-
-/*		norm_u2f does all the work                           */ 
-
-   norm_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf);
-}
-
-/*********************************************************************
- * dsf_f2u - get the dsf from the FITS file                          *
- * sflag = 11                                                        *
- *********************************************************************/
-dsf_f2u(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   dub_to_ieee(dub[0], &dsf, vf[0], 0);
-}
-
-/*********************************************************************
- * nt_u2f - use NT if appropriate                                    *
- *    This routine sets vf to 1 if the data is LINE or is not from   *
- *    the 12m (where the overloading is the problem)                 *
- *  sflag = 12                                                       *
- *********************************************************************/
-nt_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   int n;
-
-   if (strncmp(up.u1->obsmode,"LINE",4) == 0 ||
-        strncmp(up.u1->telescop,"NRAO 12M",8) != 0)
-      for (n=0;n<inmult;n++) vf[n] = 1;
-
-/*		norm_u2f does all the work                           */ 
-
-   norm_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf);
-}
-
-
-/*********************************************************************
- * nt_f2u - get the nt from the FITS file                            *
- * sflag = 12                                                        *
- *********************************************************************/
-nt_f2u(i,vf,cbuf, sht, flt, dub, intype, inmult, ubuf)
-int i, inmult,*vf;
-char *cbuf,*ubuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   dub_to_ieee(dub[0], &nt, vf[0], 0);
-}
-
-/*************************************************************************
- * DMAX_u2f - insert into the output buffer the value of DATAMAX, which  *
- *   was found earlier by L_pre_scan or C_pre_scan.                      *
- *   sflag = 17                                                          *
- *************************************************************************/
-dmax_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   int nff, nfr, jrec, mm;
-   char tmpstr[8];
-   float dmax;
-   
-   
-    nff = (tt+i)->foff;       /* offset position of start of scan  */
-    
-       dmax = up.ux->datamax;
-        
-       real_to_ieee(dmax, tmpstr,0);
-        for(mm=0; mm<4; mm++)
-           tbuf[nff+mm] = tmpstr[mm];  
-}
-
-
-/*************************************************************************
- * DMIN_u2f - insert into the output buffer the value of DATAMIN, which  *
- *   was found earlier by L_pre_scan or C_pre_scan.                      *
- *   sflag = 18                                                          *
- *************************************************************************/
-dmin_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
-{
-   int nff, nfr, jrec, mm;
-   char tmpstr[8];
-   float dmin;
-   
-    nff = (tt+i)->foff;       /* offset position of start of scan  */
-    
-       dmin = up.ux->datamin;
-       real_to_ieee(dmin, tmpstr, 0);
-       for(mm=0; mm<4; mm++)
-           tbuf[nff+mm] = tmpstr[mm];  
-}
-
-
-/**************************************************************************
- * LSCAN_u2f  - process the series or continuum scan, a vector of up to   *
- *   SCANLEN points.                                                        *
- *   sflag = 20                                                           *
- **************************************************************************/
-Lscan_u2f(i,vf,cbuf, sht, flt, dub, intype, inmult, tbuf)
-int i, inmult,*vf;
-char *cbuf,*tbuf, intype;
-short *sht;
-float *flt;
-double *dub;
- {
-    int jrec, nff, j, jj;
-    char tmpstr[16];
-    double ieee_to_dub();
-    
-    nff = (tt+i)->foff; /* offset position of start of series                */
-
-    /* make sure noint doesn't exceed ScanMult! */
-       jrec = ieee_to_dub(&up.u12->noint, vf);                     
-       if(jrec>ScanMult)   jrec = ScanMult;
-       
-       for(j=0, jj=nff; j<jrec; j++, jj+=4)
-           real_to_ieee(up.series[j], (tbuf+jj), 0);
-
-       /* set minimum max table width */
-       if(jj>maxTwid)  maxTwid = jj; 
-        
-      /* if ScanMult > jrec, fill rest of array with Nan's !! */
-       if(ScanMult>jrec)
-       { for(; j<ScanMult; j++, jj+=4)
-             real_to_ieee(up.series[0], (tbuf+jj), 1);
-       }
-        fprintf(logfile,"\nLscan_u2f: jrec=%d, ScanMult=%d, jj=%d",
-                            jrec,ScanMult,jj);
-        fprintf(logfile,", maxTwid=%d, maxmaxis1=%d ",maxTwid,maxmaxis1);
-        
-        if(maxmaxis1< jrec)  maxmaxis1 = jrec;
-
- } /****end of Lscan_u2f**********************************************/
-
-
-/**************************************************************************
- * L_PRE_SCAN  - process the series, a vector of up to SCANLEN points.      *
- *   Determines DATAMAX and DATAMIN for this vector and for the file.     *
- *   These are later put into the output file.           f                *
- **************************************************************************/
-L_pre_scan(k)
-UPOPS *k;
- {
-    int j, mm, jj, mxoff, dmaxoff;
-    int rpixoff, krpix, vf;
-    double ieee_to_dub();
-    
-    /* make sure number of integrations doesn't exceed ScanMult! */
-      mm = ieee_to_dub(&(k->u12->noint), &vf);
-    /* preview mode, just remember max no. of data points */
-      if (prev==1) if (maxmaxis1<mm) maxmaxis1 = mm;
-      else {
-         if(mm>ScanMult)
-         {  fprintf(logfile,"\nL_pre_scan  %d points in scan exceeds %d ", 
-                                         mm, ScanMult);
-            mm = ScanMult;
-            k->u12->noint = ScanMult;
-         }
-         for(j=0; j<mm; j++)
-         {   
-           if(k->series[j]>k->ux->datamax) 
-                         k->ux->datamax = k->series[j];
-           if(k->series[j]<k->ux->datamin)
-                      k->ux->datamin = k->series[j];
-           if(k->series[j]>DATAmax) 
-                  DATAmax = k->series[j];
-           if(k->series[j]<DATAmin) DATAmin = k->series[j];
-         }
-      }
- } /****end of L_pre_scan**********************************************/
-
diff -uNr 3.5/utilities/fits2uni unipops-3.6/utilities/fits2uni
--- 3.5/utilities/fits2uni	2000-03-16 11:29:44.000000000 -0700
+++ unipops-3.6/utilities/fits2uni	1969-12-31 17:00:00.000000000 -0700
@@ -1,195 +0,0 @@
-#!/bin/sh -f
-#
-#   @(#)fits2uni.sh	5.3 10/04/96
-#
-#******************************************************************
-# FITS2UNI -                                                      *
-# Script to read a FITS tape and convert to Sun UNIPOPS format.   *
-#   Updates:     July 2, 1991                                     *
-#   27 April 1992: Make sure tape is rewound at start, use non-rew*
-#        tape device.                                             *
-#******************************************************************
-echo " "
-echo "So you want to read a FITS file, eh?"
-echo " (to quit this dialog, type CNTRL-C)"
-#******************************************************************
-# Select disk or tape input here.                                 *
-#******************************************************************
-echo "Do you want to read a tape(T), or a disk file(D)? [default=D]: \c"
-read tod;
-tod=`echo $tod | tr "[a-z]" "[A-Z]"`;
-case $tod in
-D) ;;
-T) ;;
-*) tod="D";
-   echo "Using default ($tod).";;
-esac;
-if [ $tod = "D" ] 
-then
-#                          get name of input file
-  frepeat=0;
-  while [ $frepeat -eq 0 ]
-  do
-    echo "Please type name of FITS disk file: \c";
-    read infile;
-#                                       Did he type a file name?
-    if test -n "$infile";  then
-#                                       Does file exist?
-      if test -f "$infile"; then
-#                                       Is file readable?    
-        if test -r "$infile"; then
-#                                       Is file empty?
-          if test -s "$infile"; then
-             frepeat=1
-          else
-             echo "File $infile is empty."
-          fi;
-        else
-          echo "No permission to read $infile"
-        fi;
-      else
-        echo "File $infile does not exist."
-      fi;
-    else
-      echo "Try again (or CNTRL-C to quit)."  # file name bad.
-    fi;
-   done;
-  nscans=`f2u -c < $infile`;
-  echo "File $infile has $nscans scans.";
-#                          Reading from tape.
-else
-   trepeat=0;
-   while test $trepeat -eq 0;
-   do
-     if [ `isSolaris` = "YES" ]; then
-       echo " Please type tape drive unit number: /dev/rmt/\c"
-       read tapedev
-       if test -n "$tapedev"; then
-	 trepeat=1;
-	 tapedev=rmt/$tapedev;
-	 nrtapedev=${tapedev}bn;
-       fi;
-     else
-       echo " Please type tape drive device name: /dev/\c"
-       read tapedev
-       if test -n "$tapedev"; then
-	 trepeat=1;
-	 nrtapedev=n${tapedev};
-       fi;
-     fi;
-   done;
-fi;    # end of if tod=D
-#******************************************************************
-#  User selects output file here.                                 *
-#******************************************************************
-echo " ";
-echo "Type output UNIPOPS file name [default=LDATA]: \c";
-read outfile;
-if test -n "$outfile"; then
-  echo " ";
-else
-   outfile="LDATA";
-   echo "Using default ($outfile).";
-fi;
-if test -f "$outfile"; then   # test if file exists
-   echo "OK to delete present $outfile (Y,N)?? \c"
-   read response;
-   response=`echo $response | tr "[a-z]" "[A-Z]"`;
-   case $response in
-   Y|YE|YES)  rm -f $outfile;;
-   N)  exit 0;;
-   *)  exit 0;;
-   esac;
-fi;
-echo "Type maximum scan capacity for $outfile [default=100]: \c"
-read maxscan;
-if test -n "$maxscan"; then
-  echo " ";
-else
-  maxscan="100";
-  echo "Using default ($maxscan).";
-fi;
-#******************************************************************
-#  User may skip files on the tape before reading a file.         *
-#******************************************************************
-qrepeat=0;
-while test $qrepeat -eq 0;   # repeat for successive tape files.
-do
-if [ $tod = "T" ]
-then
-  echo "Do you want to skip any files on the tape? (y,n)\c";
-  read response;
-  response=`echo $response | tr "[a-z]" "[A-Z]"`;
-  case $response in
-  Y|YE|YES)echo " How many files?\c";
-          read numtoskip;
-          if test -n "$numtoskip"; then
-            noskip=0;
-          else
-            noskip=1;
-            numtoskip=0;
-          fi;;
-  *)        noskip=1;
-          numtoskip=0;;
-  esac;
-#******************************************************************
-#  Review the Choices and ask for confirmation.                   *
-#******************************************************************
-  echo "-----------------------------------------------------";
-  echo "Ready to read FITS tape on /dev/$tapedev"
-  echo "  Will skip $numtoskip files."; 
-  echo " Make sure the tape is loaded in the drive now."
-else
-#                    This is the disk file input case
-  qrepeat=1;      # prevent looping - only one file in disk case.
-  echo "-----------------------------------------------------";
-  echo "Ready to read FITS data from file $infile";
-fi;
-echo "Output will go to $outfile file.";
-echo " is this ok? (type Y to proceed) \c";
-read response;
-response=`echo $response | tr "[a-z]" "[A-Z]"`;
-case $response in
-Y|YE|YES) echo " ";;
-*)        echo "Bye, now!";
-          exit 0 ;;
-esac;
-#******************************************************************
-#  Make the output file index.                                    *
-#******************************************************************
-echo "makeempty.exe $outfile $maxscan"
-      makeempty.exe $outfile $maxscan;
-#******************************************************************
-#  Make the desired command strings, and run the commands.        *
-#******************************************************************
-if [ $tod = "T" ]
-then
-mt -f /dev/$tapedev rew
-if test $numtoskip -ne 0; then
-   echo "mt -f /dev/$nrtapedev fsf $numtoskip"
-     mt -f /dev/$nrtapedev fsf $numtoskip
-fi;
-#
-echo "dd if=/dev/$nrtapedev ibs=28800 obs=2880 | f2u -u >> $outfile";
-    dd if=/dev/$nrtapedev ibs=28800  obs=2880 | f2u -u >> $outfile;
-#******************************************************************
-#  Read more files from tape??                                    *
-#******************************************************************
-echo " "
-echo "Do you want to read another file from the tape? (y/n)\c";
-read response;
-response=`echo $response | tr "[a-z]" "[A-Z]"`;
-case $response in
-Y|YE|YES) echo " ";;
-*)       echo "mt -f /dev/$tapedev rew";
-         echo "Rewinding tape...";
-           mt -f /dev/$tapedev rew;
-          qrepeat=1;;
-esac;
-else          # else of if tod=t
-echo "cat $infile | f2u -u >> $outfile";
-        cat $infile | f2u -u >> $outfile;
-fi;
-done
-echo "makeindex.exe $outfile";
-makeindex.exe $outfile;
diff -uNr 3.5/utilities/head.mask unipops-3.6/utilities/head.mask
--- 3.5/utilities/head.mask	2000-03-16 11:29:47.000000000 -0700
+++ unipops-3.6/utilities/head.mask	1969-12-31 17:00:00.000000000 -0700
@@ -1,36 +0,0 @@
-SIMPLE  =                    T      /      Spectral line data cube....          
-BITPIX  =                   16      / Processed via UniPops CUBE utility        
-NAXIS   =                    3      /                                           
-NAXIS1  =                    1      /                                           
-NAXIS2  =                    1      /                                           
-NAXIS3  =                    1      /                                           
-CTYPE1  = 'VELO    '                /                                           
-CRVAL1  =      0.000000000E+00      /                                           
-CDELT1  =      0.000000000E+00      /                                           
-CRPIX1  =      1.000000000E+00      /                                           
-COMMENT E1     0.000000000E+00      / Parameter for CUBE.  Error in velocity    
-CTYPE2  = '        '                /                                           
-CRVAL2  =      0.000000000E+00      /                                           
-CDELT2  =      0.000000000E+00      /                                           
-CRPIX2  =      1.000000000E+00      /                                           
-COMMENT E2     0.000000000E+00      / Parameter for CUBE.  Error in H position  
-CTYPE3  = '        '                /                                           
-CRVAL3  =      0.000000000E+00      /                                           
-CDELT3  =      0.000000000E+00      /                                           
-CRPIX3  =      1.000000000E+00      /                                           
-COMMENT E3     0.000000000E+00      / Parameter for CUBE.  Error in V position  
-COMMENT A '        '                / Better description of coordinate system   
-OBJECT  = '                '        /                                           
-ORIGIN  = 'NRAO-GB '                /                                           
-DATE    =                           /                                           
-BLANK   =               -32768      /                                           
-BSCALE  =      1.000000000E+00      /                                           
-BZERO   =      0.000000000E+00      /                                           
-BUNIT   = 'K       '                /                                           
-DATAMIN =     -3.276700000E+04      /                                           
-DATAMAX =      3.276700000E+04      /                                           
-EQUINOX =      1.950000000E+03      /                                           
-COMMENT 1                                                                       
-COMMENT 2                                                                       
-COMMENT 3                                                                       
-END                                                                             
diff -uNr 3.5/utilities/keep.label unipops-3.6/utilities/keep.label
--- 3.5/utilities/keep.label	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/keep.label	1969-12-31 17:00:00.000000000 -0700
@@ -1 +0,0 @@
-NRAO 140-FOOT MODCOMP USERTAPE                                              999    
diff -uNr 3.5/utilities/ldump unipops-3.6/utilities/ldump
--- 3.5/utilities/ldump	2000-03-16 11:29:45.000000000 -0700
+++ unipops-3.6/utilities/ldump	1969-12-31 17:00:00.000000000 -0700
@@ -1,14 +0,0 @@
-#!  /bin/csh
-#
-#   @(#)ldump.sh	5.2 08/02/94
-#
-# Determines whether to call ldump or ldump.rmt
-#
-if (`hostname` == "fahd") then
-   ${popsdir}utilities/ldump.exe $argv
-   exit($status)
-else
-   ${popsdir}utilities/ldump.rmt.exe $argv
-   exit($status)
-endif
-#
diff -uNr 3.5/utilities/mergesdd unipops-3.6/utilities/mergesdd
--- 3.5/utilities/mergesdd	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/mergesdd	1969-12-31 17:00:00.000000000 -0700
@@ -1,143 +0,0 @@
-#!/bin/csh -f
-#  @(#)mergesdd.sh	5.2 10/27/94
-#
-#  Merges two sdd files, producing a third sdd file.
-#
-#  Usage: mergesdd file1 file2 newfile
-#
-if ($#argv != 3) then
-   echo "Usage: mergesdd file1 file2 newfile"
-   exit(1)
-endif
-#
-set file1 = $1
-if (! -r $file1) then
-   echo "mergesdd: can not access $file1"
-   exit(1)
-endif
-#
-set file2 = $2
-if (! -r $file2) then
-   echo "mergesdd: can not access $file2"
-   exit(1)
-endif
-#
-set newfile = $3
-if (-e $newfile) then
-   echo "mergesdd: $newfile exists, can not overwrite! "
-   exit(1)
-endif
-#		make sure we can create the new file
-touch $newfile
-if ($status != 0) then
-   echo "mergesdd: can not create $newfile"
-   exit(1)
-endif
-/bin/rm -f $newfile
-#
-set bs = `bootstrap $file1 512 LONG`
-if ($status != 0) then
-   echo "mergesdd: problem reading bootstrap block of $file1"
-   exit(1)
-endif
-if ( $bs[10] != 1 ) then
-   set bs = `bootstrap $file1 512 SHORT`
-   if ($status != 0) then
-      echo "mergesdd: problem reading bootstrap block of $file1"
-      exit(1)
-   endif
-#
-   set nindex1 = $bs[2]
-   set bssize1 = $bs[4]
-   set recsize1 = $bs[5]
-   set nused1 = $bs[6]
-   set ntype1 = $bs[8]
-else
-   set nindex1 = $bs[2]
-   set bssize1 = $bs[4]
-   set recsize1 = $bs[5]
-   set nused1 = $bs[7]
-   set ntype1 = $bs[9]
-endif
-#
-if ($bssize1 != 512 || $recsize1 <= 0 || $nindex1 <= 0) then
-   echo "mergesdd: $file1 is not an SDD file."
-   exit(1)
-endif
-#
-set bs = `bootstrap $file2 512 LONG`
-if ($status != 0) then
-   echo "mergesdd: problem reading bootstrap block of $file2"
-   exit(1)
-endif
-if ( $bs[10] != 1 ) then
-   set bs = `bootstrap $file2 512 SHORT`
-   if ($status != 0) then
-      echo "mergesdd: problem reading bootstrap block of $file2"
-      exit(1)
-   endif
-#
-   set nindex2 = $bs[2]
-   set bssize2 = $bs[4]
-   set recsize2 = $bs[5]
-   set nused2 = $bs[6]
-   set ntype2 = $bs[8]
-else
-   set nindex2 = $bs[2]
-   set bssize2 = $bs[4]
-   set recsize2 = $bs[5]
-   set nused2 = $bs[7]
-   set ntype2 = $bs[9]
-endif
-#
-if ($bssize2 != 512 || $recsize2 <= 0 || $nindex2 <= 0) then
-   echo "mergesdd: $file2 is not an SDD file."
-   exit(1)
-endif
-#
-if ($ntype2 != $ntype1) then
-   echo "mergesdd: both files are NOT the same type."
-   echo "          $file1 is type $ntype1"
-   echo "          $file2 is type $ntype2"
-   exit(1)
-endif
-#
-@ totsize = $nused1 + $nused2
-#
-makeempty.exe $newfile $totsize
-if ($status != 0) then
-   echo "mergesdd: problems making empty $newfile."
-   /bin/rm -f $newfile
-   exit(1)
-endif
-#
-dd if=$file1 bs=512 skip=$nindex1 >> $newfile
-if ($status != 0) then
-   echo "mergesdd: problems copying data from $file1 to $newfile."
-   /bin/rm -f $newfile
-   exit(1)
-endif
-#
-dd if=$file2 bs=512 skip=$nindex2 >> $newfile
-if ($status != 0) then
-   echo "mergesdd: problems copying data from $file2 to $newfile."
-   /bin/rm -f $newfile
-   exit(1)
-endif
-#
-if ($ntype1 == 1) then
-   makerecindex.exe $newfile > /dev/null
-   if ($status != 0) then
-      echo "mergesdd: problems indexing $newfile."
-      /bin/rm -f $newfile
-      exit(1)
-   endif
-else
-   makeindex.exe $newfile > /dev/null
-   if ($status != 0) then
-      echo "mergesdd: problems indexing $newfile."
-      /bin/rm -f $newfile
-      exit(1)
-   endif
-endif
-#
diff -uNr 3.5/utilities/new2old unipops-3.6/utilities/new2old
--- 3.5/utilities/new2old	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/new2old	1969-12-31 17:00:00.000000000 -0700
@@ -1,80 +0,0 @@
-#! /bin/csh -f
-#
-# Converts new SDD format into old
-#
-set com = $0
-#
-if ($#argv != 2) then
-    echo Needs two arguments.
-    echo Usage: $com:t input_file output_file
-    exit(1)
-endif
-#
-set MAKEINDEX = old
-if ($?popsdir == 1) then
-  if ( -e $popsdir/utilities/makeoldindex.exe ) set MAKEINDEX = new
-endif
-#
-set infile = $1
-set outfile = $2
-#
-if (! -e $infile) then
-    echo Input file must exist.
-    echo Usage: $com:t input_file output_file
-    exit(1)
-endif
-#
-more:
-if (-e $outfile) then
-    echo -n "Overwrite $outfile (y or n)? "
-    set answr = $<
-    if ($answr == "y" || $answr == "Y") then
-	rm $outfile
-	goto more
-    else if($answr == "n" || $answr == "N") then
-	echo " "
-	exit(0)
-    else
-	echo " "
-	echo "WARNING: Incorect entry... Try again"
-	goto more
-    endif
-endif
-#
-set bb = `bootstrap $infile 512 LONG`
-if ($status != 0) goto err
-if ( $bb[10] != 1) then
-     echo " "
-     echo $infile appears to already be in the old SDD format, no conversion
-     echo $outfile has not been created
-     exit(0)
-else
-      set typesdd = $bb[9]
-      set skiprec = $bb[2]
-      set recl = $bb[4]
-      @ nscans=($bb[2] - 1 ) * $bb[4] / $bb[5]
-endif
-echo $nscans
-#
-if ($MAKEINDEX == new) then
-   cp $infile $outfile
-   if ($status != 0) goto err
-   makeoldindex.exe $outfile > /dev/null
-   if ($status != 0) goto err
-else
-   makeempty.exe $outfile $nscans
-   if ($status != 0) goto err
-   dd if=$infile bs=$recl skip=$skiprec >> $outfile
-   if ($status != 0) goto err
-   makeindex.exe $outfile > /dev/null
-   if ($status != 0) goto err
-endif
-#
-exit(0)
-#
-err:
-   echo "Some problem encountered in converting data."
-   exit(256)
-#
-# That is it
-
diff -uNr 3.5/utilities/pdfl2sdd unipops-3.6/utilities/pdfl2sdd
--- 3.5/utilities/pdfl2sdd	2000-03-16 11:29:46.000000000 -0700
+++ unipops-3.6/utilities/pdfl2sdd	1969-12-31 17:00:00.000000000 -0700
@@ -1,91 +0,0 @@
-#!/bin/sh
-#	script using cvtpdflsdd.exe to convert from pdfl to sdd format
-#	without requiring the user to remember more than on command
-#
-#	In case anyone is interested, this uses the bourne shell because
-#	of the need to examine the stderr output of cvtpdflsdd.exe without
-#	tampering with the stdout output which is the converted data.
-#	You can't do that with the c-shell.
-#
-#	Usage: pdfl2sdd pdfl_file sdd_file
-#
-if [ $# -ne 2 ]; then
-   echo Usage: pdfl2sdd pdfl_file sdd_file
-   exit 1
-fi
-
-if [ ! -r $1 ]; then
-   echo $1 does not exist or has the wrong permissions.
-   exit 1
-fi
-
-if [ -f $2 ]; then
-   echo $2 already exists.  pdfl2sdd will not overwrite a file.
-   exit 1
-fi
-
-#		Do the actual conversion
-echo Begin converting $1 to sdd format file $2 ...
-cvtpdflsdd.exe $1 > $2 2> /tmp/cvt.$$
-if [ $? -ne 0 ]; then
-   cat /tmp/cvt.$$
-   echo There was a problem during conversion, bailing out ...
-   /bin/rm -f $2
-   /bin/rm -f /tmp/cvt.$$
-   exit 1
-fi
-cat /tmp/cvt.$$
-
-#		Is the output sddfile index really large enough
-#		Get number of scans converted from output of cvtpdflsdd.exe
-nscans=`cat /tmp/cvt.$$ | awk ' /Finished/ { print $3 } '`
-if [ $? -ne 0 ]; then
-   echo Warning : can not determine number of scans converted.  $2 may be too small.
-   nscans = 0
-fi
-
-/bin/rm -f /tmp/cvt.$$
-#		Get the bootstrap info from the sddfile (first 4 words only)
-#		Assumes new style sdd format (which is all cvtpdflsdd produces)
-bs=`bootstrap $2 16 LONG`
-if [ $? -ne 0 ]; then
-   echo Can not extract index info from $2, bailing out.
-   exit 1
-fi
-#		Put these values into variables
-eval `echo $bs | awk ' { print sprintf("nir=%s rs=%s ies=%s",$2,$4,$5) } '`
-if [ $? -ne 0 ]; then
-   echo Can not extract index info from $2, bailing out.
-   exit 1
-fi
-#		Combine them to find out size of index
-if [ $ies -ne 0 ]; then
-   maxnscans=`echo "($nir - 1) * $rs / $ies" | bc`
-   if [ $? -ne 0 ]; then
-      echo Warning : Can not determine size of the index in $2, it may be too small.
-      maxnscans=$nscans
-   fi
-else
-   echo Warning : Can not determine size of the index in $2, it may be too small.
-   maxnscans=$nscans
-fi
-
-#		Do we need to expand the sdd file?
-if [ $maxnscans -lt $nscans ]; then
-   echo "Expanding size of $2"
-   expandsdd $2 $nscans
-   if [ $? -ne 0 ]; then
-      echo Can not expand $2 to its required size, bailing out.
-      exit 1
-   fi
-fi
-#		And finally, make the index.
-echo "Constructing index for $2"
-makeindex.exe $2 > /dev/null
-if [ $? -ne 0 ]; then
-   echo Warning : makeindex.exe exited with a non-zero status.
-   echo There may be a problem with the index for $2
-   exit 1
-fi
-echo Conversion finished.
-exit 0
diff -uNr 3.5/utilities/point/apch.f unipops-3.6/utilities/point/apch.f
--- 3.5/utilities/point/apch.f	2000-03-16 11:30:08.000000000 -0700
+++ unipops-3.6/utilities/point/apch.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,101 +0,0 @@
-      SUBROUTINE APCH(XDATA,YDATA,N,IP,XD,X0,WORK,IER)
-C-------------------------------------------------------------------------------
-C  @(#)apch.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c***********************************
-c* Modified 8903 [RJM] See CHANGES.DOC
-c***********************************
-C
-      integer*2 n, ip, ier, mt2, mt2m, i, m, j, k, ll, kk, jj, iend
-      real*4 xd, x0, xa, xe, xm, sum, df, t
-C                                   DIMENSIONED DUMMY VARIABLES
-      real*4 XDATA(*), YDATA(*), WORK(*)
-C
-C                      CHECK FOR FORMAL ERRORS IN SPECIFIED DIMENSIONS
-      IF(N-1)19,20,1
-    1 IF(IP)19,19,2
-C
-C                                 SMALLEST AND LARGEST ARGUMENT
-    2 IF(IP-N)3,3,19
-    3 XA=XDATA(1)
-      X0=XDATA(N)
-      XE=0.
-C
-C                         INITIALIZE CALCULATION OF NORMAL EQUATIONS
-      XD=X0-XA
-      M=(IP*(IP+1))/2
-      IEND=M+IP+1
-      MT2=IP+IP
-      MT2M=MT2-1
-C
-C                       SET WORKING STORAGE AND RIGHT HAND SIDE TO ZER
-      DO 8 I=1,IP
-         J=MT2-I
-         WORK(J)=0.
-         WORK(I)=0.
-         K=M+I
-    8    WORK(K)=0.
-C
-C                            CHECK FOR DEGENERATE ARGUMENT RANGE
-      IF(XD)20,20,9
-C
-C                       CALCULATE CONSTANTS FOR REDUCTION OF ARGUMENTS
-    9 X0=-(X0+XA)/XD
-      XD=2./XD
-      SUM=0.
-C
-C                            START GREAT LOOP OVER ALL GIVEN POINTS
-      DO 15 I=1,N
-         T=XDATA(I)*XD+X0
-         DF=YDATA(I)
-C
-C                            CALCULATE AND STORE VALUES OF CHEBYSHEV
-C                                       POLYNOMIALS FOR ARGUMENT T
-         XA=1.
-         XM=T 
-C                                        WEIGHTING REMOVED
-   11    T=T+T
-         SUM=SUM+DF*DF
-         DF=DF+DF
-         J=1
-   12    K=M+J
-         WORK(K)=WORK(K)+DF*XA
-   13    WORK(J)=WORK(J)+XA
-         IF(J-MT2M)14,15,15
-   14    J=J+1
-         XE=T*XM-XA
-         XA=XM
-         XM=XE
-         IF(J-IP)12,12,13
-   15    CONTINUE
-      WORK(IEND)=SUM+SUM
-C
-C                             CALCULATE MATRIX OF NORMAL EQUATIONS
-      LL=M
-      KK=MT2M
-      JJ=1
-      K=KK
-      DO 18 J=1,M
-         WORK(LL)=WORK(K)+WORK(JJ)
-         LL=LL-1
-         IF(K-JJ)16,16,17
-   16    KK=KK-2
-         K=KK
-         JJ=1
-         GO TO 18
-   17    JJ=JJ+1
-         K=K-1
-   18    CONTINUE
-      IER=0
-      RETURN
-C
-C                           ERROR RETURN IN CASE OF FORMAL ERRORS
-   19 IER=-1
-      RETURN
-C
-C                         ERROR RETURN IN CASE OF COINCIDING ARGUMENTS
-   20 IER=1
-      RETURN
-      END
-
-
diff -uNr 3.5/utilities/point/apfs.f unipops-3.6/utilities/point/apfs.f
--- 3.5/utilities/point/apfs.f	2000-03-16 11:30:09.000000000 -0700
+++ unipops-3.6/utilities/point/apfs.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,104 +0,0 @@
-      SUBROUTINE APFS (WORK,IP,IRES,IOP,EPS,ETA,IER)
-C-------------------------------------------------------------------------------
-C  @(#)apfs.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-C*******************************************
-* Modified 8903 [RJM] See CHANGES.DOC
-c*******************************************
-      integer*2 ip, ires, iop, ier, ipiv, ite, ipp1, iend, i, ja, je, 
-     .          jk, k, iadr, jj, j
-      real*4 eps, eta, tol, test, sum, piv
-      real*4 WORK(*)
-      IRES=0
-C
-C                                       Test specified dimension.
-      IF (IP.GT.0) GO TO 2
-         IER=-1
-         RETURN
-C
-C        INITIALIZE FACTORIZATION PROCESS
-    2 IPIV=0
-      IPP1=IP+1
-      IER=1
-      ITE=IP*IPP1/2
-      IEND=ITE+IPP1
-      TOL=ABS(EPS*WORK(1))
-      TEST=ABS(ETA*WORK(IEND))
-C
-C          START LOOP OVER ALL ROWS OF WORK
-      DO 11 I=1,IP
-       IPIV=IPIV+I
-        JA=IPIV-IRES
-        JE=IPIV-1
-C
-C          FORM SCALAR PRODUCT NEEDED TO MODIFY CURRENT ROW ELEMENTS
-        JK=IPIV
-        DO 9 K=I,IPP1
-        SUM=0.
-        IF (IRES)5,5,3
-    3   JK=JK-IRES
-        DO 4 J=JA,JE
-           SUM=SUM+WORK(J)*WORK(JK)
-    4       JK=JK+1
-    5    IF (JK-IPIV)6,6,8
-C
-C                                   TEST FOR LOSS OF SIGNIFICANCE
-    6    SUM=WORK(IPIV)-SUM
-         IF (SUM-TOL) 12,12,7
-    7    SUM=SQRT(SUM)
-         WORK(IPIV)=SUM
-         PIV=1./SUM
-         GOTO 9
-C
-C                                      UPDATE OFF-DIAGONAL TERMS
-    8    SUM=(WORK(JK)-SUM)*PIV
-         WORK(JK)=SUM
-    9    JK=JK+K
-C
-C           UPDATE SQUARE SUM OF ERRORS
-         WORK(IEND)=WORK(IEND)-SUM*SUM
-C
-C                            RECORD ADDRESS OF LAST PIVOT ELEMENT
-         IRES=IRES+1
-         IADR=IPIV
-C
-C                              TEST FOR TOLERABLE ERROR IF SPECIFIED
-         IF (IOP) 10,11,11
-   10    IF (WORK(IEND)-TEST) 13,13,11
-   11    CONTINUE
-      IF (IOP) 12,22,12
-C
-C                             PERFORM BACK SUBSTITUTION IF SPECIFIED
-   12 IF (IOP) 14,23,14
-   13 IER=0
-   14 IPIV=IRES
-   15 IF (IPIV)23,23,16
-   16 SUM=0.
-      JA=ITE+IPIV
-      JJ=IADR
-      JK=IADR
-      K=IPIV
-      DO 19 I=1,IPIV
-        WORK(JK)=(WORK(JA)-SUM)/WORK(JJ)
-        IF (K-1)20,20,17
-   17   JE=JJ-1
-        SUM=0.
-        DO 18 J=K,IPIV
-           SUM=SUM+WORK(JK)*WORK(JE)
-           JK=JK+1
-  18       JE=JE+J
-         JK=JE-IPIV
-         JA=JA-1
-         JJ=JJ-K
-   19    K=K-1
-   20 IF (IOP/2)21,23,21
-   21 IADR=IADR-IPIV
-      IPIV=IPIV-1
-      GOTO 15
-C
-C                                           NORMAL RETURN
-   22 IER=0
-   23 RETURN
-      END
-
-
diff -uNr 3.5/utilities/point/baseline.f unipops-3.6/utilities/point/baseline.f
--- 3.5/utilities/point/baseline.f	2000-03-16 11:30:10.000000000 -0700
+++ unipops-3.6/utilities/point/baseline.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,29 +0,0 @@
-      SUBROUTINE BASELINE
-c
-c     @(#)baseline.f	5.1 06/22/94
-c
-      INTEGER*2 IBUF(2560), istart, istop, ibase, ires, jj, npts
-      REAL    XDATA(600), YDATA(600), BPARM(15), x0, xd, x, y, t
-c
-      include 'condappl.inc'
-      include 'concfmt.inc'
-c
-      EQUIVALENCE (IBUF(1),RBUF(1))
-c
-      ISTART=IBUF(JBEG)
-      ISTOP=IBUF(JEND)
-      NPTS=ISTOP-ISTART+1
-         CALL PREP ( IBASE,XDATA,YDATA)
-         CALL SHAPE (IBASE,XDATA,YDATA,BPARM,IRES)
-         X0=BPARM(14)
-         XD=BPARM(15)
-         X=FLOAT(ISTART)
-         DO 16 JJ=ISTART,ISTOP
-            T=X*XD+X0
-            CALL CNPS (Y,T,BPARM,IRES)
-            RBUF(JJ)=RBUF(JJ)-Y
-  16        X = X + 1.0
-  18     CONTINUE
-      RETURN
-      END
-C
diff -uNr 3.5/utilities/point/cnps.f unipops-3.6/utilities/point/cnps.f
--- 3.5/utilities/point/cnps.f	2000-03-16 11:30:10.000000000 -0700
+++ unipops-3.6/utilities/point/cnps.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,28 +0,0 @@
-      SUBROUTINE CNPS (Y,X,C,N)
-C-------------------------------------------------------------------------------
-C  @(#)cnps.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c**********************************
-c  Modified 8903 [RJM] See CHANGES.DOC
-c**********************************
-      integer*2 n, i, k
-      real*4 C(*), y, x, c, h1, h0, arg, h2
-c
-      IF (N-2) 3,4,4
-   3  Y=C(1)
-      RETURN
-C
-   4  ARG=X+X
-      H1=0.0
-      H0=0.0
-C
-      DO 5 I=1,N
-         K=N-I
-         H2=H1
-         H1=H0
-   5     H0=ARG*H1 -H2+C(K+1)
-      Y=0.5*(C(1)-H2+H0)
-      RETURN
-      END
-
-
diff -uNr 3.5/utilities/point/concfmt.inc unipops-3.6/utilities/point/concfmt.inc
--- 3.5/utilities/point/concfmt.inc	2000-03-16 11:30:09.000000000 -0700
+++ unipops-3.6/utilities/point/concfmt.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,26 +0,0 @@
-c     @(#)concfmt.inc	5.1 06/22/94
-C------------------------------------%INC CFMT
-C                                     common /CFMT/
-C
-      integer*2 KSNO, KOSN, KSNA, KONO, KONA, KJD,  KSDY, KMON,
-     .                KDAY, KYR,  KLST, KEST, KTEL, KTOS, KSTC, KMD,
-     .                KIR,  KLR,  KIN,  KST,  KSP,  KVRF, KVDF, KPOC,
-     .                KDIR, KSW1, KSRT, KEOP, KHR,  KVR,  KIRA, KIDC,
-     .                KFOC, KORI, KZEN, KDOR, KEV,  KARA, KADC, K50R,
-     .                K50D, KGL,  KGB,  KOH,  KOV,  KRHO, KTHE, KNT,
-     .                KSTP, KCV,  KDV,  KVS,  KINT, KBW,  KRMS, KCF,
-     .                KRF,  KCFM, KL1,  KLA,  KLB,  KAC,  KPCS, KCZV,
-     .                KSS,  KRS,  JSSN, JERA, JRHO, JTHE, JNT,  JDB,
-     .                jcv,  jcf,  jbeg, jend, jmb,  jme,  jfe
-C
-      COMMON /FORMAT/ KSNO, KOSN, KSNA, KONO, KONA, KJD,  KSDY, KMON,
-     .                KDAY, KYR,  KLST, KEST, KTEL, KTOS, KSTC, KMD,
-     .                KIR,  KLR,  KIN,  KST,  KSP,  KVRF, KVDF, KPOC,
-     .                KDIR, KSW1, KSRT, KEOP, KHR,  KVR,  KIRA, KIDC,
-     .                KFOC, KORI, KZEN, KDOR, KEV,  KARA, KADC, K50R,
-     .                K50D, KGL,  KGB,  KOH,  KOV,  KRHO, KTHE, KNT,
-     .                KSTP, KCV,  KDV,  KVS,  KINT, KBW,  KRMS, KCF,
-     .                KRF,  KCFM, KL1,  KLA,  KLB,  KAC,  KPCS, KCZV,
-     .                KSS,  KRS,  JSSN, JERA, JRHO, JTHE, JNT,  JDB,
-     .                jcv,  jcf,  jbeg, jend, jmb,  jme,  jfe
-C
diff -uNr 3.5/utilities/point/condappl.inc unipops-3.6/utilities/point/condappl.inc
--- 3.5/utilities/point/condappl.inc	2000-03-16 11:30:09.000000000 -0700
+++ unipops-3.6/utilities/point/condappl.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-c
-c     @(#)condappl.inc	5.1 06/22/94
-c
-      integer*2 bpct, epct, gok
-      real*4 rbuf, center, height, hwidth, herr
-      common /core/ rbuf(1280), bpct, epct, center, height,
-     .              hwidth, herr, gok
-
diff -uNr 3.5/utilities/point/coneappl.inc unipops-3.6/utilities/point/coneappl.inc
--- 3.5/utilities/point/coneappl.inc	2000-03-16 11:30:09.000000000 -0700
+++ unipops-3.6/utilities/point/coneappl.inc	1969-12-31 17:00:00.000000000 -0700
@@ -1,8 +0,0 @@
-c
-c     @(#)coneappl.inc	5.1 06/22/94
-c
-      integer*2 ifull, jh1, jh2, khpf, kvpf, kp1, kp2, kp3
-c
-      common /misc/     ifull, jh1, jh2, khpf, kvpf,
-     .                  kp1, kp2, kp3
-
diff -uNr 3.5/utilities/point/convolve.f unipops-3.6/utilities/point/convolve.f
--- 3.5/utilities/point/convolve.f	2000-03-16 11:30:10.000000000 -0700
+++ unipops-3.6/utilities/point/convolve.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,129 +0,0 @@
-      SUBROUTINE CONVOLVE
-c
-c     @(#)convolve.f	5.1 06/22/94
-c
-      INTEGER*2 CONDAR, IBUF(1), i, itype, npts, ipto, iby, ng, 
-     .		iptr, j, nconv, jc, jp, index, jmax  
-      REAL XMNRAD, rate, cosfac
-      DOUBLE PRECISION
-     +   ALPHA, CONVS(116), CTR, DEXPON, DL2, DPI, DXMNRD, FWHM,
-     +   GPROF(22), PSCAN(137), SIGMA, SMAX, SS, SUM, S2, WEIG, X0,
-     +   Y1, Y2, Y3, QUOT1, QUOT2, dfloat
-c
-      include 'condappl.inc'
-      include 'coneappl.inc'
-      include 'concfmt.inc'
-c
-      EQUIVALENCE (IBUF, RBUF)
-c
-      DATA CONDAR, XMNRAD /3, 3437.75/
-C
-C::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-C
-C                   Statement function definition
-      DFLOAT (I) = DBLE (FLOAT (I))
-C
-      ITYPE = IBUF(KTOS)
-      IF (ITYPE .NE. CONDAR) GO TO 9000
-      NPTS = IBUF(KIN)
-C
-C                   Do one buffer only
-      IF (NPTS .GT. IFULL) GO TO 9000
-      IPTO = JDB
-C***  IBY = IBUF(KLR) + 4
-C***  IF (MOD (IBY, 2) .NE. 0) IBY = IBY + 1
-         IBY = 1
-C
-      DPI = 4.D0 * DATAN (1.D0)
-      DXMNRD = 60.D0 * 180.D0 / DPI
-      DL2 = DLOG (2.D0)
-      RATE = ABS (RBUF(KHR + IABS (IBUF(KDIR)) - 1))
-      IF (RATE .EQ. 0.) GO TO 9000
-      COSFAC = 1.
-      IF (IABS (IBUF(KDIR)) .EQ. 1) COSFAC = COS (RBUF(JERA + 3))
-      FWHM = 4.D0 * DL2
-C
-C                   Full width half max (samples - 1)
-      SIGMA = (60.D0 / DXMNRD) / DBLE (RATE * RBUF(KSRT)
-     +   * COSFAC / HWIDTH)
-C
-C                   Gaussian denominator
-      S2 = SIGMA ** 2 / FWHM
-C
-C                   Number of points in convolving beam
-      NG = IDINT (SIGMA + 1.5D0)
-C
-C                   Center sample of Gaussian beam
-      CTR = DFLOAT (NG / 2 + 1)
-C
-C                   Copy the scan into working array
-      IPTR = IPTO
-      DO 1000 J = 1, NPTS
-         PSCAN(J) = DBLE (RBUF(IPTR))
-         IPTR = IPTR + IBY
- 1000    CONTINUE
-C
-C                   Create the convolving beam
-C                   (zero beyond FWHM)
-      WEIG = 0.D0
-      DO 2000 J = 1, NG
-         GPROF(J) = 0.D0
-         DEXPON = (DFLOAT (J) - CTR) ** 2 / S2
-         IF (DEXPON .GT. DL2) GO TO 2000
-            GPROF(J) = DEXP (-DEXPON)
-            WEIG = WEIG + GPROF(J)
- 2000    CONTINUE
-C
-C                   Compute the convolution sums
-      NCONV = NPTS - NG + 1
-      SMAX = -1.D76
-      DO 4000 JC = 1, NCONV
-         SUM = 0.D0
-         DO 3000 JP = 1, NG
-            INDEX = JP + JC - 1
-            SUM = SUM + GPROF(JP) * PSCAN(INDEX)
- 3000       CONTINUE
-C
-         CONVS(JC) = SUM
-C
-C                   Update max
-         IF (SUM .LE. SMAX) GO TO 4000
-            SMAX = SUM
-            JMAX = JC
- 4000    CONTINUE
-C
-C                   Error if max on first or last point
-      IF (JMAX .EQ. 1 .OR. JMAX .EQ. NCONV) GO TO 9000
-C
-C                   Run an interpolating Gaussian
-C                   through max & two neighbors
-      Y1 = CONVS(JMAX - 1)
-      Y2 = CONVS(JMAX)
-      Y3 = CONVS(JMAX + 1)
-C
-      QUOT1 = Y2 / Y1
-      QUOT2 = Y2 / Y3
-      IF (QUOT1 .LE. 0.D0 .OR. QUOT2 .LE. 0.D0) GO TO 9000
-C
-      ALPHA = DLOG (QUOT1) / DLOG (QUOT2)
-C
-      X0 = .5D0 * (ALPHA - 1.D0) / (ALPHA + 1.D0)
-      SS = (2.D0 * X0 + 1.D0) / DLOG (Y2 / Y1)
-C
-      CENTER = FLOAT (JMAX - 1) + SNGL (CTR + X0)
-      HEIGHT = SNGL (Y2 / DEXP (-X0 ** 2 / SS)) / WEIG
-C
-      GO TO 99
-C
-C                   Error conditions
- 9000 CONTINUE
-      GOK = 1
-      WRITE (4, 90000)
-      GO TO 99
-C----------------------------------------------------------------------
- 99   CONTINUE
-      RETURN
-C-----------------------------------------------------------------------
-90000 FORMAT (' Convolution failed - - continuing')
-      END
-C
diff -uNr 3.5/utilities/point/cptgauss.f unipops-3.6/utilities/point/cptgauss.f
--- 3.5/utilities/point/cptgauss.f	2000-03-16 11:30:11.000000000 -0700
+++ unipops-3.6/utilities/point/cptgauss.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,78 +0,0 @@
-      SUBROUTINE GAUSS
-c
-c     @(#)cptgauss.f	5.1 06/22/94
-c
-      INTEGER*2 IHOLD(18),BGAUSS,EGAUSS
-      INTEGER*2 IBUF(2560), ipr, ity, istart, istop, kount, i, ii, mu,
-     .		ihw, ictr, npts
-      REAL    C(120), comp, sumsq, ht, half
-c
-      include 'condappl.inc'
-      include 'concfmt.inc'
-c
-      EQUIVALENCE (IBUF(1),RBUF(1))
-c
-      DATA IPR/4/, ITY/6/
-c
-      ISTART=IBUF(JBEG)
-      ISTOP=IBUF(JEND)
-      NPTS=ISTOP-ISTART+1
-      KOUNT=1
-      COMP=1E34
-      SUMSQ=0
-      DO 10 I=1,18
- 10      IHOLD(I)=0
-      HT = -1.E34
-C                                       FIND MAXIMUM POINT
-      DO 20 I = ISTART, ISTOP
-         IF (RBUF(I).LT.HT) GO TO 20
-         CENTER=FLOAT(I-JDB+1)
-         HT=RBUF(I)
-         ICTR=I
-  20     CONTINUE
-      HEIGHT=HT
-      HALF=HT*0.5
-      DO 22 I = ICTR,ISTOP
-         IF (RBUF(I).GT.HALF) GO TO 22
-         HWIDTH=(FLOAT(I-JDB+1)-CENTER)*2.0
-         IHW=(I-ICTR)
-         EGAUSS=I-JDB+1
-         BGAUSS=ICTR-IHW-JDB+1
-         IF (IHW.LT.3) GO TO 42
-         GO TO 24
-  22     CONTINUE
-C                                       Gaussian Fit Profile.
- 24   CALL LSQ (0,IHOLD,SUMSQ,BGAUSS,EGAUSS,C)
-      IF (ABS(SUMSQ-COMP).LT.1E-05) GO TO 30
-      COMP=SUMSQ
-      KOUNT=KOUNT+1
-      IF (KOUNT.LE.8) GO TO 24
- 30   MU=3
-      CALL LSQ (1,IHOLD,SUMSQ,BGAUSS,EGAUSS,C)
-      CALL MFS (C,MU,1E-06)
-      CALL MIS (C,MU)
-      SUMSQ=SQRT (SUMSQ/(NPTS-MU))
-      II=1
-      DO 40  I=1,MU
-         C(I) = SUMSQ*SQRT(C(II))
- 40      II=I+II+1
-         HERR = C(1)
-C     WRITE (IPR,999) HERR
-C999  FORMAT (1X,'  HT. ERR. = ',F8.4)
-      GO TO 99
-C                                       FIT FAILED
-  42  GOK = 1
-      IF (IBUF(KDIR).EQ.1) WRITE (IPR,201)
-      IF (IBUF(KDIR).EQ.-1) WRITE (IPR,202)
-      IF (IBUF(KDIR).EQ.2) WRITE (IPR,203)
-      IF (IBUF(KDIR).EQ.-2) WRITE (IPR,204)
-C--------------------------------------------------------------------
- 99   CONTINUE
-      RETURN
-C-----------------------------------------------------------------------
- 201  FORMAT (' FIT FAILED IN THE EAST - WEST DIRECTION -- CONTINUING')
- 202  FORMAT (' FIT FAILED IN THE WEST - EAST DIRECTION -- CONTINUING')
- 203  FORMAT (' FIT FAILED IN THE SOUTH-NORTH DIRECTION -- CONTINUING')
- 204  FORMAT (' FIT FAILED IN THE NORTH-SOUTH DIRECTION -- CONTINUING')
-      END
-C
diff -uNr 3.5/utilities/point/cptlsq.f unipops-3.6/utilities/point/cptlsq.f
--- 3.5/utilities/point/cptlsq.f	2000-03-16 11:30:11.000000000 -0700
+++ unipops-3.6/utilities/point/cptlsq.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,68 +0,0 @@
-      SUBROUTINE LSQ ( GERR,IHOLD,SUMSQ,BGAUSS,EGAUSS,C)
-c
-c     @(#)cptlsq.f	5.1 06/22/94
-c
-      INTEGER*2 GERR, POS(18), IHOLD(1), BGAUSS, EGAUSS
-      INTEGER*2 IBUF(2560), mu, i, j, ii, m, iii, iv, ier
-      REAL C(120),VV(80),PART(120), sumsq, s, x, power, expon, term, arg
-c
-      include 'condappl.inc'
-      include 'concfmt.inc'
-c
-      EQUIVALENCE (IBUF(1),RBUF(1))
-c
-      DATA POS/1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,
-     .153,171/
-C
-      MU=3
-      SUMSQ=0
-      DO 10 I=1,120
-10       C(I)=0
-      DO 11 I=1,80
-11       VV(I)=0
-      DO 20 J=BGAUSS,EGAUSS
-         S=0
-         X=J
-            POWER=(X-CENTER)/HWIDTH
-            EXPON=-2.772*POWER**2
-            IF (EXPON.LT.-172) EXPON=-172
-            EXPON=EXP(EXPON)
-            TERM=HEIGHT *EXPON
-            ARG=5.544*POWER*TERM/HWIDTH
-            S=S+TERM
-            PART( 1)=EXPON
-            PART( 2)=ARG
-21          PART( 3)=ARG*POWER
-         DO 22 I=1,MU
-            II=I*(I-1)/2
-            DO 23 M=1,I
-23             C(II+M) = C(II+M) + PART(I) * PART(M)
- 22         VV(I)=VV(I)+(RBUF(J+JDB-1)-S)*PART(I)
-            SUMSQ=SUMSQ+(RBUF(J+JDB-1)-S)**2
-20       CONTINUE
-      DO 210 I=1,MU
-         IF (IHOLD(I).EQ.0) GO TO 210
-         II=POS(I)
-         VV(I)=0
-         C(II)=1.
-         III=II-I+1
-         IV=II-1
-         DO 211 J=III,IV
-211         C(J)=0
-         III=MU-I
-         DO 212 J=1, III
-            II=II+J+I-1
-212         C(II)=0
-210      CONTINUE
-      IF (GERR.EQ.1) GO TO 300
-      CALL GEL (VV,C,MU,0.1E-06,IER,PART)
-      IF (IER.EQ.-1) GO TO 250
-         HEIGHT =HEIGHT +VV( 1) * .5
-         CENTER =CENTER +VV( 2) * .5
-         HWIDTH =HWIDTH +VV( 3) * .5
-      GO TO 300
-250      HEIGHT =-100.
-300   CONTINUE
-      RETURN
-      END
-C
diff -uNr 3.5/utilities/point/cptprep.f unipops-3.6/utilities/point/cptprep.f
--- 3.5/utilities/point/cptprep.f	2000-03-16 11:30:12.000000000 -0700
+++ unipops-3.6/utilities/point/cptprep.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,32 +0,0 @@
-      SUBROUTINE PREP ( IBASE,XDATA,YDATA)
-c
-c     @(#)cptprep.f	5.1 06/22/94
-c
-      INTEGER*2 IBUF(2560), BREG(4), ibase, istart, istop, npts, i,
-     .		ibegin, iend, j
-      REAL       XDATA(600), YDATA(600)
-c
-      include 'condappl.inc'
-      include 'concfmt.inc'
-c
-      EQUIVALENCE (IBUF(1),RBUF(1))
-C
-      ISTART=IBUF(JBEG)
-      ISTOP=IBUF(JEND)
-      NPTS=ISTOP-ISTART+1
-      BREG(1) = 1
-      BREG(2) = 1 + NPTS*BPCT/100
-      BREG(3) = NPTS - NPTS*EPCT/100
-      BREG(4)=NPTS
-      IBASE   = 0
-      DO 30 I=1,4,2
-         IBEGIN = BREG(I)+JDB-1
-         IEND = BREG(I+1)+JDB-1
-         DO 20 J=IBEGIN,IEND
-            IBASE=IBASE+1
-            XDATA(IBASE)=FLOAT(J)
-            YDATA(IBASE) = RBUF(J)
-  20        CONTINUE
-  30     CONTINUE
-      RETURN
-      END
diff -uNr 3.5/utilities/point/cptshape.f unipops-3.6/utilities/point/cptshape.f
--- 3.5/utilities/point/cptshape.f	2000-03-16 11:30:12.000000000 -0700
+++ unipops-3.6/utilities/point/cptshape.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,23 +0,0 @@
-      SUBROUTINE SHAPE (IBASE,XDATA,YDATA,BPARM,IRES)
-c
-c     @(#)cptshape.f	5.1 06/22/94
-c
-      REAL XDATA(600), YDATA(600), BPARM(15), WORK(600), xd, x0, eps,
-     .	   eta
-      integer*2 ibase, ires, ip, ier, iop, i, iposn
-C
-C                                   Parabolic fit.
-      IP=3
-      CALL APCH (XDATA,YDATA,IBASE,IP,XD,X0,WORK,IER)
-      EPS=1.0E-6
-      ETA=0.
-      IOP=-1
-      CALL APFS (WORK,IP,IRES,IOP,EPS,ETA,IER)
-      IPOSN=((IRES-1)*IRES)/2
-      DO 10 I=1,IRES
-  10     BPARM(I)=WORK(I+IPOSN)
-      BPARM(14)=X0
-      BPARM(15)=XD
-      RETURN
-      END
-C
diff -uNr 3.5/utilities/point/cptuinit.f unipops-3.6/utilities/point/cptuinit.f
--- 3.5/utilities/point/cptuinit.f	2000-03-16 11:30:13.000000000 -0700
+++ unipops-3.6/utilities/point/cptuinit.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,79 +0,0 @@
-C
-      SUBROUTINE UINIT
-c
-c     @(#)cptuinit.f	5.1 06/22/94
-c
-      include 'condappl.inc'
-      include 'coneappl.inc'
-      include 'concfmt.inc'
-C                               common /CFMT/
-      KSNO=1
-      KOSN=2
-      KSNA=5
-      KONO=11
-      KONA=12
-      kjd =6
-      KSDY=25
-      KMON=26
-      KDAY=27
-      KYR =28
-      KLST=15
-      KEST=16
-      KTEL=33
-      KTOS=34
-      KSTC=35
-      KMD =36
-      KIR =37
-      KLR =38
-      KIN =39
-      KST =39
-      KSP =41
-      KVRF=48
-      KVDF=49
-      KPOC=50
-      KDIR=51
-      KSW1=55
-      KSRT=29
-      KEOP=32
-      KHR =33
-      KVR =34
-      KIRA=35
-      KIDC=36
-      KFOC=37
-      KORI=38
-      KZEN=39
-      KDOR=40
-      KEV =99
-      JSSN=52
-      JERA=54
-C               NOTE: NEXT THREE POINTERS ARE NOT THE SAME IN CONTROL
-C                     AND REDUCTION SYSTEMS.
-      JRHO=64
-      JTHE=65
-      JNT =66
-      JDB =88
-C               NOTE: NEXT 7 POINTERS ARE FOR REDUCTION ONLY
-      JCV =67
-      JCF =68
-      JBEG=40
-      JEND=41
-      JMB =42
-      JME =43
-      JFE =53
-C
-      JH1=48
-      JH2=49
-      KHPF=43
-      KVPF=44
-      KP1=45
-      KP2=46
-      KP3=47
-C
-      IFULL=138
-      BPCT=20
-      EPCT=20
-      GOK=0
-c
-      RETURN
-      END
-C
diff -uNr 3.5/utilities/point/gel.f unipops-3.6/utilities/point/gel.f
--- 3.5/utilities/point/gel.f	2000-03-16 11:30:13.000000000 -0700
+++ unipops-3.6/utilities/point/gel.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,120 +0,0 @@
-      SUBROUTINE GEL  (R, A, M,         EPS,      IER, AUX)
-C-------------------------------------------------------------------------------
-C  @(#)gel.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c****************************************
-c Modified 8903 [RJM] See CHANGES.DOC
-c****************************************
-C--------------------------------------------------------------
-C--------------------------------------------------------------
-      integer*2 M,N,IER,L,K,I,LST,NM,LEND,LT,LL,LR,II,LLST,LLD,J
-      REAL A(*),R(*),AUX(*),EPS,PIV,TB,TOL,PIVI
-C                                         ON ERROR   GO TO 900
-C
-      IF (M.LE.0) GO TO      900
-C    SEARCH FOR GREATEST MAIN DIAGONAL ELEMENT
-      N=1
-      IER=0
-      PIV = 0.
-      L = 0
-      DO 15 K = 1,M
-         L = L + K
-         TB = ABS(A(L))
-         IF (TB.LE.PIV) GO TO 15
-            PIV=TB
-            I=L
-            J=K
-15       CONTINUE
-      TOL = EPS*PIV
-C    MAIN DIAGONAL ELEMENT A(I) = A(J,J) IS FIRST PIVOT  ELEMENT.
-C    PIV CONTAINS THE ABSOLUTE VALUE OF      A(I).
-C    START ELIMINATION LOOP
-      LST = 0
-      NM = N*M
-      LEND = M - 1
-      DO 50 K = 1,M
-C                      Test on usefulness of symnetric algorithm.
-         IF (PIV.LE.0.) GO TO 900
-         IF (IER.NE.0) GO TO 22
-         IF (PIV.LE.TOL) IER=K-1
-22       LT = J - K
-         LST = LST + K
-C    PIVOT ROW REDUCTION AND ROW INTERCHANGE IN RIGHT HAND SIDE  R
-         PIVI =      1./A(I)
-         DO 30 L = K , NM , M
-            LL = L + LT
-            TB = PIVI*R(LL)
-            R(LL) = R(L)
-30          R(L) = TB
-C                                         Is eliminated terminated.
-         IF (K.GE.M) GO TO 60
-C    ROW AND COLUMN INTERCHANGE AND PIVOT ROW REDUCTION IN MATRIX A.
-C    ELEMENTS OF PIVOT COLUMN ARE SAVED IN AUXILIARY VECTOR AUX.
-         LR = LST + (LT*(K + J - 1))/2
-         LL = LR
-         L = LST
-         DO 40 II = K ,  LEND
-            L = L + II
-            LL = LL + 1
-            IF (L.LT.LR)  GO TO 42
-            IF (L.GT.LR) GO TO 41
-            A(LL)=A(LST)
-            TB=A(L)
-            GO TO      43
-41          LL = L + LT
-42          TB = A(LL)
-            A(LL) = A(L)
-43          AUX(II) = TB
-40          A(L) = PIVI*TB
-C    SAVE COLUMN INTERCHANGE INFORMATION
-         A(LST) = LT
-C    ELEMENT REDUCTION AND SEARCH FOR NEXT PIVOT
-         PIV = 0.
-         LLST = LST
-         LT = 0
-         DO 49 II = K ,  LEND
-            PIVI = -AUX(II)
-            LL = LLST
-            LT = LT + 1
-            DO 45 LLD = II ,  LEND
-               LL = LL + LLD
-               L = LL + LT
-45             A(L) = A(L) + PIVI*A(LL)
-            LLST = LLST +      II
-            LR = LLST + LT
-            TB = ABS(A(LR))
-            IF (TB.LT.PIV) GO TO 46
-            PIV=TB
-            I=LR
-            J=II + 1
-46          DO 47 LR = K ,  NM , M
-               LL = LR + LT
-47             R(LL) = R(LL) + PIVI*R(LR)
-49          CONTINUE
-50       CONTINUE
-C                                         End of elimination loop.
-60    IF (LEND.LT.0) GO TO 900
-      IF (LEND.EQ.0) GO TO 99
-      II = M
-      DO 70 I = 2,M
-         LST = LST - II
-         II = II - 1
-         L = A(LST) + 0.5
-         DO 71 J = II , NM , M
-            TB = R(J)
-            LL = J
-            K = LST
-            DO 72 LT = II , LEND
-               LL = LL + 1
-               K = K + LT
-72             TB = TB - A(K)*R(LL)
-            K = J + L
-            R(J) = R(K)
-            R(K) = TB
-71          CONTINUE
-70       CONTINUE
-      GO TO 99
-C                                          Error return.
- 900  IER = -1
- 99   RETURN
-      END
diff -uNr 3.5/utilities/point/lastblnk.f unipops-3.6/utilities/point/lastblnk.f
--- 3.5/utilities/point/lastblnk.f	2000-03-16 11:30:18.000000000 -0700
+++ unipops-3.6/utilities/point/lastblnk.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,20 +0,0 @@
-      integer*2 function lastblnk(string)
-C-------------------------------------------------------------------------------
-C  @(#)lastblnk.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Finds the position of the last non-blank character in STRING
-c*********************************************
-c     [RJM] March 89
-c*********************************************
-c
-      character*(*) string
-      integer*4 lnblnk
-c
-c***********************************************************
-      lastblnk = lnblnk(string)
-c     MASSCOMP/SUN function LNBLNK
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/point/mfs.f unipops-3.6/utilities/point/mfs.f
--- 3.5/utilities/point/mfs.f	2000-03-16 11:30:14.000000000 -0700
+++ unipops-3.6/utilities/point/mfs.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,36 +0,0 @@
-       SUBROUTINE MFS(A,N,EPS)
-c
-c      @(#)mfs.f	5.2 05/14/96
-c
-C *******************************************************************/
-C *                                                                 */
-C *         FACTORIZE SYMMETRIC POSITIVE DEFINITE MATRIX            */
-C *                                                                 */
-C *******************************************************************/
-       integer*2 IND, IB,K,KL,L,N
-       REAL EPS,A(*)
-       DOUBLE PRECISION    SUM
-c
-       IND =0
-       IB  =1
-       DO 100 K=1 ,  N
-          KL  =0
-10        SUM =0
-          IF (IB.GT.IND) GO TO 25
-          DO 20 L=IB , IND
-             KL  =KL+1
-20           SUM =SUM+(A(L)*A(KL))
- 25       KL =KL+1
-          IND=IND+1
-          SUM=A(IND)-SUM
-          IF(IND.LE.KL) GO TO 31
-          A(IND)=SUM/A(KL)
-          GO TO 10
-31        IF (SUM.GT.0) A(IND)=DSQRT(SUM)
-          IF (SUM.LE.0) GO TO 101
-          IB   =IB+K
-100       CONTINUE
-       RETURN
-101    N=K-1
-       RETURN
-       END
diff -uNr 3.5/utilities/point/mis.f unipops-3.6/utilities/point/mis.f
--- 3.5/utilities/point/mis.f	2000-03-16 11:30:14.000000000 -0700
+++ unipops-3.6/utilities/point/mis.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,54 +0,0 @@
-      SUBROUTINE MIS(A,N)
-c
-c     @(#)mis.f	5.1 06/22/94
-c
-C *******************************************************************/
-C *                                                                 */
-C *          INVERT SYMMETRIC POSITIVE DEFINITE MATRIX              */
-C *                                                                 */
-C *******************************************************************/
-       integer*2 ICOL,IPIV,IROW,J,K,L,LN,M,N, ik
-       REAL A(*),PIV
-       DOUBLE PRECISION SUM
-c
-       LN =N
-       J  =0
-       DO  10 IK =1,LN
-          K=IK-1
-          IPIV =0
-          J    =J+1
-          PIV  =A(J+K)
-          IF (PIV.NE.0) GO TO 11
-c***          ERROR=S
-          GO TO 99
-11        PIV=1/PIV
-          A(J+K)=PIV
-          IF (K.EQ.0) GO TO 10
-          DO 12  L =1 , K
-             SUM  =0
-             IROW =J
-             IPIV=IPIV+L
-             ICOL=IPIV
-             DO 13  M =L , K
-                SUM  =SUM+(A(IROW)*A(ICOL))
-                ICOL =ICOL+M
-13              IROW =IROW+1
-             A(J) =-SUM*PIV
-12           J    =J+1
-10        CONTINUE
-       J =0
-       DO 20  K =1 , LN
-          IROW =K
-          DO 21 L =1 , K
-             SUM  =0
-             J=J+1
-             ICOL=J
-             IROW =IROW-1
-             DO 22 M =K , LN
-                SUM  =SUM+(A(ICOL)*A(ICOL+IROW))
-22              ICOL =ICOL+M
-21           A(J) =SUM
-20        CONTINUE
-99       CONTINUE
-         RETURN
-         END
diff -uNr 3.5/utilities/point/point.f unipops-3.6/utilities/point/point.f
--- 3.5/utilities/point/point.f	2000-03-16 11:30:14.000000000 -0700
+++ unipops-3.6/utilities/point/point.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,467 +0,0 @@
-      PROGRAM POINT
-c
-c    @(#)point.f	5.1 06/22/94
-C
-C   Generates input needed for PVLS, using output of pointing scans.
-C   Prompts user for necessary information; fits scans either by
-C   linearized least-squares Gaussian fit or convolution with
-C   Gaussian beam.
-C
-      integer*4 kfeed,maxdata,hostnm, getlog
-      INTEGER*2 ibuf(2560), idir, icp, itp, ipr, ird, ity, jadc, jara,
-     .		method, ifeed, j, ipos, iin, istart, istop, ib, jname, 
-     .		jj, iascan
-      integer*4 i4a,nactual,i4b,iscan, irtn, iargc
-      character*2  CON, LSQ, MDIR(2), NSOURE(6), MNEG, MPOS
-      character*2 RS1(6), RS2(6), RS3(6), RS4(6), RS5(6), RS6(6), 
-     .		RS7(6), RS8(6), rs9(6)
-      character*2 cbuf(2560)
-      character*3 nbuf
-      character*8 projcode, oobs, site, projcod1
-      logical*2 otherfiles
-      REAL EXTRA(4), HVC(2), PFUDGE(2), P1, P2, P3, XMNRAD, deg, pi, 
-     .	   cobs, dobs, scan, hhw1, temp, sext1, afac, ascan, dha, 
-     .	   dra, zend, hhw2, tmper1, srtmp1, vhw2, sext3, ddc, srtmp2, 
-     .	   tmper2, tcal2, sqerr1, rerr1, sqerr2, rerr2, denom, errsq,
-     .	   sigma, deca2, hrang2, aveht, hhw, vhw, twopi, pim, strt, stp,
-     .	   vhw1, rscans(32766)
-      real*8 dprojcode, doobs, dsite
-c
-      include 'condappl.inc'
-      include 'coneappl.inc'
-      include 'concfmt.inc'
-c
-      EQUIVALENCE (RBUF, IBUF), (cbuf,ibuf)
-      equivalence (projcode,dprojcode),(oobs,doobs),(site,dsite)
-c
-      DATA CON /'CO'/, DEG /57.29578/,
-     +   IDIR /1/,
-     +   ICP, itp, IPR, IRD, ITY /2, 3, 4, 5, 6/,
-     +   JADC, JARA /57, 56/,
-     +   KFEED /1/,
-     +   LSQ /'LS'/,
-     +   MDIR /'H ', 'V '/,
-     +   MNEG, MPOS /'- ', '+ '/,
-     +   XMNRAD /3437.75/
-C
-C:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-C
-      otherfiles = .false.
-      if (iargc() .ne. 0) otherfiles = .true.
-c     otherfiles flags whether or not to generate point.pnt and 
-c     point.cal files
-c
-      CALL UINIT
-      PI=3.141593
-      PIM=-PI
-      TWOPI=PI+PI
-C
-C                   -- Read in user number --
-      WRITE (ITY, 1)
-      read (ird, 3, err=99) projcod1
-      call uppercase(projcod1, projcode)
-      if (projcode .eq. 'BYE' ) goto 99
-c
-      irtn = hostnm(site)
-      irtn = getlog(oobs)
-      call openaccess(dprojcode, doobs, dsite,irtn)
-c
-      if (irtn .ne. 0) then
-         write (ity,*) 'Trouble with on-line data -- Terminating'
-         go to 99
-         endif
-C
-      open(unit=ipr,file='point.log',status='unknown')
-      rewind(ipr)
-      if (otherfiles) then
-	open(unit=icp,file='point.pnt',status='unknown')
-      	open(unit=itp,file='point.cal',status='unknown')
-	rewind (icp)
-	rewind (itp)
-      endif
-c
-C                   -- Read in desired feed --
-903   WRITE (ITY, 101)
-      read (ird, 103, err=903) ifeed
-      IF (IFEED .GT. 0 .AND. IFEED .LT. 17) KFEED = IFEED
-C
-C                   -- Read in scan range --
-      STRT = 0.
-      STP = -1.
-906   WRITE (ITY, 4)
-      READ (ird, 8, err=906) STRT, STP
-      IF (STP .LE. 0.) STP = 999999.
-C
-C                   -- Read in desired fitting technique --
- 1000 CONTINUE
-      WRITE (ITY, 90000)
-      READ (ird, 2) NBUF
-      METHOD = 0
-      IF (NBUF .EQ. 'LSQ' .or. nbuf .eq. 'lsq') METHOD = 1
-      IF (NBUF .EQ. 'CON' .or. nbuf .eq. 'con') METHOD = 2
-c
-C
-      if (method .eq. 2) then
-	WRITE (ITY, 90200)
-        READ (ird, 90300) HWIDTH
-C                   -- Read in HWIDTH if convolution --
-        if (hwidth .le. 0.0) then
-	  write(ity,*) 'Bad half width!!  Must be > 0.0'
-	  goto 1000
-        endif
-      else if (method .eq. 0) then
-         WRITE (ITY, 90100)
-         GO TO 1000
-      endif
-C
- 2000 CONTINUE
-      IF (METHOD .EQ. 1) WRITE (ipr, 90400)
-      IF (METHOD .EQ. 2) WRITE (ipr, 90500)
-c
-      nactual = 32766
-      maxdata=1190
-      i4a = 0
-      i4b = 32766
-      call gcontlist2 (nactual,i4b,rscans,i4a)
-      do 20000 j = 1, nactual
-          iscan = rscans(j)
-          if (iscan .lt. strt .or. iscan.gt.stp) goto 20000
-          call gcont( iscan,kfeed,i4a,maxdata,ibuf(1),irtn)
-          if (irtn .ne. 0) go to 20000
-	    rbuf(ksno) = rbuf(ksno) + float(kfeed)/100.
-            ipos = ibuf(kpoc)
-            if (ipos.ne.1) then
-              if (ipos .eq. 2) then
-                  iin = jera
-              else if (ipos .eq. 3) then
-                  iin = jera + 2
-              else if (ipos .eq. 4) then
-                  iin = jera + 4
-              else if (ipos .eq. 5) then
-                  iin = jera+ 6
-              else
-                  iin = jera + 8
-              endif
-              rbuf(jera+6) = rbuf(iin)
-              rbuf(jera+7) = rbuf(iin+1)
-            else
-              rbuf(jera+6) = rbuf(klst) - rbuf(jera+2)
-              rbuf(jera+7) = rbuf(jera+3)
-            endif
-c           Moves the coordinates in the observewd system into 
-c           OBS H and V
-c
-   25       IF (IBUF(KSTC).NE.4) GO TO 10000
-            IF (IBUF(JFE).NE.KFEED) GO TO 10000
-            IF (IBUF(KDIR).EQ.1) IDIR=1
-            IF (IBUF(KDIR).EQ.IDIR) GO TO 3000
-            IF (IDIR.EQ.1) GO TO 10000
-            WRITE (IPR, 7)
-            IDIR = 1
-            GO TO 10000
-C
- 3000 CONTINUE
-C
-C                   -- Protect against negative cal factor --
-      IF (RBUF(JCF) .GT. 0.) GO TO 3200
-C
-         ISTART = IBUF(JBEG)
-         ISTOP = IBUF(JEND)
-         DO 3100 IB = ISTART, ISTOP
-            RBUF(IB) = -RBUF(IB)
- 3100       CONTINUE
-C
-C                   -- Remove baseline and do the fit --
- 3200 CONTINUE
-      CALL BASELINE
-C
-      IF (METHOD .EQ. 1) CALL GAUSS
-      IF (METHOD .EQ. 2) CALL CONVOLVE
-C
-C                   -- Print results of fit --
-      IF (IABS (IBUF(KDIR)) .GT. 1) GO TO 4600
-C
-C                   -- Horizontal scans --
-      COBS = RBUF(JERA + 6) + RBUF(KHR) * (CENTER - 1.)
-     +       / 60. * RBUF(KSRT)
-      HVC(1) = RBUF(JH1)
-      HVC(2) = RBUF(JH2)
-      PFUDGE(1) = RBUF(KHPF)
-      PFUDGE(2) = RBUF(KVPF)
-      P1 = RBUF(KP1)
-      P2 = RBUF(KP2)
-      P3 = RBUF(KP3)
-      DOBS = COBS - HVC(1)
-      IF (METHOD .EQ. 1)
-     +   HWIDTH = ABS (RBUF(KHR)) / 60. * HWIDTH * RBUF(KSRT)
-     +            * XMNRAD * COS (HVC(2))
-      CALL RNS (HVC(1), 0, RS1)
-      CALL RNS (COBS, 0, RS2)
-      CALL RNS (DOBS, 0, RS3)
-      IF (IBUF(KDIR) .LT. 0) GO TO 4500
-C
-C                   -- First scan (+H) --
-         SCAN = RBUF(1)
-         DO 4100 JNAME = 1, 6
-            NSOURE(JNAME) = CBUF(JNAME + KSNA - 1)
- 4100       CONTINUE
-         WRITE (IPR, 9) NSOURE, SCAN
-         if (otherfiles) WRITE (ICP, 2009) NSOURE
-         IDIR = -1
-         IF (GOK .GT. 0) GO TO 10000
-C
-C                   -- Print results of fit --
-            WRITE (IPR, 140)
-            WRITE (IPR, 141)
-            WRITE (IPR, 142) SCAN, MPOS, MDIR(1), RS1, RS2, RS3,
-     +                       HWIDTH, HEIGHT
-            HHW1 = HWIDTH
-            EXTRA(1) = DOBS
-            GO TO 10000
-C
-C                   -- Second scan (-H) --
- 4500    CONTINUE
-         IF (GOK .GT. 0) GO TO 4550
-C
-            SCAN = RBUF(1)
-            WRITE (IPR, 142) SCAN, MNEG, MDIR(1), RS1, RS2, RS3,
-     +                       HWIDTH, HEIGHT
-C
-            TEMP = .5 * (EXTRA(1) + DOBS)
-            EXTRA(1) = TEMP + PFUDGE(1) / 13750.99
-            EXTRA(2) = EXTRA(1)+P2/3.437746E3+P1/3.437746E3/COS(HVC(2))
-            CALL RNS (TEMP, 0, RS1)
-            CALL RNS (EXTRA(1), 0, RS2)
-            CALL RNS (EXTRA(2), 0, RS3)
-            WRITE (IPR, 143)
-            WRITE (IPR, 144) RS1, RS2, RS3
-C
-            SEXT1 = EXTRA(1)
-            AFAC = FLOAT (IBUF(106)) / 8192.
-c***           ASCAN = .1 * RBUF(1)
-            ascan = rbuf(1)
-            ZEND = RBUF(KZEN) * DEG
-            DRA = RBUF(KIRA) - RBUF(JARA) + TEMP
-            DHA = RBUF(KLST) - RBUF(JARA)
-C
-C                KEEP HA BETWEEN +12 AND -12
-C
-      IF(DHA.GE.PI) DHA=DHA-TWOPI
-      IF(DHA.LE.PIM) DHA=DHA+TWOPI
-C
-            CALL RNS (RBUF(JADC), 1, RS4)
-            CALL RNS (RBUF(KIRA), 0, RS5)
-            CALL RNS (RBUF(KIDC), 1, RS6)
-            CALL RNS (RBUF(JARA), 0, RS3)
-            CALL RNS (DRA, 0, RS7)
-            CALL RNS (DHA, 0, RS2)
-            CALL RNS (RBUF(KLST), 0, RS1)
-	    call rns (rbuf(kest), 0, rs9)
-            WRITE (IPR, 156) (RS1(jj),jj=2,6), (rs9(jj),jj=2,6),
-     +                       ibuf(kmon), ibuf(kday), ibuf(kyr), AFAC, 
-     +			     ZEND,(RS2(jj),jj=2,6), (RS3(jj),jj=2,6),
-     +                       rs5, (RS4(JJ),JJ=1,5),
-     +			     (RS6(JJ),JJ=1,5), rs7 
-            HHW2 = HWIDTH
-            IASCAN = IFIX (ASCAN)
-            if (otherfiles) WRITE (ICP, 2158) IASCAN, RS1, RS2, RS4,
-     +                         RS7, ZEND, AFAC
-            IDIR=2
-            GO TO 10000
-C                                          Horizontal fit failure.
- 4550       EXTRA(1) = SEXT1
-            GOK = -1
-            IDIR=2
-            WRITE (IPR,160)
-            GO TO 10000
-C
-C                   -- Vertical scans --
- 4600 CONTINUE
-      COBS = RBUF(JERA + 7) + RBUF(KVR) * (CENTER - 1.)
-     +       / 60. * RBUF(KSRT)
-      HVC(1) = RBUF(JH1)
-      HVC(2) = RBUF(JH2)
-      PFUDGE(1) = RBUF(KHPF)
-      PFUDGE(2) = RBUF(KVPF)
-      P1 = RBUF(KP1)
-      P2 = RBUF(KP2)
-      P3 = RBUF(KP3)
-      CALL RNS (HVC(2), 1, RS1)
-      CALL RNS (COBS, 1, RS2)
-      DOBS = COBS - HVC(2)
-      CALL RNS (DOBS, 1, RS3)
-      IF (METHOD .EQ. 1)
-     +   HWIDTH = ABS (RBUF(KVR)) / 60. * HWIDTH * RBUF(KSRT) * XMNRAD
-      IF (IBUF(KDIR) .LT. 0) GO TO 4700
-C
-C                   -- First scan (+V) --
-         IDIR = -2
-         IF (GOK.GT.0) GO TO 10000
-            SCAN = RBUF(1)
-            WRITE (IPR, 145)
-            WRITE (IPR, 141)
-            WRITE (IPR, 147) SCAN, MPOS, MDIR(2), (RS1(JJ), JJ = 1, 5),
-     +                       (RS2(JJ), JJ = 1, 5), (RS3(JJ), JJ = 1, 5),
-     +                       HWIDTH, HEIGHT
-            VHW1 = HWIDTH
-C------------------ CODE FOR BATRALA---------------
-      TMPER1 = HERR
-      SRTMP1=HEIGHT
-C-----------------------------------------------------
-            EXTRA(3)=DOBS
-            GO TO 10000
-C
-C                   -- Second scan (-V) --
- 4700    CONTINUE
-         IF (GOK .GT. 0) GO TO 4750
-            SCAN = RBUF(1)
-            WRITE (IPR, 147) SCAN, MNEG, MDIR(2), (RS1(JJ), JJ = 1, 5),
-     +                       (RS2(JJ), JJ = 1, 5), (RS3(JJ), JJ = 1, 5),
-     +                       HWIDTH, HEIGHT
-            TEMP = (EXTRA(3)+DOBS) / 2.0
-            EXTRA(3) = TEMP + PFUDGE(2)/206264.8
-            EXTRA(4) = EXTRA(3) + P3/3.437746E3
-            CALL RNS (TEMP,1,RS1)
-            CALL RNS (EXTRA(3), 1, RS2)
-            CALL RNS (EXTRA(4), 1, RS3)
-            WRITE (IPR, 143)
-            WRITE (IPR, 146) (RS1(JJ), JJ = 1, 5), (RS2(JJ), JJ = 1, 5),
-     +                       (RS3(JJ), JJ = 1, 5)
-            VHW2 = HWIDTH
-C
-            SEXT3 = EXTRA(3)
-            ZEND = RBUF(KZEN) * DEG
-            DHA = RBUF(KLST) - RBUF(JARA)
-C
-C                KEEP HA BETWEEN +12 AND -12
-C
-      IF(DHA.GE.PI) DHA = DHA - TWOPI
-      IF(DHA.LE.PIM) DHA = DHA + TWOPI
-C
-            DDC = RBUF(KIDC) - RBUF(JADC) + TEMP
-            AFAC = IBUF(106) / 8192.
-c***           ASCAN = .1 * RBUF(1)
-	    ascan = rbuf(1)
-C
-            CALL RNS (RBUF(KIDC), 1, RS6)
-            CALL RNS (RBUF(KLST), 0, RS1)
-            CALL RNS (DHA, 0, RS2)
-            CALL RNS (DDC, 1, RS8)
-            CALL RNS (RBUF(JADC), 1, RS4)
-            CALL RNS (RBUF(JARA), 0, RS3)
-            CALL RNS (RBUF(KIRA), 0, RS5)
-	    call rns (rbuf(kest), 0, rs9)
-            WRITE (IPR, 159) (RS1(jj),jj=2,6), (rs9(jj),jj=2,6),
-     +                       ibuf(kmon), ibuf(kday), ibuf(kyr), AFAC, 
-     +			     ZEND,(RS2(jj),jj=2,6), (RS3(jj),jj=2,6),
-     +                       rs5, (RS4(JJ),JJ=1,5),
-     +			     (RS6(JJ),JJ=1,5), rs8 
-            IASCAN = IFIX (ASCAN)
-            DECA2 = RBUF(JADC)*DEG
-            HRANG2 = DHA*DEG/15.
-            SRTMP2 = HEIGHT
-            TMPER2 = HERR
-            TCAL2 = RBUF(JNT)
-            SQERR1=TMPER1*TMPER1
-            SQERR2=TMPER2*TMPER2
-            RERR1=1. / SQERR1
-            RERR2=1. / SQERR2
-            DENOM=RERR1+RERR2
-            AVEHT=(SRTMP1*RERR1+SRTMP2*RERR2)/DENOM
-            ERRSQ= 1. / DENOM
-            SIGMA = SQRT(ERRSQ)
-            HHW = (HHW1+HHW2)/2.
-            VHW = (VHW1+VHW2)/2.
-            if (otherfiles) WRITE (itp,2161) NSOURE, IASCAN, DECA2, 
-     .            HRANG2, AVEHT, SIGMA, TCAL2, ZEND, HHW, VHW
- 2161       FORMAT (6A2,2X,I6,4(2X,F8.4,2X,F8.5))
-            if (otherfiles) WRITE (ICP, 2159) IASCAN, RS1, RS2, 
-     +                              RS4, RS8,ZEND, AFAC
-            IDIR = 1
-            GO TO 10000
-C                                          Vertical fit failure.
- 4750       CONTINUE
-            EXTRA(3) = SEXT3
-            GOK = -1
-            IDIR = 1
-            WRITE (IPR, 162)
-C
-10000       CONTINUE
-20000    CONTINUE
-C
-      WRITE (IPR, 5)
-      WRITE (ITY, 6)
-C
-C
- 99   call closeaccess()
-      STOP
-C------------------------------------------------------------------------
-    1 FORMAT (/ 'PROGRAM POINT' 
-     +        //'Searches the analysis disk for all pointing scans'
-     +        /'under the specified project code and prints pointing'
-     +        /'information for the horizontal and vertical directions.'
-     +	      //'The ouput will go to a file by the name of point.log;'
-     +        /'if the file exists, it will be overwritten.'
-     +        //'To continue, type project code (4 chars MIN, 8 Max);',
-     +        ' else, to stop, type BYE.')
-   2  FORMAT (a3)
-   3  FORMAT(a8)
-   4  FORMAT (/,'Desired scan range (0.0 implies all scans)',
-     .  /'format',/'XXXXXX.  XXXXXX.')
-    5 FORMAT (T30, 'End POINT',/ )
-    6 FORMAT (1X, 'End POINT')
-   7  FORMAT (/'Pointing Aborted')
-   8  FORMAT (F7.0,2X,F7.0)
-    9 FORMAT (80('_') /,'Source: ', 6A2,
-     +        5X, 'First scan: ', F8.2)
-  101 FORMAT (/ 'Type in desired feed; 0 implies feed 1')
-  102 FORMAT (I2)
-  103 FORMAT (I1)
-  104 FORMAT (3X, I2)
-  105 FORMAT (13X, A1, I2, I3, F5.1, 5X, A1, I2, F6.2, 9X, A1, I2, F6.2)
-  110 FORMAT (// 'P1 =', F6.2, ' P2 = ', F6.2, ' P3 = ', F6.2)
-  140 FORMAT (/, T25, '-- Horizontal position scans --')
-  141 FORMAT (T5, 'Scan', T10, 'Dir', T15, 'Cat position',
-     +        T30, 'Obs position', T46, 'Obs - Cat', T57,
-     +        'FWHM('')', T70, 'Height')
-  142 FORMAT (F8.2, T11, 2A1, T15, 6A2, T30, 6A2, T43, 6A2,
-     +        T57, F6.2, T68, 1pg12.5)
-  143 FORMAT ('Average offset', T20, 'New LPCs', T40,
-     +        'DELTA for PVLS')
-  144 FORMAT (6A2, T18, 6A2, T41, 6A2)
-  145 FORMAT (/, T25, '-- Vertical position scans --')
-  146 FORMAT (2X, 5A2, T18, 5A2, T41, 5A2)
-  147 FORMAT (F8.2, T11, 2A1, T17, 5A2, T32, 5A2, T45, 5A2,
-     +        T57, F6.2, T68, 1pg12.5)
- 150  FORMAT (/,'Using LPCs last determined by POINT:',6A2,2X,5A2)
-
-  156 FORMAT (/,'LST: ', 5A2,'  EST: ', 5a2, '  Date: ',i2,'/',i2,'/',i2,
-     +              '  K Value:', F5.2,'  Z dist:', F6.2,/,
-     +          'APP HA: ', 5A2,'  APP RA: ', 5A2,'    IND RA:', 6A2,/,
-     +          'APP DEC:', 5A2,'  IND DEC:', 5A2,'  DELTA RA:', 6A2)
-  159 FORMAT (/,'LST: ', 5A2,'  EST: ', 5a2, '  Date: ',i2,'/',i2,'/',i2,
-     +              '  K Value:', F5.2,'  Z dist:', F6.2,/,
-     +          'APP HA: ', 5A2,'  APP RA: ', 5A2,'    IND RA:', 6A2,/,
-     +          'APP DEC:', 5A2,'  IND DEC:', 5A2,'  DELTA DEC:', 6A2)
- 160  FORMAT ('Using last determined horizontal LPC.')
- 162  FORMAT ('Using last determined vertical LPC.')
- 2009 FORMAT (6A2)
- 2158 FORMAT ('R', I5, 4(1X, 6A2), 1x, 2F6.2)
- 2159 FORMAT ('D', I5, 4(1X, 6A2), 1x, 2F6.2)
- 2160 FORMAT (1X, 6A2,2X,I6,2X,F8.4,2X,F8.5,3(2X,F8.4),2X,F8.5)
-90000 FORMAT ('Enter desired fitting technique:'/
-     +        '   least squares fit of Gaussian (LSQ), or'/
-     +        '   convolution with Gaussian (CON):')
-90100 FORMAT ('The fitting technique requested must be either',
-     +        ' LSQ or CON.' / 'Please try again:')
-90200 FORMAT ('Enter the full width at half maximum of the convolving',
-     +        ' beam (F5.0):')
-90300 FORMAT (F5.0)
-90400 FORMAT ( T30, '*** Program POINT ***'/
-     +        'Source positions calculated by linearized',
-     +        ' least-squares fit of Gaussian beam')
-90500 FORMAT ( T40, '*** Program POINT ***'/
-     +        'Source positions calculated by convolution',
-     +        ' with upper half of Gaussian beam')
-      END
-C
diff -uNr 3.5/utilities/point/rns.f unipops-3.6/utilities/point/rns.f
--- 3.5/utilities/point/rns.f	2000-03-16 11:30:18.000000000 -0700
+++ unipops-3.6/utilities/point/rns.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,46 +0,0 @@
-      subroutine rns (value, mode, string)
-c
-c     @(#)rns.f	5.1 06/22/94
-c
-c     Converts 'value' from radians to degrees and divides it into 
-c     deg, min, and sec and then places result in 'string'.
-c     If 'mode' = 0, then value is divided by 15. before creating 
-c                    'string' (i.e., converts degrees into hours).
-c
-      real*4 value, rad, fact, a, b, c
-      integer*2 mode, i, j
-      character*2 string(6)
-      character*12 sch
-      character*1 minus, space, sign
-c
-      data rad/57.29577951/, space/' '/, minus/'-'/
-c
-      fact = rad
-      if(mode.eq.0) fact = fact / 15.
-c
-      a = abs(value * fact)
-      b = 60. * amod (a, 1.)
-      c = 60. * amod (b, 1.)
-c
-      sign = space
-      if(value.lt.0.) sign = minus
-      write(unit=sch, fmt=10) int(a), int(b), c
-10    format(' ',i3,' ',i2,' ',f4.1)
-c
-      if(sch(2:2).ne.space) then
-		sch = sign//sch(2:12)
-      else if(sch(3:3).ne.space) then
-		sch = space//sign//sch(3:12)
-      else
-		sch = space//space//sign//sch(4:12)
-      endif
-c
-      do 100 i = 1, 6
-        j = (i-1)*2 + 1
-        string(i) = sch(j:j+1)
-100     continue
-c
-      return
-      end
-c
-c
diff -uNr 3.5/utilities/point/uppercase.f unipops-3.6/utilities/point/uppercase.f
--- 3.5/utilities/point/uppercase.f	2000-03-16 11:30:18.000000000 -0700
+++ unipops-3.6/utilities/point/uppercase.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,31 +0,0 @@
-      subroutine uppercase(lc,uc)
-C-------------------------------------------------------------------------------
-C  @(#)uppercase.f	5.1 06/22/94
-C-------------------------------------------------------------------------------
-c
-c     Converts any lower case characters in string lc to upper case
-c     and stores results in string uc
-c
-      character*(*) uc, lc
-c
-      character*2 c1
-      integer*2 ic1, izero, lastblnk, ilen, i
-c
-      equivalence (ic1, c1)
-c
-      data izero/x'0000'/
-c
-      ilen = min(100,lastblnk(lc))
-c
-      ic1 = izero
-c
-      uc = ' '
-      do 100 i = 1, ilen
-	c1(2:2) = lc(i:i)
-        if (ic1 .ge. 97 .and. ic1 .le. 122) ic1 = ic1 - 32
-        uc(i:i) = c1(2:2)
-100     continue
-c
-      return
-      end
-c
diff -uNr 3.5/utilities/pointing unipops-3.6/utilities/pointing
--- 3.5/utilities/pointing	2000-03-16 11:29:45.000000000 -0700
+++ unipops-3.6/utilities/pointing	1969-12-31 17:00:00.000000000 -0700
@@ -1,12 +0,0 @@
-#!  /bin/csh
-#
-#   @(#)pointing.sh	5.2 08/02/94
-#
-# Determines whether to call point or point.rmt
-#
-if (`hostname` == "fahd") then
-   ${popsdir}utilities/point.exe $argv
-else
-   ${popsdir}utilities/point.rmt.exe $argv
-endif
-#
diff -uNr 3.5/utilities/readfits unipops-3.6/utilities/readfits
--- 3.5/utilities/readfits	2000-03-16 11:29:45.000000000 -0700
+++ unipops-3.6/utilities/readfits	1969-12-31 17:00:00.000000000 -0700
@@ -1,225 +0,0 @@
-#! /bin/sh -f
-#
-#   @(#)readfits.sh	5.3 10/04/96
-#
-#******************************************************************
-# READFITS -                                                      *
-# Script to read a FITS tape or file and list headers.            *
-#  Updated:      June 28, 1991                                    *
-#  Apr.28,1992: rewind tape before starting; use no-rewind tape   *
-#               device names.                                     *
-#******************************************************************
-echo " "
-echo "This will make a summary or dump of a FITS tape or disk file."
-echo "If you want to read a FITS file into UNIPOPS, exit this program and run"
-echo "                 fits2uni"
-echo " (to quit this dialog, type CNTRL-C)"
-#******************************************************************
-# Select disk or tape input here.                                 *
-#******************************************************************
-echo "Do you want to read a tape(T), or a disk file(D)? [default=D]: \c"
-read tod;
-tod=`echo $tod | tr "[a-z]" "[A-Z]"`;
-case $tod in
-D) ;;
-T) ;;
-*) tod="D";
-   echo "Using default ($tod).";;
-esac;
-if [ $tod = "D" ] 
-then
-#                          get name of input file
-  frepeat=0;
-  while [ $frepeat -eq 0 ]
-  do
-    echo "Please type name of FITS disk file: \c";
-    read infile;
-#                                       Did he type a file name?
-    if test -n "$infile";  then
-#                                       Does file exist?
-      if test -f "$infile"; then
-#                                       Is file readable?    
-        if test -r "$infile"; then
-#                                       Is file empty?
-          if test -s "$infile"; then
-             frepeat=1
-          else
-             echo "File $infile is empty."
-          fi;
-        else
-          echo "No permission to read $infile"
-        fi;
-      else
-        echo "File $infile does not exist."
-      fi;
-    else
-      echo "Try again (or CNTRL-C to quit)."  # file name bad.
-    fi;
-   done;
-#                          Reading from tape.
-else
-   trepeat=0;
-   while test $trepeat -eq 0;
-   do
-     if [ `isSolaris` = "YES" ]; then
-       echo " Please type tape drive unit number: /dev/rmt/\c"
-       read tapedev
-       if test -n "$tapedev"; then
-	 trepeat=1;
-	 tapedev=rmt/$tapedev;
-	 nrtapedev=${tapedev}bn;
-       fi;
-     else
-       echo " Please type tape drive device name: /dev/\c"
-       read tapedev
-       if test -n "$tapedev"; then
-	 trepeat=1;
-	 nrtapedev=n${tapedev};
-       fi;
-     fi;
-   done;
-fi;    # end of if tod=D
-#******************************************************************
-#  User selects summary or dump here.                             *
-#******************************************************************
-echo " ";
-echo "Do you want a summary(S) (1 line/scan), a dump of headers(H),"
-echo " or a full dump(D) of 5 scans? [default:S] \c";
-read sdh;
-sdh=`echo $sdh | tr "[a-z]" "[A-Z]"`;
-case $sdh in
-S)  sdh="-s";; 
-D)  sdh="-d";;
-H)  sdh="-h";;
-*)  sdh="-s";
-    echo "Using default (S)";;
-esac;
-#******************************************************************
-#  User selects output file here.                                 *
-#******************************************************************
-echo " ";
-echo "Do you want to put output into a file? "
-echo "(this is recommended for options H and D, as these outputs are BIG!)\c"
-echo " (Y/N) \c"
-read response;
-response=`echo $response | tr "[a-z]" "[A-Z]"`;
-case $response in
-Y|YE|YES)  
-  echo "Type output file name: \c";
-  read outfile;
-  if test -n "$outfile"; then
-     qfile="F";
-  else
-     echo "No file name - output will go to terminal."
-     qfile="T";
-  fi;
-  if test -f "$outfile"; then   # test if file exists
-     echo "OK to delete present $outfile (Y,N)?? \c"
-     read response;
-     response=`echo $response | tr "[a-z]" "[A-Z]"`;
-     case $response in
-     Y|YE|YES)  rm -f $outfile;;
-     N)  exit 0;;
-     *)  exit 0;;
-     esac;
-  fi;;
-N)  qfile="T";;   # output will be the terminal
-*)  qfile="T";;
-esac;
-#******************************************************************
-#  User may skip files on the tape before reading a file.         *
-#*******************************************************************
-qrepeat=0;
-while test $qrepeat -eq 0;   # repeat for successive tape files.
-do
-if [ $tod = "T" ]
-then
-  echo "Do you want to skip any files on the tape? (y,n)\c";
-  read response;
-  response=`echo $response | tr "[a-z]" "[A-Z]"`;
-  case $response in
-  Y|YE|YES) echo " How many files?\c";
-          read numtoskip;
-          if test -n "$numtoskip"; then
-            noskip=0;
-          else
-            noskip=1;
-            numtoskip=0;
-          fi;;
-  *)        noskip=1;
-          numtoskip=0;;
-  esac;
-#******************************************************************
-#  Review the Choices and ask for confirmation.                   *
-#******************************************************************
-  echo "-----------------------------------------------------";
-  echo "Ready to read FITS tape on /dev/$tapedev "
-  echo "  Will skip $numtoskip files."; 
-else
-#                    This is the disk file input case
-  qrepeat=1;      # prevent looping - only one file in disk case.
-  echo "-----------------------------------------------------";
-  echo "Ready to read FITS data from file $infile";
-fi;
-if [ $qfile = "F" ] 
-then
-echo "Output will go to $outfile file.";
-fi;
-echo "Option is '$sdh'.  Is this ok? (type Y to proceed) \c";
-read response;
-response=`echo $response | tr "[a-z]" "[A-Z]"`;
-case $response in
-Y|YE|YES) echo " ";;
-*)        echo "Bye, now!";
-          exit 0 ;;
-esac;
-if [ $qfile = "F" ]
-then
-touch $outfile;
-fi;
-#******************************************************************
-#  Make the desired command strings, and run the commands.        *
-#******************************************************************
-if [ $tod = "T" ]
-then
-   mt -f /dev/$tapedev rew
-   if test $numtoskip -ne 0; then
-      echo "mt -f /dev/$nrtapedev fsf $numtoskip"
-      echo "Skipping $numtoskip files..."
-      mt -f /dev/$nrtapedev fsf $numtoskip
-      echo "Reading tape...";
-   fi;
-#
-   if [ $qfile = "F" ]
-   then
-     echo "dd if=/dev/$nrtapedev ibs=28800 obs=2880 | f2u $sdh >> $outfile";
-       dd if=/dev/$nrtapedev ibs=28800  obs=2880 | f2u $sdh >> $outfile;
-   else
-     echo "dd if=/dev/$nrtapedev ibs=28800 obs=2880 | f2u $sdh";
-       dd if=/dev/$nrtapedev ibs=28800  obs=2880 | f2u $sdh ;
-   fi;
-#******************************************************************
-#  Read more files from tape??                                    *
-#******************************************************************
-echo " "
-echo "Do you want to read another file from the tape? (y/n)\c";
-read response;
-response=`echo $response | tr "[a-z]" "[A-Z]"`;
-case $response in
-Y|YE|YES) echo " ";;
-*)       echo "mt -f /dev/$tapedev rew";
-         echo "Rewinding tape ...";
-         mt -f /dev/$tapedev rew;
-          qrepeat=1;;
-esac;
-else          # else of if tod=t
-  if [ $qfile = "F" ]
-  then
-    echo "cat $infile | f2u $sdh >> $outfile";
-          cat $infile | f2u $sdh >> $outfile ;
-  else
-    echo "cat $infile | f2u $sdh" ;
-          cat $infile | f2u $sdh ;
-  fi;
-fi;
-done
diff -uNr 3.5/utilities/uni2fits unipops-3.6/utilities/uni2fits
--- 3.5/utilities/uni2fits	2000-03-16 11:29:44.000000000 -0700
+++ unipops-3.6/utilities/uni2fits	1969-12-31 17:00:00.000000000 -0700
@@ -1,339 +0,0 @@
-#!/bin/csh -f
-#
-# @(#)uni2fits.sh	5.4 10/04/96
-#
-#******************************************************************
-# UNI2FITS -                                                      *
-# Script to convert UniPOPS line or continuum data to FITS tape.  *
-#  UNIPOPS version:  F. Ghigo, Dec. 1990                          *
-#  The user is asked for inputs, which are passed to u2f.         *
-#  Appropriate tape handling commands, mt and dd, are issued.     *
-#******************************************************************
-# UNIPOPS update ver.1.0 : 3 July, 1991                           *
-#  ver 1.2: 26 Aug 1991 - replace "stripindex" calls with equiv.  *
-#          call to dd.  and convert to C-shell.                   *
-#  ver 1.3: 27 April, 1992: fix bugs and use non-rewind tape dev  *
-#******************************************************************
-echo "Starting uni2fits ver 1.3 "
-echo "So you want to write UniPOPS data to FITS tape eh?"
-echo " (to abort this dialog, type CNTRL-C)"
-#******************************************************************
-#  Select Tape or File here.                                      *
-#******************************************************************
-echo " ";
-echo -n "Do you want output file on disk(D) or tape(T)? [default=D]: "
-set tod = $<
-set tod=`echo $tod | tr "[a-z]" "[A-Z]"`;
-switch($tod)
-  case "D" :
-              breaksw
-  case "T" :  
-              breaksw
-  default  :
-              set tod = "D"
-              echo "Using default ($tod)."
-endsw
-if ( $tod == "D" ) then
-  set trepeat=0;
-  while ($trepeat == 0)
-    echo -n "Please enter name of output FITS file: "
-    set outfile = $<
-    if ($outfile != "") then
-      if ( -e $outfile)  then
-        echo -n "File $outfile exists.  ok to delete? (y/n) "
-        set response = $<
-        set response = `echo $response | tr "[a-z]" "[A-Z]"`
-        switch($response)
-          case "Y*"  :
-             echo "Will delete $outfile \!"
-             set trepeat=1
-             breaksw
-          default :  set trepeat=0;;
-        endsw
-      else
-       set trepeat=1
-      endif
-    endif
-  end  
-  echo "Output file will be: $outfile ";
-else
-   set trepeat=0;
-   while ($trepeat == 0)
-     if (`isSolaris` == "YES") then
-	echo -n "Please enter tape drive unit number: /dev/rmt/"
-        set tapedev = $<
-        if ($tapedev != "") then
-           set trepeat = 1
-           set tapedev = rmt/$tapedev
-	   set nrtapedev = ${tapedev}bn
-        endif
-     else
-  	echo -n " Please type tape drive device name: /dev/"
-     	set tapedev = $<
-     	if ( $tapedev != "") then
-       	   set trepeat=1
-	   set nrtapedev = n${tapedev}
-     	endif
-      endif
-   end
-#******************************************************************
-#  Select blocking factor here.  - no choice !!                   *
-#******************************************************************
-   set blocksize="28800";
-endif
-#******************************************************************
-# Make sure tape starts at the beginning.                         *
-#******************************************************************
-if($tod == "T") then
-  mt -f /dev/$tapedev rew
-endif
-#******************************************************************
-#  Start loop - repeat for more than one file.                    *
-#******************************************************************
-set qrepeat=0;
-while ($qrepeat == 0)
-echo " ";
-#******************************************************************
-#  Ask whether line or continuum data.                            *
-#******************************************************************
-echo -n "Choose line or continuum (L, C) [default=L]: "
-set loc = $<
-set loc=`echo $loc | tr "[a-z]" "[A-Z]"`;
-switch($loc)
-  case "L" :
-             breaksw
-  case "C" :
-             breaksw
-  default : 
-     echo "Using default (L)"
-     set loc="L"
-endsw
-echo " ";
-#******************************************************************
-# If LINE, ask whether axis 1 is velocity or frequency.           *
-#******************************************************************
-set vof = " "
-if ( $loc == "L" ) then
-echo -n "Label scan axis as Frequency(F) or Velocity(V) [default=F]: "
-set vof = $< 
-set vof=`echo $vof | tr "[a-z]" "[A-Z]"`;
-switch($vof)
-  case "V" :
-             set vof = "-v"
-             breaksw
-  case "F" :
-             set vof = "-f"
-             breaksw
-  default :
-             echo "Using default (Freq)"
-             set vof="-f"
-endsw
-endif
-echo " ";
-#******************************************************************
-#  User selects input file here.                                  *
-#******************************************************************
-set frepeat=0;
-while ($frepeat == 0)
-echo -n "Please type input UniPOPS file name: ";
-set infile = $<
-#                               check that file name has >0 chars 
-if ($infile != "")  then
-#                               check that file exists
-   if (-e $infile) then
-#                               check that file is readable
-      if (-r $infile)  then
-#                               check that file is not empty.
-         if (! -z $infile) then
-            set frepeat=1
-         else
-            echo "File $infile is empty."
-         endif
-      else
-        echo "No permission to read $infile"
-      endif
-   else
-     echo "File $infile does not exist."
-   endif
-else
- echo "Try again (or CNTRL-C to quit)"    # file name bad
-endif
-end  
-#******************************************************************
-#  User selects scan number range here.                           *
-#******************************************************************
-echo -n "Do you want to choose a scan number range? (y or n) ";
-set response = $<
-set response = `echo $response | tr "[a-z]" "[A-Z]"`
-switch($response)
-  case "Y*" :
-          echo -n "Type first scan number: ";
-          set scan1 = $<
-          if ($scan1 != "") then
-             set noscan = 0 
-            else
-             set noscan = 1           # <cr> selects all scans
-          endif
-          echo -n "Type last scan number: ";
-          set scan2 = $<
-          if ( $scan2 != "" ) then
-             if ($scan2 < $scan1) then
-               set scan2 = $scan1
-             endif
-            else
-             set scan2 = $scan1;      # <cr> makes scan2=scan1
-          endif
-          breaksw
-  default : 
-            set noscan=1
-endsw
-#******************************************************************
-#  User may skip files on the tape before writing new data        *
-#******************************************************************
-if ( $tod == "T" ) then
-echo -n "Do you want to skip any files on the tape? (y or n) ";
-set response = $<
-set response = `echo $response | tr "[a-z]" "[A-Z]"`
-switch ($response)
-  case "Y*" :
-          echo -n " How many files? "
-          set numtoskip = $<
-          if ($numtoskip == "0" || $numtoskip == " ") then
-             set noskip=1
-             set numtoskip=0
-            else
-             set noskip=0
-          endif
-          breaksw
-  default : 
-            set noskip=1
-            set numtoskip=0
-endsw
-endif
-#******************************************************************
-#  Review the Choices and ask for confirmation.                   *
-#******************************************************************
-echo "--------------------------------------------------------";
-if ( $tod == "T" ) then
-  echo "Ready to make FITS tape on /dev/$tapedev "
-  echo " Will skip $numtoskip files on tape."; 
-else
-  echo "Ready to make FITS file, name = $outfile";
-endif
-if ($noscan == 0) then
-   echo " Will use $loc scans $scan1 to $scan2 from $infile."
-else
-   echo " Will use all $loc scans from $infile."
-endif
-echo -n " is this ok? (type Y to proceed) ";
-set response = $<
-set response = `echo $response | tr "[a-z]" "[A-Z]"`
-switch($response)
-  case "Y*" :
-          echo " "
-          breaksw
-  default  :
-             echo "Please type 'uni2fits' to start again\!"
-             exit 0 
-endsw
-#****************************************************************
-#  Skip files on the tape if desired.                           *       
-#****************************************************************
-if ( $tod == "T" ) then
-  if ($numtoskip != 0) then
-     echo "mt -f /dev/$nrtapedev fsf $numtoskip"
-     mt -f /dev/$nrtapedev fsf $numtoskip          # Skip files here.
-  endif
-endif
-#****************************************************************
-#  Finally, issue the commands to convert the file.             *       
-#  "stripindex" is accomplished by the "set bb = ..." and       *
-#  first dd commands below.                                     *
-#      the set bb is common to all options, do it first         *
-#****************************************************************
-echo "Getting initial information from UniPOPS file."
-set bb = `bootstrap $infile 512 LONG`
-#		check to see if its new I*4 or old I*2 index 
-if ( $bb[10] != 1 ) then
-#		its old type, redo the set bb
-   set bb = `bootstrap $infile 512 SHORT`
-   set typesdd = $bb[8]
-   set recsize = $bb[4]
-   set indrec = $bb[2]
-else
-#		new type, just set the values
-   set typesdd = $bb[9]
-   set recsize = $bb[4]
-   set indrec = $bb[2]
-endif
-#		bail out if SDD is in RECORDS format
-if ( $typesdd != 0 ) then
-   echo "Input SDD file is in RECORDS format... Terminating"
-   exit 0
-endif
-#
-if ($noscan == 0) then
-#     preview the file
-  echo " "
-  echo "Previewing the UniPOPS file."
-  set preview = `dd if=$infile bs=$recsize skip=$indrec | u2f -${loc} $vof -s $scan1 $scan2 -prev`
-  set maxrecs = $preview[4]
-  set maxWscan = $preview[2]
-  echo " "
-  echo "Converting the data to FITS."
-  if ( $tod == "T" ) then
-#    dd strips the index from the UNIPOPS file
-      dd if=$infile bs=$recsize skip=$indrec \
-              | u2f -${loc}$ $vof -s $scan1 $scan2 \
-                    -n $maxrecs -t $maxWscan \
-              | dd of=/dev/$nrtapedev obs=$blocksize
-  else
-      dd if=$infile bs=$recsize skip=$indrec \
-            | u2f -$loc $vof -s $scan1 $scan2 \
-                  -n $maxrecs -t $maxWscan > $outfile
-  endif
-else
-#     preview the file
-  echo " "
-  echo "Previewing the UniPOPS file."
-  set preview = `dd if=$infile bs=$recsize skip=$indrec | u2f -${loc} $vof -prev`
-  set maxrecs = $preview[4]
-  set maxWscan = $preview[2]
-  echo " "
-  echo "Converting the data to FITS."
-  if ( $tod == "T" ) then
-    dd if=$infile bs=$recsize skip=$indrec \
-         | u2f -${loc} $vof -n $maxrecs -t $maxWscan \
-         | dd of=/dev/$nrtapedev obs=$blocksize
-  else
-       dd if=$infile bs=$recsize skip=$indrec \
-           | u2f -$loc $vof -n $maxrecs -t $maxWscan > $outfile
-  endif
-endif
-#******************************************************************
-# See if the user wants to add another FITS file to the tape.     *
-#******************************************************************
-echo " ";
-if ( $tod == "T" ) then
-  echo -n "Do you want to add another file to the tape? (y/n) "
-  set response = $<
-  set response = `echo $response | tr "[a-z]" "[A-Z]"`
-  switch($response)
-    case "Y*" : 
-                 echo " "
-                 breaksw
-    default :
-            echo "Writing double EOF on tape." 
-            echo "mt -f /dev/$nrtapedev eof 2";  # all done: finish tape stuff
-            mt -f /dev/$nrtapedev eof 2;         # add double EOF to tape
-            echo "Rewinding tape...";
-            echo "mt -f /dev/$tapedev rew";
-            mt -f /dev/$tapedev rew;           # Rewind tape.
-            set qrepeat=1;
-  endsw
-else
-set qrepeat=1
-endif
-end 
-echo "FITS writing complete."
-
diff -uNr 3.5/utilities/vlbcl/vlbcl.f unipops-3.6/utilities/vlbcl/vlbcl.f
--- 3.5/utilities/vlbcl/vlbcl.f	2000-03-16 11:30:22.000000000 -0700
+++ unipops-3.6/utilities/vlbcl/vlbcl.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,104 +0,0 @@
-C
-      PROGRAM BCL
-c
-c     @(#)vlbcl.f	5.1 06/22/94
-C
-C     Searches continuum data file (DK2) for all TIMED CAL scans
-C     with the input user number.  For each scan found, prints
-C     data points and header information on the printer.
-C
-      INTEGER*2 IBUF(2560), ird, ity, ipr, ksno, ktos, kono, itimed,
-     .		kstc, icont, jfe, ifeed, j
-      character*2 cbuf(2560)
-      character*8 projcode, oobs, site, projcod1
-      integer*4 kfeed,maxdata, irtn, hostnm, getlog
-      integer*4    i4a,nactual,i4b,iscan
-      REAL         RBUF(1280), strt, stp, rscans(32766)
-      real*8 dprojcode, doobs, dsite
-c
-      EQUIVALENCE  ( IBUF(1), RBUF(1) ), (cbuf(1), ibuf(1))
-      equivalence (projcode,dprojcode),(oobs,doobs),(site,dsite)
-c
-      DATA         IRD/5/,    ITY /6/,   IPR   /4/, ksno/1/,
-     .             KTOS /34/,   KONO/11/,  ITIMED/2/,
-     .             KSTC /35/,   ICONT/3/,  
-     .             JFE  /53/,   KFEED/2/  
-C                                     DATA FOR COMMON BLOCK
-C
-      WRITE (ITY,1)
-      read (IRD,3,err=30) projcod1
-      call uppercase(projcod1, projcode)
-      if (projcode .eq. 'BYE') goto 30
-c
-      irtn = hostnm(site)
-      irtn = getlog(oobs)
-      call openaccess(dprojcode, doobs, dsite,irtn)
-c
-      if (irtn .ne. 0) then
-	write (ity,*) 'Trouble with on-line data -- Terminating'
-	goto 30
-      endif
-c
-      open (unit=IPR,file='systemp',status='unknown')
-      rewind (ipr)
-c
-C                   -- Read in desired feed --
- 50   WRITE (ITY,101)
-      read (IRD,103,err=50) ifeed
-      IF (IFEED.GT.0.AND.IFEED.LT.17) KFEED=IFEED
-      STRT=0.0
-      STP=-1.0
- 60   WRITE (ITY,7)
-      READ (ird,8,err=60) STRT, STP
-      IF (STP.LE.0.) STP=999999.
-C
-      write(ipr,4) projcode
-      nactual = 32766
-      maxdata=1190
-      i4a = 0
-      i4b = 32766
-      call gcontlist2(nactual,i4b,rscans,i4a)
-      do 10 j = 1, nactual
-        iscan = rscans(j)
-	if (iscan .ge. strt .and. iscan .le. stp) then
-            call gcont(iscan,kfeed,i4a,maxdata,ibuf(1),irtn)
-            if (irtn. ne. 0) go to 10
-            IF ( IBUF(KTOS).NE.ICONT )  GO TO 10
-            IF ( IBUF(KSTC).NE.ITIMED )  GO TO 10
-            IF ((IBUF(JFE).LT.KFEED).OR.(IBUF(JFE).GT.KFEED)) GO TO 10
-	    rbuf(ksno) = rbuf(ksno) + float(kfeed)/100.
-            CALL VPT (IBUF, rbuf, cbuf)
-	    endif
-  10        CONTINUE
-      call closeaccess()
-c
-      WRITE (IPR,5)
-      WRITE (ITY,6)
-  30  STOP
-C----------------------------------------------------------------------
-   1  FORMAT (/ 'PROGRAM VSST.SYSTEMP'
-     .	    //'Searches the analysis disk for all timed cal scans under'
-     .       /'a specified project code and prints the following'
-     .       /'information: Scan Number, Source Name, Date, Lst, Est,'
-     .       /'System Temperature, and Noise Tube.'
-     +	    //'The ouput will go to a file by the name of systemp;'
-     +       /'if the file exists, it will be overwritten.'
-     +      //'To continue, type project code (4 chars MIN, 8 Max);',
-     +           ' else, to stop, type BYE.')
-   2  FORMAT (3A2)
-   3  FORMAT (a8)
-   4  FORMAT ('VSST System Temperature Calculations',13x,'User:',a8 
-     .        /, 78('-')
-     .        /'  Scan      Source     Z Dist      LST    '  ,
-     .        '    EST    Sys. Temp.  T_cal Npts',
-     .        /, 78('-'))
-   5  FORMAT (/,30X,'End vsst.systemp'//)
-   6  FORMAT ('End vsst.systemp')
-   7  FORMAT (/,'Desired scan range (0.0 implies all scans)',
-     .       /'format',/'XXXXXX.  XXXXXX.')
-   8  FORMAT (F7.0,2X,F7.0)
- 101  FORMAT (/ 'Type in desired feed; 0 implies feed 2',
-     .          ' (Normal Sys Temp)') 
- 103  FORMAT (I1)
-C----------------------------------------------------------------------
-      END
diff -uNr 3.5/utilities/vlbcl/vpt.f unipops-3.6/utilities/vlbcl/vpt.f
--- 3.5/utilities/vlbcl/vpt.f	2000-03-16 11:30:23.000000000 -0700
+++ unipops-3.6/utilities/vlbcl/vpt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,73 +0,0 @@
-C
-      SUBROUTINE VPT (IBUF, rbuf, cbuf)
-c
-c     @(#)vpt.f	5.2 10/20/94
-C
-C     VPT prints information about a timed cal scan.
-C         Assumes data is input on second A/D input channel and the
-C         input is total power.
-C
-      INTEGER*2 IBUF(2560),  JHOLD(200), ivp, kona, lkona, ksna, lksna,
-     .		ktos, kstc, klst, kest, kin, kday, kyr, ksno, jnt, klr, 
-     .		jdb, kono, kzd, npts, iptr, iby, i, kmon, n1, n2, l, mpts
-      character*2   ESTRING(6),  LSTRING(6), cbuf(2560)
-      REAL        RBUF(1280),  NOISE, vave, v3, v1, v2, stemp, zd
-      DATA        IVP  / 4/,
-     .            KONA /12/,   LKONA /21/,   KSNA / 5/,   LKSNA /10/,
-     .            KTOS /34/,   KSTC  /35/,   KLST /15/,   KEST  /16/,
-     .            KIN  /39/,   KMON  /26/,   KDAY /27/,   KYR   /28/,
-     .            KSNO / 1/,   JNT   /66/,   KLR  /38/,   JDB   /88/,
-     .            KONO /11/,  KZD/39/
-C
-      CALL RNS (RBUF(KLST), 0, LSTRING)
-      CALL RNS (RBUF(KEST), 0, ESTRING)
-C
-      NPTS = IBUF(KIN)
-      IF (NPTS.LT.4) GO TO 99
-      IF (NPTS.GT.1024) GO TO 99
-      IPTR = JDB
-      IBY = 1
-      N1 = NPTS/4
-C                                       Noise Source OFF.
-      VAVE = 0.0
-      DO 10 I=1,N1
-         VAVE = VAVE + RBUF(IPTR)
-         JHOLD(I) = IFIX (RBUF(IPTR))
-  10     IPTR = IPTR + IBY
-      V1 = VAVE/N1
-C                                       Noise Source ON.
-      N2 = N1*3
-      N1 = N1 + 1
-      VAVE = 0.0
-      DO 20 I=N1,N2
-         VAVE = VAVE + RBUF(IPTR)
-         JHOLD(I) = IFIX (RBUF(IPTR))
-  20     IPTR = IPTR + IBY
-      V3 = VAVE/(N2-N1+1)
-C                                       Noise Source OFF.
-      N2 = N2 + 1
-      VAVE = 0.0
-      DO 30 I = N2,NPTS
-         VAVE = VAVE + RBUF(IPTR)
-         JHOLD(I) = IFIX (RBUF(IPTR))
-  30     IPTR = IPTR + IBY
-      V2 = VAVE/(NPTS-N2+1)
-C
-C                                       Calculate T system.
-      NOISE = RBUF(JNT)
-      L = JDB + NPTS - 1
-      STEMP = NOISE / ((V3/((V1+V2)*0.5))-1.0)
-C
-      MPTS=NPTS
-      ZD=RBUF(KZD) * 57.29578
-      WRITE (IVP,1)  RBUF(KSNO), (cBUF(I),I=KSNA,LKSNA),
-     .               ZD,
-     .               (LSTRING(I),I=1,5), (ESTRING(I),I=1,5),
-     .               STEMP, NOISE, MPTS
-  99  RETURN
-C---------------------------------------------------------------------------
-   1  FORMAT (F8.2, 2X, 6A2, 2X, F5.1, 3x, 5A2, 1X, 5A2,
-     .        1X, F8.2, 1X, F6.2, 2X, I3)
-C---------------------------------------------------------------------------
-      END
-C
diff -uNr 3.5/utilities/vlbfo/opt.f unipops-3.6/utilities/vlbfo/opt.f
--- 3.5/utilities/vlbfo/opt.f	2000-03-16 11:30:24.000000000 -0700
+++ unipops-3.6/utilities/vlbfo/opt.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,87 +0,0 @@
-C
-      SUBROUTINE OPT (IBUF,RBUF,cbuf,INUMS)
-C
-c     @(#)opt.f	5.1 06/22/94
-c
-C     OPT prints information about an ON-OFF scan.
-c
-      INTEGER*2 JHOLD(45), IBUF(2560),IHOLD(45), inums, ivp, ksno, ksna,
-     .		kono, klst, kest, kmon, kday, kyr, ktos, kin, jnt, jdb, 
-     .		kr50, kd50, kzd, krid, kdid, jara, jadc, lkona, iptr,
-     .		iby, npts, i, kona, lksna, npairs
-      character*2 estring(6),lstring(6),rstring(6),dstring(6),hstring(6)
-      character*2 cbuf(2560)
-      REAL RBUF(1280),  RHOLD(45), ha, diffn, diff2, rms, sdv,  diff,
-     .	   diffd, zd, tsrc, zdd, xmean
-c
-      DATA         IVP /4/,
-     .             KSNO/ 1/,   KSNA/ 5/,   KONO/11/,   KONA/12/,
-     .             KLST/15/,   KEST/16/,   KMON/26/,   KDAY/27/,
-     .             KYR /28/,   KTOS/34/,   KIN /39/,   JNT /66/,
-     .             JDB /88/,   KR50/54/,   KD50/55/,   KZD /39/,
-     .             KRID/35/,   KDID/36/,
-     .             JARA/56/,   JADC/57/
-C
-      LKONA = KONA + 9
-      LKSNA = KSNA + 5
-      CALL RNS (RBUF(KLST), 0, LSTRING)
-      CALL RNS (RBUF(KEST), 0, ESTRING)
-      CALL RNS (RBUF(JARA), 0, RSTRING)
-      CALL RNS (RBUF(JADC), 1, DSTRING)
-      HA = RBUF(KLST) - RBUF(JARA)
-      CALL RNS (HA, 0, HSTRING)
-C
-      IPTR = JDB
-      IBY = 1
-      NPTS = IBUF(KIN)
-      IF (NPTS.LT.3) GO TO 99
-      IF (NPTS.GT.45) GO TO 99
-C
-      DO 10 I = 1,NPTS
-         IHOLD(I)=I
-         RHOLD(I) = RBUF(IPTR)
-         JHOLD(I) = IFIX (RBUF(IPTR))
-  10     IPTR = IPTR + IBY
-C
-      DIFFN=0.0
-      DIFF2 = 0.0
-      NPAIRS=(NPTS-3)
-      RMS = 0.0
-      sdv = 0.0
-      DO 20 I=2,NPAIRS,2
-         DIFF = RHOLD(I) - (RHOLD(I-1)+RHOLD(I+1)) * 0.5
-         DIFFN = DIFFN + DIFF
-         DIFF2 = DIFF2 + DIFF*DIFF
-         IF (INUMS.EQ.1)
-     .   WRITE (IVP,3) RHOLD(I-1), RHOLD(I), RHOLD(I+1), DIFF
-   20    CONTINUE
-      XMEAN=DIFFN/FLOAT(NPAIRS/2)
-      DIFFN = DIFF2 - DIFFN*DIFFN/(NPAIRS/2)
-      DIFFD = RHOLD(NPTS-1) - (RHOLD(NPTS-2)+RHOLD(NPTS)) * 0.5
-      IF (INUMS.EQ.1)
-     .WRITE (IVP,3) RHOLD(NPTS-2), RHOLD(NPTS-1), RHOLD(NPTS), DIFFD
-      TSRC=XMEAN/DIFFD*RBUF(JNT)
-      IF (NPAIRS.EQ.2) GO TO 25
-         RMS = SQRT(DIFFN/(NPAIRS/2-1))
-         SDV = RMS/DIFFD*RBUF(JNT)/SQRT(FLOAT(NPAIRS/2-1))
-C
-  25  ZD=RBUF(KZD)
-      ZDD = ZD * 57.29578
-      WRITE (IVP,1)  RBUF(KSNO), (cBUF(I),I=KSNA,LKSNA),
-     .               (RSTRING(I), I=1,6), (DSTRING(I), I=1,5),
-     .               IBUF(KMON), IBUF(KDAY), IBUF(KYR),
-     .               (LSTRING(I),I=1,5), (ESTRING(I),I=1,5),
-     .               (HSTRING(I),I=1,5),
-     .               TSRC, SDV, RBUF(JNT), NPTS, ZDD
-  99  RETURN
-C---------------------------------------------------------------------------
-   1  FORMAT (F8.2, 2X, 6A2, 6A2, 2X, 5A2,
-     .        1X, I2, '/', I2, '/', I2,
-     .        1X, 5A2, 1X, 5A2, 5A2,
-     .        1X, F9.4, F7.4, 1X, F7.3, 2X, I6, F6.1)
-   2  FORMAT (1X,10(I3,I6,3X))
-   3  FORMAT (1X,3F8.0, F8.1)
-   4  FORMAT (1X)
-   5  FORMAT (17X,'ON = ',6A2,2X,5A2,2X,'DELTA ZA=',F7.2)
-C---------------------------------------------------------------------------
-      END
diff -uNr 3.5/utilities/vlbfo/vlbfo.f unipops-3.6/utilities/vlbfo/vlbfo.f
--- 3.5/utilities/vlbfo/vlbfo.f	2000-03-16 11:30:23.000000000 -0700
+++ unipops-3.6/utilities/vlbfo/vlbfo.f	1969-12-31 17:00:00.000000000 -0700
@@ -1,112 +0,0 @@
-C
-      PROGRAM BFO
-C
-c     @(#)vlbfo.f	5.1 06/22/94
-c
-C     Searches continuum data file (DK2) for all ON-OFF scans
-C     with the input user number.  For each scan found, prints
-C     data points and header information on the printer.
-C
-      INTEGER*2 IBUF(2560), jfe, ionoff, kono, ktos, ksno, ird, ity, 
-     .		ipr, ifeed, inums, j
-      integer*4 kfeed,maxdata,irtn
-      integer*4    i4a,nactual,i4b,iscan, hostnm, getlog
-      character*1  iprint
-      character*8 projcode, oobs, site, projcod1
-      REAL RBUF(1280), strt, stp, rscans(32766)
-      real*8 dprojcode, doobs, dsite
-      character*2 cbuf(2560)
-c
-      EQUIVALENCE  ( IBUF(1), RBUF(1) ), (cbuf(1), ibuf(1))
-      equivalence (projcode,dprojcode),(oobs,doobs),(site,dsite)
-c
-      DATA         IRD/5/,    ITY /6/,   IPR   /4/, ksno/1/,
-     .             KTOS /34/,   KONO/11/,  IONOFF/4/,
-     .             KFEED/1/, jfe/53/
-C                                   DATA FOR COMMON BLOCK
-C
-C
-      WRITE (ITY,1)
-      read (IRD,3,err=30) projcod1
-      call uppercase(projcod1, projcode)
-      if(projcode .eq. 'BYE') goto 30
-c
-      irtn = hostnm(site)
-      irtn = getlog(oobs)
-      call openaccess(dprojcode, doobs, dsite,irtn)
-c
-      open (unit=IPR,file='sourcetemp',status='unknown')
-      rewind (ipr)
-c
-      if (irtn .ne. 0) then
-	write (ity,*) 'Trouble with on-line data -- Terminating'
-	goto 30
-      endif
-c
- 50   WRITE (ITY,101)
-      read (IRD,103,err=50) ifeed
-      IF (IFEED.GT.0.AND.IFEED.LT.17) KFEED=IFEED
-      STRT = 0.0
-      STP  =-1.0
- 60   WRITE (ITY,7)
-      READ  (ird,8,err=60) STRT, STP
-      IF (STP.EQ.0.0) STP=999999.
-c
-      WRITE (ITY,11)
-      read (IRD,12) iprint
-      INUMS = 0
-      if (iprint .eq. 'y' .or. iprint .eq. 'Y') inums = 1
-C
-      write(ipr,4) projcode
-      nactual = 32766
-      maxdata=1190
-      i4a = 0
-      i4b = 32766
-      call gcontlist2 (nactual,i4b,rscans,i4a)
-      do 10 j = 1, nactual
-        iscan = rscans(j)
-	if (iscan.ge.strt .and. iscan.le.stp) then
-          call gcont (iscan,kfeed,i4a,maxdata,ibuf(1), irtn)
-          if (irtn .ne. 0) go to 10
-          IF ( IBUF(KTOS).NE.IONOFF )  GO TO 10
-	  rbuf(ksno) = rbuf(ksno) + float(kfeed)/100.
-          CALL OPT (IBUF,rbuf,cbuf,INUMS)
-	  endif
-  10      CONTINUE
-  20     CONTINUE
-      call closeaccess()
-c
-c
-      WRITE (IPR,5) 
-      WRITE (ITY,6)
- 30   STOP
-C----------------------------------------------------------------------
-   1  FORMAT ('PROGRAM vsst.sourcetemp'
-     .      //'Searches the analysis disk for all on-off scans under',
-     .       /'the specified project code and prints the temperature of',
-     .       /'the source along with information about the scan.',
-     +	    //'The ouput will go to a file by the name of sourcetemp;'
-     +       /'if the file exists, it will be overwritten.'
-     +      //'To continue, type project code (4 chars MIN, 8 Max);',
-     +           ' else, to stop, type BYE.')
-   2  FORMAT (3A2)
-   3  FORMAT (a8)
-   4  FORMAT ('VSST Source Temperature Calculations',13X,'USER:',a8 
-     .        /, 129('-')
-     .        /'   Scan      Source       Ra   (APP)   Dec   '  ,
-     .         '   Date        LST        EST       HA     '  ,
-     .         '   T_source   Sem  T_cal   Npts  Z Dist  ' 
-     .        /, 129('-'))
-   5  FORMAT (/,48X,'End vsst.sourcetemp',//)
-   6  FORMAT (' End vsst.sourcetemp')
-   7  FORMAT (/,'Desired scan range (0.0 implies all scans)',
-     .       /'format',/'XXXXXX.  XXXXXX.')
-   8  FORMAT (F7.0,2X,F7.0)
-  11  FORMAT (/, 'Print the raw numbers?, Reply "YES" or "NO"')
-  12  FORMAT (A1)
- 101  FORMAT (/ 'Type in desired feed; 0 implies feed 1',
-     .          ' (Normal Source Temp)') 
- 103  FORMAT (I1)
-C----------------------------------------------------------------------
-      END
-C
diff -uNr 3.5/utilities/vsst.sourcetemp unipops-3.6/utilities/vsst.sourcetemp
--- 3.5/utilities/vsst.sourcetemp	2000-03-16 11:29:45.000000000 -0700
+++ unipops-3.6/utilities/vsst.sourcetemp	1969-12-31 17:00:00.000000000 -0700
@@ -1,12 +0,0 @@
-#!  /bin/csh
-#
-#   @(#)vsst.sourcetemp.sh	5.2 08/02/94
-#
-# Determines whether to call vlbfo or vlbfo.rmt
-#
-if (`hostname` == "fahd") then
-   ${popsdir}utilities/vlbfo.exe $argv
-else
-   ${popsdir}utilities/vlbfo.rmt.exe $argv
-endif
-#
diff -uNr 3.5/utilities/vsst.systemp unipops-3.6/utilities/vsst.systemp
--- 3.5/utilities/vsst.systemp	2000-03-16 11:29:45.000000000 -0700
+++ unipops-3.6/utilities/vsst.systemp	1969-12-31 17:00:00.000000000 -0700
@@ -1,12 +0,0 @@
-#!  /bin/csh
-#
-#   @(#)vsst.systemp.sh	5.2 08/02/94
-#
-# Determines whether to call vlbcl or vlbcl.rmt
-#
-if (`hostname` == "fahd") then
-   ${popsdir}utilities/vlbcl.exe $argv
-else
-   ${popsdir}utilities/vlbcl.rmt.exe $argv
-endif
-#
diff -uNr 3.5/xwindows/Makefile unipops-3.6/xwindows/Makefile
--- 3.5/xwindows/Makefile	2000-03-16 11:29:17.000000000 -0700
+++ unipops-3.6/xwindows/Makefile	2008-12-29 14:36:37.000000000 -0700
@@ -5,20 +5,19 @@
 FCMP = f77
 FC = $(FCMP)
 CC = $(CCMP)
-FDEBOROPT = -g
-CDEBOROPT = -g
+FDEBOROPT = 
+CDEBOROPT = 
 FLOATOPT = 
-F77INLINE = -libmil
-CINLINE = -libmil
-XLIBS = -L$(OPENWINHOME)/lib -lX11
-XINCS = $(OPENWINHOME)/include
+F77INLINE = 
+CINLINE = 
+XLIBS = -L$(XHOME)/lib -lX11
+XINCS = $(XHOME)/include
 FFLOAT =  $(FDEBOROPT) $(FLOATOPT) $(F77INLINE)
 CFLOAT =  $(CDEBOROPT) $(FLOATOPT) $(CINLINE)
-FFLAGS = -i2 -u $(FFLOAT)
+FFLAGS =  $(FFLOAT)
 CFLAGS = -I. -I$(XINCS) $(CFLOAT) 
-CLLIBS  = -lm
 FLLIBS  = -lm 
-SOLARISXLIBS = -Bstatic $(XLIBS) -Bdynamic -lsocket -lw -ldl -lnsl
+#SOLARISXLIBS = $(XLIBS) -lsocket -lw -ldl -lnsl
 #
 # Macros which define compilation and linking parameters
 # [FC]DEBOROPT (debug or optimize flag for fortran or c) = 'g' as a default 
@@ -37,7 +36,7 @@
 	-sccs clean
 
 install: xgraphics.exe
-	\cp -p xgraphics.exe ${popsdir}sunbin
+	\cp -p xgraphics.exe ${popsdir}bin
 
 xgraphics.exe: xgraphics.o shm_graph.o xroutines.o zignal.o
 #		Solaris doesn't automatically put /usr/openwin in
@@ -47,9 +46,9 @@
 	@if [ -r /usr/lib/libsocket.a ];\
 	then \
 	   ( echo $(FC) xgraphics.o shm_graph.o xroutines.o zignal.o \
-		  $(FFLAGS) -o xgraphics.exe $(SOLARISXLIBS) $(FILLIBS); \
+		  $(FFLAGS) -o xgraphics.exe $(XLIBS) $(FLLIBS); \
 		$(FC) xgraphics.o shm_graph.o  xroutines.o zignal.o \
-		$(FFLAGS) -o xgraphics.exe $(SOLARISXLIBS) $(FLLIBS))\
+		$(FFLAGS) -o xgraphics.exe $(XLIBS) $(FLLIBS))\
 	else \
 	   ( echo $(FC) xgraphics.o shm_graph.o  xroutines.o zignal.o \
 		  $(FFLAGS) -o xgraphics.exe $(XLIBS) $(FLLIBS); \
diff -uNr 3.5/xwindows/shm_graph.c unipops-3.6/xwindows/shm_graph.c
--- 3.5/xwindows/shm_graph.c	2000-03-16 11:29:32.000000000 -0700
+++ unipops-3.6/xwindows/shm_graph.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,284 +0,0 @@
-/* @(#)shm_graph.c	5.2 07/08/94  
-* Shared memory routines for SunCore/SunView graphics
-*/
-
-# include <stdio.h>
-# include <sys/types.h>
-# include <sys/ipc.h>
-# include <sys/shm.h>
-# include <sys/sem.h>
-
-# define ARRAYSIZE 4096
-# define NUMCHAR 80
-# define BYTES 376836
-
-/* NUMCHAR = number of characters to be sent for CHAR graphics command
-*  ARRAYSIZE = number of graphics commands to send before doing a FLUSH (larger
-*              the better but not TOO much that huge amounts of memory are used)
-*  BYTES = number of bytes in shared memory = 
-*	   ARRAYSIZE*(NUMCHAR + 12) + 4
-*/ 
-
-/* ---------------------------------------------------------------
-* The following was lifted from IPC_MAC.H, created by Allen Farris and is
-* an easy-to-use set of shared memory functions
-*
-*
-* Define a key to be used for shared memory 
-* Define the shared memory id -- only one shared memory region allowed
-* Define errno
-*/
-
-static key_t shm_key;
-static int shm_id;
-extern int errno;
-
-/* Create shared memory */
-
-# define create_shm(SHMKEY,BYTES,RWFLAG) \
-	strncpy(((char *)&shm_key),SHMKEY,4); \
- 	shm_id = shmget(shm_key,BYTES,IPC_CREAT | RWFLAG); \
-	if (shm_id == -1) \
-	{ \
-		printf("Failure creating shared memory (%d)\n",errno); \
-		exit(-1); \
-	}
-
-/* Access shared memory that has already been created */
-
-# define access_shm(SHMKEY,BYTES,RWFLAG) \
-	strncpy(((char *)&shm_key),SHMKEY,4); \
-	shm_id = shmget(shm_key,BYTES,RWFLAG); \
-	if (shm_id == -1) \
-	{ \
-		printf("Failure acessing shared memory (%d)\n",errno); \
-		exit(-1); \
-	}
-
-/* Attach shared memory -- returns address of shared memory or -1 */
-
-# define attach_shm(SHMADDR) \
-	shmat(shm_id,0,0)
-
-/* Deallocate shared memory */
-
-struct shmid_ds shmem;
-# define destroy_shm() \
-	if (shmctl(shm_id, IPC_STAT, &shmem) == -1) \
-	{ \
-		printf("Could not deallocate shared memory\n"); \
-		exit(-1); \
-	} \
-	if (shmctl(shm_id, IPC_RMID, &shmem) == -1) \
-	{ \
-		printf("Could not deallocate shared memory\n"); \
-		exit(-1); \
-	}
-
-/*  That is it for Allen's stuff -- Now for my creations 
-* ---------------------------------------------------------------
-*/
-
-/* The shared memory structure used by UniPOPS and the Graphiuucs process 
-* FLAG = the number of elements used in shared memory
-* COMMAND = the graphics commands 1=PLACE, 2=VCTR, 10=CHAR
-* POS1, POS2 = X,Y plot positions for PLACE and VCTR
-* BUFFER = character string for CHAR
-*/
-
-typedef struct shared_memory_structure
-{
-        long int flag;
-	long int command[ARRAYSIZE];
-	long int pos1[ARRAYSIZE];
-	long int pos2[ARRAYSIZE];
-	char buffer[ARRAYSIZE][NUMCHAR];
-} ShmGraph;
-
-
-ShmGraph *shm;
-
-/* R/WNEXT_LOC = the location in shared memory where to read or write next */
-
-long int rnext_loc, wnext_loc;
-
-
-createshm2_(memname, len)
-
-/* Creates Shared memory -- Called by UniPOPS */
-
-long int len;
-char *memname;
-
-{
-
-	create_shm(memname,BYTES,IPC_CREAT | 0644);
-	shm = (ShmGraph *) (attach_shm(0));
-        if (shm == (ShmGraph *)(-1)) {
-           printf("Failure attaching shared memory (%d)\n",errno);
-           exit(-1);
-        }
-	wnext_loc = 0;
-
-}
-
-writeshm2_(cmnd, pos1, pos2, string, len)
-
-/* Writes graphics commands and strings to shared memory -- Used by UniPOPS */
-
-char *string;
-long int len, *cmnd, *pos1, *pos2;
-
-{
-	wnext_loc = shm->flag;
-        shm->command[wnext_loc] = *cmnd;
-	shm->pos1[wnext_loc] = *pos1;
-	shm->pos2[wnext_loc] = *pos2;
-	if (*cmnd >= 10) strncpy(shm->buffer[wnext_loc], string, NUMCHAR);
-	shm->flag = wnext_loc + 1;
-/*      Update shared memory and bump the WNEXT_LOC pointer */
-
-	if (shm->flag >= ARRAYSIZE) coreflush_();
-/*	Tell the Graphics process to start using the contents of shared memory
-*	Wait till the process uses all of the contents of shared memory
-*/
-}
-
-destroyshm2_()
-
-/* Destroys the shared memory -- Called by UniPOPS */
-
-{
-	destroy_shm();
-
-}
-
-accessshm_(memname, len)
-
-/* Access shared memory -- Used by Graphics process and not UniPOPS */
-
-char *memname;
-long int len;
-
-{
-	access_shm(memname, BYTES, 0644);
-	shm = (ShmGraph *) (attach_shm(0));
-        if (shm == (ShmGraph *)(-1)) {
-           printf("Failure attaching shared memory (%d)\n",errno);
-           exit(-1);
-        }
-	rnext_loc = 0;
-
-}
-
-long int readshm2_(cmnd, pos1, pos2, string, len)
-
-/* Read shared memory -- Used by Graphics process and not UniPOPS */
-
-char *string;
-long int *cmnd, *pos1, *pos2, len;
-
-{
-	if (rnext_loc >= shm->flag) 
-	{
-	    rnext_loc = 0;
-	    shm->flag = 0;
-	}
-/* Checks whether the full contents of the shared memory arrays have been used */
-	else
-	{
-	    *cmnd = shm->command[rnext_loc];
-	    *pos1 = shm->pos1[rnext_loc];
-	    *pos2 = shm->pos2[rnext_loc];
-	    if (*cmnd >= 10) strncpy(string, shm->buffer[rnext_loc], NUMCHAR);
-	    rnext_loc++;
-	}
-/* Gets the commands, positions, strings from shared memory -- bump the 
-* read pointer
-*/
-
-	return(shm->flag);
-
-}
-
-long int getnextloc_()
-
-/* Finds out if there is anything in shared memory -- Used by UniPOPS */
-
-{
-	return(shm->flag);
-}
-
-resetshm_()
-
-/* Clears the flags in shm  */
-
-{
-	shm->flag = 0;
-}
-
-/*   Reads and writes to named pipes */
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-
-readfifo_(id, irtn, string, len)
-
-char *string;
-long int len, *irtn, *id;
-
-{
-	char input;
-	int i;
-
-	for (i = 0; i < len; i++)  {
-	   *irtn = read(*id, &input, 1);
-	   if (*irtn < 0) perror("readfifo");
-	   if (input == '\n' || *irtn < 0) break;
-	   string[i] = input;
-	}
-}
-
-writefifo_(id, irtn, string, len)
-
-char *string;
-long int len, *irtn, *id;
-
-{
-
-	*irtn = write(*id,string,len);
-	if (*irtn < 0) perror("writefifo");
-	*irtn = write(*id,"\n",1);
-	if (*irtn < 0) perror("writefifo");
-
-}
-
-openread_(irtn, string, len)
-
-char *string;
-long int len, *irtn;
-
-{
-	*irtn = open(string, O_RDONLY);
-	if (*irtn < 0) perror("openread");
-}
-
-
-openwrite_(irtn, string, len)
-
-char *string;
-long int len, *irtn;
-
-{
-	*irtn = open(string, O_WRONLY);
-	if (*irtn < 0) perror("openwrite");
-}
-closefifo_(ifd, irtn)
-
-long int *irtn, *ifd;
-
-{
-	*irtn = close(*ifd);
-	if (*irtn < 0) perror("closewrite (close)");
-}
diff -uNr 3.5/xwindows/xgraphics.f unipops-3.6/xwindows/xgraphics.f
--- 3.5/xwindows/xgraphics.f	2000-03-16 11:29:17.000000000 -0700
+++ unipops-3.6/xwindows/xgraphics.f	2008-12-29 14:36:37.000000000 -0700
@@ -189,7 +189,7 @@
  120                ii3 = nint(rand(n0) * float(levmax-1) + 1.0)
                     if (matset(ii3) .eq. 1) goto 120
                     matset(ii3) = 1
-                    ixdt(i) = ifix(ii3/ny) + 1
+                    ixdt(i) = int(ii3/ny) + 1
                     iydt(i) = ii3 - (ixdt(i)-1)*ny
  130             continue
               endif
diff -uNr 3.5/xwindows/xroutines.c unipops-3.6/xwindows/xroutines.c
--- 3.5/xwindows/xroutines.c	2000-03-16 11:29:34.000000000 -0700
+++ unipops-3.6/xwindows/xroutines.c	2008-12-29 14:36:38.000000000 -0700
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <sys/time.h>
 #include <signal.h>
+#include <g2c.h>
 extern void (*zignal())();
 
 /*	the icon */
@@ -332,9 +333,6 @@
 
    cursor = XCreateFontCursor (display, cursor_cross);
    XDefineCursor (display, window, cursor);
-   XRecolorCursor (display, cursor, &colorcell_defs[1], 
-                      &colorcell_defs[0]);
-
 
 /*	finally, display the window */
 
@@ -567,12 +565,12 @@
    XMapRaised(display, window);
 }
 
-void alarm_off_()
+void alarm_off__()
 {
    zignal(SIGALRM, SIG_IGN);
 }
 
-void alarm_on_()
+void alarm_on__()
 {
 /*		SIGNAL stuff for expose even handler */
 /*		Timer */
@@ -593,7 +591,7 @@
    XEvent event;
    int event_mask;
 
-   alarm_off_();
+   alarm_off__();
    event_mask = ExposureMask | StructureNotifyMask;
 
    while (XCheckWindowEvent (display, window, event_mask, &event)) {
@@ -619,10 +617,10 @@
             break;
       }
    }
-   alarm_on_();
+   alarm_on__();
 }
 
-void sig_init_()
+void sig_init__()
 {
    void sig_close();
 
@@ -634,7 +632,7 @@
 void sig_close(sig)
 int sig;
 {
-   alarm_off_();
+   alarm_off__();
    xclose_();
    exit(sig);
 }
