This is a much modified version of the public domain spread sheet sc,
originally by James Gosling, and posted a number of years ago by Mark
Weiser as vc.

The current maintainer is Chuck Martin (cmartin@bigfoot.com), at least
for now, anyway.  I originally got involved with sc because I wanted a
good text-mode spreadsheet program, and nothing I could find seemed to
suit my needs.  After looking at several different programs, I settled
on sc as the program with the most promise, especially since source code
was available, which meant I could modify it to add the features I needed.
Since it appeared that no one was maintaining it anymore, I decided to
take up the cause myself.

You'll want to look at the CHANGES file and the man page for more
complete information about what I've done to sc, but here are some of
the highlights:

   - A Y2K bug fix in the @DTS function.
   - Advanced macros (see the file called SC.MACROS).
   - The ability to use sc in a pipeline, at least to some extent.
   - Note attachments.
   - Dotfiles for start-up configuration.
   - Programmable function keys.
   - Framed ranges (similar to Lotus 1-2-3's "Titles" or Excel's
     "Freeze Panels," but much more powerful and versatile).

There are still other features I want to add, so I'll probably be
maintaining this for at least one more release.  After that, I'll play
it by ear.  As long as it doesn't take too much time away from other,
more pressing things, I'm willing to continue to maintain it.  If you
find any bugs or would like to contribute patches, please send them to
me.  If they're useful and they work, I'll probably add them.  I prefer
to keep it simple, though, since that's what drew me to sc instead of
some other "full-featured" spreadsheet in the first place.  I like the
Unix philosophy of making each program do one thing and do it well, and
would rather leave all the fancy graphics and other features to other
programs that are better suited for them.


IMPORTANT NOTE:

As of version 7.2, the default rounding method has been changed.  The
former default, round-to-even, aka banker's rounding, is still available,
but is no longer the default, since I don't believe most people round
this way, nor do they expect this type of rounding.  If you have older
spreadheets that require it, start sc with the -e option on the command
line.  Older spreadsheets that explicitly set rndinfinity will produce
an error while loading because rndinfinity no longer exists, having been
replaced by rndtoeven, which works exactly opposite to rndinfinity.  The
error is harmless, and the results will still be what you expect, due to
the changed default.  Resaving the file will eliminate the error on
subsequent loads.


More Changes:

The CHANGES file lists the changes since 6.1 to 7.7.  One of the biggest
changes in version 7.3 was the advanced macros.  You can now write macros
in any language you choose.  These have subsequently been improved upon
in later versions.  The documentation is still incomplete, but there is
a file called SC.MACROS that should give you enough information to get
started using this feature.

Also, sc can now be configured using a dotfile called .scrc either in your
home directory or the directory in which you start sc (or both).  You can
now change the default filename extensions for the various types of files
sc can create.  See the man page for details.


Colors:

No, I'm sorry to say, I haven't added color support to sc, yet.  I was
hoping to add it to version 7.7, but changed my mind because I haven't
yet decided how the colors should work, and am looking for suggestions.
Excel allows you to specify a text color and background color for each
cell, and Lotus 1-2-3 also does this, but in addition, allows the text
to become red if the number in the cell is negative, which is also nice.
I've considered allowing the color to be specified based on some calcu-
lation, which would be much more powerful, but may also slow sc down if
two sets of calculations need to be performed for each cell in the spread-
sheet, although if most cells didn't require color calculations, the
performance hit could be kept small.  I would welcome any suggestions,
as this will probably be my next addition to sc if I can figure out what
is the best way to implement it (from a user perspective).


Compiling the program:

Before you compile, make sure to check the Makefile and uncomment the
lines that pertain to your system and comment out the lines for Linux.
If you run Linux, this step won't be necessary, since that's the default
(since that's what I run).  I haven't tried compiling or running sc on
anything else, but I've used it on both Slackware 4.0 and Slackware 7.1,
so I hope I haven't broken anything for anyone else.  If you get it to
compile and run on something else, please let me know.  If it doesn't work
and you can fix it, please send me a patch.  If you have problems with
lex.c, and don't care about arrow keys, define SIMPLE (-DSIMPLE in the
makefile).  SIMPLE causes the arrow keys to not be used.

If you have problems with your yacc saying: too many terminals ...127...
find a different yacc: bison, Berkeley yacc, Pd yacc, etc.  AT&T's Sys V
yacc has small, fixed sized tables.  SCO will allow dynamic yacc tables
when given the correct flags.

Starting with version 7.6, I've decided to change the default prefix in
the Makefile back to /usr instead of /usr/local.  This is because I
think sc is included with most flavors of Unix (okay, I admit I'm not
familiar with most flavors of Unix, but I know it's true of Linux and
the *BSD's), and therefore, most people will probably be upgrading from
the vendor supplied version, so it would make sense to put it in the same
location, which I believe is probably /usr in most cases.  If I'm wrong,
someone will probably tell me. :)  Also, that's where I keep it on my
own systems, and making that the default means I don't have to worry
about forgetting to change the value of prefix in the Makefile before
creating the tarball for distribution.  If this doesn't suit your needs,
it's easy enough to change.

After you get it built, if you aren't familiar with sc, you might want
to try "sc tutorial.sc" for a simple introduction to the basic commands.
Most of the key bindings are patterned after the vi text editor, so if
you're familiar with that program or its variants, you shouldn't have
any problems learning sc.

If you've used sc before, you may want to check out the CHANGES file
to see what's changed, and read the man page for more details.

To print a quick reference card, type the command:
	scqref | [your_printer_commmand]

If you have the command 'file' that uses /etc/magic, and it isn't there
already, you may want to add the following lines:

# sc:  file(1) magic for "sc" spreadsheet
#
38	string		Spreadsheet	sc spreadsheet file

Psc formats ascii files for use in the spreadsheet.  If you don't have
getopts, there is a public domain version by Henry Spencer hidden away in
the VMS_NOTES file (or so the previous README said--I haven't looked at
it myself).

If you'd like to rename the program to something different, just change
"name=sc" and "NAME=SC" to "name=myfavoritename" and "NAME=MYFAVORITENAME"
and try "make myfavoritename".  (Does anyone need or use this?  If so,
please let me know.  Otherwise, I may remove that capability in a future
version, since it seems to me that it reduces confusion if everyone
refers to the program by the same name, and I don't know of any other
programs called sc that would cause a naming conflict.)

Similarly, you can make the documentation with "make myfavoritename.man".
"make install" will make and install the code in EXDIR.  The installation
steps and documentation all key off of the name.  The makefile even changes
the name in the nroffable man page.  If you don't have nroff, you will
have to change sc.man yourself.

Uninstalling the program is now very easy, if you should want to do this.
Just do "make uninstall".


Finding the latest version:

Since ftp.freesoftware.com doesn't seem to be accepting uploads, and
hasn't been for some time now, I've decided to switch to ibiblio.org
(formerly metalab.unc.edu, formerly sunsite.unc.edu) as the primary site
for sc.  The directory where you should be able to find the latest version
is /pub/Linux/apps/financial/spreadsheet.  If you can't find it, e-mail
me.


Disclaimer:

sc is supplied as is with no warranty, express or implied.  It's free--
what do you expect?


Chuck Martin
(cmartin@bigfoot.com)
