v23i026: The SC Spreadsheet, release 6.8, Part06/06

Rich Salz rsalz at bbn.com
Wed Sep 5 05:22:14 AEST 1990


Submitted-by: Jeff Buhrt <sawmill!buhrt>
Posting-number: Volume 23, Issue 26
Archive-name: sc6.8/part06

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix at uunet.uu.net if you want that tool.
# Contents:  Makefile TODO VMS_NOTES crypt.c sc6.8p2.hdr sc6.8p3.hdr
#   sc6.8p4.hdr tutorial.sc
# Wrapped by rsalz at litchi.bbn.com on Fri Jul 13 15:24:23 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo '          "shar: End of archive 6 (of 6)."'
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
  echo shar: Extracting \"'Makefile'\" \(4558 characters\)
  sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X# Specify the name of the program.
X# All documentation and installation keys on this value.
X# 
Xname=sc
XNAME=SC
X
X# This is where the install step puts it.
X#EXDIR=/v/rgb/bin/psx
XEXDIR=/usr/local/bin
X
X# This is where the man page goes.
X#MANDIR=/usr/man/man1
XMANDIR=/usr/man/manl
X
X# Set SIMPLE for lex.c if you don't want arrow keys or lex.c blows up
X#SIMPLE=-DSIMPLE
X
X# Set DOBACKUPS if you would like a backup copy of a source file on a save
XDOBACKUPS=-DDOBACKUPS
X
X# Set INTERNATIONAL if you need 8 bit characters.  You should
X# not set this if you are running 5.3.0.  I think it is OK in 5.3.1.
X#INTERNATIONAL=-DINTERNATIONAL
X# Set SIGVOID if signal routines are type void.  System 5.3, VMS and ANSI C
X# Compliant systems use this.  Most BSD systems do not.
X#SIGVOID=-DSIGVOID
X
X# Set IEEE_MATH if you need setsticky() calls in your signal handlers
X#
X#IEEE_MATH=-DIEEE_MATH
X
X# This is the name of a pager like "more" If the line is commented out
X# then "more" will be used. "pg" may be appropriate for SYSV
XPAGER=-DDFLT_PAGER=\"less\"
X
X# Use this for system V.2
X#CFLAGS= -O -DSYSV2 
X#LDFLAGS=
X#LIB=-lm -lPW -lcurses
X
X# Use this for system V.3
X#CFLAGS= -g -DSYSV3
X#LDFLAGS=
X#LIB=-lm -lcurses -lPW
X
X# Microport
X#CFLAGS= -DSYSV2 -O -DUPORT -Ml
X#LDFLAGS=-Ml
X#LIB=-lm -lcurses -lPW
X
X# Use this for BSD 4.2
X#CFLAGS= -O -DBSD42
X#LDFLAGS=
X#LIB=-lm -lcurses -ltermcap
X
X# Use this for Sequent boxes
XCC=atscc
XCFLAGS=-O -DBSD42
XLDFLAGS= -s
XLIB=-lm -lcurses -ltermcap
XPSCLIB=-lseq
X
X# Use this for BSD 4.3
X#CFLAGS= -O -DBSD43
X#LDFLAGS=
X#LIB=-lm -lcurses -ltermcap
X
X# Use this for system III (XENIX)
X#CFLAGS= -O -DSYSIII
X#LDFLAGS= -i
X#LIB=-lm -lcurses -ltermcap
X
X# Use this for VENIX
X#CFLAGS= -DVENIX -DBSD42 -DV7
X#LDFLAGS= -z -i 
X#LIB=-lm -lcurses -ltermcap
X
X# All of the source files
XSRC=sc.h sc.c lex.c gram.y interp.c crypt.c xmalloc.c cmds.c range.c help.c \
X	vi.c eres.sed sres.sed Makefile psc.c vmtbl.c version.c
X
X# The objects
XOBJS=sc.o interp.o cmds.o crypt.o xmalloc.o range.o help.o vi.o lex.o gram.o \
X	vmtbl.o version.o
X
X# The documents in the Archive
XDOCS=README CHANGES sc.doc psc.doc tutorial.sc VMS_NOTES BSD_BUGS
X
X$(name):$(PAR) 	$(OBJS)
X	$(CC) ${CFLAGS} ${LDFLAGS} ${OBJS} ${LIB} -o $(name)
X
Xdiff_to_sc:	diff_to_sc.c
X	$(CC) ${CFLAGS} -o dtv diff_to_sc.c
X
Xp$(name):	psc.c pvmtbl.o
X	$(CC) ${CFLAGS} -o p$(name) psc.c pvmtbl.o ${PSCLIB}
X	cp p$(name) $(EXDIR)/p$(name)
X
Xpvmtbl.o: sc.h vmtbl.c
X	$(CC) ${CFLAGS} -c -DPSC vmtbl.c
X	mv vmtbl.o pvmtbl.o
X
Xlex.o:	sc.h y.tab.h gram.o lex.c
X	$(CC) ${CFLAGS} ${SIMPLE} ${IEEE_MATH} ${INTERNATIONAL} ${SIGVOID} -c lex.c
X
Xsc.o:	sc.h sc.c
X	$(CC) ${CFLAGS} ${INTERNATIONAL} ${PAGER} ${SIGVOID} -c sc.c
X
Xinterp.o:	interp.c sc.h
X	$(CC) ${CFLAGS} ${IEEE_MATH} ${SIGVOID} -c interp.c
X
Xgram.o:	sc.h y.tab.h
X
Xcmds.o: cmds.c sc.h
X	$(CC) ${CFLAGS} ${DOBACKUPS} -c cmds.c
X
Xcrypt.o: crypt.c sc.h
X	$(CC) ${CFLAGS} ${DOBACKUPS} -c crypt.c
X
Xrange.o: range.c sc.h
X
Xhelp.o: help.c sc.h
X
Xvi.o: vi.c sc.h
X
Xy.tab.h:	gram.y
X
Xgram.o:	sc.h y.tab.h gram.c
X	$(CC) ${CFLAGS} -c gram.c
X	sed<gram.y >experres.h -f eres.sed;sed < gram.y > statres.h -f sres.sed
X
Xgram.c:	gram.y
X	$(YACC) -d gram.y; mv y.tab.c gram.c
X
Xclean:
X	rm -f *.o *res.h y.tab.h $(name) p$(name) debug core gram.c $(name).1 \
X	$(name).man p$(name).man p$(name).1 y.output
X
Xshar: ${SRC} ${DOCS}
X	shar -c -m 64000 -f shar ${DOCS} ${SRC}
X
Xsshar: ${SRC}
X	shar -c -m 1000000 -f shar ${SRC}
X
Xlint: sc.h sc.c lex.c gram.c interp.c cmds.c crypt.c
X	lint ${CFLAGS} ${SIMPLE} sc.c lex.c gram.c interp.c cmds.c crypt.c \
X	range.c xmalloc.c help.c vi.c -lcurses -lm
X
Xinspect: sc.h sc.c lex.c gram.c interp.c cmds.c crypt.c
X	/bruces/ianj/bin/i386/inspect -abv -t 8 sc.c lex.c gram.c interp.c \
X	cmds.c crypt.c range.c xmalloc.c help.c vi.c
X
Xprint: sc.h gram.y sc.c lex.c interp.c cmds.c crypt.c 
X	prc sc.h gram.y sc.c lex.c interp.c cmds.c crypt.c | lpr
X
X$(name).1:	sc.doc
X	sed -e s/pname/$(name)/g -e s/PNAME/$(NAME)/g sc.doc >  $(name).1
X
X$(name).man:	$(name).1
X	nroff -man $(name).1 > $(name).man
X
Xlaser:	$(name).1
X	itpf -x -Pim2 -man $(name).1
X
Xp$(name).1:	psc.doc
X	sed -e s/pname/$(name)/g -e s/PNAME/$(NAME)/g psc.doc >  p$(name).1
X
Xp$(name).man:	p$(name).1
X	nroff -man p$(name).1 > p$(name).man
X
Xinstall: $(EXDIR)/$(name)
X
Xinst-man: $(MANDIR)/$(name).1
X
X$(EXDIR)/$(name): $(name)
X	-mv $(EXDIR)/$(name) $(EXDIR)/$(name).old
X	cp $(name) $(EXDIR)
X	strip $(EXDIR)/$(name)
X
X$(MANDIR)/$(name).1: $(name).1
X	cp $(name).1 $(MANDIR)
X
Xdiffs: ${SRC}
X	for i in ${SRC} ${DOCS} ;\
X		do \
X		rcsdiff -c -r6.1 $$i ;\
X		done
X
Xtest: test.o vmtbl.o
X	$(CC) ${CFLAGS} ${LDFLAGS} test.o vmtbl.o ${LIB} -o test
END_OF_FILE
  if test 4558 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
  fi
  # end of 'Makefile'
fi
if test -f 'TODO' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'TODO'\"
else
  echo shar: Extracting \"'TODO'\" \(3738 characters\)
  sed "s/^X//" >'TODO' <<'END_OF_FILE'
Xdone/tested: (Jeff Buhrt)
X6.7
X1) added a per row memory allocation
X	-runs in about 1/2 run time and 1/3 the space of 6.6vm.1
X	-insert/delete row now just moves pointers (# == maxrow+1-currow)
X		and blanks one row (of columns (maxcol))
X	-as the number of cells grows the size is more linear
X		(no more ##Meg images except for 100,000's of rows....)
X	-row to column pointer translation is done by a macro (ATBL)
X		that returns a pointer to the cell pointer.
X		*ATBL would be a pointer to a *ent (cell).
X	-the maximum # of columns is limited by ABSMAXCOLS or
X		sizeof(struct ent *)*maxcols (whichever is smaller)
X		(702 * 4 = 2808 is no real limit even for 286 large model)
X	-the maximum # of rows is limited by the virtual memory limit or
X		sizeof(struct ent **)*maxrows (whichever is smaller)
X		(4*X=64k, X=16384 rows (excluding malloc overhead) on
X			a '286 large model. Even w/ 3.25Meg and 10Mhz)
X		(plus of course any memory used for cells)
X2) dolookup (int vs double)
X3) dolookup calling eval w/ ent * not enode *
X	 (dolookup called w/ ent * not enode *)
X4) cleaned up a lot of .... *x = 0 to  (.... *)0 (cmds, interp)
X5) psc: fwidth/precision were reversed on the output
X6) Backup copy (on save) using same mode to [path/]#file~
X	 (will prompt if a backup fails)
X7) put y/n prompt function into yn_ask(mesg)
X8) found a move(x,y) in sc -> move(y,x) and only move when needed
X9) we use FullUpdate || changed (to see if ANY cells changed) 
X	before trying to redraw the screen in update
X	(now we don't try to redraw every time a key is hit)
X	-if we are stand[ing]out we do not create a cell just to force a
X	 standout inside the repaint section of update()
X	-only draw blank cells if we cleared it or it is standing out
X	reason: the less work (what to update) curses has to do, the faster
X		a screen update will be (less cpu required)
X14) {insert, delete}col replaced w/ {open,close}col(currow, numcol_to_insert)
X	(limits looping)
X6.7.1.1
X15) goto nonexistant cell may loop
X16) make sure that startup size will at least fill the screen w/ cells.
X17) added version.c
X6.7.1.2
X18) When we would normally die w/o saving (SIGQUIT, etc), we now ask
X	if people would like to save the current spreadsheet.
X	If 'y', saves to the current file name, otherwise ~/SC.SAVE,
X	then /tmp/SC.SAVE if all else fails.
X6.7.1.3
X19) don't use malloc.c for production code
X20) progname is now truncated to just the basename (systems w/ long paths
X	caused problems)
X
Xtodo:
X1) autobackup of things typed in.
X	idea: each cell change output to a stdio open file
X		in the save format, fflush() every so often...
X		(diffs w/r to the original file)
X2) lock/freeze (glue down) a section of the screen (the rest of the screen
X	scrolls but a row/column/block stays fixed on the screen)
X3) (seems ok, but check) FIX the insert/delete row functions.
X	a) column of equations (EX: E50 = E49+D50)
X	b) insert a few rows, look at the equations below the insert point
X	c) delete the inserted rows
X	d) The equations should now be the same as in (a), but they are not...
X4) make sure ISVALID should <not> be used in place of checkbounds
X	in interp.c
X5) hide range
X6) block moving into range
X7) chain cells w/ equations into a linked list or dependency tree
X	-have a top level eval, eval and UPDATE all lower nodes
X8) an option to go into a ^R like <mode>
X	++data entry fields (highlight entry cells)....
X	++only allow entry in these cells....
X10) don't redraw the whole screen all the time 
X	(only cells that change, (in addition to what is in 'fixed #9'))
X11) add uemacs keybinding stuff
X12) add uemacs macro language
X13) add uemacs command completion
X14) insertrow should be openrow w/ a count arg (limits looping)
X15) on a Get if the buffer hasn't been written, ask to overwrite
END_OF_FILE
  if test 3738 -ne `wc -c <'TODO'`; then
    echo shar: \"'TODO'\" unpacked with wrong size!
  fi
  # end of 'TODO'
