* please see the file GPL in the top level source directory.
*/
-#define _SENDLIB_C 1
-
#include <lib-lib/lib-lib.h>
#include <signal.h>
#define EX_OK 0
#endif
-/* If you are debugging this file, comment out the following line. */
-/*#define NDEBUG*/
-
-#ifdef NDEBUG
-#define assert(x)
-#else
-#include <assert.h>
-#endif
-
-#define DISPOSITION(X) X==DISPATTACH?"attachment":"inline"
-
static void transform_to_7bit (BODY * a, FILE * fpin);
static void encode_quoted (fgetconv_t * fc, FILE * fout, int istext)
if (a->description)
fprintf (f, "Content-Description: %s\n", a->description);
+#define DISPOSITION(X) X==DISPATTACH?"attachment":"inline"
fprintf (f, "Content-Disposition: %s", DISPOSITION (a->disposition));
if (a->use_disp) {
ib = bufi;
ob = bufu, obl = sizeof (bufu);
n = my_iconv(cd1, ibl ? &ib : 0, &ibl, &ob, &obl);
- assert (n == -1 || !n);
if (n == -1 && ((errno != EINVAL && errno != E2BIG) || ib == bufi)) {
- assert (errno == EILSEQ ||
- (errno == EINVAL && ib == bufi && ibl < ssizeof (bufi)));
ret = -1;
break;
}
{
char buf[SHORT_STRING];
char localpart[SHORT_STRING];
- unsigned int localpart_length;
const char *fqdn;
- if (!(fqdn = mutt_fqdn (0)))
- fqdn = NONULL (Hostname);
-
- localpart_length = sizeof (buf) - m_strlen(fqdn) - 4; /* the 4 characters are '<', '@', '>' and '\0' */
-
- mutt_gen_localpart (localpart, localpart_length, MsgIdFormat);
+ if (!(fqdn = mutt_fqdn(0)))
+ fqdn = NONULL(Hostname);
- snprintf (buf, sizeof (buf), "<%s@%s>", localpart, fqdn);
- return (m_strdup(buf));
+ mutt_gen_localpart(localpart, sizeof(localpart), MsgIdFormat);
+ snprintf(buf, sizeof(buf), "<%s@%s>", localpart, fqdn);
+ return m_strdup(buf);
}
static RETSIGTYPE alarm_handler (int sig)