X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=a36e8da115a6cd1d935c82bded48501150b2e573;hp=4efa41b3be8db273828b18cda73111275b12d249;hb=277e5c46345857e1f2a22e59eb67a20342737cd6;hpb=e131de5b5f40e0a4100a17cf128ba56424003176 diff --git a/muttlib.c b/muttlib.c index 4efa41b..a36e8da 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1262,7 +1262,6 @@ void mutt_sleep (short s) } /* Decrease a file's modification time by 1 second */ - time_t mutt_decrease_mtime (const char *f, struct stat *st) { struct utimbuf utim; @@ -1285,15 +1284,29 @@ time_t mutt_decrease_mtime (const char *f, struct stat *st) return mtime; } +/* sets mtime of 'to' to mtime of 'from' */ +void mutt_set_mtime (const char* from, const char* to) { + struct utimbuf utim; + struct stat st; + + if (stat (from, &st) != -1) { + utim.actime = st.st_mtime; + utim.modtime = st.st_mtime; + utime (to, &utim); + } +} + const char *mutt_make_version (int full) { static char vstring[STRING]; if (full) - snprintf (vstring, sizeof (vstring), "Mutt-ng %s (based " - "on Mutt 1.5.10/%s)", MUTT_VERSION, ReleaseDate); + snprintf (vstring, sizeof (vstring), "Mutt-ng %s-r%s (based " + "on Mutt 1.5.10/%s)", MUTT_VERSION, MUTT_REVISION, + ReleaseDate); else - snprintf (vstring, sizeof (vstring), "mutt-ng/%s", MUTT_VERSION); + snprintf (vstring, sizeof (vstring), "mutt-ng/%s-r%s", + MUTT_VERSION, MUTT_REVISION); return vstring; }