mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
make it compilable for Mac OSX Tiger (again)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37738 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
66d0d61b0c
commit
269450b2e0
@ -115,7 +115,11 @@ SpellCheckResult AppleSpeller_check(AppleSpeller speller, const char * word, con
|
||||
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;
|
||||
#else
|
||||
int capacity = [speller->misspelled count] + 1;
|
||||
#endif
|
||||
NSMutableArray * misspelled = [NSMutableArray arrayWithCapacity:capacity];
|
||||
[misspelled addObjectsFromArray:speller->misspelled];
|
||||
[misspelled addObject:[NSValue valueWithRange:match]];
|
||||
@ -233,7 +237,11 @@ int AppleSpeller_numMisspelledWords(AppleSpeller speller)
|
||||
|
||||
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];
|
||||
#else
|
||||
NSRange range = [[speller->misspelled objectAtIndex:index] rangeValue];
|
||||
#endif
|
||||
*start = range.location;
|
||||
*length = range.length;
|
||||
}
|
||||
|
@ -72,7 +72,11 @@ NSMutableDictionary* LinkBackServers = nil ;
|
||||
BOOL LinkBackServerIsSupported(NSString* name, id supportedServers)
|
||||
{
|
||||
BOOL ret = NO ;
|
||||
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
|
||||
NSUInteger idx ;
|
||||
#else
|
||||
int idx ;
|
||||
#endif
|
||||
NSString* curServer = supportedServers ;
|
||||
|
||||
// NOTE: supportedServers may be nil, an NSArray, or NSString.
|
||||
@ -94,12 +98,13 @@ NSString* FindLinkBackServer(NSString* bundleIdentifier, NSString* serverName, N
|
||||
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] ;
|
||||
NSUInteger idx ;
|
||||
#else
|
||||
NSArray* contents = [fm directoryContentsAtPath: dir] ;
|
||||
int idx ;
|
||||
#endif
|
||||
NSUInteger idx ;
|
||||
|
||||
// working info
|
||||
NSString* cpath ;
|
||||
|
Loading…
Reference in New Issue
Block a user