gEDA-dev: [RFC] Headers for private libgeda functions

Steve Meier smeier at alchemyresearch.com
Tue Nov 27 11:13:47 EST 2007


The libgeda traditional method has been to have everything with the
prototypes header file.

I resolved the issue by splitting up prototypes into a header file for
each module.

Thus having a o_basic.h, s_page.h etc.

For building the library, I put references to each of the module header
files into prototypes.h   for building applications I created a
libakeda.h which only includes references to header files that I think
should be public.

In my opinion, a module header file should have no function prototypes
which are not to be used outside the module.  


Steve Meier


On Tue, 2007-11-27 at 15:04 +0000, Peter TB Brett wrote:
> Hi folks,
> 
> I was thinking of adding a couple of utility functions to libgeda to reduce 
> code duplication, but they wouldn't be suitable for being part of the actual 
> API for user programs.
> 
> Where should I put the header file(s) declaring these functions?  Declaring 
> the functions in the headers installed to include_dir seems like the Wrong 
> Thing, if we don't want them to be used by external code.  The normal thing 
> would be to put them in the src directory with the C files.
> 
> On the same vein, there are a number of functions which libgeda currently 
> exports that should be private, and I'd like to move them out of the public 
> headers as the first stage of rationalising the API a little...
> 
> Regards,
> 
>                                      Peter
> 
> 
> _______________________________________________
> geda-dev mailing list
> geda-dev at moria.seul.org
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev



More information about the geda-dev mailing list