#!/bin/csh -f

set cmdline = ($*)
set newcmdline = ()

foreach i ($cmdline)
  if ("$i:e" == cc) then
    set newname = `basename $i:r`.c++
    set newcmdline = ($newcmdline $newname)
    #cp $i $newname
    #chmod 444 $newname
    /bin/rm -f $newname
    ln -s $i $newname
  else
    set newcmdline = ($newcmdline $i)
    endif
  end

$newcmdline
