]> diplodocus.org Git - nmh/commitdiff
Format with `%#x' instead of `0x%x' if difference matters not.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 24 Aug 2017 19:09:00 +0000 (20:09 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 24 Aug 2017 19:09:00 +0000 (20:09 +0100)
Zero formats as `0' rather than `0x0', but that doesn't matter in debug
output, or an error message about a byte's value to the user.

sbr/datetime.c
uip/mhlistsbr.c

index 9ecff53..68038cf 100644 (file)
@@ -75,7 +75,7 @@ parse_datetime (const char *datetime, const char *zone, int dst,
     if (items_matched == 7) {
         /* The 'Z' must be capital according to RFC 5545 Sec. 3.3.5. */
         if (utc_indicator != 'Z') {
-            inform("%s has invalid timezone indicator of 0x%x",
+            inform("%s has invalid timezone-indicator byte: %#x",
                     datetime, utc_indicator);
             return NOTOK;
         }
index cda4e48..48a5a79 100644 (file)
@@ -269,7 +269,7 @@ list_debug (CT ct)
                 get_param_value(pm, '?'));
 
     /* print internal flags for type/subtype */
-    fprintf (stderr, "    type 0x%x subtype 0x%x params 0x%x\n",
+    fprintf (stderr, "    type %#x subtype %#x params 0x%x\n",
             ct->c_type, ct->c_subtype,
             (unsigned int)(unsigned long) ct->c_ctparams);
 
@@ -282,7 +282,7 @@ list_debug (CT ct)
        fprintf (stderr, "  %s:%s", ENCODING_FIELD, ct->c_celine);
 
     /* print internal flags for transfer encoding */
-    fprintf (stderr, "    transfer encoding 0x%x params 0x%x\n",
+    fprintf (stderr, "    transfer encoding %#x params 0x%x\n",
             ct->c_encoding, (unsigned int)(unsigned long) &ct->c_cefile);
 
     /* print Content-ID */