]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hexdump: rename struct _fs to struct hexdump_fs and remove its typedef
authorOndrej Oprala <ooprala@redhat.com>
Fri, 8 Nov 2013 16:13:12 +0000 (17:13 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Dec 2013 12:44:23 +0000 (13:44 +0100)
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
text-utils/hexdump-display.c
text-utils/hexdump-parse.c
text-utils/hexdump.c
text-utils/hexdump.h

index 7d61ab8220b5b41921e8be958fcd6da3a87bd2c5..bd463b2b82496e5c88473e8ecd28aaaaa3ad29dd 100644 (file)
@@ -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);
index e67fcd20d82c1d90689a59cb6c41f6acb7d545e0..291c620f90dc5c8b41ec42df19e03da1f4604903 100644 (file)
@@ -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;
index cd4bfd4a25790dec70b3e033a3537f3accdad477..e216f72bf2cf1757a564a811b7edfc257dbbb1a0 100644 (file)
@@ -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) {
index b047db1a912ea200a6ae7651138044b978bc617f..45c5531167cfe9ec91916ad78051342644578f6c 100644 (file)
@@ -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);