Sdiff validate_flg.pl


125 } 126 } 127 128 sub wanted { 129 process_file($_, undef) if /\/(inc|req)\.flg$/ && -f $_; 130 } 131 132 $f_flg = $ARGV[0] eq "-f"; 133 shift @ARGV if $f_flg; 134 135 $basedir = "usr"; 136 if ($#ARGV == 0) { 137 $basedir = shift @ARGV; 138 } elsif ($#ARGV > 0) { 139 die "$0: unexpected arguments\n"; 140 } 141 142 die "$0: \$CODEMGR_WS must be set\n" if $ENV{CODEMGR_WS} eq ""; 143 chdir $ENV{CODEMGR_WS} or die "$0: chdir $ENV{CODEMGR_WS}: $!\n"; 144 145 File::Find::find({wanted => \&wanted, no_chdir => 1}, $basedir); 146 147 # After passing through the tree, process all of the included files. 148 # There aren't many of these, so don't bother trying to optimize the 149 # traversal. Just do them all. 150 while (@execlist) { 151 my $file = shift @execlist; 152 my $incpath = shift @execlist; 153 process_file($file, $incpath); 154 } 155 156 exit 0;


125 } 126 } 127 128 sub wanted { 129 process_file($_, undef) if /\/(inc|req)\.flg$/ && -f $_; 130 } 131 132 $f_flg = $ARGV[0] eq "-f"; 133 shift @ARGV if $f_flg; 134 135 $basedir = "usr"; 136 if ($#ARGV == 0) { 137 $basedir = shift @ARGV; 138 } elsif ($#ARGV > 0) { 139 die "$0: unexpected arguments\n"; 140 } 141 142 die "$0: \$CODEMGR_WS must be set\n" if $ENV{CODEMGR_WS} eq ""; 143 chdir $ENV{CODEMGR_WS} or die "$0: chdir $ENV{CODEMGR_WS}: $!\n"; 144 145 # Only check for SCCS files if this is a Teamware workspace. 146 $f_flg = ! -d "$ENV{CODEMGR_WS}/Codemgr_wsdata"; 147 148 File::Find::find({wanted => \&wanted, no_chdir => 1}, $basedir); 149 150 # After passing through the tree, process all of the included files. 151 # There aren't many of these, so don't bother trying to optimize the 152 # traversal. Just do them all. 153 while (@execlist) { 154 my $file = shift @execlist; 155 my $incpath = shift @execlist; 156 process_file($file, $incpath); 157 } 158 159 exit 0;