[eggheads-patches] PATCH: tcl_free.diff

Tothwolf tothwolf at concentric.net
Wed Oct 27 08:15:22 CST 1999


tcl_free.diff:
  renamed Tcl7.5 compat define HAVE_OLD_TCL to HAVE_PRE7_5_TCL
  renamed Tcl threads define HAVE_BUGGY_TCL_THREADS to HAVE_TCL_THREADS
  use $TCL_TESTLIBS for Tcl library tests
  added checking for Tcl_Free() in $TCLLIB
  better checking for TclpFinalizeThreadData() in $TCLLIB
  changed 'n_free(p, "", 0)' to 'Tcl_Free((char *) p)' in *many* places
  added #ifndef HAVE_TCL_FREE for Tcl_Free to main.h

  Note: putlog-misc-part2.diff must be applied before this one

-Toth
-------------- next part --------------
diff -urNPX ../exclude ../eggdrop1.3.tmp/acconfig.h ./acconfig.h
--- ../eggdrop1.3.tmp/acconfig.h	Tue Oct 26 15:42:24 1999
+++ ./acconfig.h	Tue Oct 26 18:31:45 1999
@@ -26,7 +26,10 @@
 #undef HAVE_DLOPEN
 
 /* Define for pre Tcl 7.5 compat  */
-#undef HAVE_OLD_TCL
+#undef HAVE_PRE7_5_TCL
 
-/* Define for buggy Tcl threads  */
-#undef HAVE_BUGGY_TCL_THREADS
+/* Define for Tcl that has Tcl_Free() (7.5p1 and later)  */
+#undef HAVE_TCL_FREE
+
+/* Define for Tcl that has threads  */
+#undef HAVE_TCL_THREADS
diff -urNPX ../exclude ../eggdrop1.3.tmp/config.h.in ./config.h.in
--- ../eggdrop1.3.tmp/config.h.in	Tue Oct 26 15:42:24 1999
+++ ./config.h.in	Tue Oct 26 16:50:19 1999
@@ -64,10 +64,13 @@
 #undef HAVE_DLOPEN
 
 /* Define for pre Tcl 7.5 compat  */
-#undef HAVE_OLD_TCL
+#undef HAVE_PRE7_5_TCL
 
-/* Define for buggy Tcl threads  */
-#undef HAVE_BUGGY_TCL_THREADS
+/* Define for Tcl that has Tcl_Free() (7.5p1 and later)  */
+#undef HAVE_TCL_FREE
+
+/* Define for Tcl that has threads  */
+#undef HAVE_TCL_THREADS
 
 /* The number of bytes in a int.  */
 #undef SIZEOF_INT
diff -urNPX ../exclude ../eggdrop1.3.tmp/configure ./configure
--- ../eggdrop1.3.tmp/configure	Tue Oct 26 15:56:10 1999
+++ ./configure	Tue Oct 26 18:40:34 1999
@@ -1408,17 +1408,17 @@
 	echo "$ac_t""   Digital OSF" 1>&6
 	if test "x$AWK" = "xgawk"
 	then
-	  AWK="awk"
+	  AWK=awk
 	fi
 	if test "x$INSTALL" = "x./install-sh"
 	then
-	  INSTALL="installbsd"
+	  INSTALL=installbsd
 	fi
-	MOD_CC="cc"
-	MOD_LD="cc"
-	SHLIB_CC="cc"
+	MOD_CC=cc
+	MOD_LD=cc
+	SHLIB_CC=cc
 	SHLIB_LD="ld -shared -expect_unresolved '*'"
-	SHLIB_STRIP="touch"
+	SHLIB_STRIP=touch
 	cat >> confdefs.h <<\EOF
 #define MODULES_OK 1
 EOF
@@ -3178,40 +3178,81 @@
 if test "x${TCL_VER_PRE75}" = "xyes"
 then
   cat >> confdefs.h <<\EOF
-#define HAVE_OLD_TCL 1
+#define HAVE_PRE7_5_TCL 1
 EOF
 
 fi
 
