Bug#284525: aisleriot: signed numbers (game#) printed unsigned

Karl Chen Karl Chen <quarl+keyword+debbugs.533ecf@nospam.quarl.org>, 284525@bugs.debian.org
Mon, 06 Dec 2004 15:31:59 -0800


This is a multi-part MIME message sent by reportbug.

--===============1662690725==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: gnome-games
Version: 1:2.8.1-2
Severity: normal
Tags: patch


Game numbers should be printed unsigned (printf "%u" instead of printf "%d").

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-quack+20041128+quack.cs.berkeley.edu
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages gnome-games depends on:
ii  gnome-games-data          1:2.8.1-2      data files for the GNOME games
ii  guile-1.6-libs            1.6.4-4        Main Guile libraries
ii  libart-2.0-2              2.3.16-6       Library of functions for 2D graphi
ii  libatk1.0-0               1.8.0-3        The ATK accessibility toolkit
ii  libaudiofile0             0.2.6-4        Open-source version of SGI's audio
ii  libbonobo2-0              2.8.0-3        Bonobo CORBA interfaces library
ii  libbonoboui2-0            2.8.0-2        The Bonobo UI library
ii  libbz2-1.0                1.0.2-2        high-quality block-sorting file co
ii  libc6                     2.3.2.ds1-18   GNU C Library: Shared libraries an
ii  libcroco3                 0.6.0-2        a generic Cascading Style Sheet (C
ii  libesd0                   0.2.35-2       Enlightened Sound Daemon - Shared 
ii  libgcc1                   1:3.4.3-1      GCC support library
ii  libgconf2-4               2.8.1-4        GNOME configuration database syste
ii  libgcrypt11               1.2.0-10       LGPL Crypto library - runtime libr
ii  libglade2-0               1:2.4.0-1      Library to load .glade files at ru
ii  libglib2.0-0              2.4.7-1        The GLib library of C routines
ii  libgnome-keyring0         0.4.0-2        GNOME keyring services library
ii  libgnome2-0               2.8.0-5        The GNOME 2 library - runtime file
ii  libgnomecanvas2-0         2.8.0-1        A powerful object-oriented display
ii  libgnomeui-0              2.8.0-3        The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0            2.8.3-2        The GNOME virtual file-system libr
ii  libgnutls11               1.0.16-12      GNU TLS library - runtime library
ii  libgpg-error0             1.0-1          library for common error values an
ii  libgsf-1                  1.11.0-1       Structured File Library - runtime 
ii  libgtk2.0-0               2.4.13-1       The GTK+ graphical user interface 
ii  libguile-ltdl-1           1.6.4-4        Guile's patched version of libtool
ii  libice6                   4.3.0.dfsg.1-8 Inter-Client Exchange library
ii  libjpeg62                 6b-9           The Independent JPEG Group's JPEG 
ii  liborbit2                 1:2.10.2-1.1   libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0             1.6.0-3        Layout and rendering of internatio
ii  libpopt0                  1.7-5          lib for parsing cmdline parameters
ii  libqthreads-12            1.6.4-4        QuickThreads library for Guile
ii  librsvg2-2                2.8.1-1        SAX-based renderer library for SVG
ii  libsm6                    4.3.0.dfsg.1-8 X Window System Session Management
ii  libstdc++5                1:3.3.5-2      The GNU Standard C++ Library v3
ii  libtasn1-2                0.2.10-4       Manage ASN.1 structures (runtime)
ii  libx11-6                  4.3.0.dfsg.1-8 X Window System protocol client li
ii  libxml2                   2.6.11-5       GNOME XML library
ii  xlibs                     4.3.0.dfsg.1-8 X Window System client libraries m
ii  zlib1g                    1:1.2.2-3      compression library - runtime

-- no debconf information

--===============1662690725==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="d"

Only in aisleriot: .backup
diff -u -wur aisleriot/dialog.c ../../gnome-games-b/gnome-games-2.8.1/aisleriot/dialog.c
--- aisleriot/dialog.c	2004-12-06 15:18:02.000000000 -0800
+++ ../../gnome-games-b/gnome-games-2.8.1/aisleriot/dialog.c	2004-10-07 01:52:23.000000000 -0700
@@ -247,7 +247,7 @@
       gtk_tree_selection_select_iter (select, &selected_iter);
   }
 
