]>
git.saurik.com Git - apple/hfs.git/blob - CopyHFSMeta/dump.c
6 ({ __typeof(a) _a = (a); __typeof(b) _b = (b); \
7 (_a < _b) ? _a : _b; })
12 * Debug functions only.
15 DumpData(const void *data
, size_t len
)
17 unsigned char *base
= (unsigned char*)data
;
18 unsigned char *end
= base
+ len
;
19 unsigned char *cp
= base
;
23 unsigned char *tend
= MIN(end
, cp
+ WIDTH
);
26 size_t gap
= (cp
+ WIDTH
) - tend
;
28 if (gap
!= 0 || tend
== end
)
31 for (tmp
= cp
; tmp
< tend
; tmp
++) {
48 printf("%04x: ", (int)(cp
- base
));
49 for (i
= 0, tmp
= cp
; tmp
< tend
; tmp
++) {
56 for (i
= gap
; i
>= 0; i
--) {
62 for (tmp
= cp
; tmp
< tend
; tmp
++) {
63 printf("%c", isalnum(*tmp
) ? *tmp
: '.');
65 for (i
= 0; i
< gap
; i
++) {