Swap type/creator on intel.

This commit is contained in:
Nate Weaver 2012-07-04 17:40:58 -05:00
parent 012583d0d0
commit b5d7ff1b55
2 changed files with 11 additions and 3 deletions

View File

@ -134,9 +134,16 @@ FSGetCatalogInfo:
[nameView setStringValue:[currentDocument displayName]];
}
#warning FIXME: the creator and type codes need to be swapped on intel
[[filePropertyForm cellAtIndex:0] setStringValue:[[[NSString alloc] initWithData:[currentDocument creator] encoding:NSMacOSRomanStringEncoding] autorelease]];
[[filePropertyForm cellAtIndex:1] setStringValue:[[[NSString alloc] initWithData:[currentDocument type] encoding:NSMacOSRomanStringEncoding] autorelease]];
FourCharCode creator;
[[currentDocument creator] getBytes:&creator length:sizeof(creator)];
FourCharCode type;
[[currentDocument type] getBytes:&type length:sizeof(type)];
creator = CFSwapInt32BigToHost(creator);
type = CFSwapInt32BigToHost(type);
[[filePropertyForm cellAtIndex:0] setStringValue:[[[NSString alloc] initWithBytes:&creator length:sizeof(creator) encoding:NSMacOSRomanStringEncoding] autorelease]];
[[filePropertyForm cellAtIndex:1] setStringValue:[[[NSString alloc] initWithBytes:&type length:sizeof(type) encoding:NSMacOSRomanStringEncoding] autorelease]];
// [[filePropertyForm cellAtIndex:2] setObjectValue:[NSNumber numberWithUnsignedLongLong:dataLogicalSize]];
// [[filePropertyForm cellAtIndex:3] setObjectValue:[NSNumber numberWithUnsignedLongLong:rsrcLogicalSize]];
[[filePropertyForm cellAtIndex:2] setStringValue:[[NSNumber numberWithUnsignedLongLong:dataLogicalSize] description]];

View File

@ -2784,6 +2784,7 @@
B229EED915A4B8720032C12C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
E13F7ED108F0411100E2A5CB /* Build configuration list for PBXNativeTarget "Hex Editor Cocoa" */ = {
isa = XCConfigurationList;