"Hunsbergers" <[EMAIL PROTECTED]> wrote:

   Greetings!

[...]

   I  (just for fun, and to try out lcc-win32 on my PC) recently attempted to
   use f2c to translate, then compile PMX under lcc-win32... (PC, Win95).

   For what it's worth, I found that the crash on startup when a file name is
   on the
   command line can be fixed by following the hint Don put in the code...

   At lines 125/126 (and also at lines 138/139 is this code:

           call getarg(1,jobname,idum) ! May need to replace this w/ next line
   c        call getarg(1,jobname)

   Simply changing it to:

   c        call getarg(1,jobname,idum) ! May need to replace this w/ next line
           call getarg(1,jobname)

   ... compiles successfully, and (more importantly) runs successfully, both
   with
   a file name on the command line, and in original mode!  I suspect that there
   are
   differences in the libraries for various C compiler implementations for the
   number
   of arguments allowed for "getarg."  Interesting to me (but common to C) that
   such
   differences would not be detected better at compile time?

The above problem isn't caused by the C getarg() function, but rather
by f2c's fortran libraries which contain C implementations of standard
fortran functions. Apparently, the fortran getarg function isn't fully
standardised, and the f2c implementation isn't compatible with Don's
usage ...

For the PMX-Unix distribution, I fixed the getarg routine in f2c's
fortran library (and several other functions as well). 

Best,
Stefan.

Reply via email to