aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dump.h35
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
21enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ 21enum dump_vflag_t { ALL, DUP, FIRST, WAIT }; /* -v values */
22 22
23typedef struct _pr { 23typedef 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
32typedef struct _fu { 32typedef 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
41typedef struct _fs { /* format strings */ 41typedef 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
47extern void bb_dump_add(const char *fmt) FAST_FUNC; 47typedef struct dumper_t {
48extern int bb_dump_dump(char **argv) FAST_FUNC; 48 off_t dump_skip; /* bytes to skip */
49extern 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
51extern FS *bb_dump_fshead; /* head of format strings */ 54dumper_t* alloc_dumper(void) FAST_FUNC;
52extern int bb_dump_blocksize; /* data block size */ 55extern void bb_dump_add(dumper_t *dumper, const char *fmt) FAST_FUNC;
53extern int bb_dump_length; /* max bytes to read */ 56extern int bb_dump_dump(dumper_t *dumper, char **argv) FAST_FUNC;
54extern smallint /*enum _vflag*/ bb_dump_vflag;
55extern 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