From f0aaf60460e035757c1a211ab7109a7f2a064221 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Thu, 4 Aug 2016 19:11:50 +0000 Subject: [PATCH] [INCLUDE/WINE] Update test.h with debug functions for POINT and SIZE. svn path=/trunk/; revision=72109 --- reactos/sdk/include/reactos/wine/test.h | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/reactos/sdk/include/reactos/wine/test.h b/reactos/sdk/include/reactos/wine/test.h index 7ec400d78d3..3f3d5d6e2df 100644 --- a/reactos/sdk/include/reactos/wine/test.h +++ b/reactos/sdk/include/reactos/wine/test.h @@ -70,6 +70,8 @@ extern void winetest_wait_child_process( HANDLE process ); extern const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n ); extern const char *wine_dbgstr_guid( const GUID *guid ); +extern const char *wine_dbgstr_point( const POINT *guid ); +extern const char *wine_dbgstr_size( const SIZE *guid ); extern const char *wine_dbgstr_rect( const RECT *rect ); static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); } @@ -575,6 +577,36 @@ const char *wine_dbgstr_guid( const GUID *guid ) return res; } +const char *wine_dbgstr_point( const POINT *point ) +{ + char *res; + + if (!point) return "(null)"; + res = get_temp_buffer( 60 ); +#ifdef __ROS_LONG64__ + sprintf( res, "(%d,%d)", point->x, point->y ); +#else + sprintf( res, "(%ld,%ld)", point->x, point->y ); +#endif + release_temp_buffer( res, strlen(res) + 1 ); + return res; +} + +const char *wine_dbgstr_size( const SIZE *size ) +{ + char *res; + + if (!size) return "(null)"; + res = get_temp_buffer( 60 ); +#ifdef __ROS_LONG64__ + sprintf( res, "(%d,%d)", size->cx, size->cy ); +#else + sprintf( res, "(%ld,%ld)", size->cx, size->cy ); +#endif + release_temp_buffer( res, strlen(res) + 1 ); + return res; +} + const char *wine_dbgstr_rect( const RECT *rect ) { char *res; -- 2.17.1