diff options
Diffstat (limited to 'list/list')
-rwxr-xr-x | list/list | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,13 +1,18 @@ -#!/usr/bin/perl -ps +#!/usr/bin/perl -p # list -- escape code listing for troff +use Getopt::Std; +BEGIN { getopt('Ep:s:'); } + if (/^\.\s*l\(\s*$/ .. /^\.\s*l\)\s*$/) { - not $E and s/^\\!// and next; + not $opt_E and s/^\\!// and next; if (/^\.\s*l\(\s*$/) { - print "$p\n" if $p; + $_ = ''; + $_ = "$opt_p\n" if $opt_p; } elsif (/^\.\s*l\)\s*$/) { - print "$s\n" if $s; + $_ = ''; + $_ = "$opt_s\n" if $opt_s; } else { s/\\/\\$&/g; s/^/\\&/g; |