fi
if test -f 'VMS_NOTES' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'VMS_NOTES'\"
else
  echo shar: Extracting \"'VMS_NOTES'\" \(4341 characters\)
  sed "s/^X//" >'VMS_NOTES' <<'END_OF_FILE'
XFrom: ihnp4!gargoyle!oddjob!noao!arizona!naucse!jdc (John Campbell)
XTo: arizona!noao!oddjob!gargoyle!ihnp4!nsc!nscpdc!rgb
XSubject: VMS SC
X
XVMS USERS:
X
XBob Bond has been generous enough to give me free rein in adding what I
Xthink is needed to make SC run on VMS.  Any problems with VMS should be
Xdirected to me--they are not Bob's fault.
X
XThe VMS SC is "SIMPLE" for the most part, except that the arrow keys
X(instead of hjkl) will move you around the cells.  The VMS version of SC
Xwill not interact with the Bourne shell (obviously), which means that CRYPT
Xand EXTERNAL FUNCTIONS will not be available.
X
XIf you have a 'C' compiler and GNU Bison then you should be able to get
XSC running on VMS by following the instructions below.
X
XStep 1:  Get all the files
X
XI've heard of a few sites that can unpack unix shar files directly on
XVMS.  Most people, however, will need access to a unix machine to get
Xthe original distribution unpacked.  At this time you should also build
Xexperres.h and statres.h and perhaps run the man pages off if you need
Xto port the documentation. To build the two "missing" hearder files:
X   sed <gram.y >experres.h -f eres.sed
X   sed <gram.y >statres.h -f sres.sed
X
XStep 2: Cut out BUILD.COM and GETOPT.C
X
XAt the end of this file are two other pieces: BUILD.COM and GETOPT.C.  After
Xyou've moved everything to VMS, cut BUILD.COM and GETOPT.C out of here and
Xput them in the same directory as the rest of the SC distribution.
X
XStep 3: Build it
X
XTheoretically all you now need to do is @BUILD and SC (as well as PSC)
Xwill be running on VMS.  If you have problems feel free to contact me
Xat ...!arizona!naucse!jdc  (or even call at 602-523-6259).
X
X---------------------cut here for BUILD.COM--------------------------
X$! VMS command file to build SC and PSC (requires bison)
X$! SC:
X$ bison -d gram.y
X$ ren gram_tab.c gram.c
X$ cc  /define=("SIMPLE","SIGVOID") sc.c
X$ cc  /define=("SIMPLE","SIGVOID") gram.c
X$ cc  /define=("SIMPLE","SIGVOID") lex.c
X$ cc  /define=("SIMPLE","SIGVOID") interp
X$ cc  /define=("SIMPLE","SIGVOID") cmds
X$ cc  /define=("SIMPLE","SIGVOID") xmalloc
X$ cc  /define=("SIMPLE","SIGVOID") range
X$ cc  /define=("SIMPLE","SIGVOID") help
X$ link sc.obj,lex.obj,gram.obj,interp.obj,cmds.obj,xmalloc.obj,-
X       range.obj,help.obj,sys$library:vaxcrtl.olb/lib
X$ !
X$ ! Create VMS foreign command symbol to test SC
X$ !
X$ sc == "$" + f$logical("SYS$DISK") + f$directory() + "SC.EXE"
X$!
X$! Now PSC
X$!
X$ cc psc.c
X$ cc getopt.c
X$ link psc,getopt,sys$library:vaxcrtl.olb/lib
X$ !
X$ ! Create VMS foreign command symbol to test PSC (Note that
X$ ! PSC reads SYS$INPUT and writes to SYS$OUTPUT, so use
X$ ! DEFINE/USER to redirect.)
X$ !
X$ psc == "$" + f$logical("SYS$DISK") + f$directory() + "PSC.EXE"
X
X---------------------cut here for GETOPT.C------------------------
X/*
X * getopt - get option letter from argv
X *      This software is in the public domain
X *      Originally written by Henry Spencer at the U. of Toronto
X */
X
X#include <stdio.h>
X
Xchar    *optarg;        /* Global argument pointer. */
Xint     optind = 0;     /* Global argv index. */
X
Xstatic char     *scan = NULL;   /* Private scan pointer. */
X
X/* extern char     *index();  obsolete, used strchr (JDC). */
X
Xint
Xgetopt(argc, argv, optstring)
Xint argc;
Xchar *argv[];
Xchar *optstring;
X{
X        register char c;
X        register char *place;
X
X        optarg = NULL;
X
X        if (scan == NULL || *scan == '\0') {
X                if (optind == 0)
X                        optind++;
X
X                if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0')
X                        return(EOF);
X                if (strcmp(argv[optind], "--")==0) {
X                        optind++;
X                        return(EOF);
X                }
X
X                scan = argv[optind]+1;
X                optind++;
X        }
X
X        c = *scan++;
X        place = strchr(optstring, c);
X
X        if (place == NULL || c == ':') {
X                fprintf(stderr, "%s: unknown option -%c\n", argv[0], c);
X                return('?');
X        }
X
X        place++;
X        if (*place == ':') {
X                if (*scan != '\0') {
X                        optarg = scan;
X                        scan = NULL;
X                } else {
X                        optarg = argv[optind];
X                        optind++;
X                }
X        }
X
X        return(c);
X}
END_OF_FILE
  if test 4341 -ne `wc -c <'VMS_NOTES'`; then
    echo shar: \"'VMS_NOTES'\" unpacked with wrong size!
  fi
  # end of 'VMS_NOTES'
