adium 3078:1b883db24823: Resolve implicit 64->32 bit castings in...

commits at adium.im commits at adium.im
Mon Dec 28 21:49:20 UTC 2009


details:	http://hg.adium.im/adium/rev/1b883db24823
revision:	3078:1b883db24823
author:		Stephen Holt <sholt at adium.im>
date:		Mon Dec 28 16:48:44 2009 -0500

Resolve implicit 64->32 bit castings in AdiumLibpurple.framework. Add asserts to ensure sanity where needed.
Subject: adium 3079:842f88ccc167: Reveal shadowed symbols in AdiumLibpurple.framework

details:	http://hg.adium.im/adium/rev/842f88ccc167
revision:	3079:842f88ccc167
author:		Stephen Holt <sholt at adium.im>
date:		Mon Dec 28 16:48:47 2009 -0500

Reveal shadowed symbols in AdiumLibpurple.framework
Subject: adium 3080:416cc16104a3: Declare previously undeclared selectors in AdiumLibpurple.framework

details:	http://hg.adium.im/adium/rev/416cc16104a3
revision:	3080:416cc16104a3
author:		Stephen Holt <sholt at adium.im>
date:		Mon Dec 28 16:48:48 2009 -0500

Declare previously undeclared selectors in AdiumLibpurple.framework
Subject: adium 3081:6388b2768ef1: Complete libpurple uiops struct initializers in AdiumLibpurple.framework

details:	http://hg.adium.im/adium/rev/6388b2768ef1
revision:	3081:6388b2768ef1
author:		Stephen Holt <sholt at adium.im>
date:		Mon Dec 28 16:48:49 2009 -0500

Complete libpurple uiops struct initializers in AdiumLibpurple.framework

diffs (truncated from 1570 to 1000 lines):

diff -r 8e23376a39e6 -r 6388b2768ef1 Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h
--- a/Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h	Mon Dec 28 13:51:48 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h	Mon Dec 28 16:48:49 2009 -0500
@@ -11,19 +11,29 @@
 #define AIMathCompatibility
 
 #ifdef __LP64__
-	#define AIfabs( X ) fabs((X))
-	#define AIround( X ) round((X))
-	#define AIceil( X ) ceil((X))
-	#define AIfloor( X ) floor((X))
-	#define AIfmod( X, Y ) fmod((X),(Y))
-	#define AIfmin( X, Y ) fmin((X),(Y))
+	#define AIfabs( X )			fabs((X))
+	#define AIround( X )		round((X))
+	#define AIceil( X )			ceil((X))
+	#define AIfloor( X )		floor((X))
+	#define AIfmod( X, Y )	fmod((X),(Y))
+	#define AIfmin( X, Y )	fmin((X),(Y))
+	#define AIsqrt( X )			sqrt((X))
+
+	#define AIsin( X )			sin((X))
+	#define AIcos( X )			cos((X))
+	#define AIatan2( X, Y )	atan2((X),(Y))
 #else
-	#define AIfabs( X ) fabsf((X))
-	#define AIround( X ) roundf((X))
-	#define AIceil( X ) ceilf((X))
-	#define AIfloor( X ) floorf((X))
-	#define AIfmod( X, Y ) fmodf((X),(Y))
-	#define AIfmin( X, Y ) fminf((X),(Y))
+	#define AIfabs( X )			fabsf((X))
+	#define AIround( X )		roundf((X))
+	#define AIceil( X )			ceilf((X))
+	#define AIfloor( X )		floorf((X))
+	#define AIfmod( X, Y )	fmodf((X),(Y))
+	#define AIfmin( X, Y )	fminf((X),(Y))
+	#define AIsqrt( X )			sqrtf((X))
+
+	#define AIsin( X )			sinf((X))
+	#define AIcos( X )			cosf((X))
+	#define AIatan2( X, Y )	atan2f((X),(Y))
 #endif
 
 #endif
diff -r 8e23376a39e6 -r 6388b2768ef1 Frameworks/Adium Framework/Source/AIListContact.h
--- a/Frameworks/Adium Framework/Source/AIListContact.h	Mon Dec 28 13:51:48 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIListContact.h	Mon Dec 28 16:48:49 2009 -0500
@@ -70,7 +70,7 @@
 - (void)setIdle:(BOOL)isIdle sinceDate:(NSDate *)idleSinceDate notify:(NotifyTiming)notify;
 - (void)setServersideIconData:(NSData *)iconData notify:(NotifyTiming)notify;
 
-- (void)setWarningLevel:(int)warningLevel notify:(NotifyTiming)notify;
+- (void)setWarningLevel:(NSInteger)warningLevel notify:(NotifyTiming)notify;
 - (NSInteger)warningLevel;
 
 - (void)setProfileArray:(NSArray *)array notify:(NotifyTiming)notify;
diff -r 8e23376a39e6 -r 6388b2768ef1 Frameworks/Adium Framework/Source/AIListContact.m
--- a/Frameworks/Adium Framework/Source/AIListContact.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIListContact.m	Mon Dec 28 16:48:49 2009 -0500
@@ -441,10 +441,10 @@
  * @param warningLevel The warning level, an integer between 0 and 100
  * @param notify The NotifyTiming
  */
