aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-02 02:25:08 +0000
committerrowanbeentje <rowan@beent.je>2011-03-02 02:25:08 +0000
commit4422810afa93d3cbce76812cc50e45ef8634180b (patch)
tree0d7cf391cdf495a6bef8c6970407e2e081c9d877
parent64919b03fa59c8d93c81a8e3893934c04a3cac91 (diff)
downloadsequelpro-4422810afa93d3cbce76812cc50e45ef8634180b.tar.gz
sequelpro-4422810afa93d3cbce76812cc50e45ef8634180b.tar.bz2
sequelpro-4422810afa93d3cbce76812cc50e45ef8634180b.zip
- Fix compiler warnings for MCPKit - largely typecast related
- Fix further compiler warnings, including a couple of bugs - Disable the -wselector warnings (Multiple definition types for selector) as they're currently unsupported in LLVM - Disable the -wconversion warnings (Prototype conversion) warnings as we usually can't affect protocol declaration - Disable the -wstrict-selector-match (Strict selector matching) due to too many false positives
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h16
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m104
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnectionDelegate.h2
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnectionProxy.h2
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.h6
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m38
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m6
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPResult.m54
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m14
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m16
-rw-r--r--Frameworks/MCPKit/Support files/NSNotificationAdditions.m39
-rw-r--r--Resources/English.lproj/BundleEditor.stringsbin19640 -> 19640 bytes
-rw-r--r--Resources/English.lproj/DBView.stringsbin100462 -> 100462 bytes
-rw-r--r--Resources/English.lproj/FieldEditorSheet.stringsbin11502 -> 11502 bytes
-rw-r--r--Resources/English.lproj/Localizable.stringsbin212828 -> 212878 bytes
-rw-r--r--Source/NSNotificationAdditions.m47
-rw-r--r--Source/SPAlertSheets.m6
-rw-r--r--Source/SPDataAdditions.m18
-rw-r--r--Source/SPExportFileUtilities.m13
-rw-r--r--Source/SPExportFilenameUtilities.m2
-rw-r--r--Source/SPExportInitializer.m2
-rw-r--r--Source/SPKeychain.m56
-rw-r--r--Source/SPSSHTunnel.h8
-rw-r--r--Source/SPSSHTunnel.m4
-rw-r--r--Source/SPStringAdditions.h4
-rw-r--r--Source/SPStringAdditions.m23
-rw-r--r--Source/xibLocalizationPostprocessor.m4
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj19
28 files changed, 278 insertions, 225 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
index 61ce1261..6364add8 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.h
@@ -66,9 +66,9 @@ typedef struct {
NSString *connectionLogin;
NSString *connectionPassword;
NSString *connectionHost;
- NSInteger connectionPort;
+ NSUInteger connectionPort;
NSString *connectionSocket;
- NSInteger maxAllowedPacketSize;
+ NSUInteger maxAllowedPacketSize;
unsigned long connectionThreadId;
BOOL useSSL;
@@ -136,7 +136,7 @@ typedef struct {
@property (readwrite, assign) CGFloat keepAliveInterval;
// Initialisation
-- (id)initToHost:(NSString *)host withLogin:(NSString *)login usingPort:(NSInteger)port;
+- (id)initToHost:(NSString *)host withLogin:(NSString *)login usingPort:(NSUInteger)port;
- (id)initToSocket:(NSString *)socket withLogin:(NSString *)login;
// Delegate
@@ -145,7 +145,7 @@ typedef struct {
- (MCPConnectionCheck)delegateDecisionForLostConnection;
// Connection details
-- (BOOL)setPort:(NSInteger)thePort;
+- (BOOL)setPort:(NSUInteger)thePort;
- (BOOL)setPassword:(NSString *)thePassword;
- (void) setSSL:(BOOL)shouldUseSSL usingKeyFilePath:(NSString *)keyFilePath certificatePath:(NSString *)certificatePath certificateAuthorityCertificatePath:(NSString *)caCertificatePath;
@@ -169,7 +169,7 @@ typedef struct {
- (BOOL)pingConnectionUsingLoopDelay:(NSUInteger)loopDelay;
void backgroundPingTask(void *ptr);
void forceThreadExit(int signalNumber);
-void pingThreadCleanup();
+void pingThreadCleanup(void *pingDetails);
- (void)keepAlive:(NSTimer *)theTimer;
- (void)threadedKeepAlive;
@@ -189,7 +189,7 @@ void pingThreadCleanup();
+ (void)setTruncateLongFieldInLogs:(BOOL)iTruncFlag;
+ (BOOL)truncateLongField;
- (BOOL)setConnectionOption:(NSInteger)option toValue:(BOOL)value;
-- (BOOL)connectWithLogin:(NSString *)login password:(NSString *)pass host:(NSString *)host port:(NSInteger)port socket:(NSString *)socket;
+- (BOOL)connectWithLogin:(NSString *)login password:(NSString *)pass host:(NSString *)host port:(NSUInteger)port socket:(NSString *)socket;
- (BOOL)selectDB:(NSString *)dbName;
@@ -266,9 +266,9 @@ void pingThreadCleanup();
// Packet size
- (BOOL)fetchMaxAllowedPacket;
-- (NSInteger)getMaxAllowedPacket;
+- (NSUInteger)getMaxAllowedPacket;
- (BOOL)isMaxAllowedPacketEditable;
-- (NSInteger)setMaxAllowedPacketTo:(NSInteger)newSize resetSize:(BOOL)reset;
+- (NSUInteger)setMaxAllowedPacketTo:(NSUInteger)newSize resetSize:(BOOL)reset;
// Data conversion
- (const char *)cStringFromString:(NSString *)theString;
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 3556e9d7..7efe4499 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -32,6 +32,7 @@
#import "MCPNull.h"
#import "MCPStreamingResult.h"
#import "MCPConnectionProxy.h"
+#import "MCPConnectionDelegate.h"
#import "MCPStringAdditions.h"
#import "SPStringAdditions.h"
#import "RegexKitLite.h"
@@ -133,7 +134,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
lastKeepAliveTime = 0;
pingThread = NULL;
connectionProxy = nil;
- connectionStartTime = -1;
+ connectionStartTime = 0;
lastQueryExecutedAtTime = CGFLOAT_MAX;
lastDelegateDecisionForLostConnection = NSNotFound;
queryCancelled = NO;
@@ -195,7 +196,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
/**
* Inialize connection using the supplied host details.
*/
-- (id)initToHost:(NSString *)host withLogin:(NSString *)login usingPort:(NSInteger)port
+- (id)initToHost:(NSString *)host withLogin:(NSString *)login usingPort:(NSUInteger)port
{
if ((self = [self init])) {
if (!host) host = @"";
@@ -213,19 +214,19 @@ static BOOL sTruncateLongFieldInLogs = YES;
/**
* Inialize connection using the supplied socket details.
*/
-- (id)initToSocket:(NSString *)socket withLogin:(NSString *)login
+- (id)initToSocket:(NSString *)aSocket withLogin:(NSString *)login
{
if ((self = [self init])) {
- if (!socket || ![socket length]) {
- socket = [self findSocketPath];
- if (!socket) socket = @"";
+ if (!aSocket || ![aSocket length]) {
+ aSocket = [self findSocketPath];
+ if (!aSocket) aSocket = @"";
}
if (!login) login = @"";
connectionHost = nil;
connectionLogin = [[NSString alloc] initWithString:login];
- connectionSocket = [[NSString alloc] initWithString:socket];
+ connectionSocket = [[NSString alloc] initWithString:aSocket];
connectionPort = 0;
}
@@ -298,7 +299,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
/**
* Sets or updates the connection port - for use with tunnels.
*/
-- (BOOL)setPort:(NSInteger)thePort
+- (BOOL)setPort:(NSUInteger)thePort
{
connectionPort = thePort;
@@ -456,7 +457,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
}
// Connect
- theRet = mysql_real_connect(mConnection, theHost, theLogin, thePass, NULL, connectionPort, theSocket, mConnectionFlags);
+ theRet = mysql_real_connect(mConnection, theHost, theLogin, thePass, NULL, (unsigned int)connectionPort, theSocket, mConnectionFlags);
thePass = NULL;
if (theRet != mConnection) {
@@ -558,12 +559,12 @@ static BOOL sTruncateLongFieldInLogs = YES;
// Check whether a reconnection attempt is already being made - if so, wait and return the status of that reconnection attempt.
if (isReconnecting) {
- NSDate *reconnectLoopStartdate = [NSDate date], *eventLoopStartDate;
+ NSDate *eventLoopStartDate;
while (isReconnecting) {
eventLoopStartDate = [NSDate date];
[[NSRunLoop currentRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
if ([[NSDate date] timeIntervalSinceDate:eventLoopStartDate] < 0.1) {
- usleep(100000 - (1000000 * [[NSDate date] timeIntervalSinceDate:eventLoopStartDate]));
+ usleep((useconds_t)(100000 - (1000000 * [[NSDate date] timeIntervalSinceDate:eventLoopStartDate])));
}
}
[reconnectionPool drain];
@@ -624,7 +625,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
eventLoopStartDate = [NSDate date];
[[NSRunLoop currentRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.25]];
if ([[NSDate date] timeIntervalSinceDate:eventLoopStartDate] < 0.25) {
- usleep(250000 - (1000000 * [[NSDate date] timeIntervalSinceDate:eventLoopStartDate]));
+ usleep((useconds_t)(250000 - (1000000 * [[NSDate date] timeIntervalSinceDate:eventLoopStartDate])));
}
}
@@ -653,7 +654,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
[[NSRunLoop mainRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.25]];
//[[NSRunLoop currentRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.25]];
if ([[NSDate date] timeIntervalSinceDate:interfaceInteractionTimer] < 0.25) {
- usleep(250000 - (1000000 * [[NSDate date] timeIntervalSinceDate:interfaceInteractionTimer]));
+ usleep((useconds_t)(250000 - (1000000 * [[NSDate date] timeIntervalSinceDate:interfaceInteractionTimer])));
}
if ([connectionProxy state] == PROXY_STATE_WAITING_FOR_AUTH) {
proxyStartDate = [proxyStartDate addTimeInterval:[[NSDate date] timeIntervalSinceDate:interfaceInteractionTimer]];
@@ -844,7 +845,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
*/
- (double)timeConnected
{
- if (connectionStartTime == -1) return -1;
+ if (connectionStartTime == 0) return -1;
uint64_t currentTime_t = mach_absolute_time() - connectionStartTime;
Nanoseconds elapsedTime = AbsoluteToNanoseconds(*(AbsoluteTime *)&(currentTime_t));
@@ -901,7 +902,7 @@ static BOOL sTruncateLongFieldInLogs = YES;
// Loop until the ping completes
do {
- usleep(loopDelay);
+ usleep((useconds_t)loopDelay);
// If the ping timeout has been exceeded, force a timeout; double-check that the
// thread is still active.
@@ -959,9 +960,10 @@ void forceThreadExit(int signalNumber)
pthread_exit(NULL);
}
-void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
+void pingThreadCleanup(void *pingDetails)
{
- *(pingDetails->pingActivePointer) = NO;
+ MCPConnectionPingDetails *pingDetailsStruct = pingDetails;
+ *(pingDetailsStruct->pingActivePointer) = NO;
}
/**
@@ -1348,12 +1350,12 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
* The socket is used if the host is set to !{@"localhost"}, to an empty or a !{nil} string
* For the moment the implementation might not be safe if you have a nil pointer to one of the NSString* variables (underestand: I don't know what the result will be).
*/
-- (BOOL)connectWithLogin:(NSString *)login password:(NSString *)pass host:(NSString *)host port:(NSInteger)port socket:(NSString *)socket
+- (BOOL)connectWithLogin:(NSString *)login password:(NSString *)pass host:(NSString *)host port:(NSUInteger)port socket:(NSString *)aSocket
{
const char *theLogin = [self cStringFromString:login];
const char *theHost = [self cStringFromString:host];
const char *thePass = [self cStringFromString:pass];
- const char *theSocket = [self cStringFromString:socket];
+ const char *theSocket = [self cStringFromString:aSocket];
void *theRet;
// Disconnect if it was already connected
@@ -1394,7 +1396,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
kMCPSSLCipherList);
}
- theRet = mysql_real_connect(mConnection, theHost, theLogin, thePass, NULL, port, theSocket, mConnectionFlags);
+ theRet = mysql_real_connect(mConnection, theHost, theLogin, thePass, NULL, (unsigned int)port, theSocket, mConnectionFlags);
if (theRet != mConnection) {
return mConnected = NO;
}
@@ -1758,7 +1760,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
}
else {
- NSString *errorMessage = [NSString stringWithFormat:NSLocalizedString(@"The query length of %ld bytes is larger than max_allowed_packet size (%ld).",
+ NSString *errorMessage = [NSString stringWithFormat:NSLocalizedString(@"The query length of %lu bytes is larger than max_allowed_packet size (%lu).",
@"error message if max_allowed_packet < query size"),
(unsigned long)theCQueryLength, maxAllowedPacketSize];
@@ -1836,7 +1838,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
queryErrorMessage = [[NSString alloc] initWithString:@""];
queryErrorId = 0;
- if (streamResultType == MCPStreamingNone && queryAffectedRows == -1) {
+ if (streamResultType == MCPStreamingNone && queryAffectedRows == (my_ulonglong)~0) {
queryAffectedRows = mysql_affected_rows(mConnection);
}
@@ -1983,7 +1985,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
}
// Connect
- connectionSetupStatus = mysql_real_connect(killerConnection, theHost, theLogin, thePass, NULL, connectionPort, theSocket, mConnectionFlags);
+ connectionSetupStatus = mysql_real_connect(killerConnection, theHost, theLogin, thePass, NULL, (unsigned int)connectionPort, theSocket, mConnectionFlags);
thePass = NULL;
if (connectionSetupStatus) {
@@ -2153,7 +2155,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
[self lockConnection];
if ((dbsName == nil) || ([dbsName isEqualToString:@""])) {
- if (theResPtr = mysql_list_dbs(mConnection, NULL)) {
+ if ((theResPtr = mysql_list_dbs(mConnection, NULL))) {
theResult = [[MCPResult alloc] initWithResPtr: theResPtr encoding:stringEncoding timeZone:mTimeZone];
}
else {
@@ -2163,7 +2165,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
else {
const char *theCDBsName = (const char *)[self cStringFromString:dbsName];
- if (theResPtr = mysql_list_dbs(mConnection, theCDBsName)) {
+ if ((theResPtr = mysql_list_dbs(mConnection, theCDBsName))) {
theResult = [[MCPResult alloc] initWithResPtr:theResPtr encoding:stringEncoding timeZone:mTimeZone];
}
else {
@@ -2210,7 +2212,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
[self lockConnection];
if ((tablesName == nil) || ([tablesName isEqualToString:@""])) {
- if (theResPtr = mysql_list_tables(mConnection, NULL)) {
+ if ((theResPtr = mysql_list_tables(mConnection, NULL))) {
theResult = [[MCPResult alloc] initWithResPtr: theResPtr encoding:stringEncoding timeZone:mTimeZone];
}
else {
@@ -2219,7 +2221,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
}
else {
const char *theCTablesName = (const char *)[self cStringFromString:tablesName];
- if (theResPtr = mysql_list_tables(mConnection, theCTablesName)) {
+ if ((theResPtr = mysql_list_tables(mConnection, theCTablesName))) {
theResult = [[MCPResult alloc] initWithResPtr: theResPtr encoding:stringEncoding timeZone:mTimeZone];
}
else {
@@ -2263,7 +2265,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
// NSLog(@"num of fields: %@; num of rows: %@", [theResult numOfFields], [theResult numOfRows]);
if ([theResult numOfRows] > 0) {
- int i;
+ my_ulonglong i;
for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
theTableName = [[theResult fetchRowAsArray] objectAtIndex:0];
[theDBTables addObject:theTableName];
@@ -2440,7 +2442,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
// Do not parse more than 2000 tables/views per db
if([tablesAndViews count] > 2000) {
- NSLog(@"%ld items in database %@. Only 2000 items can be parsed. Stopped parsing.", [tablesAndViews count], currentDatabase);
+ NSLog(@"%lu items in database %@. Only 2000 items can be parsed. Stopped parsing.", (unsigned long)[tablesAndViews count], currentDatabase);
[queryPool release];
return;
}
@@ -2507,7 +2509,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
}
// Connect
- connectionSetupStatus = mysql_real_connect(structConnection, theHost, theLogin, thePass, NULL, connectionPort, theSocket, mConnectionFlags);
+ connectionSetupStatus = mysql_real_connect(structConnection, theHost, theLogin, thePass, NULL, (unsigned int)connectionPort, theSocket, mConnectionFlags);
thePass = NULL;
if (connectionSetupStatus) {
MYSQL_RES *theResult;
@@ -2558,12 +2560,12 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
if(![aTableName isKindOfClass:[NSString class]]) continue;
if(![aTableName length]) continue;
// Retrieve the column details
- NSString *query = [NSString stringWithFormat:@"SHOW FULL COLUMNS FROM `%@` FROM `%@`",
+ query = [NSString stringWithFormat:@"SHOW FULL COLUMNS FROM `%@` FROM `%@`",
[aTableName stringByReplacingOccurrencesOfString:@"`" withString:@"``"],
currentDatabaseEscaped];
- NSData *encodedQueryData = NSStringDataUsingLossyEncoding(query, theConnectionEncoding, 1);
- const char *queryCString = [encodedQueryData bytes];
- unsigned long queryCStringLength = [encodedQueryData length];
+ encodedQueryData = NSStringDataUsingLossyEncoding(query, theConnectionEncoding, 1);
+ queryCString = [encodedQueryData bytes];
+ queryCStringLength = [encodedQueryData length];
if (mysql_real_query(structConnection, queryCString, queryCStringLength) != 0) {
// NSLog(@"error %@", aTableName);
continue;
@@ -2579,7 +2581,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
NSMutableDictionary *tableStructure = [databaseStructure objectForKey:table_id];
// Loop through the fields, extracting details for each
- while (row = mysql_fetch_row(theResult)) {
+ while ((row = mysql_fetch_row(theResult))) {
NSString *field = [self stringWithCString:row[0] usingEncoding:theConnectionEncoding] ;
NSString *type = [self stringWithCString:row[1] usingEncoding:theConnectionEncoding] ;
NSString *type_display = [type stringByReplacingOccurrencesOfRegex:@"\\(.*?,.*?\\)" withString:@"(…)"];
@@ -2627,10 +2629,9 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
queryCStringLength = [encodedQueryData length];
if (mysql_real_query(structConnection, queryCString, queryCStringLength) == 0) {
theResult = mysql_use_result(structConnection);
- NSUInteger numberOfFields = mysql_num_fields(theResult);
// Loop through the rows and extract the function details
- while(row = mysql_fetch_row(theResult)) {
+ while ((row = mysql_fetch_row(theResult))) {
// If cancelled, abort without saving the new structure
if(cancelQueryingDbStructure) {
@@ -2643,7 +2644,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
NSString *type = ([[self stringWithUTF8CString:row[4]] isEqualToString:@"FUNCTION"]) ? @"3" : @"2";
NSString *dtd = [self stringWithUTF8CString:row[5]];
NSString *det = [self stringWithUTF8CString:row[11]];
- NSString *access = [self stringWithUTF8CString:row[12]];
+ NSString *dataaccess = [self stringWithUTF8CString:row[12]];
NSString *security_type = [self stringWithUTF8CString:row[14]];
NSString *definer = [self stringWithUTF8CString:row[19]];
@@ -2659,7 +2660,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
// Add the "field" details
[[[queriedStructure valueForKey:db_id] valueForKey:table_id] setObject:
- [NSArray arrayWithObjects:dtd, access, det, security_type, definer, [NSNumber numberWithUnsignedLongLong:uniqueCounter], nil] forKey:field_id];
+ [NSArray arrayWithObjects:dtd, dataaccess, det, security_type, definer, [NSNumber numberWithUnsignedLongLong:uniqueCounter], nil] forKey:field_id];
[[[queriedStructure valueForKey:db_id] valueForKey:table_id] setObject:type forKey:@" struct_type "];
uniqueCounter++;
}
@@ -2802,7 +2803,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
[self lockConnection];
if (mConnected && (mConnection != NULL)) {
- if (theResPtr = mysql_list_processes(mConnection)) {
+ if ((theResPtr = mysql_list_processes(mConnection))) {
result = [[MCPResult alloc] initWithResPtr:theResPtr encoding:stringEncoding timeZone:mTimeZone];
}
else {
@@ -2850,7 +2851,7 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
@"/opt/local/lib/mysql/mysql.sock", // Alternate fedora
nil];
- for (NSInteger i = 0; i < [possibleSocketLocations count]; i++)
+ for (NSUInteger i = 0; i < [possibleSocketLocations count]; i++)
{
if ([fileManager fileExistsAtPath:[possibleSocketLocations objectAtIndex:i]])
return [possibleSocketLocations objectAtIndex:i];
@@ -3091,9 +3092,9 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
/**
* Retrieves max_allowed_packet size set as global variable.
- * It returns -1 if it fails.
+ * It returns NSNotFound if it fails.
*/
-- (NSInteger)getMaxAllowedPacket
+- (NSUInteger)getMaxAllowedPacket
{
MCPResult *r;
r = [self queryString:@"SELECT @@global.max_allowed_packet" usingEncoding:stringEncoding streamingResult:NO];
@@ -3105,13 +3106,13 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
else
NSRunAlertPanel(@"Error", errorMessage, @"OK", nil, nil);
}
- return -1;
+ return NSNotFound;
}
NSArray *a = [r fetchRowAsArray];
if([a count])
return [[a objectAtIndex:0] integerValue];
- return -1;
+ return NSNotFound;
}
/*
@@ -3120,21 +3121,22 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails)
* if the maximal size was reached (e.g. set it to 4GB it'll return 1GB up to now).
* If something failed it return -1;
*/
-- (NSInteger)setMaxAllowedPacketTo:(NSInteger)newSize resetSize:(BOOL)reset
+- (NSUInteger)setMaxAllowedPacketTo:(NSUInteger)newSize resetSize:(BOOL)reset
{
if(![self isMaxAllowedPacketEditable] || newSize < 1024) return maxAllowedPacketSize;
[self lockConnection];
- mysql_query(mConnection, [[NSString stringWithFormat:@"SET GLOBAL max_allowed_packet = %ld", newSize] UTF8String]);
+ mysql_query(mConnection, [[NSString stringWithFormat:@"SET GLOBAL max_allowed_packet = %lu", newSize] UTF8String]);
[self unlockConnection];
// Inform the user via a log entry about that change according to reset value
- if(delegate && [delegate respondsToSelector:@selector(queryGaveError:connection:)])
+ if(delegate && [delegate respondsToSelector:@selector(queryGaveError:connection:)]) {
if(reset)
- [delegate queryGaveError:[NSString stringWithFormat:@"max_allowed_packet was reset to %ld for new session", newSize] connection:self];
+ [delegate queryGaveError:[NSString stringWithFormat:@"max_allowed_packet was reset to %lu for new session", newSize] connection:self];
else
- [delegate queryGaveError:[NSString stringWithFormat:@"Query too large; max_allowed_packet temporarily set to %ld for the current session to allow query to succeed", newSize] connection:self];
-
+ [delegate queryGaveError:[NSString stringWithFormat:@"Query too large; max_allowed_packet temporarily set to %lu for the current session to allow query to succeed", newSize] connection:self];
+ }
+
return maxAllowedPacketSize;
}
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionDelegate.h b/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionDelegate.h
index 3cbba325..0e162875 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionDelegate.h
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionDelegate.h
@@ -26,7 +26,7 @@
// More info at <http://mysql-cocoa.sourceforge.net/>
// More info at <http://code.google.com/p/sequel-pro/>
-@protocol MCPConnectionDelegate
+@protocol MCPConnectionDelegate <NSObject>
/**
*
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionProxy.h b/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionProxy.h
index 6d03137c..f4edbfd8 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionProxy.h
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnectionProxy.h
@@ -60,7 +60,7 @@ enum PROXY_TUNNEL_STATES
/**
* Get the local port being used by the proxy.
*/
-- (NSInteger)localPort;
+- (NSUInteger)localPort;
/**
* Sets the method the proxy should call whenever the state of the connection changes.
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.h b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.h
index cca59b30..9af3fcfe 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.h
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.h
@@ -42,7 +42,7 @@ typedef struct st_point_2d_
double y;
} st_point_2d;
-@interface MCPGeometryData : NSObject <NSCoding, NSCopying>
+@interface MCPGeometryData : NSObject
{
// Holds the WKB bytes coming from SQL server
Byte *geoBuffer;
@@ -52,8 +52,8 @@ typedef struct st_point_2d_
}
-- (id)initWithBytes:(Byte*)geoData length:(NSUInteger)length;
-+ (id)dataWithBytes:(Byte*)geoData length:(NSUInteger)length;
+- (id)initWithBytes:(const void *)geoData length:(NSUInteger)length;
++ (id)dataWithBytes:(const void *)geoData length:(NSUInteger)length;
- (NSString*)description;
- (NSUInteger)length;
- (NSData*)data;
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m
index 00d7d44f..b7a3fd09 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m
@@ -47,7 +47,7 @@
/**
* Initialize the MCPGeometryData object with the WKB data
*/
-- (id)initWithBytes:(Byte*)geoData length:(NSUInteger)length
+- (id)initWithBytes:(const void *)geoData length:(NSUInteger)length
{
if ((self = [self init])) {
bufferLength = length;
@@ -60,7 +60,7 @@
/**
* Return an autorelease MCPGeometryData object
*/
-+ (id)dataWithBytes:(Byte*)geoData length:(NSUInteger)length
++ (id)dataWithBytes:(const void *)geoData length:(NSUInteger)length
{
return [[[MCPGeometryData alloc] initWithBytes:geoData length:length] autorelease];
}
@@ -370,10 +370,10 @@
uint32_t i, j, k, n; // Loop counter for numberOf...Items
uint32_t ptr = BUFFER_START; // pointer to geoBuffer while parsing
- double x_min = 1e998;
- double x_max = -1e998;
- double y_min = 1e998;
- double y_max = -1e998;
+ double x_min = DBL_MAX;
+ double x_max = -DBL_MAX;
+ double y_min = DBL_MAX;
+ double y_max = -DBL_MAX;
NSMutableArray *coordinates = [NSMutableArray array];
NSMutableArray *subcoordinates = [NSMutableArray array];
@@ -406,7 +406,7 @@
x_max = aPoint.x;
y_min = aPoint.y;
y_max = aPoint.y;
- [coordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [coordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
return [NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects:
[NSNumber numberWithDouble:x_min],
@@ -429,7 +429,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [coordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [coordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
return [NSDictionary dictionaryWithObjectsAndKeys:
@@ -456,7 +456,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [subcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [subcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
[coordinates addObject:[[subcoordinates copy] autorelease]];
@@ -484,7 +484,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [coordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [coordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE+WKB_HEADER_SIZE;
}
return [NSDictionary dictionaryWithObjectsAndKeys:
@@ -512,7 +512,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [subcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [subcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
ptr += WKB_HEADER_SIZE;
@@ -547,7 +547,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [subcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [subcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
[coordinates addObject:[[subcoordinates copy] autorelease]];
@@ -591,7 +591,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [pointcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [pointcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
break;
@@ -604,7 +604,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [linesubcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [linesubcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
[linecoordinates addObject:[[linesubcoordinates copy] autorelease]];
@@ -623,7 +623,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [polygonsubcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [polygonsubcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
[polygoncoordinates addObject:[[polygonsubcoordinates copy] autorelease]];
@@ -640,7 +640,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [pointcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [pointcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE+WKB_HEADER_SIZE;
}
ptr -= WKB_HEADER_SIZE;
@@ -658,7 +658,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [linesubcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [linesubcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
[linecoordinates addObject:[[linesubcoordinates copy] autorelease]];
@@ -683,7 +683,7 @@
x_max = (aPoint.x > x_max) ? aPoint.x : x_max;
y_min = (aPoint.y < y_min) ? aPoint.y : y_min;
y_max = (aPoint.y > y_max) ? aPoint.y : y_max;
- [polygonsubcoordinates addObject:NSStringFromPoint(NSMakePoint(aPoint.x, aPoint.y))];
+ [polygonsubcoordinates addObject:NSStringFromPoint(NSMakePoint((CGFloat)aPoint.x, (CGFloat)aPoint.y))];
ptr += POINT_DATA_SIZE;
}
[polygoncoordinates addObject:[[polygonsubcoordinates copy] autorelease]];
@@ -728,7 +728,7 @@
NSUInteger ptr = BUFFER_START; // pointer to geoBuffer while parsing
if (bufferLength < WKB_HEADER_SIZE)
- return @"-1";
+ return -1;
byteOrder = geoBuffer[ptr];
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m b/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
index 3dab0e07..de035ee8 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPNumber.m
@@ -246,12 +246,12 @@
- (int)intValue
{
- return [number integerValue];
+ return [number intValue];
}
- (unsigned int)unsignedIntValue
{
- return [number unsignedIntegerValue];
+ return [number unsignedIntValue];
}
- (long)longValue
@@ -276,7 +276,7 @@
- (float)floatValue
{
- return [number doubleValue];
+ return [number floatValue];
}
- (double)doubleValue
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m
index 24d14193..53066c14 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m
@@ -227,7 +227,7 @@ const OUR_CHARSET our_charsets60[] =
*/
+ (void)initialize
{
- if (self = [MCPResult class]) {
+ if ((self = [MCPResult class])) {
[self setVersion:030001]; // Ma.Mi.Re -> MaMiRe
MCPYear0000 = [NSCalendarDate dateWithTimeIntervalSinceReferenceDate:-63146822400.0];
[MCPYear0000 setCalendarFormat:@"%Y"];
@@ -367,7 +367,7 @@ const OUR_CHARSET our_charsets60[] =
*/
- (void)dataSeek:(my_ulonglong)row
{
- my_ulonglong theRow = (row < 0)? 0 : row;
+ my_ulonglong theRow = (row < 1)? 0 : row;
theRow = (theRow < [self numOfRows]) ? theRow : ([self numOfRows] - 1);
mysql_data_seek(mResult,theRow);
}
@@ -380,7 +380,7 @@ const OUR_CHARSET our_charsets60[] =
MYSQL_ROW theRow;
unsigned long *theLengths;
MYSQL_FIELD *theField;
- NSInteger i;
+ NSUInteger i;
id theReturn;
if (mResult == NULL) {
@@ -405,7 +405,7 @@ const OUR_CHARSET our_charsets60[] =
theReturn = [NSMutableDictionary dictionaryWithCapacity:mNumOfFields];
break;
default :
- NSLog (@"Unknown type : %d, will return an Array!\n", aType);
+ NSLog (@"Unknown type : %d, will return an Array!\n", (int)aType);
theReturn = [NSMutableArray arrayWithCapacity:mNumOfFields];
break;
}
@@ -474,7 +474,7 @@ const OUR_CHARSET our_charsets60[] =
break;
default:
- NSLog (@"in fetchRowAsType : Unknown type : %ld for column %ld, send back a NSData object", (NSInteger)theField[i].type, (NSInteger)i);
+ NSLog (@"in fetchRowAsType : Unknown type : %d for column %lu, send back a NSData object", (int)theField[i].type, (unsigned long)i);
theCurrentObj = [NSData dataWithBytes:theData length:theLengths[i]];
break;
}
@@ -542,7 +542,7 @@ const OUR_CHARSET our_charsets60[] =
*/
- (NSArray *)fetchFieldNames
{
- NSInteger i;
+ NSUInteger i;
NSUInteger theNumFields;
NSMutableArray *theNamesArray;
MYSQL_FIELD *theField;
@@ -581,7 +581,7 @@ const OUR_CHARSET our_charsets60[] =
*/
- (id)fetchTypesAsType:(MCPReturnType)aType
{
- NSInteger i;
+ NSUInteger i;
id theTypes;
MYSQL_FIELD *theField;
@@ -601,7 +601,7 @@ const OUR_CHARSET our_charsets60[] =
theTypes = [NSMutableDictionary dictionaryWithCapacity:mNumOfFields];
break;
default :
- NSLog (@"Unknown type : %d, will return an Array!\n", aType);
+ NSLog (@"Unknown type : %d, will return an Array!\n", (int)aType);
theTypes = [NSMutableArray arrayWithCapacity:mNumOfFields];
break;
}
@@ -686,7 +686,7 @@ const OUR_CHARSET our_charsets60[] =
break;
default:
theType = @"unknown";
- NSLog (@"in fetchTypesAsArray : Unknown type for column %ld of the MCPResult, type = %ld", (NSInteger)i, (NSInteger)theField[i].type);
+ NSLog (@"in fetchTypesAsArray : Unknown type for column %lu of the MCPResult, type = %d", (unsigned long)i, (int)theField[i].type);
break;
}
@@ -843,7 +843,7 @@ const OUR_CHARSET our_charsets60[] =
/**
* Return the MySQL flags of the column at the given index... Can be used to check if a number is signed or not...
*/
-- (NSUInteger)fetchFlagsAtIndex:(NSUInteger)index
+- (NSUInteger)fetchFlagsAtIndex:(NSUInteger)anIndex
{
NSUInteger theRet;
NSUInteger theNumFields;
@@ -857,12 +857,12 @@ const OUR_CHARSET our_charsets60[] =
theNumFields = [self numOfFields];
theField = mysql_fetch_fields(mResult);
- if (index >= theNumFields) {
+ if (anIndex >= theNumFields) {
// Out of range... should raise an exception
theRet = 0;
}
else {
- theRet = theField[index].flags;
+ theRet = theField[anIndex].flags;
}
return theRet;
@@ -874,7 +874,7 @@ const OUR_CHARSET our_charsets60[] =
- (NSUInteger)fetchFlagsForKey:(NSString *)key
{
NSUInteger theRet;
- NSUInteger index;
+ NSUInteger anIndex;
MYSQL_FIELD *theField;
if (mResult == NULL) {
@@ -893,9 +893,9 @@ const OUR_CHARSET our_charsets60[] =
theRet = 0;
}
else {
- index = [mNames indexOfObject:key];
+ anIndex = [mNames indexOfObject:key];
- theRet = theField[index].flags;
+ theRet = theField[anIndex].flags;
}
return theRet;
@@ -911,7 +911,7 @@ const OUR_CHARSET our_charsets60[] =
* #{NOTE} That the current version handles properly TEXT, and returns those as NSString (and not NSData as
* it used to be).
*/
-- (BOOL)isBlobAtIndex:(NSUInteger)index
+- (BOOL)isBlobAtIndex:(NSUInteger)anIndex
{
BOOL theRet;
NSUInteger theNumFields;
@@ -925,17 +925,17 @@ const OUR_CHARSET our_charsets60[] =
theNumFields = [self numOfFields];
theField = mysql_fetch_fields(mResult);
- if (index >= theNumFields) {
+ if (anIndex >= theNumFields) {
// Out of range... should raise an exception
theRet = NO;
}
else {
- switch(theField[index].type) {
+ switch(theField[anIndex].type) {
case FIELD_TYPE_TINY_BLOB:
case FIELD_TYPE_BLOB:
case FIELD_TYPE_MEDIUM_BLOB:
case FIELD_TYPE_LONG_BLOB:
- theRet = (theField[index].flags & BINARY_FLAG);
+ theRet = (theField[anIndex].flags & BINARY_FLAG);
break;
default:
theRet = NO;
@@ -959,7 +959,7 @@ const OUR_CHARSET our_charsets60[] =
- (BOOL)isBlobForKey:(NSString *)key
{
BOOL theRet;
- NSUInteger index;
+ NSUInteger anIndex;
MYSQL_FIELD *theField;
if (mResult == NULL) {
@@ -978,14 +978,14 @@ const OUR_CHARSET our_charsets60[] =
theRet = NO;
}
else {
- index = [mNames indexOfObject:key];
+ anIndex = [mNames indexOfObject:key];
- switch(theField[index].type) {
+ switch(theField[anIndex].type) {
case FIELD_TYPE_TINY_BLOB:
case FIELD_TYPE_BLOB:
case FIELD_TYPE_MEDIUM_BLOB:
case FIELD_TYPE_LONG_BLOB:
- theRet = (theField[index].flags & BINARY_FLAG);
+ theRet = (theField[anIndex].flags & BINARY_FLAG);
break;
default:
theRet = NO;
@@ -1043,10 +1043,10 @@ const OUR_CHARSET our_charsets60[] =
}
else {
NSMutableString *theString = [NSMutableString stringWithCapacity:0];
- NSInteger i;
+ NSUInteger i;
NSArray *theRow;
MYSQL_ROW_OFFSET thePosition;
- BOOL trunc = [MCPConnection truncateLongField];
+ BOOL shouldTruncateFields = [MCPConnection truncateLongField];
// First line, saying we are displaying a MCPResult
[theString appendFormat:@"MCPResult: (encoding : %ld, dim %ld x %ld)\n", (long)mEncoding, (long)mNumOfFields, (long)[self numOfRows]];
@@ -1063,11 +1063,11 @@ const OUR_CHARSET our_charsets60[] =
thePosition = mysql_row_tell(mResult);
[self dataSeek:0];
- while (theRow = [self fetchRowAsArray])
+ while ((theRow = [self fetchRowAsArray]))
{
id theField = [theRow objectAtIndex:i];
- if (trunc) {
+ if (shouldTruncateFields) {
if (([theField isKindOfClass:[NSString class]]) && (kLengthOfTruncationForLog < [(NSString *)theField length])) {
theField = [theField substringToIndex:kLengthOfTruncationForLog];
}
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m b/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m
index c171dc7f..dbf9d070 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m
@@ -42,7 +42,7 @@
*/
- (NSArray *)fetchColAtIndex:(NSUInteger)col
{
- NSMutableArray *theCol = [NSMutableArray arrayWithCapacity:[self numOfRows]];
+ NSMutableArray *theCol = [NSMutableArray arrayWithCapacity:(NSUInteger)[self numOfRows]];
MYSQL_ROW_OFFSET thePosition;
NSArray *theRow;
@@ -61,7 +61,7 @@
[self dataSeek:0];
// One might want to have optimized code here. Maybe in later versions
- while (theRow = [self fetchRowAsType:MCPTypeArray])
+ while ((theRow = [self fetchRowAsType:MCPTypeArray]))
{
[theCol addObject:[theRow objectAtIndex:col]];
}
@@ -131,9 +131,9 @@
switch (type)
{
case MCPTypeArray :
- theTable = [NSMutableArray arrayWithCapacity:[self numOfRows]];
+ theTable = [NSMutableArray arrayWithCapacity:(NSUInteger)[self numOfRows]];
- while (theVect = [self fetchRowAsArray])
+ while ((theVect = [self fetchRowAsArray]))
{
[theTable addObject:theVect];
}
@@ -141,9 +141,9 @@
theTable = [NSArray arrayWithArray:theTable];
break;
case MCPTypeDictionary :
- theTable = [NSMutableArray arrayWithCapacity:[self numOfRows]];
+ theTable = [NSMutableArray arrayWithCapacity:(NSUInteger)[self numOfRows]];
- while (theVect = [self fetchRowAsDictionary])
+ while ((theVect = [self fetchRowAsDictionary]))
{
[theTable addObject:theVect];
}
@@ -175,7 +175,7 @@
theTable = [NSDictionary dictionaryWithDictionary:theTable];
break;
default :
- NSLog (@"Unknown MCPReturnType : %ld; return nil\n", (NSInteger)type);
+ NSLog (@"Unknown MCPReturnType : %d; return nil\n", (int)type);
theTable = nil;
break;
}
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
index c15db6c6..465221fe 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
@@ -164,7 +164,7 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf);
MYSQL_ROW theRow;
char *theRowData, *buf;
unsigned long *fieldLengths;
- NSInteger i, copiedDataLength;
+ NSUInteger i, copiedDataLength;
NSMutableArray *returnArray;
// Retrieve the next row according to the mode this result set is in.
@@ -290,7 +290,7 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf);
// Get a binary representation of the data
buf = malloc(fieldDefinitions[i].length + 1);
- _bytes2bin(theData, fieldLengths[i], fieldDefinitions[i].length, buf);
+ _bytes2bin((Byte *)theData, fieldLengths[i], fieldDefinitions[i].length, buf);
cellData = (theData != NULL) ? [NSString stringWithUTF8String:buf] : @"";
@@ -323,7 +323,7 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf);
break;
default:
- NSLog(@"in fetchNextRowAsArray : Unknown type : %ld for column %ld, sending back a NSData object", (NSInteger)fieldDefinitions[i].type, (NSInteger)i);
+ NSLog(@"in fetchNextRowAsArray : Unknown type : %d for column %lu, sending back a NSData object", (int)fieldDefinitions[i].type, (unsigned long)i);
cellData = [NSData dataWithBytes:theData length:fieldLengths[i]];
break;
}
@@ -435,10 +435,10 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf);
void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf)
{
- int i = 0;
+ NSUInteger i = 0;
nbytes--;
- while (i < len)
- buf[len - ++i] = ( (n[nbytes - (i >> 3)] >> (i & 0x7)) & 1 ) ? '1' : '0';
+ while (++i <= len)
+ buf[len - i] = ( (n[nbytes - (i >> 3)] >> (i & 0x7)) & 1 ) ? '1' : '0';
buf[len] = '\0';
}
@@ -451,14 +451,14 @@ void _bytes2bin(Byte *n, NSUInteger nbytes, NSUInteger len, char *buf)
NSAutoreleasePool *downloadPool = [[NSAutoreleasePool alloc] init];
MYSQL_ROW theRow;
unsigned long *fieldLengths;
- NSInteger i, dataCopiedLength, rowDataLength;
+ NSUInteger i, dataCopiedLength, rowDataLength;
LOCAL_ROW_DATA *newRowStore;
size_t sizeOfLocalRowData = sizeof(LOCAL_ROW_DATA);
size_t sizeOfDataLengths = (size_t)(sizeof(unsigned long) * mNumOfFields);
// Loop through the rows until the end of the data is reached - indicated via a NULL
- while ( (BOOL)(*isConnectedPtr)(parentConnection, isConnectedSEL) && (theRow = mysql_fetch_row(mResult))) {
+ while ((*isConnectedPtr)(parentConnection, isConnectedSEL) && (theRow = mysql_fetch_row(mResult))) {
// Retrieve the lengths of the returned data
fieldLengths = mysql_fetch_lengths(mResult);
diff --git a/Frameworks/MCPKit/Support files/NSNotificationAdditions.m b/Frameworks/MCPKit/Support files/NSNotificationAdditions.m
index d615231e..9991c999 100644
--- a/Frameworks/MCPKit/Support files/NSNotificationAdditions.m
+++ b/Frameworks/MCPKit/Support files/NSNotificationAdditions.m
@@ -26,6 +26,12 @@
#import "NSNotificationAdditions.h"
#import "pthread.h"
+@interface NSNotificationCenter (NSNotificationCenterAdditions_PrivateAPI)
++ (void)_postNotification:(NSNotification *)notification;
++ (void)_postNotificationName:(NSDictionary *)info;
++ (void)_postNotificationForwarder:(NSDictionary *)info;
+@end
+
@implementation NSNotificationCenter (NSNotificationCenterAdditions)
- (void)postNotificationOnMainThread:(NSNotification *)notification
@@ -35,16 +41,11 @@
[self postNotificationOnMainThread:notification waitUntilDone:NO];
}
-- (void)postNotificationOnMainThread:(NSNotification *)notification waitUntilDone:(BOOL)wait
+- (void)postNotificationOnMainThread:(NSNotification *)notification waitUntilDone:(BOOL)shouldWaitUntilDone
{
if (pthread_main_np()) return [self postNotification:notification];
- [[self class] performSelectorOnMainThread:@selector(_postNotification:) withObject:notification waitUntilDone:wait];
-}
-
-+ (void)_postNotification:(NSNotification *)notification
-{
- [[self defaultCenter] postNotification:notification];
+ [self performSelectorOnMainThread:@selector(_postNotification:) withObject:notification waitUntilDone:shouldWaitUntilDone];
}
- (void)postNotificationOnMainThreadWithName:(NSString *)name object:(id)object
@@ -61,7 +62,7 @@
[self postNotificationOnMainThreadWithName:name object:object userInfo:userInfo waitUntilDone:NO];
}
-- (void)postNotificationOnMainThreadWithName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo waitUntilDone:(BOOL)wait
+- (void)postNotificationOnMainThreadWithName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo waitUntilDone:(BOOL)shouldWaitUntilDone
{
if (pthread_main_np()) return [self postNotificationName:name object:object userInfo:userInfo];
@@ -71,11 +72,20 @@
if (object) [info setObject:object forKey:@"object"];
if (userInfo) [info setObject:userInfo forKey:@"userInfo"];
- [[self class] performSelectorOnMainThread:@selector(_postNotificationName:) withObject:info waitUntilDone:wait];
+ [[self class] performSelectorOnMainThread:@selector(_postNotificationName:) withObject:info waitUntilDone:shouldWaitUntilDone];
[info release];
}
+@end
+
+@implementation NSNotificationCenter (NSNotificationCenterAdditions_PrivateAPI)
+
++ (void)_postNotification:(NSNotification *)notification
+{
+ [[self defaultCenter] postNotification:notification];
+}
+
+ (void)_postNotificationName:(NSDictionary *)info
{
NSString *name = [info objectForKey:@"name"];
@@ -87,4 +97,15 @@
[[self defaultCenter] postNotificationName:name object:object userInfo:userInfo];
}
++ (void)_postNotificationForwarder:(NSDictionary *)info
+{
+ NSString *name = [info objectForKey:@"name"];
+
+ id object = [info objectForKey:@"object"];
+
+ NSDictionary *userInfo = [info objectForKey:@"userInfo"];
+
+ [[self defaultCenter] postNotificationName:name object:object userInfo:userInfo];
+}
+
@end
diff --git a/Resources/English.lproj/BundleEditor.strings b/Resources/English.lproj/BundleEditor.strings
index 17be5976..56496dce 100644
--- a/Resources/English.lproj/BundleEditor.strings
+++ b/Resources/English.lproj/BundleEditor.strings
Binary files differ
diff --git a/Resources/English.lproj/DBView.strings b/Resources/English.lproj/DBView.strings
index 35f47990..aa6a0a4d 100644
--- a/Resources/English.lproj/DBView.strings
+++ b/Resources/English.lproj/DBView.strings
Binary files differ
diff --git a/Resources/English.lproj/FieldEditorSheet.strings b/Resources/English.lproj/FieldEditorSheet.strings
index d2995a33..ebd17ce7 100644
--- a/Resources/English.lproj/FieldEditorSheet.strings
+++ b/Resources/English.lproj/FieldEditorSheet.strings
Binary files differ
diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings
index 101f45e3..dac7c145 100644
--- a/Resources/English.lproj/Localizable.strings
+++ b/Resources/English.lproj/Localizable.strings
Binary files differ
diff --git a/Source/NSNotificationAdditions.m b/Source/NSNotificationAdditions.m
index 53917dae..ae949347 100644
--- a/Source/NSNotificationAdditions.m
+++ b/Source/NSNotificationAdditions.m
@@ -24,7 +24,13 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "NSNotificationAdditions.h"
-#import <pthread.h>
+#import "pthread.h"
+
+@interface NSNotificationCenter (NSNotificationCenterAdditions_PrivateAPI)
++ (void)_postNotification:(NSNotification *)notification;
++ (void)_postNotificationName:(NSDictionary *)info;
++ (void)_postNotificationForwarder:(NSDictionary *)info;
+@end
@implementation NSNotificationCenter (NSNotificationCenterAdditions)
@@ -35,16 +41,11 @@
[self postNotificationOnMainThread:notification waitUntilDone:NO];
}
-- (void)postNotificationOnMainThread:(NSNotification *)notification waitUntilDone:(BOOL)wait
+- (void)postNotificationOnMainThread:(NSNotification *)notification waitUntilDone:(BOOL)shouldWaitUntilDone
{
if (pthread_main_np()) return [self postNotification:notification];
- [[self class] performSelectorOnMainThread:@selector(_postNotification:) withObject:notification waitUntilDone:wait];
-}
-
-+ (void)_postNotification:(NSNotification *)notification
-{
- [[self defaultCenter] postNotification:notification];
+ [self performSelectorOnMainThread:@selector(_postNotification:) withObject:notification waitUntilDone:shouldWaitUntilDone];
}
- (void)postNotificationOnMainThreadWithName:(NSString *)name object:(id)object
@@ -61,21 +62,30 @@
[self postNotificationOnMainThreadWithName:name object:object userInfo:userInfo waitUntilDone:NO];
}
-- (void)postNotificationOnMainThreadWithName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo waitUntilDone:(BOOL)wait
+- (void)postNotificationOnMainThreadWithName:(NSString *)name object:(id)object userInfo:(NSDictionary *)userInfo waitUntilDone:(BOOL)shouldWaitUntilDone
{
if (pthread_main_np()) return [self postNotificationName:name object:object userInfo:userInfo];
-
+
NSMutableDictionary *info = [[NSMutableDictionary allocWithZone:nil] initWithCapacity:3];
if (name) [info setObject:name forKey:@"name"];
if (object) [info setObject:object forKey:@"object"];
if (userInfo) [info setObject:userInfo forKey:@"userInfo"];
-
- [[self class] performSelectorOnMainThread:@selector(_postNotificationName:) withObject:info waitUntilDone:wait];
-
+
+ [[self class] performSelectorOnMainThread:@selector(_postNotificationName:) withObject:info waitUntilDone:shouldWaitUntilDone];
+
[info release];
}
+@end
+
+@implementation NSNotificationCenter (NSNotificationCenterAdditions_PrivateAPI)
+
++ (void)_postNotification:(NSNotification *)notification
+{
+ [[self defaultCenter] postNotification:notification];
+}
+
+ (void)_postNotificationName:(NSDictionary *)info
{
NSString *name = [info objectForKey:@"name"];
@@ -83,7 +93,18 @@
id object = [info objectForKey:@"object"];
NSDictionary *userInfo = [info objectForKey:@"userInfo"];
+
+ [[self defaultCenter] postNotificationName:name object:object userInfo:userInfo];
+}
+
++ (void)_postNotificationForwarder:(NSDictionary *)info
+{
+ NSString *name = [info objectForKey:@"name"];
+ id object = [info objectForKey:@"object"];
+
+ NSDictionary *userInfo = [info objectForKey:@"userInfo"];
+
[[self defaultCenter] postNotificationName:name object:object userInfo:userInfo];
}
diff --git a/Source/SPAlertSheets.m b/Source/SPAlertSheets.m
index 3299c351..b9ac1136 100644
--- a/Source/SPAlertSheets.m
+++ b/Source/SPAlertSheets.m
@@ -22,6 +22,8 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
+#import "SPAlertSheets.h"
+
/**
* Provide a simple alias of NSBeginAlertSheet, with a few differences:
* - printf-type format strings are no longer supported within the "msg"
@@ -101,7 +103,7 @@ void SPBeginWaitingAlertSheet(
// Initialize returnCode with a value which can't be returned as
// returnCode in the didEndSelector method
NSInteger initialReturnCode = -5;
- returnCode = initialReturnCode;
+ returnCode = &initialReturnCode;
// Set up an NSAlert with the supplied details
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
@@ -141,7 +143,7 @@ void SPBeginWaitingAlertSheet(
// Since the returnCode can only be -1, 0, or 1
// run the session until returnCode was changed in
// the didEndSelector method of the calling class
- if(returnCode != initialReturnCode)
+ if(returnCode != &initialReturnCode)
break;
// Execute code on DefaultRunLoop
diff --git a/Source/SPDataAdditions.m b/Source/SPDataAdditions.m
index b0a4e6d2..805692c6 100644
--- a/Source/SPDataAdditions.m
+++ b/Source/SPDataAdditions.m
@@ -57,8 +57,8 @@ static char base64encodingTable[64] = {
NSUInteger lentext = [self length];
NSInteger ctremaining = 0;
unsigned char inbuf[3], outbuf[4];
- short i = 0;
- short charsonline = 0, ctcopy = 0;
+ NSUInteger i = 0;
+ NSUInteger charsonline = 0, ctcopy = 0;
NSUInteger ix = 0;
NSMutableString *base64 = [NSMutableString stringWithCapacity:lentext];
@@ -111,7 +111,7 @@ static char base64encodingTable[64] = {
- (NSData *)dataEncryptedWithPassword:(NSString *)password
{
// Create a random 128-bit initialization vector
- srand(time(NULL));
+ srand((unsigned int)time(NULL));
NSInteger ivIndex;
unsigned char iv[16];
for (ivIndex = 0; ivIndex < 16; ivIndex++)
@@ -131,7 +131,7 @@ static char base64encodingTable[64] = {
memcpy(paddedBytes, [self bytes], dataLength);
// The last 32-bit chunk is the size of the plaintext, which is encrypted with the plaintext
- NSInteger bigIntDataLength = NSSwapHostIntToBig(dataLength);
+ NSInteger bigIntDataLength = NSSwapHostIntToBig((unsigned int)dataLength);
memcpy(paddedBytes + (paddedLength - 4), &bigIntDataLength, 4);
// Create the key from first 128-bits of the 160-bit password hash
@@ -180,7 +180,7 @@ static char base64encodingTable[64] = {
// Get the size of the data from the last 32-bit chunk
NSInteger bigIntDataLength = *((UInt32*)decryptedBytes + ((encryptedLength / 4) - 1));
- NSInteger dataLength = NSSwapBigIntToHost(bigIntDataLength);
+ NSInteger dataLength = NSSwapBigIntToHost((unsigned int)bigIntDataLength);
return [NSData dataWithBytesNoCopy:decryptedBytes length:dataLength];
}
@@ -198,7 +198,7 @@ static char base64encodingTable[64] = {
z_stream zlibStream;
zlibStream.next_in = (Bytef *)[self bytes];
- zlibStream.avail_in = [self length];
+ zlibStream.avail_in = (uInt)[self length];
zlibStream.total_out = 0;
zlibStream.zalloc = Z_NULL;
zlibStream.zfree = Z_NULL;
@@ -210,7 +210,7 @@ static char base64encodingTable[64] = {
if (zlibStream.total_out >= [unzipData length])
[unzipData increaseLengthBy: half_length];
zlibStream.next_out = [unzipData mutableBytes] + zlibStream.total_out;
- zlibStream.avail_out = [unzipData length] - zlibStream.total_out;
+ zlibStream.avail_out = (uInt)([unzipData length] - zlibStream.total_out);
status = inflate (&zlibStream, Z_SYNC_FLUSH);
if (status == Z_STREAM_END) done = YES;
@@ -238,7 +238,7 @@ static char base64encodingTable[64] = {
zlibStream.opaque = Z_NULL;
zlibStream.total_out = 0;
zlibStream.next_in=(Bytef *)[self bytes];
- zlibStream.avail_in = [self length];
+ zlibStream.avail_in = (uInt)[self length];
if (deflateInit(&zlibStream, Z_DEFAULT_COMPRESSION) != Z_OK) return nil;
@@ -251,7 +251,7 @@ static char base64encodingTable[64] = {
[zipData increaseLengthBy: 16384];
zlibStream.next_out = [zipData mutableBytes] + zlibStream.total_out;
- zlibStream.avail_out = [zipData length] - zlibStream.total_out;
+ zlibStream.avail_out = (uInt)([zipData length] - zlibStream.total_out);
deflate(&zlibStream, Z_FINISH);
diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m
index b4d31d67..d39aee17 100644
--- a/Source/SPExportFileUtilities.m
+++ b/Source/SPExportFileUtilities.m
@@ -138,8 +138,17 @@
}
}
}
-
-
+
+ // Compare the count of exported files to the count of failed files
+ NSUInteger totalFilesExported = [exportFiles count];
+
+ // If all the files failed, show a simplified export dialog
+
+
+ // If only some of the files failed, show an export dialog with the option to ignore the failed files.
+
+
+ // For single files, show a dialog very close to the OS dialog
if (i > 0) {
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Error creating export files", @"export file handle creation error message")
diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m
index 0695d29e..7ce7b3a2 100644
--- a/Source/SPExportFilenameUtilities.m
+++ b/Source/SPExportFilenameUtilities.m
@@ -78,7 +78,7 @@
filename = @"query_result";
break;
case SPTableExport:
- filename = [tableDocumentInstance database];
+ filename = [NSString stringWithFormat:@"%@_%@", [tableDocumentInstance database], [[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil]];
break;
}
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index ed60846f..f1868210 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -280,7 +280,7 @@
[sqlExporter setSqlExportTables:exportTables];
// Create custom filename if required
- [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [NSString stringWithFormat:@"%@_%@", [tableDocumentInstance database], [[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil]]];
+ [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [self generateDefaultExportFilename]];
[exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
diff --git a/Source/SPKeychain.m b/Source/SPKeychain.m
index 335c0a0b..bb010d3b 100644
--- a/Source/SPKeychain.m
+++ b/Source/SPKeychain.m
@@ -66,7 +66,7 @@
NSArray *trustedApps = [NSArray arrayWithObjects:(id)sequelProRef, (id)sequelProHelperRef, nil];
status = SecAccessCreate((CFStringRef)name, (CFArrayRef)trustedApps, &passwordAccessRef);
if (status != noErr) {
- NSLog(@"Error (%i) while trying to create access list for name: %@ account: %@", status, name, account);
+ NSLog(@"Error (%i) while trying to create access list for name: %@ account: %@", (int)status, name, account);
passwordAccessRef = NULL;
}
}
@@ -77,13 +77,13 @@
attributes[0].length = 20;
attributes[1].tag = kSecLabelItemAttr;
attributes[1].data = (unichar *)[label UTF8String];
- attributes[1].length = strlen([label UTF8String]);
+ attributes[1].length = (UInt32)strlen([label UTF8String]);
attributes[2].tag = kSecAccountItemAttr;
attributes[2].data = (unichar *)[account UTF8String];
- attributes[2].length = strlen([account UTF8String]);
+ attributes[2].length = (UInt32)strlen([account UTF8String]);
attributes[3].tag = kSecServiceItemAttr;
attributes[3].data = (unichar *)[name UTF8String];
- attributes[3].length = strlen([name UTF8String]);
+ attributes[3].length = (UInt32)strlen([name UTF8String]);
attList.count = 4;
attList.attr = attributes;
@@ -91,7 +91,7 @@
status = SecKeychainItemCreateFromContent(
kSecGenericPasswordItemClass, // Generic password type
&attList, // The attribute list created for the keychain item
- strlen([password UTF8String]), // Length of password
+ (UInt32)strlen([password UTF8String]), // Length of password
[password UTF8String], // Password data
NULL, // Default keychain
passwordAccessRef, // Access list for this keychain
@@ -100,7 +100,7 @@
if (passwordAccessRef) CFRelease(passwordAccessRef);
if (status != noErr) {
- NSLog(@"Error (%i) while trying to add password for name: %@ account: %@", status, name, account);
+ NSLog(@"Error (%i) while trying to add password for name: %@ account: %@", (int)status, name, account);
SPBeginAlertSheet(NSLocalizedString(@"Error adding password to Keychain", @"error adding password to keychain message"),
NSLocalizedString(@"OK", @"OK button"),
@@ -127,15 +127,15 @@
if (!account) account = @"";
status = SecKeychainFindGenericPassword(
- NULL, // default keychain
- strlen([name UTF8String]), // length of service name (bytes)
- [name UTF8String], // service name
-
- strlen([account UTF8String]), // length of account name (bytes)
- [account UTF8String], // account name
- &passwordLength, // length of password
- &passwordData, // pointer to password data
- &itemRef // the item reference
+ NULL, // default keychain
+ (UInt32)strlen([name UTF8String]), // length of service name (bytes)
+ [name UTF8String], // service name
+
+ (UInt32)strlen([account UTF8String]), // length of account name (bytes)
+ [account UTF8String], // account name
+ &passwordLength, // length of password
+ &passwordData, // pointer to password data
+ &itemRef // the item reference
);
if (status == noErr) {
@@ -171,21 +171,21 @@
// Check if password already exists before deleting
if ([self passwordExistsForName:name account:account]) {
status = SecKeychainFindGenericPassword(
- NULL, // default keychain
- strlen([name UTF8String]), // length of service name
- [name UTF8String], // service name
- strlen([account UTF8String]), // length of account name
- [account UTF8String], // account name
- nil, // length of password
- nil, // pointer to password data
- &itemRef // the item reference
+ NULL, // default keychain
+ (UInt32)strlen([name UTF8String]), // length of service name
+ [name UTF8String], // service name
+ (UInt32)strlen([account UTF8String]), // length of account name
+ [account UTF8String], // account name
+ nil, // length of password
+ nil, // pointer to password data
+ &itemRef // the item reference
);
if (status == noErr) {
status = SecKeychainItemDelete(itemRef);
if (status != noErr) {
- NSLog(@"Error (%i) while trying to delete password for name: %@ account: %@", status, name, account);
+ NSLog(@"Error (%i) while trying to delete password for name: %@ account: %@", (int)status, name, account);
}
}
@@ -209,12 +209,12 @@
if (!account) account = @"";
attributes[0].tag = kSecAccountItemAttr;
- attributes[0].data = (void *)[account UTF8String]; // Account name
- attributes[0].length = strlen([account UTF8String]); // Length of account name (bytes)
+ attributes[0].data = (void *)[account UTF8String]; // Account name
+ attributes[0].length = (UInt32)strlen([account UTF8String]); // Length of account name (bytes)
attributes[1].tag = kSecServiceItemAttr;
- attributes[1].data = (void *)[name UTF8String]; // Service name
- attributes[1].length = strlen([name UTF8String]); // Length of service name (bytes)
+ attributes[1].data = (void *)[name UTF8String]; // Service name
+ attributes[1].length = (UInt32)strlen([name UTF8String]); // Length of service name (bytes)
list.count = 2;
list.attr = attributes;
diff --git a/Source/SPSSHTunnel.h b/Source/SPSSHTunnel.h
index 4afec738..bf7fd8a4 100644
--- a/Source/SPSSHTunnel.h
+++ b/Source/SPSSHTunnel.h
@@ -48,8 +48,8 @@
NSLock *debugMessagesLock;
NSInteger sshPort;
NSInteger remotePort;
- NSInteger localPort;
- NSInteger localPortFallback;
+ NSUInteger localPort;
+ NSUInteger localPortFallback;
NSInteger connectionState;
NSLock *answerAvailableLock;
@@ -81,8 +81,8 @@
- (NSInteger)state;
- (NSString *)lastError;
- (NSString *)debugMessages;
-- (NSInteger)localPort;
-- (NSInteger)localPortFallback;
+- (NSUInteger)localPort;
+- (NSUInteger)localPortFallback;
- (void)connect;
- (void)launchTask:(id)dummy;
- (void)disconnect;
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index ceed74b4..16d0c590 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -488,7 +488,7 @@
/*
* Returns the local port assigned for use by the tunnel
*/
-- (NSInteger)localPort
+- (NSUInteger)localPort
{
return localPort;
}
@@ -496,7 +496,7 @@
/*
* Returns the local port assigned for fallback use by the tunnel, if any
*/
-- (NSInteger)localPortFallback
+- (NSUInteger)localPortFallback
{
if (!useHostFallback) return 0;
diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h
index 042e69f0..16841a34 100644
--- a/Source/SPStringAdditions.h
+++ b/Source/SPStringAdditions.h
@@ -46,12 +46,12 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt
return;
}
-static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger index, NSRangePointer range)
+static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger anIndex, NSRangePointer aRange)
{
typedef id (*SPMutableAttributedStringAttributeAtIndexMethodPtr)(NSMutableAttributedString*, SEL, NSString*, NSUInteger, NSRangePointer);
static SPMutableAttributedStringAttributeAtIndexMethodPtr SPMutableAttributedStringAttributeAtIndex;
if (!SPMutableAttributedStringAttributeAtIndex) SPMutableAttributedStringAttributeAtIndex = (SPMutableAttributedStringAttributeAtIndexMethodPtr)[self methodForSelector:@selector(attribute:atIndex:effectiveRange:)];
- id r = SPMutableAttributedStringAttributeAtIndex(self, @selector(attribute:atIndex:effectiveRange:), aStr, index, range);
+ id r = SPMutableAttributedStringAttributeAtIndex(self, @selector(attribute:atIndex:effectiveRange:), aStr, anIndex, aRange);
return r;
}
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index 21059ba2..421ef4c1 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -164,7 +164,7 @@
{
NSMutableString *holder = [[NSMutableString alloc] init];
unichar theChar;
- int i;
+ NSUInteger i;
for(i = 0; i < [self length]; i++) {
theChar = [self characterAtIndex:i];
@@ -492,7 +492,7 @@
if([scriptPath hasPrefix:@"/"] && [fm fileExistsAtPath:scriptPath isDirectory:&isDir] && !isDir) {
NSString *script = [self substringWithRange:NSMakeRange(NSMaxRange(firstLineRange), [self length] - NSMaxRange(firstLineRange))];
NSError *writeError = nil;
- [script writeToFile:scriptFilePath atomically:YES encoding:NSUTF8StringEncoding error:writeError];
+ [script writeToFile:scriptFilePath atomically:YES encoding:NSUTF8StringEncoding error:&writeError];
if(writeError == nil) {
redirectForScript = YES;
[scriptHeaderArguments addObject:scriptFilePath];
@@ -504,7 +504,7 @@
} else {
[scriptHeaderArguments addObject:@"/bin/sh"];
NSError *writeError = nil;
- [self writeToFile:scriptFilePath atomically:YES encoding:NSUTF8StringEncoding error:writeError];
+ [self writeToFile:scriptFilePath atomically:YES encoding:NSUTF8StringEncoding error:&writeError];
if(writeError == nil) {
redirectForScript = YES;
[scriptHeaderArguments addObject:scriptFilePath];
@@ -673,12 +673,12 @@
// Read STDOUT saved to file
if([fm fileExistsAtPath:stdoutFilePath isDirectory:nil]) {
- NSString *stdout = [NSString stringWithContentsOfFile:stdoutFilePath encoding:NSUTF8StringEncoding error:nil];
- if(bashTask) [bashTask release];
+ NSString *stdoutContent = [NSString stringWithContentsOfFile:stdoutFilePath encoding:NSUTF8StringEncoding error:nil];
+ if(bashTask) [bashTask release], bashTask = nil;
[fm removeItemAtPath:stdoutFilePath error:nil];
- if(stdout != nil) {
+ if(stdoutContent != nil) {
if (status == 0) {
- return stdout;
+ return stdoutContent;
} else {
if(theError != NULL) {
if(status == 9 || userTerminated) return @"";
@@ -694,7 +694,7 @@
NSBeep();
}
if(status > SPBundleRedirectActionNone && status <= SPBundleRedirectActionLastCode)
- return stdout;
+ return stdoutContent;
else
return @"";
}
@@ -702,12 +702,11 @@
NSLog(@"Couldn't read return string from “%@” by using UTF-8 encoding.", self);
NSBeep();
}
- } else {
- if(bashTask) [bashTask release];
- [fm removeItemAtPath:stdoutFilePath error:nil];
- return @"";
}
+ if (bashTask) [bashTask release];
+ [fm removeItemAtPath:stdoutFilePath error:nil];
+ return @"";
}
/**
diff --git a/Source/xibLocalizationPostprocessor.m b/Source/xibLocalizationPostprocessor.m
index a6379aa7..ad2e152d 100644
--- a/Source/xibLocalizationPostprocessor.m
+++ b/Source/xibLocalizationPostprocessor.m
@@ -51,7 +51,7 @@ int main(int argc, const char *argv[])
}
}
- NSLog(@"Warning: skipped garbage input line %d, contents: \"%@\"", lineCount, line);
+ NSLog(@"Warning: skipped garbage input line %lu, contents: \"%@\"", (unsigned long)lineCount, line);
}
if (outputStrings.length && ![outputStrings writeToFile:[NSString stringWithUTF8String:argv[2]] atomically:NO encoding:usedEncoding error:&error]) {
@@ -59,4 +59,4 @@ int main(int argc, const char *argv[])
exit (-1);
}
} [autoreleasePool release];
-} \ No newline at end of file
+}
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index 5f003404..3538339b 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -2717,7 +2717,6 @@
isa = PBXProject;
buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "sequel-pro" */;
compatibilityVersion = "Xcode 3.1";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -3861,13 +3860,13 @@
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
- GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = NO;
- GCC_WARN_PROTOTYPE_CONVERSION = YES;
+ GCC_WARN_PROTOTYPE_CONVERSION = NO;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
- GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = NO;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
@@ -4186,13 +4185,13 @@
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
- GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = NO;
- GCC_WARN_PROTOTYPE_CONVERSION = YES;
+ GCC_WARN_PROTOTYPE_CONVERSION = NO;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
- GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = NO;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
@@ -4239,13 +4238,13 @@
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
- GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_PEDANTIC = NO;
- GCC_WARN_PROTOTYPE_CONVERSION = YES;
+ GCC_WARN_PROTOTYPE_CONVERSION = NO;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
- GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = NO;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394