1 /* 2 * Copyright (c) 1989 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)hexdump.h 5.4 (Berkeley) 06/01/90 8 */ 9 10 typedef struct _pr { 11 struct _pr *nextpr; /* next print unit */ 12 #define F_ADDRESS 0x001 /* print offset */ 13 #define F_BPAD 0x002 /* blank pad */ 14 #define F_C 0x004 /* %_c */ 15 #define F_CHAR 0x008 /* %c */ 16 #define F_DBL 0x010 /* %[EefGf] */ 17 #define F_INT 0x020 /* %[di] */ 18 #define F_P 0x040 /* %_p */ 19 #define F_STR 0x080 /* %s */ 20 #define F_U 0x100 /* %_u */ 21 #define F_UINT 0x200 /* %[ouXx] */ 22 #define F_TEXT 0x400 /* no conversions */ 23 u_int flags; /* flag values */ 24 int bcnt; /* byte count */ 25 char *cchar; /* conversion character */ 26 char *fmt; /* printf format */ 27 char *nospace; /* no whitespace version */ 28 } PR; 29 30 typedef struct _fu { 31 struct _fu *nextfu; /* next format unit */ 32 struct _pr *nextpr; /* next print unit */ 33 #define F_IGNORE 0x01 /* %_A */ 34 #define F_SETREP 0x02 /* rep count set, not default */ 35 u_int flags; /* flag values */ 36 int reps; /* repetition count */ 37 int bcnt; /* byte count */ 38 char *fmt; /* format string */ 39 } FU; 40 41 typedef struct _fs { /* format strings */ 42 struct _fs *nextfs; /* linked list of format strings */ 43 struct _fu *nextfu; /* linked list of format units */ 44 int bcnt; 45 } FS; 46 47 extern FS *fshead; /* head of format strings list */ 48 extern int blocksize; /* data block size */ 49 enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ 50 char *emalloc(); 51