aboutsummaryrefslogtreecommitdiff
path: root/list/list
diff options
context:
space:
mode:
Diffstat (limited to 'list/list')
-rwxr-xr-xlist/list17
1 files changed, 17 insertions, 0 deletions
diff --git a/list/list b/list/list
new file mode 100755
index 0000000..64ec8ac
--- /dev/null
+++ b/list/list
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -ps
+
+# list -- escape code listing for troff
+
+if (/^\.\s*l\(\s*$/ .. /^\.\s*l\)\s*$/) {
+ not $E and s/^\\!// and next;
+ if (/^\.\s*l\(\s*$/) {
+ print "$p\n" if $p;
+ } elsif (/^\.\s*l\)\s*$/) {
+ print "$s\n" if $s;
+ } else {
+ s/\\/\\$&/g;
+ s/^/\\&/g;
+ s/'/\\(aq/g;
+ s/\`/\\(ga/g;
+ }
+}