summaryrefslogtreecommitdiffstats
path: root/games/fortune/tools
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-09-04 04:03:31 +0000
committerjkh <jkh@FreeBSD.org>1994-09-04 04:03:31 +0000
commit057afceb86e030ad65b0130436860d9a18066186 (patch)
treea0ced9c9b9278eb776d89cd2565c27ddcf020b51 /games/fortune/tools
parenteedec95276cdb8aef98e92c5371000f10b8d6ba7 (diff)
downloadFreeBSD-src-057afceb86e030ad65b0130436860d9a18066186.zip
FreeBSD-src-057afceb86e030ad65b0130436860d9a18066186.tar.gz
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
Diffstat (limited to 'games/fortune/tools')
-rw-r--r--games/fortune/tools/Do_spell10
-rw-r--r--games/fortune/tools/Do_troff10
-rw-r--r--games/fortune/tools/Troff.mac26
-rw-r--r--games/fortune/tools/Troff.sed13
-rw-r--r--games/fortune/tools/do_sort11
5 files changed, 70 insertions, 0 deletions
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'
OpenPOWER on IntegriCloud