#replace "program main_name by subroutine user_main (and the end clause as well)"
if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
sed 's/^\([[:space:]]*\)\([eE][nN][dD] \)\{0,1\}[pP][rR][oO][gG][rR][aA][mM][^a-zA-Z0-9]*\([a-zA-Z0-9_]*\)/\1\2subroutine user_main /g' "${ARG}" >> "${TMPFILE}"
#replace "program main_name by subroutine user_main (and the end clause as well)"
if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
sed 's/^\([[:space:]]*\)\([eE][nN][dD] \)\{0,1\}[pP][rR][oO][gG][rR][aA][mM][^a-zA-Z0-9]*\([a-zA-Z0-9_]*\)/\1\2subroutine user_main /g' "${ARG}" >> "${TMPFILE}"