-- (void)setWarningLevel:(int)warningLevel notify:(NotifyTiming)notify
+- (void)setWarningLevel:(NSInteger)warningLevel notify:(NotifyTiming)notify
 {
 	if (warningLevel != self.warningLevel) {
-		[self setValue:[NSNumber numberWithInt:warningLevel]
+		[self setValue:[NSNumber numberWithInteger:warningLevel]
 					   forProperty:@"Warning"
 					   notify:notify];
 	}
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AIAnnoyingIRCMessagesHiderPlugin.m
--- a/Plugins/Purple Service/AIAnnoyingIRCMessagesHiderPlugin.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AIAnnoyingIRCMessagesHiderPlugin.m	Mon Dec 28 16:48:49 2009 -0500
@@ -17,6 +17,10 @@
 #import <Adium/AIListObject.h>
 #import <Adium/AIChat.h>
 
+ at interface AIAnnoyingIRCMessagesHiderPlugin()
+- (void)willReceiveContent:(NSNotification *)notification;
+ at end
+
 @implementation AIAnnoyingIRCMessagesHiderPlugin
 - (void)installPlugin
 {
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AIIRCServicesPasswordPlugin.m
--- a/Plugins/Purple Service/AIIRCServicesPasswordPlugin.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AIIRCServicesPasswordPlugin.m	Mon Dec 28 16:48:49 2009 -0500
@@ -19,6 +19,8 @@
 
 @interface AIIRCServicesPasswordPlugin()
 - (BOOL)message:(NSString *)message containsFragments:(NSArray *)fragments;
+- (void)willReceiveContent:(NSNotification *)notification;
+- (void)passwordReturned:(NSString *)inPassword returnCode:(AIPasswordPromptReturn)returnCode context:(NSDictionary *)inDict;
 @end
 
 @implementation AIIRCServicesPasswordPlugin
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m
--- a/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m	Mon Dec 28 16:48:49 2009 -0500
@@ -28,6 +28,7 @@
 			 userData:(void*)ud;
 - (IBAction)showWindow:(id)sender;
 - (void)runTrustPanelOnWindow:(NSWindow *)window;
+- (void)certificateTrustSheetDidEnd:(SFCertificateTrustPanel *)trustpanel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
 @end
 
 @interface SFCertificateTrustPanel (SecretsIKnow)
@@ -130,9 +131,12 @@
 		return;
 	}
 
+	NSAssert( UINT_MAX > [hostname length],
+					 @"More string data than libpurple can handle.  Abort." );
+	
 	CSSM_APPLE_TP_SSL_OPTIONS ssloptions = {
 		.Version = CSSM_APPLE_TP_SSL_OPTS_VERSION,
-		.ServerNameLen = [hostname length]+1,
+		.ServerNameLen = (UInt32)([hostname length]+1),
 		.ServerName = [hostname cStringUsingEncoding:NSASCIIStringEncoding],
 		.Flags = 0
 	};
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AIPurpleCertificateViewer.m
--- a/Plugins/Purple Service/AIPurpleCertificateViewer.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AIPurpleCertificateViewer.m	Mon Dec 28 16:48:49 2009 -0500
@@ -14,6 +14,7 @@
 
 - (id)initWithCertificateChain:(CFArrayRef)cc forAccount:(AIAccount*)_account;
 - (IBAction)showWindow:(id)sender;
+- (void)certificateSheetDidEnd:(SFCertificatePanel*)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
 
 @end
 
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleJabberAdHocCommand.m
--- a/Plugins/Purple Service/AMPurpleJabberAdHocCommand.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleJabberAdHocCommand.m	Mon Dec 28 16:48:49 2009 -0500
@@ -30,8 +30,8 @@
 }
 
 - (AMPurpleJabberFormGenerator*)form {
-	xmlnode *form = xmlnode_get_child_with_namespace(command,"x","jabber:x:data");
-	if(!form)
+	xmlnode *jabberForm = xmlnode_get_child_with_namespace(command,"x","jabber:x:data");
+	if(!jabberForm)
 		return nil;
 	return [[[AMPurpleJabberFormGenerator alloc] initWithXML:form] autorelease];
 }
@@ -55,7 +55,7 @@
 	[old release];
 }
 
