]> granicus.if.org Git - neomutt/commitdiff
Add a new crypt_timestamp option. The timestamps aren't really
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 28 Jan 2002 23:29:05 +0000 (23:29 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 28 Jan 2002 23:29:05 +0000 (23:29 +0000)
needed any more.

crypt.c
init.h
mutt.h

diff --git a/crypt.c b/crypt.c
index 22f8c5349d14b2633b0a4a66923e3b3f4d7286e7..95122b6ea043bd85126418682de52b153eb48e71 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -63,12 +63,18 @@ void crypt_current_time(STATE *s, char *app_name)
   time_t t;
   char p[STRING], tmp[STRING];
 
-  t = time(NULL);
-  setlocale (LC_TIME, "");
-  snprintf (tmp, sizeof (tmp), _("[-- %s output follows(current time: %%c) --]\n"), NONULL(app_name));
-  strftime (p, sizeof (p), tmp, localtime (&t));
-  setlocale (LC_TIME, "C");
-  state_attach_puts (p, s);
+  if (option (OPTCRYPTTIMESTAMP))
+  {
+    t = time(NULL);
+    setlocale (LC_TIME, "");
+    strftime (p, sizeof (p), _(" (current time: %c)"), localtime (&t));
+    setlocale (LC_TIME, "C");
+  }
+  else
+    *p = '\0';
+
+  snprintf (tmp, sizeof (tmp), _("[-- %s output follows%s --]\n"), NONULL(app_name), p);
+  state_attach_puts (tmp, s);
 }
 
 
diff --git a/init.h b/init.h
index 52442c17148791064784b201d347be30ab6435bd..9d830b4eaa14c98fc5fedf4b53fbbcd92b0da2f7 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1222,6 +1222,14 @@ struct option_t MuttVars[] = {
   ** noted in ``$$crypt_replysign'', that mutt is not able to find out
   ** whether an encrypted message is also signed.
   */
+  { "crypt_timestamp", DT_BOOL, R_NONE, OPTCRYPTTIMESTAMP, 1 },
+  /*
+  ** .pp
+  ** If set, mutt will include a time stamp in the lines surrounding
+  ** PGP or S/MIME output, so spoofing such lines is more difficult.
+  ** If you are using colors to mark these lines, and rely on these,
+  ** you may unset this setting.
+  */
 #ifdef HAVE_PGP
   { "pgp_verify_sig",   DT_SYN,  R_NONE, UL "crypt_verify_sig", 0},
 #endif
diff --git a/mutt.h b/mutt.h
index f4136d90e6b14dbe416cfc0569b6378450501ab1..b8e2df4c5f87e7470e10022bbdaab28e6812a4c8 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -422,6 +422,7 @@ enum
   OPTCRYPTREPLYENCRYPT,
   OPTCRYPTREPLYSIGN,
   OPTCRYPTREPLYSIGNENCRYPTED,
+  OPTCRYPTTIMESTAMP,
 #ifdef HAVE_SMIME
   OPTSMIMEISDEFAULT,
 #endif