changeset 25949:5725b3190905

Fix compile errors from the merge. Untested protocols: msnp9, sametime, silc, silc10, zephyr. Also, toc doesn't work either, but I don't know how to fix it.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 02 Mar 2009 06:17:44 +0000
parents 53bfa3d67739
children ecc098dc6563
files libpurple/plugins/tcl/tcl_cmds.c libpurple/protocols/oscar/family_icbm.c libpurple/protocols/toc/toc.c
diffstat 3 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/tcl/tcl_cmds.c	Mon Mar 02 04:38:05 2009 +0000
+++ b/libpurple/plugins/tcl/tcl_cmds.c	Mon Mar 02 06:17:44 2009 +0000
@@ -1495,9 +1495,12 @@
 	enum { CMD_STATUS_ATTR, CMD_STATUS_TYPE } cmd;
 	PurpleStatus *status;
 	PurpleStatusType *status_type;
+	int error;
+#if !(defined PURPLE_DISABLE_DEPRECATED)
 	PurpleValue *value;
 	const char *attr;
-	int error, v;
+	int v;
+#endif
 
 	if (objc < 2) {
 		Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?");
@@ -1509,6 +1512,7 @@
 
 	switch (cmd) {
 	case CMD_STATUS_ATTR:
+#if !(defined PURPLE_DISABLE_DEPRECATED)
 		if (objc != 4 && objc != 5) {
 			Tcl_WrongNumArgs(interp, 2, objv, "status attr_id ?value?");
 			return TCL_ERROR;
@@ -1554,6 +1558,7 @@
                                          Tcl_NewStringObj("attribute has unknown type", -1));
 			return TCL_ERROR;
 		}
+#endif
 		break;
 	case CMD_STATUS_TYPE:
 		if (objc != 3) {
@@ -1727,6 +1732,7 @@
 						  (purple_status_type_get_primitive(status_type)), -1));
 		break;
 	case CMD_STATUS_TYPE_PRIMARY_ATTR:
+#if !(defined PURPLE_DISABLE_DEPRECATED)
 		if (objc != 3) {
 			Tcl_WrongNumArgs(interp, 2, objv, "statustype");
 			return TCL_ERROR;
@@ -1735,6 +1741,7 @@
 			return TCL_ERROR;
 		Tcl_SetObjResult(interp,
 				 Tcl_NewStringObj(purple_status_type_get_primary_attr(status_type), -1));
+#endif
 		break;
 	case CMD_STATUS_TYPE_SAVEABLE:
 		if (objc != 3) {
--- a/libpurple/protocols/oscar/family_icbm.c	Mon Mar 02 04:38:05 2009 +0000
+++ b/libpurple/protocols/oscar/family_icbm.c	Mon Mar 02 06:17:44 2009 +0000
@@ -1625,7 +1625,7 @@
 
 			if (magic1 != 0x501)
 			{
-				purple_debug_misc("oscar", "Received an IM containing an invalid message part from %s.  They are probably trying to do something malicious.\n", userinfo->sn);
+				purple_debug_misc("oscar", "Received an IM containing an invalid message part from %s.  They are probably trying to do something malicious.\n", userinfo->bn);
 				break;
 			}
 
@@ -1654,7 +1654,7 @@
 			magic1 = byte_stream_get16(bs); /* 01 01 */
 			if (magic1 != 0x101) /* Bad, message comes before attributes */
 			{
-				purple_debug_misc("oscar", "Received an IM containing an invalid message part from %s.  They are probably trying to do something malicious.\n", userinfo->sn);
+				purple_debug_misc("oscar", "Received an IM containing an invalid message part from %s.  They are probably trying to do something malicious.\n", userinfo->bn);
 				break;
 			}
 			msglen = byte_stream_get16(bs);
--- a/libpurple/protocols/toc/toc.c	Mon Mar 02 04:38:05 2009 +0000
+++ b/libpurple/protocols/toc/toc.c	Mon Mar 02 06:17:44 2009 +0000
@@ -119,7 +119,7 @@
 
 #define TOC_CONNECT_STEPS 3
 
-static void toc_login_callback(gpointer, gint, PurpleInputCondition);
+static void toc_login_callback(gpointer, gint, const gchar *);
 static void toc_callback(gpointer, gint, PurpleInputCondition);
 
 /* ok. this function used to take username/password, and return 0 on success.
@@ -152,7 +152,7 @@
 	}
 }
 
-static void toc_login_callback(gpointer data, gint source, PurpleInputCondition cond)
+static void toc_login_callback(gpointer data, gint source, const gchar *error_message)
 {
 	PurpleConnection *gc = data;
 	struct toc_data *tdt;
@@ -260,7 +260,8 @@
 	}
 }
 
-char *escape_message(const char *msg)
+static char *
+escape_message(const char *msg)
 {
 	char *ret;
 	int i, j;
@@ -305,7 +306,8 @@
  * Duplicates the input string, replacing each \n with a <BR>, and 
  * escaping a few other characters.
  */
-char *escape_text(const char *msg)
+static char *
+escape_text(const char *msg)
 {
 	char *ret;
 	int i, j;
@@ -435,7 +437,7 @@
 	if (buflen < ntohs(hdr->len)) {
 		/* fake like there's a read error */
 		purple_debug(PURPLE_DEBUG_ERROR, "toc",
-				   "buffer too small (have %d, need %d)\n",
+				   "buffer too small (have %" G_GSIZE_FORMAT ", need %d)\n",
 				   buflen, ntohs(hdr->len));
 		return -1;
 	}