1 /* vi: set sw=4 ts=4: */ 2 3 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 4 5 enum dump_vflag_t { ALL, DUP, FIRST, WAIT }; /* -v values */ 6 7 typedef struct PR { 8 struct PR *nextpr; /* next print unit */ 9 unsigned flags; /* flag values */ 10 int bcnt; /* byte count */ 11 char *cchar; /* conversion character */ 12 char *fmt; /* printf format */ 13 char *nospace; /* no whitespace version */ 14 } PR; 15 16 typedef struct FU { 17 struct FU *nextfu; /* next format unit */ 18 struct PR *nextpr; /* next print unit */ 19 unsigned flags; /* flag values */ 20 int reps; /* repetition count */ 21 int bcnt; /* byte count */ 22 char *fmt; /* format string */ 23 } FU; 24 25 typedef struct FS { /* format strings */ 26 struct FS *nextfs; /* linked list of format strings */ 27 struct FU *nextfu; /* linked list of format units */ 28 int bcnt; 29 } FS; 30 31 typedef struct dumper_t { 32 off_t dump_skip; /* bytes to skip */ 33 int dump_length; /* max bytes to read */ 34 smallint dump_vflag; /*enum dump_vflag_t*/ 35 FS *fshead; 36 const char *xxd_eofstring; 37 off_t address; /* address/offset in stream */ 38 long long xxd_displayoff; 39 } dumper_t; 40 41 dumper_t* alloc_dumper(void) FAST_FUNC; 42 extern void bb_dump_add(dumper_t *dumper, const char *fmt) FAST_FUNC; 43 extern int bb_dump_dump(dumper_t *dumper, char **argv) FAST_FUNC; 44 45 POP_SAVED_FUNCTION_VISIBILITY 46