aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Beppu <beppu@lbox.org>2001-02-23 17:51:08 +0000
committerJohn Beppu <beppu@lbox.org>2001-02-23 17:51:08 +0000
commite6967b20cb5fac3137701f66af5abb8123e3eedd (patch)
tree8185e05d49670bcff5212da73d13d74a34c03e11
parent3757f98d86b7ad467049e6b0fcd40a865faaa334 (diff)
downloadbusybox-w32-e6967b20cb5fac3137701f66af5abb8123e3eedd.tar.gz
busybox-w32-e6967b20cb5fac3137701f66af5abb8123e3eedd.tar.bz2
busybox-w32-e6967b20cb5fac3137701f66af5abb8123e3eedd.zip
Added some documentation and made --sgml use sgml_from_usage().
pod_from_usage() is the default generator.
-rwxr-xr-xdocs/autodocifier.pl33
1 files changed, 24 insertions, 9 deletions
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl
index e02bca93e..1190160da 100755
--- a/docs/autodocifier.pl
+++ b/docs/autodocifier.pl
@@ -81,7 +81,10 @@ sub sgml_for_usage {
81 my $name = shift; 81 my $name = shift;
82 my $usage = shift; 82 my $usage = shift;
83 return 83 return
84 "FIXME"; 84 "<fixme>\n".
85 " $name\n".
86 "</fixme>\n"
87 ;
85} 88}
86 89
87# the keys are applet names, and 90# the keys are applet names, and
@@ -135,11 +138,13 @@ foreach (@ARGV) {
135 } 138 }
136} 139}
137 140
138#use Data::Dumper; 141my $generator = \&pod_for_usage;
139#print Data::Dumper->Dump([\%docs], [qw(docs)]); 142if (defined $opt{sgml}) {
143 $generator = \&sgml_for_usage;
144}
140 145
141foreach my $name (sort keys %docs) { 146foreach my $name (sort keys %docs) {
142 print pod_for_usage($name, $docs{$name}); 147 print $generator->($name, $docs{$name});
143} 148}
144 149
145exit 0; 150exit 0;
@@ -166,19 +171,29 @@ This script was based on a script by Erik Andersen (andersen@lineo.com).
166 171
167=head1 OPTIONS 172=head1 OPTIONS
168 173
169these control my behaviour 174=over 4
170
171=over 8
172 175
173=item --help 176=item --help
174 177
175This displays the help message. 178This displays the help message.
176 179
180=item --pod
181
182Generate POD (this is the default)
183
184=item --sgml
185
186Generate SGML
187
188=item --verbose
189
190Be verbose (not implemented)
191
177=back 192=back
178 193
179=head1 FILES 194=head1 FILES
180 195
181files that I manipulate 196F<usage.h>
182 197
183=head1 COPYRIGHT 198=head1 COPYRIGHT
184 199
@@ -192,4 +207,4 @@ John BEPPU <beppu@lineo.com>
192 207
193=cut 208=cut
194 209
195# $Id: autodocifier.pl,v 1.8 2001/02/23 17:41:41 beppu Exp $ 210# $Id: autodocifier.pl,v 1.9 2001/02/23 17:51:08 beppu Exp $