ANSI prototypes, the right choice...
Ron Guilmette
rfg at NCD.COM
Thu Feb 14 15:07:57 AEST 1991
In article <1991Feb13.105852.540 at sugar.hackercorp.com> peter at sugar.hackercorp.com (Peter da Silva) writes:
>
>Yes, the other point is "we need a *working* unprotoize that puts casts
>into the code, so we can use ANSI prototypes and have a hope in hell
>of making them portable.
Hey! Cut me some slack! I'm doing the best I can! :-)
Wadaya want for nuttin'? :-)
But seriously folks, someday unprotoize will take this:
void *(*foobar (int, float))(float, struct s*);
struct s {
double (*func_ptr[10]) (char, enum e);
} svar;
void *vp;
void f () { svar.func_ptr[3] = (double (*)(char, enum e)) vp; }
and turn it into this:
void *(*foobar ())();
struct s {
double (*func_ptr[10]) ();
} svar;
void *vp;
void f () { svar.func_ptr[3] = (double (*)()) vp; }
But don't hold your breath.
--
// Ron Guilmette - C++ Entomologist
// Internet: rfg at ncd.com uucp: ...uunet!lupine!rfg
// Motto: If it sticks, force it. If it breaks, it needed replacing anyway.
More information about the Comp.std.c
mailing list