Ignore:
Timestamp:
07/21/06 20:01:32 (16 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE.m: Strip intra-URL whitespace, not just leading and trailing.

ICeCoffEE.ldb: More localization changes.

ICeCoffEE.xcodeproj: Copy Smart Crash Reports, its Unsanity Installer
plugin, and the German-localized Select Services nib (oops).

And nuke some .DS_Stores for good measure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEE.m

    r264 r272  
    243243    OSStatus err = noErr;
    244244    long selStart, selEnd;
    245     string = [string stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
    246     unsigned len = [string length];
     245    NSMutableString *urlString = [[NSMutableString alloc] init];
     246    NSCharacterSet *whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
     247    NSScanner *scanner = [[NSScanner alloc] initWithString: string];
     248    NSString *fragmentString;
     249    while ([scanner scanUpToCharactersFromSet: whitespace intoString: &fragmentString]) {
     250        [urlString appendString: fragmentString];
     251    }
     252    unsigned len = [urlString length];
    247253
    248254    Handle h = NULL;
     
    253259            ICCF_OSErrCAssert(MemError(), @"NewHandle");
    254260
    255         if (CFStringGetBytes((CFStringRef)string, CFRangeMake(0, len), kCFStringEncodingASCII, '\0', false, (UInt8 *)*h, len, NULL) != len)
     261        if (CFStringGetBytes((CFStringRef)urlString, CFRangeMake(0, len), kCFStringEncodingASCII, '\0', false, (UInt8 *)*h, len, NULL) != len)
    256262            ICCF_OSErrCAssert(kTECNoConversionPathErr, @"CFStringGetBytes");
    257263
     
    272278    NS_HANDLER
    273279        DisposeHandle(h);
     280        [urlString release];
    274281        [localException raise];
    275282    NS_ENDHANDLER
    276 
     283       
    277284    DisposeHandle(h);
     285    [urlString release];
    278286
    279287    return (err == noErr);
Note: See TracChangeset for help on using the changeset viewer.