summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--export.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/export.c b/export.c
index 3786220..fe166f8 100644
--- a/export.c
+++ b/export.c
@@ -111,25 +111,25 @@ static void exportAtom(
 	if (error) err(EX_IOERR, "%s", path);
 }
 
-static void exportFetchParts(
-	FILE *imap, struct List *parts, const struct BodyPart *structure
+static void fetchParts(
+	FILE *imap, struct List *section, const struct BodyPart *structure
 ) {
 	if (structure->multipart) {
 		for (size_t i = 0; i < structure->parts.len; ++i) {
 			struct Data part = { .type = Number, .number = 1 + i };
-			listPush(parts, part);
-			exportFetchParts(imap, parts, &structure->parts.ptr[i]);
-			parts->len--;
+			listPush(section, part);
+			fetchParts(imap, section, &structure->parts.ptr[i]);
+			section->len--;
 		}
 	} else if (
 		structure->message.structure &&
 		structure->message.structure->multipart
 	) {
-		exportFetchParts(imap, parts, structure->message.structure);
+		fetchParts(imap, section, structure->message.structure);
 	} else {
 		fprintf(imap, " BODY[");
-		for (size_t i = 0; i < parts->len; ++i) {
-			fprintf(imap, "%s%" PRIu32, (i ? "." : ""), parts->ptr[i].number);
+		for (size_t i = 0; i < section->len; ++i) {
+			fprintf(imap, "%s%" PRIu32, (i ? "." : ""), section->ptr[i].number);
 		}
 		if (structure->message.structure) {
 			fprintf(imap, ".TEXT");
@@ -240,9 +240,9 @@ bool exportData(FILE *imap, enum Atom tag, struct List items) {
 			imap, "%s UID FETCH %" PRIu32 " (UID ENVELOPE BODYSTRUCTURE",
 			Atoms[tag], uid
 		);
-		struct List parts = {0};
-		exportFetchParts(imap, &parts, &structure);
-		listFree(parts);
+		struct List section = {0};
+		fetchParts(imap, &section, &structure);
+		listFree(section);
 		fprintf(imap, ")\r\n");
 	}
 
cb&follow=1'>Add new causal.agency with shotty shotsJune McEnroe 2019-07-12Use -s to infer terminal sizeJune McEnroe 2019-07-12Add DCH to shottyJune McEnroe This makes htop mostly work. Scrolling region still missing. 2019-07-12Support insert mode in shottyJune McEnroe This is how curses puts characters into the bottom-right cell of the terminal. 2019-07-11Don't do carriage return on line feedJune McEnroe 2019-07-11Interpret 256color-style SGRsJune McEnroe 2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe