summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump-parse.c
diff options
context:
space:
mode:
authorOndrej Oprala2013-11-08 17:13:11 +0100
committerKarel Zak2013-12-02 13:44:22 +0100
commit046921da22a865addc7a6adb6abab85a3f230748 (patch)
treef0fc152d49f1e3437eacb1c7d0e7a1e15edd62be /text-utils/hexdump-parse.c
parenthexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef (diff)
downloadkernel-qcow2-util-linux-046921da22a865addc7a6adb6abab85a3f230748.tar.gz
kernel-qcow2-util-linux-046921da22a865addc7a6adb6abab85a3f230748.tar.xz
kernel-qcow2-util-linux-046921da22a865addc7a6adb6abab85a3f230748.zip
hexdump: rename struct _fu to struct hexdump_fu and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'text-utils/hexdump-parse.c')
-rw-r--r--text-utils/hexdump-parse.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c
index 38c45131b..e67fcd20d 100644
--- a/text-utils/hexdump-parse.c
+++ b/text-utils/hexdump-parse.c
@@ -54,7 +54,7 @@ static void badconv(const char *ch);
#define first_letter(s,f) strchr(f, *(s))
-FU *endfu; /* format at end-of-data */
+struct hexdump_fu *endfu; /* format at end-of-data */
void addfile(char *name)
{
@@ -84,7 +84,7 @@ void add_fmt(const char *fmt)
{
const char *p, *savep;
FS *tfs;
- FU *tfu;
+ struct hexdump_fu *tfu;
/* Start new linked list of format units. */
tfs = xcalloc(1, sizeof(FS));
@@ -100,7 +100,7 @@ void add_fmt(const char *fmt)
break;
/* Allocate a new format unit and link it in. */
- tfu = xcalloc(1, sizeof(FU));
+ tfu = xcalloc(1, sizeof(struct hexdump_fu));
tfu->reps = 1;
INIT_LIST_HEAD(&tfu->fulist);
@@ -156,14 +156,14 @@ static const char *spec = ".#-+ 0123456789";
int block_size(FS *fs)
{
- FU *fu;
+ struct hexdump_fu *fu;
int bcnt, prec, cursize = 0;
char *fmt;
struct list_head *p;
/* figure out the data block size needed for each format unit */
list_for_each (p, &fs->fulist) {
- fu = list_entry(p, FU, fulist);
+ fu = list_entry(p, struct hexdump_fu, fulist);
if (fu->bcnt) {
cursize += fu->bcnt * fu->reps;
continue;
@@ -205,14 +205,14 @@ void rewrite_rules(FS *fs)
{
enum { NOTOKAY, USEBCNT, USEPREC } sokay;
struct hexdump_pr *pr;
- FU *fu;
+ struct hexdump_fu *fu;
struct list_head *p, *q;
char *p1, *p2, *fmtp;
char savech, cs[3];
int nconv, prec = 0;
list_for_each (p, &fs->fulist) {
- fu = list_entry(p, FU, fulist);
+ fu = list_entry(p, struct hexdump_fu, fulist);
/*
* Break each format unit into print units; each
* conversion character gets its own.
@@ -412,7 +412,7 @@ isint: cs[2] = '\0';
* gets output from the last iteration of the format unit.
*/
list_for_each (p, &fs->fulist) {
- fu = list_entry(p, FU, fulist);
+ fu = list_entry(p, struct hexdump_fu, fulist);
if (list_entry_is_last(&fu->fulist, &fs->fulist) &&
fs->bcnt < blocksize &&