#csh
#
# Use C:Version command to set file-note of indicated files
# with the version string of the file.

foreach i ( $_passed ) {
   set return  = `C:Version FILE $i FULL`
   set thever  = @word( $return 3 )
   set version = @delword( $return 1 )
   if $thever == "find" then
      set version = \"?.?\"
   endif
   set vernum = @word( $version 1 )
   if ( $vernum > 0) then
      echo -n v$version >T:vers.tmp
   else
      echo -n $return >T:vers.tmp
   endif
   echo -n "File: "$i" - "
   cat T:vers.tmp
   Work:c/FileComment $i <T:vers.tmp
   rm T:vers.tmp
}
unset vernum
unset version
unset thever
unset return
unset i
