Fixup version

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34721 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-02-04 13:33:03 +00:00
parent e21d229353
commit 5b47b13296
4 changed files with 108 additions and 48 deletions

View file

@ -1,3 +1,9 @@
2012-02-04 Richard Frith-Macdonald <rfm@gnu.org>
* Version: 1.24.1 ... still binary compatibile with 1.24.0
* Source/NSTextCheckingResult.m:
* Headers/Foundation/NSTextCheckingResult.h: coding style tidyups
2012-02-03 Adam Fedor <fedor@gnu.org>
* Bump version

View file

@ -54,24 +54,25 @@ static const NSTextCheckingType NSTextCheckingTypeRegularExpression = 1ULL<<10;
@property(readonly) NSTimeZone *timeZone;
@property(readonly) NSURL *URL;
#else
- (NSDictionary*)addressComponents;
- (NSDictionary*)components;
- (NSDate*)date;
- (NSDictionary*) addressComponents;
- (NSDictionary*) components;
- (NSDate*) date;
- (NSTimeInterval) duration;
- (NSArray*)grammarDetails;
- (NSArray*) grammarDetails;
- (NSUInteger) numberOfRanges;
- (NSOrthography*)orthography;
- (NSString*)phoneNumber;
- (NSOrthography*) orthography;
- (NSString*) phoneNumber;
- (NSRange) range;
- (NSRegularExpression*)regularExpression;
- (NSString*)replacementString;
- (NSRegularExpression*) regularExpression;
- (NSString*) replacementString;
- (NSTextCheckingType) resultType;
- (NSTimeZone*)timeZone;
- (NSURL*)URL;
- (NSTimeZone*) timeZone;
- (NSURL*) URL;
#endif
+ (NSTextCheckingResult*)regularExpressionCheckingResultWithRanges: (NSRangePointer)ranges
count: (NSUInteger)count
regularExpression: (NSRegularExpression*)regularExpression;
- (NSRange)rangeAtIndex: (NSUInteger)idx;
- (NSTextCheckingResult *)resultByAdjustingRangesWithOffset: (NSInteger)offset;
+ (NSTextCheckingResult*)
regularExpressionCheckingResultWithRanges: (NSRangePointer)ranges
count: (NSUInteger)count
regularExpression: (NSRegularExpression*)regularExpression;
- (NSRange) rangeAtIndex: (NSUInteger)idx;
- (NSTextCheckingResult*) resultByAdjustingRangesWithOffset: (NSInteger)offset;
@end

View file

@ -41,9 +41,10 @@
@end
@implementation NSTextCheckingResult
+ (NSTextCheckingResult*)regularExpressionCheckingResultWithRanges: (NSRangePointer)ranges
count: (NSUInteger)count
regularExpression: (NSRegularExpression*)regularExpression
+ (NSTextCheckingResult*)
regularExpressionCheckingResultWithRanges: (NSRangePointer)ranges
count: (NSUInteger)count
regularExpression: (NSRegularExpression*)regularExpression
{
GSRegularExpressionCheckingResult *result =
[GSRegularExpressionCheckingResult new];
@ -55,88 +56,139 @@
return [result autorelease];
}
- (NSDictionary*)addressComponents { return nil; }
- (NSDictionary*)components { return nil; }
- (NSDate*)date { return nil; }
- (NSTimeInterval) duration { return 0; }
- (NSArray*)grammarDetails { return 0; }
- (NSUInteger) numberOfRanges { return 1; }
- (NSOrthography*)orthography { return nil; }
- (NSString*)phoneNumber { return nil; }
- (NSRange)range
- (NSDictionary*) addressComponents
{
return nil;
}
- (NSDictionary*) components
{
return nil;
}
- (NSDate*) date
{
return nil;
}
- (NSTimeInterval) duration
{
return 0;
}
- (NSArray*) grammarDetails
{
return 0;
}
- (NSUInteger) numberOfRanges
{
return 1;
}
- (NSOrthography*) orthography
{
return nil;
}
- (NSString*) phoneNumber
{
return nil;
}
- (NSRange) range
{
[self subclassResponsibility: _cmd];
return NSMakeRange(NSNotFound, 0);
}
- (NSRegularExpression*)regularExpression { return nil; }
- (NSString*)replacementString { return nil; }
- (NSTextCheckingType)resultType
- (NSRegularExpression*) regularExpression
{
return nil;
}
- (NSString*) replacementString
{
return nil;
}
- (NSTextCheckingType) resultType
{
[self subclassResponsibility: _cmd];
return -1;
}
- (NSTimeZone*)timeZone { return nil; }
- (NSURL*)URL { return nil; }
- (NSRange)rangeAtIndex: (NSUInteger)idx
- (NSTimeZone*) timeZone
{
return nil;
}
- (NSURL*) URL
{
return nil;
}
- (NSRange) rangeAtIndex: (NSUInteger)idx
{
if (idx >= [self numberOfRanges])
{
[NSException raise: NSInvalidArgumentException
format: @"index %"PRIuPTR" out of range", (unsigned long)idx];
format: @"index %"PRIuPTR" out of range", idx];
}
return [self range];
}
- (NSTextCheckingResult *)resultByAdjustingRangesWithOffset: (NSInteger)offset
- (NSTextCheckingResult *) resultByAdjustingRangesWithOffset: (NSInteger)offset
{
[self subclassResponsibility: _cmd];
return nil;
}
@end
@implementation GSRegularExpressionCheckingResult
- (void)dealloc
- (void) dealloc
{
[regularExpression release];
free(ranges);
[super dealloc];
}
- (NSUInteger)numberOfRanges
- (NSUInteger) numberOfRanges
{
return rangeCount;
}
- (NSRange)range
- (NSRange) range
{
return ranges[0];
}
- (NSRange)rangeAtIndex: (NSUInteger)idx
- (NSRange) rangeAtIndex: (NSUInteger)idx
{
if (idx >= rangeCount)
{
[NSException raise: NSInvalidArgumentException
format: @"index %"PRIuPTR" out of range", (unsigned long)idx];
format: @"index %"PRIuPTR" out of range", idx];
}
return ranges[idx];
}
- (NSRegularExpression *)regularExpression
- (NSRegularExpression*) regularExpression
{
return regularExpression;
}
- (NSTextCheckingType)resultType
- (NSTextCheckingType) resultType
{
return NSTextCheckingTypeRegularExpression;
}
- (NSTextCheckingResult *)resultByAdjustingRangesWithOffset: (NSInteger)offset
- (NSTextCheckingResult*) resultByAdjustingRangesWithOffset: (NSInteger)offset
{
NSUInteger i;
GSRegularExpressionCheckingResult *result =
@ -147,8 +199,9 @@
for (i = 0; i < rangeCount; i++)
{
NSRange r = ranges[i];
if ((offset > 0 && NSNotFound - r.location <= offset) ||
(offset < 0 && r.location < -offset))
if ((offset > 0 && NSNotFound - r.location <= offset)
|| (offset < 0 && r.location < -offset))
{
[NSException raise: NSInvalidArgumentException
format: @"Invalid offset %"PRIdPTR" for range: %@",

View file

@ -6,10 +6,10 @@ GCC_VERSION=4.0.0
# The version number of this release.
MAJOR_VERSION=1
MINOR_VERSION=25
SUBMINOR_VERSION=0
MINOR_VERSION=24
SUBMINOR_VERSION=1
# numeric value should match above
VERSION_NUMBER=125.0
VERSION_NUMBER=124.1
GNUSTEP_BASE_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION}
VERSION=${GNUSTEP_BASE_VERSION}