Author: khornicek
Date: Wed Apr 16 22:47:40 2014
New Revision: 62761

URL: http://svn.reactos.org/svn/reactos?rev=62761&view=rev
Log:
[LIBWINE]
- bring back the old debug output format ie class:(file:line), Testman depends 
on this

Modified:
    trunk/reactos/include/reactos/wine/debug.h
    trunk/reactos/lib/3rdparty/libwine/debug.c

Modified: trunk/reactos/include/reactos/wine/debug.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/debug.h?rev=62761&r1=62760&r2=62761&view=diff
==============================================================================
--- trunk/reactos/include/reactos/wine/debug.h  [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/debug.h  [iso-8859-1] Wed Apr 16 
22:47:40 2014
@@ -91,7 +91,7 @@
        __WINE_DBG_LOG
 
 #define __WINE_DBG_LOG(args...) \
-    wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0)
+    ros_dbg_log( __dbcl, __dbch, __FILE__, __FUNCTION__, __LINE__, args); } } 
while(0)
 
 #define __WINE_PRINTF_ATTR(fmt,args) /*__attribute__((format 
(printf,fmt,args)))*/
 
@@ -137,7 +137,7 @@
 
 #define __WINE_DPRINTF(dbcl,dbch) \
     (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
-     (wine_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) 
? \
+     (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"",__LINE__,"") == -1)) ? \
      (void)0 : (void)wine_dbg_printf
 
 #define __WINE_PRINTF_ATTR(fmt, args)
@@ -152,7 +152,7 @@
     const char * (*dbgstr_wn)( const WCHAR *s, int n );
     int (*dbg_vprintf)( const char *format, va_list args );
     int (*dbg_vlog)( enum __wine_debug_class cls, struct __wine_debug_channel 
*channel,
-                     const char *function, const char *format, va_list args );
+                     const char *file, const char *function, const int line, 
const char *format, va_list args );
 };
 
 extern unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel 
*channel );
@@ -175,6 +175,9 @@
 extern int wine_dbg_printf( const char *format, ... ) __WINE_PRINTF_ATTR(1,2);
 extern int wine_dbg_log( enum __wine_debug_class cls, struct 
__wine_debug_channel *ch, const char *func,
                          const char *format, ... ) __WINE_PRINTF_ATTR(4,5);
+/* ReactOS compliant debug format */
+extern int ros_dbg_log( enum __wine_debug_class cls, struct 
__wine_debug_channel *ch, const char *file,
+                         const char *func, const int line, const char *format, 
... ) __WINE_PRINTF_ATTR(6,7);
 
 static __inline const char *wine_dbgstr_a( const char *s )
 {

Modified: trunk/reactos/lib/3rdparty/libwine/debug.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/debug.c?rev=62761&r1=62760&r2=62761&view=diff
==============================================================================
--- trunk/reactos/lib/3rdparty/libwine/debug.c  [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/libwine/debug.c  [iso-8859-1] Wed Apr 16 
22:47:40 2014
@@ -247,7 +247,23 @@
     if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
 
     va_start(valist, format);
-    ret = funcs.dbg_vlog( cls, channel, func, format, valist );
+    ret = funcs.dbg_vlog( cls, channel, NULL, func, 0, format, valist );
+    va_end(valist);
+    return ret;
+}
+
+
+/* ReactOS compliant debug format wrapper for funcs.dbg_vlog */
+int ros_dbg_log( enum __wine_debug_class cls, struct __wine_debug_channel 
*channel,
+                  const char *file, const char *func, const int line, const 
char *format, ... )
+{
+    int ret;
+    va_list valist;
+
+    if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
+
+    va_start(valist, format);
+    ret = funcs.dbg_vlog( cls, channel, file, func, line, format, valist );
     va_end(valist);
     return ret;
 }
@@ -396,12 +412,18 @@
 
 /* default implementation of wine_dbg_vlog */
 static int default_dbg_vlog( enum __wine_debug_class cls, struct 
__wine_debug_channel *channel,
-                             const char *func, const char *format, va_list 
args )
+                             const char *file, const char *func, const int 
line, const char *format, va_list args )
 {
     int ret = 0;
 
     if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
-        ret += wine_dbg_printf( "%s:%s:%s ", debug_classes[cls], 
channel->name, func );
+        ret += wine_dbg_printf( "%s:", debug_classes[cls] );
+
+       if (file && line)
+        ret += wine_dbg_printf ( "(%s:%d) ", file, line );
+    else
+        ret += wine_dbg_printf( "%s:%s: ", channel->name, func );
+
     if (format)
         ret += funcs.dbg_vprintf( format, args );
     return ret;


Reply via email to