projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop str_[n]cat.
[apps/madmutt.git]
/
crypt.c
diff --git
a/crypt.c
b/crypt.c
index
402a497
..
923b8d7
100644
(file)
--- a/
crypt.c
+++ b/
crypt.c
@@
-16,8
+16,13
@@
# include "config.h"
#endif
# include "config.h"
#endif
+#include <lib-lib/str.h>
+#include <lib-lib/file.h>
+#include <lib-lib/ascii.h>
+#include <lib-lib/mem.h>
+#include <lib-lib/macros.h>
+
#include "mutt.h"
#include "mutt.h"
-#include "ascii.h"
#include "handler.h"
#include "mutt_curses.h"
#include "mime.h"
#include "handler.h"
#include "mutt_curses.h"
#include "mime.h"
@@
-25,9
+30,6
@@
#include "mutt_crypt.h"
#include "pgp.h"
#include "mutt_crypt.h"
#include "pgp.h"
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/str.h"
#include <sys/wait.h>
#include <string.h>
#include <sys/wait.h>
#include <string.h>
@@
-51,7
+53,7
@@
/* print the current time to avoid spoofing of the signature output */
/* print the current time to avoid spoofing of the signature output */
-void crypt_current_time (STATE * s, char *app_name)
+void crypt_current_time (STATE * s, c
onst c
har *app_name)
{
time_t t;
char p[STRING], tmp[STRING];
{
time_t t;
char p[STRING], tmp[STRING];
@@
-388,7
+390,7
@@
int mutt_is_application_smime (BODY * m)
/* no .p7c, .p10 support yet. */
/* no .p7c, .p10 support yet. */
- len =
str_len
(t) - 4;
+ len =
m_strlen
(t) - 4;
if (len > 0 && *(t + len) == '.') {
len++;
if (!ascii_strcasecmp ((t + len), "p7m"))
if (len > 0 && *(t + len) == '.') {
len++;
if (!ascii_strcasecmp ((t + len), "p7m"))
@@
-487,7
+489,7
@@
int crypt_write_signed (BODY * a, STATE * s, const char *tempfile)
return -1;
}
return -1;
}
- fseek (s->fpin, a->hdr_offset, 0);
+ fseek
o
(s->fpin, a->hdr_offset, 0);
bytes = a->length + a->offset - a->hdr_offset;
hadcr = 0;
while (bytes > 0) {
bytes = a->length + a->offset - a->hdr_offset;
hadcr = 0;
while (bytes > 0) {
@@
-697,7
+699,7
@@
int crypt_get_keys (HEADER * msg, char **keylist)
-static void crypt_fetch_signatures (BODY ***
signatures, BODY * a, int *n)
+static void crypt_fetch_signatures (BODY ***signatures, BODY * a, int *n)
{
if (!WithCrypto)
return;
{
if (!WithCrypto)
return;
@@
-707,7
+709,7
@@
static void crypt_fetch_signatures (BODY *** signatures, BODY * a, int *n)
crypt_fetch_signatures (signatures, a->parts, n);
else {
if ((*n % 5) == 0)
crypt_fetch_signatures (signatures, a->parts, n);
else {
if ((*n % 5) == 0)
-
mem_realloc (signatures, (*n + 6) * sizeof (BODY **)
);
+
p_realloc(signatures, *n + 6
);
(*signatures)[(*n)++] = a;
}
(*signatures)[(*n)++] = a;
}
@@
-826,7
+828,7
@@
int mutt_signed_handler (BODY * a, STATE * s)
state_attach_puts (_("[-- The following data is signed --]\n\n"), s);
state_attach_puts (_("[-- The following data is signed --]\n\n"), s);
-
mem_free
(&signatures);
+
p_delete
(&signatures);
}
else
state_attach_puts (_("[-- Warning: Can't find any signatures. --]\n\n"),
}
else
state_attach_puts (_("[-- Warning: Can't find any signatures. --]\n\n"),