sc Spreadsheet Calculator
C Yacc Makefile Scala DIGITAL Command Language Shell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CHANGES bison->yacc, is_cleared->IS_CLEARED Mar 19, 2016
CHANGES-git Release 7.16_1.1.2 Apr 2, 2018
Makefile.in psc.c: define _Bool Sep 8, 2017
README Initial commit of sc-7.16 Mar 18, 2016
README.md Release 7.16_1.1.2 Apr 2, 2018
SC.MACROS Initial commit of sc-7.16 Mar 18, 2016
TODO Initial commit of sc-7.16 Mar 18, 2016
VMS_NOTES Initial commit of sc-7.16 Mar 18, 2016
abbrev.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
build.com Initial commit of sc-7.16 Mar 18, 2016
cmds.c Error handling for fclose(3) Aug 16, 2018
color.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
compat.c ./configure updated Aug 28, 2017
configure Error handling for fclose(3) Aug 16, 2018
crypt.c Error handling for fclose(3) Aug 16, 2018
eres.sed Initial commit of sc-7.16 Mar 18, 2016
format.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
frame.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
gram.y Some compiler warnings fixed Aug 28, 2017
help.c Some compiler warnings fixed Aug 28, 2017
interp.c Some compiler warnings fixed Aug 28, 2017
lex.c Some compiler warnings fixed Aug 28, 2017
pipe.c ./configure: check for keyname(3) added Aug 28, 2017
psc.c Leave psc on format output error Aug 19, 2018
psc.doc Initial commit of sc-7.16 Mar 18, 2016
range.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
sc-7.16.lsm Initial commit of sc-7.16 Mar 18, 2016
sc.c psc: Error handling improved Aug 18, 2018
sc.doc Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
sc.h psc: Error handling improved Aug 18, 2018
scqref.doc xsc added Apr 11, 2016
screen.c Don't def attr_get when WINDOW is opaque Sep 1, 2017
sort.c Some compiler warnings fixed Aug 28, 2017
sres.sed Initial commit of sc-7.16 Mar 18, 2016
torev sc.doc: Some hyperlinks added Mar 28, 2016
tutorial.sc Initial commit of sc-7.16 Mar 18, 2016
version.c Leave psc on format output error Aug 19, 2018
version.h psc: Error handling improved Aug 18, 2018
vi.c Error handling for fclose(3) Aug 16, 2018
vmtbl.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
xmalloc.c Works with NetBSD and Solaris curses and ncurses Apr 17, 2016
xsc.doc Some compiler warnings fixed Aug 28, 2017
xsc.sh Some compiler warnings fixed Aug 28, 2017

README.md

sc Spreadsheet Calculator

sc is a free curses-based spreadsheet program that uses key bindings similar to vi and less. For more information on sc please see the README file. This is a fork of the latest source code version 7.16 from September 2002 which can be found at http://www.ibiblio.org/pub/Linux/apps/financial/spreadsheet/sc-7.16.tar.gz. The following changes had been made:

  • Many bugs had been found, all of them are fixed now. (For reporting bugs please use the issue list.)
  • All gcc and most clang -Wall and -Werror compiler warnings fixed.
  • Made UBSAN and ASAN clean.
  • All sprintf, strcpy, and strcat replaced with snprintf, strlcpy, and strlcat.
  • ./configure script added and tested on BSD, Linux, and Solaris.

Functional extensions:

  • By default sc made a backup of the database file before overwriting it. This could only be changed at compile time. There are now options backup and !backup to control this.

  • Configured at compile time, sc always did update the history file ~/.sc_history. It is now possible to change this filename with the .scrc command histfile or save no history at all with an empty command argument.

  • Command set mouse (e.g. in .scrc) enables

    • Selecting cells with the left mouse button
    • Vertical scrolling with the mouse wheel
    • Selecting the edit line position with the left mouse button

    (In this case the shift key needs to be pressed for ‘cut and paste’. All sc functions work well with NetBSD and Solaris curses but using the mouse requires ncurses. Using the mouse wheel additionally requires ncurses version ≥ 6.)

Documentation

Documentation is provided in short form integrated in sc accessible with the ? key. A complete documentation is available as a manual page. For better navigation HTML and PDF versions with table of contents and hyperlinks had been created (using the -man macros of Heirloom troff).

Getting the source

The source can be cloned with

git clone https://github.com/n-t-roff/sc.git

and updated later with

git pull

Compiling and Installation

Defaults for compiling and installation are set in the Makefile.in. A system dependent makefile is generated with

./configure

The source is compiled with

make

(the curses or ncurses header files need to be installed, else make failes).

If make failes it may be possible that ./configure did not work correctly with the installed /bin/sh. If ksh is installed in such cases using

make distclean
ksh configure
make

can solve the problem. (Alternatively sh in configures first line can be changed to ksh.)

The result is installed with

make install

to the base directory /usr/local. This path can be changed in the Makefile.in. All generated files are removed with

make distclean

The package can be uninstalled with

make uninstall