From 9db5120719a4ff650f2e8b9c3c4081ee46f6f374 Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Mon, 23 Sep 2013 15:39:09 +0200 Subject: hexdump: use list.h queues and rewrite redundant for cycles Signed-off-by: Ondrej Oprala --- text-utils/hexdump.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'text-utils/hexdump.h') diff --git a/text-utils/hexdump.h b/text-utils/hexdump.h index fa8f632c1..c9fc4a009 100644 --- a/text-utils/hexdump.h +++ b/text-utils/hexdump.h @@ -32,9 +32,11 @@ * * @(#)hexdump.h 5.4 (Berkeley) 6/1/90 */ +#include "c.h" +#include "list.h" typedef struct _pr { - struct _pr *nextpr; /* next print unit */ + struct list_head nextpr; /* next print unit */ #define F_ADDRESS 0x001 /* print offset */ #define F_BPAD 0x002 /* blank pad */ #define F_C 0x004 /* %_c */ @@ -54,8 +56,8 @@ typedef struct _pr { } PR; typedef struct _fu { - struct _fu *nextfu; /* next format unit */ - struct _pr *nextpr; /* next print unit */ + struct list_head nextfu; /* next format unit */ + struct list_head nextpr; /* next print unit */ #define F_IGNORE 0x01 /* %_A */ #define F_SETREP 0x02 /* rep count set, not default */ unsigned int flags; /* flag values */ @@ -65,13 +67,13 @@ typedef struct _fu { } FU; typedef struct _fs { /* format strings */ - struct _fs *nextfs; /* linked list of format strings */ - struct _fu *nextfu; /* linked list of format units */ + struct list_head nextfs; /* linked list of format strings */ + struct list_head nextfu; /* linked list of format units */ int bcnt; } FS; extern FU *endfu; -extern FS *fshead; /* head of format strings list */ +extern struct list_head fshead; /* head of format strings list */ extern ssize_t blocksize; /* data block size */ extern int exitval; /* final exit value */ extern ssize_t length; /* max bytes to read */ -- cgit v1.2.3-55-g7522