fi
if test -f 'crypt.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'crypt.c'\"
else
  echo shar: Extracting \"'crypt.c'\" \(3640 characters\)
  sed "s/^X//" >'crypt.c' <<'END_OF_FILE'
X/*
X * Encryption utilites
X * Bradley Williams	
X * {allegra,ihnp4,uiucdcs,ctvax}!convex!williams
X * $Revision: 6.8 $
X */
X
X#include <stdio.h>
X#include <curses.h>
X
X#if defined(BSD42) || defined(BSD43)
X#include <sys/file.h>
X#else
X#include <fcntl.h>
X#endif
X
X#include "sc.h"
X
Xchar        *strcpy();
X
X#ifdef SYSV3
Xvoid exit();
X#endif
X
Xint         Crypt = 0;
X
Xcreadfile (save, eraseflg)
Xchar *save;
Xint  eraseflg;
X{
X    register FILE *f;
X    int pipefd[2];
X    int fildes;
X    int pid;
X
X    if (eraseflg && strcmp(save, curfile) && modcheck(" first")) return;
X
X    if ((fildes = open(findhome(save), O_RDONLY, 0)) < 0)
X    {
X	error ("Can't read file \"%s\"", save);
X	return;
X    }
X
X    if (eraseflg) erasedb ();
X
X    if (pipe(pipefd) < 0) {
X	error("Can't make pipe to child");
X	return;
X    }
X
X    deraw();
X    if ((pid=fork()) == 0)			  /* if child  */
X    {
X	(void) close (0);		  /* close stdin */
X	(void) close (1);		  /* close stdout */
X	(void) close (pipefd[0]);	  /* close pipe input */
X	(void) dup (fildes);		  /* standard in from file */
X	(void) dup (pipefd[1]);		  /* connect to pipe */
X	(void) fprintf (stderr, " ");
X	(void) execl ("/bin/sh", "sh", "-c", "crypt", (char *)0);
X	exit (-127);
X    }
X    else				  /* else parent */
X    {
X	(void) close (fildes);
X	(void) close (pipefd[1]);	  /* close pipe output */
X	if ((f = fdopen (pipefd[0], "r")) == (FILE *)0)
X	{
X	    (void) kill (pid, -9);
X	    error ("Can't fdopen file \"%s\"", save);
X	    (void) close (pipefd[0]);
X	    return;
X	}
X    }
X
X    loading++;
X    while (fgets(line,sizeof line,f)) {
X	linelim = 0;
X	if (line[0] != '#') (void) yyparse ();
X    }
X    --loading;
X    (void) fclose (f);
X    (void) close (pipefd[0]);
X    while (pid != wait(&fildes)) /**/;
X    goraw();
X    linelim = -1;
X    modflg++;
X    if (eraseflg) {
X	(void) strcpy (curfile, save);
X	modflg = 0;
X    }
X    EvalAll();
X}
X
Xcwritefile (fname, r0, c0, rn, cn)
Xchar *fname;
Xint r0, c0, rn, cn;
X{
X    register FILE *f;
X    int pipefd[2];
X    int fildes;
X    int pid;
X    char save[PATHLEN];
X    char *fn;
X    char *busave;
X
X    if (*fname == '\0') fname = &curfile[0];
X
X    fn = fname;
X    while (*fn && (*fn == ' '))  /* Skip leading blanks */
X	fn++;
X
X    if ( *fn == '|' ) {
X	error ("Can't have encrypted pipe");
X	return(-1);
X	}
X
X    (void) strcpy(save,fname);
X
X    busave = findhome(save);
X#ifdef DOBACKUPS
X    if (!backup_file(busave) &&
X	(yn_ask("Could not create backup copy, Save anyhow?: (y,n)") != 1))
X		return(0);
X#endif
X    if ((fildes = open (busave, O_TRUNC|O_WRONLY|O_CREAT, 0600)) < 0)
X    {
X	error ("Can't create file \"%s\"", save);
X	return(-1);
X    }
X
X    if (pipe (pipefd) < 0) {
X	error ("Can't make pipe to child\n");
X	return(-1);
X    }
X
X    deraw();
X    if ((pid=fork()) == 0)			  /* if child  */
X    {
X	(void) close (0);			  /* close stdin */
X	(void) close (1);			  /* close stdout */
X	(void) close (pipefd[1]);		  /* close pipe output */
X	(void) dup (pipefd[0]);			  /* connect to pipe input */
X	(void) dup (fildes);			  /* standard out to file */
X	(void) fprintf (stderr, " ");
X	(void) execl ("/bin/sh", "sh", "-c", "crypt", 0);
X	exit (-127);
X    }
X    else				  /* else parent */
X    {
X	(void) close (fildes);
X	(void) close (pipefd[0]);		  /* close pipe input */
X	f = fdopen (pipefd[1], "w");
X	if (f == 0)
X	{
X	    (void) kill (pid, -9);
X	    error ("Can't fdopen file \"%s\"", save);
X	    (void) close (pipefd[1]);
X	    return(-1);
X	}
X    }
X
X    write_fd(f, r0, c0, rn, cn);
X
X    (void) fclose (f);
X    (void) close (pipefd[1]);
X    while (pid != wait(&fildes)) /**/;
X    (void) strcpy(curfile,save);
X
X    modflg = 0;
X    error ("File \"%s\" written", curfile);
X    goraw();
X    return(0);
X}
X
END_OF_FILE
  if test 3640 -ne `wc -c <'crypt.c'`; then
    echo shar: \"'crypt.c'\" unpacked with wrong size!
  fi
  # end of 'crypt.c'
