summaryrefslogtreecommitdiffstats
path: root/fortune/tools
diff options
context:
space:
mode:
Diffstat (limited to 'fortune/tools')
-rw-r--r--fortune/tools/Do_spell10
-rw-r--r--fortune/tools/Do_troff10
-rw-r--r--fortune/tools/Troff.mac26
-rw-r--r--fortune/tools/Troff.sed13
4 files changed, 59 insertions, 0 deletions
diff --git a/fortune/tools/Do_spell b/fortune/tools/Do_spell
new file mode 100644
index 00000000..fdba4892
--- /dev/null
+++ b/fortune/tools/Do_spell
@@ -0,0 +1,10 @@
+#!/bin/sh -
+#
+# @(#)Do_spell 5.2 (Berkeley) 4/8/91
+#
+
+F=_spell.$$
+echo $1
+spell < $1 > $F
+sort $F $1.sp.ok | uniq -u | column
+rm -f $F
diff --git a/fortune/tools/Do_troff b/fortune/tools/Do_troff
new file mode 100644
index 00000000..dc2000e3
--- /dev/null
+++ b/fortune/tools/Do_troff
@@ -0,0 +1,10 @@
+#!/bin/csh -f
+#
+# @(#)Do_troff 5.4 (Berkeley) 4/8/91
+#
+
+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/fortune/tools/Troff.mac b/fortune/tools/Troff.mac
new file mode 100644
index 00000000..c2b433e1
--- /dev/null
+++ b/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/fortune/tools/Troff.sed b/fortune/tools/Troff.sed
new file mode 100644
index 00000000..32166812
--- /dev/null
+++ b/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