On Dec 8, 2013, at 12:24 PM, Tom Browder wrote:

> While working the issue I've discovered several *,[ch] files with
> common extern sp_hook func decls that I believe should be in separate
> *.h files for ease of maintenance (c.f., set.c, mged.h).  Thoughts?
> (I certainly won't try to do anything with that until the func sig
> work is  done).

If they're shared across multiple file, then yes -- putting their declaration 
into a private header is good practice.  If you create a new private header 
(i.e., one not in the include/ directory), be sure to include it with #include 
"./header.h" noting the ./ to distinguish it from the other public interface 
headers.  If you're working in a library, there may already a private header 
file somewhere you can just add to.

Note that some externs don't actually span multiple files and are unnecessary.  
They can even be made static and resorted to avoid the need for a forward 
declaration altogether.

Cheers!
Sean


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to