diff options
| author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-11-02 11:40:44 +0000 |
|---|---|---|
| committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-11-02 11:40:44 +0000 |
| commit | 55b2deda088ce2ce21ea059ca26783baffa778a9 (patch) | |
| tree | 3294a015feda747fa4637ee7fc6d3d25847bce6b /include | |
| parent | 60281118d022a702c62c9047ba6998ef873917d4 (diff) | |
| download | busybox-w32-55b2deda088ce2ce21ea059ca26783baffa778a9.tar.gz busybox-w32-55b2deda088ce2ce21ea059ca26783baffa778a9.tar.bz2 busybox-w32-55b2deda088ce2ce21ea059ca26783baffa778a9.zip | |
Required for od and hexdump applets
Diffstat (limited to 'include')
| -rw-r--r-- | include/dump.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/dump.h b/include/dump.h new file mode 100644 index 000000000..0e8dbe07f --- /dev/null +++ b/include/dump.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #define F_IGNORE 0x01 /* %_A */ | ||
| 2 | #define F_SETREP 0x02 /* rep count set, not default */ | ||
| 3 | #define F_ADDRESS 0x001 /* print offset */ | ||
| 4 | #define F_BPAD 0x002 /* blank pad */ | ||
| 5 | #define F_C 0x004 /* %_c */ | ||
| 6 | #define F_CHAR 0x008 /* %c */ | ||
| 7 | #define F_DBL 0x010 /* %[EefGf] */ | ||
| 8 | #define F_INT 0x020 /* %[di] */ | ||
| 9 | #define F_P 0x040 /* %_p */ | ||
| 10 | #define F_STR 0x080 /* %s */ | ||
| 11 | #define F_U 0x100 /* %_u */ | ||
| 12 | #define F_UINT 0x200 /* %[ouXx] */ | ||
| 13 | #define F_TEXT 0x400 /* no conversions */ | ||
| 14 | |||
| 15 | enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ | ||
| 16 | |||
| 17 | typedef struct _pr { | ||
| 18 | struct _pr *nextpr; /* next print unit */ | ||
| 19 | unsigned int flags; /* flag values */ | ||
| 20 | int bcnt; /* byte count */ | ||
| 21 | char *cchar; /* conversion character */ | ||
| 22 | char *fmt; /* printf format */ | ||
| 23 | char *nospace; /* no whitespace version */ | ||
| 24 | } PR; | ||
| 25 | |||
| 26 | typedef struct _fu { | ||
| 27 | struct _fu *nextfu; /* next format unit */ | ||
| 28 | struct _pr *nextpr; /* next print unit */ | ||
| 29 | unsigned int flags; /* flag values */ | ||
| 30 | int reps; /* repetition count */ | ||
| 31 | int bcnt; /* byte count */ | ||
| 32 | char *fmt; /* format string */ | ||
| 33 | } FU; | ||
| 34 | |||
| 35 | typedef struct _fs { /* format strings */ | ||
| 36 | struct _fs *nextfs; /* linked list of format strings */ | ||
| 37 | struct _fu *nextfu; /* linked list of format units */ | ||
| 38 | int bcnt; | ||
| 39 | } FS; | ||
| 40 | |||
| 41 | void add(char *fmt); | ||
| 42 | int dump (char **argv); | ||
