diff options
Diffstat (limited to '')
-rw-r--r-- | export.c | 22 |
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, §ion, &structure); + listFree(section); fprintf(imap, ")\r\n"); } |