mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 20:09:59 +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;
|
result = SPELL_CHECK_LEARNED;
|
||||||
}
|
}
|
||||||
} else {
|
} 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];
|
NSMutableArray * misspelled = [NSMutableArray arrayWithCapacity:capacity];
|
||||||
[misspelled addObjectsFromArray:speller->misspelled];
|
[misspelled addObjectsFromArray:speller->misspelled];
|
||||||
[misspelled addObject:[NSValue valueWithRange:match]];
|
[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)
|
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;
|
*start = range.location;
|
||||||
*length = range.length;
|
*length = range.length;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,11 @@ NSMutableDictionary* LinkBackServers = nil ;
|
|||||||
BOOL LinkBackServerIsSupported(NSString* name, id supportedServers)
|
BOOL LinkBackServerIsSupported(NSString* name, id supportedServers)
|
||||||
{
|
{
|
||||||
BOOL ret = NO ;
|
BOOL ret = NO ;
|
||||||
|
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
|
||||||
NSUInteger idx ;
|
NSUInteger idx ;
|
||||||
|
#else
|
||||||
|
int idx ;
|
||||||
|
#endif
|
||||||
NSString* curServer = supportedServers ;
|
NSString* curServer = supportedServers ;
|
||||||
|
|
||||||
// NOTE: supportedServers may be nil, an NSArray, or NSString.
|
// NOTE: supportedServers may be nil, an NSArray, or NSString.
|
||||||
@ -94,12 +98,13 @@ NSString* FindLinkBackServer(NSString* bundleIdentifier, NSString* serverName, N
|
|||||||
NSString* ret = nil ;
|
NSString* ret = nil ;
|
||||||
|
|
||||||
NSFileManager* fm = [NSFileManager defaultManager] ;
|
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] ;
|
||||||
|
NSUInteger idx ;
|
||||||
#else
|
#else
|
||||||
NSArray* contents = [fm directoryContentsAtPath: dir] ;
|
NSArray* contents = [fm directoryContentsAtPath: dir] ;
|
||||||
|
int idx ;
|
||||||
#endif
|
#endif
|
||||||
NSUInteger idx ;
|
|
||||||
|
|
||||||
// working info
|
// working info
|
||||||
NSString* cpath ;
|
NSString* cpath ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user