summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2006-07-28 20:23:03 +0000
committersimon <simon@FreeBSD.org>2006-07-28 20:23:03 +0000
commitdaffbae80e65d159f8b06765dc0c61303a99815a (patch)
treec53f3d4c1920cbf4764928967b15593064bf2af7 /release
parent3a707d012d83e75806f62c703deb463deb53892a (diff)
downloadFreeBSD-src-daffbae80e65d159f8b06765dc0c61303a99815a.zip
FreeBSD-src-daffbae80e65d159f8b06765dc0c61303a99815a.tar.gz
- Add more debugging information to make it simpler to understand
what's going on in cases where the "state engine" doesn't act as expected, e.g. in the case of a list not being closed in the manual page being parsed. - Bump copyright year. MFC after: 1 week
Diffstat (limited to 'release')
-rw-r--r--release/doc/share/misc/man2hwnotes.pl21
1 files changed, 19 insertions, 2 deletions
diff --git a/release/doc/share/misc/man2hwnotes.pl b/release/doc/share/misc/man2hwnotes.pl
index 899bc1c..c355ac9 100644
--- a/release/doc/share/misc/man2hwnotes.pl
+++ b/release/doc/share/misc/man2hwnotes.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# Emacs should use -*- cperl -*- mode
#
-# Copyright (c) 2003-2005 Simon L. Nielsen <simon@FreeBSD.org>
+# Copyright (c) 2003-2006 Simon L. Nielsen <simon@FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -204,6 +204,16 @@ sub parse {
add_sgmltag(\%mdocvars, "'>");
$mdocvars{isin_hwlist} = 0;
}
+ if ($mdocvars{isin_list}) {
+ dlog(1, "Warning: Still in list, but just entered new " .
+ "section. This is probably due to missing .El; " .
+ "check manual page for errors.");
+ # If we try to recover from this we will probably
+ # just end with bad SGML output and it really
+ # should be fixed in the manual page so we don't
+ # even try to "fix" this.
+ }
+
} elsif (/^Dt ([^ ]+) ([^ ]+)/) {
dlog(4, "Setting mansection to $2");
@@ -388,23 +398,30 @@ sub parabuf_addline {
my $mdocvars = shift;
my ($txt) = (@_);
- dlog(5, "Now in parabuf_addline");
+ dlog(5, "Now in parabuf_addline for '$txt'");
# We only care about the HW list for now.
if (!${$mdocvars}{isin_hwlist}) {
+ dlog(6, "Exiting parabuf_addline due to: !\${\$mdocvars}{isin_hwlist}");
return;
}
if ($txt eq "") {
+ dlog(6, "Exiting parabuf_addline due to: \$txt eq \"\"");
return;
}
if ($only_list_out && !${$mdocvars}{isin_list}) {
+ dlog(6, "Exiting parabuf_addline due to: ".
+ "\$only_list_out && !\${\$mdocvars}{isin_list}");
return;
}
# We only add the first line for "tag" lists
if (${$mdocvars}{parabuf} ne "" && ${$mdocvars}{isin_list} &&
${$mdocvars}{listtype} eq "tag") {
+ dlog(6, "Exiting parabuf_addline due to: ".
+ "\${\$mdocvars}{parabuf} ne \"\" && \${\$mdocvars}{isin_list} && ".
+ "\${\$mdocvars}{listtype} eq \"tag\"");
return;
}
OpenPOWER on IntegriCloud