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
>From c22b4342e679badad3448c6f2c76d47995042041 Mon Sep 17 00:00:00 2001
From: Ahmed Charles
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 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::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