HEADS-UP: New trace message handling in libwww ready for commit (was Tracing)

THIS HAS NOT YET BEEN COMMITTED!

IF NOBODY STRONGLY OBJECTS THEN I WILL COMMIT THIS BY MONDAY NIGHT, ET.

Eric and I have been playing with various ways of improving the trace 
mechanisms in libwww so that

1) the messages could be left out of stripped compilations
2) we didn't have to use many different macros depending on the number of 
arguments.

Eric proposed a new scheme which works very nicely. It uses a single macro 
for handling all traces and works as follows:

a) When libwww is compiled with DEBUG turned on (the default) then it is 
defined as the old HTTrace message.
b) When libwww is compiled with NDEBUG then it is defined as empty

It deals with arguments in a smart manner - all "," are replaced with a "_" 
when the macro is called and the C preprocessor then does the substitution 
back again when compiling.

This saves a substantial amount of space in the binaries - for example, the 
"tiny" sample app was reduced by almost 20%.

Of course, the downside is that the diffs are very big and spread out on 
every file. For that reason, I have added a CVS tag called

	Before-New-Trace-Messages

to the whole distribution.

If you want to wait getting the trace diffs into 
your code then you can check out any version prior to the cvs tag as follows:

	cvs -d :pserver:anonymous@dev.w3.org:/sources/public -z3 -r Before-New-Trace-Messages checkout libwww

For more description of this CVS feature, see

	http://www.w3.org/Library/cvs.html#Anonymous

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Saturday, 20 February 1999 18:59:45 UTC