TUPLE: fat-binary-member cpu-type cpu-subtype data ;
ERROR: not-fat-binary ;
-TYPED: fat-binary-members ( >c-ptr -- fat-binary-members )
+: fat-binary-members ( >c-ptr -- fat-binary-members )
fat_header memory>struct dup magic>> {
{ FAT_MAGIC [ ] }
{ FAT_CIGAM [ ] }
[ drop f ]
} case ;
-TYPED: macho-header ( c-ptr -- macho: mach_header_32/64 )
+: macho-header ( c-ptr -- macho: mach_header_32/64 )
dup mach_header_64 memory>struct 64-bit?
[ mach_header_64 memory>struct ]
[ mach_header memory>struct ] if ;