X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpmicalg.c;h=80f7c3871e45192d8d8c0c9ae705dba992067962;hp=0fc65c0fa468a7975f3cf17a3e980a30aad3e30f;hb=814a01519c9605d479201b99eb16c97b0ad8635d;hpb=53ceb3f257ec0af78a9129a8a565e8ca2bb03903 diff --git a/pgpmicalg.c b/pgpmicalg.c index 0fc65c0..80f7c38 100644 --- a/pgpmicalg.c +++ b/pgpmicalg.c @@ -26,6 +26,8 @@ #include #include +#include "lib/debug.h" + static struct { short id; const char *name; @@ -73,8 +75,7 @@ static void pgp_dearmor (FILE * in, FILE * out) break; } if (r == NULL) { - dprint (1, - (debugfile, "pgp_dearmor: Can't find begin of ASCII armor.\n")); + debug_print (1, ("Can't find begin of ASCII armor.\n")); return; } @@ -86,7 +87,7 @@ static void pgp_dearmor (FILE * in, FILE * out) break; } if (r == NULL) { - dprint (1, (debugfile, "pgp_dearmor: Armor header doesn't end.\n")); + debug_print (1, ("Armor header doesn't end.\n")); return; } @@ -100,17 +101,17 @@ static void pgp_dearmor (FILE * in, FILE * out) break; } if (r == NULL) { - dprint (1, (debugfile, "pgp_dearmor: Can't find end of ASCII armor.\n")); + debug_print (1, ("Can't find end of ASCII armor.\n")); return; } if ((end = ftell (in) - safe_strlen (line)) < start) { - dprint (1, (debugfile, "pgp_dearmor: end < start???\n")); + debug_print (1, ("end < start???\n")); return; } if (fseek (in, start, SEEK_SET) == -1) { - dprint (1, (debugfile, "pgp_dearmor: Can't seekto start.\n")); + debug_print (1, ("Can't seekto start.\n")); return; } @@ -121,8 +122,7 @@ static short pgp_mic_from_packet (unsigned char *p, size_t len) { /* is signature? */ if ((p[0] & 0x3f) != PT_SIG) { - dprint (1, (debugfile, "pgp_mic_from_packet: tag = %d, want %d.\n", - p[0] & 0x3f, PT_SIG)); + debug_print (1, ("tag = %d, want %d.\n", p[0] & 0x3f, PT_SIG)); return -1; } @@ -133,7 +133,7 @@ static short pgp_mic_from_packet (unsigned char *p, size_t len) /* version 4 signature */ return (short) p[4]; else { - dprint (1, (debugfile, "pgp_mic_from_packet: Bad signature packet.\n")); + debug_print (1, ("Bad signature packet.\n")); return -1; } } @@ -169,7 +169,7 @@ static short pgp_find_hash (const char *fname) rv = pgp_mic_from_packet (p, l); } else { - dprint (1, (debugfile, "pgp_find_hash: No packet.\n")); + debug_print (1, ("No packet.\n")); } bye: