]> granicus.if.org Git - neomutt/commitdiff
Add warning in makedoc for unexpected prefices. (see #3845)
authorKevin McCarthy <kevin@8t8.us>
Mon, 6 Jun 2016 01:30:37 +0000 (18:30 -0700)
committerKevin McCarthy <kevin@8t8.us>
Mon, 6 Jun 2016 01:30:37 +0000 (18:30 -0700)
In case other types get renamed again in the future, add a warning
message to makedoc.c.

doc/makedoc.c

index fb49af5f122e47b016f81c611b979521b1951a35..ec04e2cab771d6c2f09bef90978f26848f3b072a 100644 (file)
@@ -499,6 +499,9 @@ static void pretty_default (char *t, size_t l, const char *s, int type)
     case DT_SORT:
     {
       /* heuristic! */
+      if (strncmp (s, "SORT_", 5))
+        fprintf (stderr,
+                 "WARNING: expected prefix of SORT_ for type DT_SORT instead of %s\n", s);
       strncpy (t, s + 5, l);
       for (; *t; t++) *t = tolower ((unsigned char) *t);
       break;
@@ -506,6 +509,9 @@ static void pretty_default (char *t, size_t l, const char *s, int type)
     case DT_MAGIC:
     {
       /* heuristic! */
+      if (strncmp (s, "MUTT_", 5))
+        fprintf (stderr,
+                 "WARNING: expected prefix of MUTT_ for type DT_MAGIC instead of %s\n", s);
       strncpy (t, s + 5, l);
       for (; *t; t++) *t = tolower ((unsigned char) *t);
       break;