5 $topdir = (shift @ARGV) or $topdir = ".";
7 ##################################################
8 # Reading links from manpage
14 open(IN
,"xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml|");
17 if( /<listitem><para><link linkend="([^"]*)"><parameter moreinfo="none">([^<]*)<\/parameter
><\
/link><\/para
><\
/listitem>/g ){
26 #################################################
27 # Reading entries from source code
30 open(SOURCE
,"$topdir/param/loadparm.c") or die("Can't open $topdir/param/loadparm.c: $!");
32 while ($ln = <SOURCE
>) {
33 last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/;
34 } #burn through the preceding lines
36 while ($ln = <SOURCE
>) {
37 last if $ln =~ m/^\s*\}\;\s*$/;
38 #pull in the param names only
39 next if $ln =~ m/.*P_SEPARATOR.*/;
40 next unless $ln =~ /\s*\{\"(.*)\".*/;
43 $doc{lc($1)} = "FOUND";
45 print "'$1' is not documented\n";
50 ##################################################
51 # Trying to find missing references
54 if($doc{$_} cmp "FOUND") {
55 print "'$_' is documented but is not a configuration option\n";