[JaMUDe-cvs] test/src montrey
Status: Pre-Alpha
Brought to you by:
xenith
From: JaMUDe C. C. <jam...@li...> - 2002-10-18 00:48:46
|
JaMUDe CVS commit Author : montrey Tree : test Dir : test/src Modified Files: player.cpp fileio.cpp comm.cpp area.cpp Log Message: moved the include directory to src/ and placed mud.h there =================================================================== RCS file: /cvsroot/jamude/test/src/player.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- player.cpp 8 May 2002 18:55:29 -0000 1.3 +++ player.cpp 18 Oct 2002 00:48:45 -0000 1.4 @@ -9,7 +9,7 @@ * * ***************************************************************************/ -/* $Id: player.cpp,v 1.3 2002/05/08 18:55:29 xenith Exp $ */ +/* $Id: player.cpp,v 1.4 2002/10/18 00:48:45 montrey Exp $ */ #ifdef USE_MYSQL #include <mysql/mysql.h> @@ -17,7 +17,7 @@ #ifdef USE_POSTGRE #include <psql/psql.h> #endif -#include "mud.h" +#include "include/mud.h" Player *first_player; Player *last_player; =================================================================== RCS file: /cvsroot/jamude/test/src/fileio.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- fileio.cpp 27 Apr 2002 10:34:40 -0000 1.2 +++ fileio.cpp 18 Oct 2002 00:48:45 -0000 1.3 @@ -1,4 +1,4 @@ -#include "mud.h" +#include "include/mud.h" /* * Read a string from file fp @@ -73,7 +73,7 @@ next_arg = argument; while ( isspace(*next_arg) ) next_arg++; - while ( next_arg && *next_arg != '\n' && *next_arg != '\r' && !isspace(*next_arg) + while ( next_arg && *next_arg != '\n' && *next_arg != '\r' && !isspace(*next_arg) && i<MAX_STRING_LENGTH) buf[i++]=next_arg++[0]; buf[i] = '\0'; =================================================================== RCS file: /cvsroot/jamude/test/src/comm.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- comm.cpp 27 Apr 2002 10:34:40 -0000 1.2 +++ comm.cpp 18 Oct 2002 00:48:45 -0000 1.3 @@ -1,4 +1,4 @@ -#include "mud.h" +#include "include/mud.h" #ifdef WIN32 @@ -21,8 +21,8 @@ perror("Communication: initializing socket" ); exit(-1); } -#if defined(SO_DONTLINGER) - setsockopt( listen_fd, SOL_SOCKET, SO_DONTLINGER, (char*) &x, sizeof(x)); +#if defined(SO_DONTLINGER) + setsockopt( listen_fd, SOL_SOCKET, SO_DONTLINGER, (char*) &x, sizeof(x)); #endif if ( setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &x, sizeof(x) ) < 0 ) { @@ -49,7 +49,7 @@ ::closesocket(listen_fd); exit( -1 ); } - + cout << "Prototype JaMUDe up and running on port " << port << endl; // At this point we are up and running, now we just need to initialize @@ -64,10 +64,10 @@ void Communication::send(Dnode *d, char *arg) { int length, written; - + if ( !arg || arg[0] == '\0' ) return; - length = strlen( arg ); + length = strlen( arg ); // Lets send the message if ( (written = ::send(d->fd, arg, length, 0)) < 0 ) return; @@ -336,7 +336,7 @@ void Dnode::send(char *arg) { int length, written; - + if ( !arg || arg[0] == '\0' ) return; length = strlen( arg ); @@ -380,7 +380,7 @@ else word = NULL; } } - + Communication *comm = new Communication(3002); while ( 1 ) { =================================================================== RCS file: /cvsroot/jamude/test/src/area.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- area.cpp 8 May 2002 18:55:29 -0000 1.3 +++ area.cpp 18 Oct 2002 00:48:45 -0000 1.4 @@ -8,7 +8,7 @@ * * ***************************************************************************/ -/* $Id: area.cpp,v 1.3 2002/05/08 18:55:29 xenith Exp $ */ +/* $Id: area.cpp,v 1.4 2002/10/18 00:48:45 montrey Exp $ */ #ifdef USE_MYSQL @@ -17,7 +17,7 @@ #ifdef USE_POSTGRE #include <psql/psql.h> #endif -#include "mud.h" +#include "include/mud.h" Area areas[MAX_AREAS]; @@ -150,7 +150,7 @@ } break; } - if ( !found ) + if ( !found ) fprintf(stderr, "Error unknown keyword: %s.\n", tmp ); tmp = fio_rword( fp ); } |