fi
if test -f 'sc6.8p2.hdr' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sc6.8p2.hdr'\"
else
  echo shar: Extracting \"'sc6.8p2.hdr'\" \(1033 characters\)
  sed "s/^X//" >'sc6.8p2.hdr' <<'END_OF_FILE'
XFrom @uunet.uu.net:sawmill!buhrt at newton.physics.purdue.edu Thu Jun 21 22:29:01 1990
XReceived: from BBN.COM by pineapple.bbn.com id <AA17053 at pineapple.bbn.com>; Thu, 21 Jun 90 22:28:09 -0400
XReceived: from uunet.UU.NET by BBN.COM id aa13834; 21 Jun 90 22:26 EDT
XReceived: from newton.physics.purdue.edu by uunet.uu.net (5.61/1.14) with UUCP 
X	id AA09378; Thu, 21 Jun 90 22:25:54 -0400
XReceived: from pur-ee.UUCP by rutgers.edu (5.59/SMI4.0/RU1.3/3.06) with UUCP 
X	id AA09411; Thu, 21 Jun 90 20:35:48 EDT
XReceived: from newton.physics.purdue.edu by ee.ecn.purdue.edu (5.61/1.22jrs)
X	id AA12085; Thu, 21 Jun 90 16:07:06 -0500
XReceived: from sawmill.UUCP by newton.physics.purdue.edu (5.61/1.34)
X	id AA01673; Thu, 21 Jun 90 16:03:55 -0500
XReceived: by sawmill.UUCP (5.61/1.35)
X	id AA08023; Thu, 21 Jun 90 15:36:20 -0500
XDate: Thu, 21 Jun 90 15:36:20 -0500
XFrom: Jeffery A Buhrt <sawmill!buhrt at newton.physics.purdue.edu>
XMessage-Id: <9006212036.AA08023 at sawmill.UUCP>
XTo: uunet!sources at uunet.uu.net
XSubject: Sc6.8 (part 2 of 4)
XStatus: R
X
END_OF_FILE
  if test 1033 -ne `wc -c <'sc6.8p2.hdr'`; then
    echo shar: \"'sc6.8p2.hdr'\" unpacked with wrong size!
  fi
  # end of 'sc6.8p2.hdr'
