Re: [ng-spice] Main headers


To ng-spice@ieee.ing.uniroma1.it
From Manu Rouat <emmanuel.rouat@wanadoo.fr>
Date Thu, 09 Sep 1999 22:30:26 +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
References <37D6CF28.B57F4F4C@wanadoo.fr > <19990909011413.C23398@cgmd83085.chello.nl >
Reply-To ng-spice@ieee.ing.uniroma1.it
Sender rouat@war.wanadoo.com

Arno wrote:

> It is a good first step.  If you can, please add the full prototype
> for the function pointers in DISPDEVICE in struct.h.
OK

> 
> Also, can we standardize on the BSD coding style?  That is, four
> spaces indents etc.  As most of the source already uses this style I
> prefer we keep it also for new files that get added.

yes I'm in favour of that.

> 
> As a more comprehensive approach to the header files I propose the
> following.  I would like to see the header files separated from the
> source files.  They define the API the rest of the program will use
> and are less subject to change once a good API is in place.  The
> directory structure for the include files should mirror the structure
> the libraries have now.


No - I think the following is better:

move all files of src/bin (main.c etc) into src , same for the headers 
of src/include (assuming these are ngspice.h, struct.h macros.h and defines.h)

==> you get exactly the same structure that you described, except that header
files and source files are in the same directories. Using "" or <> for 
inclusion
is equivalent too in that case. I don't think duplicating 
the tree structure just for the headers is a good idea.

In fact, pushing the idea a bit further : we could also move all directories
in src/lib into src - we would the get in src:

ngspice.h
macros.h etc
main.c
multidec.c  
proc2mod.c  
tune.c   <== BTW this one should get busted
etc

ckt/
cp/
dev/
fte/
hlp/
inp/
mfb/
misc/
ni/
sparse/


What do you think?

Now another question is: should we make one header files for each directory
(like ckt.h in src/lib/ckt) or one header file per source file (like in 
src/lib/fte) ? I'm more in favour for one file, makes less files to carry 
around .

Also don't bother about the -I flags , it's all taken care of by automake
anyway.

manu


Partial thread listing: