Revision 237 (by dpavlin, 2004/03/08 17:43:12) initial import of openisis 0.9.0 vendor drop
#!/usr/bin/perl

#	list files under CVS control
#	$Id: lscvs,v 1.2 2002/12/13 15:42:42 kripke Exp $

sub dodir {
	my $dir = shift;
	print STDERR "$dir\n";
	local *FH;
	open( FH, $dir.'CVS/Entries' );
	while (<FH>) {
		# print STDERR $_;
		chomp;
		my ($type,$name,$version,$date,$opt,$tagdate) = split( /\// );
		if ( '' eq $type ) {
			if ( $l ) {
				print join("\t",$dir.$name,$version,$date,$x),"\n";
			} else {
				print $dir.$name,"\n";
			}
		} elsif ( 'D' eq $type ) {
			dodir( $dir.$name.'/' ) if $r && $name;
			# "`D' on a line all by itself indicates that the program
			# which wrote the `Entries' file does record subdirectories"
		} else {
			print STDERR "uknown type '$type' in $dir ",
				join("\t",$name,$version,$date,$x),"\n";
		}
	}
	close FH;
}

$l = $ARGV[0] =~ /l/;
$r = $ARGV[0] =~ /r/;

dodir;