From 057afceb86e030ad65b0130436860d9a18066186 Mon Sep 17 00:00:00 2001 From: jkh Date: Sun, 4 Sep 1994 04:03:31 +0000 Subject: Bring in the 4.4 Lite games directory, modulo man page changes and segregation of the x11 based games. I'm not going to tag the originals with bsd_44_lite and do this in two stages since it's just not worth it for this collection, and I've got directory renames to deal with that way. Bleah. Submitted by: jkh --- games/fortune/tools/Do_spell | 10 ++++++++++ games/fortune/tools/Do_troff | 10 ++++++++++ games/fortune/tools/Troff.mac | 26 ++++++++++++++++++++++++++ games/fortune/tools/Troff.sed | 13 +++++++++++++ games/fortune/tools/do_sort | 11 +++++++++++ 5 files changed, 70 insertions(+) create mode 100644 games/fortune/tools/Do_spell create mode 100644 games/fortune/tools/Do_troff create mode 100644 games/fortune/tools/Troff.mac create mode 100644 games/fortune/tools/Troff.sed create mode 100644 games/fortune/tools/do_sort (limited to 'games/fortune/tools') diff --git a/games/fortune/tools/Do_spell b/games/fortune/tools/Do_spell new file mode 100644 index 0000000..d997392 --- /dev/null +++ b/games/fortune/tools/Do_spell @@ -0,0 +1,10 @@ +#!/bin/sh - +# +# @(#)Do_spell 8.1 (Berkeley) 5/31/93 +# + +F=_spell.$$ +echo $1 +spell < $1 > $F +sort $F $1.sp.ok | uniq -u | column +rm -f $F diff --git a/games/fortune/tools/Do_troff b/games/fortune/tools/Do_troff new file mode 100644 index 0000000..52cb282 --- /dev/null +++ b/games/fortune/tools/Do_troff @@ -0,0 +1,10 @@ +#!/bin/csh -f +# +# @(#)Do_troff 8.1 (Berkeley) 5/31/93 +# + +set file=$1 +shift +( echo ".ds Se $file" ; cat Troff.mac ; sed -f Troff.sed $file ) | \ + $* -me >& $file.tr +echo troff output in $file.tr diff --git a/games/fortune/tools/Troff.mac b/games/fortune/tools/Troff.mac new file mode 100644 index 0000000..c2b433e --- /dev/null +++ b/games/fortune/tools/Troff.mac @@ -0,0 +1,26 @@ +.nr tp 8 +.nr hm 3v +.nr fm 2v +.nr tm 5v +.nr bm 4v +.cs R +.sc +.sz 6 +.ll +10n +.lt \n(.l +.de $h +.tl 'Fortune Database'\\*(Se'\*(td' +.. +.de $f +.tl ''- % -'' +.. +.2c +.nf +.ta +.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 80n +.de %% +.sp .3 +.ce +\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq +.sp .2 +.. diff --git a/games/fortune/tools/Troff.sed b/games/fortune/tools/Troff.sed new file mode 100644 index 0000000..3216681 --- /dev/null +++ b/games/fortune/tools/Troff.sed @@ -0,0 +1,13 @@ +/^['.]/s//\\\&&/ +/^%%/s//.&/ +/--/s//\\*-/g +/_a-squared cos 2(phi)/s//\\fIa\\fP\\u2\\d cos 2\\(*f/ +/__**\([a-zA-Z]*\)/s//\\fI\1\\fP/g +/"\(.\)/s//\1\\*:/g +/`\(.\)/s//\1\\*`/g +/'\(.\)/s//\1\\*'/g +/~\(.\)/s//\1\\*~/g +/\^\(.\)/s//\1\\*^/g +/,\(.\)/s//\1\\*,/g +/\(.\)\(.\)/s//\\o_\1\2_/g +/*/s//\\(bs/g diff --git a/games/fortune/tools/do_sort b/games/fortune/tools/do_sort new file mode 100644 index 0000000..b868a4c --- /dev/null +++ b/games/fortune/tools/do_sort @@ -0,0 +1,11 @@ +#! /bin/sh +# +# @(#)do_sort 8.1 (Berkeley) 5/31/93 +# +# an aggressive little script for sorting the fortune files +# depends on octal 02 and 03 not being anywhere in the files. + +sp="/usr/bin/sort -bdfu -T /var/tmp" + +sed 's/^%$//' | tr '\12' '\3' | tr '\2' '\12' | $sp | sed 'a\ + %' | sed -e 's/^//' -e 's/$//' | tr '\3' '\12' -- cgit v1.1