diff options
author | simon <simon@FreeBSD.org> | 2008-10-05 09:45:45 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2008-10-05 09:45:45 +0000 |
commit | 07f537990cde4daf1a3631d565a2d1e5cfd95d29 (patch) | |
tree | a4a0d7548d982914fcbff7efa3d6aacbaf5efa89 /release/doc | |
parent | 3f814e3a12ba668d5f1930349d27a18dc23b08eb (diff) | |
download | FreeBSD-src-07f537990cde4daf1a3631d565a2d1e5cfd95d29.zip FreeBSD-src-07f537990cde4daf1a3631d565a2d1e5cfd95d29.tar.gz |
- Add support for Pp command - this improves output for axe(4).
- Add support for .Fx, just in case somebody starts using it.
- Only add the arch information to the first para per manual page.
This improves output for axe(4), and generally seems to make sense
(I hope).
- Remove an unneeded line for non-compat mode.
Diffstat (limited to 'release/doc')
-rw-r--r-- | release/doc/share/misc/man2hwnotes.pl | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/release/doc/share/misc/man2hwnotes.pl b/release/doc/share/misc/man2hwnotes.pl index 75b1af2..b5ec969 100644 --- a/release/doc/share/misc/man2hwnotes.pl +++ b/release/doc/share/misc/man2hwnotes.pl @@ -151,6 +151,7 @@ sub parse { my %mdocvars; $mdocvars{isin_hwlist} = 0; $mdocvars{isin_list} = 0; + $mdocvars{first_para} = 1; $mdocvars{parabuf} = ""; $mdocvars{listtype} = ""; $mdocvars{it_nr} = 0; @@ -310,6 +311,15 @@ sub parse { $txt = make_ulink($txt) . $punct_str; parabuf_addline(\%mdocvars, normalize($txt)); + } elsif (/^Pp/) { + dlog(3, "Got Pp command - forcing new para"); + flush_out(\%mdocvars); + } elsif (/^Fx (.+)/) { + dlog(3, "Got Fx command"); + parabuf_addline(\%mdocvars, "FreeBSD $1"); + } elsif (/^Fx/) { + dlog(3, "Got Fx command"); + parabuf_addline(\%mdocvars, "FreeBSD"); } else { # Ignore all other commands. dlog(3, "Ignoring unknown command $cmd"); @@ -380,7 +390,12 @@ sub flush_out { if ($compat_mode) { $out = "<para".$para_arch.">&".$entity_name.";</para>"; } else { - $out = "<para>".$para_arch."&".$entity_name.";</para>"; + if (${$mdocvars}{first_para}) { + $out = "<para>".$para_arch."&".$entity_name.";</para>"; + } else { + $out = "<para>&".$entity_name.";</para>"; + } + ${$mdocvars}{first_para} = 0; } dlog(4, "Flushing parabuf"); @@ -400,8 +415,6 @@ sub add_listitem { if(defined($archlist{${$mdocvars}{Nm}})) { $para_arch = ' arch="' . $archlist{${$mdocvars}{Nm}} . '"'; } - } else { - $listitem = "<listitem><para>&".$entity_name.";</para></listitem>"; } $listitem = "<listitem><para".$para_arch.">&".$entity_name.";</para></listitem>"; dlog(4, "Adding '$listitem' to out_dev"); |