#! /bin/csh

# Assuming executable r8r16 is in quadLP along with minos56 and qminos56,
# ./runr8r16 mi02lib
# converts minos56/src/mi02lib.f to qminos56/src/mi02lib.f
#
# BEWARE: Some qminos56 files have other differences.
#         mi02lib.f  has      title  = 'quadMINOS  5.6      (Aug 2014)'
#         mi11sys.f  has      eps    = 1.93e-34 and different nwordr, nwordi, nwordh

set FILE = $1

if ($FILE == mi02lib) then
   echo "Don't convert mi02lib"
   exit
endif

if ($FILE == mi11sys) then
   echo "Don't convert mi11sys"
   exit
endif

\cp -p minos56/src/{$FILE}.f fort.10
./r8r16
#rm fort.10
#mv fort.11 qminos56/src/{$FILE}.f
