X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=bin%2Ffrtn;h=31195a86fa1ce3f45aca2eb10db739fbe243e930;hb=7ced2dbeb1a104912fbdd041ce18b0e29a72d893;hp=1f8bd7c5f273e16840efa54a4711f987df48266e;hpb=fa105a9b1957e54e3a63fdcda359fd0abc453a44;p=h316.git diff --git a/bin/frtn b/bin/frtn index 1f8bd7c..31195a8 100755 --- a/bin/frtn +++ b/bin/frtn @@ -1,18 +1,57 @@ #!/bin/sh # FORTRAN IV compiler wrapper for simh h316 +if [ "$FRTN_ORIGINAL" ]; then + LOGNAME="FORTRAN IV COMPILER (Original):" +else + LOGNAME="FORTRAN IV COMPILER:" +fi + if [ ! $1 ] ; then - echo "Argument missing!" + echo "$LOGNAME Input file missing!" exit 2 fi name=`basename $1 .f` +if [ ! -f "$1" ]; then + echo "$LOGNAME Input file \"$name\" not found!" + exit 2 +fi + + listfile=$name.lst cat $1 | tab | paron > $name.par rm -f $name.lst rm -f $name.obj +echo -n "$LOGNAME Compiling \"$1\":" + +if [ "$FRTN_ORIGINAL" ]; then + +cat > $name.go < $name.go < /dev/null if cat $name.lst | egrep "[*]{36,40}">/dev/null 2>&1; then cat $name.lst - echo -e "\n\nFORTRAN IV compilation FAILED!" + echo -e " FAILED!" rm -f $name.obj exit 77 fi @@ -47,7 +88,7 @@ if [ ! $2 ]; then rm -f $name.par fi -echo "FORTRAN IV compilation successfull." +echo " Success." exit 0