diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 2002-09-25 12:59:48 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 2002-09-25 12:59:48 +0000 |
commit | 3054ef8a6ec8a67937cc1bfc492722fd6eccc325 (patch) | |
tree | 708bbe6f5367897d0d5239021d85fdd50136658a /source3/script/find_missing_doc.pl | |
parent | 7b81263427408a01aa7ef81fc3c86e9bb63dab75 (diff) | |
parent | 284dd066a8b848d8c2d93089ed9991647b7db486 (diff) | |
download | samba-3054ef8a6ec8a67937cc1bfc492722fd6eccc325.tar.gz samba-3054ef8a6ec8a67937cc1bfc492722fd6eccc325.tar.bz2 samba-3054ef8a6ec8a67937cc1bfc492722fd6eccc325.zip |
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 9a5541595f78f2cbba16030552c6e780f6fddcf6)
Diffstat (limited to 'source3/script/find_missing_doc.pl')
-rwxr-xr-x | source3/script/find_missing_doc.pl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl new file mode 100755 index 0000000000..89385baaa2 --- /dev/null +++ b/source3/script/find_missing_doc.pl @@ -0,0 +1,43 @@ +#!/usr/bin/perl -w + +#reads in the list of parameters from the source +#compares this list to the list of parms documented in the docbook source +#prints out the names of the parameters that are in need of documentation +# (C) 2002 Bradley W. Langhorst" <brad@langhorst.com> + +my $doc_file = "./docs/docbook/manpages/smb.conf.5.sgml"; +my $source_file = "./source/param/loadparm.c"; +my $ln; +my %params; + +open(SOURCE, "<$source_file") || + die "Unable to open $source_file for input: $!\n"; +open(DOC, "<$doc_file") || + die "Unable to open $doc_file for input: $!\n"; + +while ($ln= <SOURCE>) { + last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; +} #burn through the preceding lines + +while ($ln = <SOURCE>) { + last if $ln =~ m/^\s*\}\;\s*$/; + #pull in the param names only + next if $ln =~ m/.*P_SEPARATOR.*/; + $ln =~ m/.*\"(.*)\".*/; + $params{lc($1)}='not_found'; #not case sensitive +} +close SOURCE; +#now read in the params list from the docs +@doclines = <DOC>; + +foreach $ln (grep (/\<anchor\ id\=/, @doclines)) { + $ln =~ m/^.*\<anchor\ id\=\".*\"\>\s*(?:\<.*?\>)*\s*(.*?)(?:\s*\(?[S,G]?\)?\s*(\<\/term\>)?){1}\s*$/; + #print "got: $1 from: $ln"; + if (exists $params{lc($1)}) { + $params{$1} = 'found'; + } +} + +foreach (keys %params) { + print "$_\n" if $params{$_} eq 'not_found' and $_ cmp "valid" and $_ eq ""; +} |