The oldest code of my own that I maintain dates back to 1987, but there is very little left from before 1993 that has not been modified (updated, improved) since then. I updated one of the last hold-outs about a month ago - someone else needed to use it; I knew there was a reason I'd kept it for all these years!
Some of the software I work on has roots as far back as about 1982, but again, almost all that code has been modified (I wish I could say it had all been improved) since then.
Friedrich asked: What programs were written?
The oldest material of my own that I still use is called SQLCMD (and pre-dates Microsoft's program of the same name by a long time!), which was derived from a predecessor called RDSQL. Both programs have the same goal; to provide an alternative to the Informix program called dbaccess
(or, the original version, which was called isql
- I'm glossing over some complications there). The programs allow you to execute SQL statements against Informix databases. The difference is that SQLCMD is designed for use from scripts (meaning originally, primarily, shell scripts) whereas isql
and dbaccess
had a curses-mode UI and were designed for interactive use rather than batch use. SQLCMD is available as 'Open Source' from the International Informix Users Group (IIUG) web site. It is licenced under GPL v2. It is mainly C code; these days, it has a small Yacc grammar in it too. It uses ESQL/C (because ODBC was not available in 1987) to access the database. Version 86.00 is available at the IIUG; I'm using a pre-release of 86.01. (Yes, it really has been through that many versions!)
I also have a bunch of scripts from 1987. The one I use most frequently is called ow
, derived from a script in Kernighan and Pike "UNIX Programming Environment", which runs a filter command (that writes to standard output) and overwrites the original file if the command succeeded. I seldom use that directly; I usually use it via rfmt
(for re-format, dating from 1988), which is a wrapper script the runs a reformatter on each of its input files.
One of the uses for rfmt
is removing stray blank lines or trailing blanks from a bunch of files prior to check-in into the VCS. Given a program stb
to strip trailing blanks (and tabs), and the standard command uniq
, and a command rcolist
to report checked out files:
$ files=$(rcolist)
$ rfmt stb $files
$ rfmt uniq $files
$
Those scripts are (currently):
: "@(#)$Id: ow.sh,v 1.6 2005/06/30 18:14:08 jleffler Exp $"
#
# Overwrite file
# From: The UNIX Programming Environment by Kernighan and Pike
# Amended: remove PATH setting; handle file names with blanks.
case $# in
0|1) echo "Usage: $0 file command [arguments]" 1>&2
exit 1;;
esac
file="$1"
shift
new=${TMPDIR:-/tmp}/ovrwr.$$.1
old=${TMPDIR:-/tmp}/ovrwr.$$.2
trap "rm -f '$new' '$old' ; exit 1" 0 1 2 15
if "$@" >"$new"
then
cp "$file" "$old"
trap "" 1 2 15
cp "$new" "$file"
rm -f "$new" "$old"
trap 0
exit 0
else
echo "$0: $1 failed - $file unchanged" 1>&2
rm -f "$new" "$old"
trap 0
exit 1
fi
: "@(#)$Id: rfmt.sh,v 1.5 1997/06/02 21:45:00 johnl Exp $"
#
# Generic file reformatter
usage(){
echo "Usage: rfmt [-c|e] formatter file [file ...]" >&2
exit 1
}
# Determine formatter
case "$1" in
-c) ev=; fmt="$2"; shift 2;; # Normal mode
-e) ev=eval; fmt="$2"; shift 2;; # Evaluate formatter argument
-*) usage;;
*) ev=; fmt="$1"; shift 1;; # Compatability mode
esac
# Use formatter on each specified file
case $# in
0) usage;;
*)
for file in $*
do
[ $# -eq 1 ] || echo $file
ow $file $ev "$fmt" $file
done;;
esac
I also have an alternative to make
called rmk
that I still use. It understood RCS and SCCS the way I wanted it to even back then.
The software I work on that has ancient roots is also Informix related; I occasionally deal with C-ISAM, first released in 1982, and also with 'Informix 3.30', last released in 1986 (yes, I mean that was when the last official releases were made - and I still get questions from customers who need to migrate from it to something newer; the latest such case was in November 2008, after a 3+ year gap). Some of the code in current Informix Dynamic Server (IDS) and Informix 4GL (I4GL) can easily trace its origins back to C-ISAM code - though the VCS system (Atria ClearCase - chosen by Informix long before IBM bought either Rational or Informix) only dates back to 1994.