-# check for Tcl threads
-echo $ac_n "checking for Tcl threads""... $ac_c" 1>&6
-echo "configure:3189: checking for Tcl threads" >&5
-TCL_VER_POST81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 8) && (i[2] >= 1)) || (i[1] >= 9)) print "yes"; else print "no"}'`
-if test "x${TCL_VER_POST81}" = "xyes"
+# set TCL_TESTLIBS for Tcl library tests
+if test ! "x${TCLLIBEXT}" = "x.a"
+then
+  TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
+else
+  if test ! "x${tcllibname}" = "x"
+  then
+    TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
+  else
+    TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
+  fi
+fi
+if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
+then
+  TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"
+fi
+
+# check for Tcl_Free()
+echo $ac_n "checking if Tcl library has Tcl_Free""... $ac_c" 1>&6
+echo "configure:3206: checking if Tcl library has Tcl_Free" >&5
+if eval "test \"`echo '$''{'ac_cv_var_tcl_free'+set}'`\" = set"
 then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+  LIBS="$TCL_TESTLIBS"
+  cat > conftest.$ac_ext << EOF
+#include "confdefs.h"
+char Tcl_Free();
 
-  # check for TclpFinalizeThreadData()
-  if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
+int main() {
+  Tcl_Free();
+  return 0;
+}
+EOF
+  if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
   then
-    echo $ac_n "(cached) $ac_c" 1>&6
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_free=yes"
   else
-    ac_save_LIBS="$LIBS"
-    if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
-    then
-      LIBS="-lpthread $LIBS"
-    fi
-    if test ! "x${TCLLIBEXT}" = "x.a"
-    then
-      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
-    else
-      if test ! "x${tcllibname}" = "x"
-      then
-	LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
-      else
-	LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
-      fi
-    fi
-    cat > conftest.$ac_ext << EOF
+    echo "configure: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_free=no"
+  fi
+  rm -f conftest*
+  LIBS="$ac_save_LIBS"
+fi
+
+if test "x${ac_cv_var_tcl_free}" = "xyes"
+then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_TCL_FREE 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# check for TclpFinalizeThreadData()
+echo $ac_n "checking if Tcl library has threads""... $ac_c" 1>&6
+echo "configure:3249: checking if Tcl library has threads" >&5
+if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
+then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+  LIBS="$TCL_TESTLIBS"
+  cat > conftest.$ac_ext << EOF
 #include "confdefs.h"
 char TclpFinalizeThreadData();
 
@@ -3220,19 +3261,18 @@
   return 0;
 }
 EOF
-    if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
-    then
-      rm -rf conftest*
-      eval "ac_cv_var_tcl_threads=yes"
-    else
-      echo "configure: failed program was:" >&5
-      cat conftest.$ac_ext >&5
-      rm -rf conftest*
-      eval "ac_cv_var_tcl_threads=no"
-    fi
-    rm -f conftest*
-    LIBS="$ac_save_LIBS"
+  if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
+  then
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_threads=yes"
+  else
+    echo "configure: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_threads=no"
   fi
+  rm -f conftest*
+  LIBS="$ac_save_LIBS"
 fi
 
 if test "x${ac_cv_var_tcl_threads}" = "xyes"
@@ -3246,7 +3286,7 @@
 
 EOF
   cat >> confdefs.h <<\EOF
-#define HAVE_BUGGY_TCL_THREADS 1
+#define HAVE_TCL_THREADS 1
 EOF
 
 
diff -urNPX ../exclude ../eggdrop1.3.tmp/configure.in ./configure.in
--- ../eggdrop1.3.tmp/configure.in	Tue Oct 26 15:56:10 1999
+++ ./configure.in	Tue Oct 26 18:37:17 1999
@@ -732,39 +732,74 @@
 changequote([, ])dnl
 if test "x${TCL_VER_PRE75}" = "xyes"
 then
-  AC_DEFINE(HAVE_OLD_TCL)
+  AC_DEFINE(HAVE_PRE7_5_TCL)
 fi
 
-# check for Tcl threads
-AC_MSG_CHECKING(for Tcl threads)
-changequote(,)dnl
-TCL_VER_POST81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 8) && (i[2] >= 1)) || (i[1] >= 9)) print "yes"; else print "no"}'`
-changequote([, ])dnl
-if test "x${TCL_VER_POST81}" = "xyes"
+# set TCL_TESTLIBS for Tcl library tests
+if test ! "x${TCLLIBEXT}" = "x.a"
 then
+  TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
+else
+  if test ! "x${tcllibname}" = "x"
+  then
+    TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
+  else
+    TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
+  fi
+fi
+if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
+then
+  TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"
+fi
 
-  # check for TclpFinalizeThreadData()
-  if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
+# check for Tcl_Free()
+AC_MSG_CHECKING(if Tcl library has Tcl_Free)
+if eval "test \"`echo '$''{'ac_cv_var_tcl_free'+set}'`\" = set"
+then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+  LIBS="$TCL_TESTLIBS"
+  cat > conftest.$ac_ext << EOF
+#include "confdefs.h"
+char Tcl_Free();
+
+int main() {
+  Tcl_Free();
+  return 0;
+}
+EOF
+  if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
   then
