X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=c0df6d1a8dfbb579dfca5de6be19844f3b7fabf2;hp=723043a2b36ae01ede9b111a83ab7cd2266d5863;hb=3e8bb0a04f87021439ed4601a12ed8485eba27d3;hpb=0e654d058aa2b5027166bd3e535f85bbc4f214dc diff --git a/muttlib.c b/muttlib.c index 723043a..c0df6d1 100644 --- a/muttlib.c +++ b/muttlib.c @@ -13,6 +13,9 @@ #endif #include "mutt.h" +#include "ascii.h" +#include "buffer.h" +#include "enter.h" #include "mutt_curses.h" #include "mime.h" #include "mx.h" @@ -20,6 +23,7 @@ #include "attach.h" #include "reldate.h" +#include "svnrev.h" #ifdef USE_IMAP #include "imap.h" @@ -61,7 +65,7 @@ BODY *mutt_new_body (void) * Renamed to mutt_adv_mktemp so I only have to change where it's * called, and not all possible cases. */ -void mutt_adv_mktemp (char *s, size_t l) +void mutt_adv_mktemp (const char* dir, char *s, size_t l) { char buf[_POSIX_PATH_MAX]; char tmp[_POSIX_PATH_MAX]; @@ -69,7 +73,7 @@ void mutt_adv_mktemp (char *s, size_t l) size_t sl; struct stat sb; - strfcpy (buf, NONULL (Tempdir), sizeof (buf)); + strfcpy (buf, dir && *dir ? dir : NONULL (Tempdir), sizeof (buf)); mutt_expand_path (buf, sizeof (buf)); if (s[0] == '\0') { snprintf (s, l, "%s/muttXXXXXX", buf); @@ -113,7 +117,7 @@ int mutt_copy_body (FILE * fp, BODY ** tgt, BODY * src) tmp[0] = '\0'; } - mutt_adv_mktemp (tmp, sizeof (tmp)); + mutt_adv_mktemp (NULL, tmp, sizeof (tmp)); if (mutt_save_attachment (fp, src, tmp, 0, NULL) == -1) return -1; @@ -1285,8 +1289,8 @@ const char *mutt_make_version (void) { static char vstring[STRING]; - snprintf (vstring, sizeof (vstring), "Mutt-ng %s (%s) based on Mutt 1.5.9", - MUTT_VERSION, ReleaseDate); + snprintf (vstring, sizeof (vstring), "Mutt-ng %s-%s (based on Mutt 1.5.10/%s)", + MUTT_VERSION, MUTTNG_SVNREV, ReleaseDate); return vstring; }