changeset 4298:cddb50734169

[gaim-migrate @ 4552] faceprint cleans up after my messes committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 11 Jan 2003 19:59:27 +0000
parents 650454171e0e
children 6c67b7bfe6cf
files configure.ac configure.in plugins/idle.c src/core.h src/gtkimhtml.c src/perl.c src/prefs.c src/protocols/gg/libgg.c src/protocols/zephyr/Makefile.am src/prpl.c src/themes.c src/ui.h
diffstat 12 files changed, 61 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sat Jan 11 16:47:58 2003 +0000
+++ b/configure.ac	Sat Jan 11 19:59:27 2003 +0000
@@ -240,6 +240,16 @@
 	dnl This is almost definitely wrong, but in case there's
 	dnl something I'm missing, I'll leave it in.
 	AC_CHECK_FUNCS(Perl_eval_pv)
+
+	AC_MSG_CHECKING(for old perl)
+	PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
+
+	if test "$PERL_OLD" = "yes"; then
+		AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
+		AC_MSG_RESULT(yes)
+	else
+		AC_MSG_RESULT(no)
+	fi
 else
 	PERL_CFLAGS=
 	PERL_LIBS=
--- a/configure.in	Sat Jan 11 16:47:58 2003 +0000
+++ b/configure.in	Sat Jan 11 19:59:27 2003 +0000
@@ -226,6 +226,15 @@
 		AC_SUBST(PERL_LIBS)
 		AC_DEFINE(USE_PERL, 1, [Define if Perl is enabled.])
 		AC_CHECK_FUNCS(Perl_eval_pv)
+
+		AC_MSG_CHECKING(for old perl)
+		PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
+		if test "$PERL_OLD" = "yes"; then
+			AC_DEFINE(OLD_PERL)
+			AC_MSG_RESULT(yes)
+		else
+			AC_MSG_RESULT(no)
+		fi
 	fi
 fi
 
--- a/plugins/idle.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/plugins/idle.c	Sat Jan 11 19:59:27 2003 +0000
@@ -12,7 +12,6 @@
 #include "multi.h"
 #include "gaim.h"
 #include <sys/time.h>
-#include "pixmaps/ok.xpm"
 
 static struct gaim_connection *gc = NULL;
 
--- a/src/core.h	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/core.h	Sat Jan 11 19:59:27 2003 +0000
@@ -216,7 +216,7 @@
 extern void perl_unload_file(struct gaim_plugin *);
 extern void unload_perl_scripts();
 extern void list_perl_scripts();
-extern struct gaim_plugin *probe_perl(const char *);
+extern struct gaim_plugin *probe_perl(char *);
 #endif
 
 /* Functions in plugins.c */
--- a/src/gtkimhtml.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/gtkimhtml.c	Sat Jan 11 19:59:27 2003 +0000
@@ -238,6 +238,7 @@
 	}
 }
 
