Prototypes style question
    Dave Straker 
    daves at hpopd.HP.COM
       
    Sat Nov  3 03:21:16 AEST 1990
    
    
  
>I would like to ask what, if any, style standard exists for the 
>distribution of prototypes within header files for a large project.
>Should my project have a single "proto.h" which comprises all of the
>global (i.e., non-static) function prototypes or should separate
>headers exist?
>----------
I'd split it by functional area. Thus for the widget handling subsystem,
use widget.h to contain all interface items to that subsystem.
Then anyone calling to widget handling includes widget.h and calls away,
references widget global data (!) etc.
Within widget.h, organise data by sub-functional area, rather than 
all prototypes, all macros, etc. This will ease reading and splitting
the file (if it comes to that).
Dave Straker
Hewlett Packard - PWD divn
    
    
More information about the Comp.lang.c
mailing list