X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpmicalg.c;h=1c322be064d206c878357b0f49dd69aa23d135c4;hp=0a45cc6a6bf4e3c430c02afcd88a2f115733f61e;hb=93b012884de4ca5e1f2550f767d0b8680b9c0e9f;hpb=ef7b80006ebb47372d69c64e8b2b2f0764333d55;ds=sidebyside diff --git a/pgpmicalg.c b/pgpmicalg.c index 0a45cc6..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 { @@ -65,7 +68,7 @@ static void pgp_dearmor (FILE * in, FILE * out) 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; }