TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARTIN GREGORIE
from: CHARLIE GIBBS
date: 2021-01-06 00:14:00
subject: Re: AI and decompilation?

On 2021-01-05, Martin Gregorie  wrote:

> On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:
>
>> You shouldn’t need declarations in C unless you’re using one of those
>> new-fangled compilers that requires them. Old code should still be
>> supported, though.
>
> Last time I tried it, (about 2 months ago), the current GNU C compiler
> accepts the old K&R C first edition procedure declaration syntax. I wish
> more compilers worked this way.

I write functions this way:

#ifdef PROTOTYPE
char *foo(char *bar, int baz)
#else
char *foo(bar, baz) char *bar; int baz;
#endif

One #define in a header file adapts it to any old or new compiler.
It works for declarations too.

--
/~\  Charlie Gibbs                  |  "Some of you may die,
\ /        |  but it's a sacrifice
 X   I'm really at ac.dekanfrus     |  I'm willing to make."
/ \  if you read it the right way.  |    -- Lord Farquaad (Shrek)

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.