Ignore:
Timestamp:
02/10/08 06:02:25 (16 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE.[hm]: Restore ICCF_CheckRange, moved in [322], as we don't
want the range limited in TestParser.

ICeCoffEEParser.m: Remove ICCF_CheckRange. Comment out expandFront
URL/parens stuff; it's as yet untested. Handle {...} in URLs. Don't
assert when )/} is last character in string. Fix indentation.

ICeCoffEE.xcodeproj: Link TestParser to Cocoa normally. Remove
obsolete build settings.

TestParser.m: Stub out ICCF_CheckRange. Test beginning with
one-character ranges all the way through the string. Output summary
stats at end.

File:
1 edited

Legend:

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

    r322 r375  
    6161    action.launchInBackground = (modifierFlags & NSShiftKeyMask) != 0;
    6262    return action;
     63}
     64
     65// RFC-ordained max URL length, just to avoid passing IC/LS multi-megabyte documents
     66#if ICCF_DEBUG
     67static const long ICCF_MAX_URL_LEN = 120; // XXX change later
     68#else
     69static const long ICCF_MAX_URL_LEN = 1024;
     70#endif
     71
     72void ICCF_CheckRange(NSRange range) {
     73    NSCAssert(range.length > 0, ICCF_LocalizedString(@"No URL is selected"));
     74    NSCAssert1(range.length <= ICCF_MAX_URL_LEN, ICCF_LocalizedString(@"The potential URL is longer than %lu characters"), ICCF_MAX_URL_LEN);
    6375}
    6476
Note: See TracChangeset for help on using the changeset viewer.