20
20
# name of man page, man section, 'see also' section
22
22
'ntpd' => ['ntpd', 8, 'ntp.conf(5), ntpq(8), ntpdc(8)'],
23
'ntpq' => ['ntpq', 8, 'ntpd(8), ntpdc(8)'],
23
'ntpq' => ['ntpq', 8, 'ntp_decode(5), ntpd(8), ntpdc(8)'],
24
24
'ntpdate' => ['ntpdate', 8, 'ntpd(8)'],
25
25
'ntpdc' => ['ntpdc', 8, 'ntpd(8)'],
26
'ntptime' => ['ntpdtime', 8, 'ntpd(8), ntpdate(8)'],
26
'ntptime' => ['ntptime', 8, 'ntpd(8), ntpdate(8)'],
27
27
'ntptrace' => ['ntptrace', 8, 'ntpd(8)'],
28
'ntp-wait' => ['ntp-wait', 8, 'ntpd(8)'],
28
29
'keygen' => ['ntp-keygen', 8, 'ntpd(8), ntp_auth(5)'],
29
'confopt' => ['ntp.conf', 5, 'ntpd(8)'],
30
'tickadj' => ['tickadj', 8, 'ntpd(8)'],
31
'confopt' => ['ntp.conf', 5, 'ntpd(8), ntp_auth(5), ntp_mon(5), ntp_acc(5), ntp_clock(5), ntp_misc(5)'],
30
32
'authopt' => ['ntp_auth', 5, 'ntp.conf(5), ntpd(8)'],
31
'monopt' => ['ntp_mon', 5, 'ntp.conf(5)'],
33
'monopt' => ['ntp_mon', 5, 'ntp.conf(5), ntp_decode(5)'],
32
34
'accopt' => ['ntp_acc', 5, 'ntp.conf(5)'],
33
35
'clockopt' => ['ntp_clock', 5, 'ntp.conf(5)'],
36
'decode' => ['ntp_decode', 5, 'ntpq(8), ntp_mon(5)'],
34
37
'miscopt' => ['ntp_misc', 5, 'ntp.conf(5)']);
43
'decode' => 'l l l l.',
44
'authopt' => 'c c c c c c.'
36
47
# Disclaimer to go in SEE ALSO section of the man page
37
$seealso_disclaimer = 'These man pages are automatically hacked from the main NTP ' .
38
'documentation pages, which are maintained in HTML format. These files are ' .
39
'included in the NTP source distribution. If you installed NTP from a binary ' .
40
'package, or it came pre-installed on your system, chances are the documentation ' .
41
'was also included in the usual place for your system. The HTML files are more ' .
42
'correct and complete than these man pages, which are provided for your reference ' .
45
# Disclaimer to go right at the top
46
$top_disclaimer = 'This file was automatically generated from HTML source, and may be ' .
47
'incorrect. See the SEE ALSO section at the end of this file for more info';
48
$seealso_disclaimer = "The official HTML documentation.\n\n" .
49
"This file was automatically generated from HTML source.\n";
49
51
mkdir $MANDIR, 0777;
50
52
mkdir "$MANDIR/man8", 0777;
92
97
while (my $token = $p->get_token) {
93
98
if($token->[0] eq "T") {
94
99
my $text = $token->[1];
97
$text =~ s/[\n ]*$/ /;
102
$text =~ s/^[\n\t ]*//;
104
$text =~ s/^[\n\t ][\n\t ]+$//;
105
$text =~ s/[\n\t ]+/ /g;
106
$text =~ s/ \;/ /g;
107
$text =~ s/>\;/>/g;
108
$text =~ s/<\;/</g;
109
$text =~ s/"\;/"/g;
110
$text =~ s/&\;/&/g;
111
$text =~ s/^\./\\[char46]/;
99
$text =~ s/ \;/ /g;
101
113
print MANOUT "$text";
104
116
if($token->[0] eq "S") {
105
117
if($token->[1] eq "h4") {
106
118
my $text = uc($p->get_trimmed_text("/h4"));
107
print MANOUT ".SH $text\n";
119
# ignore these sections in ntpd.html
120
if ($filename eq "ntpd" &&
121
($text eq "CONFIGURATION OPTIONS")) {
124
open(MANOUT, ">/dev/null");
128
open(MANOUT, ">>$fileout");
130
print MANOUT "\n\n.SH $text\n";
109
132
if($token->[1] eq "tt") {
110
133
push @fontstack, "tt";
118
141
my $text = $p->get_trimmed_text("/address");
119
142
print MANOUT "\n.SH AUTHOR\n$text\n";
121
if($token->[1] eq "dt") {
123
print MANOUT "\n.RS $tmp\n";
144
if($token->[1] eq "dt" || $token->[1] eq "br" && $deflevel > 0) {
145
print MANOUT "\n.TP 8\n";
126
148
if($token->[1] eq "dd") {
127
print MANOUT "\n.RS $deflevel\n";
130
152
if($token->[1] eq "dl") {
155
print MANOUT "\n.RS ", $deflevel > 1 ? 8 : 0;
158
if($token->[1] eq "p") {
161
if($token->[1] eq "pre") {
162
print MANOUT "\n.nf";
165
if($token->[1] eq "table") {
166
print MANOUT "\n.TS\n";
167
print MANOUT "expand allbox tab(%);\n";
168
print MANOUT $table_headers{$filename};
171
if($token->[1] eq "td") {
172
if ($first_td == 0) {
134
178
elsif($token->[0] eq "E") {
135
if($token->[1] eq "dd") {
136
print MANOUT "\n.RE\n";
179
if($token->[1] eq "h4") {
139
182
if($token->[1] eq "tt") {