Dimitrie O. Paun wrote:
On December 27, 2002 01:29 pm, Dan Kegel wrote:

I think this patch touches every single TRACE
statement that prints out a RECT.  Many different
formats are used... might be nice to standardize them
sometime.  ...
Now that you've identified all these places, it seems to me
the perfect oportunity to standardise them. At the very least,
we should convert them all to a common format (say (x0,y0)-(x1,y1),
or anything you fancy) so we can more easily grep/sed for them
later. But I'd certainly prefer the debugrect() approach, provided
Alexandre accepts it.
Note that some of these print out the corners,
but others output one corner plus width and height.
Will anyond mind terribly if we always just print out the corners?

I think I'll start off by switching to the common format
you suggest, and using just one macro to deal with arguments.
e.g.
RECT stuff[20];
...
TRACE("the 6th rect is (%ld,%ld)-(%ld,%ld)\n", RECT_LTRB(stuff+5));

That will make it trivial to switch to the debugrect() approach
later, which as someone pointed out involves a bit more infrastructure
work (because of the buffer it has to allocate). All we'll need is
find . -name *.c | xargs perl -p -i.bak -e 's/(%ld,%ld)-(%ld,%ld)/%s/g' -e 's/RECT_LTRB/debugrect/g'

Ok, off to do a little patch munging... I can resubmit the patch
this weekend if I'm lucky.
- Dan

--
Dan Kegel
Linux User #78045
http://www.kegel.com


Reply via email to