🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2430

Re: ANSI prototypes, the right choice...

#2430
From: Ron Guilmette
Date: Thu, 14 Feb 1991 04:07
41 lines
1602 bytes
In article <1991Feb13.105852.540@sugar.hackercorp.com> peter@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@ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.
Technical Details
Message-ID: <3880@lupine.NCD.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!infopiz!lupine!rfg
References: <1991Feb11.030811.25074@sugar.hackercorp.com> <1991Feb12.005726.22447@athena.mit.edu> <1991Feb13.105852.540@sugar.hackercorp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!infopiz!lupine!rfg
From: rfg@NCD.COM (Ron Guilmette)
Newsgroups: comp.std.c,comp.sys.amiga.programmer
Subject: Re: ANSI prototypes, the right choice...
Message-ID: <3880@lupine.NCD.COM>
Date: 14 Feb 91 04:07:57 GMT
References: <1991Feb11.030811.25074@sugar.hackercorp.com> <1991Feb12.005726.22447@athena.mit.edu> <1991Feb13.105852.540@sugar.hackercorp.com>
Followup-To: comp.std.c
Organization: Network Computing Devices, Inc., Mt. View, CA
Lines: 41