Source: cwidget Version: 0.5.17-7 Severity: normal Tags: patch upstream Hi,
Attaching patch from Ahmed Charles sent to the mailing list a while ago: https://alioth-lists-archive.debian.net/pipermail/cwidget-devel/2016-March/000251.html Thanks! -- Manuel A. Fernandez Montecelo <m...@debian.org>
>From c22b4342e679badad3448c6f2c76d47995042041 Mon Sep 17 00:00:00 2001 From: Ahmed Charles <achar...@outlook.com> Date: Thu, 24 Mar 2016 16:55:45 -0700 Subject: [PATCH] Use %p for pointers instead of %x. --- src/cwidget/widgets/table.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cwidget/widgets/table.cc b/src/cwidget/widgets/table.cc index 70962ba..f2e77d4 100644 --- a/src/cwidget/widgets/table.cc +++ b/src/cwidget/widgets/table.cc @@ -719,7 +719,7 @@ namespace cwidget vector<child_info *> sorted_children; #ifdef DEBUG_TABLES - fprintf(debug, "---------- Begin ideal width allocation for 0x%x (w=%d,h=%d) ----------\n", this, getmaxx(), getmaxy()); + fprintf(debug, "---------- Begin ideal width allocation for 0x%p (w=%d,h=%d) ----------\n", this, getmaxx(), getmaxy()); #endif for(vector<int>::iterator i=col_sizes.begin(); i!=col_sizes.end(); ++i) @@ -791,7 +791,7 @@ namespace cwidget } #ifdef DEBUG_TABLES - fprintf(debug, "Child at (%d,%d) requested %d columns\n", + fprintf(debug, "Child at (%d,%d) requested %d columns (current: %d)\n", (*i)->col_start, (*i)->row_start, (*i)->request_w, current_width); #endif } @@ -802,7 +802,7 @@ namespace cwidget fprintf(debug, " %d", col_sizes[i]); fprintf(debug, "\n"); - fprintf(debug, "---------------- end ideal allocation for 0x%x -----------------\n\n", this); + fprintf(debug, "---------------- end ideal allocation for 0x%p -----------------\n\n", this); #endif } @@ -833,7 +833,7 @@ namespace cwidget return; #ifdef DEBUG_TABLES - fprintf(debug, "**************** Expanding 0x%x (w=%d, h=%d) to %d columns ******************\n", this, getmaxx(), getmaxy(), target_w); + fprintf(debug, "**************** Expanding 0x%p (w=%d, h=%d) to %d columns ******************\n", this, getmaxx(), getmaxy(), target_w); #endif // Note that this is redundant with the previous algorithm. Merge? @@ -895,7 +895,7 @@ namespace cwidget fprintf(debug, " %d", col_sizes[i]); fprintf(debug, "\n"); - fprintf(debug, "********************* end expanding columns of 0x%x ********************\n\n", this); + fprintf(debug, "********************* end expanding columns of 0x%p ********************\n\n", this); #endif } @@ -921,7 +921,7 @@ namespace cwidget return; #ifdef DEBUG_TABLES - fprintf(debug, "++++++++++ Shrinking columns of 0x%x (w=%d, h=%d) to %d ++++++++\n", this, getmaxx(), getmaxy(), target_w); + fprintf(debug, "++++++++++ Shrinking columns of 0x%p (w=%d, h=%d) to %d ++++++++\n", this, getmaxx(), getmaxy(), target_w); #endif for(int i=0; i<num_cols; ++i) @@ -990,7 +990,7 @@ namespace cwidget fprintf(debug, " %d", col_sizes[i]); fprintf(debug, "\n"); - fprintf(debug, "++++++++++++++++++++++++ end shrinking 0x%x +++++++++++++++++++++\n\n", this); + fprintf(debug, "++++++++++++++++++++++++ end shrinking 0x%p +++++++++++++++++++++\n\n", this); #endif } @@ -1013,7 +1013,7 @@ namespace cwidget vector<child_info *> sorted_children; #ifdef DEBUG_TABLES - fprintf(debug, "---------- Begin ideal height allocation for 0x%x (w=%d,h=%d) ----------\n", this, getmaxx(), getmaxy()); + fprintf(debug, "---------- Begin ideal height allocation for 0x%p (w=%d,h=%d) ----------\n", this, getmaxx(), getmaxy()); #endif for(vector<int>::iterator i=row_sizes.begin(); i!=row_sizes.end(); ++i) @@ -1101,7 +1101,7 @@ namespace cwidget fprintf(debug, " %d", row_sizes[i]); fprintf(debug, "\n"); - fprintf(debug, "---------------- end ideal allocation for 0x%x -----------------\n\n", this); + fprintf(debug, "---------------- end ideal allocation for 0x%p -----------------\n\n", this); #endif } @@ -1132,7 +1132,7 @@ namespace cwidget return; #ifdef DEBUG_TABLES - fprintf(debug, "**************** Expanding 0x%x (w=%d, h=%d) to %d rows ******************\n", this, getmaxx(), getmaxy(), target_h); + fprintf(debug, "**************** Expanding 0x%p (w=%d, h=%d) to %d rows ******************\n", this, getmaxx(), getmaxy(), target_h); #endif // Note that this is redundant with the previous algorithm. Merge? @@ -1194,7 +1194,7 @@ namespace cwidget fprintf(debug, " %d", row_sizes[i]); fprintf(debug, "\n"); - fprintf(debug, "********************* end expanding rows of 0x%x ********************\n\n", this); + fprintf(debug, "********************* end expanding rows of 0x%p ********************\n\n", this); #endif } @@ -1220,7 +1220,7 @@ namespace cwidget return; #ifdef DEBUG_TABLES - fprintf(debug, "++++++++++ Shrinking rows of 0x%x (w=%d, h=%d) to %d ++++++++\n", this, getmaxx(), getmaxy(), target_h); + fprintf(debug, "++++++++++ Shrinking rows of 0x%p (w=%d, h=%d) to %d ++++++++\n", this, getmaxx(), getmaxy(), target_h); #endif for(int i=0; i<num_rows; ++i) @@ -1289,7 +1289,7 @@ namespace cwidget fprintf(debug, " %d", row_sizes[i]); fprintf(debug, "\n"); - fprintf(debug, "++++++++++++++++++++++++ end shrinking 0x%x +++++++++++++++++++++\n\n", this); + fprintf(debug, "++++++++++++++++++++++++ end shrinking 0x%p +++++++++++++++++++++\n\n", this); #endif } -- 2.8.0.rc3