Hello,

thanks.

Just two questions about the debug feature.

1/ I noticed this:
uint32_t    g_dbg_mask = 0L;

What is this 0L? After some search, it seems to simply mean 0, is that
so? I thought this 'L' is probably linked to a long value because of
this in command.c:
csdiff = psdiff = bsdiff = 60000000L;   /* or, say, LONG_MAX */

So could you explain me the meaning of this L? Maybe this is obvious to
you, so I am sorry if my question looks stupid (I am not the most
experienced C developper). And this is difficult to search on the net
with just a single letter as a hint. ;-)

2/ I understood the functionning of the rxvt_msg function... but when
you activate the debug mode (and then make rxvt_dbgmsg = rxvt_msg), the
debug level is DBG_ERROR and the mask is apparently nul (if I understood
well 0L, cf 1/).

So with this test:
 /* print fatal/error message regardless of its category */
    if (level <= DBG_ERROR ||
   /* print message unless its category and level are defined */
   (g_dbg_level >= level && mask & g_dbg_mask))
I won't have much than fatal and error messages.

The question then is: if I want to get some other info, I need to change
both values but... is the only mean enabled in mrxvt to do this by
hard-setting the value in the code and then compile again each time you
need to see some other kind of message?

If there is a better way, could you tell which one? The better way I see
would be if -- when you are in debug mode -- you can choose at mrxvt's
launch what debug level and mask you want to be.
This could be either by some command line option for instance, or by
some environment variable.

For instance, if you run mrxvt with:
DEBUG_LEVEL=DEBUG DEBUG_MASK=ENCODING ./mrxvt
I will have all the DEBUG messages (or "worse") relative to encoding.
And then if after this you are interested in some other kind of message
or level, you can just restart mrxvt with other variables, instead of
having to recompiling.
This kind of behaviour would be really easy to add (I can do it if you
agree) and would avoid to compile and modify a variable in the code when
there is no necessity of it. But perhaps I missed something also in this
debugging system.

Anyway I will continue my investigations in your code now. :-)

Jehan

Gautam Iyer a écrit :
> On Thu, Dec 06, 2007 at 11:16:07AM +0100, jehan wrote:
> 
>> So give it to "hysseo".
> 
> Done. Happy hacking,
> 
> GI
> 

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Materm-devel mailing list
Materm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/materm-devel
mrxvt home page: http://materm.sourceforge.net

Reply via email to