[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot/game coord.cpp history.cpp player.cpp rou... [multibyt
From: |
eliot-dev |
Subject: |
[Eliot-dev] eliot/game coord.cpp history.cpp player.cpp rou... [multibyte] |
Date: |
Wed, 28 Dec 2005 18:07:53 +0000 |
CVSROOT: /sources/eliot
Module name: eliot
Branch: multibyte
Changes by: Olivier Teulière <address@hidden> 05/12/28 18:07:53
Modified files:
game : coord.cpp history.cpp player.cpp round.cpp
Log message:
swprintf doesn't have the same prototype in the mingw32 headers as on
linux!
Use #ifdef WIN32 for now.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/coord.cpp.diff?only_with_tag=multibyte&tr1=1.7.2.1&tr2=1.7.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/history.cpp.diff?only_with_tag=multibyte&tr1=1.8.2.1&tr2=1.8.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/player.cpp.diff?only_with_tag=multibyte&tr1=1.12.2.1&tr2=1.12.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/eliot/eliot/game/round.cpp.diff?only_with_tag=multibyte&tr1=1.8.2.1&tr2=1.8.2.2&r1=text&r2=text
Patches:
Index: eliot/game/coord.cpp
diff -u eliot/game/coord.cpp:1.7.2.1 eliot/game/coord.cpp:1.7.2.2
--- eliot/game/coord.cpp:1.7.2.1 Wed Dec 28 16:47:35 2005
+++ eliot/game/coord.cpp Wed Dec 28 18:07:53 2005
@@ -98,7 +98,11 @@
wstring res;
wchar_t s[5];
+#ifdef WIN32
+ swprintf(s, L"%d", m_col);
+#else
swprintf(s, 4, L"%d", m_col);
+#endif
if (getDir() == HORIZONTAL)
{
res = wstring(1, m_row + 'A' - 1) + s;
Index: eliot/game/history.cpp
diff -u eliot/game/history.cpp:1.8.2.1 eliot/game/history.cpp:1.8.2.2
--- eliot/game/history.cpp:1.8.2.1 Wed Dec 28 16:47:35 2005
+++ eliot/game/history.cpp Wed Dec 28 18:07:53 2005
@@ -159,7 +159,11 @@
wstring rs;
#ifdef DEBUG
wchar_t buff[5];
- swprintf(buff, 4, L"%4ld", m_history.size());
+#ifdef WIN32
+ swprintf(buff, L"%ld", m_history.size());
+#else
+ swprintf(buff, 4, L"%ld", m_history.size());
+#endif
rs = L"history size = " + wstring(buff) + L"\n\n";
#endif
for (unsigned int i = 0; i < m_history.size(); i++)
Index: eliot/game/player.cpp
diff -u eliot/game/player.cpp:1.12.2.1 eliot/game/player.cpp:1.12.2.2
--- eliot/game/player.cpp:1.12.2.1 Wed Dec 28 16:47:35 2005
+++ eliot/game/player.cpp Wed Dec 28 18:07:53 2005
@@ -81,10 +81,18 @@
wstring res;
wchar_t buff[6];
- swprintf(buff, 5, L"Player %5d\n", m_id);
+#ifdef WIN32
+ swprintf(buff, L"Player %d\n", m_id);
+#else
+ swprintf(buff, 5, L"Player %d\n", m_id);
+#endif
res = wstring(buff);
res += m_history.toString() + L"\n";
- swprintf(buff, 5, L"score %5d\n", m_score);
+#ifdef WIN32
+ swprintf(buff, L"score %d\n", m_score);
+#else
+ swprintf(buff, 5, L"score %d\n", m_score);
+#endif
res += wstring(buff);
return res;
}
Index: eliot/game/round.cpp
diff -u eliot/game/round.cpp:1.8.2.1 eliot/game/round.cpp:1.8.2.2
--- eliot/game/round.cpp:1.8.2.1 Wed Dec 28 16:47:35 2005
+++ eliot/game/round.cpp Wed Dec 28 18:07:53 2005
@@ -168,7 +168,11 @@
rs += wstring(16 - getWord().size(), ' ');
rs += getBonus() ? L'*' : L' ';
wchar_t buff[5];
- swprintf(buff, 4, L"%4d", getPoints());
+#ifdef WIN32
+ swprintf(buff, L"%d", getPoints());
+#else
+ swprintf(buff, 4, L"%d", getPoints());
+#endif
rs += buff;
rs += L" " + getCoord().toString();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot/game coord.cpp history.cpp player.cpp rou... [multibyte],
eliot-dev <=