+/** If the \a variable name is obsolete, return the name to use,
+ * otherwise \a variable. */
+static
+char const *
+muscle_percent_variable_update (char const *variable, location variable_loc)
+{
+ typedef struct
+ {
+ const char *obsolete;
+ const char *updated;
+ } conversion_type;
+ const conversion_type conversion[] =
+ {
+ { "api.push_pull", "api.push-pull", },
+ { "lr.keep_unreachable_states", "lr.keep-unreachable-states", },
+ { "namespace", "api.namespace", },
+ };
+ char const *res = variable;
+ int i;
+ for (i = 0; i < ARRAY_CARDINALITY (conversion); ++i)
+ if (STREQ (conversion[i].obsolete, variable))
+ {
+ res = conversion[i].updated;
+ complain (&variable_loc, Wdeprecated,
+ _("deprecated %%define variable name: %s, use %s"),
+ quote (variable), quote_n (1, res));
+ break;
+ }
+ return res;
+}
+