fi
if test -f 'sc6.8p3.hdr' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sc6.8p3.hdr'\"
else
  echo shar: Extracting \"'sc6.8p3.hdr'\" \(1033 characters\)
  sed "s/^X//" >'sc6.8p3.hdr' <<'END_OF_FILE'
XFrom @uunet.uu.net:sawmill!buhrt at newton.physics.purdue.edu Thu Jun 21 22:26:46 1990
XReceived: from BBN.COM by pineapple.bbn.com id <AA17038 at pineapple.bbn.com>; Thu, 21 Jun 90 22:26:20 -0400
XReceived: from uunet.UU.NET by BBN.COM id aa13680; 21 Jun 90 22:25 EDT
XReceived: from newton.physics.purdue.edu by uunet.uu.net (5.61/1.14) with UUCP 
X	id AA08960; Thu, 21 Jun 90 22:24:37 -0400
XReceived: from pur-ee.UUCP by rutgers.edu (5.59/SMI4.0/RU1.3/3.06) with UUCP 
X	id AA09413; Thu, 21 Jun 90 20:35:53 EDT
XReceived: from newton.physics.purdue.edu by ee.ecn.purdue.edu (5.61/1.22jrs)
X	id AA12199; Thu, 21 Jun 90 16:13:04 -0500
XReceived: from sawmill.UUCP by newton.physics.purdue.edu (5.61/1.34)
X	id AA01686; Thu, 21 Jun 90 16:05:37 -0500
XReceived: by sawmill.UUCP (5.61/1.35)
X	id AA08031; Thu, 21 Jun 90 15:36:37 -0500
XDate: Thu, 21 Jun 90 15:36:37 -0500
XFrom: Jeffery A Buhrt <sawmill!buhrt at newton.physics.purdue.edu>
XMessage-Id: <9006212036.AA08031 at sawmill.UUCP>
XTo: uunet!sources at uunet.uu.net
XSubject: Sc6.8 (part 3 of 4)
XStatus: R
X
END_OF_FILE
  if test 1033 -ne `wc -c <'sc6.8p3.hdr'`; then
    echo shar: \"'sc6.8p3.hdr'\" unpacked with wrong size!
  fi
  # end of 'sc6.8p3.hdr'
