diff --git a/MachObjC-Prefix.pch b/MachObjC-Prefix.pch index 67318dd..3c86b1e 100644 --- a/MachObjC-Prefix.pch +++ b/MachObjC-Prefix.pch @@ -4,5 +4,6 @@ #ifdef __OBJC__ #import + #import "CDExtensions.h" #define __cmd __PRETTY_FUNCTION__ #endif diff --git a/Source/CDBalanceFormatter.m b/Source/CDBalanceFormatter.m index 7989a5a..5860d1e 100644 --- a/Source/CDBalanceFormatter.m +++ b/Source/CDBalanceFormatter.m @@ -5,8 +5,6 @@ #import "CDBalanceFormatter.h" -#import "NSString-Extensions.h" - static BOOL debug = NO; @implementation CDBalanceFormatter diff --git a/Source/CDClassDump.m b/Source/CDClassDump.m index 3612ab4..7c66b44 100644 --- a/Source/CDClassDump.m +++ b/Source/CDClassDump.m @@ -5,8 +5,6 @@ #import "CDClassDump.h" -#import "NSArray-Extensions.h" -#import "NSString-Extensions.h" #import "CDFatArch.h" #import "CDFatFile.h" #import "CDLCDylib.h" diff --git a/Source/CDClassDumpVisitor.m b/Source/CDClassDumpVisitor.m index 6bcbac8..d3390db 100644 --- a/Source/CDClassDumpVisitor.m +++ b/Source/CDClassDumpVisitor.m @@ -7,7 +7,6 @@ #include -#import "NSArray-Extensions.h" #import "CDClassDump.h" #import "CDObjectiveCProcessor.h" #import "CDMachOFile.h" diff --git a/Source/CDExtensions.h b/Source/CDExtensions.h new file mode 100644 index 0000000..dc2348f --- /dev/null +++ b/Source/CDExtensions.h @@ -0,0 +1,12 @@ +// -*- mode: ObjC -*- + +// This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files. +// Copyright (C) 1997-1998, 2000-2001, 2004-2012 Steve Nygard. + +#import "CDTopoSortNode.h" +#import "NSArray-Extensions.h" +#import "NSData-CDExtensions.h" +#import "NSData-CDExtensions.h" +#import "NSError-CDExtensions.h" +#import "NSScanner-Extensions.h" +#import "NSString-Extensions.h" diff --git a/Source/CDFindMethodVisitor.m b/Source/CDFindMethodVisitor.m index 933d617..18ba45b 100644 --- a/Source/CDFindMethodVisitor.m +++ b/Source/CDFindMethodVisitor.m @@ -5,7 +5,6 @@ #import "CDFindMethodVisitor.h" -#import "NSArray-Extensions.h" #import "CDClassDump.h" #import "CDObjectiveC1Processor.h" #import "CDMachOFile.h" diff --git a/Source/CDLCUUID.h b/Source/CDLCUUID.h index 0cd8cc5..086220f 100644 --- a/Source/CDLCUUID.h +++ b/Source/CDLCUUID.h @@ -5,8 +5,6 @@ #import "CDLoadCommand.h" -#import - @interface CDLCUUID : CDLoadCommand @property (readonly) NSString *uuidString; diff --git a/Source/CDLCUUID.m b/Source/CDLCUUID.m index 829dac9..4673c25 100644 --- a/Source/CDLCUUID.m +++ b/Source/CDLCUUID.m @@ -5,6 +5,7 @@ #import "CDLCUUID.h" +#import #import "CDMachOFile.h" @implementation CDLCUUID diff --git a/Source/CDMultiFileVisitor.m b/Source/CDMultiFileVisitor.m index e7ccc9c..9282b3d 100644 --- a/Source/CDMultiFileVisitor.m +++ b/Source/CDMultiFileVisitor.m @@ -5,7 +5,6 @@ #import "CDMultiFileVisitor.h" -#import "NSArray-Extensions.h" #import "CDClassDump.h" #import "CDClassFrameworkVisitor.h" #import "CDSymbolReferences.h" diff --git a/Source/CDOCCategory.h b/Source/CDOCCategory.h index 9fe05df..8794b8c 100644 --- a/Source/CDOCCategory.h +++ b/Source/CDOCCategory.h @@ -4,7 +4,6 @@ // Copyright (C) 1997-1998, 2000-2001, 2004-2012 Steve Nygard. #import "CDOCProtocol.h" -#import "CDTopologicalSortProtocol.h" @class CDSymbolReferences; diff --git a/Source/CDOCCategory.m b/Source/CDOCCategory.m index ba6c018..6bf43fc 100644 --- a/Source/CDOCCategory.m +++ b/Source/CDOCCategory.m @@ -8,7 +8,6 @@ #import "CDClassDump.h" #import "CDOCMethod.h" #import "CDSymbolReferences.h" -#import "NSArray-Extensions.h" #import "CDVisitor.h" #import "CDVisitorPropertyState.h" diff --git a/Source/CDOCClass.h b/Source/CDOCClass.h index bc82b9f..ce8d339 100644 --- a/Source/CDOCClass.h +++ b/Source/CDOCClass.h @@ -4,6 +4,7 @@ // Copyright (C) 1997-1998, 2000-2001, 2004-2012 Steve Nygard. #import "CDOCProtocol.h" + #import "CDTopologicalSortProtocol.h" @interface CDOCClass : CDOCProtocol diff --git a/Source/CDOCClass.m b/Source/CDOCClass.m index a508f98..be95802 100644 --- a/Source/CDOCClass.m +++ b/Source/CDOCClass.m @@ -5,7 +5,6 @@ #import "CDOCClass.h" -#import "NSArray-Extensions.h" #import "CDClassDump.h" #import "CDOCIvar.h" #import "CDOCMethod.h" diff --git a/Source/CDOCIvar.m b/Source/CDOCIvar.m index ddcd802..b6cb082 100644 --- a/Source/CDOCIvar.m +++ b/Source/CDOCIvar.m @@ -5,7 +5,6 @@ #import "CDOCIvar.h" -#import "NSError-CDExtensions.h" #import "CDClassDump.h" #import "CDTypeFormatter.h" #import "CDTypeParser.h" diff --git a/Source/CDOCMethod.m b/Source/CDOCMethod.m index 8e98abf..d6fda36 100644 --- a/Source/CDOCMethod.m +++ b/Source/CDOCMethod.m @@ -8,7 +8,6 @@ #import "CDClassDump.h" #import "CDTypeFormatter.h" #import "CDTypeParser.h" -#import "NSError-CDExtensions.h" #import "CDTypeController.h" @implementation CDOCMethod diff --git a/Source/CDOCProperty.m b/Source/CDOCProperty.m index f481e67..32410d5 100644 --- a/Source/CDOCProperty.m +++ b/Source/CDOCProperty.m @@ -5,7 +5,6 @@ #import "CDOCProperty.h" -#import "NSString-Extensions.h" #import "CDTypeParser.h" #import "CDTypeLexer.h" diff --git a/Source/CDOCProtocol.m b/Source/CDOCProtocol.m index 57baac3..0bd4ea3 100644 --- a/Source/CDOCProtocol.m +++ b/Source/CDOCProtocol.m @@ -5,8 +5,6 @@ #import "CDOCProtocol.h" -#import "NSArray-Extensions.h" -#import "NSError-CDExtensions.h" #import "CDClassDump.h" #import "CDOCMethod.h" #import "CDOCSymtab.h" diff --git a/Source/CDObjectiveC1Processor.m b/Source/CDObjectiveC1Processor.m index 812dc39..ce1d700 100644 --- a/Source/CDObjectiveC1Processor.m +++ b/Source/CDObjectiveC1Processor.m @@ -19,7 +19,6 @@ #import "CDOCSymtab.h" #import "CDSection32.h" #import "CDLCSegment32.h" -#import "NSArray-Extensions.h" #import "CDVisitor.h" diff --git a/Source/CDObjectiveC2Processor.m b/Source/CDObjectiveC2Processor.m index c89cdba..4bfce49 100644 --- a/Source/CDObjectiveC2Processor.m +++ b/Source/CDObjectiveC2Processor.m @@ -12,7 +12,6 @@ #import "CDOCClass.h" #import "CDOCMethod.h" #import "CDOCIvar.h" -#import "NSArray-Extensions.h" #import "CDLCSymbolTable.h" #import "CDOCCategory.h" #import "CDClassDump.h" diff --git a/Source/CDObjectiveCProcessor.m b/Source/CDObjectiveCProcessor.m index ccd85a6..d9778d8 100644 --- a/Source/CDObjectiveCProcessor.m +++ b/Source/CDObjectiveCProcessor.m @@ -8,7 +8,6 @@ #import "CDClassDump.h" #import "CDMachOFile.h" #import "CDVisitor.h" -#import "NSArray-Extensions.h" #import "CDLCSegment.h" #import "CDLCDynamicSymbolTable.h" #import "CDLCSymbolTable.h" diff --git a/Source/CDStructureInfo.m b/Source/CDStructureInfo.m index acc04de..64cb48d 100644 --- a/Source/CDStructureInfo.m +++ b/Source/CDStructureInfo.m @@ -5,8 +5,6 @@ #import "CDStructureInfo.h" -#import "NSError-CDExtensions.h" -#import "NSString-Extensions.h" #import "CDType.h" // If it's used in a method, then it should be declared at the top. (name or typedef) diff --git a/Source/CDStructureTable.m b/Source/CDStructureTable.m index 678e6b7..6dd72b0 100644 --- a/Source/CDStructureTable.m +++ b/Source/CDStructureTable.m @@ -5,9 +5,6 @@ #import "CDStructureTable.h" -#import "NSArray-Extensions.h" -#import "NSError-CDExtensions.h" -#import "NSString-Extensions.h" #import "CDClassDump.h" #import "CDSymbolReferences.h" #import "CDType.h" diff --git a/Source/CDTextClassDumpVisitor.m b/Source/CDTextClassDumpVisitor.m index 77d4d72..dc60e81 100644 --- a/Source/CDTextClassDumpVisitor.m +++ b/Source/CDTextClassDumpVisitor.m @@ -5,7 +5,6 @@ #import "CDTextClassDumpVisitor.h" -#import "NSArray-Extensions.h" #import "CDClassDump.h" #import "CDObjectiveC1Processor.h" #import "CDMachOFile.h" diff --git a/Source/CDType.m b/Source/CDType.m index d3e1763..3ef7f00 100644 --- a/Source/CDType.m +++ b/Source/CDType.m @@ -5,15 +5,12 @@ #import "CDType.h" -#import "NSArray-Extensions.h" -#import "NSString-Extensions.h" #import "CDSymbolReferences.h" #import "CDTypeController.h" #import "CDTypeName.h" #import "CDTypeLexer.h" // For T_NAMED_OBJECT #import "CDTypeFormatter.h" #import "CDTypeParser.h" -#import "NSError-CDExtensions.h" static BOOL debugMerge = NO; diff --git a/Source/CDTypeFormatter.m b/Source/CDTypeFormatter.m index 8c33e55..1007ef3 100644 --- a/Source/CDTypeFormatter.m +++ b/Source/CDTypeFormatter.m @@ -5,9 +5,6 @@ #import "CDTypeFormatter.h" -#import "NSError-CDExtensions.h" -#import "NSScanner-Extensions.h" -#import "NSString-Extensions.h" #import "CDMethodType.h" #import "CDSymbolReferences.h" #import "CDType.h" diff --git a/Source/CDTypeLexer.h b/Source/CDTypeLexer.h index 2c8a8af..200d2ac 100644 --- a/Source/CDTypeLexer.h +++ b/Source/CDTypeLexer.h @@ -5,16 +5,16 @@ #import -#define TK_EOS 0 -#define TK_NUMBER 257 -#define TK_IDENTIFIER 258 -#define T_NAMED_OBJECT 259 +#define TK_EOS 0 +#define TK_NUMBER 257 +#define TK_IDENTIFIER 258 +#define T_NAMED_OBJECT 259 #define TK_QUOTED_STRING 260 #define TK_TEMPLATE_TYPE TK_IDENTIFIER enum { - CDTypeLexerState_Normal = 0, - CDTypeLexerState_Identifier = 1, + CDTypeLexerState_Normal = 0, + CDTypeLexerState_Identifier = 1, CDTypeLexerState_TemplateTypes = 2, }; typedef NSUInteger CDTypeLexerState; diff --git a/Source/CDTypeLexer.m b/Source/CDTypeLexer.m index 3f0188e..19a5fc8 100644 --- a/Source/CDTypeLexer.m +++ b/Source/CDTypeLexer.m @@ -5,16 +5,14 @@ #import "CDTypeLexer.h" -#import "NSScanner-Extensions.h" - static BOOL debug = NO; static NSString *CDTypeLexerStateName(CDTypeLexerState state) { switch (state) { - case CDTypeLexerState_Normal: return @"Normal"; - case CDTypeLexerState_Identifier: return @"Identifier"; - case CDTypeLexerState_TemplateTypes: return @"Template"; + case CDTypeLexerState_Normal: return @"Normal"; + case CDTypeLexerState_Identifier: return @"Identifier"; + case CDTypeLexerState_TemplateTypes: return @"Template"; } return @"Unknown"; diff --git a/Source/CDTypeParser.m b/Source/CDTypeParser.m index a416e4d..eff11d1 100644 --- a/Source/CDTypeParser.m +++ b/Source/CDTypeParser.m @@ -5,16 +5,14 @@ #import "CDTypeParser.h" -#include #import "CDMethodType.h" #import "CDType.h" #import "CDTypeName.h" #import "CDTypeLexer.h" -#import "NSString-Extensions.h" -NSString *CDExceptionName_SyntaxError = @"CDExceptionName_SyntaxError"; +NSString *CDExceptionName_SyntaxError = @"CDExceptionName_SyntaxError"; -NSString *CDErrorDomain_TypeParser = @"CDErrorDomain_TypeParser"; +NSString *CDErrorDomain_TypeParser = @"CDErrorDomain_TypeParser"; NSString *CDErrorKey_Type = @"CDErrorKey_Type"; NSString *CDErrorKey_RemainingString = @"CDErrorKey_RemainingString"; diff --git a/class-dump-Prefix.pch b/class-dump-Prefix.pch index a47f207..4080be2 100644 --- a/class-dump-Prefix.pch +++ b/class-dump-Prefix.pch @@ -4,5 +4,6 @@ #ifdef __OBJC__ #import + #import "CDExtensions.h" #define __cmd __PRETTY_FUNCTION__ #endif diff --git a/class-dump.m b/class-dump.m index 54fb780..8cf9152 100644 --- a/class-dump.m +++ b/class-dump.m @@ -11,7 +11,6 @@ #include #import -#import "NSString-Extensions.h" #import "CDClassDump.h" #import "CDFindMethodVisitor.h" diff --git a/class-dump.xcodeproj/project.pbxproj b/class-dump.xcodeproj/project.pbxproj index edf1561..6c524c8 100644 --- a/class-dump.xcodeproj/project.pbxproj +++ b/class-dump.xcodeproj/project.pbxproj @@ -92,6 +92,7 @@ 013D1F5A13A5AF6500BF0A67 /* libMachObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 013D1F1113A5AE5A00BF0A67 /* libMachObjC.a */; }; 0168C98713E4AB3200926EC3 /* CDLCFunctionStarts.h in Headers */ = {isa = PBXBuildFile; fileRef = 0168C98513E4AB3200926EC3 /* CDLCFunctionStarts.h */; }; 0168C98813E4AB3200926EC3 /* CDLCFunctionStarts.m in Sources */ = {isa = PBXBuildFile; fileRef = 0168C98613E4AB3200926EC3 /* CDLCFunctionStarts.m */; }; + 018BFD4214F65DB600190F07 /* CDExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 018BFD4114F65DB600190F07 /* CDExtensions.h */; }; 01B02D0113A5B0DC0047BC53 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01EB826313A590D9003EDE60 /* Foundation.framework */; }; 01B02D0E13A5B0FB0047BC53 /* formatType.m in Sources */ = {isa = PBXBuildFile; fileRef = 01B02D0D13A5B0FB0047BC53 /* formatType.m */; }; 01B02D1113A5B1460047BC53 /* class-dump.m in Sources */ = {isa = PBXBuildFile; fileRef = 01B02D1013A5B1460047BC53 /* class-dump.m */; }; @@ -204,6 +205,7 @@ 013D1F1113A5AE5A00BF0A67 /* libMachObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMachObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 0168C98513E4AB3200926EC3 /* CDLCFunctionStarts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDLCFunctionStarts.h; path = Source/CDLCFunctionStarts.h; sourceTree = ""; }; 0168C98613E4AB3200926EC3 /* CDLCFunctionStarts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDLCFunctionStarts.m; path = Source/CDLCFunctionStarts.m; sourceTree = ""; }; + 018BFD4114F65DB600190F07 /* CDExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDExtensions.h; path = Source/CDExtensions.h; sourceTree = ""; }; 01B02CFF13A5B0DC0047BC53 /* formatType */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = formatType; sourceTree = BUILT_PRODUCTS_DIR; }; 01B02D0D13A5B0FB0047BC53 /* formatType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = formatType.m; sourceTree = SOURCE_ROOT; }; 01B02D0F13A5B1220047BC53 /* formatType-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "formatType-Prefix.pch"; sourceTree = SOURCE_ROOT; }; @@ -540,6 +542,7 @@ 01EB836513A59202003EDE60 /* Extensions */ = { isa = PBXGroup; children = ( + 018BFD4114F65DB600190F07 /* CDExtensions.h */, 01EB830D13A591D8003EDE60 /* CDTopologicalSortProtocol.h */, 01EB830E13A591D8003EDE60 /* CDTopoSortNode.h */, 01EB830F13A591D8003EDE60 /* CDTopoSortNode.m */, @@ -703,6 +706,7 @@ buildActionMask = 2147483647; files = ( 0168C98713E4AB3200926EC3 /* CDLCFunctionStarts.h in Headers */, + 018BFD4214F65DB600190F07 /* CDExtensions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/deprotect.m b/deprotect.m index 698cfc9..400f7c3 100644 --- a/deprotect.m +++ b/deprotect.m @@ -10,7 +10,6 @@ #include #import -#import "NSString-Extensions.h" #import "CDClassDump.h" #import "CDMachOFile.h" diff --git a/formatType.m b/formatType.m index 37ac0b6..19faadd 100644 --- a/formatType.m +++ b/formatType.m @@ -10,7 +10,6 @@ #include #import -#import "NSString-Extensions.h" #import "CDClassDump.h" #import "CDTypeFormatter.h"