From: Peep P. <so...@us...> - 2004-03-21 09:01:11
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10643 Modified Files: main.c net.c Log Message: Cleaned up included headers. Index: net.c =================================================================== RCS file: /cvsroot/agd/server/src/net.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- net.c 18 Mar 2004 20:45:47 -0000 1.8 +++ net.c 21 Mar 2004 08:51:05 -0000 1.9 @@ -2,13 +2,26 @@ net.c - network communication started in summer 2003 */ -#include "std.h" -#include "lpc_incl.h" +#include <stdio.h> +#include "sys.h" +#include "compile_options.h" + +#include "list.h" +#include "array.h" +#include "lpc.h" +#include "object.h" +#include "interpret.h" +#include "net.h" + #include <errno.h> #define LOOP_PLAYERS() for(i=0;i<players.length;i++) { player_t *pl = players.data[i]; array_t players; +extern list_t all_objects; +extern player_t *this_player; +extern object_t *master, *this_ob; + static int greatest_sockfd, listenfd; static fd_set readfds, writefds; Index: main.c =================================================================== RCS file: /cvsroot/agd/server/src/main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- main.c 18 Mar 2004 20:46:10 -0000 1.12 +++ main.c 21 Mar 2004 08:51:05 -0000 1.13 @@ -18,14 +18,24 @@ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "std.h" -#include "lpc_incl.h" +#include "config.h" +#include <stdio.h> +#include <time.h> #include <signal.h> +#include "arch.h" +#include "sys.h" -time_t startup_time; +#include "array.h" +#include "lpc.h" +#include "object.h" +#include "compile.h" + +extern object_t *master; static char *conf_file; +time_t startup_time; + void crash(int sig, char *reason, int retval) { #ifdef DEBUG @@ -166,9 +176,10 @@ if(conf.exit_stats) atexit(mstats_summary); net_listen(conf.port); - printf("Started at %s.\n", do_time()); time(&startup_time); + printf("Started at %s", ctime(&startup_time)); + srand(startup_time); printf("Accepting connections on port %d.\n", conf.port); |