Mixing ANSI and K & R 1 code.
Guy Harris
guy at auspex.auspex.com
Sat Nov 17 06:28:26 AEST 1990
>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.
...
>This is something that should be fixed.
Fine, hop in your time machine, go back to the ANSI C meetings where
they decided that if you have a routine declared with prototypes with
arguments that are "float", that it really gets passed "float"s, not
"double"s, and convince them otherwise. That should fix it....
If that's not possible, you're out of luck unless you can convince SGI
or whoever to have "float" just mean "double", which is unlikely given
the number of other things it'll probably break....
If you have a routine that is to have prototypes, is to be passed
floating-point arguments, and is to be called by old-style C, make its
arguments "double" - even if that means not giving them type "Coord".
More information about the Comp.sys.sgi
mailing list