--- main.c.orig Mon Apr 25 06:34:15 1994 +++ main.c Fri Mar 6 18:38:32 1998 @@ -123,7 +123,7 @@ /* main() - show title - setup signals - init lists - readcoms - tintin() */ /**************************************************************************/ -void main(argc, argv, environ) +int main(argc, argv, environ) int argc; char **argv; char **environ; @@ -215,6 +215,7 @@ int didget; int readfdmask, done; struct session *sesptr; + struct session *sestmp; /* -DDN- 3/6/98 */ *k_input='\0'; while(TRUE) { @@ -254,9 +255,16 @@ } } - for(sesptr=sessionlist; sesptr; sesptr=sesptr->next) + /* Modified to prevent segmentation fault. -DDN- 3/6/98 */ + /* The old for loop called sesptr=sesptr->next, but sesptr */ + /* was being freed when the session died, causing the fault */ + sesptr=sessionlist; + while( sesptr ){ + sestmp=sesptr->next; if(sesptr->socketbit&readfdmask) { read_mud(sesptr); + } + sesptr=sestmp; } } } --- misc.c.orig Fri Mar 6 18:31:42 1998 +++ misc.c Fri Mar 6 18:32:51 1998 @@ -344,6 +344,10 @@ char *arg; struct session *ses; { + + /* I don't ever want this command to work, return now. -DDN- 3/6/98 */ + return; + get_arg_in_braces(arg, arg, 1); if(*arg) { tintin_puts3("^#OK EXECUTING SHELL COMMAND.", ses); --- Makefile.orig Fri Mar 6 18:36:47 1998 +++ Makefile Fri Mar 6 18:42:10 1998 @@ -35,7 +35,7 @@ #F5 = -DSOCK_FIX -CFLAGS= $(F1) $(F2) $(F3) $(F4) $(F5) +CFLAGS= $(F1) $(F2) $(F3) $(F4) $(F5) -DSOCK_FIX LFLAGS= -s # BINDIR is the directory you wish tt++ to be placed if you wish to use @@ -57,8 +57,11 @@ files.o history.o ticks.o misc.o path.o net.o llist.o utils.o echo.o \ variables.o highlight.o antisub.o ivars.o help.o text.o glob.o -tintin++: $(OFILES) - $(CC) $(CFLAGS) $(LFLAGS) -o ../tt++ $(OFILES) $(LIB) +all: tt++ +tintin++: tt++ + +tt++: $(OFILES) + $(CC) $(CFLAGS) $(LFLAGS) -o tt++ $(OFILES) $(LIB) main.o: tintin.h parse.o: tintin.h @@ -83,9 +86,9 @@ text.o : tintin.h clean: - @rm -f *.o ../tt++ + @rm -f *.o tt++ -install: tintin++ +install: tt++ sh install.sh $(BINDIR) dist: --- install.sh.orig Fri Mar 6 18:43:11 1998 +++ install.sh Fri Mar 6 18:43:20 1998 @@ -1,5 +1,5 @@ #!/bin/sh -cp ../tt++ $1 +cp tt++ $1 cp support/.tt_help.txt.Z $HOME echo " " echo " " --- action.c.orig Mon May 8 15:38:17 2000 +++ action.c Mon May 8 15:40:39 2000 @@ -80,20 +80,18 @@ struct session *ses; { char left[BUFFER_SIZE] ,result[BUFFER_SIZE]; - struct listnode *myactions, *ln, *temp; + struct listnode *myactions, *ln; int flag; flag=FALSE; myactions=(ses) ? ses->actions : common_actions; - temp=myactions; arg=get_arg_in_braces(arg,left,1); - while ((ln=search_node_with_wild(temp, left))!=NULL) { + while ((ln=search_node_with_wild(myactions, left))!=NULL) { if (mesvar[1]) { sprintf(result,"#Ok. {%s} is no longer a trigger.",ln->left); tintin_puts2(result, ses); } deletenode_list(myactions, ln); flag=TRUE; - temp=ln; } if (!flag && mesvar[1]) { sprintf(result, "#No match(es) found for {%s}", left);