From c8ceef3ed6424dcb5a6ec835e7d8d9cc00595372 Mon Sep 17 00:00:00 2001 From: pdmef Date: Sun, 23 Oct 2005 00:52:43 +0000 Subject: [PATCH] Rocco Rutte: - merge in latest mutt changes git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@557 e385b8ad-14ed-0310-8656-cc95a2468c6d --- ChangeLog | 7 ++++ ChangeLog.mutt | 41 +++++++-------------- VERSION.svn | 2 +- attach.c | 6 ++-- buffy.c | 16 ++++----- copy.c | 35 +++++++++--------- copy.h | 2 +- crypt-gpgme.c | 17 ++++----- crypt.c | 2 +- edit.c | 4 +-- handler.c | 20 +++++------ hcache.c | 2 +- imap/imap.c | 2 +- imap/message.c | 2 +- mbox.c | 10 +++--- mutt.h | 6 ++-- mx.c | 2 +- nntp/nntp.c | 4 +-- pager.c | 12 +++---- parse.c | 28 +++++++-------- pattern.c | 8 ++--- pgp.c | 13 +++---- pgpmicalg.c | 10 +++--- pgppacket.c | 6 ++-- pgppubring.c | 8 ++--- pop/pop.c | 2 +- postpone.c | 2 +- protos.h | 4 +-- send.c | 2 +- sendlib.c | 10 +++--- smime.c | 98 ++++++++++++++++++++++++++++++++------------------ 31 files changed, 201 insertions(+), 182 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68ecb86..aebdf1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ Changes specific to mutt-ng: +2005-10-23: + * As part of a merge, mutt-ng contains full large file support. + +2005-10-19: + * Mutt-ng contains better scoring support to score on both, addresses + and names. + 2005-09-07: * Mutt-ng no longer contains support for SASL 1.x. diff --git a/ChangeLog.mutt b/ChangeLog.mutt index 7923f5d..3576d16 100644 --- a/ChangeLog.mutt +++ b/ChangeLog.mutt @@ -1,39 +1,22 @@ -2005-10-06 06:15:00 Brendan Cully (brendan) - - * browser.c: Sort browser entries after every IMAP browsing - operation instead of just when explicitly requested. Closes: - #2089. - -2005-10-06 05:13:55 Jeff Ito (brendan) +2005-10-21 04:35:38 Brendan Cully (brendan) - * smime.c: Add AES ciphers to S/MIME encryption options. Closes: - #2103. - -2005-10-05 19:24:40 David Champion (brendan) - - * doc/manual.xml.head, init.c: Fix 'unattachments'. Closes: #2102. - -2005-10-05 19:20:22 Jeff Ito (brendan) + * smime.c, attach.c, buffy.c, copy.c, copy.h, crypt-gpgme.c, + crypt.c, edit.c, handler.c, mbox.c, mutt.h, pager.c, parse.c, + pattern.c, pgp.c, pgpmicalg.c, pgppacket.c, pgppubring.c, pop.c, + postpone.c, protos.h, sendlib.c: Full large file support. Keep a + close watch on your mailboxes everyone! - * smime.c: S/MIME key selection truncates the last character of - the selected key for no apparent reason. Removed until someone - can justify it. Closes: #2081. +2005-10-18 07:04:50 Vincent Lefevre (roessler) -2005-10-04 19:00:05 Brendan Cully (brendan) + * po/fr.po: update - * init.h: Tweak description of pop_checkinterval slightly. Closes: - #2074. +2005-10-17 09:14:58 TAKAHASHI Tamotsu (roessler) - * hcache.c: Bump hcache Id for attachment counting patch. + * smime.c: Fix S/MIME algorithm choice. -2005-10-04 06:05:39 David Champion (brendan) +2005-10-14 09:30:11 Thomas Roessler (roessler) - * Muttrc.head.in, doc/manual.xml.head, doc/muttrc.man.head, - globals.h, hdrline.c, init.c, init.h, mime.h, mutt.h, parse.c, - pattern.c, protos.h, recvattach.c: Attachment counting for index - display (patch-1.5.11.dgc.attach.6). Modifications: attach_recurse - and attach_ignore_fundamental stripped, some debugging code - removed, some bones thrown to check_sec.sh. + * imap/imap.c: Fix imap/2112. 2005-10-10 18:26:31 Brendan Cully (brendan) diff --git a/VERSION.svn b/VERSION.svn index 6227f00..0ee9836 100644 --- a/VERSION.svn +++ b/VERSION.svn @@ -1 +1 @@ -556 +557 diff --git a/attach.c b/attach.c index c695e34..913dbb7 100644 --- a/attach.c +++ b/attach.c @@ -156,7 +156,7 @@ int mutt_compose_attachment (BODY * a) /* Remove headers by copying out data to another file, then * copying the file back */ - fseek (fp, b->offset, 0); + fseeko (fp, b->offset, 0); mutt_mktemp (tempfile); if ((tfp = safe_fopen (tempfile, "w")) == NULL) { mutt_perror (_("Failure to open file to strip headers.")); @@ -724,7 +724,7 @@ int mutt_save_attachment (FILE * fp, BODY * m, char *path, int flags, hn->msgno = hdr->msgno; /* required for MH/maildir */ hn->read = 1; - fseek (fp, m->offset, 0); + fseeko (fp, m->offset, 0); if (fgets (buf, sizeof (buf), fp) == NULL) return -1; if (mx_open_mailbox (path, M_APPEND | M_QUIET, &ctx) == NULL) @@ -759,7 +759,7 @@ int mutt_save_attachment (FILE * fp, BODY * m, char *path, int flags, mutt_perror ("fopen"); return (-1); } - fseek ((s.fpin = fp), m->offset, 0); + fseeko ((s.fpin = fp), m->offset, 0); mutt_decode_attachment (m, &s); if (fclose (s.fpout) != 0) { diff --git a/buffy.c b/buffy.c index a929fe6..28f88ac 100644 --- a/buffy.c +++ b/buffy.c @@ -52,16 +52,16 @@ static short BuffyNotify = 0; /* # of unnotified new boxes */ /* Find the last message in the file. * upon success return 0. If no message found - return -1 */ -static int fseek_last_message (FILE * f) +static int fseeko_last_message (FILE * f) { - long int pos; + LOFF_T pos; char buffer[BUFSIZ + 9]; /* 7 for "\n\nFrom " */ int bytes_read; int i; /* Index into `buffer' for scanning. */ memset (buffer, 0, sizeof (buffer)); - fseek (f, 0, SEEK_END); - pos = ftell (f); + fseeko (f, 0, SEEK_END); + pos = ftello (f); /* Set `bytes_read' to the size of the last, probably partial, buffer; 0 < * `bytes_read' <= `BUFSIZ'. */ @@ -73,13 +73,13 @@ static int fseek_last_message (FILE * f) while ((pos -= bytes_read) >= 0) { /* we save in the buffer at the end the first 7 chars from the last read */ strncpy (buffer + BUFSIZ, buffer, 5 + 2); /* 2 == 2 * str_len(CRLF) */ - fseek (f, pos, SEEK_SET); + fseeko (f, pos, SEEK_SET); bytes_read = fread (buffer, sizeof (char), bytes_read, f); if (bytes_read == -1) return -1; for (i = bytes_read; --i >= 0;) if (!str_ncmp (buffer + i, "\n\nFrom ", str_len ("\n\nFrom "))) { /* found it - go to the beginning of the From */ - fseek (f, pos + i + 2, SEEK_SET); + fseeko (f, pos + i + 2, SEEK_SET); return 0; } bytes_read = BUFSIZ; @@ -87,7 +87,7 @@ static int fseek_last_message (FILE * f) /* here we are at the beginning of the file */ if (!str_ncmp ("From ", buffer, 5)) { - fseek (f, 0, 0); + fseeko (f, 0, 0); return (0); } @@ -101,7 +101,7 @@ static int test_last_status_new (FILE * f) ENVELOPE *tmp_envelope; int result = 0; - if (fseek_last_message (f) == -1) + if (fseeko_last_message (f) == -1) return (0); hdr = mutt_new_header (); diff --git a/copy.c b/copy.c index 4368f02..7dbbb97 100644 --- a/copy.c +++ b/copy.c @@ -38,9 +38,8 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, * below is to avoid creating a HEADER structure in message_handler(). */ int -mutt_copy_hdr (FILE * in, FILE * out, long off_start, long off_end, int flags, - const char *prefix) -{ +mutt_copy_hdr (FILE* in, FILE* out, LOFF_T off_start, LOFF_T off_end, + int flags, const char *prefix) { int from = 0; int this_is_from; int ignore = 0; @@ -54,8 +53,8 @@ mutt_copy_hdr (FILE * in, FILE * out, long off_start, long off_end, int flags, int error; int curline = 0; - if (ftell (in) != off_start) - fseek (in, off_start, 0); + if (ftello (in) != off_start) + fseeko (in, off_start, 0); buf[0] = '\n'; buf[1] = 0; @@ -66,7 +65,7 @@ mutt_copy_hdr (FILE * in, FILE * out, long off_start, long off_end, int flags, /* Without these flags to complicate things * we can do a more efficient line to line copying */ - while (ftell (in) < off_end) { + while (ftello (in) < off_end) { nl = strchr (buf, '\n'); if ((fgets (buf, sizeof (buf), in)) == NULL) @@ -130,7 +129,7 @@ mutt_copy_hdr (FILE * in, FILE * out, long off_start, long off_end, int flags, headers = mem_calloc (hdr_count, sizeof (char *)); /* Read all the headers into the array */ - while (ftell (in) < off_end) { + while (ftello (in) < off_end) { nl = strchr (buf, '\n'); /* Read a line */ @@ -236,7 +235,7 @@ mutt_copy_hdr (FILE * in, FILE * out, long off_start, long off_end, int flags, strcat (this_one, " ..."); } } - } /* while (ftell (in) < off_end) */ + } /* while (ftello (in) < off_end) */ /* Do we have anything pending? -- XXX, same code as in above in the loop. */ if (this_one) { @@ -473,7 +472,7 @@ static int count_delete_lines (FILE * fp, BODY * b, LOFF_T *length, int ch; if (b->deleted) { - fseek (fp, b->offset, SEEK_SET); + fseeko (fp, b->offset, SEEK_SET); for (l = b->length; l; l--) { ch = getc (fp); if (ch == EOF) @@ -542,7 +541,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, date[5] = date[str_len (date) - 1] = '\"'; /* Count the number of lines and bytes to be deleted */ - fseek (fpin, body->offset, SEEK_SET); + fseeko (fpin, body->offset, SEEK_SET); new_lines = hdr->lines - count_delete_lines (fpin, body, &new_length, str_len (date)); @@ -560,7 +559,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, new_offset = ftello (fpout); /* Copy the body */ - fseek (fpin, body->offset, SEEK_SET); + fseeko (fpin, body->offset, SEEK_SET); if (copy_delete_attach (body, fpin, fpout, date)) return -1; @@ -651,7 +650,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, mutt_write_mime_header (cur, fpout); fputc ('\n', fpout); - fseek (fp, cur->offset, 0); + fseeko (fp, cur->offset, 0); if (mutt_copy_bytes (fp, fpout, cur->length) == -1) { fclose (fp); mutt_free_body (&cur); @@ -661,7 +660,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, fclose (fp); } else { - fseek (fpin, body->offset, 0); + fseeko (fpin, body->offset, 0); if (flags & M_CM_PREFIX) { int c; size_t bytes = body->length; @@ -726,7 +725,7 @@ _mutt_append_message (CONTEXT * dest, FILE * fpin, CONTEXT * src, MESSAGE *msg; int r; - fseek(fpin, hdr->offset, 0); + fseeko(fpin, hdr->offset, 0); if (fgets (buf, sizeof (buf), fpin) == NULL) return (-1); if ((msg = mx_open_new_message (dest, hdr, is_from (buf, NULL, 0, NULL) ? 0 : M_ADD_FROM)) == NULL) @@ -773,7 +772,7 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, for (part = b->parts; part; part = part->next) { if (part->deleted || part->parts) { /* Copy till start of this part */ - if (mutt_copy_bytes (fpin, fpout, part->hdr_offset - ftell (fpin))) + if (mutt_copy_bytes (fpin, fpout, part->hdr_offset - ftello (fpin))) return -1; if (part->deleted) { @@ -785,11 +784,11 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, return -1; /* Copy the original mime headers */ - if (mutt_copy_bytes (fpin, fpout, part->offset - ftell (fpin))) + if (mutt_copy_bytes (fpin, fpout, part->offset - ftello (fpin))) return -1; /* Skip the deleted body */ - fseek (fpin, part->offset + part->length, SEEK_SET); + fseeko (fpin, part->offset + part->length, SEEK_SET); } else { if (copy_delete_attach (part, fpin, fpout, date)) @@ -799,7 +798,7 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, } /* Copy the last parts */ - if (mutt_copy_bytes (fpin, fpout, b->offset + b->length - ftell (fpin))) + if (mutt_copy_bytes (fpin, fpout, b->offset + b->length - ftello (fpin))) return -1; return 0; diff --git a/copy.h b/copy.h index fd08b75..e997b05 100644 --- a/copy.h +++ b/copy.h @@ -44,7 +44,7 @@ #define M_CM_DECODE_CRYPT (M_CM_DECODE_PGP | M_CM_DECODE_SMIME) #define M_CM_VERIFY (1<<11) /* do signature verification */ -int mutt_copy_hdr (FILE *, FILE *, long, long, int, const char *); +int mutt_copy_hdr (FILE *, FILE *, LOFF_T, LOFF_T, int, const char *); int mutt_copy_header (FILE *, HEADER *, FILE *, int, const char *); int _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, int flags, int chflags); diff --git a/crypt-gpgme.c b/crypt-gpgme.c index 23604e8..e16bffa 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -1535,7 +1535,7 @@ int smime_gpgme_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, saved_b_length = b->length; memset (&s, 0, sizeof (s)); s.fpin = fpin; - fseek (s.fpin, b->offset, 0); + fseeko (s.fpin, b->offset, 0); mutt_mktemp (tempfile); if (!(tmpfp = safe_fopen (tempfile, "w+"))) { mutt_perror (tempfile); @@ -1546,7 +1546,7 @@ int smime_gpgme_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, s.fpout = tmpfp; mutt_decode_attachment (b, &s); fflush (tmpfp); - b->length = ftell (s.fpout); + b->length = ftello (s.fpout); b->offset = 0; rewind (tmpfp); @@ -1587,7 +1587,7 @@ int smime_gpgme_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, saved_b_length = bb->length; memset (&s, 0, sizeof (s)); s.fpin = *fpout; - fseek (s.fpin, bb->offset, 0); + fseeko (s.fpin, bb->offset, 0); mutt_mktemp (tempfile); if (!(tmpfp = safe_fopen (tempfile, "w+"))) { mutt_perror (tempfile); @@ -1598,7 +1598,7 @@ int smime_gpgme_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, s.fpout = tmpfp; mutt_decode_attachment (bb, &s); fflush (tmpfp); - bb->length = ftell (s.fpout); + bb->length = ftello (s.fpout); bb->offset = 0; rewind (tmpfp); fclose (*fpout); @@ -1771,7 +1771,8 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s) int needpass = -1, pgp_keyblock = 0; int clearsign = 0; long start_pos = 0; - long bytes, last_pos, offset; + long bytes; + LOFF_T last_pos, offset; char buf[HUGE_STRING]; FILE *pgpout = NULL; @@ -1791,14 +1792,14 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s) if (!mutt_get_body_charset (body_charset, sizeof (body_charset), m)) strfcpy (body_charset, "iso-8859-1", sizeof body_charset); - fseek (s->fpin, m->offset, 0); + fseeko (s->fpin, m->offset, 0); last_pos = m->offset; for (bytes = m->length; bytes > 0;) { if (fgets (buf, sizeof (buf), s->fpin) == NULL) break; - offset = ftell (s->fpin); + offset = ftello (s->fpin); bytes -= (offset - last_pos); /* don't rely on str_len(buf) */ last_pos = offset; @@ -1831,7 +1832,7 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s) armored_data = create_gpgme_data (); gpgme_data_write (armored_data, buf, str_len (buf)); while (bytes > 0 && fgets (buf, sizeof (buf) - 1, s->fpin) != NULL) { - offset = ftell (s->fpin); + offset = ftello (s->fpin); bytes -= (offset - last_pos); /* don't rely on str_len(buf) */ last_pos = offset; diff --git a/crypt.c b/crypt.c index 402a497..eac7a85 100644 --- a/crypt.c +++ b/crypt.c @@ -487,7 +487,7 @@ int crypt_write_signed (BODY * a, STATE * s, const char *tempfile) return -1; } - fseek (s->fpin, a->hdr_offset, 0); + fseeko (s->fpin, a->hdr_offset, 0); bytes = a->length + a->offset - a->hdr_offset; hadcr = 0; while (bytes > 0) { diff --git a/edit.c b/edit.c index d9a667a..cb9ff23 100644 --- a/edit.c +++ b/edit.c @@ -56,7 +56,7 @@ static char *EditorHelp = N_("\ . on a line by itself ends input\n"); static char **be_snarf_data (FILE * f, char **buf, int *bufmax, int *buflen, - int offset, int bytes, int prefix) + LOFF_T offset, int bytes, int prefix) { char tmp[HUGE_STRING]; char *p = tmp; @@ -70,7 +70,7 @@ static char **be_snarf_data (FILE * f, char **buf, int *bufmax, int *buflen, tmplen = sizeof (tmp) - tmplen; } - fseek (f, offset, 0); + fseeko (f, offset, 0); while (bytes > 0) { if (fgets (p, tmplen - 1, f) == NULL) break; diff --git a/handler.c b/handler.c index 6d4857b..9c379dc 100644 --- a/handler.c +++ b/handler.c @@ -912,7 +912,7 @@ static int alternative_handler (BODY * a, STATE * s) if (choice) { if (s->flags & M_DISPLAY && !option (OPTWEED)) { - fseek (s->fpin, choice->hdr_offset, 0); + fseeko (s->fpin, choice->hdr_offset, 0); mutt_copy_bytes (s->fpin, s->fpout, choice->offset - choice->hdr_offset); } @@ -936,10 +936,10 @@ static int message_handler (BODY * a, STATE * s) { struct stat st; BODY *b; - long off_start; + LOFF_T off_start; int rc = 0; - off_start = ftell (s->fpin); + off_start = ftello (s->fpin); if (a->encoding == ENCBASE64 || a->encoding == ENCQUOTEDPRINTABLE || a->encoding == ENCUUENCODED) { fstat (fileno (s->fpin), &st); @@ -1049,7 +1049,7 @@ static int multipart_handler (BODY * a, STATE * s) state_printf (s, _("[-- Type: %s/%s, Encoding: %s, Size: %s --]\n"), TYPE (p), p->subtype, ENCODING (p->encoding), length); if (!option (OPTWEED)) { - fseek (s->fpin, p->hdr_offset, 0); + fseeko (s->fpin, p->hdr_offset, 0); mutt_copy_bytes (s->fpin, s->fpout, p->offset - p->hdr_offset); } else @@ -1242,7 +1242,7 @@ static int external_body_handler (BODY * b, STATE * s) state_printf (s, _("[-- name: %s --]\n"), b->parts->filename); } - mutt_copy_hdr (s->fpin, s->fpout, ftell (s->fpin), b->parts->offset, + mutt_copy_hdr (s->fpin, s->fpout, ftello (s->fpin), b->parts->offset, (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL); } @@ -1255,7 +1255,7 @@ static int external_body_handler (BODY * b, STATE * s) state_attach_puts (_("[-- and the indicated external source has --]\n" "[-- expired. --]\n"), s); - mutt_copy_hdr (s->fpin, s->fpout, ftell (s->fpin), b->parts->offset, + mutt_copy_hdr (s->fpin, s->fpout, ftello (s->fpin), b->parts->offset, (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL); } @@ -1271,7 +1271,7 @@ static int external_body_handler (BODY * b, STATE * s) _ ("[-- and the indicated access-type %s is unsupported --]\n"), access_type); - mutt_copy_hdr (s->fpin, s->fpout, ftell (s->fpin), b->parts->offset, + mutt_copy_hdr (s->fpin, s->fpout, ftello (s->fpin), b->parts->offset, (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE, NULL); } @@ -1301,7 +1301,7 @@ void mutt_decode_attachment (BODY * b, STATE * s) } } - fseek (s->fpin, b->offset, 0); + fseeko (s->fpin, b->offset, 0); switch (b->encoding) { case ENCQUOTEDPRINTABLE: mutt_decode_quoted (s, b->length, istext, cd); @@ -1412,7 +1412,7 @@ int mutt_body_handler (BODY * b, STATE * s) if (plaintext || handler) { - fseek (s->fpin, b->offset, 0); + fseeko (s->fpin, b->offset, 0); /* see if we need to decode this part before processing it */ if (b->encoding == ENCBASE64 || b->encoding == ENCQUOTEDPRINTABLE || b->encoding == ENCUUENCODED || plaintext || mutt_is_text_part (b)) { /* text subtypes may @@ -1452,7 +1452,7 @@ int mutt_body_handler (BODY * b, STATE * s) mutt_decode_attachment (b, s); if (decode) { - b->length = ftell (s->fpout); + b->length = ftello (s->fpout); b->offset = 0; fclose (s->fpout); diff --git a/hcache.c b/hcache.c index 237e6f0..7a7c2ee 100644 --- a/hcache.c +++ b/hcache.c @@ -14,7 +14,7 @@ #ifdef USE_HCACHE -#define MUTTNG_HCACHE_ID "0x002" +#define MUTTNG_HCACHE_ID "0x003" # if HAVE_INTTYPES_H # include diff --git a/imap/imap.c b/imap/imap.c index 6ad04df..022415f 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1441,7 +1441,7 @@ int imap_subscribe (char *path, int subscribe) BUFFER err, token; IMAP_MBOX mx; - if (mx_get_magic (path) != M_IMAP || imap_parse_path (path, &mx) < 0) { + if (mx_get_magic (path) == M_IMAP || imap_parse_path (path, &mx)) { mutt_error (_("Bad mailbox name")); return -1; } diff --git a/imap/message.c b/imap/message.c index 58fe61f..64bf434 100644 --- a/imap/message.c +++ b/imap/message.c @@ -463,7 +463,7 @@ int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) fgets (buf, sizeof (buf), msg->fp); } - h->content->length = ftell (msg->fp) - h->content->offset; + h->content->length = ftello (msg->fp) - h->content->offset; /* This needs to be done in case this is a multipart message */ #if defined(HAVE_PGP) || defined(HAVE_SMIME) diff --git a/mbox.c b/mbox.c index 15d58f7..ebbd9ae 100644 --- a/mbox.c +++ b/mbox.c @@ -42,10 +42,10 @@ /* struct used by mutt_sync_mailbox() to store new offsets */ struct m_update_t { short valid; - long hdr; - long body; + LOFF_T hdr; + LOFF_T body; long lines; - long length; + LOFF_T length; }; @@ -312,8 +312,8 @@ static int mbox_parse_mailbox (CONTEXT * ctx) if (fseeko (ctx->fp, tmploc, SEEK_SET) != 0 || fgets (buf, sizeof (buf), ctx->fp) == NULL || str_ncmp ("From ", buf, 5) != 0) { - debug_print (1, ("bad content-length in message %d (cl=%ld)\n", - curhdr->index, curhdr->content->length)); + debug_print (1, ("bad content-length in message %d (cl=" + OFF_T_FMT ")\n", curhdr->index, curhdr->content->length)); debug_print (1, ("LINE: %s\n", buf)); if (fseeko (ctx->fp, loc, SEEK_SET) != 0) { /* nope, return the previous position */ debug_print (1, ("fseeko() failed\n")); diff --git a/mutt.h b/mutt.h index 44dcd9b..a385f27 100644 --- a/mutt.h +++ b/mutt.h @@ -605,12 +605,12 @@ typedef struct body { PARAMETER *parameter; /* parameters of the content-type */ char *description; /* content-description */ char *form_name; /* Content-Disposition form-data name param */ - long hdr_offset; /* offset in stream where the headers begin. + LOFF_T hdr_offset; /* offset in stream where the headers begin. * this info is used when invoking metamail, * where we need to send the headers of the * attachment */ - long offset; /* offset where the actual data begins */ + LOFF_T offset; /* offset where the actual data begins */ LOFF_T length; /* length (in bytes) of attachment */ char *filename; /* when sending a message, this is the file * to which this structure refers @@ -725,7 +725,7 @@ typedef struct header { time_t date_sent; /* time when the message was sent (UTC) */ time_t received; /* time when the message was placed in the mailbox */ - long offset; /* where in the stream does this message begin? */ + LOFF_T offset; /* where in the stream does this message begin? */ int lines; /* how many lines in the body of this message? */ int index; /* the absolute (unsorted) message number */ int msgno; /* number displayed to the user */ diff --git a/mx.c b/mx.c index a01dde8..28eb914 100644 --- a/mx.c +++ b/mx.c @@ -487,7 +487,7 @@ static int mx_open_mailbox_append (CONTEXT * ctx, int flags) } return (-1); } - fseek (ctx->fp, 0, 2); + fseeko (ctx->fp, 0, 2); break; case M_MH: diff --git a/nntp/nntp.c b/nntp/nntp.c index c597f6c..d0fae27 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -981,8 +981,8 @@ int nntp_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) ctx->hdrs[msgno]->env = mutt_read_rfc822_header (msg->fp, ctx->hdrs[msgno], 0, 0); /* fix content length */ - fseek (msg->fp, 0, SEEK_END); - ctx->hdrs[msgno]->content->length = ftell (msg->fp) - + fseeko (msg->fp, 0, SEEK_END); + ctx->hdrs[msgno]->content->length = ftello (msg->fp) - ctx->hdrs[msgno]->content->offset; /* this is called in mutt before the open which fetches the message, diff --git a/pager.c b/pager.c index 9eb3547..25396d7 100644 --- a/pager.c +++ b/pager.c @@ -105,7 +105,7 @@ struct syntax_t { }; struct line_t { - long offset; + LOFF_T offset; short type; short continuation; short chunks; @@ -908,7 +908,7 @@ static int trim_incomplete_mbyte(unsigned char *buf, size_t len) { } static int -fill_buffer (FILE * f, long *last_pos, long offset, unsigned char *buf, +fill_buffer (FILE * f, LOFF_T *last_pos, LOFF_T offset, unsigned char *buf, unsigned char *fmt, size_t blen, int *buf_ready) { unsigned char *p; @@ -917,12 +917,12 @@ fill_buffer (FILE * f, long *last_pos, long offset, unsigned char *buf, if (*buf_ready == 0) { buf[blen - 1] = 0; if (offset != *last_pos) - fseek (f, offset, 0); + fseeko (f, offset, 0); if (fgets ((char *) buf, blen - 1, f) == NULL) { fmt[0] = 0; return (-1); } - *last_pos = ftell (f); + *last_pos = ftello (f); b_read = (int) (*last_pos - offset); *buf_ready = 1; @@ -1130,7 +1130,7 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf, */ static int -display_line (FILE * f, long *last_pos, struct line_t **lineInfo, int n, +display_line (FILE * f, LOFF_T *last_pos, struct line_t **lineInfo, int n, int *last, int *max, int flags, struct q_class_t **QuoteList, int *q_level, int *force_redraw, regex_t * SearchRE) { @@ -1423,7 +1423,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) int r = -1; int redraw = REDRAW_FULL; FILE *fp = NULL; - long last_pos = 0, last_offset = 0; + LOFF_T last_pos = 0, last_offset = 0; int old_smart_wrap, old_markers; struct stat sb; regex_t SearchRE; diff --git a/parse.c b/parse.c index 036a183..7eebd2f 100644 --- a/parse.c +++ b/parse.c @@ -423,7 +423,7 @@ BODY *mutt_read_mime_header (FILE * fp, int digest) char *line = mem_malloc (LONG_STRING); size_t linelen = LONG_STRING; - p->hdr_offset = ftell (fp); + p->hdr_offset = ftello (fp); p->encoding = ENC7BIT; /* default from RFC1521 */ p->type = digest ? TYPEMESSAGE : TYPETEXT; @@ -472,7 +472,7 @@ BODY *mutt_read_mime_header (FILE * fp, int digest) } #endif } - p->offset = ftell (fp); /* Mark the start of the real data */ + p->offset = ftello (fp); /* Mark the start of the real data */ if (p->type == TYPETEXT && !p->subtype) p->subtype = str_dup ("plain"); else if (p->type == TYPEMESSAGE && !p->subtype) @@ -496,7 +496,7 @@ void mutt_parse_part (FILE * fp, BODY * b) #endif bound = mutt_get_parameter ("boundary", b->parameter); - fseek (fp, b->offset, SEEK_SET); + fseeko (fp, b->offset, SEEK_SET); b->parts = mutt_parse_multipart (fp, bound, b->offset + b->length, ascii_strcasecmp ("digest", @@ -505,7 +505,7 @@ void mutt_parse_part (FILE * fp, BODY * b) case TYPEMESSAGE: if (b->subtype) { - fseek (fp, b->offset, SEEK_SET); + fseeko (fp, b->offset, SEEK_SET); if (mutt_is_message_type (b->type, b->subtype)) b->parts = mutt_parse_messageRFC822 (fp, b); else if (ascii_strcasecmp (b->subtype, "external-body") == 0) @@ -542,7 +542,7 @@ BODY *mutt_parse_messageRFC822 (FILE * fp, BODY * parent) BODY *msg; parent->hdr = mutt_new_header (); - parent->hdr->offset = ftell (fp); + parent->hdr->offset = ftello (fp); parent->hdr->env = mutt_read_rfc822_header (fp, parent->hdr, 0, 0); msg = parent->hdr->content; @@ -572,7 +572,7 @@ BODY *mutt_parse_messageRFC822 (FILE * fp, BODY * parent) * digest 1 if reading a multipart/digest, 0 otherwise */ -BODY *mutt_parse_multipart (FILE * fp, const char *boundary, long end_off, +BODY *mutt_parse_multipart (FILE * fp, const char *boundary, LOFF_T end_off, int digest) { #ifdef SUN_ATTACHMENT @@ -591,7 +591,7 @@ BODY *mutt_parse_multipart (FILE * fp, const char *boundary, long end_off, } blen = str_len (boundary); - while (ftell (fp) < end_off && fgets (buffer, LONG_STRING, fp) != NULL) { + while (ftello (fp) < end_off && fgets (buffer, LONG_STRING, fp) != NULL) { len = str_len (buffer); crlf = (len > 1 && buffer[len - 2] == '\r') ? 1 : 0; @@ -599,10 +599,10 @@ BODY *mutt_parse_multipart (FILE * fp, const char *boundary, long end_off, if (buffer[0] == '-' && buffer[1] == '-' && str_ncmp (buffer + 2, boundary, blen) == 0) { if (last) { - last->length = ftell (fp) - last->offset - len - 1 - crlf; + last->length = ftello (fp) - last->offset - len - 1 - crlf; if (last->parts && last->parts->length == 0) last->parts->length = - ftell (fp) - last->parts->offset - len - 1 - crlf; + ftello (fp) - last->parts->offset - len - 1 - crlf; /* if the body is empty, we can end up with a -1 length */ if (last->length < 0) last->length = 0; @@ -625,7 +625,7 @@ BODY *mutt_parse_multipart (FILE * fp, const char *boundary, long end_off, for (lines = atoi (mutt_get_parameter ("content-lines", new->parameter)); lines; lines--) - if (ftell (fp) >= end_off + if (ftello (fp) >= end_off || fgets (buffer, LONG_STRING, fp) == NULL) break; } @@ -1307,7 +1307,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE * f, HEADER * hdr, short user_hdrs, LIST *last = NULL; char *line = mem_malloc (LONG_STRING); char *p; - long loc; + LOFF_T loc; int matched; size_t linelen = LONG_STRING; char buf[LONG_STRING + 1]; @@ -1327,7 +1327,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE * f, HEADER * hdr, short user_hdrs, } } - while ((loc = ftell (f)), + while ((loc = ftello (f)), *(line = mutt_read_rfc822_line (f, line, &linelen)) != 0) { matched = 0; @@ -1345,7 +1345,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE * f, HEADER * hdr, short user_hdrs, continue; } - fseek (f, loc, 0); + fseeko (f, loc, 0); break; /* end of header */ } @@ -1400,7 +1400,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE * f, HEADER * hdr, short user_hdrs, if (hdr) { hdr->content->hdr_offset = hdr->offset; - hdr->content->offset = ftell (f); + hdr->content->offset = ftello (f); rfc2047_decode_envelope (e); /* check for missing or invalid date */ if (hdr->date_sent <= 0) { diff --git a/pattern.c b/pattern.c index 7f5fd51..dec82b5 100644 --- a/pattern.c +++ b/pattern.c @@ -187,13 +187,13 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) return (0); } - fseek (msg->fp, h->offset, 0); + fseeko (msg->fp, h->offset, 0); mutt_body_handler (h->content, &s); } fp = s.fpout; fflush (fp); - fseek (fp, 0, 0); + fseeko (fp, 0, 0); fstat (fileno (fp), &st); lng = (long) st.st_size; } @@ -201,12 +201,12 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) /* raw header / body */ fp = msg->fp; if (pat->op != M_BODY) { - fseek (fp, h->offset, 0); + fseeko (fp, h->offset, 0); lng = h->content->offset - h->offset; } if (pat->op != M_HEADER) { if (pat->op == M_BODY) - fseek (fp, h->content->offset, 0); + fseeko (fp, h->content->offset, 0); lng += h->content->length; } } diff --git a/pgp.c b/pgp.c index 3ed7d87..4b586e9 100644 --- a/pgp.c +++ b/pgp.c @@ -237,7 +237,8 @@ int pgp_application_pgp_handler (BODY * m, STATE * s) int c = 1; int clearsign = 0, rv, rc; long start_pos = 0; - long bytes, last_pos, offset; + long bytes; + LOFF_T last_pos, offset; char buf[HUGE_STRING]; char outfile[_POSIX_PATH_MAX]; char tmpfname[_POSIX_PATH_MAX]; @@ -254,14 +255,14 @@ int pgp_application_pgp_handler (BODY * m, STATE * s) rc = 0; /* silence false compiler warning if (s->flags & M_DISPLAY) */ - fseek (s->fpin, m->offset, 0); + fseeko (s->fpin, m->offset, 0); last_pos = m->offset; for (bytes = m->length; bytes > 0;) { if (fgets (buf, sizeof (buf), s->fpin) == NULL) break; - offset = ftell (s->fpin); + offset = ftello (s->fpin); bytes -= (offset - last_pos); /* don't rely on str_len(buf) */ last_pos = offset; @@ -299,7 +300,7 @@ int pgp_application_pgp_handler (BODY * m, STATE * s) fputs (buf, tmpfp); while (bytes > 0 && fgets (buf, sizeof (buf) - 1, s->fpin) != NULL) { - offset = ftell (s->fpin); + offset = ftello (s->fpin); bytes -= (offset - last_pos); /* don't rely on str_len(buf) */ last_pos = offset; @@ -564,7 +565,7 @@ int pgp_verify_one (BODY * sigbdy, STATE * s, const char *tempfile) return -1; } - fseek (s->fpin, sigbdy->offset, 0); + fseeko (s->fpin, sigbdy->offset, 0); mutt_copy_bytes (s->fpin, fp, sigbdy->length); fclose (fp); @@ -746,7 +747,7 @@ BODY *pgp_decrypt_part (BODY * a, STATE * s, FILE * fpout, BODY * p) * the temporary file. */ - fseek (s->fpin, a->offset, 0); + fseeko (s->fpin, a->offset, 0); mutt_copy_bytes (s->fpin, pgptmp, a->length); fclose (pgptmp); diff --git a/pgpmicalg.c b/pgpmicalg.c index 0caba38..db7056a 100644 --- a/pgpmicalg.c +++ b/pgpmicalg.c @@ -59,8 +59,8 @@ static const char *pgp_hash_to_micalg (short id) static void pgp_dearmor (FILE * in, FILE * out) { char line[HUGE_STRING]; - long start; - long end; + LOFF_T start; + LOFF_T end; char *r; STATE state; @@ -93,7 +93,7 @@ static void pgp_dearmor (FILE * in, FILE * out) } /* actual data starts here */ - start = ftell (in); + start = ftello (in); /* find the checksum */ @@ -106,12 +106,12 @@ static void pgp_dearmor (FILE * in, FILE * out) return; } - if ((end = ftell (in) - str_len (line)) < start) { + if ((end = ftello (in) - str_len (line)) < start) { debug_print (1, ("end < start???\n")); return; } - if (fseek (in, start, SEEK_SET) == -1) { + if (fseeko (in, start, SEEK_SET) == -1) { debug_print (1, ("Can't seekto start.\n")); return; } diff --git a/pgppacket.c b/pgppacket.c index 206f13c..f43f516 100644 --- a/pgppacket.c +++ b/pgppacket.c @@ -57,12 +57,12 @@ static int read_material (size_t material, size_t * used, FILE * fp) unsigned char *pgp_read_packet (FILE * fp, size_t * len) { size_t used = 0; - long startpos; + LOFF_T startpos; unsigned char ctb; unsigned char b; size_t material; - startpos = ftell (fp); + startpos = ftello (fp); if (!plen) { plen = CHUNKSIZE; @@ -193,7 +193,7 @@ unsigned char *pgp_read_packet (FILE * fp, size_t * len) bail: - fseek (fp, startpos, SEEK_SET); + fseeko (fp, startpos, SEEK_SET); return NULL; } diff --git a/pgppubring.c b/pgppubring.c index 159a9d5..5d97aa6 100644 --- a/pgppubring.c +++ b/pgppubring.c @@ -56,8 +56,8 @@ short Umask; /* dirty hack because we need Umask in lib.c but #define FGETPOS(fp,pos) fgetpos((fp),&(pos)) #define FSETPOS(fp,pos) fsetpos((fp),&(pos)) #else -#define FGETPOS(fp,pos) pos=ftell((fp)); -#define FSETPOS(fp,pos) fseek((fp),(pos),SEEK_SET) +#define FGETPOS(fp,pos) pos=ftello((fp)); +#define FSETPOS(fp,pos) fseeko((fp),(pos),SEEK_SET) #endif @@ -579,7 +579,7 @@ static pgp_key_t pgp_parse_keyblock (FILE * fp) #ifdef HAVE_FGETPOS fpos_t pos; #else - long pos; + LOFF_T pos; #endif pgp_key_t root = NULL; @@ -730,7 +730,7 @@ static void pgpring_find_candidates (char *ringfile, const char *hints[], #ifdef HAVE_FGETPOS fpos_t pos, keypos; #else - long pos, keypos; + LOFF_T pos, keypos; #endif unsigned char *buff = NULL; diff --git a/pop/pop.c b/pop/pop.c index 804fec2..34d1cc7 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -417,7 +417,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) fgets (buf, sizeof (buf), msg->fp); } - h->content->length = ftell (msg->fp) - h->content->offset; + h->content->length = ftello (msg->fp) - h->content->offset; /* This needs to be done in case this is a multipart message */ if (!WithCrypto) diff --git a/postpone.c b/postpone.c index ddd3fd5..a197f12 100644 --- a/postpone.c +++ b/postpone.c @@ -522,7 +522,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr, /* parse the message header and MIME structure */ - fseek (fp, hdr->offset, 0); + fseeko (fp, hdr->offset, 0); newhdr->offset = hdr->offset; newhdr->env = mutt_read_rfc822_header (fp, newhdr, 1, weed); newhdr->content->length = hdr->content->length; diff --git a/protos.h b/protos.h index 8c3df7e..029659b 100644 --- a/protos.h +++ b/protos.h @@ -61,7 +61,7 @@ BODY *mutt_make_message_attach (CONTEXT *, HEADER *, int); BODY *mutt_remove_multipart (BODY *); BODY *mutt_make_multipart (BODY *); BODY *mutt_new_body (void); -BODY *mutt_parse_multipart (FILE *, const char *, long, int); +BODY *mutt_parse_multipart (FILE *, const char *, LOFF_T, int); BODY *mutt_parse_messageRFC822 (FILE *, BODY *); BODY *mutt_read_mime_header (FILE *, int); @@ -388,7 +388,7 @@ extern int system (); extern int puts (); extern int fputs (); extern int fputc (); -extern int fseek (); +extern int fseeko (); extern char *strchr (); extern int getopt (); extern int fputs (); diff --git a/send.c b/send.c index bea5faa..c3bc525 100644 --- a/send.c +++ b/send.c @@ -1076,7 +1076,7 @@ static void fix_end_of_file (const char *data) if ((fp = safe_fopen (data, "a+")) == NULL) return; - fseek (fp, -1, SEEK_END); + fseeko (fp, -1, SEEK_END); if ((c = fgetc (fp)) != '\n') fputc ('\n', fp); safe_fclose (&fp); diff --git a/sendlib.c b/sendlib.c index ca3e390..9af8f81 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1004,7 +1004,7 @@ void mutt_message_to_7bit (BODY * a, FILE * fp) goto cleanup; } - fseek (fpin, a->offset, 0); + fseeko (fpin, a->offset, 0); a->parts = mutt_parse_messageRFC822 (fpin, a); transform_to_7bit (a->parts, fpin); @@ -2254,7 +2254,7 @@ static int _mutt_bounce_message (FILE * fp, HEADER * h, ADDRESS * to, if (!option (OPTBOUNCEDELIVERED)) ch_flags |= CH_WEED_DELIVERED; - fseek (fp, h->offset, 0); + fseeko (fp, h->offset, 0); fprintf (f, "Resent-From: %s", resent_from); fprintf (f, "\nResent-%s", mutt_make_date (date, sizeof (date))); if (MsgIdFormat && *MsgIdFormat) @@ -2479,9 +2479,9 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, * this will happen, and it can cause problems parsing the mailbox * later. */ - fseek (tempfp, -1, 2); + fseeko (tempfp, -1, 2); if (fgetc (tempfp) != '\n') { - fseek (tempfp, 0, 2); + fseeko (tempfp, 0, 2); fputc ('\n', tempfp); } @@ -2500,7 +2500,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, rewind (tempfp); while (fgets (sasha, sizeof (sasha), tempfp) != NULL) lines++; - fprintf (msg->fp, "Content-Length: " OFF_T_FMT "\n", (off_t) ftell (tempfp)); + fprintf (msg->fp, "Content-Length: " OFF_T_FMT "\n", ftello (tempfp)); fprintf (msg->fp, "Lines: %d\n\n", lines); /* copy the body and clean up */ diff --git a/smime.c b/smime.c index ae7a995..803e717 100644 --- a/smime.c +++ b/smime.c @@ -1523,7 +1523,7 @@ int smime_verify_one (BODY * sigbdy, STATE * s, const char *tempfile) mutt_decode_attachment (sigbdy, s); - sigbdy->length = ftell (s->fpout); + sigbdy->length = ftello (s->fpout); sigbdy->offset = 0; fclose (s->fpout); @@ -1646,7 +1646,7 @@ static BODY *smime_handle_entity (BODY * m, STATE * s, FILE * outFile) return NULL; } - fseek (s->fpin, m->offset, 0); + fseeko (s->fpin, m->offset, 0); last_pos = m->offset; mutt_copy_bytes (s->fpin, tmpfp, m->length); @@ -1815,7 +1815,7 @@ int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur) memset (&s, 0, sizeof (s)); s.fpin = fpin; - fseek (s.fpin, b->offset, 0); + fseeko (s.fpin, b->offset, 0); mutt_mktemp (tempfile); if ((tmpfp = safe_fopen (tempfile, "w+")) == NULL) { @@ -1827,7 +1827,7 @@ int smime_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur) s.fpout = tmpfp; mutt_decode_attachment (b, &s); fflush (tmpfp); - b->length = ftell (s.fpout); + b->length = ftello (s.fpout); b->offset = 0; rewind (tmpfp); s.fpin = tmpfp; @@ -1883,37 +1883,65 @@ int smime_send_menu (HEADER * msg, int *redraw) break; case 3: /* encrypt (w)ith */ - msg->security |= ENCRYPT; - switch (mutt_multi_choice (_("1: DES, 2: Triple-DES, 3: RC2-40," - " 4: RC2-64, 5: RC2-128, 6: AES128," - " 7: AES192, 8: AES256, or (f)orget it? "), - _("12345678f"))) { - case 1: - str_replace (&SmimeCryptAlg, "des"); - break; - case 2: - str_replace (&SmimeCryptAlg, "des3"); - break; - case 3: - str_replace (&SmimeCryptAlg, "rc2-40"); - break; - case 4: - str_replace (&SmimeCryptAlg, "rc2-64"); - break; - case 5: - str_replace (&SmimeCryptAlg, "rc2-128"); - break; - case 6: - str_replace (&SmimeCryptAlg, "aes128"); - break; - case 7: - str_replace (&SmimeCryptAlg, "aes192"); - break; - case 8: - str_replace (&SmimeCryptAlg, "aes256"); - break; - case 9: /* forget it */ - break; + { + int choice = 0; + msg->security |= ENCRYPT; + + do { + /* I use "dra" because "123" is recognized anyway */ + switch (mutt_multi_choice (_("Choose algorithm family:" + " 1: DES, 2: RC2, 3: AES," + " or (c)lear? "), _("drac"))) { + case 1: + switch (choice = mutt_multi_choice (_("1: DES, 2: Triple-DES "), + _("dt"))) { + case 1: + str_replace (&SmimeCryptAlg, "des"); + break; + case 2: + str_replace (&SmimeCryptAlg, "des3"); + break; + } + break; + + case 2: + switch (choice = mutt_multi_choice (_("1: RC2-40, 2: RC2-64, 3: RC2-128 "), + _("468"))) { + case 1: + str_replace (&SmimeCryptAlg, "rc2-40"); + break; + case 2: + str_replace (&SmimeCryptAlg, "rc2-64"); + break; + case 3: + str_replace (&SmimeCryptAlg, "rc2-128"); + break; + } + break; + + case 3: + switch (choice = mutt_multi_choice (_("1: AES128, 2: AES192, 3: AES256 "), + _("895"))) { + case 1: + str_replace (&SmimeCryptAlg, "aes128"); + break; + case 2: + str_replace (&SmimeCryptAlg, "aes192"); + break; + case 3: + str_replace (&SmimeCryptAlg, "aes256"); + break; + } + break; + + case 4: /* (c)lear */ + mem_free (&SmimeCryptAlg); + /* fallback */ + case -1: /* Ctrl-G or Enter */ + choice = 0; + break; + } + } while (choice == -1); } break; -- 2.20.1