-  g_snprintf (buf, sizeof (buf), "%u", seed);
+  g_snprintf (buf, sizeof (buf), "%d", seed);
   gtk_entry_set_text (GTK_ENTRY (seed_entry), buf);
 
   listp = &list;
diff -u -wur aisleriot/sol.c ../../gnome-games-b/gnome-games-2.8.1/aisleriot/sol.c
--- aisleriot/sol.c	2004-12-06 15:18:00.000000000 -0800
+++ ../../gnome-games-b/gnome-games-2.8.1/aisleriot/sol.c	2004-08-23 00:24:57.000000000 -0700
@@ -134,7 +134,7 @@
 {
   char *title;
 
-  title = g_strdup_printf (_("AisleRiot: %s (%u)"), game_name, seed);
+  title = g_strdup_printf (_("AisleRiot: %s (%d)"), game_name, seed);
 
   gtk_window_set_title (GTK_WINDOW (app), title);
 
diff -u -wur aisleriot/statistics.c ../../gnome-games-b/gnome-games-2.8.1/aisleriot/statistics.c
--- aisleriot/statistics.c	2004-12-06 15:18:00.000000000 -0800
+++ ../../gnome-games-b/gnome-games-2.8.1/aisleriot/statistics.c	2004-01-25 02:39:59.000000000 -0800
@@ -76,11 +76,11 @@
   if (!statistics_dialog)
     return;
 
-  text = g_strdup_printf ("%u", current_stats->wins);
+  text = g_strdup_printf ("%d", current_stats->wins);
   gtk_label_set_text (GTK_LABEL (wins_label), text);
   g_free (text);
 
-  text = g_strdup_printf ("%u", current_stats->total);
+  text = g_strdup_printf ("%d", current_stats->total);
   gtk_label_set_text (GTK_LABEL (total_label), text);
   g_free (text);
 
@@ -96,7 +96,7 @@
 
   if (current_stats->best != 0) {
     /* Translators: this represents minutes:seconds. */
-    text = g_strdup_printf (_("%u:%02d"), current_stats->best / 60,
+    text = g_strdup_printf (_("%d:%02d"), current_stats->best / 60,
 			    current_stats->best % 60);
     gtk_label_set_text (GTK_LABEL (best_label), text);
     g_free (text);
@@ -105,7 +105,7 @@
 
   if (current_stats->worst != 0) {
     /* Translators: this represents minutes:seconds. */
-    text = g_strdup_printf (_("%u:%02d"), current_stats->worst / 60,
+    text = g_strdup_printf (_("%d:%02d"), current_stats->worst / 60,
 			    current_stats->worst % 60);
     gtk_label_set_text (GTK_LABEL (worst_label), text);
     g_free (text);
@@ -134,13 +134,13 @@
 {
   /* Everything is pushed onto the list in reverse order. */
   stats_list = g_slist_prepend (stats_list,
-				g_strdup_printf ("%u",entry->worst));
+				g_strdup_printf ("%d",entry->worst));
   stats_list = g_slist_prepend (stats_list,
-				g_strdup_printf ("%u",entry->best));
+				g_strdup_printf ("%d",entry->best));
   stats_list = g_slist_prepend (stats_list,
-				g_strdup_printf ("%u",entry->total));
+				g_strdup_printf ("%d",entry->total));
   stats_list = g_slist_prepend (stats_list,
-				g_strdup_printf ("%u",entry->wins));
+				g_strdup_printf ("%d",entry->wins));
   stats_list = g_slist_prepend (stats_list, g_strdup (name));
 }
 

--===============1662690725==--