Make RECT === RECTL, fix compile warnings, use uniform format

Dan Kegel dank at kegel.com
Tue Dec 31 02:03:11 CST 2002


Dimitrie O. Paun wrote:
> On December 29, 2002 04:10 pm, Dan Kegel wrote:
> 
>>(BTW it might worth looking into a change to debugrect() to get
>>its storage on the stack, in a local variable of the TRACE() macro.
>>That'd avoid possible thread clashes (if you have too many threads,
>>the current way debugrect() gets storage might break...))
> 
> 
> Yes, in theory the current implementation has that problem, but
> in practice is OK. And besides, it's for debugging only. But how
> can you get that local var without changing the current interface?

You could do something cheezy like
--- debug.h     2002-07-05 14:22:09.000000000 -0700
+++ debug.h.new 2002-12-31 00:01:33.000000000 -0800
@@ -80,6 +80,8 @@

  #define __WINE_DPRINTF(dbcl,dbch) \
    do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
+          char __wine_dprintf_buf[2048]; \
+          char *__wine_dprintf_ptr = __wine_dprintf_buf; \
         const char * const __dbch = (dbch); \
         const enum __WINE_DEBUG_CLASS __dbcl = __WINE_DBCL##dbcl; \
         __WINE_DBG_LOG
@@ -87,6 +89,8 @@
  #define __WINE_DBG_LOG(...) \
     wine_dbg_log( __dbcl, __dbch, __func__, __VA_ARGS__); } } while(0)

+#define debugrect(r) __debugrect((r), &__wine_dprintf_ptr)
+
  #define __WINE_PRINTF_ATTR(fmt,args)

  #else  /* !__GNUC__ && !__SUNPRO_C */

BTW debugrect() isn't a great name... can't think of a snappy replacement offhand, though.
- Dan

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




More information about the wine-devel mailing list