Compilation fixes for some systems (missing headers)

This commit is contained in:
Olivier Teulière 2008-07-20 12:15:51 +00:00
parent 0bfcad6d58
commit 7ea51d2f23
6 changed files with 11 additions and 10 deletions

View file

@ -29,6 +29,7 @@
#include <set> #include <set>
#include <list> #include <list>
#include <algorithm>
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
#include <cstdlib> #include <cstdlib>
@ -457,7 +458,7 @@ void AutomatonHelper::setAccept(astate s) const
astate ns = *it; astate ns = *it;
int idx = *(ns->id.begin()); int idx = *(ns->id.begin());
DMSG(printf("%s ", s_state_id_to_str(ns->id).c_str())); DMSG(printf("%s ", s_state_id_to_str(ns->id).c_str()));
if (ns->accept && (find(s->id.begin(), s->id.end(), idx) != s->id.end())) if (ns->accept && (std::find(s->id.begin(), s->id.end(), idx) != s->id.end()))
{ {
DMSG(printf("(ok) ")); DMSG(printf("(ok) "));
s->accept = true; s->accept = true;

View file

@ -20,6 +20,7 @@
#include "config.h" #include "config.h"
#include <cstring> // for strcpy
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>

View file

@ -29,6 +29,7 @@
#include <exception> #include <exception>
#include <iostream> #include <iostream>
#include <cstring> // For memset
#if ENABLE_NLS #if ENABLE_NLS
# include <libintl.h> # include <libintl.h>

View file

@ -20,6 +20,7 @@
*****************************************************************************/ *****************************************************************************/
#include <string> #include <string>
#include <cstdlib> // For rand()
#include <dic.h> #include <dic.h>
#include "bag.h" #include "bag.h"

View file

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* Eliot * Eliot
* Copyright (C) 2002-2007 Antoine Fraboulet & Olivier Teulière * Copyright (C) 2002-2008 Antoine Fraboulet & Olivier Teulière
* Authors: Antoine Fraboulet <antoine.fraboulet @@ free.fr> * Authors: Antoine Fraboulet <antoine.fraboulet @@ free.fr>
* Olivier Teulière <ipkiss @@ gmail.com> * Olivier Teulière <ipkiss @@ gmail.com>
* *
@ -19,12 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*****************************************************************************/ *****************************************************************************/
/** #include <cstring>
* \file game_io.cpp #include <cstdlib> // For atoi
* \brief Eliot game class file load/save handling
* \author Antoine Fraboulet & Olivier Teuliere
* \date 2002 - 2005
*/
#include "dic.h" #include "dic.h"
#include "pldrack.h" #include "pldrack.h"

View file

@ -1,5 +1,5 @@
/***************************************************************************** /*****************************************************************************
* Copyright (C) 2005 Eliot * Copyright (C) 2005-2008 Eliot
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr> * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -26,6 +26,7 @@
#endif #endif
#include <ctype.h> #include <ctype.h>
#include <cstring> // For strlen
#include <fstream> #include <fstream>
#include <algorithm> #include <algorithm>
@ -268,7 +269,7 @@ void CursesIntf::drawBoard(WINDOW *win, int y, int x) const
void CursesIntf::drawScoresRacks(WINDOW *win, int y, int x) const void CursesIntf::drawScoresRacks(WINDOW *win, int y, int x) const
{ {
// Compute the longest player name // Compute the longest player name
unsigned int longest = 0; size_t longest = 0;
for (unsigned int i = 0; i < m_game->getNPlayers(); i++) for (unsigned int i = 0; i < m_game->getNPlayers(); i++)
{ {
longest = std::max(longest, m_game->getPlayer(i).getName().size()); longest = std::max(longest, m_game->getPlayer(i).getName().size());