Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!decwrl!ucbvax!KARRON.MED.NYU.EDU!karron From: karron@KARRON.MED.NYU.EDU Newsgroups: comp.sys.sgi Subject: Mixing ANSI and K & R 1 code. Message-ID: <9011140836.AA17405@karron.med.nyu.edu> Date: 14 Nov 90 08:36:42 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: karron%CMCL2.NYU.EDU@cunyvm.cuny.edu Organization: The Internet Lines: 38 I am working on modifying a software package written to run in the older SGI compiler environment. I have just had LOTS of problems that I have finally nailed down to mixing old and new argument styles. Seems you can't have newstyle argument lists (ANSI) receiving parameters from old styles,non prototyped code. I first tried to write all my new stuff in ANSI code, but it would always get float (Coord) arguments wrong. Finally, I had to recode my new subroutines in old C style arguments. ANSI C:void MyNewSubroutine(Coord x,Coord y,Coord z) { do da, do that thing } K & R 1: void TheOldWayToAvoid(x,y,z) Coord x,y,z; { do da, do that thing } It seems a bit much to be forced to 1)rewrite ALL the old code in ANSI style headers or 2) Write new stuff with old style headers. This is something that should be fixed. There is a lot of code out there that needs work, and I should not have to write new stuff in old style c. dan. +-----------------------------------------------------------------------------+ | karron@nyu.edu (mail alias that will always find me) | | Dan Karron | | . . . . . . . . . . . . . . New York University Medical Center | | 560 First Avenue \ \ Pager <1> (212) 397 9330 | | New York, New York 10016 \**\ <2> 10896 <3> | | (212) 340 5210 \**\__________________________________________ | | Please Note : Soon to move to dan@karron.med.nyu.edu 128.122.135.3 (Nov 1 )| +-----------------------------------------------------------------------------+