]> granicus.if.org Git - neomutt/commitdiff
replace 'ATTACH_MATCH' with 'struct AttachMatch'
authorRichard Russon <rich@flatcap.org>
Tue, 16 May 2017 13:18:22 +0000 (14:18 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 16 May 2017 14:21:29 +0000 (15:21 +0100)
init.c
mutt.h
parse.c

diff --git a/init.c b/init.c
index 94d1e78b37570bd57da606fc61c845e1195b3d7e..c3910b8359509850f09985c1cd172de7453de5fd 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1316,7 +1316,7 @@ static void _attachments_clean(void)
 
 static int parse_attach_list(struct Buffer *buf, struct Buffer *s, struct List **ldata, struct Buffer *err)
 {
-  ATTACH_MATCH *a = NULL;
+  struct AttachMatch *a = NULL;
   struct List *listp = NULL, *lastp = NULL;
   char *p = NULL;
   char *tmpminor = NULL;
@@ -1329,7 +1329,7 @@ static int parse_attach_list(struct Buffer *buf, struct Buffer *s, struct List *
              (void *) *ldata);
   for (listp = *ldata; listp; listp = listp->next)
   {
-    a = (ATTACH_MATCH *) listp->data;
+    a = (struct AttachMatch *) listp->data;
     mutt_debug(5, "parse_attach_list: skipping %s/%s\n", a->major, a->minor);
     lastp = listp;
   }
@@ -1341,7 +1341,7 @@ static int parse_attach_list(struct Buffer *buf, struct Buffer *s, struct List *
     if (!buf->data || *buf->data == '\0')
       continue;
 
-    a = safe_malloc(sizeof(ATTACH_MATCH));
+    a = safe_malloc(sizeof(struct AttachMatch));
 
     /* some cheap hacks that I expect to remove */
     if (ascii_strcasecmp(buf->data, "any") == 0)
@@ -1404,7 +1404,7 @@ static int parse_attach_list(struct Buffer *buf, struct Buffer *s, struct List *
 
 static int parse_unattach_list(struct Buffer *buf, struct Buffer *s, struct List **ldata, struct Buffer *err)
 {
-  ATTACH_MATCH *a = NULL;
+  struct AttachMatch *a = NULL;
   struct List *lp = NULL, *lastp = NULL, *newlp = NULL;
   char *tmp = NULL;
   int major;
@@ -1438,7 +1438,7 @@ static int parse_unattach_list(struct Buffer *buf, struct Buffer *s, struct List
     lastp = NULL;
     for (lp = *ldata; lp;)
     {
-      a = (ATTACH_MATCH *) lp->data;
+      a = (struct AttachMatch *) lp->data;
       mutt_debug(5, "parse_unattach_list: check %s/%s [%d] : %s/%s [%d]\n",
                  a->major, a->minor, a->major_int, tmp, minor, major);
       if (a->major_int == major && (mutt_strcasecmp(minor, a->minor) == 0))
@@ -1477,7 +1477,7 @@ static int print_attach_list(struct List *lp, char op, char *name)
   while (lp)
   {
     printf("attachments %c%s %s/%s\n", op, name,
-           ((ATTACH_MATCH *) lp->data)->major, ((ATTACH_MATCH *) lp->data)->minor);
+           ((struct AttachMatch *) lp->data)->major, ((struct AttachMatch *) lp->data)->minor);
     lp = lp->next;
   }
 
diff --git a/mutt.h b/mutt.h
index 7cf7f7a3c7bc598fa5bb54b55ddf9e537d00a3bc..1eb9a96ccef6785290fc05e94cce3f4dc669104a 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -1108,13 +1108,13 @@ int state_printf(struct State *s, const char *fmt, ...);
 int state_putws(const wchar_t *ws, struct State *s);
 
 /* for attachment counter */
-typedef struct
+struct AttachMatch
 {
   char *major;
   int major_int;
   char *minor;
   regex_t minor_rx;
-} ATTACH_MATCH;
+};
 
 /* multibyte character table.
  * Allows for direct access to the individual multibyte characters in a
diff --git a/parse.c b/parse.c
index 3971bcca68c37f5bc0f8ae4cb3b97a682273fa73..df9a2860b13f5de6d2c64612fe32ef001cbdfc1f 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -1541,7 +1541,7 @@ struct Address *mutt_parse_adrlist(struct Address *p, const char *s)
 static bool count_body_parts_check(struct List **checklist, struct Body *b, bool dflt)
 {
   struct List *type = NULL;
-  ATTACH_MATCH *a = NULL;
+  struct AttachMatch *a = NULL;
 
   /* If list is null, use default behavior. */
   if (!*checklist)
@@ -1551,7 +1551,7 @@ static bool count_body_parts_check(struct List **checklist, struct Body *b, bool
 
   for (type = *checklist; type; type = type->next)
   {
-    a = (ATTACH_MATCH *) type->data;
+    a = (struct AttachMatch *) type->data;
     mutt_debug(5, "cbpc: %s %d/%s ?? %s/%s [%d]... ",
                dflt ? "[OK]   " : "[EXCL] ", b->type,
                b->subtype ? b->subtype : "*", a->major, a->minor, a->major_int);