changeset 211:2042a38da38b

[gaim-migrate @ 221] Changed plugins/Makefile.am so that 'make clean' removes built plugins. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 03 May 2000 00:34:30 +0000
parents ec0686b3b03f
children 89c9334d3484
files plugins/Makefile.am src/rvous.c src/toc.c
diffstat 3 files changed, 35 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/Makefile.am	Mon May 01 19:39:00 2000 +0000
+++ b/plugins/Makefile.am	Wed May 03 00:34:30 2000 +0000
@@ -9,5 +9,7 @@
 	$(CC) $(CFLAGS) -fPIC -DPIC -o $@ $< $(LDFLAGS)
 plugin_DATA = autorecon.so iconaway.so spellchk.so
 plugindir = $(libdir)/gaim
+clean:
+	$(RM) $(plugin_DATA)
 EXTRA_DIST = CRAZY HOWTO SIGNALS autorecon.c chkmail.c filectl.c gaiminc.c \
 	iconaway.c lagmeter.c notify.c simple.c spellchk.c toc_commands.c
--- a/src/rvous.c	Mon May 01 19:39:00 2000 +0000
+++ b/src/rvous.c	Wed May 03 00:34:30 2000 +0000
@@ -150,7 +150,7 @@
         char *c;
 	int cont = 1;
 	GtkWidget *fw = NULL, *fbar = NULL, *label = NULL, *button = NULL;
-        
+
 	if (!(ft->f = fopen(file,"w"))) {
 		buf = g_malloc(BUF_LONG);
                 g_snprintf(buf, BUF_LONG / 2, "Error writing file %s", file);
@@ -378,7 +378,8 @@
 	buf = frombase64(ft->cookie);
 	sprintf(debug_buff, "Building header to send %s (cookie: %s)\n", file, buf);
 	debug_print(debug_buff);
-	fhdr->magic[0] = 'O'; fhdr->magic[1] = 'F'; fhdr->magic[2] = 'T'; fhdr->magic[3] = '2';
+	fhdr->magic[0] = 'O'; fhdr->magic[1] = 'F';
+	fhdr->magic[2] = 'T'; fhdr->magic[3] = '2';
 	fhdr->hdrlen = 256;
 	fhdr->hdrtype = 0x1108;
 	snprintf(fhdr->bcookie, 8, "%s", buf);
@@ -389,18 +390,18 @@
 	fhdr->filesleft = 1;
 	fhdr->totparts = 1;
 	fhdr->partsleft = 1;
-	fhdr->totsize = (long)st.st_size; /* total size of all available files */
-	/* size = 10 (date) + 1 + 5 (time) + 1 + 8 (size) + 1 + name + 2 = 30 + name */
+	fhdr->totsize = (long)st.st_size; /* combined size of all files */
+	/* size = strlen("mm/dd/yyyy hh:mm sizesize 'name'\r\n") */
 	fhdr->size = 30 + strlen(c); /* size of listing.txt */
 	fhdr->modtime = time(NULL); /* time since UNIX epoch */
-	fhdr->checksum = 0x10110000; /* ? */
+	fhdr->checksum = 0x89f70000; /* ? this is the only thing i have wrong */
 	fhdr->rfrcsum = 0;
 	fhdr->rfsize = 0;
 	fhdr->cretime = 0;
 	fhdr->rfcsum = 0;
 	fhdr->nrecvd = 0;
 	fhdr->recvcsum = 0;
-	snprintf(fhdr->idstring, 32, "Gaim");
+	snprintf(fhdr->idstring, 32, "OFT_Windows ICBMFT V1.1 32");
 	fhdr->flags = 0x02;		/* don't ask me why */
 	fhdr->lnameoffset = 0x1A;	/* ? still no clue */
 	fhdr->lsizeoffset = 0x10;	/* whatever */
@@ -476,7 +477,6 @@
 void accept_file_dialog(struct file_transfer *ft)
 {
         GtkWidget *accept, *info, *warn, *cancel;
-        GtkWidget *text = NULL, *sw;
         GtkWidget *label;
         GtkWidget *vbox, *bbox;
         char buf[1024];
@@ -509,28 +509,11 @@
 		g_snprintf(buf, sizeof(buf), "%s requests you to send them a file",
 				ft->user);
 	}
+        if (ft->message)
+		strncat(buf, ft->message, sizeof(buf) - strlen(buf));
         label = gtk_label_new(buf);
         gtk_widget_show(label);
         gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5);
-        
-        if (ft->message) {
-		/* we'll do this later
-                text = gaim_new_layout();
-                sw = gtk_scrolled_window_new (NULL, NULL);
-                gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
-                                                GTK_POLICY_NEVER,
-                                                GTK_POLICY_AUTOMATIC);
-                gtk_widget_show(sw);
-                gtk_container_add(GTK_CONTAINER(sw), text);
-                gtk_widget_show(text);
-
-                gtk_layout_set_size(GTK_LAYOUT(text), 250, 100);
-                GTK_LAYOUT (text)->vadjustment->step_increment = 10.0;
-                gtk_widget_set_usize(sw, 250, 100);
-
-                gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 10);
-		*/
-        }
         gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5);
 
         gtk_window_set_title(GTK_WINDOW(ft->window), "Gaim - File Transfer?");
--- a/src/toc.c	Mon May 01 19:39:00 2000 +0000
+++ b/src/toc.c	Wed May 03 00:34:30 2000 +0000
@@ -172,8 +172,9 @@
 	g_snprintf(buf2, sizeof(buf2), "toc_init_done");
 	sflap_send(buf2, -1, TYPE_DATA);
 
-	g_snprintf(buf2, sizeof(buf2), "toc_set_caps %s %s",
-		   FILE_SEND_UID, FILE_GET_UID);
+	g_snprintf(buf2, sizeof(buf2), "toc_set_caps %s %s %s %s %s",
+		   FILE_SEND_UID, FILE_GET_UID, B_ICON_UID, IMAGE_UID,
+		   VOICE_UID);
 	sflap_send(buf2, -1, TYPE_DATA);
 
         serv_finish_login();
@@ -603,21 +604,16 @@
                 pip = strtok(NULL, ":");
                 vip = strtok(NULL, ":");
                 sscanf(strtok(NULL, ":"), "%d", &port);
-                for (i=0; i<4; i++) {
-                        sscanf(strtok(NULL, ":"), "%d", &unk[i]);
-                        if (unk[i] == 10001)
-                                break;
-                        messages[i] = frombase64(strtok(NULL, ":"));
-                }
-                
-                tmp = frombase64(strtok(NULL, ":"));
-		sprintf(debug_buff, "%d %d %d %d %d %d %d %d %s\n", tmp[0],
-				tmp[1], tmp[2], tmp[3], tmp[4], tmp[5], tmp[6],
-				tmp[7], tmp + 8);
-		debug_print(debug_buff);
 
 		if (!strcmp(uuid, FILE_SEND_UID)) {
 			/* we're getting a file */
+	                for (i=0; i<4; i++) {
+	                        sscanf(strtok(NULL, ":"), "%d", &unk[i]);
+	                        if (unk[i] == 10001)
+	                                break;
+	                        messages[i] = frombase64(strtok(NULL, ":"));
+	                }
+	                tmp = frombase64(strtok(NULL, ":"));
 	                subtype = tmp[1];
 	                files = tmp[3]; /* These are fine */
 
@@ -651,6 +647,13 @@
 	                accept_file_dialog(ft);
 		} else if (!strcmp(uuid, FILE_GET_UID)) {
 			/* we're sending a file */
+	                for (i=0; i<4; i++) {
+	                        sscanf(strtok(NULL, ":"), "%d", &unk[i]);
+	                        if (unk[i] == 10001)
+	                                break;
+	                        messages[i] = frombase64(strtok(NULL, ":"));
+	                }
+	                tmp = frombase64(strtok(NULL, ":"));
 			ft = g_new0(struct file_transfer, 1);
 
 			ft->cookie = g_strdup(cookie);
@@ -679,6 +682,13 @@
 			sprintf(debug_buff,"don't know what to do with %s\n",
 					uuid);
 			debug_print(debug_buff);
+			tmp = g_malloc(BUF_LEN);
+			name = frombase64(cookie);
+			snprintf(tmp, BUF_LEN, "toc_rvous_cancel %s %s %s",
+					user, name, uuid);
+			sflap_send(tmp, strlen(tmp), TYPE_DATA);
+			free(name);
+			free(tmp);
 		}
 	} else {
 		sprintf(debug_buff,"don't know what to do with %s\n", c);