Add st_birthtime and friends for accurate create times on systems that support it...
[Samba/bb.git] / docs-xml / scripts / find_missing_doc.pl
blob2b557b974d18e873fbb9b1b2202e1f63c9c7ac3d
1 #!/usr/bin/perl
3 my %doc;
5 $topdir = (shift @ARGV) or $topdir = ".";
7 ##################################################
8 # Reading links from manpage
10 $curdir = $ENV{PWD};
12 chdir("smbdotconf");
14 open(IN,"xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml|");
16 while(<IN>) {
17 if( /<listitem><para><link linkend="([^"]*)"><parameter moreinfo="none">([^<]*)<\/parameter><\/link><\/para><\/listitem>/g ){
18 $doc{$2} = $1;
22 close(IN);
24 chdir($curdir);
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*\{\"(.*)\".*/;
42 if($doc{lc($1)}) {
43 $doc{lc($1)} = "FOUND";
44 } else {
45 print "'$1' is not documented\n";
48 close SOURCE;
50 ##################################################
51 # Trying to find missing references
53 foreach (keys %doc) {
54 if($doc{$_} cmp "FOUND") {
55 print "'$_' is documented but is not a configuration option\n";