#!/bin/sh
HEDITOR=hvi
cmd=`basename $0`
new=/tmp/$$.`basename $1`
trap 'rm -f /tmp/$$.*; exit 1' 1 2 15
hmcode -u  $1 $new
$HEDITOR $new
if test -r $new ;
then 
 if [ $cmd = 'pineditor' ] 
 then 
   cp $new $1
 else 
   hmconv $new $1
 fi
fi
/bin/rm $new
