projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
macros to create usual functions : new/delete and init/wipe.
[apps/madmutt.git]
/
pgp.c
diff --git
a/pgp.c
b/pgp.c
index
d40d8cb
..
bdcba07
100644
(file)
--- a/
pgp.c
+++ b/
pgp.c
@@
-25,13
+25,15
@@
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
+
+#include <lib-mime/mime.h>
#include "mutt.h"
#include "enter.h"
#include "handler.h"
#include "mutt_curses.h"
#include "pgp.h"
#include "mutt.h"
#include "enter.h"
#include "handler.h"
#include "mutt_curses.h"
#include "pgp.h"
-#include "mime.h"
#include "copy.h"
#include "attach.h"
#include "copy.h"
#include "attach.h"
@@
-210,7
+212,7
@@
static void pgp_copy_clearsigned (FILE * fpin, STATE * s, char *charset)
break;
if (armor_header) {
break;
if (armor_header) {
- char *p =
str_skip_initws
(buf);
+ char *p =
vskipspaces
(buf);
if (*p == '\0')
armor_header = 0;
if (*p == '\0')
armor_header = 0;
@@
-268,7
+270,7
@@
int pgp_application_pgp_handler (BODY * m, STATE * s)
bytes -= (offset - last_pos); /* don't rely on m_strlen(buf) */
last_pos = offset;
bytes -= (offset - last_pos); /* don't rely on m_strlen(buf) */
last_pos = offset;
- if (
str_ncmp
("-----BEGIN PGP ", buf, 15) == 0) {
+ if (
m_strncmp
("-----BEGIN PGP ", buf, 15) == 0) {
clearsign = 0;
start_pos = last_pos;
clearsign = 0;
start_pos = last_pos;
@@
-506,7
+508,7
@@
static int pgp_check_traditional_one_body (FILE * fp, BODY * b,
}
while (fgets (buf, sizeof (buf), tfp)) {
}
while (fgets (buf, sizeof (buf), tfp)) {
- if (
str_ncmp
("-----BEGIN PGP ", buf, 15) == 0) {
+ if (
m_strncmp
("-----BEGIN PGP ", buf, 15) == 0) {
if (m_strcmp("MESSAGE-----\n", buf + 15) == 0)
enc = 1;
else if (m_strcmp("SIGNED MESSAGE-----\n", buf + 15) == 0)
if (m_strcmp("MESSAGE-----\n", buf + 15) == 0)
enc = 1;
else if (m_strcmp("SIGNED MESSAGE-----\n", buf + 15) == 0)