-open(CTAGS,"-|",'find -name "*.h"|xargs ctags -f - --c-types=xp')
- or die "Cannot get ctags output: $!";
-while (<CTAGS>) {
- chomp;
- die "Line $. of ctags output not recognized: $_"
- # $1 $2 $3
- if !/^([^\t]*)\t([^\t]*)\t.*\t(\w)$/;
- storesym(
- "name"=>$1,
- "fn_c"=>$2,
- "type"=>"c$3",
- );
+if ($opt_headers) {
+ open(CTAGS,"-|",'find -name "*.h"|xargs ctags -f - --c-types=xp')
+ or die "Cannot get ctags output: $!";
+ while (<CTAGS>) {
+ chomp;
+ die "Line $. of ctags output not recognized: $_"
+ # $1 $2 $3
+ if !/^([^\t]*)\t([^\t]*)\t.*\t(\S+)$/;
+ storesym(
+ "name"=>$1,
+ "fn_c"=>$2,
+ "type"=>"c$3",
+ );
+ }
+ close CTAGS;