fi
if test -f 'sc6.8p4.hdr' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sc6.8p4.hdr'\"
else
  echo shar: Extracting \"'sc6.8p4.hdr'\" \(1033 characters\)
  sed "s/^X//" >'sc6.8p4.hdr' <<'END_OF_FILE'
XFrom @uunet.uu.net:sawmill!buhrt at newton.physics.purdue.edu Thu Jun 21 22:28:08 1990
XReceived: from BBN.COM by pineapple.bbn.com id <AA17045 at pineapple.bbn.com>; Thu, 21 Jun 90 22:27:07 -0400
XReceived: from uunet.UU.NET by BBN.COM id aa13803; 21 Jun 90 22:25 EDT
XReceived: from newton.physics.purdue.edu by uunet.uu.net (5.61/1.14) with UUCP 
X	id AA09213; Thu, 21 Jun 90 22:25:23 -0400
XReceived: from pur-ee.UUCP by rutgers.edu (5.59/SMI4.0/RU1.3/3.06) with UUCP 
X	id AA09418; Thu, 21 Jun 90 20:35:51 EDT
XReceived: from newton.physics.purdue.edu by ee.ecn.purdue.edu (5.61/1.22jrs)
X	id AA12577; Thu, 21 Jun 90 16:36:00 -0500
XReceived: from sawmill.UUCP by newton.physics.purdue.edu (5.61/1.34)
X	id AA01715; Thu, 21 Jun 90 16:06:36 -0500
XReceived: by sawmill.UUCP (5.61/1.35)
X	id AA08039; Thu, 21 Jun 90 15:36:57 -0500
XDate: Thu, 21 Jun 90 15:36:57 -0500
XFrom: Jeffery A Buhrt <sawmill!buhrt at newton.physics.purdue.edu>
XMessage-Id: <9006212036.AA08039 at sawmill.UUCP>
XTo: uunet!sources at uunet.uu.net
XSubject: Sc6.8 (part 4 of 4)
XStatus: R
X
END_OF_FILE
  if test 1033 -ne `wc -c <'sc6.8p4.hdr'`; then
    echo shar: \"'sc6.8p4.hdr'\" unpacked with wrong size!
  fi
  # end of 'sc6.8p4.hdr'
fi
if test -f 'tutorial.sc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'tutorial.sc'\"
else
  echo shar: Extracting \"'tutorial.sc'\" \(4292 characters\)
  sed "s/^X//" >'tutorial.sc' <<'END_OF_FILE'
