diff -r -N -c socketmud/src/io.c socketmud-new/src/io.c *** socketmud/src/io.c Sat Sep 6 17:51:18 2003 --- socketmud-new/src/io.c Sun Jan 11 20:14:55 2004 *************** *** 117,124 **** /* read the file in the buffer */ while (c != EOF) { entry[ptr] = c; ! if (++ptr > MAX_BUFFER - 1) { bug("Read_help_entry: String to long."); abort(); --- 117,126 ---- /* read the file in the buffer */ while (c != EOF) { + if (c == '\n') + entry[ptr++] = '\r'; entry[ptr] = c; ! if (++ptr > MAX_BUFFER - 2) { bug("Read_help_entry: String to long."); abort(); diff -r -N -c socketmud/src/socket.c socketmud-new/src/socket.c *** socketmud/src/socket.c Wed Jan 7 18:44:00 2004 --- socketmud-new/src/socket.c Sun Jan 11 20:17:23 2004 *************** *** 88,103 **** struct timeval last_time, new_time; extern fd_set fSet; fd_set rFd; - int fmax; long secs, usecs; - /* get the maximum amount of sockets to listen to */ - if ((fmax = getdtablesize()) < 1) - { - bug("Game_loop: Fatal error in getdtablesize()"); - return; - } - /* set this for the first loop */ gettimeofday(&last_time, NULL); --- 88,95 ---- *************** *** 114,124 **** /* do this untill the program is shutdown */ while (!shut_down) { /* copy the socket set */ memcpy(&rFd, &fSet, sizeof(fd_set)); /* wait for something to happen */ ! if (select(fmax, &rFd, NULL, NULL, &tv) < 0) continue; /* check for new connections */ --- 106,119 ---- /* do this untill the program is shutdown */ while (!shut_down) { + /* set current_time */ + current_time = time(NULL); + /* copy the socket set */ memcpy(&rFd, &fSet, sizeof(fd_set)); /* wait for something to happen */ ! if (select(FD_SETSIZE, &rFd, NULL, NULL, &tv) < 0) continue; /* check for new connections */ diff -r -N -c socketmud/src/update.c socketmud-new/src/update.c *** socketmud/src/update.c Sat Mar 22 14:52:30 2003 --- socketmud-new/src/update.c Sun Jan 11 20:17:50 2004 *************** *** 10,17 **** /* * Update_handler() * ! * This is the toplevel update function, ! * which is called once every second. */ void update_handler() { --- 10,16 ---- /* * Update_handler() * ! * This is the toplevel update function. */ void update_handler() { *************** *** 21,25 **** { /* do nothing */ } - return; } --- 20,23 ----