From: Kevin McCarthy Date: Mon, 6 Jun 2016 01:30:37 +0000 (-0700) Subject: Add warning in makedoc for unexpected prefices. (see #3845) X-Git-Tag: neomutt-20160822~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b481562b61087be99b07a6408d6c07571946fe85;p=neomutt Add warning in makedoc for unexpected prefices. (see #3845) In case other types get renamed again in the future, add a warning message to makedoc.c. --- diff --git a/doc/makedoc.c b/doc/makedoc.c index fb49af5f1..ec04e2cab 100644 --- a/doc/makedoc.c +++ b/doc/makedoc.c @@ -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;