diff -r -N -c socketmud/src/Makefile socketmud-new/src/Makefile *** socketmud/src/Makefile Thu May 1 23:38:08 2003 --- socketmud-new/src/Makefile Wed Jan 7 18:43:00 2004 *************** *** 1,5 **** CC = gcc ! C_FLAGS = -Wall -O -pedantic L_FLAGS = -lz -lpthread -lcrypt O_FILES = socket.o io.o strings.o update.o utils.o interpret.o help.o \ --- 1,5 ---- CC = gcc ! C_FLAGS = -Wall -pedantic L_FLAGS = -lz -lpthread -lcrypt O_FILES = socket.o io.o strings.o update.o utils.o interpret.o help.o \ diff -r -N -c socketmud/src/help.c socketmud-new/src/help.c *** socketmud/src/help.c Sat Sep 6 17:50:45 2003 --- socketmud-new/src/help.c Wed Jan 7 18:42:42 2004 *************** *** 11,16 **** --- 11,17 ---- #include #include #include + #include /* include main header file */ #include "mud.h" *************** *** 83,109 **** } /* ! * Loads all the helpfiles listed in ../help/help.lst */ void load_helps() { HELP_DATA *new_help; ! FILE *fp; ! char *hFile; ! ! /* check to see if there is a list of help files */ ! if ((fp = fopen("../help/help.lst", "r")) == NULL) ! return; log_string("Load_helps: getting all help files."); ! while ((hFile = fread_line(fp)) != NULL) { ! char *s = read_help_entry(hFile); if (s == NULL) { ! bug("load_helps: Helpfile %s does not exist.", hFile); continue; } --- 84,113 ---- } /* ! * Loads all the helpfiles found in ../help/ */ void load_helps() { HELP_DATA *new_help; ! char buf[MAX_BUFFER]; ! char *s; ! DIR *directory; ! struct dirent *entry; log_string("Load_helps: getting all help files."); ! directory = opendir("../help/"); ! for (entry = readdir(directory); entry; entry = readdir(directory)) { ! if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, "..")) ! continue; ! ! sprintf(buf, "../help/%s", entry->d_name); ! s = read_help_entry(buf); if (s == NULL) { ! bug("load_helps: Helpfile %s does not exist.", buf); continue; } *************** *** 113,120 **** abort(); } ! new_help->keyword = strdup(hFile); ! new_help->text = strdup(read_help_entry(hFile)); new_help->load_time = time(NULL); add_help(new_help); --- 117,124 ---- abort(); } ! new_help->keyword = strdup(entry->d_name); ! new_help->text = strdup(s); new_help->load_time = time(NULL); add_help(new_help); *************** *** 123,130 **** else if (compares("MOTD", new_help->keyword)) motd = new_help->text; } ! ! fclose(fp); } void add_help(HELP_DATA *help) --- 127,133 ---- else if (compares("MOTD", new_help->keyword)) motd = new_help->text; } ! closedir(directory); } void add_help(HELP_DATA *help) diff -r -N -c socketmud/src/mud.h socketmud-new/src/mud.h *** socketmud/src/mud.h Thu Oct 2 13:06:53 2003 --- socketmud-new/src/mud.h Wed Jan 7 18:31:51 2004 *************** *** 9,17 **** #include #include ! /*********************** ! * Standard defintions * ! ***********************/ /* define TRUE and FALSE */ #ifndef FALSE --- 9,17 ---- #include #include ! /************************ ! * Standard definitions * ! ************************/ /* define TRUE and FALSE */ #ifndef FALSE diff -r -N -c socketmud/src/socket.c socketmud-new/src/socket.c *** socketmud/src/socket.c Thu May 1 23:38:05 2003 --- socketmud-new/src/socket.c Wed Jan 7 18:44:00 2004 *************** *** 54,60 **** /* note that we are booting up */ log_string("Program starting."); ! if (argv[1] && argv[1][0]) { fCopyOver = TRUE; control = atoi(argv[2]); --- 54,60 ---- /* note that we are booting up */ log_string("Program starting."); ! if (argc > 2 && atoi(argv[2]) > 0) { fCopyOver = TRUE; control = atoi(argv[2]);