🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11853

Re: Prototypes & the default promotions (was about the new RKM stuff..

#11853
From: Charles Cleveland
Date: Thu, 16 Mar 1989 15:14
27 lines
2013 bytes
In article <6300@cbmvax.UUCP> ditto@cbmvax.UUCP (Michael "Ford" Ditto) writes:
)
)Last time I looked, Commodore was only providing a 32-bit-int version of
)Amiga.lib.  If you are compiling with 16-bit ints, and pass two shorts
)to a function that is documented and prototyped as
)	extern void Draw(struct RastPort *, SHORT, SHORT);
)the Amiga.lib stub will expect to be passed two LONGs, but the compiler
)will pass two SHORTs!  It won't work.  This is what the people meant who
)said that the library stubs will have to change.

If you include the proto header files for system functions in Lattice, then
you automatically include the #pragmas that make the stubs in Amiga.lib
irrelevant.  Since the stubs are irrelevant, they don't have to change.
Of course you can, with a suitable #define, cause the compiler to ignore
the pragmas and use the Amiga.lib stubs instead while still retaining the
prototypes, but if you've got a reason for doing this you better understand
the stub routines (as you point out).
)
)I haven't looked, but I'll bet that Lattice's headers prototype such
)routines with LONG args, contrary to the new RKM description.  This

I haven't looked either, but I'll bet they say SHORT.
-- 
"Our vision is to speed up time, eventually eliminating it." -- Alex Schure

Charles Cleveland   Georgia Tech School of Physics   Atlanta, GA 30332-0430
UUCP: ...!gatech!gtss!chas                  INTERNET:  chas@gtss.gatech.edu
Technical Details
Message-ID: <393@gtss.gatech.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!ukma!gatech!gtss!chas
References: <8903111954.AA04828@jade.berkeley.edu> <15802@oberon.USC.EDU> <970@sas.UUCP> <6300@cbmvax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!ukma!gatech!gtss!chas
From: chas@gtss.gatech.edu (Charles Cleveland)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Prototypes & the default promotions (was about the new RKM stuff..
Keywords: C calling conventions
Message-ID: <393@gtss.gatech.edu>
Date: 16 Mar 89 15:14:25 GMT
References: <8903111954.AA04828@jade.berkeley.edu> <15802@oberon.USC.EDU> <970@sas.UUCP> <6300@cbmvax.UUCP>
Reply-To: chas@gtss.UUCP (Charles Cleveland)
Organization: Georgia Tech School of Physics
Lines: 27