+/* this isn't used yet
 static void
 gtk_smiley_tree_remove (GtkSmileyTree     *tree,
 			GtkIMHtmlSmiley   *smiley)
@@ -265,6 +266,8 @@
 		t->image = NULL;
 	}
 }
+*/
+
 
 static gint
 gtk_smiley_tree_lookup (GtkSmileyTree *tree,
--- a/src/perl.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/perl.c	Sat Jan 11 19:59:27 2003 +0000
@@ -66,8 +66,11 @@
 #undef group
 
 /* perl module support */
-extern void xs_init _((void));
-extern void boot_DynaLoader _((CV * cv)); /* perl is so wacky */
+#ifdef OLD_PERL
+extern void boot_DynaLoader _((CV * cv));
+#else
+extern void boot_DynaLoader _((pTHX_ CV * cv)); /* perl is so wacky */
+#endif
 
 #undef _
 #ifdef DEBUG
@@ -130,14 +133,19 @@
 /* play sound */
 XS(XS_GAIM_play_sound); /*play a sound*/
 
-void xs_init()
+static void
+#ifdef OLD_PERL
+xs_init()
+#else
+xs_init(pTHX)
+#endif
 {
 	char *file = __FILE__;
 
 	/* This one allows dynamic loading of perl modules in perl
            scripts by the 'use perlmod;' construction*/
 	newXS ("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
-	
+
 	/* load up all the custom Gaim perl functions */
 		newXS ("GAIM::register", XS_GAIM_register, "GAIM");
 	newXS ("GAIM::get_info", XS_GAIM_get_info, "GAIM");
@@ -255,7 +263,7 @@
 
 	GList *pl = perl_list;
 
-	debug_printf("Unloading %s\n", plug->handle);
+	debug_printf("Unloading %s\n", plug->path);
 	while (pl) {
 		scp = pl->data;
 		if (scp->plug == plug) {
@@ -304,7 +312,7 @@
 int perl_load_file(char *script_name)
 {
 	char *atmp[2] = { script_name, NULL }; /* see execute_perl --et */
-	struct gaim_plugin *plug;
+	struct gaim_plugin *plug = NULL;
 	GList *p = probed_plugins;
 	GList *s;
 	struct perlscript *scp;
@@ -348,7 +356,7 @@
 	return ret;
 }
 
-struct gaim_plugin *probe_perl(const char *filename) {
+struct gaim_plugin *probe_perl(char *filename) {
 
 	/* XXX This woulld be much faster if I didn't create a new
 	 *     PerlInterpreter every time I probed a plugin */
@@ -488,9 +496,9 @@
 	char *name, *ver, *callback, *unused; /* exactly like X-Chat, eh? :) */
 	unsigned int junk;
 	struct perlscript *scp;
-	struct gaim_plugin *plug;
+	struct gaim_plugin *plug = NULL;
 	GList *pl = plugins;
-	
+
 	dXSARGS;
 	items = 0;
 
@@ -881,7 +889,7 @@
 
 	GList *handler;
 	struct _perl_event_handlers *data;
-	SV *handler_return;
+	int handler_return;
 	int i=0; /* necessary counter variable? --et */
 
 	switch (event) {
@@ -1090,6 +1098,7 @@
 	struct _perl_event_handlers *ehn;
 	GList *cur = perl_event_handlers;
 	dXSARGS;
+	items = 0;
 
 	while (cur) {
 		GList *next = cur->next;
@@ -1147,7 +1156,7 @@
 	if (p) {
 		handler = g_new0(struct _perl_timeout_handlers, 1);
 		timeout = 1000 * SvIV(ST(1));
-		debug_printf("Adding timeout for %d seconds.\n", timeout/1000);
+		debug_printf("Adding timeout for %ld seconds.\n", timeout/1000);
 		handler->plug = plug;
 		handler->handler_name = g_strdup(SvPV(ST(2), junk));
 		handler->handler_args = g_strdup(SvPV(ST(3), junk));
@@ -1164,6 +1173,8 @@
 	int id;
 	dXSARGS;
 
+	items = 0;
+
 	id = SvIV(ST(0));
 
 	play_sound(id);
--- a/src/prefs.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/prefs.c	Sat Jan 11 19:59:27 2003 +0000
@@ -200,7 +200,7 @@
 
 static void smiley_sel (GtkTreeSelection *sel, GtkTreeModel *model) {
 	GtkTreeIter  iter;
-	char *filename;
+	const char *filename;
 	GValue val = { 0, };
 	
 	if (! gtk_tree_selection_get_selected (sel, &model, &iter))
@@ -217,7 +217,6 @@
 	GSList *themes = smiley_themes;
 	GtkTreeIter iter;
 	GtkWidget *view;
-	GtkListStore *ls;
 	GtkCellRenderer *rend;
 	GtkTreeViewColumn *col;
 	GtkTreeSelection *sel;
--- a/src/protocols/gg/libgg.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/protocols/gg/libgg.c	Sat Jan 11 19:59:27 2003 +0000
@@ -1,4 +1,4 @@
-/* $Id: libgg.c 4216 2002-11-29 12:48:01Z lschiere $ */
+/* $Id: libgg.c 4552 2003-01-11 19:59:27Z seanegan $ */
 
 /*
  *  (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl>,
@@ -72,7 +72,7 @@
 #ifdef __GNUC__
 __attribute__ ((unused))
 #endif
-= "$Id: libgg.c 4216 2002-11-29 12:48:01Z lschiere $";
+= "$Id: libgg.c 4552 2003-01-11 19:59:27Z seanegan $";
 
 #endif 
 
@@ -99,6 +99,8 @@
  *
  * dla maszyn big-endianowych zamienia kolejność bajtów w ,,short''ach.
  */
+
+/* not currently used
 static inline unsigned short fix16(unsigned short x)
 {
 #ifndef WORDS_BIGENDIAN
@@ -109,6 +111,7 @@
                  ((x & (unsigned short) 0xff00U) >> 8));
 #endif
 }
+*/
 
 #ifndef _WIN32
 /*
--- a/src/protocols/zephyr/Makefile.am	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/protocols/zephyr/Makefile.am	Sat Jan 11 19:59:27 2003 +0000
@@ -73,7 +73,7 @@
 
 if STATIC_ZEPHYR
 
-st = -DSTATIC
+st = -DSTATIC -Dlint
 noinst_LIBRARIES = libzephyr.a
 libzephyr_a_SOURCES = $(ZEPHYRSOURCES)
 libzephyr_a_CFLAGS  = $(AM_CFLAGS)
@@ -81,7 +81,7 @@
 
 else
 
-st =
+st = -Dlint
 pkg_LTLIBRARIES = libzephyr.la
 libzephyr_la_SOURCES = $(ZEPHYRSOURCES)
 libzephyr_la_LIBADD  = $(ZEPHYRLIBS)
--- a/src/prpl.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/prpl.c	Sat Jan 11 19:59:27 2003 +0000
@@ -151,7 +151,6 @@
 	debug_printf("%d dialogs to search\n", g_slist_length(d));
 
 	while (d) {
-		GSList *cur = d;
 		struct doaskstruct *doask = d->data;
 
 		d = d->next;
--- a/src/themes.c	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/themes.c	Sat Jan 11 19:59:27 2003 +0000
@@ -23,6 +23,9 @@
 #include "ui.h"
 #include "gtkimhtml.h"
 #include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include "gaim.h"
 
 struct smiley_list {
 	char *sml;
@@ -52,11 +55,10 @@
 	}
 }
 
-struct smiley_theme *load_smiley_theme(char *file, gboolean load)
+struct smiley_theme *load_smiley_theme(const char *file, gboolean load)
 {
 	FILE *f = fopen(file, "r");
 	char buf[256];
-	char sml[16];
 	char *i;
 	struct smiley_theme *theme=NULL;
 	struct smiley_list *list = NULL;
@@ -84,7 +86,6 @@
 			GSList *already_freed = NULL;
 			struct smiley_list *wer = current_smiley_theme->list;
 			while (wer) {
-				char *nds = !strcmp(wer->sml, "default") ? NULL : wer->sml;
 				GSList *already_freed = NULL;
 				while (wer->smileys) {
 					GtkIMHtmlSmiley *uio = wer->smileys->data;
@@ -205,7 +206,7 @@
 				 * We set the second argument to FALSE so that it doesn't load
 				 * the theme yet.
 				 */
-				if (smile = load_smiley_theme(path, FALSE)) {
+				if ((smile = load_smiley_theme(path, FALSE))) {
 					smiley_themes = g_slist_append(smiley_themes, smile);
 				}
 				g_free(path);
--- a/src/ui.h	Sat Jan 11 16:47:58 2003 +0000
+++ b/src/ui.h	Sat Jan 11 19:59:27 2003 +0000
@@ -467,7 +467,7 @@
 extern void cancel_bgcolor(GtkWidget *widget, struct conversation *c);
 extern void create_away_mess(GtkWidget *, void *);
 extern void show_ee_dialog(int);
-extern void show_add_link(GtkWidget *,struct conversation *);
+extern void show_insert_link(GtkWidget *,struct conversation *);
 extern void show_smiley_dialog(struct conversation *, GtkWidget *);
 extern void close_smiley_dialog(GtkWidget *widget, struct conversation *c);
 extern void set_smiley_array(GtkWidget *widget, int smiley_type);
@@ -538,6 +538,8 @@
 
 /* Functions in themes.c */
 extern void smiley_themeize(GtkWidget *);
+extern void smiley_theme_probe();
+extern struct smiley_theme *load_smiley_theme(const char *file, gboolean load);
 
 /* Fucnctions in util.c */
 extern GtkWidget *gaim_pixmap(char *, char *);