X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpmicalg.c;h=1c322be064d206c878357b0f49dd69aa23d135c4;hp=db7056a7c653ab8456965cc7a735564db6c8326b;hb=93b012884de4ca5e1f2550f767d0b8680b9c0e9f;hpb=c8ceef3ed6424dcb5a6ec835e7d8d9cc00595372 diff --git a/pgpmicalg.c b/pgpmicalg.c index db7056a..1c322be 100644 --- a/pgpmicalg.c +++ b/pgpmicalg.c @@ -19,7 +19,6 @@ #include "handler.h" #include "pgp.h" #include "pgppacket.h" -#include "mime.h" #include "charset.h" #include @@ -27,6 +26,10 @@ #include #include +#include + +#include + #include "lib/debug.h" static struct { @@ -59,13 +62,13 @@ static const char *pgp_hash_to_micalg (short id) static void pgp_dearmor (FILE * in, FILE * out) { char line[HUGE_STRING]; - LOFF_T start; - LOFF_T 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; @@ -83,7 +86,7 @@ static void pgp_dearmor (FILE * in, FILE * out) /* skip the armor header */ while ((r = fgets (line, sizeof (line), in)) != NULL) { - SKIPWS (r); + r = vskipspaces(r); if (!*r) break; } @@ -106,7 +109,7 @@ static void pgp_dearmor (FILE * in, FILE * out) return; } - if ((end = ftello (in) - str_len (line)) < start) { + if ((end = ftello (in) - m_strlen(line)) < start) { debug_print (1, ("end < start???\n")); return; }