]> granicus.if.org Git - neomutt/commitdiff
move Tags to library
authorRichard Russon <rich@flatcap.org>
Tue, 3 Jul 2018 22:25:42 +0000 (23:25 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 21:24:00 +0000 (22:24 +0100)
17 files changed:
Makefile.autosetup
copy.c
curs_main.c
hcache/hcache.c
hdrline.c
header.h
imap/imap.c
imap/message.c
init.h
menu.c
mutt/mutt.h
mutt/tags.c [moved from tags.c with 98% similarity]
mutt/tags.h [moved from tags.h with 98% similarity]
mutt_notmuch.c
muttlib.c
pattern.c
po/POTFILES.in

index dbbb43f7f12d17743b8980d422c44fcaa05cdd7f..e7e38e0ef543fc60b70c358a9b5ad44e0ea5b6db 100644 (file)
@@ -72,7 +72,7 @@ NEOMUTTOBJS=  addrbook.o alias.o bcache.o browser.o buffy.o \
                postpone.o progress.o query.o recvattach.o recvcmd.o resize.o rfc1524.o \
                rfc2047.o rfc2231.o rfc3676.o safe_asprintf.o score.o send.o \
                sendlib.o sidebar.o smtp.o sort.o state.o status.o system.o \
-               tags.o terminal.o thread.o url.o version.o
+               terminal.o thread.o url.o version.o
 
 @if !HAVE_WCSCASECMP
 NEOMUTTOBJS+=  wcscasecmp.o
@@ -97,7 +97,7 @@ LIBMUTTOBJS=  mutt/address.o mutt/attach.o mutt/base64.o mutt/body.o mutt/buffer.
                mutt/idna.o mutt/list.o mutt/logging.o mutt/mapping.o \
                mutt/mbyte.o mutt/md5.o mutt/memory.o mutt/mime.o \
                mutt/parameter.o mutt/regex.o mutt/rfc2047.o mutt/sha1.o \
-               mutt/signal.o mutt/string.o
+               mutt/signal.o mutt/string.o mutt/tags.o
 CLEANFILES+=   $(LIBMUTT) $(LIBMUTTOBJS)
 MUTTLIBS+=     $(LIBMUTT)
 ALLOBJS+=      $(LIBMUTTOBJS)
diff --git a/copy.c b/copy.c
index 098716a485fa930c033e1a176eb13806422d2fdc..d37349ae2de9b54354981db98382cb0403726d90 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -47,7 +47,6 @@
 #include "protos.h"
 #include "rfc2047.h"
 #include "state.h"
-#include "tags.h"
 #ifdef USE_NOTMUCH
 #include "mutt_notmuch.h"
 #endif
index 01acb251c7f6adb5a05f109f56b86bbe324a27a6..94b695150a99debf433794a77fe98c57b3c3f836 100644 (file)
@@ -51,7 +51,6 @@
 #include "progress.h"
 #include "protos.h"
 #include "sort.h"
-#include "tags.h"
 #include "terminal.h"
 #include "thread.h"
 #ifdef USE_SIDEBAR
index d6107877631d636969cf3ca24a4dc34879770595..5c3505a0c7e6e1e7c145e0e7d9d002b09ba44c38 100644 (file)
@@ -54,7 +54,6 @@
 #include "hcache/hcversion.h"
 #include "header.h"
 #include "protos.h"
-#include "tags.h"
 
 static unsigned int hcachever = 0x0;
 
index 4298a5975502adf323980ae1aa070109333bcb36..947312d33211dc30b8cb578a3cac250ecddb7b15 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -42,7 +42,6 @@
 #include "options.h"
 #include "protos.h"
 #include "sort.h"
-#include "tags.h"
 #include "thread.h"
 
 /**
index 1410f45bcbd67c608f831c0aba0b08f9eede4b96..0645765dd04bc1de99615882c169172c387eec12 100644 (file)
--- a/header.h
+++ b/header.h
@@ -27,7 +27,6 @@
 #include <stdbool.h>
 #include <time.h>
 #include "mutt/mutt.h"
-#include "tags.h"
 
 /**
  * struct Header - The header/envelope of an email
index 2756a47be9d89f062b99b628b606eea431c49694..4f423856e4431ecf3d1c3f47b5264aed6f9cdf45 100644 (file)
@@ -60,7 +60,6 @@
 #include "progress.h"
 #include "protos.h"
 #include "sort.h"
-#include "tags.h"
 #include "url.h"
 #ifdef USE_HCACHE
 #include "hcache/hcache.h"
index aef50279d755e1765cfbcd569335c36aa8f01b77..33a189fc1bbafe0539b0b78154aede29e5d7a5c5 100644 (file)
@@ -52,7 +52,6 @@
 #include "options.h"
 #include "progress.h"
 #include "protos.h"
-#include "tags.h"
 #ifdef USE_HCACHE
 #include "hcache/hcache.h"
 #endif
diff --git a/init.h b/init.h
index e2623ea9d18e6928f4c99b1da00be8a90271c639..521ba25575796fec3749c921f668e3bf0922d8ca 100644 (file)
--- a/init.h
+++ b/init.h
@@ -43,7 +43,6 @@
 #include "options.h"
 #include "protos.h"
 #include "sort.h"
-#include "tags.h"
 #ifdef USE_LUA
 #include "mutt_lua.h"
 #endif
diff --git a/menu.c b/menu.c
index d46e23be2d7042d3d02d2054040e5f4e2bc3b859..6c248b2068bd5033900692df8974ba9a107224bd 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -39,7 +39,6 @@
 #include "options.h"
 #include "pattern.h"
 #include "protos.h"
-#include "tags.h"
 #ifdef USE_SIDEBAR
 #include "sidebar.h"
 #endif
index 75dbe02c9f32ce4680207f8a4938ec986db93984..929a2f134c7f268cd9af48aae369cec869eb8502 100644 (file)
@@ -53,6 +53,7 @@
  * | mutt/sha1.c      | @subpage sha1      |
  * | mutt/signal.c    | @subpage signal    |
  * | mutt/string.c    | @subpage string    |
+ * | mutt/tags.c      | @subpage tags      |
  *
  * @note The library is self-contained -- some files may depend on others in
  *       the library, but none depends on source from outside.
@@ -90,5 +91,6 @@
 #include "sha1.h"
 #include "signal2.h"
 #include "string2.h"
+#include "tags.h"
 
 #endif /* _MUTT_MUTT_H */
similarity index 98%
rename from tags.c
rename to mutt/tags.c
index 2f05c394a48eee14d4daf5a0cdfc1c5a65a2f6fc..95665e472629b367eaf34e9fe40e56a5c15f12ff 100644 (file)
--- a/tags.c
 
 #include "config.h"
 #include <stddef.h>
+#include <stdbool.h>
 #include <string.h>
-#include "mutt/mutt.h"
 #include "tags.h"
+#include "hash.h"
+#include "memory.h"
+#include "queue.h"
+#include "string2.h"
 
 char *HiddenTags; /**< Config: Private tags which should not be displayed */
 struct Hash *TagTransforms; /**< Lookup table of alternative tag names */
similarity index 98%
rename from tags.h
rename to mutt/tags.h
index a73562f758aecd8094cdbbf5a0defd518d35f19c..a0429c765f25b472278355e83b850c2bd28860db 100644 (file)
--- a/tags.h
@@ -24,7 +24,7 @@
 #define _MUTT_TAG_H
 
 #include <stdbool.h>
-#include "mutt/mutt.h"
+#include "queue.h"
 
 extern char *HiddenTags;
 extern struct Hash *TagTransforms;
@@ -46,8 +46,8 @@ STAILQ_HEAD(TagHead, TagNode);
 
 void  driver_tags_free(struct TagHead *head);
 char *driver_tags_get(struct TagHead *head);
-char *driver_tags_get_transformed_for(char *name, struct TagHead *head);
 char *driver_tags_get_transformed(struct TagHead *head);
+char *driver_tags_get_transformed_for(char *name, struct TagHead *head);
 char *driver_tags_get_with_hidden(struct TagHead *head);
 bool  driver_tags_replace(struct TagHead *head, char *tags);
 
index 5b5b06d04ec28d95ad74d5c9482e68cc90e76533..6d45e40afa9b50c8365623908e4056f056c37e67 100644 (file)
@@ -59,7 +59,6 @@
 #include "mx.h"
 #include "progress.h"
 #include "protos.h"
-#include "tags.h"
 #include "thread.h"
 #include "url.h"
 
index 7dbb2dff2f9aa3e33bbf55f95d91faa5cfc84a54..2e55fefb825958b90331562eeb7c43b62f12644e 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -54,7 +54,6 @@
 #include "ncrypt/ncrypt.h"
 #include "options.h"
 #include "protos.h"
-#include "tags.h"
 #include "url.h"
 #ifdef HAVE_SYS_SYSCALL_H
 #include <sys/syscall.h>
index 1c2a3b32226c5adf4be518a5b4c343b704fbf3de..14c29202496e507bf836e69b044204cb8da68faf 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -53,7 +53,6 @@
 #include "progress.h"
 #include "protos.h"
 #include "state.h"
-#include "tags.h"
 #include "thread.h"
 #ifdef USE_IMAP
 #include "imap/imap.h"
index 6f5afc0834415784901a92fb37561e9cffdf1175..e0af21eb64b4bbee5b307dd56aab362a43aff943 100644 (file)
@@ -86,6 +86,7 @@ mutt/rfc2047.c
 mutt/sha1.c
 mutt/signal.c
 mutt/string.c
+mutt/tags.c
 mutt_account.c
 mutt_attach.c
 mutt_body.c
@@ -145,7 +146,6 @@ sort.c
 state.c
 status.c
 system.c
-tags.c
 terminal.c
 thread.c
 url.c