#!/usr/bin/perl
# check the status of the history for one file
require "prcs-parse.pl";     
die "No project file present" unless ($project, $curver)=&get_default_project;
print "$project working version:\t", $curver, "(w)\n";

while ( $file=shift @ARGV ) {
  print "\nFile: $file\n";
  @vers=&file_history($project, $file);
  %curmd=&gen_md5($file);
  push @vers, [$curver."(w)", "", "", $curmd{$file}];
  $prev=0;
  for $keyref ( @vers ) {
    @key=@$keyref;
    if ( $prev eq $key[3] ) { printf "%-15s%-10s%-15s%s", $key[0], $key[1], $key[2], "Same as above\n"; }
    else { printf "%-15s%-10s%-15s%s", $key[0], $key[1], $key[2], "$key[3]\n"; }
    $prev=$key[3];
  }
}
