Commit | Line | Data |
---|---|---|
a2eb9e55 KB |
1 | /* |
2 | * Copyright (c) 1989 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
f15db449 | 5 | * %sccs.include.redist.c% |
a2eb9e55 | 6 | * |
f15db449 | 7 | * @(#)hexdump.h 5.4 (Berkeley) %G% |
a2eb9e55 KB |
8 | */ |
9 | ||
10 | typedef struct _pr { | |
11 | struct _pr *nextpr; /* next print unit */ | |
12 | #define F_ADDRESS 0x001 /* print offset */ | |
6d23aef6 KB |
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 */ | |
a2eb9e55 KB |
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 */ | |
cbd13470 | 49 | enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ |
a2eb9e55 | 50 | char *emalloc(); |