diff options
author | Brendan Cully <brendan@kublai.com> | 2005-10-21 04:35:37 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2005-10-21 04:35:37 +0000 |
commit | 57b2680edee942497d9752e8be5741b181493a50 (patch) | |
tree | c6761a63c9ea591556fec61486d3d5fdc096ece7 /crypt-gpgme.c | |
parent | d6fb4ea49daf00a0747cc7de75cc6289e539027e (diff) |
Full large file support. Keep a close watch on your mailboxes everyone!
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r-- | crypt-gpgme.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c index f90cb5f1..07d0039a 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -1621,7 +1621,7 @@ int smime_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur) STATE s; FILE *tmpfp=NULL; int is_signed; - long saved_b_offset; + LOFF_T saved_b_offset; size_t saved_b_length; int saved_b_type; @@ -1640,7 +1640,7 @@ int smime_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur) 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+"))) { @@ -1652,7 +1652,7 @@ int smime_gpgme_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); @@ -1694,7 +1694,7 @@ int smime_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur) 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+"))) { @@ -1706,7 +1706,7 @@ int smime_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur) 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); @@ -1887,7 +1887,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; @@ -1907,7 +1908,7 @@ 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;) @@ -1915,7 +1916,7 @@ int pgp_gpgme_application_handler (BODY *m, STATE *s) 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 mutt_strlen(buf) */ last_pos = offset; @@ -1954,7 +1955,7 @@ int pgp_gpgme_application_handler (BODY *m, STATE *s) gpgme_data_write (armored_data, buf, strlen (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 mutt_strlen(buf)*/ last_pos = offset; |