[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.iavalley.cc.ia.us
Sun Mar 18 17:01:02 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-03-18 23:00:42 UTC
Commited by: guppy

Modified files:
     src/botmsg.c src/dccutil.c src/misc.c src/modules.c src/patch.h
     src/proto.h src/mod/module.h src/mod/channels.mod/tclchan.c

Log message:

here is wingman's bug fix, yay

---------------------- diff included ----------------------
Index: eggdrop1.6/src/botmsg.c
diff -u eggdrop1.6/src/botmsg.c:1.19 eggdrop1.6/src/botmsg.c:1.20
--- eggdrop1.6/src/botmsg.c:1.19	Sat Mar 10 00:36:20 2001
+++ eggdrop1.6/src/botmsg.c	Sun Mar 18 17:00:31 2001
@@ -5,7 +5,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: botmsg.c,v 1.19 2001/03/10 06:36:20 guppy Exp $
+ * $Id: botmsg.c,v 1.20 2001/03/18 23:00:31 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -59,7 +59,7 @@
   s[len + 1] = 0;  
 
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  len = str_utf8tounicode(s);
+  str_nutf8tounicode(s, sizeof s);
 #endif    
 
   for (i = 0; i < dcc_total; i++)
@@ -313,7 +313,7 @@
   tbuf[len + 1] = 0;    
 
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  len = str_utf8tounicode(tbuf);
+  str_nutf8tounicode(tbuf, sizeof tbuf);
 #endif    
 
   if (tobot) {
Index: eggdrop1.6/src/dccutil.c
diff -u eggdrop1.6/src/dccutil.c:1.28 eggdrop1.6/src/dccutil.c:1.29
--- eggdrop1.6/src/dccutil.c:1.28	Sat Mar 10 00:36:20 2001
+++ eggdrop1.6/src/dccutil.c	Sun Mar 18 17:00:31 2001
@@ -6,7 +6,7 @@
  *   memory management for dcc structures
  *   timeout checking for dcc connections
  * 
- * $Id: dccutil.c,v 1.28 2001/03/10 06:36:20 guppy Exp $
+ * $Id: dccutil.c,v 1.29 2001/03/18 23:00:31 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -122,7 +122,7 @@
   buf[len + 1] = 0;
 
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  len = str_utf8tounicode(buf);
+  str_nutf8tounicode(buf, sizeof buf);
 #endif
 
   if (idx < 0) {
@@ -180,10 +180,6 @@
     len = 511;
   s[len + 1] = 0;    
 
-#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  len = str_utf8tounicode(s);
-#endif
-
   for (i = 0; i < dcc_total; i++)
     if (dcc[i].type == &DCC_CHAT)
       if (dcc[i].u.chat->channel >= 0)
@@ -210,10 +206,6 @@
     len = 511;
   s[len + 1] = 0; 
     
-#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  len = str_utf8tounicode(s);
-#endif  
-
   for (i = 0; i < dcc_total; i++)
     if ((dcc[i].type == &DCC_CHAT) && (i != x))
       if (dcc[i].u.chat->channel == chan)
Index: eggdrop1.6/src/misc.c
diff -u eggdrop1.6/src/misc.c:1.36 eggdrop1.6/src/misc.c:1.37
--- eggdrop1.6/src/misc.c:1.36	Sat Mar 10 00:36:20 2001
+++ eggdrop1.6/src/misc.c	Sun Mar 18 17:00:31 2001
@@ -7,7 +7,7 @@
  *   help system
  *   motd display and %var substitution
  * 
- * $Id: misc.c,v 1.36 2001/03/10 06:36:20 guppy Exp $
+ * $Id: misc.c,v 1.37 2001/03/18 23:00:31 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -371,14 +371,13 @@
 }
 
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-/* Converts an UTF-8 string to unicode safe string,
- * returns the length of the unicode string
+/* Converts an UTF-8 string to unicode safe string
  */
-int str_utf8tounicode(char *str)
-{
+void str_nutf8tounicode(char *str, int len)
+{  
   Tcl_DString       ds_conversion;
   Tcl_SavedResult   sr_oldresult;
-
+  
   /* Don't call this before calling init_tcl() */
   if (interp) {
     Tcl_DStringInit(&ds_conversion);
@@ -392,7 +391,7 @@
     /* convert UTF-8 to unicode */
     Tcl_UtfToExternalDString(NULL, str, -1, &ds_conversion);
     Tcl_DStringResult(interp, &ds_conversion);
-    strncpyz(str, interp->result, strlen(str) + 1);
+    strncpyz(str, interp->result, len);
 
     /* restore our old result */
     Tcl_RestoreResult(interp, &sr_oldresult);
@@ -400,8 +399,6 @@
     /* free our DString buffers */
     Tcl_DStringFree(&ds_conversion);
   }
-
-  return strlen(str);
 }
 #endif
 
@@ -412,10 +409,6 @@
   char		*p = data, *q, *n, c;
   const int	 max_data_len = 500 - strlen(prefix);
   
-#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  str_utf8tounicode(p);
-#endif
-
   if (!*data) {
     dprintf(idx, "%s\n", prefix);
     return;
Index: eggdrop1.6/src/mod/channels.mod/tclchan.c
diff -u eggdrop1.6/src/mod/channels.mod/tclchan.c:1.43 eggdrop1.6/src/mod/channels.mod/tclchan.c:1.44
--- eggdrop1.6/src/mod/channels.mod/tclchan.c:1.43	Sat Mar 10 00:36:20 2001
+++ eggdrop1.6/src/mod/channels.mod/tclchan.c	Sun Mar 18 17:00:32 2001
@@ -1,7 +1,7 @@
 /* 
  * tclchan.c -- part of channels.mod
  * 
- * $Id: tclchan.c,v 1.43 2001/03/10 06:36:20 guppy Exp $
+ * $Id: tclchan.c,v 1.44 2001/03/18 23:00:32 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -1563,16 +1563,17 @@
   if (!newname || !newname[0] || !strchr(CHANMETA, newname[0]))
     return TCL_ERROR;
 
-#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  str_utf8tounicode(newname);
-  str_utf8tounicode(options);
-#endif
-
   convert_element(glob_chanmode, buf2);
   simple_sprintf(buf, "chanmode %s ", buf2);
   strncat(buf, glob_chanset, 2047 - strlen(buf));
   strncat(buf, options, 2047 - strlen(buf));
   buf[2047] = 0;
+#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
+  str_nutf8tounicode(newname, strlen(newname) + 1);
+  str_nutf8tounicode(buf2, sizeof buf2);
+  str_nutf8tounicode(buf, sizeof buf);
+#endif
+
   if (Tcl_SplitList(NULL, buf, &items, &item) != TCL_OK)
     return TCL_ERROR;
   if ((chan = findchan_by_dname(newname))) {
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.42 eggdrop1.6/src/mod/module.h:1.43
--- eggdrop1.6/src/mod/module.h:1.42	Sun Mar 11 15:00:34 2001
+++ eggdrop1.6/src/mod/module.h	Sun Mar 18 17:00:32 2001
@@ -1,7 +1,7 @@
 /* 
  * module.h
  * 
- * $Id: module.h,v 1.42 2001/03/11 21:00:34 guppy Exp $
+ * $Id: module.h,v 1.43 2001/03/18 23:00:32 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -432,7 +432,7 @@
 #define egg_strcatn ((int (*)(char *dst, const char *src, size_t max))global[265])
 #define clear_chanlist_member ((void (*)(const char *nick))global[266])
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-#define str_utf8tounicode ((int (*)(char *))global[267])
+#define str_nutf8tounicode ((int (*)(char *str, int len))global[267])
 #endif
 
 /* This is for blowfish module, couldnt be bothered making a whole new .h
Index: eggdrop1.6/src/modules.c
diff -u eggdrop1.6/src/modules.c:1.47 eggdrop1.6/src/modules.c:1.48
--- eggdrop1.6/src/modules.c:1.47	Sun Mar 11 15:00:34 2001
+++ eggdrop1.6/src/modules.c	Sun Mar 18 17:00:31 2001
@@ -4,7 +4,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: modules.c,v 1.47 2001/03/11 21:00:34 guppy Exp $
+ * $Id: modules.c,v 1.48 2001/03/18 23:00:31 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -529,7 +529,7 @@
   (Function) egg_strcatn,
   (Function) clear_chanlist_member,
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-  (Function) str_utf8tounicode
+  (Function) str_nutf8tounicode
 #else
   (Function) 0
 #endif
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.445 eggdrop1.6/src/patch.h:1.446
--- eggdrop1.6/src/patch.h:1.445	Sat Mar 17 17:20:57 2001
+++ eggdrop1.6/src/patch.h	Sun Mar 18 17:00:31 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  * 
- * $Id: patch.h,v 1.445 2001/03/17 23:20:57 guppy Exp $
+ * $Id: patch.h,v 1.446 2001/03/18 23:00:31 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("984872094");		/* current unixtime */
+patch("984957177");		/* current unixtime */
 /*
  *
  *
  */
-patch("typos");
+patch("strfix");
 /*
  *
  *
Index: eggdrop1.6/src/proto.h
diff -u eggdrop1.6/src/proto.h:1.39 eggdrop1.6/src/proto.h:1.40
--- eggdrop1.6/src/proto.h:1.39	Sun Mar 11 15:00:34 2001
+++ eggdrop1.6/src/proto.h	Sun Mar 18 17:00:31 2001
@@ -7,7 +7,7 @@
  * because they use structures in those
  * (saves including those .h files EVERY time) - Beldin
  * 
- * $Id: proto.h,v 1.39 2001/03/11 21:00:34 guppy Exp $
+ * $Id: proto.h,v 1.40 2001/03/18 23:00:31 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -233,7 +233,7 @@
 char *strchr_unescape(char *str, const char div, register const char esc_char);
 void str_unescape(char *str, register const char esc_char);
 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 1
-int str_utf8tounicode(char *str);
+void str_nutf8tounicode(char *str, int len);
 #endif
 
 /* net.c */
----------------------- End of diff -----------------------



More information about the Changes mailing list