-    echo $ac_n "(cached) $ac_c" 1>&6
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_free=yes"
   else
-    ac_save_LIBS="$LIBS"
-    if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
-    then
-      LIBS="-lpthread $LIBS"
-    fi
-    if test ! "x${TCLLIBEXT}" = "x.a"
-    then
-      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
-    else
-      if test ! "x${tcllibname}" = "x"
-      then
-	LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
-      else
-	LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
-      fi
-    fi
-    cat > conftest.$ac_ext << EOF
+    echo "configure: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_free=no"
+  fi
+  rm -f conftest*
+  LIBS="$ac_save_LIBS"
+fi
+
+if test "x${ac_cv_var_tcl_free}" = "xyes"
+then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_TCL_FREE)
+else
+  AC_MSG_RESULT(no)
+fi
+
+# check for TclpFinalizeThreadData()
+AC_MSG_CHECKING(if Tcl library has threads)
+if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
+then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+  LIBS="$TCL_TESTLIBS"
+  cat > conftest.$ac_ext << EOF
 #include "confdefs.h"
 char TclpFinalizeThreadData();
 
@@ -773,19 +808,18 @@
   return 0;
 }
 EOF
-    if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
-    then
-      rm -rf conftest*
-      eval "ac_cv_var_tcl_threads=yes"
-    else
-      echo "configure: failed program was:" >&5
-      cat conftest.$ac_ext >&5
-      rm -rf conftest*
-      eval "ac_cv_var_tcl_threads=no"
-    fi
-    rm -f conftest*
-    LIBS="$ac_save_LIBS"
+  if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
+  then
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_threads=yes"
+  else
+    echo "configure: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+    rm -rf conftest*
+    eval "ac_cv_var_tcl_threads=no"
   fi
+  rm -f conftest*
+  LIBS="$ac_save_LIBS"
 fi
 
 if test "x${ac_cv_var_tcl_threads}" = "xyes"
@@ -798,7 +832,7 @@
   There are known problems, but we will attempt to work around them.
 
 EOF
-  AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
+  AC_DEFINE(HAVE_TCL_THREADS)
 
   # add -lpthread to $LIBS if we have it
   if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/chanprog.c ./src/chanprog.c
--- ../eggdrop1.3.tmp/src/chanprog.c	Tue Oct 26 15:42:24 1999
+++ ./src/chanprog.c	Tue Oct 26 17:01:02 1999
@@ -598,7 +598,7 @@
     argv[2] = id;
     x = Tcl_Merge(3, argv);
     Tcl_AppendElement(irp, x);
-    n_free(x, "", 0);
+    Tcl_Free((char *) x);
     mark = mark->next;
   }
 }
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/main.c ./src/main.c
--- ../eggdrop1.3.tmp/src/main.c	Tue Oct 26 15:42:24 1999
+++ ./src/main.c	Tue Oct 26 16:49:23 1999
@@ -766,7 +766,7 @@
     int socket_cleanup = 0;
 
     context;
-#if !defined(HAVE_OLD_TCL) && !defined(HAVE_BUGGY_TCL_THREADS)
+#if !defined(HAVE_PRE7_5_TCL) && !defined(HAVE_TCL_THREADS)
     /* process a single tcl event */
     Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT);
 #endif
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/main.h ./src/main.h
--- ../eggdrop1.3.tmp/src/main.h	Tue Oct 26 15:42:24 1999
+++ ./src/main.h	Tue Oct 26 17:00:08 1999
@@ -10,7 +10,7 @@
 #endif
 
 /* UGH! Why couldn't Tcl pick a standard? */
-#if !defined(HAVE_OLD_TCL) && defined(__STDC__)
+#if !defined(HAVE_PRE7_5_TCL) && defined(__STDC__)
 #  ifdef HAVE_STDARG_H
 #    include <stdarg.h>
 #  else
@@ -26,6 +26,11 @@
 #  define EGG_VARARGS(type, name) ()
 #  define EGG_VARARGS_DEF(type, name) (va_alist) va_dcl
 #  define EGG_VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
