eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot qt/board_widget.cpp utils/ncurses.cpp


From: Olivier Teulière
Subject: [Eliot-dev] eliot qt/board_widget.cpp utils/ncurses.cpp
Date: Mon, 26 Jan 2009 20:30:45 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>       09/01/26 20:30:45

Modified files:
        qt             : board_widget.cpp 
        utils          : ncurses.cpp 

Log message:
         - Always display characters in uppercase on the board (a lowercase 
character was still possible with a joker, in some rare cases)
         - Fixed a compilation warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/board_widget.cpp?cvsroot=eliot&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/eliot/utils/ncurses.cpp?cvsroot=eliot&r1=1.31&r2=1.32

Patches:
Index: qt/board_widget.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/board_widget.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- qt/board_widget.cpp 24 Jan 2009 17:44:57 -0000      1.10
+++ qt/board_widget.cpp 26 Jan 2009 20:30:41 -0000      1.11
@@ -123,7 +123,7 @@
             // Draw the letter
             if (m_game != NULL && !m_game->getBoard().getTile(row, 
col).isEmpty())
             {
-                wchar_t chr = m_game->getBoard().getTile(row, col).toChar();
+                wchar_t chr = towupper(m_game->getBoard().getTile(row, 
col).toChar());
                 if (m_game->getBoard().getCharAttr(row, col) & ATTR_JOKER)
                     painter.setPen(JokerColour);
                 painter.setFont(letterFont);

Index: utils/ncurses.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/utils/ncurses.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- utils/ncurses.cpp   24 Jan 2009 10:28:23 -0000      1.31
+++ utils/ncurses.cpp   26 Jan 2009 20:30:43 -0000      1.32
@@ -95,10 +95,10 @@
     va_list vl_args;
     char *buf = NULL;
     va_start(vl_args, fmt);
-    vasprintf(&buf, fmt, vl_args);
+    int res = vasprintf(&buf, fmt, vl_args);
     va_end(vl_args);
 
-    if (buf == NULL)
+    if (buf == NULL || res == -1)
     {
         return;
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]