-- (AMPurpleJabberAdHocCommand*)generateReplyWithForm:(AMPurpleJabberFormGenerator*)form actions:(NSArray*)actions defaultAction:(NSUInteger)defaultAction status:(enum AMPurpleJabberAdHocCommandStatus)status {
+- (AMPurpleJabberAdHocCommand*)generateReplyWithForm:(AMPurpleJabberFormGenerator*)jabberForm actions:(NSArray*)actions defaultAction:(NSUInteger)defaultAction status:(enum AMPurpleJabberAdHocCommandStatus)status {
 	const char *nodeattr = xmlnode_get_attrib(command,"node");
 	if(!nodeattr)
 		return nil;
@@ -85,7 +85,7 @@
 			xmlnode_new_child(actionsnode, [actionstr UTF8String]);
 	}
 	
-	xmlnode_insert_child(newcmd,[form xml]);
+	xmlnode_insert_child(newcmd,[jabberForm xml]);
 	
 	AMPurpleJabberAdHocCommand *cmd = [[AMPurpleJabberAdHocCommand alloc] initWithServer:server command:newcmd jid:jid iqid:iqid];
 	xmlnode_free(newcmd);
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleJabberFormGenerator.m
--- a/Plugins/Purple Service/AMPurpleJabberFormGenerator.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleJabberFormGenerator.m	Mon Dec 28 16:48:49 2009 -0500
@@ -115,17 +115,17 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = xmlnode_new("field");
+	xmlnode *xml_result = xmlnode_new("field");
 	if(label)
-		xmlnode_set_attrib(result,"label",[label UTF8String]);
+		xmlnode_set_attrib(xml_result,"label",[label UTF8String]);
 	if(var)
-		xmlnode_set_attrib(result,"var",[var UTF8String]);
+		xmlnode_set_attrib(xml_result,"var",[var UTF8String]);
 	if(required)
-		xmlnode_new_child(result,"required");
+		xmlnode_new_child(xml_result,"required");
 	if(desc)
-		xmlnode_insert_data(xmlnode_new_child(result,"desc"), [desc UTF8String], -1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"desc"), [desc UTF8String], -1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -154,13 +154,13 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","boolean");
+	xmlnode_set_attrib(xml_result,"type","boolean");
 	if(value)
-		xmlnode_insert_data(xmlnode_new_child(result,"value"),"1",-1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),"1",-1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -195,13 +195,13 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","fixed");
+	xmlnode_set_attrib(xml_result,"type","fixed");
 	if(value)
-		xmlnode_insert_data(xmlnode_new_child(result,"value"),[value UTF8String],-1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[value UTF8String],-1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -236,13 +236,13 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","hidden");
+	xmlnode_set_attrib(xml_result,"type","hidden");
 	if(value)
-		xmlnode_insert_data(xmlnode_new_child(result,"value"),[value UTF8String],-1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[value UTF8String],-1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -281,16 +281,16 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","jid-multi");
+	xmlnode_set_attrib(xml_result,"type","jid-multi");
 	if(jids) {
 		NSString *jid;
 		for(jid in jids)
-			xmlnode_insert_data(xmlnode_new_child(result,"value"),[jid UTF8String],-1);
+			xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[jid UTF8String],-1);
 	}
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -325,13 +325,13 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","jid-single");
+	xmlnode_set_attrib(xml_result,"type","jid-single");
 	if(jid)
-		xmlnode_insert_data(xmlnode_new_child(result,"value"),[jid UTF8String],-1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[jid UTF8String],-1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -356,13 +356,13 @@
 		for(option = xml->child; option; option = option->next) {
 			if(option->type == XMLNODE_TYPE_TAG && !strcmp(option->name, "option")) {
 				const char *labelstr = xmlnode_get_attrib(option,"label");
-				xmlnode *valuenode = xmlnode_get_child(option,"value");
+				xmlnode *lvaluenode = xmlnode_get_child(option,"value");
 				if(!valuenode) {
 					/* invalid field */
 					[self release];
 					return nil;
 				}
-				const char *valuestr = xmlnode_get_data(valuenode);
+				const char *valuestr = xmlnode_get_data(lvaluenode);
 				if(!valuestr) {
 					[self release];
 					return nil;
@@ -405,21 +405,21 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","list-multi");
+	xmlnode_set_attrib(xml_result,"type","list-multi");
 	if(options) {
 		for(NSDictionary *option in options) {
-			xmlnode *optnode = xmlnode_new_child(result,"option");
+			xmlnode *optnode = xmlnode_new_child(xml_result,"option");
 			xmlnode_set_attrib(optnode,"label",[[option objectForKey:@"label"] UTF8String]);
 			xmlnode_insert_data(xmlnode_new_child(optnode,"value"),[[option objectForKey:@"value"] UTF8String],-1);
 		}
 		NSString *value;
 		for(value in values)
-			xmlnode_insert_data(xmlnode_new_child(result,"value"),[value UTF8String],-1);
+			xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[value UTF8String],-1);
 	}
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -440,13 +440,13 @@
 		for(option = xml->child; option; option = option->next) {
 			if(option->type == XMLNODE_TYPE_TAG && !strcmp(option->name, "option")) {
 				const char *labelstr = xmlnode_get_attrib(option,"label");
-				xmlnode *valuenode = xmlnode_get_child(option,"value");
-				if(!valuenode) {
+				xmlnode *lvaluenode = xmlnode_get_child(option,"value");
+				if(!lvaluenode) {
 					/* invalid field */
 					[self release];
 					return nil;
 				}
-				const char *valuestr = xmlnode_get_data(valuenode);
+				const char *valuestr = xmlnode_get_data(lvaluenode);
 				if(!valuestr) {
 					[self release];
 					return nil;
@@ -489,21 +489,21 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","list-single");
+	xmlnode_set_attrib(xml_result,"type","list-single");
 	if(options) {
 		NSDictionary *option;
 		for(option in options) {
-			xmlnode *optnode = xmlnode_new_child(result,"option");
+			xmlnode *optnode = xmlnode_new_child(xml_result,"option");
 			xmlnode_set_attrib(optnode,"label",[[option objectForKey:@"label"] UTF8String]);
 			xmlnode_insert_data(xmlnode_new_child(optnode,"value"),[[option objectForKey:@"value"] UTF8String],-1);
 		}
 		if(value)
-			xmlnode_insert_data(xmlnode_new_child(result,"value"),[value UTF8String],-1);
+			xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[value UTF8String],-1);
 	}
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -542,15 +542,15 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","text-multi");
+	xmlnode_set_attrib(xml_result,"type","text-multi");
 	if(value) {
 		for (NSString *line in [value componentsSeparatedByString:@"\n"])
-			xmlnode_insert_data(xmlnode_new_child(result,"value"),[line UTF8String],-1);
+			xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[line UTF8String],-1);
 	}
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -585,13 +585,13 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","text-single");
+	xmlnode_set_attrib(xml_result,"type","text-single");
 	if(value)
-		xmlnode_insert_data(xmlnode_new_child(result,"value"),[value UTF8String],-1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[value UTF8String],-1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
@@ -626,13 +626,13 @@
 }
 
 - (xmlnode*)xml {
-	xmlnode *result = [super xml];
+	xmlnode *xml_result = [super xml];
 	
-	xmlnode_set_attrib(result,"type","text-private");
+	xmlnode_set_attrib(xml_result,"type","text-private");
 	if(value)
-		xmlnode_insert_data(xmlnode_new_child(result,"value"),[value UTF8String],-1);
+		xmlnode_insert_data(xmlnode_new_child(xml_result,"value"),[value UTF8String],-1);
 	
-	return result;
+	return xml_result;
 }
 
 @end
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleJabberNode.m
--- a/Plugins/Purple Service/AMPurpleJabberNode.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleJabberNode.m	Mon Dec 28 16:48:49 2009 -0500
@@ -65,11 +65,11 @@
 			if (item->type == XMLNODE_TYPE_TAG) {
 				if (!strcmp(item->name, "identity")) {
 					const char *category = xmlnode_get_attrib(item,"category");
-					const char *type = xmlnode_get_attrib(item, "type");
+					const char *ltype = xmlnode_get_attrib(item, "type");
 					const char *queryName = xmlnode_get_attrib(item, "name");
 					[identities addObject:[NSDictionary dictionaryWithObjectsAndKeys:
 										   category?[NSString stringWithUTF8String:category]:[NSNull null], @"category",
-										   type?[NSString stringWithUTF8String:type]:[NSNull null], @"type",
+										   ltype?[NSString stringWithUTF8String:ltype]:[NSNull null], @"type",
 										   queryName?[NSString stringWithUTF8String:queryName]:[NSNull null], @"name",
 										   nil]];
 				} else if (!strcmp(item->name, "feature")) {
@@ -244,8 +244,11 @@
 	
 	NSData *xmlData = [[iq XMLString] dataUsingEncoding:NSUTF8StringEncoding];
 	
+	NSAssert( INT_MAX >= [xmlData length],
+					 @"More XML data than libpurple can handle.  Abort." );
+	
 	if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->send_raw)
-		(PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->send_raw)(gc, [xmlData bytes], [xmlData length]);
+		(PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->send_raw)(gc, [xmlData bytes], (int)[xmlData length]);
 }
 
 - (void)fetchInfo {
@@ -266,8 +269,11 @@
 	
 	NSData *xmlData = [[iq XMLString] dataUsingEncoding:NSUTF8StringEncoding];
 	
+	NSAssert( INT_MAX >= [xmlData length],
+					 @"More XML data than libpurple can handle.  Abort." );
+	
 	if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->send_raw)
-		(PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->send_raw)(gc, [xmlData bytes], [xmlData length]);
+		(PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->send_raw)(gc, [xmlData bytes], (gint)[xmlData length]);
 }
 
 - (NSArray*)items {
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleJabberServiceDiscoveryBrowserController.m
--- a/Plugins/Purple Service/AMPurpleJabberServiceDiscoveryBrowserController.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleJabberServiceDiscoveryBrowserController.m	Mon Dec 28 16:48:49 2009 -0500
@@ -181,11 +181,11 @@
 
 #pragma mark Outline View
 
-- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item
+- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)idx ofItem:(id)item
 {
 	if (!item)
 		return node;
-	return [[item items] objectAtIndex:index];
+	return [[item items] objectAtIndex:idx];
 }
 
 - (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
@@ -309,16 +309,16 @@
 		NSImage *img = [[NSImage alloc] initWithSize:imgsize];
 		NSAffineTransform *transform = [NSAffineTransform transform];
 		
-		[transform translateXBy:imgsize.width/2.0 yBy:imgsize.height/2.0];
+		[transform translateXBy:imgsize.width/2.0f yBy:imgsize.height/2.0f];
 		NSTimeInterval intv = [NSDate timeIntervalSinceReferenceDate];
 		intv -= floor(intv); // only get the fractional part
-		[transform rotateByRadians:2.0*M_PI * (1.0-intv)];
-		[transform translateXBy:-imgsize.width/2.0 yBy:-imgsize.height/2.0];
+		[transform rotateByRadians:(CGFloat)(2.0*M_PI * (1.0-intv))];
+		[transform translateXBy:-imgsize.width/2.0f yBy:-imgsize.height/2.0f];
 		
 		[img lockFocus];
 		[transform set];
-		[downloadprogress drawInRect:NSMakeRect(0.0,0.0,imgsize.width,imgsize.height) fromRect:NSMakeRect(0.0,0.0,imgsize.width,imgsize.height)
-						   operation:NSCompositeSourceOver fraction:1.0];
+		[downloadprogress drawInRect:NSMakeRect(0.0f,0.0f,imgsize.width,imgsize.height) fromRect:NSMakeRect(0.0f,0.0f,imgsize.width,imgsize.height)
+						   operation:NSCompositeSourceOver fraction:1.0f];
 		[[NSAffineTransform transform] set];
 		[img unlockFocus];
 		[cell setImage:img];
@@ -332,14 +332,14 @@
 	} else {
 		if (expanded) {
 			if (!det_triangle_opened) {
-				det_triangle_opened = [[NSImage alloc] initWithSize:NSMakeSize(13.0,13.0)];
+				det_triangle_opened = [[NSImage alloc] initWithSize:NSMakeSize(13.0f,13.0f)];
 				NSButtonCell *triangleCell = [[NSButtonCell alloc] initImageCell:nil];
 				[triangleCell setButtonType:NSOnOffButton];
 				[triangleCell setBezelStyle:NSDisclosureBezelStyle];
 				[triangleCell setState:NSOnState];
 				
 				[det_triangle_opened lockFocus];
-				[triangleCell drawWithFrame:NSMakeRect(0.0,0.0,13.0,13.0) inView:outlineView];
+				[triangleCell drawWithFrame:NSMakeRect(0.0f,0.0f,13.0f,13.0f) inView:outlineView];
 				[det_triangle_opened unlockFocus];
 				
 				[triangleCell release];
@@ -348,14 +348,14 @@
 			[cell setImage:det_triangle_opened];
 		} else {
 			if (!det_triangle_closed) {
-				det_triangle_closed = [[NSImage alloc] initWithSize:NSMakeSize(13.0,13.0)];
+				det_triangle_closed = [[NSImage alloc] initWithSize:NSMakeSize(13.0f,13.0f)];
 				NSButtonCell *triangleCell = [[NSButtonCell alloc] initImageCell:nil];
 				[triangleCell setButtonType:NSOnOffButton];
 				[triangleCell setBezelStyle:NSDisclosureBezelStyle];
 				[triangleCell setIntegerValue:NSOffState];
 				
 				[det_triangle_closed lockFocus];
-				[triangleCell drawWithFrame:NSMakeRect(0.0,0.0,13.0,13.0) inView:outlineView];
+				[triangleCell drawWithFrame:NSMakeRect(0.0f,0.0f,13.0f,13.0f) inView:outlineView];
 				[det_triangle_closed unlockFocus];
 				
 				[triangleCell release];
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleRequestFieldsController.m
--- a/Plugins/Purple Service/AMPurpleRequestFieldsController.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleRequestFieldsController.m	Mon Dec 28 16:48:49 2009 -0500
@@ -178,7 +178,7 @@
 }
 
 - (void)applyValue:(NSString*)value {
-	purple_request_field_int_set_value(field, [value integerValue]);
+	purple_request_field_int_set_value(field, [value intValue]);
 }
 
 @end
@@ -271,7 +271,7 @@
 }
 
 - (void)applyValue:(NSString*)value {
-	purple_request_field_choice_set_value(field, [value integerValue]);
+	purple_request_field_choice_set_value(field, [value intValue]);
 }
 
 @end
@@ -379,6 +379,12 @@
 
 @end
 
+
+ at interface AMPurpleRequestFieldsController ()
+- (void)loadForm:(NSXMLDocument*)doc;
+- (void)webviewWindowWillClose:(NSNotification *)notification;
+ at end
+
 @implementation AMPurpleRequestFieldsController
 
 - (id)initWithTitle:(NSString*)title
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleSearchResultsController.m
--- a/Plugins/Purple Service/AMPurpleSearchResultsController.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleSearchResultsController.m	Mon Dec 28 16:48:49 2009 -0500
@@ -26,33 +26,33 @@
 		GList *but;
 		for(but = results->buttons; but; but = g_list_next(but)) {
 			PurpleNotifySearchButton *button = but->data;
-			NSString *title = nil;
+			NSString *buttonTitle = nil;
 			switch(button->type) {
 				case PURPLE_NOTIFY_BUTTON_LABELED:
 					if(button->label)
-						title = [NSString stringWithUTF8String:button->label];
+						buttonTitle = [NSString stringWithUTF8String:button->label];
 					break;
 				case PURPLE_NOTIFY_BUTTON_CONTINUE:
-					title = AILocalizedString(@"Continue",nil);
+					buttonTitle = AILocalizedString(@"Continue",nil);
 					break;
 				case PURPLE_NOTIFY_BUTTON_ADD:
-					title = AILocalizedString(@"Add",nil);
+					buttonTitle = AILocalizedString(@"Add",nil);
 					break;
 				case PURPLE_NOTIFY_BUTTON_INFO:
-					title = AILocalizedString(@"Info",nil);
+					buttonTitle = AILocalizedString(@"Info",nil);
 					break;
 				case PURPLE_NOTIFY_BUTTON_IM:
-					title = AILocalizedString(@"Send Message",nil);
+					buttonTitle = AILocalizedString(@"Send Message",nil);
 					break;
 				case PURPLE_NOTIFY_BUTTON_JOIN:
-					title = AILocalizedString(@"Join",nil);
+					buttonTitle = AILocalizedString(@"Join",nil);
 					break;
 				case PURPLE_NOTIFY_BUTTON_INVITE:
-					title = AILocalizedString(@"Invite",nil);
+					buttonTitle = AILocalizedString(@"Invite",nil);
 					break;
 			}
 			NSButton *newbutton = [[NSButton alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, 100.0f, 100.0f)];
-			[newbutton setTitle:title];
+			[newbutton setTitle:buttonTitle];
 			[[newbutton cell] setControlSize:NSRegularControlSize];
 			[newbutton setTarget:self];
 			[newbutton setAction:@selector(invokeAction:)];
@@ -82,11 +82,11 @@
 			[tableview removeTableColumn:[[tableview tableColumns] objectAtIndex:0]];
 		
 		// add the ones we need
-		NSUInteger index = 0;
+		NSUInteger idx = 0;
 		GList *column;
 		for(column = results->columns; column; column = g_list_next(column)) {
 			PurpleNotifySearchColumn *scol = column->data;
-			NSTableColumn *tcol = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithUnsignedInteger:index++]];
+			NSTableColumn *tcol = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithUnsignedInteger:idx++]];
 			
 			if(scol->title)
 				[[tcol headerCell] setStringValue:[NSString stringWithUTF8String:scol->title]];
@@ -175,9 +175,11 @@
 		return;
 	}
 	NSInteger row = [tableview selectedRow];
+	NSAssert( INT_MAX >= row,
+					 @"Holy crap that's a lot of rows!  GList can't handle that.  Abort." );
 	GList *rowptr = NULL;
 	if(row != -1)
-		rowptr = g_list_nth_data(purpleresults->rows,row);
+		rowptr = g_list_nth_data(purpleresults->rows,(guint)row);
 	button->callback(gc, rowptr, user_data);
 }
 
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMPurpleTuneTooltip.m
--- a/Plugins/Purple Service/AMPurpleTuneTooltip.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleTuneTooltip.m	Mon Dec 28 16:48:49 2009 -0500
@@ -47,7 +47,7 @@
 		
 		PurpleValue *artist = purple_status_get_attr_value(status, "tune_artist");
 		PurpleValue *album = purple_status_get_attr_value(status, "tune_album");
-		PurpleValue *time = purple_status_get_attr_value(status, "tune_time");
+		PurpleValue *duration = purple_status_get_attr_value(status, "tune_time");
 		
 		const char *titlestr = purple_value_get_string(title);
 		const char *artiststr = NULL;
@@ -59,8 +59,8 @@
 			artiststr = purple_value_get_string(artist);
 		if (album)
 			albumstr = purple_value_get_string(album);
-		if (time)
-			timeval = purple_value_get_int(time);
+		if (duration)
+			timeval = purple_value_get_int(duration);
 		
 		NSMutableString *text = [NSMutableString string];
 		
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/AMXMLConsoleController.m
--- a/Plugins/Purple Service/AMXMLConsoleController.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/AMXMLConsoleController.m	Mon Dec 28 16:48:49 2009 -0500
@@ -80,7 +80,9 @@
 
 - (IBAction)sendXML:(id)sender {
     NSData *rawXMLData = [[xmlInjectView string] dataUsingEncoding:NSUTF8StringEncoding];
-    jabber_prpl_send_raw(gc, [rawXMLData bytes], [rawXMLData length]);
+    NSAssert( INT_MAX >= [rawXMLData length],
+						 @"Sending more jabber data value than libpurple can handle.  Abort." );
+    jabber_prpl_send_raw(gc, [rawXMLData bytes], (int)[rawXMLData length]);
 
     // remove from text field
     [xmlInjectView setString:@""];
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/CBPurpleAccount.m	Mon Dec 28 16:48:49 2009 -0500
@@ -93,6 +93,9 @@
 - (void)performAccountMenuAction:(NSMenuItem *)sender;
 
 - (void)showServerCertificate;
+
+- (void)retrievedProxyConfiguration:(NSDictionary *)proxyConfig context:(NSInvocation *)invocation;
+- (void)iTunesDidUpdate:(NSNotification *)notification;
 @end
 
 @implementation CBPurpleAccount
@@ -297,7 +300,7 @@
 - (void)updateStatusForContact:(AIListContact *)theContact toStatusType:(NSNumber *)statusTypeNumber statusName:(NSString *)statusName statusMessage:(NSAttributedString *)statusMessage isMobile:(BOOL)isMobile
 {
 	[theContact setStatusWithName:statusName
-					   statusType:[statusTypeNumber integerValue]
+					   statusType:[statusTypeNumber intValue]
 						   notify:NotifyLater];
 	[theContact setStatusMessage:statusMessage
 						  notify:NotifyLater];
@@ -1132,7 +1135,7 @@
 
 - (void)updateForChat:(AIChat *)chat type:(NSNumber *)type
 {
-	AIChatUpdateType	updateType = [type integerValue];
+	AIChatUpdateType	updateType = [type intValue];
 	NSString			*key = nil;
 	switch (updateType) {
 		case AIChatTimedOut:
@@ -1154,7 +1157,7 @@
 
 - (void)receivedIMChatMessage:(NSDictionary *)messageDict inChat:(AIChat *)chat
 {
-	PurpleMessageFlags		flags = [[messageDict objectForKey:@"PurpleMessageFlags"] integerValue];
+	PurpleMessageFlags		flags = [(NSNumber*)[messageDict objectForKey:@"PurpleMessageFlags"] intValue];
 
 	NSAttributedString		*attributedMessage;
 	AIListContact			*listContact;
@@ -1180,7 +1183,7 @@
 						date:(NSDate *)date
 					   flags:(NSNumber *)flagsNumber
 {
-	PurpleMessageFlags flags = [flagsNumber integerValue];
+	PurpleMessageFlags flags = [flagsNumber intValue];
 	
 	AIContentEvent *event = [AIContentEvent eventInChat:chat
 											 withSource:nil
@@ -1196,7 +1199,7 @@
 
 - (void)receivedMultiChatMessage:(NSDictionary *)messageDict inChat:(AIChat *)chat
 {	
-	PurpleMessageFlags	flags = [[messageDict objectForKey:@"PurpleMessageFlags"] integerValue];
+	PurpleMessageFlags	flags = [(NSNumber*)[messageDict objectForKey:@"PurpleMessageFlags"] intValue];
 	NSAttributedString	*attributedMessage = [messageDict objectForKey:@"AttributedMessage"];;
 	NSString			*source = [messageDict objectForKey:@"Source"];
 	
@@ -1689,7 +1692,7 @@
 //Update an ESFileTransfer object progress
 - (void)updateProgressForFileTransfer:(ESFileTransfer *)fileTransfer percent:(NSNumber *)percent bytesSent:(NSNumber *)bytesSent
 {
-	CGFloat percentDone = [percent doubleValue];
+	CGFloat percentDone = (CGFloat)[percent doubleValue];
     [fileTransfer setPercentDone:percentDone bytesSent:[bytesSent unsignedLongValue]];
 }
 
@@ -1793,10 +1796,10 @@
  *
  * @param pause If the media's state should be pause
  */
-- (void)media:(AIMedia *)media setPause:(BOOL)pause
+- (void)media:(AIMedia *)media setPause:(BOOL)willPause
 {
 	purple_media_stream_info((PurpleMedia *)media.protocolInfo,
-							 pause ? PURPLE_MEDIA_INFO_PAUSE : PURPLE_MEDIA_INFO_UNPAUSE,
+							 willPause ? PURPLE_MEDIA_INFO_PAUSE : PURPLE_MEDIA_INFO_UNPAUSE,
 							 NULL, NULL, TRUE);	
 }
 
@@ -1978,7 +1981,7 @@
 - (void)configurePurpleAccount
 {
 	NSString	*hostName;
-	NSInteger			portNumber;
+	int			portNumber;
 
 	//Host (server)
 	hostName = [self hostForPurple];
@@ -2030,7 +2033,7 @@
 {
 	PurpleProxyInfo		*proxy_info;
 	
-	AdiumProxyType  	proxyType = [[proxyConfig objectForKey:@"AdiumProxyType"] integerValue];
+	AdiumProxyType  	proxyType = [(NSNumber*)[proxyConfig objectForKey:@"AdiumProxyType"] intValue];
 	
 	proxy_info = purple_proxy_info_new();
 	purple_account_set_proxy_info(account, proxy_info);
@@ -2060,7 +2063,7 @@
 
 	if (proxyType != Adium_Proxy_None) {
 		purple_proxy_info_set_host(proxy_info, (char *)[[proxyConfig objectForKey:@"Host"] UTF8String]);
-		purple_proxy_info_set_port(proxy_info, [[proxyConfig objectForKey:@"Port"] integerValue]);
+		purple_proxy_info_set_port(proxy_info, [(NSNumber*)[proxyConfig objectForKey:@"Port"] intValue]);
 
 		purple_proxy_info_set_username(proxy_info, (char *)[[proxyConfig objectForKey:@"Username"] UTF8String]);
 		purple_proxy_info_set_password(proxy_info, (char *)[[proxyConfig objectForKey:@"Password"] UTF8String]);
@@ -2693,7 +2696,7 @@
 									break;
 								
 							} else if ((strcmp(prpl_formats[i],"jpeg") == 0) || (strcmp(prpl_formats[i],"jpg") == 0)) {								
-								buddyIconData = [image JPEGRepresentationWithCompressionFactor:1.0];
+								buddyIconData = [image JPEGRepresentationWithCompressionFactor:1.0f];
 								if (buddyIconData)
 									break;
 								
@@ -2715,12 +2718,12 @@
 							}						
 						}
 						
-						size_t maxSize = prpl_info->icon_spec.max_filesize;
-						if (maxSize > 0 && ([buddyIconData length] > maxSize)) {
-							AILog(@"Image %i is larger than %i!",[buddyIconData length],maxSize);
+						size_t maxFileSize = prpl_info->icon_spec.max_filesize;
+						if (maxFileSize > 0 && ([buddyIconData length] > maxFileSize)) {
+							AILog(@"Image %i is larger than %i!",[buddyIconData length],maxFileSize);
 							for (i = 0; prpl_formats[i]; i++) {
 								if ((strcmp(prpl_formats[i],"jpeg") == 0) || (strcmp(prpl_formats[i],"jpg") == 0)) {
-									buddyIconData = [image JPEGRepresentationWithMaximumByteSize:maxSize];
+									buddyIconData = [image JPEGRepresentationWithMaximumByteSize:maxFileSize];
 								}
 							}
 						}
@@ -3225,8 +3228,8 @@
 {
 	NSAssert(!chat.isGroupChat, @"Chat cannot be a group chat for typing.");
 	
-    AITypingState currentTypingState = [chat integerValueForProperty:KEY_TYPING];
-	AITypingState newTypingState = [typingStateNumber integerValue];
+    AITypingState currentTypingState = (AITypingState)[chat integerValueForProperty:KEY_TYPING];
+	AITypingState newTypingState = [typingStateNumber intValue];
 	
     if (currentTypingState != newTypingState) {
 		if (newTypingState == AITyping && openPsychicChats && ![chat isOpen]) {
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/CBPurpleOscarAccount.m
--- a/Plugins/Purple Service/CBPurpleOscarAccount.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/CBPurpleOscarAccount.m	Mon Dec 28 16:48:49 2009 -0500
@@ -553,7 +553,7 @@
 	if (purpleImagesToUnref) {
 		NSNumber	 *imgstoreNumber;
 		for (imgstoreNumber in purpleImagesToUnref) {
-			purple_imgstore_unref_by_id([imgstoreNumber integerValue]);			
+			purple_imgstore_unref_by_id([imgstoreNumber intValue]);			
 		}
 		
 		[purpleImagesToUnref release]; purpleImagesToUnref = nil;
@@ -676,7 +676,7 @@
 						if (requiresConversionToJPEG) {
 							NSImage				*image = [[NSImage alloc] initWithData:imageData];
 							
-							imageData = [[[image JPEGRepresentationWithCompressionFactor:1.0] retain] autorelease];
+							imageData = [[[image JPEGRepresentationWithCompressionFactor:1.0f] retain] autorelease];
 							extension = @"jpg";
 							[image release];
 
@@ -791,7 +791,7 @@
 	struct tm tm;
 
 	if (inDateAndTime && (strptime([inDateAndTime UTF8String], "%c", &tm) != NULL)) {
-		NSString	*valueDay, *valueTime, *replacementString;
+		NSString	*valueDay, *valueTime;
 		NSDate		*date;
 		/* Not set by strptime(); tells mktime()
 		 * to determine whether daylight saving time
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/ESIRCAccount.m
--- a/Plugins/Purple Service/ESIRCAccount.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/ESIRCAccount.m	Mon Dec 28 16:48:49 2009 -0500
@@ -26,6 +26,13 @@
 @interface ESIRCAccount()
 - (void)sendRawCommand:(NSString *)command;
 - (void)apply:(BOOL)apply operation:(NSString *)operation flag:(NSString *)flag;
+
+- (void)op;
+- (void)deop;
+- (void)devoice;
+- (void)kick;
+- (void)ban;
+- (void)bankick;
 @end
 
 static PurpleConversation *fakeConversation(PurpleAccount *account);
@@ -452,7 +459,7 @@
 
 - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
 {
-	AIOperationRequirement req = menuItem.tag;
+	AIOperationRequirement req = (AIOperationRequirement)menuItem.tag;
 	AIChat *chat = adium.interfaceController.activeChat;
 	BOOL anySelected = chat.chatContainer.messageViewController.selectedListObjects.count > 0;
 		
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/ESPurpleAIMAccount.h
--- a/Plugins/Purple Service/ESPurpleAIMAccount.h	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/ESPurpleAIMAccount.h	Mon Dec 28 16:48:49 2009 -0500
@@ -13,3 +13,9 @@
 }
 
 @end
+
+ at interface ESPurpleAIMAccount (Informal)
+- (void)updateInfo:(AIListContact *)theContact;
+- (void)directIMConnected:(AIListContact *)theContact;
+- (void)directIMDisconnected:(AIListContact *)theContact;
+ at end
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/ESPurpleJabberAccount.m
--- a/Plugins/Purple Service/ESPurpleJabberAccount.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/ESPurpleJabberAccount.m	Mon Dec 28 16:48:49 2009 -0500
@@ -44,6 +44,8 @@
 
 @interface ESPurpleJabberAccount ()
 - (BOOL)enableXMLConsole;
+- (void)registerGateway:(NSMenuItem *)mitem;
+- (void)removeGateway:(NSMenuItem *)mitem;
 @end
 
 @implementation ESPurpleJabberAccount
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/ESPurpleJabberAccountViewController.m
--- a/Plugins/Purple Service/ESPurpleJabberAccountViewController.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/ESPurpleJabberAccountViewController.m	Mon Dec 28 16:48:49 2009 -0500
@@ -24,6 +24,11 @@
 
 #define SERVERFEEDRSSURL @"http://xmpp.org/services/services-full.xml"
 
+ at interface ESPurpleJabberAccountViewController ()
+- (void)contactListChanged:(NSNotification *)n;
+- (void)registrationSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+ at end
+
 @implementation ESPurpleJabberAccountViewController
 
 - (NSString *)nibName{
@@ -164,8 +169,8 @@
 	return [adium.contactController.contactList countOfContainedObjects];
 }
 
-- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index {
-	return [[adium.contactController.contactList.containedObjects objectAtIndex:index] formattedUID];
+- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)idx {
+	return [[adium.contactController.contactList.containedObjects objectAtIndex:idx] formattedUID];
 }
 
 - (NSUInteger)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)string {
@@ -201,8 +206,8 @@
 	if((id)dist1obj == [NSNull null])
 		return NSOrderedDescending;
 	
-	CGFloat dist1 = [dist1obj doubleValue];
-	CGFloat dist2 = [dist2obj doubleValue];
+	CGFloat dist1 = (CGFloat)[dist1obj doubleValue];
+	CGFloat dist2 = (CGFloat)[dist2obj doubleValue];
 	
 	if(fabs(dist1 - dist2) < 0.000001)
 		return NSOrderedSame;
@@ -236,8 +241,8 @@
 				MachineLocation loc;
 				ReadLocation(&loc);
 				
-				CGFloat latitude = FractToFloat(loc.latitude)*(M_PI/2.0f);
-				CGFloat longitude = FractToFloat(loc.longitude)*(M_PI/2.0f);
+				CGFloat latitude = (CGFloat)(FractToFloat(loc.latitude)*(M_PI/2.0));
+				CGFloat longitude = (CGFloat)(FractToFloat(loc.longitude)*(M_PI/2.0));
 				
 				servers = [[NSMutableArray alloc] init];
 				
@@ -259,14 +264,14 @@
 						 * If it turns out to be flat or doughnut-shaped, this will not work!
 						 */
 						
-						CGFloat latitude2 = [[latitudeNode stringValue] doubleValue] * (M_PI/180.0f);
-						CGFloat longitude2 = [[longitudeNode stringValue] doubleValue] * (M_PI/180.0f);
+						CGFloat latitude2 = (CGFloat)([[latitudeNode stringValue] doubleValue] * (M_PI/180.0));
+						CGFloat longitude2 = (CGFloat)([[longitudeNode stringValue] doubleValue] * (M_PI/180.0));
 						
-						CGFloat d_lat = sinf((latitude2 - latitude)/2.0);
-						CGFloat d_long = sinf((longitude2 - longitude)/2.0);
-						CGFloat a = d_lat*d_lat + cosf(latitude)*cosf(latitude2)*d_long*d_long;
-						CGFloat c = 2*atan2f(sqrt(a),sqrt(1.0-a));
-						CGFloat d = 6372.797*c; // mean earth radius
+						CGFloat d_lat = AIsin((latitude2 - latitude)/2.0f);
+						CGFloat d_long = AIsin((longitude2 - longitude)/2.0f);
+						CGFloat a = d_lat*d_lat + AIcos(latitude)*AIcos(latitude2)*d_long*d_long;
+						CGFloat c = 2*AIatan2(AIsqrt(a),AIsqrt(1.0f-a));
+						CGFloat d = 6372.797f*c; // mean earth radius
 						
 						distance = [NSNumber numberWithDouble:d];
 					}
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/ESPurpleMSNAccount.m
--- a/Plugins/Purple Service/ESPurpleMSNAccount.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/ESPurpleMSNAccount.m	Mon Dec 28 16:48:49 2009 -0500
@@ -42,6 +42,7 @@
 @interface ESPurpleMSNAccount ()
 - (void)updateFriendlyNameAfterConnect;
 - (void)setServersideDisplayName:(NSString *)friendlyName;
+- (void)gotFilteredFriendlyName:(NSAttributedString *)filteredFriendlyName context:(NSDictionary *)infoDict;
 @end
 
 @implementation ESPurpleMSNAccount
diff -r 8e23376a39e6 -r 6388b2768ef1 Plugins/Purple Service/ESPurpleMeanwhileAccount.m
--- a/Plugins/Purple Service/ESPurpleMeanwhileAccount.m	Mon Dec 28 13:51:48 2009 -0500
+++ b/Plugins/Purple Service/ESPurpleMeanwhileAccount.m	Mon Dec 28 16:48:49 2009 -0500
@@ -51,8 +51,11 @@




More information about the commits mailing list