home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-02 | 60.0 KB | 1,826 lines |
- Newsgroups: comp.sources.misc
- From: art@cs.ualberta.ca (Art Mulder)
- Subject: v35i096: ss - Simple Spreadsheet program, v1.2b, Part10/11
- Message-ID: <1993Feb22.154142.22078@sparky.imd.sterling.com>
- X-Md4-Signature: 46c3a483df6365e0657aeeb093c7bcab
- Date: Mon, 22 Feb 1993 15:41:42 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: art@cs.ualberta.ca (Art Mulder)
- Posting-number: Volume 35, Issue 96
- Archive-name: ss/part10
- Environment: curses, sunos, sysv, ultrix, sgi, dec, mips, sun
-
- #! /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".
- # Contents: ss_12b/Copyright ss_12b/Files ss_12b/README ss_12b/Todo
- # ss_12b/VMS_NOTES ss_12b/build.com ss_12b/crypt.c
- # ss_12b/curses_stuff.h ss_12b/disprange.h ss_12b/menu.h
- # ss_12b/menu_macro.c ss_12b/menu_misc.c ss_12b/menu_name.c
- # ss_12b/pss.doc ss_12b/sc_stuff/README.sc ss_12b/sc_stuff/TODO
- # ss_12b/sc_stuff/tutorial.sc ss_12b/sunfkeys/xterm-sun.ti
- # Wrapped by kent@sparky on Sat Feb 20 16:01:05 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 10 (of 11)."'
- if test -f 'ss_12b/Copyright' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/Copyright'\"
- else
- echo shar: Extracting \"'ss_12b/Copyright'\" \(1439 characters\)
- sed "s/^X//" >'ss_12b/Copyright' <<'END_OF_FILE'
- X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- X
- X Copyright (c) 1992 by Arthur E. Mulder.
- X
- X All Rights Reserved
- X
- X Permission to use, copy, modify, and distribute this software and its
- X documentation for any purpose and without fee is hereby granted,
- X provided that the above copyright notice appears in all copies and that
- X both that copyright notice and this permission notice appear in
- X supporting documentation, and that the names of any persons or
- X organizations involved not be used in advertising or publicity
- X pertaining to distribution of the software without specific, written
- X prior permission.
- X
- X ALL PERSONS AND ORGANIZATIONS INVOLVED IN THE CREATION OF THIS SOFTWARE
- X DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- X IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- X ANY OF THEM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- X DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- X PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- X ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- X THIS SOFTWARE.
- X
- X For a full list of Authors (and Contributors) of the software
- X making up this package, please refer to the section "AUTHORS"
- X at the end of the ss documentation (The ss.man file).
- X
- X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- END_OF_FILE
- if test 1439 -ne `wc -c <'ss_12b/Copyright'`; then
- echo shar: \"'ss_12b/Copyright'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/Copyright'
- fi
- if test -f 'ss_12b/Files' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/Files'\"
- else
- echo shar: Extracting \"'ss_12b/Files'\" \(3529 characters\)
- sed "s/^X//" >'ss_12b/Files' <<'END_OF_FILE'
- X**INCOMPLETE**
- X----------------------------------------------------------------------
- XHERE IS A LIST OF ALL THE FILES IN THE DISTRIBUTION:
- X
- X NOTE: Files marked with a "*" are files that are either unchanged
- X from their ``sc 6.21'' counterparts, or have only minor
- X modifications. (OR, I've never even looked at them, and
- X have no comprehension at all as to how they work :-)
- X
- X----------------------------------------------------------------------
- X* cmds.c - Command routines
- X* crypt.c - Encryption utilities. Our system, being outside the US,
- X can not use this. Therefore this file is completely
- X untouched, and the encryption feature is completely
- X untried in 'ss'.
- X
- X ctrl.c / ctrl.h - Process Control Character Commands (as opposed to
- X menu commands).
- X
- X disprange.c / disprange.h - Range Display/Manipulate functions.
- X* format.c - formating a number.
- X
- X getinput.c / getinput.h
- X - Functions for getting a line of input. Allows
- X user editting of the input, etc. Based upon
- X "input-edit" by Chris Thewalt.
- X
- X* gram.y - YACC file -> command parser. Becomes gram.c
- X* interp.c - Expression interpreter.
- X
- X keys.h - Header file, defining 'ss' key bindings.
- X* lex.c - lexical analyzer (input processing also)
- X
- X menu.c / menu.h
- X - Menu Driver. Functions for displaying the command menus and
- X processing the related input.
- X
- X menu_cell.c / menu_cell.h - Cell Menu Operations
- X menu_edit.c / menu_edit.h - Edit Menu Operations
- X menu_file.c / menu_file.h - File Menu Operations
- X menu_macro.c / menu_macro.h - Macro Menu Operations
- X menu_misc.c / menu_misc.h - Misc Menu Operations
- X menu_name.c / menu_name.h - Name Sub-Menu Operations
- X menu_rowcol.c / menu_rowcol.h - Row Menu & Column Menu Operations
- X
- X* range.c - Range Manipulations
- X* screen.c - Curses based screen driver. (screen update routines)
- X ss.c / ss.h - main program, main loop.
- X version.c - 'ss' release version number
- X* vmtbl.c - Spreadsheet 'tbl' creation
- X* xmalloc.c - a "safer saner" malloc, for careless programmers.
- X
- X----------------------------------------------------------------------
- XMISC FILES:
- X
- X Bugs - Known problems not yet fixed.
- X Copyright - Self-explanatory.
- X Files - This file
- X Makefile - for building 'ss'
- X Prog.doc - random thoughts, directed at programmers
- X README - READ THIS FILE FIRST. General overview, & Instructions
- X Todo - Ideas for enhancements for the next version.
- X
- X* eres.sed -\ Sed command files. Used in the Makefile, to build
- X* sres.sed -/ experres.h and statres.h
- X
- X ss.man - main man page for ss.
- X* torev - Sed command file. Used by the Makefile, in building
- X 'ss.l' from 'ss.man'. (Some global changes are made,
- X see the warning comments in 'ss.man').
- X
- X sc_stuff/ - Contains misc. files left over from sc. No longer used.
- X sunfkeys/ - See 'README' and 'sunfkeys/README' for the best
- X explanation of what this is.
- X
- X----------------------------------------------------------------------
- XPSS FILES:
- X
- X* pss.c - Converts ASCII files into sc (and, therefore 'ss')
- X compatible files. See the man page for more info.
- X* pss.doc - Man page for psc.c
- X
- X NOTE: These files are identical to the "psc.c" and "psc.doc"
- X files from the sc 6.21 package, they have only been
- X renamed.
- X
- X----------------------------------------------------------------------
- XVMS FILES:
- X
- X* VMS_NOTES - Instructions for VMS users
- X* build.com - Makefile equivalent, for VMS systems
- X
- X----------------------------------------------------------------------
- END_OF_FILE
- if test 3529 -ne `wc -c <'ss_12b/Files'`; then
- echo shar: \"'ss_12b/Files'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/Files'
- fi
- if test -f 'ss_12b/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/README'\"
- else
- echo shar: Extracting \"'ss_12b/README'\" \(4777 characters\)
- sed "s/^X//" >'ss_12b/README' <<'END_OF_FILE'
- X----------------------------------------------------------------------
- Xss
- X
- X This is ``ss'' release 1.2-beta.
- X
- X SS is a spreadsheet program. It is based upon the well known(?)
- X public domain spreadsheet program sc 6.19.
- X
- X ss is Curses based. It should function on any ASCII terminal, or in
- X any terminal window in a windowing environment.
- X
- X ss is a major overhaul of the _user_interface_ of sc. I tried to
- X make it much more similar to the spreadsheets found on personal
- X computers. It makes use of hierarchical menus, and has a full range
- X of `standard' spreadsheet functions.
- X
- X I toyed around with starting off at version number 7.0, since I used
- X sc 6.19 (and later 6.21) as my starting point, but I decided that
- X would be a bit presumptuous. So I hope this low release/version
- X number doesn't scare away too many people. There really is a *LOT*
- X of work put in by a lot of people over a long period of time in the
- X sc 6.19 code, which serves as the heart of ss.
- X
- X This is an ASCII spreadsheet program. This is not Lotus 1-2-3. It
- X is not Microsoft Excel. It does not do graphs or charts. It does
- X not do drawings. It does not use a mouse.
- X
- X It _does_ do a fine job of manipulating rows and columns of numbers.
- X Want a simple way of managing your student's grades, calculating class
- X averages, etc? No problem. Want to figure out how much money you
- X can borrow from the bank for a mortgage? We can do that.
- X
- X NOTE: THIS IS A BETA RELEASE. TREAD CAREFULLY.
- X
- X Jan 26, 1993
- X Art Mulder (email: art@cs.ualberta.ca)
- X Department of Computing Science
- X University of Alberta, Edmonton, Canada
- X
- X----------------------------------------------------------------------
- XTESTED SYSTEMS
- X
- X ``ss'' has been tested (clean compile) on:
- X Sun 4 (Sparc - SunOS 4.1.1)
- X Sun 3 (SunOS 4.1.1)
- X Mips (Risc/os 5.0)
- X Dec (Ultrix 4.2A)
- X Silicon Graphics (4D340S - IRIX Release 4.0.5)
- X
- X----------------------------------------------------------------------
- XINSTALLATION PROCEDURE
- X
- X The included "Makefile" contains complete instructions for
- X building ``ss''.
- X
- X----------------------------------------------------------------------
- XINSTALLATION NOTES
- X
- X About the "sunfkeys" directory:
- X
- X IF you are running X11R4 on a Sun workstation, and IF you use
- X "xterm(1)" for your terminal sessions, then you probably should look
- X at the README file in the "sunfkeys" directory. In it's basic state,
- X Xterm does not let you use/access most of the keypad or the function keys.
- X The contents of "sunfkeys" will help you modify your terminfo/termcap
- X files so that you can.
- X
- X You can use 'ss' without the sunfkeys stuff. Conversely, you can use the
- X 'sunfkeys' stuff with programs other than 'ss'. I developed sunfkeys when
- X I was working on 'ss', because I wanted to be able to use the arrow keys,
- X Home, End, PgUp and PgDn keys with it.
- X
- X See sunfkeys/README for details.
- X
- X----------------------------------------------------------------------
- XBUGS:
- X
- X I'd be dreaming if I thought that this were bug-free. For one thing,
- X I've never tested it on anything but a Sun. (I've compiled it on a MIPS,
- X but have not made extensive use of it there.) If you find bugs, I'd
- X like to hear about them (I say that with a certain amount of
- X trepidation). However, I would be much more interested in hearing
- X about bugs WHICH YOU HAVE FIXED, complete with code patches, etc.
- X
- X The original sc ran on a number of platforms: VMS, MS-DOS and many Unix
- X varients. I don't have all those at my disposal. (Neither do I have the
- X time nor inclination to try them all out) I don't *THINK* I've changed
- X anything which would limit it's portability, but no guarantees are given.
- X
- X Please let me know about your successes in porting to other platforms.
- X
- X----------------------------------------------------------------------
- XCOPYRIGHT
- X
- X Please see the file "Copyright"
- X
- X I'm not trying to restrict anyone's free use of ``ss'', I just
- X don't want anyone turning around and (a) claiming that they
- X wrote it or (b) selling it.
- X
- X----------------------------------------------------------------------
- XBETA RELEASE LIMITATIONS
- X
- X The many spreadsheet functions have NOT been tested in any great
- X detail. (I mostly made cosmetic/User Interfance modifications, so I
- X did not anticipate needing any major changes in the functions)
- X
- X Hooks exist in the code for the inclusion of calls to context-sensitive
- X (sort-of) help functions.
- X -> writing "help" has begun, but only just, and so it is
- X currently not installed. I'm not sure whether it is
- X worth the work involved to install it.
- X
- X There is no tutorial (either text or spreadsheet).
- X
- X There is no quick reference card.
- X
- X----------------------------------------------------------------------
- Xend
- END_OF_FILE
- if test 4777 -ne `wc -c <'ss_12b/README'`; then
- echo shar: \"'ss_12b/README'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/README'
- fi
- if test -f 'ss_12b/Todo' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/Todo'\"
- else
- echo shar: Extracting \"'ss_12b/Todo'\" \(2014 characters\)
- sed "s/^X//" >'ss_12b/Todo' <<'END_OF_FILE'
- XArt's TODO list
- X
- XIDEAS/THOUGHTS FOR THE NEXT RELEASE
- X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- X
- X1) Change the <CR> feature. Instead of toggling what to do, keep
- X track of the last arrow key direction, and make *that* the
- X <CR> direction (like EZ-calc)
- X
- X- Reverse video on some of the prompts?
- X- Convert smaller functions to macro's
- X
- X- Clean up the code. See if we can move some of those #IFDEF's
- X into a header file and get them out of the code. SEE the document
- X on code style!
- X
- X2) /RowColumn
- X - Yank should (like Merge) automagically insert Rows or Columns
- X (either-or, not both) for the yanked text.
- X
- X3) work up a cut & paste gizmo, instead of the current
- X kludgey delete/yank/merge mess
- X
- X4) Context (so-so) sensitive on-line help!
- X
- X5) Tutorial Spreadsheet
- X
- X6) startup "rc" file for setting lots of things up
- X -> ability to bind keys & Fkeys to actions
- X (this'll probably require a lot of work in the
- X interpretation of command keys in the code, but
- X it'd really make the program MUCH better)
- X
- X7) Trim the man page to a bare-bones quick-reference -> I think that's
- X the best use for it -> then put together a LaTeX(?) tutorial/introduction
- X manual full of verbiage & other stuff that most folks only need to see
- X occaisionally.
- X
- X (??? Is this a good idea ???)
- X
- X8) Put an indicator in the top left corner of the spreadsheet
- X display, an ``*'' to indicate when the spreadsheet has been changed.
- X (This would go in the blank space left of the " A " and above
- X the "0 ")
- X
- X flip the row/colum labels where the cursor is located into
- X inverse video ??????? make it easier to locate the cursor?
- X
- X9) clean up sc.h -> distribute files amongst proper *.c files ??
- X -> or leave all in one *.c file, but organize the file
- X
- X10) Row/Column Menu -> "Show". In 'sc' you could enter a range of
- X rows or columns to show. Add this functionality back?
- X
- X
- X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- END_OF_FILE
- if test 2014 -ne `wc -c <'ss_12b/Todo'`; then
- echo shar: \"'ss_12b/Todo'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/Todo'
- fi
- if test -f 'ss_12b/VMS_NOTES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/VMS_NOTES'\"
- else
- echo shar: Extracting \"'ss_12b/VMS_NOTES'\" \(4341 characters\)
- sed "s/^X//" >'ss_12b/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 <'ss_12b/VMS_NOTES'`; then
- echo shar: \"'ss_12b/VMS_NOTES'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/VMS_NOTES'
- fi
- if test -f 'ss_12b/build.com' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/build.com'\"
- else
- echo shar: Extracting \"'ss_12b/build.com'\" \(1437 characters\)
- sed "s/^X//" >'ss_12b/build.com' <<'END_OF_FILE'
- X$! VMS command file to build SC and PSC (requires bison) on VMS
- X$! SC:
- X$! $Revision: 6.21 $
- X$! bison -d gram.y
- X$! ren gram_tab.c gram.c
- X$ cc'p1' /define=("SIMPLE","SIGVOID") sc.c
- X$ cc'p1' /define=("SIMPLE","SIGVOID") gram.c
- X$ cc'p1' /define=("SIMPLE","SIGVOID") lex.c
- X$ cc'p1' /define=("SIMPLE","SIGVOID","RINT") interp
- X$ cc'p1' /define=("SIMPLE","SIGVOID") cmds
- X$ cc'p1' /define=("SIMPLE","SIGVOID") xmalloc
- X$ cc'p1' /define=("SIMPLE","SIGVOID") range
- X$ cc'p1' /define=("SIMPLE","SIGVOID") help
- X$ cc'p1' /define=("SIMPLE","SIGVOID") vmtbl
- X$ cc'p1' /define=("SIMPLE","SIGVOID") screen
- X$ cc'p1' /define=("SIMPLE","SIGVOID") vi
- X$ cc'p1' /define=("SIMPLE","SIGVOID") format
- X$ link'p1' sc.obj,lex.obj,gram.obj,interp.obj,cmds.obj,xmalloc.obj,-
- X range.obj,help.obj,vmtbl.obj,screen.obj,vi.obj,format.obj,-
- X sys$library:vaxccurse.olb/lib,-
- X sys$library:vaxcrtl/shar
- 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'p1' psc.c
- X!$ cc'p1' getopt.c
- X$ link'p1' psc,getopt,vmtbl.obj,xmalloc.obj,screen.obj,vi.obj,format.obj,-
- X sys$library:vaxccurse.olb/lib,-
- X sys$library:vaxcrtl/shar
- 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"
- END_OF_FILE
- if test 1437 -ne `wc -c <'ss_12b/build.com'`; then
- echo shar: \"'ss_12b/build.com'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/build.com'
- fi
- if test -f 'ss_12b/crypt.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/crypt.c'\"
- else
- echo shar: Extracting \"'ss_12b/crypt.c'\" \(4228 characters\)
- sed "s/^X//" >'ss_12b/crypt.c' <<'END_OF_FILE'
- X/*
- X * Encryption utilites
- X * Bradley Williams
- X * {allegra,ihnp4,uiucdcs,ctvax}!convex!williams
- X * $Revision: 6.21 $
- X */
- X
- X#ifndef lint
- X static char Sccsid[] = "%W% %G%";
- X#endif
- X
- X#if !defined(VMS) && !defined(MSDOS) && defined(CRYPT_PATH)
- X
- X#include <stdio.h>
- X#include "curses_stuff.h"
- X
- X#if defined(BSD42) || defined(BSD43)
- X#include <sys/types.h>
- X#include <sys/file.h>
- X#else
- X#include <fcntl.h>
- X#endif
- X
- X#include "ss.h"
- X
- Xchar *getpass();
- X
- X#ifdef SYSV3
- Xvoid exit();
- X#endif
- X
- Xint Crypt = 0;
- X#define MAXKEYWORDSIZE 30
- Xchar KeyWord[MAXKEYWORDSIZE] = {""};
- X
- Xvoid
- 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 (void) strcpy(KeyWord, getpass("Enter key:"));
- X goraw();
- X
- 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 (CRYPT_PATH, "crypt", KeyWord, 0);
- X (void) fprintf (stderr, "execl(%s, \"crypt\", %s, 0) in creadfile() failed",
- X CRYPT_PATH, KeyWord);
- 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 linelim = -1;
- X modflg++;
- X if (eraseflg) {
- X (void) strcpy (curfile, save);
- X modflg = 0;
- X }
- X EvalAll();
- X}
- X
- Xint
- 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 if (KeyWord[0] == '\0') {
- X deraw();
- X (void) strcpy(KeyWord, getpass("Enter key:"));
- X goraw();
- X }
- X
- 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 (CRYPT_PATH, "crypt", KeyWord, 0);
- X (void) fprintf (stderr, "execl(%s, \"crypt\", %s, 0) in cwritefile() failed",
- X CRYPT_PATH, KeyWord);
- 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 (encrypted).", curfile);
- X return(0);
- X}
- X
- X#endif /* CRYPT_PATH */
- END_OF_FILE
- if test 4228 -ne `wc -c <'ss_12b/crypt.c'`; then
- echo shar: \"'ss_12b/crypt.c'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/crypt.c'
- fi
- if test -f 'ss_12b/curses_stuff.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/curses_stuff.h'\"
- else
- echo shar: Extracting \"'ss_12b/curses_stuff.h'\" \(1205 characters\)
- sed "s/^X//" >'ss_12b/curses_stuff.h' <<'END_OF_FILE'
- X/**********************************************************************
- X* %W% %G%
- X*
- X* ss : A SpreadSheet Program
- X*
- X* Art's Spreadsheet program. Art Mulder ( art@cs.ualberta.ca )
- X* University of Alberta, Department of Computing Science.
- X***********************************************************************
- X* Header file for Curses-Related stuff
- X***********************************************************************
- X*
- X**********************************************************************/
- X
- X#ifndef curses_stuff_h
- X# define curses_stuff_h
- X
- X/*
- X * For Dec/Ultrix you have to include cursesX.h in order to get the
- X * Unix System-V curses stuff.
- X */
- X#if defined(ULTRIX)
- X# include <cursesX.h>
- X#else /* not Ultrix */
- X# include <curses.h>
- X#endif
- X
- X#ifndef A_STANDOUT /* Should be defined in curses.h */
- X# define A_STANDOUT _STANDOUT
- X#endif
- X
- X/*
- X * Take care of some system specific curses definitions
- X */
- X#ifndef A_CHARTEXT /* Should be defined in curses.h */
- X# ifdef INTERNATIONAL
- X# define A_CHARTEXT 0xff
- X# else
- X# define A_CHARTEXT 0x7f
- X# endif
- X#endif
- X
- X#endif /* ifndef curses_stuff_h */
- X/*----------------------------------------------------------------------
- X * End
- X */
- END_OF_FILE
- if test 1205 -ne `wc -c <'ss_12b/curses_stuff.h'`; then
- echo shar: \"'ss_12b/curses_stuff.h'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/curses_stuff.h'
- fi
- if test -f 'ss_12b/disprange.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/disprange.h'\"
- else
- echo shar: Extracting \"'ss_12b/disprange.h'\" \(920 characters\)
- sed "s/^X//" >'ss_12b/disprange.h' <<'END_OF_FILE'
- X/**********************************************************************
- X* %W% %G%
- X*
- X* ss : A SpreadSheet Program
- X*
- X* Art's Spreadsheet program. Art Mulder ( art@cs.ualberta.ca )
- X* University of Alberta, Department of Computing Science.
- X***********************************************************************
- X* disprange.c header file
- X**********************************************************************/
- X
- X#ifndef disprange_h
- X# define disprange_h
- X
- X/*
- X * Function Prototypes
- X */
- X
- X void RangeToggle();
- X char * RangeGet();
- X void RangeGetNum();
- X char * RangeForceInput();
- X
- X/* OLD */
- X/** void GetRangeInput(); **/
- X/** int GetRange( minr,minc,maxr,maxc ); **/
- X
- X void startshow();
- X void showdr();
- X
- X#endif /* disprange_h undefined */
- X
- X/**********************************************************************
- X* End
- X**********************************************************************/
- END_OF_FILE
- if test 920 -ne `wc -c <'ss_12b/disprange.h'`; then
- echo shar: \"'ss_12b/disprange.h'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/disprange.h'
- fi
- if test -f 'ss_12b/menu.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/menu.h'\"
- else
- echo shar: Extracting \"'ss_12b/menu.h'\" \(981 characters\)
- sed "s/^X//" >'ss_12b/menu.h' <<'END_OF_FILE'
- X/**********************************************************************
- X* %W% %G%
- X*
- X* ss : A SpreadSheet Program
- X*
- X* Art's Spreadsheet program. Art Mulder ( art@cs.ualberta.ca )
- X* University of Alberta, Department of Computing Science.
- X***********************************************************************
- X* menu.c header file
- X**********************************************************************/
- X
- X#ifndef menu_h
- X# define menu_h
- X
- X/*
- X * Function Prototypes
- X */
- X void MainMenu();
- X
- X void CellNameMenu();
- X/* void MacroMenu(); */
- X void OptionsMenu();
- X
- X void doShowRangeNames();
- X
- X/** void GetCellInput(); **/
- X/** void GetCommandInput(); **/
- X/** void GetCommandEdit(); **/
- X/** void GetCommand(); **/
- X
- X/** void ClearError(); **/
- X/** void prompt(); **/
- X
- X#endif /* menu_h undefined */
- X
- X/**********************************************************************
- X* End
- X**********************************************************************/
- END_OF_FILE
- if test 981 -ne `wc -c <'ss_12b/menu.h'`; then
- echo shar: \"'ss_12b/menu.h'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/menu.h'
- fi
- if test -f 'ss_12b/menu_macro.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/menu_macro.c'\"
- else
- echo shar: Extracting \"'ss_12b/menu_macro.c'\" \(1978 characters\)
- sed "s/^X//" >'ss_12b/menu_macro.c' <<'END_OF_FILE'
- X/**********************************************************************
- X* %M%
- X* Art Mulder ( art@cs.ualberta.ca )
- X* University of Alberta, Department of Computing Science.
- X***********************************************************************
- X* Macro Menu Operations
- X***********************************************************************
- X**********************************************************************/
- X#ifndef lint
- X static char Sccsid[] = "%W% %G%";
- X#endif
- X
- X/*
- X * Include files
- X */
- X#include <stdio.h>
- X#include <string.h>
- X#include "curses_stuff.h"
- X
- X#include "ss.h"
- X#include "getinput.h"
- X#include "menu_macro.h"
- X
- X/* Internal Macros & Data Structures
- X *----------------------------------------------------------------------
- X */
- X
- X
- X
- X/* External Global variables
- X *----------------------------------------------------------------------
- X */
- X
- X
- X/* Externally Accessible Functions
- X ***********************************************************************
- X */
- X
- Xvoid MacroRun()
- X/*----------------------------------------------------------------------
- X** Load & Run a file of Macros
- X*/
- X{
- X Message("** Run Macros from file...");
- X
- X if (mdir) {
- X char temp[MAXSTR];
- X
- X Sprintf(temp,"%s/", mdir);
- X buff = gi_editline( temp );
- X } else
- X buff = gi_line();
- X ABORT_AND_RETURN_IF_BUFF_NULL;
- X
- X Sprintf (line,"merge [\"macro_file\"] \"%s\" ", buff);
- X ClearMessage;
- X PROCESS_line;
- X
- X} /* MacroRun() */
- X
- Xvoid MacroDefine()
- X/*----------------------------------------------------------------------
- X** Define a Sub-directory name, where macro files are to be found
- X*/
- X{
- X Message("** Define path (Sub-directory) for `Run Macro'");
- X buff = gi_line();
- X ABORT_AND_RETURN_IF_BUFF_NULL;
- X
- X Sprintf (line, "mdir [\"macro_directory\"] \"%s\"", buff);
- X ClearMessage;
- X PROCESS_line;
- X
- X} /* MacroDefine() */
- X
- X/**********************************************************************
- X* End
- X**********************************************************************/
- X
- END_OF_FILE
- if test 1978 -ne `wc -c <'ss_12b/menu_macro.c'`; then
- echo shar: \"'ss_12b/menu_macro.c'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/menu_macro.c'
- fi
- if test -f 'ss_12b/menu_misc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/menu_misc.c'\"
- else
- echo shar: Extracting \"'ss_12b/menu_misc.c'\" \(4157 characters\)
- sed "s/^X//" >'ss_12b/menu_misc.c' <<'END_OF_FILE'
- X
- X/**********************************************************************
- X* %M%
- X* Art Mulder ( art@cs.ualberta.ca )
- X* University of Alberta, Department of Computing Science.
- X***********************************************************************
- X* Misc Menu Operations
- X***********************************************************************
- X**********************************************************************/
- X#ifndef lint
- X static char Sccsid[] = "%W% %G%";
- X#endif
- X
- X/*
- X * Include files
- X */
- X#include <stdio.h>
- X#include <string.h>
- X#include <signal.h>
- X#include "curses_stuff.h"
- X#include <stdlib.h>
- X
- X#include "ss.h"
- X#include "getinput.h"
- X#include "disprange.h"
- X#include "menu_misc.h"
- X
- X/* Internal Macros & Data Structures
- X *----------------------------------------------------------------------
- X */
- X
- X
- X
- X/* External Global variables
- X *----------------------------------------------------------------------
- X */
- X extern int showneed; /* From main.c */
- X extern int anychanged; /* ditto */
- X extern int showexpr; /* ditto */
- X extern int ClearScreen; /* ditto */
- X
- X
- X
- X/* Externally Accessible Functions
- X ***********************************************************************
- X */
- X
- Xvoid MiscShell()
- X/*----------------------------------------------------------------------
- X** - Access to the shell
- X** "! command" executes command
- X** "!" forks a shell
- X** "!!" repeats last command
- X*/
- X{
- X#if VMS || MSDOS
- X Message("Not implemented on VMS or MS-DOS");
- X#else /* NOT VMS or MSDOS */
- X
- X char *shl;
- X int pid, temp;
- X char cmd[MAXSTR];
- X static char lastcmd[MAXSTR];
- X
- X if (!(shl = getenv("SHELL")))
- X shl = "/bin/sh";
- X
- X deraw();
- X (void) fputs("! ", stdout);
- X (void) fflush(stdout);
- X (void) fgets(cmd, MAXSTR, stdin);
- X cmd[strlen(cmd) - 1] = '\0'; /* clobber \n */
- X if(strcmp(cmd,"!") == 0) /* repeat? */
- X (void) strcpy(cmd, lastcmd);
- X else
- X (void) strcpy(lastcmd, cmd);
- X
- X if (modflg) {
- X (void) puts("[No write since last change]");
- X (void) fflush (stdout);
- X }
- X
- X if (!(pid = fork())) {
- X (void) signal (SIGINT, SIG_DFL); /* reset */
- X if(strlen(cmd))
- X (void)execl(shl,shl,"-c",cmd,(char *)0);
- X else
- X (void) execl(shl, shl, (char *)0);
- X exit(-127);
- X }
- X
- X while (pid != wait(&temp));
- X
- X (void) printf("Press RETURN to continue ");
- X fflush(stdout);
- X (void)nmgetch();
- X goraw();
- X#endif /* VMS */
- X} /* MiscShell() */
- X
- Xvoid MiscSettings()
- X/*----------------------------------------------------------------------
- X** Change various spreadsheet settings.
- X**
- X** THIS IS UGLY. HOLDOVER FROM 'sc' FIX PLEASE!
- X*/
- X{
- X
- X Message("Set:byrows,bycols,iterations=n,tblstyle=(0|tbl|latex|slatex|tex|frame),<MORE>");
- X
- X buff = gi_line();
- X ABORT_AND_RETURN_IF_BUFF_NULL;
- X Sprintf (line, "set %s", buff);
- X ClearMessage;
- X modflg++; /* So Settings get saved in Spreadsheet file */
- X PROCESS_line
- X
- X} /* MiscSettings() */
- X
- Xvoid MiscRedraw(show_values)
- X/*----------------------------------------------------------------------
- X** Redraw the screen, Highlight Cells containing Values if
- X** ``show_values'' is true.
- X*/
- X int show_values;
- X{
- X
- X if (show_values == TRUE) {
- X Message("** All Highlighted cells contain Values.");
- X showneed = 1;
- X }
- X FullUpdate++;
- X ClearScreen++;
- X (void) clearok(stdscr,1);
- X
- X /* Centering the display with cursor for middle */
- X if(currow > (LINES-RESROW)/2)
- X strow = currow - ((LINES-RESROW)/2);
- X
- X} /* MiscRedraw() */
- X
- Xvoid MiscRedraw_Expr()
- X/*----------------------------------------------------------------------
- X** Redraw the screen, Highlight Cells containing Expressions
- X*/
- X{
- X Message("** All Highlighted cells contain Expressions.");
- X
- X FullUpdate++;
- X showexpr = 1;
- X (void) clearok(stdscr,1);
- X}
- X
- Xvoid MiscRecalc()
- X/*----------------------------------------------------------------------
- X** Recalculate the Spreadsheet.
- X*/
- X{
- X ClearMessage;
- X EvalAll ();
- X changed = 0;
- X anychanged = TRUE;
- X Message("** Spreadsheet Recalculated.");
- X}
- X
- X/**********************************************************************
- X* End
- X**********************************************************************/
- END_OF_FILE
- if test 4157 -ne `wc -c <'ss_12b/menu_misc.c'`; then
- echo shar: \"'ss_12b/menu_misc.c'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/menu_misc.c'
- fi
- if test -f 'ss_12b/menu_name.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/menu_name.c'\"
- else
- echo shar: Extracting \"'ss_12b/menu_name.c'\" \(3689 characters\)
- sed "s/^X//" >'ss_12b/menu_name.c' <<'END_OF_FILE'
- X
- X/**********************************************************************
- X* %M%
- X* Art Mulder ( art@cs.ualberta.ca )
- X* University of Alberta, Department of Computing Science.
- X***********************************************************************
- X* Name Sub-Menu Operations
- X***********************************************************************
- X**********************************************************************/
- X#ifndef lint
- X static char Sccsid[] = "%W% %G%";
- X#endif
- X
- X/*
- X * Include files
- X */
- X#include <stdio.h>
- X#include <string.h>
- X#include "curses_stuff.h"
- X
- X#include "ss.h"
- X#include "getinput.h"
- X#include "disprange.h"
- X#include "menu_name.h"
- X
- Xextern char *getenv();
- X
- X/* Internal Macros & Data Structures
- X *----------------------------------------------------------------------
- X */
- X
- X
- X
- X/* External Global variables
- X *----------------------------------------------------------------------
- X */
- X
- X
- X
- X/* Externally Accessible Functions
- X ***********************************************************************
- X */
- X
- Xvoid NameDefine()
- X/*----------------------------------------------------------------------
- X** Define a Name for a range of cells. If no range is currently defined,
- X** then define a name for the current cell.
- X*/
- X{
- X range = RangeGet(); /* Get range, if any, "" otherwise. */
- X
- X if (range[0] == NULL) /* Null range */
- X Sprintf(message, "** Define a Name for the current cell" );
- X else
- X Sprintf(message, "** Define a Name for the cell range %s", range);
- X
- X Message(message);
- X buff = gi_line();
- X ABORT_AND_RETURN_IF_BUFF_NULL;
- X
- X Sprintf(line,"define [string range] \"%s\" %s", buff, range);
- X modflg++;
- X
- X PROCESS_line;
- X
- X} /* NameDefine() */
- X
- Xvoid NameErase()
- X/*----------------------------------------------------------------------
- X** Erase the name assigned to a range of cells. If no range is
- X** currently defined, then prompt for a cell name to erase.
- X*/
- X{
- X range = RangeGet(); /* Get range, if any, "" otherwise. */
- X
- X if (range[0] == NULL) { /* Null range */
- X Sprintf(message, "** Enter a Cell/Range Name to be erased" );
- X Message(message);
- X buff = gi_line();
- X ABORT_AND_RETURN_IF_BUFF_NULL;
- X
- X Sprintf(line,"undefine [range] %s", buff);
- X PROCESS_line;
- X modflg++;
- X
- X } else {
- X Sprintf(message, "** Erase the Name for the cell range %s ?", range);
- X if (yn_ask(message) == 1) {
- X Sprintf(line,"undefine [range] %s", range);
- X linelim = 0;
- X (void) yyparse ();
- X linelim = -1;
- X modflg++;
- X }
- X }
- X} /* NameErase() */
- X
- Xvoid NameShow()
- X/*----------------------------------------------------------------------
- X** List all Names that have been assigned to cells, or ranges
- X** of cells. Pipe the output to 'sort' and then to a pager.
- X** Therefore the list of names is sorted, and it will not run off the
- X** top of your display.
- X*/
- X{
- X# define MAXCMD 160 /* for ! command below */
- X# ifndef DFLT_PAGER
- X# define DFLT_PAGER "more" /* Default pager */
- X# endif /* DFLT_PAGER */
- X
- X if(are_ranges()) {
- X FILE *f;
- X int pid;
- X char px[MAXCMD] ;
- X char *pager;
- X
- X (void) strcpy(px, "| sort | ");
- X if(!(pager = getenv("PAGER")))
- X pager = DFLT_PAGER;
- X (void) strcat(px,pager);
- X f = openout(px, &pid);
- X if (!f) {
- X Message("** Can't open pipe to sort");
- X return;
- X }
- X list_range(f);
- X closeout(f, pid);
- X
- X } else Message("** No Names have been defined");
- X
- X} /* NameShow() */
- X
- X/**********************************************************************
- X* End
- X**********************************************************************/
- END_OF_FILE
- if test 3689 -ne `wc -c <'ss_12b/menu_name.c'`; then
- echo shar: \"'ss_12b/menu_name.c'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/menu_name.c'
- fi
- if test -f 'ss_12b/pss.doc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/pss.doc'\"
- else
- echo shar: Extracting \"'ss_12b/pss.doc'\" \(2334 characters\)
- sed "s/^X//" >'ss_12b/pss.doc' <<'END_OF_FILE'
- X.\" $Revision: 6.21 $
- X.TH PPNAME\ #REVISION#\ 1
- X.SH NAME
- Xppname \- prepare pname files
- X.SH SYNOPSIS
- X.B ppname
- X[
- X.I -fLkrSPv
- X]
- X[
- X.I -s cell
- X]
- X[
- X.I -R n
- X]
- X[
- X.I -C n
- X]
- X[
- X.I -n n
- X]
- X[
- X.I -d c
- X]
- X
- X.SH DESCRIPTION
- X.I Ppname
- Xis used to prepare data for input to the spread sheet calculator
- X.I pname(1).
- XIt accepts normal ascii data on standard input. Standard output
- Xis a
- X.I pname
- Xfile.
- XWith no options,
- X.I ppname
- Xstarts the spread sheet in cell A0. Strings are right justified.
- XAll data on a line is entered on the same row; new input lines
- Xcause the output row number to increment by one. The default delimiters
- Xare tab and space. The column formats are set to one larger
- Xthan the number of columns required to hold the largest value
- Xin the column.
- X
- XOptions:
- X
- X.IP "\-f"
- XOmit column width calculations. This option is for preparing
- Xdata to be merged with an existing spreadsheet. If the option is not
- Xspecified, the column widths calculated for the data read by
- X.I ppname
- Xwill override those already set in the existing spreadsheet.
- X
- X.IP "\-L"
- XLeft justify strings.
- X
- X.IP "\-k"
- XKeep all delimiters. This option causes the output cell to change on
- Xeach new delimiter encountered in the input stream. The default
- Xaction is to condense multiple delimters to one, so that the cell only
- Xchanges once per input data item.
- X
- X.IP "\-r"
- XOutput the data by row first then column. For input consisting of a single
- Xcolumn, this
- Xoption will result in output of one row with multiple columns
- Xinstead of a single
- Xcolumn spread sheet.
- X
- X.IP "\-s cell"
- XStart the top left corner of the spread sheet in
- X.I cell.
- XFor example,
- X.I "-s B33"
- Xwill arrange the output data so that the
- Xspread sheet starts in column B, row 33.
- X
- X.IP "\-R n"
- XIncrement by
- X.I n
- Xon each new output row.
- X
- X.IP "\-C n"
- XIncrement by
- X.I n
- Xon each new output column.
- X
- X.IP "\-n n"
- XOutput
- X.I n
- Xrows before advancing to the next column. This option is used when
- Xthe input is arranged in a single column and the spread sheet is to
- Xhave multiple columns, each of which is to be length
- X.I n.
- X
- X.IP "\-d c"
- XUse the single character
- X.I c
- Xas the delimiter between input fields.
- X
- X.IP "\-P"
- XPlain numbers only.
- XA field is a number only when there is no imbeded [-+eE].
- X
- X.IP "\-S"
- XAll numbers are strings.
- X
- X.IP "\-v"
- XPrint the version of
- Xppname
- X
- X.SH SEE ALSO
- Xpname(1)
- X
- X.SH AUTHOR
- X
- XRobert Bond
- END_OF_FILE
- if test 2334 -ne `wc -c <'ss_12b/pss.doc'`; then
- echo shar: \"'ss_12b/pss.doc'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/pss.doc'
- fi
- if test -f 'ss_12b/sc_stuff/README.sc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/sc_stuff/README.sc'\"
- else
- echo shar: Extracting \"'ss_12b/sc_stuff/README.sc'\" \(4252 characters\)
- sed "s/^X//" >'ss_12b/sc_stuff/README.sc' <<'END_OF_FILE'
- XThis is a much modified version of the public domain spread sheet sc,
- Xposted several years ago by Mark Weiser as vc, originally by James Gosling.
- X
- XCHANGES lists the changes since 6.1 to 6.21.
- X Sc6.16 was released to comp.sources.misc and four sets of patches
- X bring Sc6.16->6.17->6.18->6.19->6.21.
- X
- XCurrent maintainer: nstar!sawmill!prslnk!buhrt (Jeff Buhrt)
- X
- XWhen you get it built, try "sc tutorial.sc" for a simple introduction
- Xto the basic commands.
- X
- XTo print a quick reference card, type the command:
- X scqref | [your_printer_commmand]
- X
- XIf you have the command 'file' that uses /etc/magic add the line:
- X38 string Spreadsheet sc file
- X
- XPsc formats ascii files for use in the spreadsheet. If you don't have
- Xgetopts, there is a public domain version by Henry Spencer hidden away in
- Xthe VMS_NOTES file.
- X
- XI have modified the Makefile to make it easy for you to call the
- Xprogram what you want. Just change "name=sc" and "NAME=SC" to
- X"name=myfavoritename" and "NAME=MYFAVORITENAME" and try "make
- Xmyfavoritename".
- X
- XSimilarly, you can make the documentation with "make myfavoritename.man".
- X"make install" will make and install the code in EXDIR. The
- Xinstallation steps and documentation all key off of the name. The
- Xmakefile even changes the name in the nroffable man page. If you don't
- Xhave nroff, you will have to change sc.man yourself.
- X
- XThis release has been tested against a Sequent S81 running DYNIX 3.0.17
- X(BSD 4.2):cc, atscc, gcc, AT&T SysV 3.2.2:cc, gcc, ESIX SysV 3.2 Rev D:cc, gcc.
- XJust check the Makefile for the system flags. I have heard
- Xreports of lots of other machines that work. If you have problems with
- Xlex.c, and don't care about arrow keys, define SIMPLE (-DSIMPLE in the
- Xmakefile). SIMPLE causes the arrow keys to not be used.
- X
- XIf you have problems with your yacc saying: too many terminals ...127...
- XFind a different yacc: bison, Berkeley yacc, Pd yacc, etc. AT&T's Sys V
- Xyacc has small, fixed sized tables. SCO will allow dynamic yacc tables
- Xwhen given the correct flags.
- X
- XGuidelines for Hackers:
- X
- XIf you want to send changes you have made to SC, please feel free to do
- Xso. If they work :-) and seem worthwhile, I'll put them in.
- X
- Xa) Please refrain from wholesale "style" or "cleanup" changes. It is easy
- X to add your changes but it makes it hard to merge in the next guy's
- X stuff if he used the release as a base. Suggestions are welcome.
- X
- Xb) Leave my $Revision: identifiers alone-they help me track what you used
- X as a base. If you check the code into rcs, delete the "$"s on the
- X Revison lines before you do.
- Xc) Please abide by the style in the code when you make your changes. It is easy
- X to break things trying to make them look "right".
- Xd) If you do string functions, please, PLEASE pay attention to null pointers,
- X use scxmalloc, scxrealloc, and scxfree; and scxfree those arguments.
- Xe) Please don't forget to document your changes in both help.c and sc.doc.
- Xf) WHEN sending diffs: please use diff -c (context diff, and possibly
- X more than three lines on each side), I get a lot of code and
- X things move.
- Xg) Please send an explanation of what your code does and how to use/test it.
- X
- XDisclaimer:
- X
- XStarting 4/4/90: (I will be maintaining Sc for a while at least,
- X Robert Bond has been very busy lately)
- X
- XArchives:
- X1) (FTP) jpd@usl.edu James Dugal
- X pc.usl.edu in the pub/unix directory
- X
- X2) (UUCP) marc@dumbcat.sf.ca.us (Marco S Hyman)
- X dumbcat Any ACU 9600 14157850194 "" \d\r in:--in: nuucp word: guest
- X dumbcat Any ACU 2400 14157850194 "" \d\r in:-BREAK-in: nuucp word: guest
- X dumbcat Any ACU 1200 14157850194 "" \d\r in:-BREAK-in:-BREAK-in: nuucp word: guest
- X Note: dumbcat speaks 9600 at V.32 -- sorry, this is not a Telebit modem.
- X (Grab dumbcat!~/INDEX for a complete list)
- X
- X3) Sc6.16 was posted in comp.sources.misc, about Jun 4 1991, Volume 20, Issues
- X 035-041. There were then 4 patches: Sc6.16->Sc6.17, Sc6.17->Sc6.18,
- X Sc6.18->Sc6.19, and Sc6.19->Sc6.21.
- X
- X4) (FTP) Paul A Vixie <uunet!decwrl!vixie>
- X gatekeeper.dec.com in /pub/misc/sc-6.21.tar.Z
- X
- XSc is not a product of ProsLink, Inc. It is supplied as is with no
- Xwarranty, express or implied, as a service to Usenet readers. It is not
- Xcopyrighted, either. Have at it.
- X
- X Jeff Buhrt
- X ProsLink, Inc.
- X nstar!sawmill!prslnk!buhrt
- X
- END_OF_FILE
- if test 4252 -ne `wc -c <'ss_12b/sc_stuff/README.sc'`; then
- echo shar: \"'ss_12b/sc_stuff/README.sc'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/sc_stuff/README.sc'
- fi
- if test -f 'ss_12b/sc_stuff/TODO' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/sc_stuff/TODO'\"
- else
- echo shar: Extracting \"'ss_12b/sc_stuff/TODO'\" \(1297 characters\)
- sed "s/^X//" >'ss_12b/sc_stuff/TODO' <<'END_OF_FILE'
- 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 1297 -ne `wc -c <'ss_12b/sc_stuff/TODO'`; then
- echo shar: \"'ss_12b/sc_stuff/TODO'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/sc_stuff/TODO'
- fi
- if test -f 'ss_12b/sc_stuff/tutorial.sc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/sc_stuff/tutorial.sc'\"
- else
- echo shar: Extracting \"'ss_12b/sc_stuff/tutorial.sc'\" \(4523 characters\)
- sed "s/^X//" >'ss_12b/sc_stuff/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 "page5" A90
- Xdefine "page1" A11
- Xdefine "page2" A30
- Xdefine "page3" A50
- Xdefine "page4" A71
- Xleftstring A1 = "This is a brief sc tutorial, best run in a 24-line window."
- Xleftstring A2 = "Type 'q' to exit, ^Z to suspend (w/ Job Control)."
- Xleftstring A3 = "^G interrupts a command."
- Xleftstring A5 = "Cells are named by their column and row number. For example,"
- Xleftstring A6 = "Cell A6"
- Xleftstring B6 = "Cell B6"
- Xleftstring C6 = "Cell C6"
- Xleftstring A7 = "Cell A7"
- Xleftstring A8 = "Cell A8"
- Xleftstring C8 = "Cell C8"
- Xleftstring A9 = "Cells range from A0 to ZZ(some number depending on free memory)."
- Xleftstring A10 = "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 B12 = "^n, j and the <DOWN> arrow key go down"
- Xleftstring B13 = "^p, k and the <UP> arrow key go up"
- Xleftstring B14 = "^b, h and the <LEFT> arrow key go left"
- Xleftstring B15 = "^f, l and the <RIGHT> arrow key go right"
- Xleftstring B16 = "You can go directly to a cell by typing 'g' and the cell name. "
- Xleftstring B17 = "'g c6' will take you to cell c6."
- Xleftstring A19 = "Cells can contain numbers, formulas, or text."
- Xleftstring A20 = "Most of the cells on this page contain text."
- Xleftstring C21 = "<Type 'g page2' to continue>"
- Xleftstring A23 = "Cell d23 contains text"
- Xleftstring D23 = "Text "
- Xleftstring A24 = "Cell d24 contains a number"
- Xlet D24 = 123.34
- Xleftstring A25 = "Cell d25 contains a formula"
- Xlet D25 = D24+88
- Xleftstring A27 = "To see what the cell contains, just move the cursor"
- Xleftstring A28 = "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 B31 = "'<text' enters left justified text."
- Xleftstring B32 = "'>text' enters right justified text."
- Xleftstring B33 = "'=number' enters a number"
- Xleftstring B34 = "'=formula' enters a formula."
- Xleftstring A36 = "Try duplicating d23 through d25 in e23 though e25."
- Xleftstring A38 = "You erase a cell by typing 'x' with the cursor on the cell."
- Xleftstring C41 = "<Type 'g page3' to continue>"
- Xleftstring A43 = "Here is a typical use for numbers and formulas:"
- Xlet A45 = 10.3
- Xlet B45 = 1877.5
- Xlet C45 = 234.7
- Xlet E45 = @sum(A45:C45)
- Xlet A46 = 44.56
- Xlet B46 = 44.3
- Xlet C46 = -3
- Xlet E46 = @sum(A46:C46)
- Xlet A47 = 88.74
- Xlet B47 = 8000
- Xlet C47 = -9
- Xlet E47 = @sum(A47:C47)
- Xlet A48 = 99.2
- Xlet B48 = -88
- Xlet C48 = -44.6
- Xlet E48 = @sum(A48:C48)
- Xlet page3 = @sum(A45:A48)
- Xlet B50 = @sum(B45:B48)
- Xlet C50 = @sum(C45:C48)
- Xlet E50 = @sum(A45:C48)
- Xleftstring A52 = "The data is entered in a45 through c48."
- Xleftstring A53 = "Cells a50, b50 and c50 sum their respective columns."
- Xleftstring A54 = "Cells e45, e46, e47, and e48 sum their respective rows."
- Xleftstring A55 = "Cell E50 is a grand total."
- Xleftstring A56 = "Try changing some of the data cells and watch the sums change."
- Xleftstring A58 = "You can also edit cells by putting the cursor on the cell and typing:"
- Xleftstring B59 = "'e' to edit the numeric portion."
- Xleftstring B60 = "'E' to edit the string portion."
- Xleftstring C61 = "<Type 'g page4' to continue>"
- Xleftstring A63 = "Since you are reading this, you know that you can load "
- Xleftstring A64 = "a data base from a file by typing the file name as an"
- Xleftstring A65 = "argument to the program. You can also load or save a "
- Xleftstring A66 = "data base using the file commands:"
- Xleftstring B68 = "'G file'"
- Xleftstring C68 = "Gets the data from an sc file."
- Xleftstring B69 = "'P file'"
- Xleftstring C69 = "Puts the data from the spreadsheet into a file."
- Xleftstring page4 = "Try 'P foo.sc' to write this to the file foo.sc"
- Xleftstring A72 = "The Get command erases the current spreadsheet. "
- Xleftstring A73 = "To merge a spreadsheet with the one currently in"
- Xleftstring A74 = "the machine, use:"
- Xleftstring B76 = "'M file'"
- Xleftstring C76 = "Merge the data from a saved sc file."
- Xleftstring A78 = "You can also get human readable versions of the data"
- Xleftstring A79 = "by using the Write command:"
- Xleftstring C81 = "<Type 'g page5' to continue>"
- Xleftstring A83 = "Try 'W tut.txt' for a clear text version of the tutorial."
- Xleftstring A86 = "This is the end of the tutorial. We have explored"
- Xleftstring A87 = "The basic commands. Much more detail is available"
- Xleftstring A88 = "in the man page."
- Xleftstring page5 = "To quit this program, type 'q'."
- Xleftstring D92 = "GOOD LUCK!"
- END_OF_FILE
- if test 4523 -ne `wc -c <'ss_12b/sc_stuff/tutorial.sc'`; then
- echo shar: \"'ss_12b/sc_stuff/tutorial.sc'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/sc_stuff/tutorial.sc'
- fi
- if test -f 'ss_12b/sunfkeys/xterm-sun.ti' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ss_12b/sunfkeys/xterm-sun.ti'\"
- else
- echo shar: Extracting \"'ss_12b/sunfkeys/xterm-sun.ti'\" \(3339 characters\)
- sed "s/^X//" >'ss_12b/sunfkeys/xterm-sun.ti' <<'END_OF_FILE'
- X#############################################################################
- X# xterm-sun.ti
- X#
- X# Art's enhanced xterm terminfo entry. Art Mulder ( art@cs.ualberta.ca )
- X#
- X# a terminfo entry for 'xterm -sf' running on a Sun Sparc (type 4 keyboard)
- X#
- X# - Corrects mistakes in the default xterm terminfo entry, and
- X# adds a few key definitions that I found useful.
- X# - use with 'xterm -sf' (generate Sun Function key escape codes. This
- X# is necessary, because with 'xterm +sf' you get NOTHING from the
- X# <Home> or <End> keys).
- X#############################################################################
- X# Keys Defined:
- X# <end>, <f1> through <f12>, <home>, <page down>, <page up>,
- X# <Keypad Enter>, <Insert>,
- X# <Shift><end>, <Shift><home>, <Shift><left arrow>,
- X# <Shift><right arrow>.
- X#
- X# Keys Undefined:
- X# <a1> : conflicts with <shift><End> (Don't ask me, I just know it does)
- X#
- X# BEEF: Why doesn't terminfo have a shifted Up/Down Arrow when it DOES
- X# have a shifted Left/Right Arrow? What about shifted PageUp/PageDown,
- X# after all, there ARE shifted Home/End Keys. Seems rather arbitrary.
- X#
- X#############################################################################
- X# Help yourself to whatever you want from this file.
- X# Caveat Emptor.
- X#############################################################################
- X
- X# xterm-sun
- X#---------------------------------------------------------------------------
- Xxterm-sun|xterm on a sun Sparc (type 4 kbd) Workstation,
- X kf1=\E[224z, kf2=\E[225z, kf3=\E[226z, kf4=\E[227z,
- X kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z, kf9=\E[232z,
- X kf10=\E[233z,kf11=\E[192z,kf12=\E[193z,
- X kend=\E[220z, khome=\E[214z, kich1=\E[2z, knp=\E[222z, kpp=\E[216z,
- X kEND=\EOq, kHOM=\EOw, kLFT=\EOt, kRIT=\EOv,
- X ka1@,
- X use=xterm,
- X
- X# xterm
- X#---------------------------------------------------------------------------
- X# This is just a duplicate of the system xterm terminfo entry. Put here
- X# since /usr/5bin/tic needed it in order to compile 'xterm-sun' --- and
- X# I couldn't see how to make it just go get the system xterm entry.
- X#
- Xxterm|vs100|xterm terminal emulator,
- X am, eslok, hs, km, mir, msgr, xenl,
- X cols#80, it#8, lines#65,
- X acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
- X bel=^G, blink=\E[5m$<2>, bold=\E[1m, clear=\E[H\E[2J,
- X cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
- X cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
- X cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
- X dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
- X dsl=\E[?E, ed=\E[J, el=\E[K, el1=\E[1K$<3>,
- X enacs=\E(B\E)0, fsl=\E[?F, home=\E[H, ht=\t, hts=\EH,
- X ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
- X ind=\n, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=\b,
- X kc1=\EOp, kc3=\EOn, kcub1=\EOD, kcud1=\EOB,
- X kcuf1=\EOC, kcuu1=\EOA, kent=\EOM, kf0=\EOy, kf1=\EOP,
- X kf10=\EOx, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOt,
- X kf6=\EOu, kf7=\EOv, kf8=\EOl, kf9=\EOw, rc=\E8,
- X rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8,
- X rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
- X rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, sc=\E7,
- X sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
- X sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smkx=\E[?1h\E=,
- X smso=\E[7m, smul=\E[4m, tbc=\E[3g,
- X tsl=\E[?E\E[?%i%p1%dT,
- X#---------------------------------------------------------------------------
- X# End.
- END_OF_FILE
- if test 3339 -ne `wc -c <'ss_12b/sunfkeys/xterm-sun.ti'`; then
- echo shar: \"'ss_12b/sunfkeys/xterm-sun.ti'\" unpacked with wrong size!
- fi
- # end of 'ss_12b/sunfkeys/xterm-sun.ti'
- fi
- echo shar: End of archive 10 \(of 11\).
- cp /dev/null ark10isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 11 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-