Revision: 153
Author: davidferreira.FZ
Date: Sat Aug 1 21:27:32 2009
Log: Corrigindo, declarando explicitamente alguns includes, para
compatibilidade com novas versões do gcc/glibc
http://code.google.com/p/pjmoo-gbf/source/detail?r=153
Modified:
/trunk/projeto/src/Date.cpp
/trunk/projeto/src/Date.h
/trunk/projeto/src/Idioma.cpp
/trunk/projeto/src/Idioma.h
/trunk/projeto/src/RSManager.h
/trunk/projeto/src/RSRecorde.cpp
/trunk/projeto/src/RSRecorde.h
=======================================
--- /trunk/projeto/src/Date.cpp Sun May 11 20:43:34 2008
+++ /trunk/projeto/src/Date.cpp Sat Aug 1 21:27:32 2009
@@ -23,16 +23,10 @@
//Retorna Dia da semana, mês, dia do mês, hora e ano
std::string Date::getInfo()
{
- time_t ltime;
- time(<ime);
-
- char * hora = ctime(<ime);
- memcpy(hora+24, "\0", 1 );
-
- std::string retorno = hora;
-
-
- return retorno;
+ time_t tmpTime;
+ time(&tmpTime);
+
+ return std::string(ctime(&tmpTime));
}
} // namespace GBF::Kernel::Util
=======================================
--- /trunk/projeto/src/Date.h Sun May 11 20:43:34 2008
+++ /trunk/projeto/src/Date.h Sat Aug 1 21:27:32 2009
@@ -24,7 +24,7 @@
namespace Util {
-//Descrição:
+//Descrição:
// Manipular informações de data do Sistema Operacional.
//Motivação:
// Usado principalmente para obter informações como data e hora
=======================================
--- /trunk/projeto/src/Idioma.cpp Mon Nov 10 18:41:19 2008
+++ /trunk/projeto/src/Idioma.cpp Sat Aug 1 21:27:32 2009
@@ -1,5 +1,5 @@
//// GBF - Gamework's Brazilian Framework
-//// Copyright (C) 2004-2008 David de Almeida Ferreira
+//// Copyright (C) 2004-2009 David de Almeida Ferreira
////
//// This library is free software; you can redistribute it and/or
//// modify it under the terms of the GNU Library General Public
@@ -9,7 +9,7 @@
//// David de Almeida Ferreira (F-Z)
////
davidf...@uol.com.br or
davidfer...@gmail.com
////
http://pjmoo.sourceforge.net
-////
http://davidferreira-fz.blogspot.com
+////
http://www.davidferreira.com.br
////////////////////////////////////////////////////////////////////////
#include "Idioma.h"
@@ -22,7 +22,7 @@
Idioma * Idioma::instance=NULL;
-Idioma::~Idioma()
+Idioma::~Idioma()
{
// UtilLog::sistema("Removendo UserInterfaceTexto");
}
@@ -36,7 +36,7 @@
}
//Configura um idioma
//Obs.: O idioma é configurado de acordo com a lista de idiomas suportado
-bool Idioma::setIdioma(const std::string & codigo)
+bool Idioma::setIdioma(const std::string & codigo)
{
bool achou = false;
// UtilLog::tracer("UserInterfaceTexto::setIdioma(%s)",codigo.c_str());
@@ -52,12 +52,12 @@
return achou;
}
-std::string Idioma::getIdioma()
+std::string Idioma::getIdioma()
{
return idiomaPrefixo;
}
//Seleciona o idioma automaticamente de acordo com o ambiente
-void Idioma::detectarIdioma()
+void Idioma::detectarIdioma()
{
std::cout << "GBF::Kernel::Write::Idioma::detectarIdioma()" <<
std::endl;
#ifdef __gnu_linux__
@@ -89,7 +89,7 @@
}
#endif
}
-bool Idioma::atualizar()
+bool Idioma::atualizar()
{
char str[256];
bool retorno = false;
@@ -115,15 +115,15 @@
return retorno;
}
-void Idioma::setArquivo(const std::string & arquivo)
+void Idioma::setArquivo(const std::string & arquivo)
{
this->arquivo=arquivo;
}
-int Idioma::size()
+int Idioma::size()
{
return mapaTexto.size();
}
-std::string Idioma::getTexto(const std::string & chave)
+std::string Idioma::getTexto(const std::string & chave)
{
if (mapaTexto.find(chave)!=mapaTexto.end()){
return mapaTexto[chave];
@@ -132,11 +132,11 @@
}
}
//Retorna se existe a chave de texto
-bool Idioma::isChaveTexto(const std::string & chave)
+bool Idioma::isChaveTexto(const std::string & chave)
{
return mapaTexto.find(chave)!=mapaTexto.end();
}
-void Idioma::parser(char * info)
+void Idioma::parser(char * info)
{
int i = 0;
std::string linha = info;
@@ -154,7 +154,7 @@
}
}
//Carrega o mapeamento de idiomas e os arquivos de texto
-void Idioma::carregarIdioma()
+void Idioma::carregarIdioma()
{
char str[256];
@@ -185,7 +185,7 @@
}
}
}
-void Idioma::parserIdioma(char * info)
+void Idioma::parserIdioma(char * info)
{
int i = 0;
std::string linha = info;
@@ -203,10 +203,10 @@
idiomaSuportado[linha.substr(0,i)]=linha.substr(i+1,tamanho);
}
}
-void Idioma::limpar()
+void Idioma::limpar()
{
}
-Idioma::Idioma()
+Idioma::Idioma()
{
std::cout << "GBF::Kernel::Write::Idioma" << std::endl;
=======================================
--- /trunk/projeto/src/Idioma.h Mon Nov 10 18:41:19 2008
+++ /trunk/projeto/src/Idioma.h Sat Aug 1 21:27:32 2009
@@ -1,5 +1,5 @@
//// GBF - Gamework's Brazilian Framework
-//// Copyright (C) 2004-2008 David de Almeida Ferreira
+//// Copyright (C) 2004-2009 David de Almeida Ferreira
////
//// This library is free software; you can redistribute it and/or
//// modify it under the terms of the GNU Library General Public
@@ -9,7 +9,7 @@
//// David de Almeida Ferreira (F-Z)
////
davidf...@uol.com.br or
davidfer...@gmail.com
////
http://pjmoo.sourceforge.net
-////
http://davidferreira-fz.blogspot.com
+////
http://www.davidferreira.com.br
////////////////////////////////////////////////////////////////////////
#ifndef _IDIOMA_H
@@ -19,6 +19,7 @@
#include <windows.h>
#endif
+#include <cstdlib>
#include <fstream>
#include <map>
@@ -35,7 +36,7 @@
namespace Write {
-//Descrição:
+//Descrição:
// Classe para carregar textos
//Motivação:
// Possibilitar que os textos usados no jogo possam ser carregados de
arquivos externos
@@ -43,14 +44,14 @@
{
protected:
//Lista com os códigos e textos correspondentes
-
+
std::map<std::string,std::string> mapaTexto;
//Lista com os idiomas suportados
std::map<std::string,std::string> idiomaSuportado;
//Prefixo do idioma selecionado
-
+
std::string idiomaPrefixo;
static Idioma * instance;
@@ -58,7 +59,7 @@
private:
//arquivo de localização a ser carregado
-
+
std::string arquivo;
=======================================
--- /trunk/projeto/src/RSManager.h Tue Nov 11 17:55:35 2008
+++ /trunk/projeto/src/RSManager.h Sat Aug 1 21:27:32 2009
@@ -1,5 +1,5 @@
//// GBF - Gamework's Brazilian Framework
-//// Copyright (C) 2004-2008 David de Almeida Ferreira
+//// Copyright (C) 2004-2009 David de Almeida Ferreira
////
//// This library is free software; you can redistribute it and/or
//// modify it under the terms of the GNU Library General Public
@@ -9,20 +9,21 @@
//// David de Almeida Ferreira (F-Z)
////
davidf...@uol.com.br or
davidfer...@gmail.com
////
http://pjmoo.sourceforge.net
-////
http://davidferreira-fz.blogspot.com
+////
http://www.davidferreira.com.br
////////////////////////////////////////////////////////////////////////
#ifndef _RSMANAGER_H
#define _RSMANAGER_H
#include <string>
+#include <cstdio>
#include "RSLista.h"
#include "RSRecorde.h"
namespace RankingSystem {
-//Descrição:
+//Descrição:
// Classe para gerenciamento da listagem de recordes
//Motivação:
// Permitir carregar e salvar em disco a listagem de recordes
=======================================
--- /trunk/projeto/src/RSRecorde.cpp Sun May 11 20:43:34 2008
+++ /trunk/projeto/src/RSRecorde.cpp Sat Aug 1 21:27:32 2009
@@ -1,5 +1,5 @@
//// GBF - Gamework's Brazilian Framework
-//// Copyright (C) 2004-2008 David de Almeida Ferreira
+//// Copyright (C) 2004-2009 David de Almeida Ferreira
////
//// This library is free software; you can redistribute it and/or
//// modify it under the terms of the GNU Library General Public
@@ -9,14 +9,14 @@
//// David de Almeida Ferreira (F-Z)
////
davidf...@uol.com.br or
davidfer...@gmail.com
////
http://pjmoo.sourceforge.net
-////
http://davidferreira-fz.blogspot.com
+////
http://www.davidferreira.com.br
////////////////////////////////////////////////////////////////////////
#include "RSRecorde.h"
namespace RankingSystem {
-void RSRecorde::inicializar()
+void RSRecorde::inicializar()
{
id=0;
fase=0;
=======================================
--- /trunk/projeto/src/RSRecorde.h Sun May 11 20:43:34 2008
+++ /trunk/projeto/src/RSRecorde.h Sat Aug 1 21:27:32 2009
@@ -1,5 +1,5 @@
//// GBF - Gamework's Brazilian Framework
-//// Copyright (C) 2004-2008 David de Almeida Ferreira
+//// Copyright (C) 2004-2009 David de Almeida Ferreira
////
//// This library is free software; you can redistribute it and/or
//// modify it under the terms of the GNU Library General Public
@@ -9,16 +9,18 @@
//// David de Almeida Ferreira (F-Z)
////
davidf...@uol.com.br or
davidfer...@gmail.com
////
http://pjmoo.sourceforge.net
-////
http://davidferreira-fz.blogspot.com
+////
http://www.davidferreira.com.br
////////////////////////////////////////////////////////////////////////
#ifndef _RSRECORDE_H
#define _RSRECORDE_H
#include <string>
+#include <cstring>
+
namespace RankingSystem {
-//Descrição:
+//Descrição:
// Classe para representar um registro
//Motivação:
// Armazenar informações sobre o pontuação do jogo