+#endif
+
+/* For pre Tcl7.5p1 versions */
+#ifndef HAVE_TCL_FREE
+#  define Tcl_Free(x) n_free(x, "", 0)
 #endif
 
 #include <stdio.h>
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mem.c ./src/mem.c
--- ../eggdrop1.3.tmp/src/mem.c	Tue Oct 26 15:42:24 1999
+++ ./src/mem.c	Tue Oct 26 14:10:07 1999
@@ -51,7 +51,7 @@
 #define DP_HELP         0x7FF4
 
 /* prototypes */
-#if !defined(HAVE_OLD_TCL) && defined(__STDC__)
+#if !defined(HAVE_PRE7_5_TCL) && defined(__STDC__)
 void dprintf(int arg1, ...);
 void putlog(int arg1, ...);
 #else
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mod/channels.mod/channels.c ./src/mod/channels.mod/channels.c
--- ../eggdrop1.3.tmp/src/mod/channels.mod/channels.c	Tue Oct 26 15:42:25 1999
+++ ./src/mod/channels.mod/channels.c	Tue Oct 26 17:03:01 1999
@@ -678,7 +678,7 @@
       }
     }
     if (item) /* hmm it cant be 0 */
-      Tcl_Free((char*) item);
+      Tcl_Free((char *) item);
     Tcl_SetVar2(interp, name1, name2, glob_chanset, TCL_GLOBAL_ONLY);
   }
   return NULL;
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mod/channels.mod/tclchan.c ./src/mod/channels.mod/tclchan.c
--- ../eggdrop1.3.tmp/src/mod/channels.mod/tclchan.c	Tue Oct 26 15:42:25 1999
+++ ./src/mod/channels.mod/tclchan.c	Tue Oct 26 17:02:48 1999
@@ -1140,7 +1140,7 @@
     list[5] = m->user;
     p = Tcl_Merge(6, list);
     Tcl_AppendElement(irp, p);
-    n_free(p, "", 0);
+    Tcl_Free((char *) p);
     m = m->next;
   }
   
@@ -1496,7 +1496,7 @@
   if ((tcl_channel_modify(irp, chan, items, item) != TCL_OK) && !chan_hack) {
     ret = TCL_ERROR;
   }
-  Tcl_Free((char*) item);
+  Tcl_Free((char *) item);
   if (join && !channel_inactive(chan) && module_find("irc", 0, 0))
     dprintf(DP_SERVER, "JOIN %s %s\n", chan->name, chan->key_prot);
   return ret; 
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mod/irc.mod/tclirc.c ./src/mod/irc.mod/tclirc.c
--- ../eggdrop1.3.tmp/src/mod/irc.mod/tclirc.c	Tue Oct 26 15:42:25 1999
+++ ./src/mod/irc.mod/tclirc.c	Tue Oct 26 17:02:56 1999
@@ -316,8 +316,7 @@
     list[2] = work;
     p = Tcl_Merge(3, list);
     Tcl_AppendElement(irp, p);
-    n_free(p, "", 0);
-    
+    Tcl_Free((char *) p);
     m = m->next;
   }
   
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mod/notes.mod/notes.c ./src/mod/notes.mod/notes.c
--- ../eggdrop1.3.tmp/src/mod/notes.mod/notes.c	Tue Oct 26 15:42:25 1999
+++ ./src/mod/notes.mod/notes.c	Tue Oct 26 17:02:36 1999
@@ -694,7 +694,7 @@
 	    list[2] = s1;
 	    p = Tcl_Merge(3, list);
 	    Tcl_AppendElement(irp, p);
-	    n_free(p, "", 0);
+	    Tcl_Free((char *) p);
 	  }
 	}
       }
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mod/server.mod/server.c ./src/mod/server.mod/server.c
--- ../eggdrop1.3.tmp/src/mod/server.mod/server.c	Tue Oct 26 15:42:25 1999
+++ ./src/mod/server.mod/server.c	Tue Oct 26 17:02:52 1999
@@ -684,7 +684,7 @@
 	curserv = (-1);
 	next_server(&curserv, dcc[servidx].host, &dcc[servidx].port, "");
       }
-      n_free(list, "", 0);
+      Tcl_Free((char *) list);
     }
   }
   context;
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/modules.c ./src/modules.c
--- ../eggdrop1.3.tmp/src/modules.c	Tue Oct 26 15:42:24 1999
+++ ./src/modules.c	Tue Oct 26 14:10:01 1999
@@ -599,7 +599,7 @@
     return "Can't load module.";
 #else
 #ifdef OSF1_HACKS
