Header files


To ng-spice <ng-spice@ieee.ing.uniroma1.it>
From Manu Rouat <emmanuel.rouat@wanadoo.fr>
Date Thu, 02 Sep 1999 11:29:10 +0200
Delivered-To mailing list ng-spice@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-help@ieee.ing.uniroma1.it; run by ezmlm
Organization la Guilde
Reply-To ng-spice@ieee.ing.uniroma1.it
Sender rouat@war.wanadoo.com


OK,

after a bit of thinking I suggest the following:

all .c files should have a corresponding .h file where all function
prototypes go. All the header files should be idempotent, that is, they
can all be #included several time ,using the classic:

#ifndef BJTDISTO_H_INCLUDED
#define BJTDISTO_H_INCLUDED

(put the stuff here)


#endif

At the top level, the file ngspice.h includes all of those.
The only problem we can have is that there are several functions with
the same name - if so, we'll have to deal with them.


Another possibility would be :
all .c files should have a corresponding .h file where all function
prototypes go. All the header files should be idempotent .
In a given directory (for instance fte) we also define a fteext.h where
we put all function prototypes that are used externally (by .c files outside
of that directory) - for style, we can declare those prototypes as 'extern'.

The top ngspice.h file will then #include those xxxext.h files.

What do you think?

manu

-- 
"In the Beginning was the Word - then came the fucking word processor.
Then came the thought processor, then came the Death of literature.
And so it goes."  The Poet - Hyperion


Partial thread listing: