changeset 4200:c8fb43808a4b

[gaim-migrate @ 4431] I try to look at it like this: At least now I know a little more about va_args. So when you pass stuff through "...", gcc promotes the argument to an integer. So passing fu16_t because 4 bytes instead of 2. Then when using va_args, you have to use a type that is 4 bytes instead of 2. I guess va_args is different in gcc 2, in that, if you give it a 2 byte type, it will get 4 bytes anyway. Either that, or gcc2 doesn't promote stuff to 4 bytes when passed through .... Anyway, sorry to all gcc3.x users. This patch just fixes a little bit of whitespace stuff, again, for no real reason. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 04 Jan 2003 19:41:07 +0000
parents 97de60e7b7ba
children 511c2b63caa4
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 38 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sat Jan 04 16:54:37 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Jan 04 19:41:07 2003 +0000
@@ -1003,8 +1003,8 @@
 	int fd;
 
 	va_start(ap, fr);
-       offset = (fu32_t)va_arg(ap, unsigned long);
-       len = (fu32_t)va_arg(ap, unsigned long);
+	offset = va_arg(ap, fu32_t);
+	len = va_arg(ap, fu32_t);
 	modname = va_arg(ap, char *);
 	va_end(ap);
 
@@ -2194,12 +2194,13 @@
 }
 
 static int gaim_parse_incoming_im(aim_session_t *sess, aim_frame_t *fr, ...) {
-	int channel, ret = 0;
+	fu16_t channel;
+	int ret = 0;
 	aim_userinfo_t *userinfo;
 	va_list ap;
 
 	va_start(ap, fr);
-	channel = va_arg(ap, int);
+	channel = (fu16_t)va_arg(ap, unsigned int);
 	userinfo = va_arg(ap, aim_userinfo_t *);
 
 	switch (channel) {
@@ -2238,10 +2239,10 @@
 	char buf[1024];
 
 	va_start(ap, fr);
-       chan = (fu16_t)va_arg(ap, unsigned int);
-        userinfo = va_arg(ap, aim_userinfo_t *);
-       nummissed = (fu16_t)va_arg(ap, unsigned int);
-       reason = (fu16_t)va_arg(ap, unsigned int);
+	chan = (fu16_t)va_arg(ap, unsigned int);
+	userinfo = va_arg(ap, aim_userinfo_t *);
+	nummissed = (fu16_t)va_arg(ap, unsigned int);
+	reason = (fu16_t)va_arg(ap, unsigned int);
 	va_end(ap);
 
 	switch(reason) {
@@ -2407,18 +2408,18 @@
 	char *who;
 
 	va_start(ap, fr);
-	chan = (fu16_t) va_arg(ap, unsigned int);
+	chan = (fu16_t)va_arg(ap, unsigned int);
 	who = va_arg(ap, char *);
-	reason = (fu16_t) va_arg(ap, unsigned int);
+	reason = (fu16_t)va_arg(ap, unsigned int);
 
 	if (chan == 0x0002) { /* File transfer declined */
 		char *cookie = va_arg(ap, char *);
 		return gaim_parse_clientauto_ch2(sess, who, reason, cookie);
 	} else if (chan == 0x0004) { /* ICQ message */
-		int state = 0;
+		fu32_t state = 0;
 		char *msg = NULL;
 		if (reason == 0x0003) {
-			state = (int) va_arg(ap, fu32_t);
+			state = va_arg(ap, fu32_t);
 			msg = va_arg(ap, char *);
 		}
 		return gaim_parse_clientauto_ch4(sess, who, reason, state, msg);
@@ -2810,17 +2811,16 @@
 			fu32_t createtime;
 
 			fqcn = va_arg(ap, char *);
-                       instance = (fu16_t)va_arg(ap, unsigned int);
-                       exchange = (fu16_t)va_arg(ap, unsigned int);
-                       flags = (fu16_t)va_arg(ap, unsigned int);
-                        createtime = va_arg(ap, fu32_t);
-                       maxmsglen = (fu16_t)va_arg(ap, unsigned int);
-                       maxoccupancy = (fu16_t)va_arg(ap, unsigned int);
-                       createperms = (fu8_t)va_arg(ap, int);
-                       unknown = (fu16_t)va_arg(ap, unsigned int);
-                       name = va_arg(ap, char *);
-                       ck = va_arg(ap, char *);
-/*                        va_end(ap); */
+			instance = (fu16_t)va_arg(ap, unsigned int);
+			exchange = (fu16_t)va_arg(ap, unsigned int);
+			flags = (fu16_t)va_arg(ap, unsigned int);
+			createtime = va_arg(ap, fu32_t);
+			maxmsglen = (fu16_t)va_arg(ap, unsigned int);
+			maxoccupancy = (fu16_t)va_arg(ap, unsigned int);
+			createperms = (fu8_t)va_arg(ap, unsigned int);
+			unknown = (fu16_t)va_arg(ap, unsigned int);
+			name = va_arg(ap, char *);
+			ck = va_arg(ap, char *);
 
 			debug_printf("created room: %s %hu %hu %hu %lu %hu %hu %hhu %hu %s %s\n",
 					fqcn,
@@ -2905,12 +2905,12 @@
 	usercount= va_arg(ap, int);
 	userinfo = va_arg(ap, aim_userinfo_t *);
 	roomdesc = va_arg(ap, char *);
-       unknown_c9 = (fu16_t)va_arg(ap, int);
-       creationtime = (fu32_t)va_arg(ap, unsigned long);
-       maxmsglen = (fu16_t)va_arg(ap, int);
-       unknown_d2 = (fu16_t)va_arg(ap, int);
-       unknown_d5 = (fu16_t)va_arg(ap, int);
-       maxvisiblemsglen = (fu16_t)va_arg(ap, int);
+	unknown_c9 = (fu16_t)va_arg(ap, unsigned int);
+	creationtime = va_arg(ap, fu32_t);
+	maxmsglen = (fu16_t)va_arg(ap, unsigned int);
+	unknown_d2 = (fu16_t)va_arg(ap, unsigned int);
+	unknown_d5 = (fu16_t)va_arg(ap, unsigned int);
+	maxvisiblemsglen = (fu16_t)va_arg(ap, unsigned int);
 	va_end(ap);
 
 	debug_printf("inside chat_info_update (maxmsglen = %hu, maxvislen = %hu)\n",
@@ -2997,15 +2997,15 @@
 	fu32_t windowsize, clear, alert, limit, disconnect, currentavg, maxavg;
 
 	va_start(ap, fr); 
-       code = (fu16_t)va_arg(ap, unsigned int);
-       rateclass= (fu16_t)va_arg(ap, unsigned int);
-       windowsize = (fu32_t)va_arg(ap, unsigned long);
-       clear = (fu32_t)va_arg(ap, unsigned long);
-       alert = (fu32_t)va_arg(ap, unsigned long);
-       limit = (fu32_t)va_arg(ap, unsigned long);
-       disconnect = (fu32_t)va_arg(ap, unsigned long);
-       currentavg = (fu32_t)va_arg(ap, unsigned long);
-       maxavg = (fu32_t)va_arg(ap, unsigned long);
+	code = (fu16_t)va_arg(ap, unsigned int);
+	rateclass= (fu16_t)va_arg(ap, unsigned int);
+	windowsize = va_arg(ap, fu32_t);
+	clear = va_arg(ap, fu32_t);
+	alert = va_arg(ap, fu32_t);
+	limit = va_arg(ap, fu32_t);
+	disconnect = va_arg(ap, fu32_t);
+	currentavg = va_arg(ap, fu32_t);
+	maxavg = va_arg(ap, fu32_t);
 	va_end(ap);
 
 	debug_printf("rate %s (param ID 0x%04hx): curavg = %lu, maxavg = %lu, alert at %lu, "