result = SPELL_CHECK_LEARNED;
}
} else {
result = SPELL_CHECK_LEARNED;
}
} else {
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
NSUInteger capacity = [speller->misspelled count] + 1;
NSUInteger capacity = [speller->misspelled count] + 1;
+#else
+ int capacity = [speller->misspelled count] + 1;
+#endif
NSMutableArray * misspelled = [NSMutableArray arrayWithCapacity:capacity];
[misspelled addObjectsFromArray:speller->misspelled];
[misspelled addObject:[NSValue valueWithRange:match]];
NSMutableArray * misspelled = [NSMutableArray arrayWithCapacity:capacity];
[misspelled addObjectsFromArray:speller->misspelled];
[misspelled addObject:[NSValue valueWithRange:match]];
void AppleSpeller_misspelledWord(AppleSpeller speller, int index, int * start, int * length)
{
void AppleSpeller_misspelledWord(AppleSpeller speller, int index, int * start, int * length)
{
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
NSRange range = [[speller->misspelled objectAtIndex:(NSUInteger)index] rangeValue];
NSRange range = [[speller->misspelled objectAtIndex:(NSUInteger)index] rangeValue];
+#else
+ NSRange range = [[speller->misspelled objectAtIndex:index] rangeValue];
+#endif
*start = range.location;
*length = range.length;
}
*start = range.location;
*length = range.length;
}
BOOL LinkBackServerIsSupported(NSString* name, id supportedServers)
{
BOOL ret = NO ;
BOOL LinkBackServerIsSupported(NSString* name, id supportedServers)
{
BOOL ret = NO ;
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
+#else
+ int idx ;
+#endif
NSString* curServer = supportedServers ;
// NOTE: supportedServers may be nil, an NSArray, or NSString.
NSString* curServer = supportedServers ;
// NOTE: supportedServers may be nil, an NSArray, or NSString.
NSString* ret = nil ;
NSFileManager* fm = [NSFileManager defaultManager] ;
NSString* ret = nil ;
NSFileManager* fm = [NSFileManager defaultManager] ;
-#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
NSArray* contents = [fm contentsOfDirectoryAtPath: dir error: nil] ;
NSArray* contents = [fm contentsOfDirectoryAtPath: dir error: nil] ;
#else
NSArray* contents = [fm directoryContentsAtPath: dir] ;
#else
NSArray* contents = [fm directoryContentsAtPath: dir] ;
// working info
NSString* cpath ;
// working info
NSString* cpath ;