break;
case 'v':
- m_strcpy(buf, buflen, mutt_make_version());
+ m_strcpy(buf, buflen, madmutt_version);
break;
case 0:
break;
case 'v':
- m_strcpy(buf, buflen, mutt_make_version());
+ m_strcpy(buf, buflen, madmutt_version);
break;
case 'V':
static void mutt_usage (void)
{
- puts(mutt_make_version());
+ puts(madmutt_version);
puts(_("\
usage: madmutt [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -f <file> ]\n\
struct utsname uts;
uname(&uts);
- puts(mutt_make_version());
+ puts(madmutt_version);
puts(_(" Copyright (C) 1996-2002 Michael R. Elkins and others."));
puts(_(" Copyright (C) 2005 The Mutt-ng Team"));
puts(_(" Copyright (C) 2006-2007 Pierre Habouzit"));
#include <lib-mime/mime.h>
#include <lib-lua/lib-lua.h>
-#define MUTT_VERSION (VERSION)
+#define MUTT_VERSION VERSION
/* nifty trick I stole from ELM 2.5alpha. */
#ifdef MAIN_C
#include "mutt.h"
#include "attach.h"
+const char *madmutt_version = "Madmutt/" MUTT_VERSION;
+
/* Modified by blong to accept a "suggestion" for file name. If
* that file exists, then construct one with unique name but
* keep any extension. This might fail, I guess.
sleep(MAX(s, SleepTime));
}
-const char *mutt_make_version(void)
-{
- static char vstring[STRING];
- snprintf(vstring, sizeof (vstring), "Madmutt/%s", MUTT_VERSION);
- return vstring;
-}
-
/* return 1 if address lists are strictly identical */
static int mutt_cmp_addr (const address_t * a, const address_t * b)
{
* please see the file GPL in the top level source directory.
*/
+extern const char *madmutt_version;
/* use the m_temp{fd,file} functions instead */
void mutt_adv_mktemp (const char*, char*, ssize_t) __attribute__((deprecated));
const char *mutt_crypt_hook (address_t *);
char *mutt_make_date (char *, ssize_t);
-const char *mutt_make_version(void);
-
const char *mutt_fqdn (short);
void mutt_add_to_reference_headers (ENVELOPE * env, ENVELOPE * curenv,
if (mode == 0 && option (OPTXMAILER) && !has_agent) {
if (mod_core.operating_system) {
- fprintf(fp, "User-Agent: %s (%s)\n", mutt_make_version(),
+ fprintf(fp, "User-Agent: %s (%s)\n", madmutt_version,
mod_core.operating_system);
} else {
- fprintf(fp, "User-Agent: %s\n", mutt_make_version());
+ fprintf(fp, "User-Agent: %s\n", madmutt_version);
}
}