-#ifndef HAVE_OLD_TCL
+#ifndef HAVE_PRE7_5_TCL
   hand = (Tcl_PackageInitProc *) load(workbuf, LDR_NOFLAGS);
   if (hand == LDR_NULL_MODULE)
     return "Can't load module.";
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/tcl.c ./src/tcl.c
--- ../eggdrop1.3.tmp/src/tcl.c	Tue Oct 26 15:42:24 1999
+++ ./src/tcl.c	Tue Oct 26 14:10:39 1999
@@ -462,7 +462,7 @@
  * smoking?!) so we gotta initialize the Tcl interpreter */
 void init_tcl()
 {
-#ifndef HAVE_OLD_TCL
+#ifndef HAVE_PRE7_5_TCL
   int i;
   char pver[1024] = "";
 #endif
@@ -479,7 +479,7 @@
   add_tcl_commands(tcldcc_cmds);
   add_tcl_commands(tclmisc_cmds);
   Tcl_CreateCommand(interp, "logfile", tcl_logfile, NULL, NULL);
-#ifndef HAVE_OLD_TCL
+#ifndef HAVE_PRE7_5_TCL
   /* add eggdrop to Tcl's package list */
   for (i = 0; i <= strlen(egg_version); i++) {
     if ((egg_version[i] == ' ') || (egg_version[i] == '+'))
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/tcldcc.c ./src/tcldcc.c
--- ../eggdrop1.3.tmp/src/tcldcc.c	Tue Oct 26 15:42:24 1999
+++ ./src/tcldcc.c	Tue Oct 26 17:00:50 1999
@@ -613,7 +613,7 @@
     sh[0] = bot->share;
     p = Tcl_Merge(4, list);
     Tcl_AppendElement(irp, p);
-    n_free(p, "", 0);
+    Tcl_Free((char *) p);
   }
   return TCL_OK;
 }
@@ -649,7 +649,7 @@
       list[5] = timestamp;
       p = Tcl_Merge(6, list);
       Tcl_AppendElement(irp, p);
-      n_free(p, "", 0);
+      Tcl_Free((char *) p);
     }
   }
   return TCL_OK;
@@ -700,7 +700,7 @@
 	}
 	p = Tcl_Merge((chan == -1) ? 7 : 6, list);
 	Tcl_AppendElement(irp, p);
-	n_free(p, "", 0);
+	Tcl_Free((char *) p);
       }
     }
   for (i = 0; i < parties; i++) {
@@ -723,7 +723,7 @@
       }
       p = Tcl_Merge((chan == -1) ? 7 : 6, list);
       Tcl_AppendElement(irp, p);
-      n_free(p, "", 0);
+      Tcl_Free((char *) p);
     }
   }
   return TCL_OK;
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/tclmisc.c ./src/tclmisc.c
--- ../eggdrop1.3.tmp/src/tclmisc.c	Tue Oct 26 15:42:24 1999
+++ ./src/tclmisc.c	Tue Oct 26 17:01:13 1999
@@ -445,10 +445,10 @@
     }
     p = Tcl_Merge(i, list);
     Tcl_AppendElement(irp, p);
-    n_free(p, "", 0);
+    Tcl_Free((char *) p);
     while (i > 2) {
       i--;
-      n_free(list[i], "", 0);
+      Tcl_Free((char *) list[i]);
     }
   }
   return TCL_OK;
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/tcluser.c ./src/tcluser.c
--- ../eggdrop1.3.tmp/src/tcluser.c	Tue Oct 26 15:42:25 1999
+++ ./src/tcluser.c	Tue Oct 26 17:00:55 1999
@@ -466,7 +466,7 @@
     list[4] = i->user;
     p = Tcl_Merge(5, list);
     Tcl_AppendElement(irp, p);
-    n_free(p, "", 0);
+    Tcl_Free((char *) p);
   }
   return TCL_OK;
 }
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/userent.c ./src/userent.c
--- ../eggdrop1.3.tmp/src/userent.c	Tue Oct 26 15:42:25 1999
+++ ./src/userent.c	Tue Oct 26 17:01:21 1999
@@ -836,7 +836,7 @@
 	dprintf(idx, "  %s: %s\n", xk->key, xk->data);
     }
   }
-  n_free(list, "", 0);
+  Tcl_Free((char *) list);
   context;
 }
 
@@ -937,7 +937,7 @@
     list[1] = x->data;
     p = Tcl_Merge(2, list);
     Tcl_AppendElement(irp, p);
-    n_free(p, "", 0);
+    Tcl_Free((char *) p);
   }
   return TCL_OK;
 }


More information about the Patches mailing list