Ignore:
Timestamp:
06/23/07 20:46:17 (17 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE.[hm]: Move parsing functions (ICCF_CheckRange,
ICCF_Delimiters, ICCF_ParseURL) and Internet Config start/stop
routines (ICCF_Stop/StartIC) to ICeCoffEEParser.[hm] so they can be
tested outside the APE. Also move ICCF_MAX_URL_LEN definition, and
extract guts of NSTextView parsing into ICCF_URLEnclosingRange.
Remove comment about TXNClick; if MLTE is deprecated I'm not going to
mess with it.

ICeCoffEEParser.[hm]: Moved everything discussed above to here.

ICeCoffEEServices.m: Some comments, now I realize how irritating the
service localization problem is.

ICeCoffEETerminal.m: Remove long-unused reference to
ICeCoffEEScanner.h (was from 1.2?).

ICeCoffEEScanner.[hm]: Removed, no longer in use.

TestParser.m: Very simple first pass at testing. There's much more I
want to do here.

urls.plist: First pass at URL test cases.

ICeCoffEE.xcodeproj: Add TestParser target (yes, it uses ZeroLink
because my machine is slow and it actually helps).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEE.xcodeproj/project.pbxproj

    r321 r322  
    3434                E14521D90A044FB300C9B040 /* SmartCrashReportsAPI.o in Frameworks */ = {isa = PBXBuildFile; fileRef = E14521D80A044FB300C9B040 /* SmartCrashReportsAPI.o */; };
    3535                E14DF1DA0A6F374700346107 /* APETools.o in Frameworks */ = {isa = PBXBuildFile; fileRef = E14DF1D90A6F374700346107 /* APETools.o */; };
     36                E14E2AB50C2B774800AC18D0 /* ICeCoffEEParser.h in Headers */ = {isa = PBXBuildFile; fileRef = E14E2AB30C2B774800AC18D0 /* ICeCoffEEParser.h */; };
     37                E14E2AB60C2B774800AC18D0 /* ICeCoffEEParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E14E2AB40C2B774800AC18D0 /* ICeCoffEEParser.m */; };
     38                E14E2B270C2CBF3400AC18D0 /* ICeCoffEEParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E14E2AB40C2B774800AC18D0 /* ICeCoffEEParser.m */; };
     39                E14E2B340C2CBFB200AC18D0 /* TestParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E14E2B330C2CBFB200AC18D0 /* TestParser.m */; };
     40                E14E2C3F0C2CCBEF00AC18D0 /* ICeCoffEEShared.m in Sources */ = {isa = PBXBuildFile; fileRef = E182C8F603DE817F00050002 /* ICeCoffEEShared.m */; };
     41                E14E2C590C2CCC1900AC18D0 /* ICeCoffEETrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = E170DFDE0835D6F400B484AC /* ICeCoffEETrigger.m */; };
     42                E14E2C600C2CCC4C00AC18D0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E19EB50303DD36E600050002 /* Foundation.framework */; };
     43                E14E2D540C2CD1A000AC18D0 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E14E2D3E0C2CD1A000AC18D0 /* ApplicationServices.framework */; };
    3644                E170DFDF0835D6F400B484AC /* ICeCoffEETrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = E170DFDD0835D6F400B484AC /* ICeCoffEETrigger.h */; };
    3745                E170DFE00835D6F400B484AC /* ICeCoffEETrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = E170DFDE0835D6F400B484AC /* ICeCoffEETrigger.m */; };
     
    4149                E191FCA10831B8FB003B09BC /* ICeCoffEEServices.m in Sources */ = {isa = PBXBuildFile; fileRef = E191FC9D0831B8FB003B09BC /* ICeCoffEEServices.m */; };
    4250                E1ABAE900812F4B2007C5427 /* ICeCoffEE.h in Headers */ = {isa = PBXBuildFile; fileRef = E14343B303DB4CF200050002 /* ICeCoffEE.h */; };
    43                 E1ABAE910812F4B2007C5427 /* ICeCoffEEScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = E14343B703DB4CFE00050002 /* ICeCoffEEScanner.h */; };
    4451                E1ABAE920812F4B2007C5427 /* ICeCoffEESuper.h in Headers */ = {isa = PBXBuildFile; fileRef = E14343CD03DB66E900050002 /* ICeCoffEESuper.h */; };
    4552                E1ABAE930812F4B2007C5427 /* ICeCoffEEMenuOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = E1BB268F03DB74B700050002 /* ICeCoffEEMenuOnly.h */; };
     
    5764                E1ABAEA30812F4B2007C5427 /* APEMain.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A6986E03BE1DF000AA4DA5 /* APEMain.m */; };
    5865                E1ABAEA40812F4B2007C5427 /* ICeCoffEE.m in Sources */ = {isa = PBXBuildFile; fileRef = E14343B403DB4CF200050002 /* ICeCoffEE.m */; };
    59                 E1ABAEA50812F4B2007C5427 /* ICeCoffEEScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = E14343B803DB4CFE00050002 /* ICeCoffEEScanner.m */; };
    6066                E1ABAEA60812F4B2007C5427 /* ICeCoffEEMenuOnly.m in Sources */ = {isa = PBXBuildFile; fileRef = E1BB269003DB74B700050002 /* ICeCoffEEMenuOnly.m */; };
    6167                E1ABAEA70812F4B2007C5427 /* ICeCoffEEMenuSuper.m in Sources */ = {isa = PBXBuildFile; fileRef = E1BB269403DB74C200050002 /* ICeCoffEEMenuSuper.m */; };
     
    201207                E14343B303DB4CF200050002 /* ICeCoffEE.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ICeCoffEE.h; sourceTree = "<group>"; };
    202208                E14343B403DB4CF200050002 /* ICeCoffEE.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = ICeCoffEE.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    203                 E14343B703DB4CFE00050002 /* ICeCoffEEScanner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ICeCoffEEScanner.h; sourceTree = "<group>"; };
    204                 E14343B803DB4CFE00050002 /* ICeCoffEEScanner.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ICeCoffEEScanner.m; sourceTree = "<group>"; };
    205209                E14343CD03DB66E900050002 /* ICeCoffEESuper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICeCoffEESuper.h; sourceTree = "<group>"; };
    206210                E14343CE03DB66E900050002 /* ICeCoffEESuper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICeCoffEESuper.m; sourceTree = "<group>"; };
     
    208212                E14521D80A044FB300C9B040 /* SmartCrashReportsAPI.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SmartCrashReportsAPI.o; sourceTree = "<group>"; };
    209213                E14DF1D90A6F374700346107 /* APETools.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; name = APETools.o; path = /Library/Frameworks/ApplicationEnhancer.framework/Versions/A/Libraries/APETools.o; sourceTree = "<absolute>"; };
     214                E14E2AB30C2B774800AC18D0 /* ICeCoffEEParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICeCoffEEParser.h; sourceTree = "<group>"; };
     215                E14E2AB40C2B774800AC18D0 /* ICeCoffEEParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICeCoffEEParser.m; sourceTree = "<group>"; };
     216                E14E2B1D0C2CBF1500AC18D0 /* TestParser */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestParser; sourceTree = BUILT_PRODUCTS_DIR; };
     217                E14E2B330C2CBFB200AC18D0 /* TestParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestParser.m; sourceTree = "<group>"; };
     218                E14E2BC20C2CC28500AC18D0 /* urls.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist; path = urls.plist; sourceTree = "<group>"; };
     219                E14E2D3E0C2CD1A000AC18D0 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
    210220                E165AB3503E7A7FC00050002 /* ICeCoffEEAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICeCoffEEAction.h; sourceTree = "<group>"; };
    211221                E165AB3603E7A7FC00050002 /* ICeCoffEEAction.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ICeCoffEEAction.c; sourceTree = "<group>"; };
     
    263273
    264274/* Begin PBXFrameworksBuildPhase section */
     275                E14E2B2D0C2CBF8100AC18D0 /* Frameworks */ = {
     276                        isa = PBXFrameworksBuildPhase;
     277                        buildActionMask = 2147483647;
     278                        files = (
     279                                E14E2C600C2CCC4C00AC18D0 /* Foundation.framework in Frameworks */,
     280                                E14E2D540C2CD1A000AC18D0 /* ApplicationServices.framework in Frameworks */,
     281                        );
     282                        runOnlyForDeploymentPostprocessing = 0;
     283                };
    265284                E1ABAEB00812F4B2007C5427 /* Frameworks */ = {
    266285                        isa = PBXFrameworksBuildPhase;
     
    302321                                E1ABAED50812F4B2007C5427 /* APEManagerPrefPane.plugin */,
    303322                                E1ABAEDF0812F4B2007C5427 /* ICFindFilesToRemove */,
     323                                E14E2B1D0C2CBF1500AC18D0 /* TestParser */,
    304324                        );
    305325                        name = Products;
     
    316336                                E1BF159F03DBA81600050002 /* Installer components */,
    317337                                E1BF15BD03DBBD3E00050002 /* package-ICeCoffEE.sh */,
     338                                E14E2B3F0C2CC01700AC18D0 /* Tests */,
    318339                                E1BF154403DB950B00050002 /* Documentation */,
    319340                                29B97317FDCFA39411CA2CEA /* Resources */,
     
    328349                        children = (
    329350                                F9A6986E03BE1DF000AA4DA5 /* APEMain.m */,
     351                                E14E2AB30C2B774800AC18D0 /* ICeCoffEEParser.h */,
     352                                E14E2AB40C2B774800AC18D0 /* ICeCoffEEParser.m */,
    330353                                E11854F703F2709E00050002 /* CPS.h */,
    331354                                E169DBA703E4F6A400050002 /* ICeCoffEEConfig.h */,
     
    347370                        isa = PBXGroup;
    348371                        children = (
    349                                 E1C30B100C23684D00EAE48A /* VERSION.xcconfig */,
    350372                                29B97318FDCFA39411CA2CEA /* APE Manager plugin.nib */,
    351373                                E12FEC6104959FB800AEFBF9 /* Select services.nib */,
     
    355377                                089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
    356378                                E1CBC99A03E7603400050002 /* Localizable.strings */,
     379                                E1C30B100C23684D00EAE48A /* VERSION.xcconfig */,
    357380                        );
    358381                        name = Resources;
     
    366389                                F5D3F9FC0305A40D01FE0BDE /* ApplicationEnhancer.framework */,
    367390                                E19EB50303DD36E600050002 /* Foundation.framework */,
     391                                E14E2D3E0C2CD1A000AC18D0 /* ApplicationServices.framework */,
    368392                        );
    369393                        name = Frameworks;
     
    419443                        sourceTree = "<group>";
    420444                };
     445                E14E2B3F0C2CC01700AC18D0 /* Tests */ = {
     446                        isa = PBXGroup;
     447                        children = (
     448                                E14E2B330C2CBFB200AC18D0 /* TestParser.m */,
     449                                E14E2BC20C2CC28500AC18D0 /* urls.plist */,
     450                        );
     451                        name = Tests;
     452                        sourceTree = "<group>";
     453                };
    421454                E19EB4F503DD359100050002 /* ICFindFilesToRemove */ = {
    422455                        isa = PBXGroup;
     
    437470                                E170DFDD0835D6F400B484AC /* ICeCoffEETrigger.h */,
    438471                                E170DFDE0835D6F400B484AC /* ICeCoffEETrigger.m */,
    439                                 E14343B703DB4CFE00050002 /* ICeCoffEEScanner.h */,
    440                                 E14343B803DB4CFE00050002 /* ICeCoffEEScanner.m */,
    441472                                E1317B2E03DFC4DE00050002 /* ICeCoffEETerminal.h */,
    442473                                E1317B2F03DFC4DE00050002 /* ICeCoffEETerminal.m */,
     
    500531                        files = (
    501532                                E1ABAE900812F4B2007C5427 /* ICeCoffEE.h in Headers */,
    502                                 E1ABAE910812F4B2007C5427 /* ICeCoffEEScanner.h in Headers */,
    503533                                E1ABAE920812F4B2007C5427 /* ICeCoffEESuper.h in Headers */,
    504534                                E1ABAE930812F4B2007C5427 /* ICeCoffEEMenuOnly.h in Headers */,
     
    515545                                E170DFDF0835D6F400B484AC /* ICeCoffEETrigger.h in Headers */,
    516546                                E14521D70A044FAA00C9B040 /* SmartCrashReportsAPI.h in Headers */,
     547                                E14E2AB50C2B774800AC18D0 /* ICeCoffEEParser.h in Headers */,
    517548                        );
    518549                        runOnlyForDeploymentPostprocessing = 0;
     
    546577
    547578/* Begin PBXNativeTarget section */
     579                E14E2B1C0C2CBF1500AC18D0 /* TestParser */ = {
     580                        isa = PBXNativeTarget;
     581                        buildConfigurationList = E14E2B280C2CBF5200AC18D0 /* Build configuration list for PBXNativeTarget "TestParser" */;
     582                        buildPhases = (
     583                                E14E2B1A0C2CBF1500AC18D0 /* Sources */,
     584                                E14E2B2D0C2CBF8100AC18D0 /* Frameworks */,
     585                        );
     586                        buildRules = (
     587                        );
     588                        dependencies = (
     589                        );
     590                        name = TestParser;
     591                        productName = TestParser;
     592                        productReference = E14E2B1D0C2CBF1500AC18D0 /* TestParser */;
     593                        productType = "com.apple.product-type.tool";
     594                };
    548595                E1ABAE8D0812F4B2007C5427 /* APE Module */ = {
    549596                        isa = PBXNativeTarget;
     
    636683                                E1ABAED60812F4B2007C5427 /* ICFindFilesToRemove */,
    637684                                E120DB7308141CCB00BF8DDC /* ICeCoffEE Installer */,
     685                                E14E2B1C0C2CBF1500AC18D0 /* TestParser */,
    638686                        );
    639687                };
     
    698746
    699747/* Begin PBXSourcesBuildPhase section */
     748                E14E2B1A0C2CBF1500AC18D0 /* Sources */ = {
     749                        isa = PBXSourcesBuildPhase;
     750                        buildActionMask = 2147483647;
     751                        files = (
     752                                E14E2B270C2CBF3400AC18D0 /* ICeCoffEEParser.m in Sources */,
     753                                E14E2B340C2CBFB200AC18D0 /* TestParser.m in Sources */,
     754                                E14E2C3F0C2CCBEF00AC18D0 /* ICeCoffEEShared.m in Sources */,
     755                                E14E2C590C2CCC1900AC18D0 /* ICeCoffEETrigger.m in Sources */,
     756                        );
     757                        runOnlyForDeploymentPostprocessing = 0;
     758                };
    700759                E1ABAEA10812F4B2007C5427 /* Sources */ = {
    701760                        isa = PBXSourcesBuildPhase;
     
    704763                                E1ABAEA30812F4B2007C5427 /* APEMain.m in Sources */,
    705764                                E1ABAEA40812F4B2007C5427 /* ICeCoffEE.m in Sources */,
    706                                 E1ABAEA50812F4B2007C5427 /* ICeCoffEEScanner.m in Sources */,
    707765                                E1ABAEA60812F4B2007C5427 /* ICeCoffEEMenuOnly.m in Sources */,
    708766                                E1ABAEA70812F4B2007C5427 /* ICeCoffEEMenuSuper.m in Sources */,
     
    716774                                E191FC9F0831B8FB003B09BC /* ICeCoffEEServices.m in Sources */,
    717775                                E170DFE00835D6F400B484AC /* ICeCoffEETrigger.m in Sources */,
     776                                E14E2AB60C2B774800AC18D0 /* ICeCoffEEParser.m in Sources */,
    718777                        );
    719778                        runOnlyForDeploymentPostprocessing = 0;
     
    819878
    820879/* Begin XCBuildConfiguration section */
     880                E14E2B290C2CBF5200AC18D0 /* Development */ = {
     881                        isa = XCBuildConfiguration;
     882                        buildSettings = {
     883                                COPY_PHASE_STRIP = NO;
     884                                GCC_DYNAMIC_NO_PIC = NO;
     885                                GCC_ENABLE_FIX_AND_CONTINUE = YES;
     886                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
     887                                GCC_MODEL_TUNING = G5;
     888                                GCC_OPTIMIZATION_LEVEL = 0;
     889                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     890                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
     891                                INSTALL_PATH = "$(HOME)/bin";
     892                                OTHER_LDFLAGS = (
     893                                        "-framework",
     894                                        Foundation,
     895                                        "-framework",
     896                                        AppKit,
     897                                );
     898                                PREBINDING = NO;
     899                                PRODUCT_NAME = TestParser;
     900                                ZERO_LINK = YES;
     901                        };
     902                        name = Development;
     903                };
     904                E14E2B2A0C2CBF5200AC18D0 /* Deployment */ = {
     905                        isa = XCBuildConfiguration;
     906                        buildSettings = {
     907                                COPY_PHASE_STRIP = YES;
     908                                GCC_ENABLE_FIX_AND_CONTINUE = NO;
     909                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
     910                                GCC_MODEL_TUNING = G5;
     911                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
     912                                GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
     913                                INSTALL_PATH = "$(HOME)/bin";
     914                                OTHER_LDFLAGS = (
     915                                        "-framework",
     916                                        Foundation,
     917                                        "-framework",
     918                                        AppKit,
     919                                );
     920                                PREBINDING = NO;
     921                                PRODUCT_NAME = TestParser;
     922                                ZERO_LINK = NO;
     923                        };
     924                        name = Deployment;
     925                };
    821926                E1E685AD0A044B330072E0C9 /* Development */ = {
    822927                        isa = XCBuildConfiguration;
     
    9971102                                MACOSX_DEPLOYMENT_TARGET = 10.3;
    9981103                                SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
     1104                                ZERO_LINK = NO;
    9991105                        };
    10001106                        name = Development;
     
    10121118                                MACOSX_DEPLOYMENT_TARGET = 10.3;
    10131119                                SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
     1120                                ZERO_LINK = NO;
    10141121                        };
    10151122                        name = Deployment;
     
    10181125
    10191126/* Begin XCConfigurationList section */
     1127                E14E2B280C2CBF5200AC18D0 /* Build configuration list for PBXNativeTarget "TestParser" */ = {
     1128                        isa = XCConfigurationList;
     1129                        buildConfigurations = (
     1130                                E14E2B290C2CBF5200AC18D0 /* Development */,
     1131                                E14E2B2A0C2CBF5200AC18D0 /* Deployment */,
     1132                        );
     1133                        defaultConfigurationIsVisible = 0;
     1134                        defaultConfigurationName = Development;
     1135                };
    10201136                E1E685AC0A044B330072E0C9 /* Build configuration list for PBXNativeTarget "APEManagerPrefPane" */ = {
    10211137                        isa = XCConfigurationList;
Note: See TracChangeset for help on using the changeset viewer.