Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fpp (Tool for C-preprocessed Fortran)

60 views
Skip to first unread message

Martin Wilck

unread,
Jul 17, 2000, 3:00:00 AM7/17/00
to

For those using Fortran code mixed with C preprocessor statements:

I have recently patched the source of the Fortran preprocessor fpp by Sun
Microsystems
to include automake/autoconf support in order to improve portability
(the old netlib version would only compile out-of-the-box on Suns).

The patched fpp source is available from ftp://ftp.netlib.org/fortran as
"fpp-1.1.tar.gz".

I just recently discovered that fpp is much more powerful than cpp and
also than the C preprocessor support of most compilers (except Sun's,
which uses fpp). For example, it auto-magically wraps lines having grown
too long through macro substitution.

I'd be grateful if people having use for this try my code on different
platforms and report portability failures to me. I tested the stuff on
Linux, IRIX, IAX, and Solaris. The build procedure is an ordinary
"./configure; make; make install".

Regards, Martin

Martin Wilck <mar...@tropos.de>


Tim Prince

unread,
Jul 17, 2000, 3:00:00 AM7/17/00
to
Looks interesting. The first problem (?) configure reports on
cygwin-1.1.2 goes like

"test: Files/Microsoft: unknown operand "(is that a problem?)

and gcc gives a disquieting group of diagnostics

"warning: comparison is always true due to limited range of data type"

I suppose those could come from (c) < 255 and not be a problem.

Also, there are warnings about subscripts of type char. In case the
processor is meant to index into the lcase[] table with possible
characters with high bit set, should those be an unsigned type?

'man fpp' comes right up. I don't see there an explanation of whether
fpp should pipe output to a compiler. It appears to work when directing
output to other likely destinations.

config.log looks messy but it seems to be coming out with good results.

Nice work.
--
Tim Prince
"Martin Wilck" <mar...@tropos.de> wrote in message
news:8kvc0g$3c6nf$1...@fu-berlin.de...

Martin Wilck

unread,
Jul 19, 2000, 3:00:00 AM7/19/00
to
In article <8kvnrc$8n7$1...@slb3.atl.mindspring.net>, "Tim Prince"

<tprin...@mindspring.com> wrote:
> Looks interesting. The first problem (?) configure reports on
> cygwin-1.1.2 goes like
>
> "test: Files/Microsoft: unknown operand "(is that a problem?)
>
> and gcc gives a disquieting group of diagnostics
>
> "warning: comparison is always true due to limited range of data type"
>
> I suppose those could come from (c) < 255 and not be a problem.
>
> Also, there are warnings about subscripts of type char. In case the
> processor is meant to index into the lcase[] table with possible
> characters with high bit set, should those be an unsigned type?

I had these warnings here, too. I only changed those parts of the
code that caused errors on the systems tested. The warnings are
produced by original code from Sun, which I wanted to mess with as
little as I could.

Anyway, you seem to have had fpp run in a Windows environment.
That's great!
I personally didn't believe this could work - it's autoconf magic,
and I have little to do with it.

> Nice work.
Thanks, but most of the credit should still go to the Sun guys.

Martin


0 new messages