[server] Implement few CConsole functions

This commit is contained in:
RD42 committed 2023-10-25 00:01:33 +08:00
1 parent a83e0d65cc
commit 5a71f0b9fa
5 files changed
+264

No files matched your search

+23
View File
@@ -1,6 +1,8 @@
#include "main.h"
CConsole *pConsole = NULL;
FILE *pLogFile;
//----------------------------------------------------
@@ -26,6 +28,24 @@ void LoadLogFile()
}
}
#ifdef LINUX
// strlwr is not included with the GNU C lib it seems.
char* strlwr(char* str)
{
size_t maxlen=strlen(str);
for (size_t i=0; i<maxlen; i++)
{
if ((str[i] >= 'A') && (str[i] <= 'Z'))
{
str[i] -= 32;
}
}
return str;
}
#endif // #ifdef LINUX
//----------------------------------------------------
int main (int argc, char** argv)
@@ -42,6 +62,9 @@ int main (int argc, char** argv)
srand(time(NULL));
// Create the Console
pConsole = new CConsole();
// TODO: main
fclose(pLogFile);