On 03/09/2010 05:24 PM, Dhaval Giani wrote:
> On Tue, Mar 09, 2010 at 02:10:44PM +0100, Jan Safranek wrote:
>> Split the big header file to smaller ones. The ultimate goal behind this is
>> to document each macro/enum/struct/function with doxygen comments and
>> having all of them in one file would lead to really huge one.
>>
>> I tried to distribute functions to groups with similar functionality.This
>> structure is also base of future doxygen documentation - I'd like
>> to have one page for each include file. E.g. there would be 'Iterators' page,
>> with some overview and maybe examples how to use our iterator handles + list 
>> of
>> all iterator functions with their description. Dtto for all other files - so 
>> the
>> functions in a header file should be composed in some 'natural' and
>> 'reader-friendly' way.
>>
>> libcgroup.h
>>    - does not declare anything, it just includes all the other files. In
>>      future, it might contain base of doxygen documentation (some
>>      introduction etc.)
>>
>> libcgroup/base.h
>>    - global macros and types, included by all other headers. Maybe it would 
>> be
>>      good idea to have this file without function declarations?
>>
>
> Sounds good in general. I like the idea of splitting the file further.
> How painful is that? Would it be possible to split and see how that
> looks before taking a call on it?

Splitting is easy, the function prototypes do not depend on each other, 
so if you keep macros and structures in base.h, you can split the rest 
as you want. It's simple copy-paste. And you could move some stuff from 
base.h somewhere else, if you are careful.

...

>> There is no automake/autoconf stuff in this patch, I'll make sure these new
>> files gets distributed and installed if we agree on content of the files.
>> Still, current version should be fully compilable.
>>
>
> OK. I am guessing you have compiled it once at least. I will try to give
> it a run when I have a bit more free time on hand.

Yes, it compiles and runs, only the Makefile rules are missing, i.e. 
sources won't get recompiled if you change the headers (make clean is 
your friend) and the headers are not installed on make install.

...

>> +enum cgroup_errors {
>
> just enum {. Let's drop the cgroup_errors while we are doing this split?
>

I'd suggest to have separate patch for this, I don't want to mix 
copy-paste header shuffle with any other changes.


Jan

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to