diff options
author | Simon L. B. Nielsen <simon@FreeBSD.org> | 2008-10-05 09:45:45 +0000 |
---|---|---|
committer | Simon L. B. Nielsen <simon@FreeBSD.org> | 2008-10-05 09:45:45 +0000 |
commit | c952bef2736513b18d84a5dd43a09d5746d1e507 (patch) | |
tree | a4a0d7548d982914fcbff7efa3d6aacbaf5efa89 /release/doc/share | |
parent | 93101a7b6049126fd20ee226416187339406ae29 (diff) | |
download | src-c952bef2736513b18d84a5dd43a09d5746d1e507.tar.gz src-c952bef2736513b18d84a5dd43a09d5746d1e507.zip |
- 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.
Notes
Notes:
svn path=/head/; revision=183621
Diffstat (limited to 'release/doc/share')
-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 75b1af2072fd..b5ec96971a1a 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"); |