remove stale script epfe.pl

tools/tools/epfe/epfe.pl was a perl script that formerly generated some
printing example files from content in a very old version of the handbook.

Reported by:	wblock
This commit is contained in:
Wolfram Schneider 2023-05-15 06:22:41 +00:00
parent d957343f87
commit 1cf4473fa3
2 changed files with 0 additions and 39 deletions

View file

@ -18,7 +18,6 @@ cxgbetool A tool for the cxgbe(4) driver.
cxgbtool A tool for the cxgb(4) driver.
drm Tools specific to the DRM/KMS device drivers.
editing Editor modes and the like to help editing FreeBSD code.
epfe Extract printing filter examples from printing.sgml.
ether_reflect An Ethernet packet reflector for low level testing.
find-sb Scan a disk for possible filesystem superblocks.
gdb_regofs A simple tool that prints out a register offset table

View file

@ -1,38 +0,0 @@
#!/usr/bin/perl
# Copyright (c) 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
#
# epfe - extract printing filter examples from printing.sgml
#
# usage:
# $ cd /usr/share/examples/printing
# $ epfe < ../../doc/handbook/printing.sgml
#
# $FreeBSD$
$in = 0; @a = ();
sub Print { s/\&amp\;/&/g; push(@a,$_); }
sub out {
local($name, *lines) = @_;
open(F, "> $name") || die "open $_[0]: $!\n";
print F @lines;
close F;
}
while(<>) {
if (/^<code>/) {
$in = 1;
} elsif (m%</code>% && $in > 0) {
if ($in > 1) {
$name = 'unknown' if !$name;
while(1) { if ($d{$name}) { $name .= 'X'; } else { last } }
&out("$name", *a);
$d{$name} = $name;
}
$in = 0; $name = ''; @a = ();
} elsif ($in == 1 && /^\#\s*!/) {
$in++; &Print;
} elsif ($in > 1) {
$name = $1 if (!$name && /^\#\s+(\S+)\s+-\s+/);
$in++; &Print;
}
}