summaryrefslogtreecommitdiff
path: root/text-utils
diff options
context:
space:
mode:
authorOndrej Oprala <ooprala@redhat.com>2013-11-08 17:13:12 +0100
committerKarel Zak <kzak@redhat.com>2013-12-02 13:44:23 +0100
commitbb8ae572ef37a248c3f1b134182152446241400b (patch)
treef23177194b62e79f7e5b06ff0f53d20cad7a3e2f /text-utils
parent046921da22a865addc7a6adb6abab85a3f230748 (diff)
downloadutil-linux-bb8ae572ef37a248c3f1b134182152446241400b.tar.gz
hexdump: rename struct _fs to struct hexdump_fs and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'text-utils')
-rw-r--r--text-utils/hexdump-display.c4
-rw-r--r--text-utils/hexdump-parse.c8
-rw-r--r--text-utils/hexdump.c10
-rw-r--r--text-utils/hexdump.h8
4 files changed, 15 insertions, 15 deletions
diff --git a/text-utils/hexdump-display.c b/text-utils/hexdump-display.c
index 7d61ab82..bd463b2b 100644
--- a/text-utils/hexdump-display.c
+++ b/text-utils/hexdump-display.c
@@ -178,7 +178,7 @@ static void bpad(struct hexdump_pr *pr)
void display(void)
{
register struct list_head *fs;
- register FS *fss;
+ register struct hexdump_fs *fss;
register struct hexdump_fu *fu;
register struct hexdump_pr *pr;
register int cnt;
@@ -191,7 +191,7 @@ void display(void)
fs = &fshead; savebp = bp; saveaddress = address;
list_for_each(p, fs) {
- fss = list_entry(p, FS, fslist);
+ fss = list_entry(p, struct hexdump_fs, fslist);
list_for_each(q, &fss->fulist) {
fu = list_entry(q, struct hexdump_fu, fulist);
diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c
index e67fcd20..291c620f 100644
--- a/text-utils/hexdump-parse.c
+++ b/text-utils/hexdump-parse.c
@@ -83,11 +83,11 @@ void addfile(char *name)
void add_fmt(const char *fmt)
{
const char *p, *savep;
- FS *tfs;
+ struct hexdump_fs *tfs;
struct hexdump_fu *tfu;
/* Start new linked list of format units. */
- tfs = xcalloc(1, sizeof(FS));
+ tfs = xcalloc(1, sizeof(struct hexdump_fs));
INIT_LIST_HEAD(&tfs->fslist);
INIT_LIST_HEAD(&tfs->fulist);
list_add_tail(&tfs->fslist, &fshead);
@@ -154,7 +154,7 @@ void add_fmt(const char *fmt)
static const char *spec = ".#-+ 0123456789";
-int block_size(FS *fs)
+int block_size(struct hexdump_fs *fs)
{
struct hexdump_fu *fu;
int bcnt, prec, cursize = 0;
@@ -201,7 +201,7 @@ int block_size(FS *fs)
return(cursize);
}
-void rewrite_rules(FS *fs)
+void rewrite_rules(struct hexdump_fs *fs)
{
enum { NOTOKAY, USEBCNT, USEPREC } sokay;
struct hexdump_pr *pr;
diff --git a/text-utils/hexdump.c b/text-utils/hexdump.c
index cd4bfd4a..e216f72b 100644
--- a/text-utils/hexdump.c
+++ b/text-utils/hexdump.c
@@ -170,7 +170,7 @@ void __attribute__((__noreturn__)) usage(FILE *out)
int main(int argc, char **argv)
{
struct list_head *p;
- FS *tfs;
+ struct hexdump_fs *tfs;
char *c;
INIT_LIST_HEAD(&fshead);
@@ -188,14 +188,14 @@ int main(int argc, char **argv)
/* figure out the data block size */
blocksize = 0;
list_for_each(p, &fshead) {
- tfs = list_entry(p, FS, fslist);
+ tfs = list_entry(p, struct hexdump_fs, fslist);
if ((tfs->bcnt = block_size(tfs)) > blocksize)
blocksize = tfs->bcnt;
}
/* rewrite the rules, do syntax checking */
list_for_each(p, &fshead)
- rewrite_rules(list_entry(p, FS, fslist));
+ rewrite_rules(list_entry(p, struct hexdump_fs, fslist));
next(argv);
display();
@@ -206,11 +206,11 @@ int main(int argc, char **argv)
void hex_free(void)
{
struct list_head *p, *pn, *q, *qn, *r, *rn;
- FS *fs;
+ struct hexdump_fs *fs;
struct hexdump_fu *fu;
struct hexdump_pr *pr;
list_for_each_safe(p, pn, &fshead) {
- fs = list_entry(p, FS, fslist);
+ fs = list_entry(p, struct hexdump_fs, fslist);
list_for_each_safe(q, qn, &fs->fulist) {
fu = list_entry(q, struct hexdump_fu, fulist);
list_for_each_safe(r, rn, &fu->prlist) {
diff --git a/text-utils/hexdump.h b/text-utils/hexdump.h
index b047db1a..45c55311 100644
--- a/text-utils/hexdump.h
+++ b/text-utils/hexdump.h
@@ -66,11 +66,11 @@ struct hexdump_fu {
char *fmt; /* format string */
};
-typedef struct _fs { /* format strings */
+struct hexdump_fs { /* format strings */
struct list_head fslist; /* linked list of format strings */
struct list_head fulist; /* linked list of format units */
int bcnt;
-} FS;
+};
extern struct hexdump_fu *endfu;
extern struct list_head fshead; /* head of format strings list */
@@ -82,9 +82,9 @@ extern off_t skip; /* bytes to skip */
enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */
extern enum _vflag vflag;
-int block_size(FS *);
+int block_size(struct hexdump_fs *);
void add_fmt(const char *);
-void rewrite_rules(FS *);
+void rewrite_rules(struct hexdump_fs *);
void addfile(char *);
void display(void);
void __attribute__((__noreturn__)) usage(FILE *out);