#! /usr/bin/perl -w
use strict;

# Report on stdout the list of files for which current version is not
# tagged.

# BUGS: no handling of brnaches is attempted

# Copyright (c) 2002 Yann Dirson <yann.dirson@fr.alcove.com>
# Copyright (c) 2002 Alcove (www.alcove.com)
#  GPL, version 2

my $dir=($ARGV[0] or '.');

open LOG, "cvs -q log -h $dir|";

my ($curfile, $head, $found);
while (<LOG>) {
  m/^Working file: (.*)/ and $curfile = $1;
  m/^head: (.*)/ and $head = $1;
  if (defined $head) {
    m/^\t(.*): $head/ and $found = $1;

    if (m/^RCS file:/) {
      print "$curfile\n" unless defined $found;

      $curfile = undef;
      $head = undef;
      $found = undef;
    }
  }
}
