adium 2693:4bcad311909f: Some new type fixes for 64bit in our li...
commits at adium.im
commits at adium.im
Mon Sep 7 20:40:18 UTC 2009
details: http://hg.adium.im/adium/rev/4bcad311909f
revision: 2693:4bcad311909f
author: Stephen Holt <sholt at adium.im>
date: Mon Sep 07 16:47:42 2009 -0400
Some new type fixes for 64bit in our libpurple connector. Should fix some odd issues, like crashing when initiating an OTR session.
diffs (truncated from 1376 to 1000 lines):
diff -r 3a98f17f4423 -r 4bcad311909f Frameworks/Adium Framework/Source/AIAccount.h
--- a/Frameworks/Adium Framework/Source/AIAccount.h Sun Sep 06 23:56:12 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIAccount.h Mon Sep 07 16:47:42 2009 -0400
@@ -188,7 +188,7 @@
- (void)willBeDeleted;
@property (readonly, nonatomic) id<AIAccountControllerRemoveConfirmationDialog> confirmationDialogForAccountDeletion;
@property (readonly, nonatomic) NSAlert *alertForAccountDeletion;
-- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(int)returnCode;
+- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(NSInteger)returnCode;
@property (readonly, nonatomic) NSString *explicitFormattedUID;
@property (readonly, nonatomic) BOOL useHostForPasswordServerName;
@property (readonly, nonatomic) BOOL useInternalObjectIDForPasswordName;
diff -r 3a98f17f4423 -r 4bcad311909f Frameworks/Adium Framework/Source/AIAccount.m
--- a/Frameworks/Adium Framework/Source/AIAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -271,7 +271,7 @@
*
* If this implementation is not called, dialog should be released by the subclass.
*/
-- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(int)returnCode
+- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(NSInteger)returnCode
{
if(returnCode == NSAlertDefaultReturn) {
[self performDelete];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AILibpurplePlugin.h
--- a/Plugins/Purple Service/AILibpurplePlugin.h Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AILibpurplePlugin.h Mon Sep 07 16:47:42 2009 -0400
@@ -1,4 +1,3 @@
-
@protocol AILibpurplePlugin <AIPlugin>
/*!
* @brief Perform early libpurple-specific installation of the plugin.
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m
--- a/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m Mon Sep 07 16:47:42 2009 -0400
@@ -100,7 +100,7 @@
if(err == noErr) {
// Did we ask the user to confirm this certificate before?
// Note that this information is not stored on the disk, which is on purpose.
- NSUInteger oldCertHash = [[acceptedCertificates objectForKey:hostname] unsignedIntValue];
+ NSUInteger oldCertHash = [[acceptedCertificates objectForKey:hostname] unsignedIntegerValue];
if (oldCertHash) {
NSData *certData = [[NSData alloc] initWithBytesNoCopy:data.Data length:data.Length freeWhenDone:NO];
NSUInteger newCertHash = [certData hash];
@@ -278,7 +278,7 @@
[self runTrustPanelOnWindow:window];
}
-- (void)certificateTrustSheetDidEnd:(SFCertificateTrustPanel *)trustpanel returnCode:(int)returnCode contextInfo:(void *)contextInfo {
+- (void)certificateTrustSheetDidEnd:(SFCertificateTrustPanel *)trustpanel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo {
BOOL didTrustCerficate = (returnCode == NSOKButton);
NSWindow *parentWindow = (NSWindow *)contextInfo;
@@ -290,7 +290,7 @@
CSSM_DATA certdata;
OSStatus err = SecCertificateGetData((SecCertificateRef)CFArrayGetValueAtIndex(certificates, 0), &certdata);
if(err == noErr) {
- [acceptedCertificates setObject:[NSNumber numberWithUnsignedInt:[[NSData dataWithBytes:certdata.Data length:certdata.Length] hash]]
+ [acceptedCertificates setObject:[NSNumber numberWithUnsignedInteger:[[NSData dataWithBytes:certdata.Data length:certdata.Length] hash]]
forKey:hostname];
}
}
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AIPurpleCertificateViewer.m
--- a/Plugins/Purple Service/AIPurpleCertificateViewer.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AIPurpleCertificateViewer.m Mon Sep 07 16:47:42 2009 -0400
@@ -48,7 +48,7 @@
[panel beginSheetForWindow:window modalDelegate:self didEndSelector:@selector(certificateSheetDidEnd:returnCode:contextInfo:) contextInfo:window certificates:(NSArray*)certificatechain showGroup:YES];
}
-- (void)certificateSheetDidEnd:(SFCertificatePanel*)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo {
+- (void)certificateSheetDidEnd:(SFCertificatePanel*)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo {
NSWindow *win = (NSWindow*)contextInfo;
[panel release];
[win performSelector:@selector(performClose:) withObject:nil afterDelay:0.0];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleJabberAdHocCommand.h
--- a/Plugins/Purple Service/AMPurpleJabberAdHocCommand.h Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleJabberAdHocCommand.h Mon Sep 07 16:47:42 2009 -0400
@@ -41,7 +41,7 @@
- (void)setSessionid:(NSString *)_sessionid; /* this can be used by the AMPurpleJabberAdHocServerDelegate for tracking the specific session */
/* actions is an NSArray of NSStrings, which can be any combination of @"execute", @"cancel", @"prev", @"next", @"complete" */
-- (AMPurpleJabberAdHocCommand *)generateReplyWithForm:(AMPurpleJabberFormGenerator *)form actions:(NSArray *)actions defaultAction:(unsigned)defaultAction status:(enum AMPurpleJabberAdHocCommandStatus)status;
+- (AMPurpleJabberAdHocCommand *)generateReplyWithForm:(AMPurpleJabberFormGenerator *)form actions:(NSArray *)actions defaultAction:(NSUInteger)defaultAction status:(enum AMPurpleJabberAdHocCommandStatus)status;
- (AMPurpleJabberAdHocCommand *)generateReplyWithNote:(NSString *)text type:(enum AMPurpleJabberAdHocCommandNoteType)type status:(enum AMPurpleJabberAdHocCommandStatus)status;
- (void)send;
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleJabberAdHocCommand.m
--- a/Plugins/Purple Service/AMPurpleJabberAdHocCommand.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleJabberAdHocCommand.m Mon Sep 07 16:47:42 2009 -0400
@@ -55,7 +55,7 @@
[old release];
}
-- (AMPurpleJabberAdHocCommand*)generateReplyWithForm:(AMPurpleJabberFormGenerator*)form actions:(NSArray*)actions defaultAction:(unsigned)defaultAction status:(enum AMPurpleJabberAdHocCommandStatus)status {
+- (AMPurpleJabberAdHocCommand*)generateReplyWithForm:(AMPurpleJabberFormGenerator*)form actions:(NSArray*)actions defaultAction:(NSUInteger)defaultAction status:(enum AMPurpleJabberAdHocCommandStatus)status {
const char *nodeattr = xmlnode_get_attrib(command,"node");
if(!nodeattr)
return nil;
@@ -146,7 +146,7 @@
xmlnode_set_attrib(cmdcopy, "sessionid", [sessionid UTF8String]);
xmlnode_insert_child(iq, cmdcopy);
- int len = 0;
+ gint len = 0;
char *text = xmlnode_to_str(iq, &len);
PURPLE_PLUGIN_PROTOCOL_INFO(purple_account_get_connection(account)->prpl)->send_raw(purple_account_get_connection(account), text, len);
g_free(text);
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleJabberNode.m
--- a/Plugins/Purple Service/AMPurpleJabberNode.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleJabberNode.m Mon Sep 07 16:47:42 2009 -0400
@@ -7,7 +7,7 @@
#import "AMPurpleJabberNode.h"
-static unsigned iqCounter = 0;
+static NSUInteger iqCounter = 0;
@interface AMPurpleJabberNode()
@property (readwrite, copy, nonatomic) NSString *name;
@@ -234,7 +234,7 @@
[iq addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"get"]];
if (jid)
[iq addAttribute:[NSXMLNode attributeWithName:@"to" stringValue:jid]];
- [iq addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:[NSString stringWithFormat:@"%@%u,",[self className], iqCounter++]]];
+ [iq addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:[NSString stringWithFormat:@"%@%lu,",[self className], iqCounter++]]];
NSXMLElement *query = [NSXMLNode elementWithName:@"query"];
[query addNamespace:[NSXMLNode namespaceWithName:@"" stringValue:@"http://jabber.org/protocol/disco#items"]];
@@ -256,7 +256,7 @@
[iq addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"get"]];
if (jid)
[iq addAttribute:[NSXMLNode attributeWithName:@"to" stringValue:jid]];
- [iq addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:[NSString stringWithFormat:@"%@%u",[self className], iqCounter++]]];
+ [iq addAttribute:[NSXMLNode attributeWithName:@"id" stringValue:[NSString stringWithFormat:@"%@%lu",[self className], iqCounter++]]];
NSXMLElement *query = [NSXMLNode elementWithName:@"query"];
[query addNamespace:[NSXMLNode namespaceWithName:@"" stringValue:@"http://jabber.org/protocol/disco#info"]];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleJabberServiceDiscoveryBrowserController.m
--- a/Plugins/Purple Service/AMPurpleJabberServiceDiscoveryBrowserController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleJabberServiceDiscoveryBrowserController.m Mon Sep 07 16:47:42 2009 -0400
@@ -73,7 +73,7 @@
- (IBAction)openService:(id)sender
{
- int row = [outlineview clickedRow];
+ NSInteger row = [outlineview clickedRow];
if (row != -1) {
AMPurpleJabberNode *item = [outlineview itemAtRow:row];
NSArray *identities = [item identities];
@@ -130,7 +130,7 @@
- (NSMenu *)outlineView:(NSOutlineView *)outlineView menuForEvent:(NSEvent *)theEvent
{
NSMenu *menu = nil;
- int row = [outlineView rowAtPoint:[outlineView convertPoint:[theEvent locationInWindow]
+ NSInteger row = [outlineView rowAtPoint:[outlineView convertPoint:[theEvent locationInWindow]
fromView:nil]];
if (row != -1) {
@@ -352,7 +352,7 @@
NSButtonCell *triangleCell = [[NSButtonCell alloc] initImageCell:nil];
[triangleCell setButtonType:NSOnOffButton];
[triangleCell setBezelStyle:NSDisclosureBezelStyle];
- [triangleCell setIntValue:NSOffState];
+ [triangleCell setIntegerValue:NSOffState];
[det_triangle_closed lockFocus];
[triangleCell drawWithFrame:NSMakeRect(0.0,0.0,13.0,13.0) inView:outlineView];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleRequestFieldsController.m
--- a/Plugins/Purple Service/AMPurpleRequestFieldsController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleRequestFieldsController.m Mon Sep 07 16:47:42 2009 -0400
@@ -162,11 +162,11 @@
- (NSXMLElement*)xhtml {
NSXMLElement *result = [super xhtml];
- int defaultvalue = purple_request_field_int_get_default_value(field);
+ NSInteger defaultvalue = purple_request_field_int_get_default_value(field);
NSXMLElement *textinput = [NSXMLNode elementWithName:@"input"];
[textinput addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"text"]];
- [textinput addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%d",defaultvalue]]];
+ [textinput addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%ld",defaultvalue]]];
[textinput addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
// XXX add javascript to make sure this is integer-only
@@ -178,7 +178,7 @@
}
- (void)applyValue:(NSString*)value {
- purple_request_field_int_set_value(field, [value intValue]);
+ purple_request_field_int_set_value(field, [value integerValue]);
}
@end
@@ -220,13 +220,13 @@
GList *labels = purple_request_field_choice_get_labels(field);
guint len = g_list_length(labels);
- int defaultvalue = purple_request_field_choice_get_default_value(field);
+ NSInteger defaultvalue = purple_request_field_choice_get_default_value(field);
// Apple HIG: Don't use checkboxes for lists of more than 5 items, use a popupbutton instead
if(len > 5) {
NSXMLElement *popup = [NSXMLNode elementWithName:@"select"];
[popup addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
- int i=0;
+ NSInteger i=0;
GList *label;
for(label = labels; label; label = g_list_next(label), ++i) {
const char *labelstr = label->data;
@@ -234,7 +234,7 @@
continue;
NSXMLElement *option = [NSXMLNode elementWithName:@"option" stringValue:[NSString stringWithUTF8String:labelstr]];
- [option addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%u",i]]];
+ [option addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%lu",i]]];
if(i == defaultvalue)
[option addAttribute:[NSXMLNode attributeWithName:@"selected" stringValue:@"selected"]];
[popup addChild:option];
@@ -243,7 +243,7 @@
children:[NSArray arrayWithObject:popup]
attributes:[NSArray arrayWithObject:[NSXMLNode attributeWithName:@"class" stringValue:@"input"]]]];
} else {
- int i=0;
+ NSInteger i=0;
NSMutableArray *radios = [NSMutableArray array];
GList *label;
for(label = labels; label; label = g_list_next(label), ++i) {
@@ -253,7 +253,7 @@
NSXMLElement *radiobutton = [NSXMLNode elementWithName:@"input"];
[radiobutton addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"radio"]];
- [radiobutton addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%u",i]]];
+ [radiobutton addAttribute:[NSXMLNode attributeWithName:@"value" stringValue:[NSString stringWithFormat:@"%lu",i]]];
[radiobutton addAttribute:[NSXMLNode attributeWithName:@"name" stringValue:[self key]]];
if(i == defaultvalue)
@@ -271,7 +271,7 @@
}
- (void)applyValue:(NSString*)value {
- purple_request_field_choice_set_value(field, [value intValue]);
+ purple_request_field_choice_set_value(field, [value integerValue]);
}
@end
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleSearchResultsController.m
--- a/Plugins/Purple Service/AMPurpleSearchResultsController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleSearchResultsController.m Mon Sep 07 16:47:42 2009 -0400
@@ -21,7 +21,7 @@
purpleresults = results;
// add the action buttons
- float offset = [buttonview frame].size.width - 20.0f;
+ CGFloat offset = [buttonview frame].size.width - 20.0f;
searchButtons = [[NSMutableDictionary alloc] init];
GList *but;
for(but = results->buttons; but; but = g_list_next(but)) {
@@ -82,11 +82,11 @@
[tableview removeTableColumn:[[tableview tableColumns] objectAtIndex:0]];
// add the ones we need
- unsigned index = 0;
+ NSUInteger index = 0;
GList *column;
for(column = results->columns; column; column = g_list_next(column)) {
PurpleNotifySearchColumn *scol = column->data;
- NSTableColumn *tcol = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithUnsignedInt:index++]];
+ NSTableColumn *tcol = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithUnsignedInteger:index++]];
if(scol->title)
[[tcol headerCell] setStringValue:[NSString stringWithUTF8String:scol->title]];
@@ -100,13 +100,13 @@
GList *row;
for(row = results->rows; row; row = g_list_next(row)) {
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- unsigned col = 0;
+ NSUInteger col = 0;
[searchResults addObject:dict];
GList *cell;
for(cell = row->data; cell; cell = g_list_next(cell)) {
const char *text = cell->data;
if(text)
- [dict setObject:[NSString stringWithUTF8String:text] forKey:[NSNumber numberWithUnsignedInt:col++]];
+ [dict setObject:[NSString stringWithUTF8String:text] forKey:[NSNumber numberWithUnsignedInteger:col++]];
}
[dict release];
}
@@ -129,13 +129,13 @@
GList *row;
for(row = results->rows; row; row = g_list_next(row)) {
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- unsigned col = 0;
+ NSUInteger col = 0;
[searchResults addObject:dict];
GList *cell;
for(cell = row->data; cell; cell = g_list_next(cell)) {
const char *text = cell->data;
if(text)
- [dict setObject:[NSString stringWithUTF8String:text] forKey:[NSNumber numberWithUnsignedInt:col++]];
+ [dict setObject:[NSString stringWithUTF8String:text] forKey:[NSNumber numberWithUnsignedInteger:col++]];
}
[dict release];
}
@@ -174,7 +174,7 @@
NSBeep();
return;
}
- int row = [tableview selectedRow];
+ NSInteger row = [tableview selectedRow];
GList *rowptr = NULL;
if(row != -1)
rowptr = g_list_nth_data(purpleresults->rows,row);
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/AMPurpleTuneTooltip.m
--- a/Plugins/Purple Service/AMPurpleTuneTooltip.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/AMPurpleTuneTooltip.m Mon Sep 07 16:47:42 2009 -0400
@@ -52,7 +52,7 @@
const char *titlestr = purple_value_get_string(title);
const char *artiststr = NULL;
const char *albumstr = NULL;
- int timeval = -1;
+ NSInteger timeval = -1;
if (!titlestr)
return nil;
if (artist)
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/CBPurpleAccount.h
--- a/Plugins/Purple Service/CBPurpleAccount.h Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/CBPurpleAccount.h Mon Sep 07 16:47:42 2009 -0400
@@ -86,7 +86,7 @@
- (void)configureAccountProxyNotifyingTarget:(id)target selector:(SEL)selector;
- (void)disconnect;
- (PurpleConnectionError)lastDisconnectionReason;
-- (NSString *)connectionStringForStep:(int)step;
+- (NSString *)connectionStringForStep:(NSInteger)step;
- (void)configurePurpleAccount;
- (PurpleSslConnection *)secureConnection;
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/CBPurpleAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -294,7 +294,7 @@
- (void)updateStatusForContact:(AIListContact *)theContact toStatusType:(NSNumber *)statusTypeNumber statusName:(NSString *)statusName statusMessage:(NSAttributedString *)statusMessage isMobile:(BOOL)isMobile
{
[theContact setStatusWithName:statusName
- statusType:[statusTypeNumber intValue]
+ statusType:[statusTypeNumber integerValue]
notify:NotifyLater];
[theContact setStatusMessage:statusMessage
notify:NotifyLater];
@@ -325,7 +325,7 @@
//Evil level (warning level)
- (void)updateEvil:(AIListContact *)theContact withData:(NSNumber *)evilNumber
{
- [theContact setWarningLevel:[evilNumber intValue]
+ [theContact setWarningLevel:[evilNumber integerValue]
notify:NotifyLater];
//Apply any changes
@@ -398,13 +398,13 @@
case PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER:
[array addObject:[NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithUTF8String:purple_notify_user_info_entry_get_label(user_info_entry)], KEY_KEY,
- [NSNumber numberWithInt:AIUserInfoSectionHeader], KEY_TYPE,
+ [NSNumber numberWithInteger:AIUserInfoSectionHeader], KEY_TYPE,
nil]];
break;
case PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK:
[array addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:AIUserInfoSectionBreak], KEY_TYPE,
+ [NSNumber numberWithInteger:AIUserInfoSectionBreak], KEY_TYPE,
nil]];
break;
@@ -451,8 +451,8 @@
NSString *webProfileValue = [NSString stringWithFormat:@"%s</a>", _("View web profile")];
- int i;
- unsigned int count = [array count];
+ NSInteger i;
+ NSUInteger count = [array count];
for (i = 0; i < count; i++) {
NSDictionary *dict = [array objectAtIndex:i];
NSString *value = [dict objectForKey:KEY_VALUE];
@@ -1129,7 +1129,7 @@
- (void)updateForChat:(AIChat *)chat type:(NSNumber *)type
{
- AIChatUpdateType updateType = [type intValue];
+ AIChatUpdateType updateType = [type integerValue];
NSString *key = nil;
switch (updateType) {
case AIChatTimedOut:
@@ -1563,7 +1563,7 @@
AILog(@"Set privacy options for %@ (%x %x) to %i",
self,account,purple_account_get_connection(account),account->perm_deny);
- [self setPreference:[NSNumber numberWithInt:option]
+ [self setPreference:[NSNumber numberWithInteger:option]
forKey:KEY_PRIVACY_OPTION
group:GROUP_ACCOUNT_STATUS];
}
@@ -1684,7 +1684,7 @@
//Update an ESFileTransfer object progress
- (void)updateProgressForFileTransfer:(ESFileTransfer *)fileTransfer percent:(NSNumber *)percent bytesSent:(NSNumber *)bytesSent
{
- float percentDone = [percent floatValue];
+ CGFloat percentDone = [percent doubleValue];
[fileTransfer setPercentDone:percentDone bytesSent:[bytesSent unsignedLongValue]];
}
@@ -1881,7 +1881,7 @@
- (void)configurePurpleAccount
{
NSString *hostName;
- int portNumber;
+ NSInteger portNumber;
//Host (server)
hostName = [self hostForPurple];
@@ -1975,7 +1975,7 @@
}
//Sublcasses should override to provide a string for each progress step
-- (NSString *)connectionStringForStep:(int)step { return nil; };
+- (NSString *)connectionStringForStep:(NSInteger)step { return nil; };
/*!
* @brief Should the account's status be updated as soon as it is connected?
@@ -2021,7 +2021,7 @@
- (void)accountConnectionProgressStep:(NSNumber *)step percentDone:(NSNumber *)connectionProgressPrecent
{
- NSString *connectionProgressString = [self connectionStringForStep:[step intValue]];
+ NSString *connectionProgressString = [self connectionStringForStep:[step integerValue]];
[self setValue:connectionProgressString forProperty:@"ConnectionProgressString" notify:NO];
[self setValue:connectionProgressPrecent forProperty:@"ConnectionProgressPercent" notify:NO];
@@ -2029,7 +2029,7 @@
//Apply any changes
[self notifyOfChangedPropertiesSilently:NO];
- AILog(@"************ %@ --step-- %i",self.UID,[step intValue]);
+ AILog(@"************ %@ --step-- %i",self.UID,[step integerValue]);
}
/*!
@@ -2357,8 +2357,8 @@
[arguments setObject:(name ? name : @"") forKey:[NSString stringWithUTF8String:PURPLE_TUNE_TITLE]];
[arguments setObject:([tuneinfo objectForKey:ITUNES_ALBUM] ? [tuneinfo objectForKey:ITUNES_ALBUM] : @"") forKey:[NSString stringWithUTF8String:PURPLE_TUNE_ALBUM]];
[arguments setObject:([tuneinfo objectForKey:ITUNES_GENRE] ? [tuneinfo objectForKey:ITUNES_GENRE] : @"") forKey:[NSString stringWithUTF8String:PURPLE_TUNE_GENRE]];
- [arguments setObject:([tuneinfo objectForKey:ITUNES_TOTAL_TIME] ? [tuneinfo objectForKey:ITUNES_TOTAL_TIME]:[NSNumber numberWithInt:-1]) forKey:[NSString stringWithUTF8String:PURPLE_TUNE_TIME]];
- [arguments setObject:([tuneinfo objectForKey:ITUNES_YEAR] ? [tuneinfo objectForKey:ITUNES_YEAR]:[NSNumber numberWithInt:-1]) forKey:[NSString stringWithUTF8String:PURPLE_TUNE_YEAR]];
+ [arguments setObject:([tuneinfo objectForKey:ITUNES_TOTAL_TIME] ? [tuneinfo objectForKey:ITUNES_TOTAL_TIME]:[NSNumber numberWithInteger:-1]) forKey:[NSString stringWithUTF8String:PURPLE_TUNE_TIME]];
+ [arguments setObject:([tuneinfo objectForKey:ITUNES_YEAR] ? [tuneinfo objectForKey:ITUNES_YEAR]:[NSNumber numberWithInteger:-1]) forKey:[NSString stringWithUTF8String:PURPLE_TUNE_YEAR]];
[arguments setObject:([tuneinfo objectForKey:ITUNES_STORE_URL] ? [tuneinfo objectForKey:ITUNES_STORE_URL] : @"") forKey:[NSString stringWithUTF8String:PURPLE_TUNE_URL]];
[arguments setObject:[NSString stringWithFormat:@"%@%@%@", (name ? name : @""), (name && artist ? @" - " : @""), (artist ? artist : @"")]
@@ -2542,7 +2542,7 @@
if (prpl_info && (prpl_info->icon_spec.format)) {
BOOL smallEnough, prplScales;
- unsigned i;
+ NSUInteger i;
/* We need to scale it down if:
* 1) The prpl needs to scale before it sends to the server or other buddies AND
@@ -2555,8 +2555,8 @@
prplScales = (prpl_info->icon_spec.scale_rules & PURPLE_ICON_SCALE_SEND) || (prpl_info->icon_spec.scale_rules & PURPLE_ICON_SCALE_DISPLAY);
if (prplScales && !smallEnough) {
- int width = imageSize.width;
- int height = imageSize.height;
+ gint width = (gint)imageSize.width;
+ gint height = (gint)imageSize.height;
purple_buddy_icon_get_scale_size(&prpl_info->icon_spec, &width, &height);
//Determine the scaled size. If it's too big, scale to the largest permissable size
@@ -2955,7 +2955,7 @@
}
}
-- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(int)returnCode
+- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(NSInteger)returnCode
{
PurplePluginProtocolInfo *prpl_info = self.protocolInfo;
@@ -3128,7 +3128,7 @@
NSAssert(!chat.isGroupChat, @"Chat cannot be a group chat for typing.");
AITypingState currentTypingState = [chat integerValueForProperty:KEY_TYPING];
- AITypingState newTypingState = [typingStateNumber intValue];
+ AITypingState newTypingState = [typingStateNumber integerValue];
if (currentTypingState != newTypingState) {
if (newTypingState == AITyping && openPsychicChats && ![chat isOpen]) {
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/CBPurpleOscarAccount.m
--- a/Plugins/Purple Service/CBPurpleOscarAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/CBPurpleOscarAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -217,7 +217,7 @@
return shouldAttemptReconnect;
}
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step)
{
@@ -553,7 +553,7 @@
if (purpleImagesToUnref) {
NSNumber *imgstoreNumber;
for (imgstoreNumber in purpleImagesToUnref) {
- purple_imgstore_unref_by_id([imgstoreNumber intValue]);
+ purple_imgstore_unref_by_id([imgstoreNumber integerValue]);
}
[purpleImagesToUnref release]; purpleImagesToUnref = nil;
@@ -697,11 +697,11 @@
if (![[filename pathExtension] length])
filename = [filename stringByAppendingPathExtension:extension];
- unsigned imgBytesLength = [imageData length];
+ NSUInteger imgBytesLength = [imageData length];
gpointer imgBytes = malloc(imgBytesLength);
[imageData getBytes:imgBytes];
/* purple_imgstore_add_with_id() will take ownership of imgBytes and free it when done*/
- int imgstore = purple_imgstore_add_with_id(imgBytes, imgBytesLength, [filename UTF8String]);
+ NSInteger imgstore = purple_imgstore_add_with_id(imgBytes, imgBytesLength, [filename UTF8String]);
AILog(@"Adding image id %i with name %s", imgstore, (filename ? [filename UTF8String] : "(null)"));
@@ -709,7 +709,7 @@
[processedString appendString:newTag];
if (!purpleImagesToUnref) purpleImagesToUnref = [[NSMutableSet alloc] init];
- [purpleImagesToUnref addObject:[NSNumber numberWithInt:imgstore]];
+ [purpleImagesToUnref addObject:[NSNumber numberWithInteger:imgstore]];
}
}
@@ -753,7 +753,7 @@
* before someone will notice this "odd" behavior and file a bug report... -evands
*/
- if ((theContact.statusType == [statusTypeNumber intValue]) &&
+ if ((theContact.statusType == [statusTypeNumber integerValue]) &&
((statusName && !theContact.statusName) || [theContact.statusName isEqualToString:statusName])) {
//Type and name match...
NSString *currentStatusMessage = [theContact statusMessageString];
@@ -822,8 +822,8 @@
NSString *onlineSinceKey = [NSString stringWithUTF8String:_("Online Since")];
NSString *memberSinceKey = [NSString stringWithUTF8String:_("Member Since")];
- int i;
- unsigned int count = [array count];
+ NSInteger i;
+ NSUInteger count = [array count];
for (i = 0; i < count; i++) {
NSDictionary *dict = [array objectAtIndex:i];
NSString *key = [dict objectForKey:KEY_KEY];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/DCPurpleOscarJoinChatViewController.m
--- a/Plugins/Purple Service/DCPurpleOscarJoinChatViewController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/DCPurpleOscarJoinChatViewController.m Mon Sep 07 16:47:42 2009 -0400
@@ -74,7 +74,7 @@
- (void)joinChatWithAccount:(AIAccount *)inAccount
{
NSString *room;
- int exchange;
+ NSInteger exchange;
NSDictionary *chatCreationInfo;
//Obtain room and exchange from the view
@@ -85,7 +85,7 @@
exchange = 4;
//The chatCreationInfo has keys corresponding to the GHashTable keys and values to match them.
- chatCreationInfo = [NSDictionary dictionaryWithObjectsAndKeys:room,@"room",[NSNumber numberWithInt:exchange],@"exchange",nil];
+ chatCreationInfo = [NSDictionary dictionaryWithObjectsAndKeys:room,@"room",[NSNumber numberWithInteger:exchange],@"exchange",nil];
NSString *invitationMessage = [textField_inviteMessage stringValue];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleAIMAccount.m
--- a/Plugins/Purple Service/ESPurpleAIMAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleAIMAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -105,7 +105,7 @@
{
SEL updateSelector = nil;
- switch ([event intValue]) {
+ switch ([event integerValue]) {
case PURPLE_BUDDY_INFO_UPDATED: {
updateSelector = @selector(updateInfo:);
break;
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleGaduGaduAccount.m
--- a/Plugins/Purple Service/ESPurpleGaduGaduAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleGaduGaduAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -35,7 +35,7 @@
return "prpl-gg";
}
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step)
{
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleJabberAccount.m
--- a/Plugins/Purple Service/ESPurpleJabberAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleJabberAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -295,7 +295,7 @@
}
- (id)authorizationRequestWithDict:(NSDictionary*)dict {
- switch ([[self preferenceForKey:KEY_JABBER_SUBSCRIPTION_BEHAVIOR group:GROUP_ACCOUNT_STATUS] intValue]) {
+ switch ([[self preferenceForKey:KEY_JABBER_SUBSCRIPTION_BEHAVIOR group:GROUP_ACCOUNT_STATUS] integerValue]) {
case 2: // always accept + add
// add
{
@@ -384,7 +384,7 @@
return (AILocalizedString(@"Roster","Roster - the Jabber default group"));
}
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step) {
case 0:
@@ -660,7 +660,7 @@
}
//Set our priority, which is actually set along with the status...Default is 0.
- [arguments setObject:(priority ? priority : [NSNumber numberWithInt:0])
+ [arguments setObject:(priority ? priority : [NSNumber numberWithInteger:0])
forKey:@"priority"];
//We could potentially set buzz on a per-status basis. We have no UI for this, however.
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleJabberAccountViewController.m
--- a/Plugins/Purple Service/ESPurpleJabberAccountViewController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleJabberAccountViewController.m Mon Sep 07 16:47:42 2009 -0400
@@ -20,6 +20,7 @@
#import <Adium/AIService.h>
#import <Adium/AIContactList.h>
#import <SystemConfiguration/SystemConfiguration.h>
+#include <tgmath.h>
#define SERVERFEEDRSSURL @"http://xmpp.org/services/services-full.xml"
@@ -75,7 +76,7 @@
[textField_ftProxies setStringValue:ftProxies ?: @""];
//Subscription behavior
- int subbeh = [[account preferenceForKey:KEY_JABBER_SUBSCRIPTION_BEHAVIOR group:GROUP_ACCOUNT_STATUS] intValue];
+ NSInteger subbeh = [[account preferenceForKey:KEY_JABBER_SUBSCRIPTION_BEHAVIOR group:GROUP_ACCOUNT_STATUS] integerValue];
[popup_subscriptionBehavior selectItemWithTag:subbeh];
NSString *defaultGroup = [account preferenceForKey:KEY_JABBER_SUBSCRIPTION_GROUP group:GROUP_ACCOUNT_STATUS];
[comboBox_subscriptionGroup setStringValue:(defaultGroup ? defaultGroup : @"")];
@@ -115,15 +116,15 @@
forKey:KEY_JABBER_FT_PROXIES group:GROUP_ACCOUNT_STATUS];
//Priority
- [account setPreference:([textField_priorityAvailable intValue] ? [NSNumber numberWithInt:[textField_priorityAvailable intValue]] : nil)
+ [account setPreference:([textField_priorityAvailable integerValue] ? [NSNumber numberWithInteger:[textField_priorityAvailable integerValue]] : nil)
forKey:KEY_JABBER_PRIORITY_AVAILABLE
group:GROUP_ACCOUNT_STATUS];
- [account setPreference:([textField_priorityAway intValue] ? [NSNumber numberWithInt:[textField_priorityAway intValue]] : nil)
+ [account setPreference:([textField_priorityAway integerValue] ? [NSNumber numberWithInteger:[textField_priorityAway integerValue]] : nil)
forKey:KEY_JABBER_PRIORITY_AWAY
group:GROUP_ACCOUNT_STATUS];
//Subscription Behavior
- [account setPreference:([[popup_subscriptionBehavior selectedItem] tag] ? [NSNumber numberWithInt:[[popup_subscriptionBehavior selectedItem] tag]] : nil)
+ [account setPreference:([[popup_subscriptionBehavior selectedItem] tag] ? [NSNumber numberWithInteger:[[popup_subscriptionBehavior selectedItem] tag]] : nil)
forKey:KEY_JABBER_SUBSCRIPTION_BEHAVIOR
group:GROUP_ACCOUNT_STATUS];
[account setPreference:([[comboBox_subscriptionGroup stringValue] length] ? [comboBox_subscriptionGroup stringValue] : nil)
@@ -132,7 +133,7 @@
- (IBAction)subscriptionModeDidChange:(id)sender {
// only show these two when "accept and add to contact list" is selected
- int tag = [[popup_subscriptionBehavior selectedItem] tag];
+ NSInteger tag = [[popup_subscriptionBehavior selectedItem] tag];
[textField_subscriptionModeLabel setHidden:tag != 2];
[comboBox_subscriptionGroup setHidden:tag != 2];
}
@@ -192,8 +193,8 @@
if((id)dist1obj == [NSNull null])
return NSOrderedDescending;
- float dist1 = [dist1obj floatValue];
- float dist2 = [dist2obj floatValue];
+ CGFloat dist1 = [dist1obj doubleValue];
+ CGFloat dist2 = [dist2obj doubleValue];
if(fabs(dist1 - dist2) < 0.000001)
return NSOrderedSame;
@@ -227,8 +228,8 @@
MachineLocation loc;
ReadLocation(&loc);
- float latitude = FractToFloat(loc.latitude)*(M_PI/2.0f);
- float longitude = FractToFloat(loc.longitude)*(M_PI/2.0f);
+ CGFloat latitude = FractToFloat(loc.latitude)*(M_PI/2.0f);
+ CGFloat longitude = FractToFloat(loc.longitude)*(M_PI/2.0f);
servers = [[NSMutableArray alloc] init];
@@ -250,16 +251,16 @@
* If it turns out to be flat or doughnut-shaped, this will not work!
*/
- float latitude2 = [[latitudeNode stringValue] floatValue] * (M_PI/180.0f);
- float longitude2 = [[longitudeNode stringValue] floatValue] * (M_PI/180.0f);
+ CGFloat latitude2 = [[latitudeNode stringValue] doubleValue] * (M_PI/180.0f);
+ CGFloat longitude2 = [[longitudeNode stringValue] doubleValue] * (M_PI/180.0f);
- float d_lat = sinf((latitude2 - latitude)/2.0);
- float d_long = sinf((longitude2 - longitude)/2.0);
- float a = d_lat*d_lat + cosf(latitude)*cosf(latitude2)*d_long*d_long;
- float c = 2*atan2f(sqrtf(a),sqrtf(1.0-a));
- float d = 6372.797*c; // mean earth radius
+ 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
- distance = [NSNumber numberWithFloat:d];
+ distance = [NSNumber numberWithDouble:d];
}
[(NSMutableArray*)servers addObject:[NSDictionary dictionaryWithObjectsAndKeys:
@@ -285,7 +286,7 @@
contextInfo:NULL];
}
-- (void)registrationSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
+- (void)registrationSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
}
@@ -328,7 +329,7 @@
return;
}
- [account setPreference:[NSNumber numberWithInt:[textField_registerServerPort intValue]]
+ [account setPreference:[NSNumber numberWithInteger:[textField_registerServerPort integerValue]]
forKey:KEY_CONNECT_PORT group:GROUP_ACCOUNT_STATUS];
NSString *newUID;
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleMSNAccount.m
--- a/Plugins/Purple Service/ESPurpleMSNAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleMSNAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -150,7 +150,7 @@
purple_account_set_bool(account, "http_method", HTTPConnect);
}
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step)
{
@@ -346,7 +346,7 @@
* part of an encoded character being cut off, so we instead truncate to smaller and smaller strings and encode, until it fits
*/
const char *friendlyNameUTF8String = [friendlyName UTF8String];
- int currentMaxNumberOfPreEncodedCharacters = BUDDY_ALIAS_MAXLEN;
+ NSInteger currentMaxNumberOfPreEncodedCharacters = BUDDY_ALIAS_MAXLEN;
while (friendlyNameUTF8String &&
strlen(purple_url_encode(friendlyNameUTF8String)) > BUDDY_ALIAS_MAXLEN) {
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleMeanwhileAccount.h
--- a/Plugins/Purple Service/ESPurpleMeanwhileAccount.h Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleMeanwhileAccount.h Mon Sep 07 16:47:42 2009 -0400
@@ -48,7 +48,7 @@
guint save_event;
/** socket fd */
- int socket;
+ NSInteger socket;
PurpleConnection *gc;
};
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleMeanwhileAccount.m
--- a/Plugins/Purple Service/ESPurpleMeanwhileAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleMeanwhileAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -50,15 +50,15 @@
group:GROUP_ACCOUNT_STATUS] boolValue];
purple_account_set_bool(account, MW_KEY_FAKE_IT, fakeIt);
if (fakeIt) {
- int client;
+ NSInteger client;
if ((client = [[NSUserDefaults standardUserDefaults] integerForKey:@"AISametimeClient"]))
purple_account_set_int(account, MW_KEY_CLIENT, client);
- int majorVersion;
+ NSInteger majorVersion;
if (!(majorVersion = [[NSUserDefaults standardUserDefaults] integerForKey:@"AISametimeMajorVersion"]))
majorVersion = 0x001e;
- int minorVersion;
+ NSInteger minorVersion;
if (!(minorVersion = [[NSUserDefaults standardUserDefaults] integerForKey:@"AISametimeMinorVersion"]))
minorVersion = 0x196f;
@@ -90,7 +90,7 @@
#pragma mark Status
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step)
{
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleNovellAccount.m
--- a/Plugins/Purple Service/ESPurpleNovellAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleNovellAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -28,7 +28,7 @@
}
#pragma mark Status
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step)
{
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleRequestActionController.m
--- a/Plugins/Purple Service/ESPurpleRequestActionController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleRequestActionController.m Mon Sep 07 16:47:42 2009 -0400
@@ -50,7 +50,7 @@
NSArray *buttonNamesArray;
NSString *title = nil, *message = nil;
NSString *messageHeader = nil, *defaultButton = nil, *alternateButton = nil, *otherButton = nil;
- unsigned buttonNamesArrayCount;
+ NSUInteger buttonNamesArrayCount;
infoDict = [self translatedInfoDict:infoDict];
@@ -118,8 +118,8 @@
- (BOOL)textAndButtonsWindowDidEnd:(NSWindow *)window returnCode:(AITextAndButtonsReturnCode)returnCode suppression:(BOOL)suppression userInfo:(id)userInfo
{
GCallback *theCallBacks;
- unsigned int actionCount;
- int callBackIndex;
+ NSUInteger actionCount;
+ NSInteger callBackIndex;
theCallBacks = [[userInfo objectForKey:@"callBacks"] pointerValue];
actionCount = [[userInfo objectForKey:@"Button Names"] count];
@@ -146,7 +146,7 @@
if ((callBackIndex != -1) && (theCallBacks[callBackIndex] != NULL)) {
[self doRequestActionCbValue:[NSValue valueWithPointer:theCallBacks[callBackIndex]]
withUserDataValue:[userInfo objectForKey:@"userData"]
- callBackIndex:[NSNumber numberWithInt:callBackIndex]];
+ callBackIndex:[NSNumber numberWithInteger:callBackIndex]];
} else {
NSLog(@"Failure.");
@@ -169,7 +169,7 @@
PurpleRequestActionCb callBack = [callBackValue pointerValue];
if (callBack) {
- callBack([userDataValue pointerValue],[callBackIndexNumber intValue]);
+ callBack([userDataValue pointerValue],[callBackIndexNumber integerValue]);
}
}
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleRequestWindowController.m
--- a/Plugins/Purple Service/ESPurpleRequestWindowController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleRequestWindowController.m Mon Sep 07 16:47:42 2009 -0400
@@ -58,7 +58,7 @@
NSRect windowFrame;
NSWindow *window;
- int heightChange = 0;
+ NSInteger heightChange = 0;
//Ensure the window is loaded
window = [self window];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleYahooAccount.m
--- a/Plugins/Purple Service/ESPurpleYahooAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleYahooAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -104,7 +104,7 @@
}
#pragma mark Connection
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step)
{
@@ -227,7 +227,7 @@
if (f->status == YAHOO_STATUS_IDLE) {
//Now idle
- int idle = f->idle;
+ NSInteger idle = f->idle;
NSDate *idleSince;
if (idle != -1) {
@@ -241,7 +241,7 @@
notify:NotifyLater];
} else if (f->status == YAHOO_STATUS_INVISIBLE) {
- statusTypeNumber = [NSNumber numberWithInt:AIInvisibleStatusType]; /* Invisible has a special status type */
+ statusTypeNumber = [NSNumber numberWithInteger:AIInvisibleStatusType]; /* Invisible has a special status type */
}
}
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleZephyrAccount.m
--- a/Plugins/Purple Service/ESPurpleZephyrAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleZephyrAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -153,7 +153,7 @@
inData = [readHandle readDataToEndOfFile];
[zhm waitUntilExit];
- int status = [zhm terminationStatus];
+ NSInteger status = [zhm terminationStatus];
if (status != 0 && status != -1) {
//zhm returned an error (why is -1 also not an error???)
NSString *tempString = [[NSString alloc] initWithData:inData encoding:NSASCIIStringEncoding];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/ESPurpleZephyrAccountViewController.m
--- a/Plugins/Purple Service/ESPurpleZephyrAccountViewController.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/ESPurpleZephyrAccountViewController.m Mon Sep 07 16:47:42 2009 -0400
@@ -132,7 +132,7 @@
* @brief Remove the selected row from the list of servers.
*/
- (IBAction)removeSelectedRowFromServerList:(id)sender {
- int idx = [tableView_servers selectedRow];
+ NSInteger idx = [tableView_servers selectedRow];
if (idx != -1) {
NSMutableArray *ray = [[account preferenceForKey:KEY_ZEPHYR_SERVERS group:GROUP_ACCOUNT_STATUS] mutableCopy];
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/PurpleMySpaceAccount.m
--- a/Plugins/Purple Service/PurpleMySpaceAccount.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/PurpleMySpaceAccount.m Mon Sep 07 16:47:42 2009 -0400
@@ -15,7 +15,7 @@
return "prpl-myspace";
}
-- (NSString *)connectionStringForStep:(int)step
+- (NSString *)connectionStringForStep:(NSInteger)step
{
switch (step) {
case 0:
diff -r 3a98f17f4423 -r 4bcad311909f Plugins/Purple Service/SLPurpleCocoaAdapter.m
--- a/Plugins/Purple Service/SLPurpleCocoaAdapter.m Sun Sep 06 23:56:12 2009 -0400
+++ b/Plugins/Purple Service/SLPurpleCocoaAdapter.m Mon Sep 07 16:47:42 2009 -0400
@@ -148,9 +148,9 @@
return self;
}
-static void ZombieKiller_Signal(int i)
+static void ZombieKiller_Signal(SInt32 i)
{
- int status;
+ SInt32 status;
pid_t child_pid;
while ((child_pid = waitpid(-1, &status, WNOHANG)) > 0);
@@ -485,7 +485,7 @@
char *valueUTF8String = NULL;
if ([value isKindOfClass:[NSNumber class]]) {
- valueUTF8String = g_strdup_printf("%d",[value intValue]);
+ valueUTF8String = g_strdup_printf("%ld",[value integerValue]);
} else if ([value isKindOfClass:[NSString class]]) {
valueUTF8String = g_strdup([value UTF8String]);
@@ -549,7 +549,7 @@
void* adium_purple_get_handle(void)
{
- static int adium_purple_handle;
+ static NSInteger adium_purple_handle;
return &adium_purple_handle;
}
@@ -569,7 +569,7 @@
NSMutableString *newString;
NSString *targetString = @"<IMG ID=";
NSCharacterSet *quoteApostropheCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@"\"\'"];
- int imageID;
+ NSInteger imageID;
if ([inString rangeOfString:targetString options:NSCaseInsensitiveSearch].location == NSNotFound) {
return inString;
@@ -595,7 +595,7 @@
[scanner scanCharactersFromSet:quoteApostropheCharacterSet intoString:NULL];
//Get the image ID from the tag
- [scanner scanInt:&imageID];
+ [scanner scanInteger:&imageID];
//Skip past a quote or apostrophe
[scanner scanCharactersFromSet:quoteApostropheCharacterSet intoString:NULL];
@@ -639,7 +639,7 @@
} else {
//If we didn't get a purpleImage, just leave the tag for now.. maybe it was important?
- [newString appendFormat:@"<IMG ID=\"%i\">",chunkString];
+ [newString appendFormat:@"<IMG ID=\"%ld\">",chunkString];
More information about the commits
mailing list