How to stop f2c from printing names of each subroutine and function

73 views Asked by At

Our build scripts run f2c over several thousand subroutines and functions, so our build output consists of large amounts of output like:

   a102:
   a200:
   a210:
   acalc:
   actdis:
   addvec:
   adhydr:
   alsun:

We are running f2c version 20100827.

The f2c command line used is:

f2c -Nx5000 -Nn3200 -NL1500 -a -R -ec -doutput

I've found the f2c man page and can't see any relevant options there.

Without editing the f2c source code, is there some other way, e.g. some undocumented feature?

1

There are 1 answers

0
Clare Macrae On BEST ANSWER

The only way I've found to delete the function names is to pipe the output of f2c through grep:

$F2C_EXE $f2c_options      output/$file.f 2>&1 | grep -v '^   [a-zA-Z]'

This works because the function and subroutine names are prefixed with three spaces, and the -v grep option tells grep to print all lines except the matching ones.

The 2>&1 is required because f2c seems to write all its output to stderr, not stdout.