X# This data file was generated by the Spreadsheet Calculator.
X# You almost certainly shouldn't edit it.
X
Xdefine "page4" A70
Xdefine "page3" A49
Xdefine "page2" A29
Xdefine "page1" A9
Xdefine "page5" A89
Xleftstring A1 = "This is a brief sc tutorial."
Xleftstring A3 = "Cells are named by their column and row number.  For example,"
Xleftstring A4 = "Cell A4"
Xleftstring B4 = "Cell B4"
Xleftstring C4 = "Cell C4"
Xleftstring A5 = "Cell A5"
Xleftstring A6 = "Cell A6"
Xleftstring C6 = "Cell C6"
Xleftstring A7 = "Cells range from A0 to AN199."
Xleftstring A8 = "Cells can also be named by the user.  See 'range names' in the manual."
Xleftstring page1 = "You can move the cursor a couple of different ways:"
Xleftstring A11 = "^n, j and the <DOWN> arrow key go down"
Xleftstring A12 = "^p, k and the <UP> arrow key go up"
Xleftstring A13 = "^b, h and the <LEFT> arrow key go left"
Xleftstring A14 = "^f, l and the <RIGHT> arrow key go right"
Xleftstring A15 = "You can go directly to a cell by typing 'g' and the cell name. "
Xleftstring A16 = "'g c6' will take you to cell c6."
Xleftstring A18 = "Cells can contain numbers, formulas, or text."
Xleftstring A19 = "Most of the cells on this page contain text."
Xleftstring C20 = "<Type 'g page2' to continue>"
Xleftstring A22 = "Cell d22 contains text"
Xleftstring D22 = "Text "
Xleftstring A23 = "Cell d23 contains a number"
Xlet D23 = 123.34
Xleftstring A24 = "Cell d24 contains a formula"
Xlet D24 = D23+88
Xleftstring A26 = "To see what the cell contains, just move the cursor"
Xleftstring A27 = "onto the cell.  The contents will show up on line 1 in the brackets."
Xleftstring page2 = "You can enter data into cells like this:"
Xleftstring B30 = "'<text' enters left justified text."
Xleftstring B31 = "'>text' enters right justified text."
Xleftstring B32 = "'=number' enters a number"
Xleftstring B33 = "'=formula' enters a formula."
Xleftstring A35 = "Try duplicating d22 through d24 in e22 though e24."
Xleftstring A37 = "You erase a cell by typing 'x' with the cursor on the cell."
Xleftstring C40 = "<Type 'g page3' to continue>"
Xleftstring A42 = "Here is a typical use for numbers and formulas:"
Xlet A44 = 10.3
Xlet B44 = 1877.5
Xlet C44 = 234.7
Xlet E44 = @sum(A44:C44)
Xlet A45 = 44.56
Xlet B45 = 44.3
Xlet C45 = -3
Xlet E45 = @sum(A45:C45)
Xlet A46 = 88.74
Xlet B46 = 8000
Xlet C46 = -9
Xlet E46 = @sum(A46:C46)
Xlet A47 = 99.2
Xlet B47 = -88
Xlet C47 = -44.6
Xlet E47 = @sum(A47:C47)
Xlet page3 = @sum(A44:A47)
Xlet B49 = @sum(B44:B47)
Xlet C49 = @sum(C44:C47)
Xlet E49 = @sum(A44:C47)
Xleftstring A51 = "The data is entered in a44 through c47."
Xleftstring A52 = "Cells a49, b49 and c49 sum their respective columns."
Xleftstring A53 = "Cells e44, e45, e46, and e47 sum their respective rows."
Xleftstring A54 = "Cell E49 is a grand total."
Xleftstring A55 = "Try changing some of the data cells and watch the sums change."
Xleftstring A57 = "You can also edit cells by putting the cursor on the cell and typing:"
Xleftstring B58 = "'e' to edit the numeric portion."
Xleftstring B59 = "'E' to edit the string portion."
Xleftstring C60 = "<Type 'g page4' to continue>"
Xleftstring A62 = "Since you are reading this, you know that you can load "
Xleftstring A63 = "a data base from a file by typing the file name as an"
Xleftstring A64 = "argument to the program.  You can also load or save a "
Xleftstring A65 = "data base using the file commands:"
Xleftstring B67 = "'G file'"
Xleftstring C67 = "Gets the data from an sc file."
Xleftstring B68 = "'P file'"
Xleftstring C68 = "Puts the data from the spreadsheet into a file."
Xleftstring page4 = "Try 'P foo.sc' to write this to the file foo.sc"
Xleftstring A71 = "The Get command erases the current spreadsheet.  "
Xleftstring A72 = "To merge a spreadsheet with the one currently in"
Xleftstring A73 = "the machine, use:"
Xleftstring B75 = "'M file'"
Xleftstring C75 = "Merge the data from a saved sc file."
Xleftstring A77 = "You can also get human readable versions of the data"
Xleftstring A78 = "by using the Write command:"
Xleftstring C80 = "<Type 'g page5' to continue>"
Xleftstring A82 = "Try 'W tut.txt' for a clear text version of the tutorial."
Xleftstring A85 = "This is the end of the tutorial.  We have explored"
Xleftstring A86 = "The basic commands.  Much more detail is available"
Xleftstring A87 = "in the man page."
Xleftstring D91 = "GOOD LUCK!"
END_OF_FILE
  if test 4292 -ne `wc -c <'tutorial.sc'`; then
    echo shar: \"'tutorial.sc'\" unpacked with wrong size!
  fi
  # end of 'tutorial.sc'
fi
echo shar: End of archive 6 \(of 6\).
cp /dev/null ark6isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 6 archives.
    rm -f ark[1-9]isdone
else
    echo You still must unpack the following archives:
    echo "        " ${MISSING}
fi
exit 0
exit 0 # Just in case...
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.



More information about the Comp.sources.unix mailing list