Debug: noutf8 selector. Bug 2324
[exim.git] / src / src / debug.c
index 9e042f53f7d3b3e578146a9a492c78bac4d4c205..4b076514758996fb50a997a05425706a26411a43 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2017 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -188,7 +188,7 @@ if (debug_ptr == debug_buffer)
 
     gettimeofday(&now, NULL);
     tmp = now.tv_sec;
-    t = timestamps_utc ? gmtime(&tmp) : localtime(&tmp);
+    t = f.timestamps_utc ? gmtime(&tmp) : localtime(&tmp);
     debug_ptr += sprintf(CS debug_ptr,
       LOGGING(millisec) ? "%02d:%02d:%02d.%03d " : "%02d:%02d:%02d ",
       t->tm_hour, t->tm_min, t->tm_sec, (int)(now.tv_usec/1000));
@@ -212,11 +212,19 @@ if (indent > 0)
   {
   int i;
   for (i = indent >> 2; i > 0; i--)
-    {
-    Ustrcpy(debug_ptr, "   " UTF8_VERT_2DASH);
-    debug_ptr += 6;    /* 3 spaces + 3 UTF-8 octets */
-    debug_prefix_length += 6;
-    }
+    DEBUG(D_noutf8)
+      {
+      Ustrcpy(debug_ptr, "   !");
+      debug_ptr += 4;  /* 3 spaces + shriek */
+      debug_prefix_length += 4;
+      }
+    else
+      {
+      Ustrcpy(debug_ptr, "   " UTF8_VERT_2DASH);
+      debug_ptr += 6;  /* 3 spaces + 3 UTF-8 octets */
+      debug_prefix_length += 6;
+      }
+
   Ustrncpy(debug_ptr, "   ", indent &= 3);
   debug_ptr += indent;
   debug_prefix_length += indent;