On Thu, Jul 06, 2006 at 04:22:28PM +0100, seventh guardian wrote: > On 7/6/06, Dominik Vogt <[EMAIL PROTECTED]> wrote: > >On Wed, Jul 05, 2006 at 02:35:10PM +0100, seventh guardian wrote: > >> On 7/5/06, seventh guardian <[EMAIL PROTECTED]> wrote: > >> >Hi. > >> > > >> >I have found FVWM_DEBUG_MSGS and DEBUG ifdef's all over the code (as > >> >expected). But it seems to me they are allways used at the same time, > >> >one defining the other, and thus replaceable just by one of them. Is > >> >this true or do they have distinct purposes? > >> > > >> >This supports my theory (from fvwmsignal.c): > >> > > >> >(...) > >> >#ifdef FVWM_DEBUG_MSGS > >> >volatile sig_atomic_t debug_term_signal = 0; > >> >#endif > >> >(...) > >> >#ifdef DEBUG > >> > debug_term_signal = sig; > >> >#endif > >> >(...) > >> > > >> >So if FVWM_DEBUG_MSGS is not defined then we have an error. But for > >> >instance FVWM_DEBUG_MSGS is defined by #ifdef DEBUG on FvwmPager, so.. > >> > > >> >If they are used for the same purpose, then I'll clean the code up to > >> >just use DEBUG. > >> > > >> > >> After a bit of dig up, I realised that FVWM_DEBUG_MSGS is the true > >> fvwm debug var (it is defined conditionally on config.h by > >> ./configure). > >> > >> Some modules link to libfvwm.a, which should be already compiled (at > >> least after the first module requiring it). The question is, DEBUG is > >> only defined in the modules, which means that libfvwm.c is never > >> compiled with debug support (see the code snipet on the first mail). > >> > >> Can this be confirmed or am I crazy? :) > > > >Actually, there is no plan or design behind all the debug code. > >It just appeared independently in the places where it was needed > >at the given time. Nowadays nobody can tell between usefull debug > >code and stuff that is not needed anymore. The only useful module > >debug code I am aware of is in the FvwmAuto module. > > > > Hum so what's the wise step? I'm thinking of doing a clean up, but I'm > not sure on wich policy to follow..
I think you're taking the right path by creating small individual patches that remove some of the debug code. I'll comment on your first patch in that thread. Ciao Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED]
signature.asc
Description: Digital signature