> On Sun, 24 Jun 2012 at 12:34:54 +0200, Rodolfo García Peñas wrote:
>>
>> For this reason, I think we need "a plan":
>>
>> 1. Remove the prototypes and structs,... included in Windowmaker.h and
>> funcs.h to the correct file. For example:
>>
>> void Exit(int status) __attribute__((noreturn));
>> void Restart(char *manager, Bool abortOnFailure);
>> void SetupEnvironment(WScreen *scr);
>> void ExecuteShellCommand(WScreen *scr, char *command);
>> Bool RelaunchWindow(WWindow *wwin);
>> void wAbort(Bool dumpCore);
>> void ExecExitScript(void);
>>
>> should be included in "main.h".
>>
>> In this step, we should avoid add includes in the header files, because
>> all the includes are in Windowmaker.h, but we must not add more includes
>> in Windowmaker.h or funcs.h.
>
> I'm not sure I understand this step about not adding includes in header
> files.

I am trying to say that we should not add more includes in the .h files
(yes in .c files if needed), to avoid include recursion, and we must not
add nothing in Windowmaker.h nor funcs.h (because we are cleaning them,
and because when we add something to these 2 files, we are adding it to
all the files, because these files are included widely).

>> Of course, for this step we must include the correct file header in the
>> files that need it. We should try to remove the "include funcs.h" if is
>> possible.
>>
>> 2. At this point, funcs.h should be empty, or hold really the shared
>> stuff. The same with Windowmaker.h. Now, we should try to remove
>> Windowmaker.h and funcs.h from the files, adding the needed includes in
>> the .c files or .h files.
>>
>> I will send an example for main.h.
>>
>> Comments are welcome.
>
> I agree with the overall plan, and with having a 1:1 mapping between
> .c and .h files such that the #include's are not so messy.

perfect :-)

> --
> To unsubscribe, send mail to [email protected].
>


-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)


--
To unsubscribe, send mail to [email protected].

Reply via email to