projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
4c410cf
..
d5a6093
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-26,6
+26,10
@@
#include "mutt_crypt.h"
#include "mutt_idna.h"
#include "mutt_crypt.h"
#include "mutt_idna.h"
+#include "lib/mem.h"
+#include "lib/str.h"
+#include "lib/intl.h"
+
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
@@
-1787,11
+1791,11
@@
static void mutt_gen_localpart (char *buf, unsigned int len, char *fmt)
break;
case 'O':
snprintf (tmp, sizeof (tmp), "%lo", (unsigned long) now);
break;
case 'O':
snprintf (tmp, sizeof (tmp), "%lo", (unsigned long) now);
- safe_strncat (buf, len, tmp, strlen (tmp));
+ safe_strncat (buf, len, tmp,
mutt_
strlen (tmp));
break;
case 'p':
snprintf (tmp, sizeof (tmp), "%u", (unsigned int) getpid ());
break;
case 'p':
snprintf (tmp, sizeof (tmp), "%u", (unsigned int) getpid ());
- safe_strncat (buf, len, tmp, strlen (tmp));
+ safe_strncat (buf, len, tmp,
mutt_
strlen (tmp));
break;
case 'P':
snprintf (tmp, sizeof (tmp), "%c", MsgIdPfx);
break;
case 'P':
snprintf (tmp, sizeof (tmp), "%c", MsgIdPfx);
@@
-1800,11
+1804,11
@@
static void mutt_gen_localpart (char *buf, unsigned int len, char *fmt)
break;
case 'r':
snprintf (tmp, sizeof (tmp), "%u", (unsigned int) rand ());
break;
case 'r':
snprintf (tmp, sizeof (tmp), "%u", (unsigned int) rand ());
- safe_strncat (buf, len, tmp, strlen (tmp));
+ safe_strncat (buf, len, tmp,
mutt_
strlen (tmp));
break;
case 'R':
snprintf (tmp, sizeof (tmp), "%x", (unsigned int) rand ());
break;
case 'R':
snprintf (tmp, sizeof (tmp), "%x", (unsigned int) rand ());
- safe_strncat (buf, len, tmp, strlen (tmp));
+ safe_strncat (buf, len, tmp,
mutt_
strlen (tmp));
break;
case 's':
snprintf (tmp, sizeof (tmp), "%02d", tm->tm_sec);
break;
case 's':
snprintf (tmp, sizeof (tmp), "%02d", tm->tm_sec);
@@
-1812,11
+1816,11
@@
static void mutt_gen_localpart (char *buf, unsigned int len, char *fmt)
break;
case 'T':
snprintf (tmp, sizeof (tmp), "%u", (unsigned int) now);
break;
case 'T':
snprintf (tmp, sizeof (tmp), "%u", (unsigned int) now);
- safe_strncat (buf, len, tmp, strlen (tmp));
+ safe_strncat (buf, len, tmp,
mutt_
strlen (tmp));
break;
case 'X':
snprintf (tmp, sizeof (tmp), "%x", (unsigned int) now);
break;
case 'X':
snprintf (tmp, sizeof (tmp), "%x", (unsigned int) now);
- safe_strncat (buf, len, tmp, strlen (tmp));
+ safe_strncat (buf, len, tmp,
mutt_
strlen (tmp));
break;
case 'Y':
snprintf (tmp, sizeof (tmp), "%04d", tm->tm_year + 1900); /* this will break in the year 10000 ;-) */
break;
case 'Y':
snprintf (tmp, sizeof (tmp), "%04d", tm->tm_year + 1900); /* this will break in the year 10000 ;-) */
@@
-1853,7
+1857,7
@@
char *mutt_gen_msgid (void)
if (!(fqdn = mutt_fqdn (0)))
fqdn = NONULL (Hostname);
if (!(fqdn = mutt_fqdn (0)))
fqdn = NONULL (Hostname);
- localpart_length = sizeof (buf) - strlen (fqdn) - 4; /* the 4 characters are '<', '@', '>' and '\0' */
+ localpart_length = sizeof (buf) -
mutt_
strlen (fqdn) - 4; /* the 4 characters are '<', '@', '>' and '\0' */
mutt_gen_localpart (localpart, localpart_length, MsgIdFormat);
mutt_gen_localpart (localpart, localpart_length, MsgIdFormat);