Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!rpi!uupsi!sunic!dkuug!freja.diku.dk!bombadil From: bombadil@diku.dk (Kristian Nielsen) Newsgroups: comp.sys.amiga.tech Subject: Re: functions.h Message-ID: <1990Dec17.144036.4219@diku.dk> Date: 17 Dec 90 14:40:36 GMT References: <9871@fy.sei.cmu.edu> Organization: Department Of Computer Science, University Of Copenhagen Lines: 36 jol@sei.cmu.edu (Jun Lee) writes: >Hi. >Can anyone tell me what is contained in a Aztec C thing and I was wondering what would be a comparable include >file on a Lattice 5.1. The Lattice/SAS equivalent is . It contains function definitions with type checking as provided in ANSI-C, and also saves you some typecasts. A typical example of a source line from this include file would be void *OpenLibrary(char *,ULONG); or something similar. This tells the compiler that Openlibrary takes a string and an unsigned long integer as arguments, and returns a generic pointer (ie. struct IntuitionBase *, struct GfxBase * etc.). This way, it is not nessesary to do an explicit typecast, as in IntuitionBase = (struct IntuitionBase *)OpenLibrary(...). Also, should one forget the library version number, as in GfxBase = OpenLibrary("graphics.library"), the compiler will give you a warning (saves you some bug hunting!). As an added bonus, the Lattice include (I dunno about Aztec) also has (optional) #pragma - definitions, enabling the compiler to make more efficient system calls than is possible using the stubs in amiga.library. BTW, at least with Lattice, you needn't include the definitions for ALL the system calls, you can restrict you program to only include the parts of the system that you are using, by specifying, for example #include Of course, if you don't mind about compile times, it is more comfortable just to include the entire set. Kristian -- ========================================================================== Kristian Nielsen | /// Only the AMIGA Student at DIKU, University of Copenhagen | /// (Department of Computer Science) | \\\/// makes it possible!