git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 05/14] imap-send.c: remove struct message

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jan 15, 2013, 08:06 UTC
Message-ID
<1358237193-8887-6-git-send-email-mhagger@alum.mit.edu>
In-Reply-To
<1358237193-8887-1-git-send-email-mhagger@alum.mit.edu>
It was never used.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 imap-send.c | 26 --------------------------
 1 file changed, 26 deletions(-)
diff --git a/imap-send.c b/imap-send.c
index b8a7ff9..9e181e0 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -33,23 +33,10 @@ typedef void *SSL;
 #include <openssl/hmac.h>
 #endif
 
-/* For message->status */
-#define M_RECENT       (1<<0) /* unsyncable flag; maildir_* depend on this being 1<<0 */
-#define M_DEAD         (1<<1) /* expunged */
-#define M_FLAGS        (1<<2) /* flags fetched */
-
-struct message {
-	struct message *next;
-	size_t size; /* zero implies "not fetched" */
-	int uid;
-	unsigned char flags, status;
-};
-
 struct store {
 	/* currently open mailbox */
 	const char *name; /* foreign! maybe preset? */
 	char *path; /* own */
-	struct message *msgs; /* own */
 	int uidvalidity;
 	unsigned char opts; /* maybe preset? */
 	/* note that the following do _not_ reflect stats from msgs, but mailbox totals */
@@ -74,8 +61,6 @@ static void imap_warn(const char *, ...);
 
 static char *next_arg(char **);
 
-static void free_generic_messages(struct message *);
-
 __attribute__((format (printf, 3, 4)))
 static int nfsnprintf(char *buf, int blen, const char *fmt, ...);
 
@@ -447,16 +432,6 @@ static char *next_arg(char **s)
 	return ret;
 }
 
-static void free_generic_messages(struct message *msgs)
-{
-	struct message *tmsg;
-
-	for (; msgs; msgs = tmsg) {
-		tmsg = msgs->next;
-		free(msgs);
-	}
-}
-
 static int nfsnprintf(char *buf, int blen, const char *fmt, ...)
 {
 	int ret;
@@ -914,7 +889,6 @@ static void imap_close_server(struct imap_store *ictx)
 static void imap_close_store(struct store *ctx)
 {
 	imap_close_server((struct imap_store *)ctx);
-	free_generic_messages(ctx->msgs);
 	free(ctx);
 }
 
-- 
1.8.0.3
Previous: Michael HaggertyNext: Michael Haggerty
Message 6 of 25 in “Remove unused code from imap-send.c”
  1. 00/14 Remove unused code from imap-send.cMichael Haggerty, Jan 15, 2013
  2. 01/14 imap-send.c: remove msg_data::flags, which was always zeroMichael Haggerty, Jan 15, 2013
  3. 02/14 imap-send.c: remove struct msg_dataMichael Haggerty, Jan 15, 2013
  4. 03/14 iamp-send.c: remove unused struct imap_store_confMichael Haggerty, Jan 15, 2013
  5. 04/14 imap-send.c: remove struct store_confMichael Haggerty, Jan 15, 2013
  6. 05/14 imap-send.c: remove struct messageMichael Haggerty, Jan 15, 2013
  7. 06/14 imap-send.c: remove some unused fields from struct storeMichael Haggerty, Jan 15, 2013
  8. Jonathan NiederJan 15, 2013
  9. Junio C HamanoJan 15, 2013
  10. Jonathan NiederJan 15, 2013
  11. Michael HaggertyJan 16, 2013
  12. 07/14 imap-send.c: inline imap_parse_list() in imap_list()Michael Haggerty, Jan 15, 2013
  13. Matt KraaiJan 15, 2013
  14. Michael HaggertyJan 16, 2013
  15. Junio C HamanoJan 16, 2013
  16. Michael HaggertyJan 17, 2013
  17. 08/14 imap-send.c: remove struct imap argument to parse_imap_list_l()Michael Haggerty, Jan 15, 2013
  18. 09/14 imap-send.c: remove namespace fields from struct imapMichael Haggerty, Jan 15, 2013
  19. 10/14 imap-send.c: remove unused field imap_store::trashncMichael Haggerty, Jan 15, 2013
  20. 11/14 imap-send.c: use struct imap_store instead of struct storeMichael Haggerty, Jan 15, 2013
  21. 12/14 imap-send.c: remove unused field imap_store::uidvalidityMichael Haggerty, Jan 15, 2013
  22. 13/14 imap-send.c: fold struct store into struct imap_storeMichael Haggerty, Jan 15, 2013
  23. 14/14 imap-send.c: simplify logic in lf_to_crlf()Michael Haggerty, Jan 15, 2013
  24. Jeff KingJan 15, 2013
  25. Jonathan NiederJan 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.