🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.amiga.tech
3 messages
3 total messages Started by Jun Lee Wed, 12 Dec 1990 16:03
functions.h
#7409
Author: Jun Lee
Date: Wed, 12 Dec 1990 16:03
12 lines
795 bytes
Hi.

Can anyone tell me what is contained in <function.h?  I take it this is
a Aztec C thing and I was wondering what would be a comparable include
file on a Lattice 5.1.  

Thanks,
-- 
AMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIGAMIG
  J  @@		jol@sei.cmu.edu					    //	
  U  \/		(412) 268-7602		 	        	\\ //
  N  LEE  	SEI, Carnegie Mellon University	         	 \X/ 
Re: functions.h
#7532
Author: Kristian Nielsen
Date: Mon, 17 Dec 1990 14:40
41 lines
2298 bytes
jol@sei.cmu.edu (Jun Lee) writes:

>Hi.

>Can anyone tell me what is contained in <function.h?  I take it this is
>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 <proto/all.h>. 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 <proto/intuition.h>

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!
Re: functions.h
#7738
Author: Daniel Martin
Date: Mon, 31 Dec 1990 19:38
50 lines
2814 bytes
In article <1990Dec17.144036.4219@diku.dk> bombadil@diku.dk (Kristian Nielsen) writes:
>jol@sei.cmu.edu (Jun Lee) writes:
>>Hi.
>>Can anyone tell me what is contained in <function.h?  I take it this is
>>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 <proto/all.h>. It contains function
>definitions with type checking as provided in ANSI-C, and also saves you
>some typecasts.
...
>  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.

   <functions.h> is a general include file defining globals and return
values of functions for the Aztec Compiler.  With the 2.0 includes, the
functions.h contains among other things the clib/all_protos.h  and
pragma/all_lib.h wich are equivalent to Lattice proto/all.h and pragma
definitions.


>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 <proto/intuition.h>

   You can restrict includes with all versions (3.6 and up) of MANX Aztec C.
I wonder wich C compiler woudn't allow restrictions.

>Of course, if you don't mind about compile times, it is more comfortable
>just to include the entire set.

   Or you just make a big precompiled header file, put it in ram, and use
it when compiling.  Mines 300k, and the compile times are reasonnably fast
(EASILY under 30 sec. to compile AND link a 1000 lines source code, and
around 3.5 sec. to compile AND link an "Hello World" program, on a 
A3000/25MHz/10Meg RAM.).

>Kristian Nielsen
   Daniel.

Disclaimer: I'm only a satisfied user of MANX Aztec C compiler since 87.
            Now if only I could put my hand on a good C++...

--
    // Daniel Martin                            Universite de Montreal   \\
   //  MediaLab, ca vous regarde!               C.P. 6128, Succursale A,  \\
\\//   Mail: martin@IRO.UMontreal.CA            Montreal (Quebec), CANADA, \\//
 \/    Tel.: (514) 343-6111 poste 3494          H3C 3J7                     \/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads