summaryrefslogtreecommitdiffstats
path: root/release/doc/share/misc/man2hwnotes.pl
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2004-08-15 22:33:10 +0000
committersimon <simon@FreeBSD.org>2004-08-15 22:33:10 +0000
commit901f203570aec59960e29bafc5846cf4e3f04fca (patch)
tree27d9099fd567033e8fefcd35aa43fa7569316723 /release/doc/share/misc/man2hwnotes.pl
parent0fd9856a4674efd8e88aecc3647b5f87b9e970cb (diff)
downloadFreeBSD-src-901f203570aec59960e29bafc5846cf4e3f04fca.zip
FreeBSD-src-901f203570aec59960e29bafc5846cf4e3f04fca.tar.gz
- Handle the '\&' mdoc(7) escape sequence.
- Handle the .Sx macro and give a warning if it is used in the HARDWARE section, since that will probably produce odd text in the Hardware Notes.
Diffstat (limited to 'release/doc/share/misc/man2hwnotes.pl')
-rw-r--r--release/doc/share/misc/man2hwnotes.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/release/doc/share/misc/man2hwnotes.pl b/release/doc/share/misc/man2hwnotes.pl
index 82922b3..95c083e 100644
--- a/release/doc/share/misc/man2hwnotes.pl
+++ b/release/doc/share/misc/man2hwnotes.pl
@@ -129,6 +129,7 @@ sub normalize (@) {
my @lines = @_;
foreach my $l (@lines) {
+ $l =~ s/\\&//g;
$l =~ s:([\x21-\x2f\x5b-\x60\x7b-\x7f]):sprintf("&\#\%d;", ord($1)):eg;
}
return (wantarray) ? @lines : join "", @lines;
@@ -253,6 +254,13 @@ sub parse {
my $txt = "<quote>".join(' ', @stritems)."</quote>$punct_str";
parabuf_addline(\%mdocvars, normalize($txt));
+ } elsif (/^Sx (.+)$/) {
+ if ($mdocvars{isin_hwlist}) {
+ dlog(1, "Warning: Reference to another section in the " .
+ "$hwlist_sect section in " . $mdocvars{Nm} .
+ "(${cur_mansection})");
+ }
+ parabuf_addline(\%mdocvars, normalize($1));
}
# Ignore all other commands
} else {
@@ -262,7 +270,7 @@ sub parse {
}
close(MANPAGE) || die("$!: Could not close $manpage in ", __LINE__, ".\n");
if (! $found_hwlist) {
- dlog(1, "Hardware list not found in $manpage");
+ dlog(2, "Hardware list not found in $manpage");
}
}
OpenPOWER on IntegriCloud