source revisions and clarifications

This commit is contained in:
James Turk 2003-06-16 07:45:03 +00:00
parent 97229de6e3
commit 52250ef9f9
5 changed files with 22 additions and 18 deletions

View File

@ -44,15 +44,11 @@
#endif
#include "external/mt19937ar.h"
#include <string>
#include <vector>
#include <queue>
#include <list>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <cstdarg>
#include <cctype>
#include <ctime>
#include <string> //used frequently
#include <queue> //used by ZEngine for ZErrors
#include <list> //used by ZConfigFile
#include <fstream> //used by ZConfigFile
#include <cctype> //used in parsing
#include <ctime> //used to seed the random generator
#endif //__ze_includes_h__

View File

@ -13,7 +13,7 @@
\brief Source file for ZClient.
Implementation file for ZClient, the TCP Client class for ZEngine.
<br>$Id: ZE_ZClient.cpp,v 1.9 2003/06/11 05:51:15 cozman Exp $<br>
<br>$Id: ZE_ZClient.cpp,v 1.10 2003/06/16 07:45:03 cozman Exp $<br>
\author James Turk
**/
@ -26,7 +26,8 @@ namespace ZE
std::string num2dotted4(unsigned int num)
{
vector<int> ip;
int ip[4];
int index=0;
int d=16777216; //2^24
int m;
@ -35,11 +36,12 @@ std::string num2dotted4(unsigned int num)
{
m = num/d;
num %= d;
ip.push_back(m);
ip[index] = m;
++index;
d /= 256;
}
return FormatStr("%d.%d.%d.%d",ip[3],ip[2],ip[1],ip[0]);
return FormatStr("%d.%d.%d.%d",ip[0],ip[1],ip[2],ip[3]);
}
ZClient::ZClient(bool verbose) :

View File

@ -13,7 +13,7 @@
\brief Source file for ZConfigFile.
Implementation of ZConfigFile, the ZEngine INI-Style Config File.
<br>$Id: ZE_ZConfigFile.cpp,v 1.12 2003/06/11 05:51:15 cozman Exp $<br>
<br>$Id: ZE_ZConfigFile.cpp,v 1.13 2003/06/16 07:45:03 cozman Exp $<br>
\author James Turk
**/
@ -191,7 +191,7 @@ void ZConfigFile::Process(std::string filename)
//if std::string is bracketed it is a section, if it begins in a letter it is a variable
if(tmp[0] == '[' && tmp[tmp.length()-1] == ']')
section = str;
else if(isalpha(tmp[0]))
else if(std::isalpha(tmp[0]))
{
var = str.substr(0,str.find('=')); //split the std::string at the equals sign
SetVariable(section,var,str.substr(str.find('=')+1,str.length()-var.length()-1));

View File

@ -13,7 +13,7 @@
\brief Central source file for ZEngine.
Actual implementation of ZEngine singleton class, the core of ZEngine.
<br>$Id: ZE_ZEngine.cpp,v 1.46 2003/06/11 05:51:15 cozman Exp $<br>
<br>$Id: ZE_ZEngine.cpp,v 1.47 2003/06/16 07:45:03 cozman Exp $<br>
\author James Turk
**/
@ -43,7 +43,7 @@ ZEngine::ZEngine() :
ZError::CreateStringTable();
SeedRandom(static_cast<unsigned long>(time(NULL)));
SeedRandom(static_cast<unsigned long>(std::time(NULL)));
}
ZEngine* ZEngine::GetInstance()

View File

@ -57,6 +57,9 @@
<File
RelativePath="..\src\external\SDLGL_Util.cpp">
</File>
<File
RelativePath="..\src\VersionInfo.cpp">
</File>
<File
RelativePath="..\src\ZE_Utility.cpp">
</File>
@ -112,6 +115,9 @@
<File
RelativePath="..\include\external\SDLGL_Util.h">
</File>
<File
RelativePath="..\include\VersionInfo.h">
</File>
<File
RelativePath="..\include\ZE_Defines.h">
</File>