diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/dump.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/include/dump.h b/include/dump.h index da3e66da9..44f2082b7 100644 --- a/include/dump.h +++ b/include/dump.h | |||
@@ -18,10 +18,10 @@ | |||
18 | #define F_UINT 0x200 /* %[ouXx] */ | 18 | #define F_UINT 0x200 /* %[ouXx] */ |
19 | #define F_TEXT 0x400 /* no conversions */ | 19 | #define F_TEXT 0x400 /* no conversions */ |
20 | 20 | ||
21 | enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ | 21 | enum dump_vflag_t { ALL, DUP, FIRST, WAIT }; /* -v values */ |
22 | 22 | ||
23 | typedef struct _pr { | 23 | typedef struct PR { |
24 | struct _pr *nextpr; /* next print unit */ | 24 | struct PR *nextpr; /* next print unit */ |
25 | unsigned flags; /* flag values */ | 25 | unsigned flags; /* flag values */ |
26 | int bcnt; /* byte count */ | 26 | int bcnt; /* byte count */ |
27 | char *cchar; /* conversion character */ | 27 | char *cchar; /* conversion character */ |
@@ -29,30 +29,31 @@ typedef struct _pr { | |||
29 | char *nospace; /* no whitespace version */ | 29 | char *nospace; /* no whitespace version */ |
30 | } PR; | 30 | } PR; |
31 | 31 | ||
32 | typedef struct _fu { | 32 | typedef struct FU { |
33 | struct _fu *nextfu; /* next format unit */ | 33 | struct FU *nextfu; /* next format unit */ |
34 | struct _pr *nextpr; /* next print unit */ | 34 | struct PR *nextpr; /* next print unit */ |
35 | unsigned flags; /* flag values */ | 35 | unsigned flags; /* flag values */ |
36 | int reps; /* repetition count */ | 36 | int reps; /* repetition count */ |
37 | int bcnt; /* byte count */ | 37 | int bcnt; /* byte count */ |
38 | char *fmt; /* format string */ | 38 | char *fmt; /* format string */ |
39 | } FU; | 39 | } FU; |
40 | 40 | ||
41 | typedef struct _fs { /* format strings */ | 41 | typedef struct FS { /* format strings */ |
42 | struct _fs *nextfs; /* linked list of format strings */ | 42 | struct FS *nextfs; /* linked list of format strings */ |
43 | struct _fu *nextfu; /* linked list of format units */ | 43 | struct FU *nextfu; /* linked list of format units */ |
44 | int bcnt; | 44 | int bcnt; |
45 | } FS; | 45 | } FS; |
46 | 46 | ||
47 | extern void bb_dump_add(const char *fmt) FAST_FUNC; | 47 | typedef struct dumper_t { |
48 | extern int bb_dump_dump(char **argv) FAST_FUNC; | 48 | off_t dump_skip; /* bytes to skip */ |
49 | extern int bb_dump_size(FS * fs) FAST_FUNC; | 49 | int dump_length; /* max bytes to read */ |
50 | smallint dump_vflag; /*enum dump_vflag_t*/ | ||
51 | FS *fshead; | ||
52 | } dumper_t; | ||
50 | 53 | ||
51 | extern FS *bb_dump_fshead; /* head of format strings */ | 54 | dumper_t* alloc_dumper(void) FAST_FUNC; |
52 | extern int bb_dump_blocksize; /* data block size */ | 55 | extern void bb_dump_add(dumper_t *dumper, const char *fmt) FAST_FUNC; |
53 | extern int bb_dump_length; /* max bytes to read */ | 56 | extern int bb_dump_dump(dumper_t *dumper, char **argv) FAST_FUNC; |
54 | extern smallint /*enum _vflag*/ bb_dump_vflag; | ||
55 | extern off_t bb_dump_skip; /* bytes to skip */ | ||
56 | 57 | ||
57 | #if __GNUC_PREREQ(4,1) | 58 | #if __GNUC_PREREQ(4,1) |
58 | # pragma GCC visibility pop | 59 | # pragma GCC visibility pop |