:head: {title=Gareth McCaughan : software} {mainhead=Software I've written}> <[presentation]> define nora <[if anchor]> <:anchor:> <[else]> <:name:> <[endif]> end-define define first <[if ver]>
end-define define next
<:first:>
end-define
define dl-link
<:file:>
<[if desc]>
(<:desc:>; <:size:>)
<[else]>
(<:size:>)
<[endif]>
<[if br]>
<[endif]>
end-define
define dl
Download:
<:dl-link:>
end-define
define dl-c
<:dl: {desc=C source code}>
end-define
define dl-tgz
<:dl: {desc=gzipped tarfile}>
end-define
define dl-arc
<:dl: {desc=Spark-format archive, for RISC OS machines}>
end-define
<[end-presentation]>
I spend too much time sitting in front of computers; one useful by-product is that every now and then I write a useful program. Here are some.
All the software on this page comes with source code and documentation. And it's all free; you don't have to pay for it, and you are at liberty to modify or redistribute it (and, in some cases, both at once).
Forward links within this page:
It's extremely flexible; it allows a limited amount of mark-up; its output looks pleasant; it's well documented; I think it's portable. It comes with a couple of useful Perl scripts that you can use in conjunction with it for printing Unix manpages and Perl `pod' documentation quite prettily.
In case you're wondering about the name: the first version always formatted its input into three columns on landscape-format A4 paper; hence `3col'. The current version is much more flexible.
You might like to have a look at
the
main documentation file, which describes the features of
3col, or indeed to browse
the
distribution.
<:dl-tgz: {file=3col-2.09.tar.gz} {size=30k}>
<:next: {name=fmt} {ver=1.5}>
does some primitive formatting on text. It will probably be
the version of fmt in some future version
of FreeBSD.
(I wrote it because I was annoyed at the poor quality
of the BSD fmt.)
I don't particularly recommend getting this, because
there's an even better fmt in the GNU
`textutils' package. But if for some reason you don't
like the General Public License, you may prefer this
(which has a BSD-style licence).
<:dl-c: {file=fmt.c} {size=21k}> <:next: {name=gossip}> plays a not-very-well-known and not-very-exciting board game called `Oska'. I wrote it because it seemed to me that it ought to be a game computers would play very well; it turns out that they play well enough to solve the game in a few seconds. The code is rather a mess, but the program plays a good game. It also includes a brief description of how to play.
The Spark archive below (for RISC OS machines only) contains the source code and three executables, with different levels of memory consumption: smallest=slowest.
<:dl-c: {file=gossip.c} {size=38k} {br=yes}> <:dl-arc: {file=gossip.arc} {size=48k}> <:next: {name=make-maze} {ver=1.02}> makes mazes based on hexagonal grids, using an elegant algorithm (not my own). It's very quick; it outputs very compact PostScript; it has an option to produce mazes with or without solutions (or both). It will probably compile and run without much pain on any Unix system; fixing it for others would be trivial, but I haven't done it yet. There isn't any documentation, but the program is quite well commented.
You might be interested in the web page that inspired to write the program. If you look at the description of how long the program described there took to create a big maze, you'll understand why I wrote mine.
<:dl-tgz: {file=make-maze-1.02.tar.gz} {size=10k}>
You might want to have a look at some mazes produced by it; each is a two-page PostScript document, the second page containing the solution. There are gzipped versions of all of them.
<:dl-link: {prefix=mazes/} {file=10x12.ps} {size=4k}>; <:dl-link: {prefix=mazes/} {file=10x12.ps.gz} {size=1.4k} {br=yes}> <:dl-link: {prefix=mazes/} {file=45x50.ps} {size=7k}>; <:dl-link: {prefix=mazes/} {file=45x50.ps.gz} {size=3k} {br=yes}> <:dl-link: {prefix=mazes/} {file=90x100.ps} {size=15k}>; <:dl-link: {prefix=mazes/} {file=90x100.ps.gz} {size=6k} {br=yes}> <:dl-link: {prefix=mazes/} {file=150x170.ps} {size=34k}>; <:dl-link: {prefix=mazes/} {file=150x170.ps.gz} {size=14k} {br=yes}> <:dl-link: {prefix=mazes/} {file=360x400.ps} {size=160k}>; <:dl-link: {prefix=mazes/} {file=360x400.ps.gz} {size=63k}> <:next: {name=munge-web} {ver=1.00}> is a preprocessor for Web pages. I use it to separate content from presentation. For instance, my own pages exist in two versions, one for my local machine and one served from my ISP's web server; the two versions have different sets of pages, slightly different text, and different layout. I build both sets from the same source using munge-web.
I regret that the documentation for munge-web isn't terribly good. It's all contained in a big comment at the start of the script.
munge-web has only been tested on my Unix machine; I don't know how well it would work on other operating systems. I'm certain that it will be fine on any Unix machine.
<:dl: {file=munge-web.py} {desc=Python source code} {size=14k} {br=yes}>
<:dl: {file=mw-common} {desc=a sample "presentation model" file} {size=2k} {br=yes}>
<:dl: {file=mw-input} {desc=a sample input file} {size=16k}>
<:next: {name=qsort} {ver=1.12}>
is an implementation of the ANSI C qsort()
routine. I wrote it largely because the qsort
in my home machine's C library is disastrously broken.
It's quite large (4k of object code on my machine) but
performs well.
<:dl-c: {file=qsort.c-1.12} {size=14k}> <:next: {name=race3}> is a program for analysing backgammon endgame positions. It does this by exhaustive search, so it can only cope with rather late endgames. I'm afraid it's written using a literate programming system (Marc van Leeuwen's CWEBx), which means that the main source file combines code and documentation... so it's of limited use to you if you don't have the tools to extract compilable C code from it.
For this reason, I'm distributing the `tangled' C source code as well; if you don't have CWEBx on your system you should get that. (But if you want to understand the code you should read either the CWEBx source, or the documentation produced from it.)
Download:
(RISC OS is the operating system used by the desktop computers made by Acorn. The machine I use at home is a RISC OS one. The following stuff is unlikely to interest you unless you're a RISC OS user yourself.)
<:dl-arc: {file=blowfish-1.00.arc} {size=118k}>
<:next: {name=clockmem} {ver=1,24}>
displays the time and the amount of free memory you have on
one iconbar icon, and only takes up 4k of memory. It also
lets you set a single alarm, which is all I ever used
!Alarm for anyway.
<:dl-arc: {file=clockmem-1.24.arc} {size=44k}> <:next: {name=fmulc} {ver=1.10}> is a program that produces C or ARM assembly language code for doing approximate multiplication of an integer by a constant between 0 and 1. You might find this useful if you want an approximate division-by-123 routine, or something.
You can in fact use it to synthesize pretty efficient exact division routines (with a bit of post-processing), but I can't be bothered to explain how. (There's a bit of information in the usage instructions at the start of the file.)
<:dl-c: {file=fmulc.c-1.10} {size=16k}>
<:next: {name=makealf} {ver=1.08}>
is a sort of replacement for Acorn's libfile
program. It allows you to create object code libraries.
Its current version is better than libfile
in almost every respect.
<:dl-arc: {file=makealf-1.08.arc} {size=104k}>
<:next: {name=mkdrawf} {ver=3.10}>
is a tool for creating drawfiles. It's actually quite a
powerful (but nasty) programming language in its own right.
Also included: a tool for performing the reverse translation
(so you can modify drawfiles in various ways by converting
them to mkdrawf source, munging them with
your favourite text editor or Perl or whatever, and running
through mkdrawf), a Wimp front end for these,
and copious documentation.
Version 3.10 (released 1998-09-13) is much nicer than the previous version; in particular, the syntax is much less painful than it used to be.
In the longer term, I intend
to release something that does all the same things but much
much more nicely (being a decent programming language in its
own right). Either that, or integrate the functionality of
mkdrawf with Python or something. Watch this space.
<:dl-arc: {file=mkdrawf-3.10.arc} {size=549k}>
The Impression version of the manual now uses some fonts in the Goudy family (free, so far as I am aware, and much nicer to read than Times/Trinity). You can download them here, in one of two forms.
<:dl: {file=goudy.arc} {desc=Spark-format archive, including Type1 data for printing with PostScript printers} {size=429k} {br=yes}> <:dl: {file=goudy0.zip} {desc=ZIP-format archive, excluding Type1 data} {size=151k}>
The ZIP file was created on my Unix box when I realised that
many people won't want the Type 1 files. This means that it
doesn't contain any filetype information. You should set all
the files in it to type &FF6. You can do that by downloading
<:dl-link: {file=goudy-st} {desc=text} {size=361b}>,
making it of type Obey and running it.
<:next: {name=objdism} {ver=0.10beta}>
is a tool for converting an AOF file into assembly language
code that can be run through ObjAsm to produce a functionally
equivalent AOF file. Useful if you want to see what's inside
an object file, or if you want to make small changes (or large
changes) to one.
ObjDism's output is readable and reasonably
friendly; it should also be easy to modify without damaging
things. Oh, and it gives quite extensive information about
the contents of debugging tables too.
Don't be discouraged by the version number. It seems to be stable, and it works well. The `beta' just means: if you use this, please let me know how well it fits your needs.
<:dl-arc: {file=objdism-0.10beta.arc} {size=155k}> <:next: {anchor=pgp263i} {name=PGP} {ver=2.6.3i}> is a port of, errrm, PGP version 2.6.3i. PGP is a widely used system for strong cryptography. You can find out more about PGP at Pretty Good Privacy, Inc.'s home page, but note that this covers a later version of PGP than this one. (But not as much later as the version number might lead you to think.)
More useful information is on the International PGP Home Page.
I am contemplating porting the latest version of PGP to the RISC OS platform, but it's a big job...
Note: If you got a copy of this any time before 1998-12-03, then there is a bug in your copy. It doesn't affect security at all, but it's a nuisance. (The filenames embedded in encrypted messages aren't properly canonicalised.)
Download: