+/** 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)
+{
+ typedef struct
+ {
+ const char *obsolete;
+ const char *updated;
+ } conversion_type;
+ const conversion_type conversion[] =
+ {
+ { "api.push_pull", "api.push-pull", },
+ { "location_type", "api.location.type", },
+ { "lr.keep_unreachable_states", "lr.keep-unreachable-states", },
+ };
+ char const *res = variable;
+ int i;
+ for (i = 0; i < ARRAY_CARDINALITY (conversion); ++i)
+ if (STREQ (conversion[i].obsolete, variable))
+ {
+ res = conversion[i].updated;
+ break;
+ }
+ return res;
+}
+