~ubuntu-branches/ubuntu/quantal/groundhog/quantal

« back to all changes in this revision

Viewing changes to debian/patches/game.cc.patch

  • Committer: Bazaar Package Importer
  • Author(s): Ying-Chun Liu (PaulLiu)
  • Date: 2008-03-18 00:14:15 UTC
  • Revision ID: james.westby@ubuntu.com-20080318001415-5wjp523bg83wekds
Tags: 1.4-9
* New maintainer (Closes: Bug#465949)
* Use Homepage: instead of the pseudo-header in long description
* Add debian/compat to 4
* Use quilt to handle patches
* Bump Standard Version to 3.7.3
* Remove empty directories in debian/dirs
* Use autoconf/automake to generate configure
* Include Swedish translation sv.po (Closes: Bug#346520)
* Refine debian/copyright file
* Only use --build on configure in debian/rules when host type is same
* Remove unnecessary dh_* and comments in debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: groundhog-1.4/src/game.cc
 
2
===================================================================
 
3
--- groundhog-1.4.orig/src/game.cc      2008-03-09 23:38:42.000000000 +0800
 
4
+++ groundhog-1.4/src/game.cc   2008-03-09 23:42:58.000000000 +0800
 
5
@@ -18,10 +18,16 @@
 
6
 
 
7
 #include <config.h>
 
8
 
 
9
-#include <strstream.h>
 
10
+#include <iostream>
 
11
+#include <sstream>
 
12
+#include <string>
 
13
+
 
14
+#include <cstdlib>
 
15
 #include <time.h>
 
16
 #include <unistd.h>
 
17
 
 
18
+using namespace std;
 
19
+
 
20
 #include "about_dialog.h"
 
21
 #include "ball.h"
 
22
 #include "game.h"
 
23
@@ -193,21 +199,23 @@
 
24
 void
 
25
 Game::DisplayMoves()
 
26
 {
 
27
-   char info[128];
 
28
-   ostrstream ost(info, sizeof(info));
 
29
+   string info;
 
30
+   ostringstream ost;
 
31
 
 
32
    ost << _("Moves: ") << _nr_of_moves << std::ends;
 
33
-   gtk_label_set(GTK_LABEL(_moves), info);
 
34
+   info = ost.str();
 
35
+   gtk_label_set(GTK_LABEL(_moves), info.c_str());
 
36
 }
 
37
 
 
38
 void
 
39
 Game::DisplayTime()
 
40
 {
 
41
-   char info[128];
 
42
-   ostrstream ost(info, sizeof(info));
 
43
+   string info;
 
44
+   ostringstream ost;
 
45
 
 
46
    ost << _("Time: ") << _seconds << std::ends;
 
47
-   gtk_label_set(GTK_LABEL(_time), info);
 
48
+   info = ost.str();
 
49
+   gtk_label_set(GTK_LABEL(_time), info.c_str());
 
50
 }
 
51
 
 
52
 void