Skip to content

Commit

Permalink
Keep f2c output in f77.sh when compiled with -w flag
Browse files Browse the repository at this point in the history
  • Loading branch information
olebole committed Feb 2, 2024
1 parent fa5cc98 commit d81fcbb
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions unix/hlib/f77.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ EFLFLAGS=${EFLFLAGS:-'system=portable deltastno=10'}
F2C=${F2C:-${iraf}unix/bin/f2c.e}
F2CFLAGS=${F2CFLAGS:='-KRw8 -Nn802 -cf'}
keepc=0
warn=1
xsrc=0
rc=0
trap 'rm -f $s ; exit $rc' 0
Expand Down Expand Up @@ -149,13 +148,11 @@ do
;;

-W*) CFLAGS="$CFLAGS $1"
warn=1
shift 1
;;

-w) F2CFLAGS="$F2CFLAGS -w"
CFLAGS="$CFLAGS -w"
warn=0
case $2 in -6) F2CFLAGS="$F2CFLAGS"66; shift
case $2 in -6) shift;; esac;; esac
shift
Expand Down Expand Up @@ -201,12 +198,7 @@ do
*.f)
case "$1" in *.f) f=".f";; *.F) f=".F";; esac
b=$(basename "$1" $f)
if [ $warn = 0 ]; then
$F2C $F2CFLAGS "$b.f" 2>"$s"
sed '/^ arg .*: here/d' "$s" 1>&2
else
$F2C $F2CFLAGS "$b.f"
fi
$F2C $F2CFLAGS "$b.f"
if [ $xsrc = 1 ]; then
sed -e "s/$b\\.f/$b.x/" < "$b.c" > "$b.t"; mv "$b.t" "$b.c"
fi
Expand Down

0 comments on commit d81fcbb

Please sign in to comment.