Rev 4580 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#! @PERL@#-*- perl -*- (for *.in)## Show those *.Rd files which do NOT have a \keyword{.}#use Getopt::Long;use File::Basename;use Cwd;$cwd=getcwd();if($ENV{"R_HOME"}){$R_HOME=$ENV{"R_HOME"};}else{chdir(dirname($0) . "/..");$R_HOME=getcwd();}chdir($cwd);require "$R_HOME/etc/Rdconvlib.pl";@knownoptions = ("debug|d", "help|h");GetOptions (@knownoptions) || usage();usage() if $opt_help;print stderr "R_HOME: '$R_HOME'; cwd='$cwd'\n" if $opt_debug;##file:while ($file = shift @ARGV) {if(!open(RD, $file)) {warn "couldn't open file '$file':$!\n";next file;}$max_bracket = 0;$max_section = 0;undef $complete_text;undef %blocks;undef @section_body;undef @section_title;#-- remove comments (everything after a %)while(<RD>){while(s/^\\%|([^\\])\\%/$1escaped_percent_sign/go){};s/^([^%]*)%.*$/$1/o;s/escaped_percent_sign/\\%/go;$complete_text = "$complete_text$_";}mark_brackets();escape_codes();if(@keywords= get_multi($complete_text,"keyword")) {if($opt_debug) {print STDERR "$file: Keywords=";&print_vec(STDERR, 'keywords');}} else { ##-- NO Keywords!print "$file\n"; ##--- The file without keyword}}sub usage {print "keyword-test [ -d(ebug) ] [ -h(elp) ] __.Rd-files__ \n";print "Example: $0 ../src/library/base/eda/*.Rd\n\n";exit 0;}