From: Al Clark (aclark@netcom.com)
Date: 10/24/92


From: aclark@netcom.com (Al Clark)
Subject: Re: f2c in SLS .98
Date: 24 Oct 1992 20:34:04 GMT

In article <mcampbel.719931163@eola.cs.ucf.edu> mcampbel@cs.ucf.edu (Mike Campbell ) writes:
>Conrad_Nobili@Harvard.EDU (Conrad C. Nobili) writes:
>
>>In article <1992Oct23.122551.11874@athena.mit.edu>,
>>hellmund@hep.physik.uni-leipzig.dbp.de wrote:
>
>>> Now my question: Is that an error of my installation/machine
>>> or has really nobody before tested the f2c binary in the SLS
>>> package?
>
>>Well, I too tested it on some pretty simple programs and found it crashed
>>every time. I am sucking down the sources now so as to check out what you
>>mentioned in your post.... Thanks for the knowledge that it can be made to
>>work and the pointer to the source....
>
>I've seen the same behavior. Let us all know when/if anything gets discovered.
>

f2c works; the following patch worked for me: (Of course you still need the
libraries; source of them should be available the same place you got f2c.tar)
================== procedure for extracting and patching f2c =======
tar -xvf f2c.tar
cd tmp
uncompress *
patch -p0 < patch.f2c
===================== begin patch.f2c ==============
*** makefile.del Sat Oct 24 11:37:22 1992
--- makefile Sat Oct 24 11:35:22 1992
***************
*** 1,7 ****
  # Makefile for f2c, a Fortran 77 to C converter
  
  g = -g
! CFLAGS = $g
  SHELL = /bin/sh
  
  OBJECTSd = main.o init.o gram.o lex.o proc.o equiv.o data.o format.o \
--- 1,7 ----
  # Makefile for f2c, a Fortran 77 to C converter
  
  g = -g
! CFLAGS = $g -DLINUX
  SHELL = /bin/sh
  
  OBJECTSd = main.o init.o gram.o lex.o proc.o equiv.o data.o format.o \
***************
*** 21,28 ****
                cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in
        $(YACC) $(YFLAGS) gram.in
        echo "(expect 4 shift/reduce)"
! sed 's/^# line.*/\/* & *\//' y.tab.c >gram.c
! rm -f gram.in y.tab.c
  
  $(OBJECTSd): defs.h ftypes.h defines.h machdefs.h sysdep.h
  
--- 21,28 ----
                cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in
        $(YACC) $(YFLAGS) gram.in
        echo "(expect 4 shift/reduce)"
! sed 's/^# line.*/\/* & *\//' gram.in.tab.c >gram.c
! rm -f gram.in gram.in.tab.c
  
  $(OBJECTSd): defs.h ftypes.h defines.h machdefs.h sysdep.h
  
*** malloc.c.del Sat Oct 24 11:41:36 1992
--- malloc.c Sat Oct 24 11:36:28 1992
***************
*** 21,26 ****
--- 21,29 ----
  this software.
  ****************************************************************/
  
+ #ifdef LINUX
+ #define CRAY
+ #endif
  #ifndef CRAY
  #define MINBLK (2*sizeof(struct mem) + 16)
  #define MSTUFF _malloc_stuff_
*** xsum0.out.del Mon Feb 10 00:03:50 1992
--- xsum0.out Sat Oct 24 11:44:50 1992
***************
*** 1,4 ****
! Notice fb5a412e 1183
  README fe10cd03 3340
  cds.c e93849b8 3884
  data.c e552a480 9278
--- 1,4 ----
! Notice 80b5a78 1189
  README fe10cd03 3340
  cds.c e93849b8 3884
  data.c e552a480 9278
***************
*** 27,34 ****
  lex.c fe1e63b6 29374
  machdefs.h 4950e5b 659
  main.c 1c136861 16450
! makefile 12f58dbe 2510
! malloc.c 5c2be2a 3422
  mem.c 5b007b2 4761
  memset.c 17404d52 1964
  misc.c 19c4624d 17758
--- 27,34 ----
  lex.c fe1e63b6 29374
  machdefs.h 4950e5b 659
  main.c 1c136861 16450
! makefile e525c181 2530
! malloc.c 1cbb1fa6 3455
  mem.c 5b007b2 4761
  memset.c 17404d52 1964
  misc.c 19c4624d 17758

-- 
Al - aclark@netcom.com - My opinions are my own.