X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpmicalg.c;h=1b6ecc914702c67fd7aa9ba66f696f4febb4900c;hp=344eba5c69ae8eac6c8f28a13a77adb0bed5a997;hb=9274cbe8e6410ddb95ddc667faa678a29da85420;hpb=a8477ebaa09990b3688164cbe5cf661c4189541d diff --git a/pgpmicalg.c b/pgpmicalg.c index 344eba5..1b6ecc9 100644 --- a/pgpmicalg.c +++ b/pgpmicalg.c @@ -16,6 +16,7 @@ #endif #include "mutt.h" +#include "handler.h" #include "pgp.h" #include "pgppacket.h" #include "mime.h" @@ -58,13 +59,13 @@ 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; + off_t start; + off_t end; char *r; STATE state; - memset (&state, 0, sizeof (STATE)); + p_clear(&state, 1); state.fpin = in; state.fpout = out; @@ -92,7 +93,7 @@ static void pgp_dearmor (FILE * in, FILE * out) } /* actual data starts here */ - start = ftell (in); + start = ftello (in); /* find the checksum */ @@ -105,12 +106,12 @@ static void pgp_dearmor (FILE * in, FILE * out) return; } - if ((end = ftell (in) - str_len (line)) < start) { + if ((end = ftello (in) - m_strlen(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; }