+/*-------------------------------------.
+| --skeleton and --language handling. |
+`--------------------------------------*/
+
+void
+skeleton_arg (char const *arg, int prio, location loc)
+{
+ if (prio < skeleton_prio)
+ {
+ skeleton_prio = prio;
+ skeleton = arg;
+ }
+ else if (prio == skeleton_prio)
+ complain_at (loc, _("multiple skeleton declarations are invalid"));
+}
+
+void
+language_argmatch (char const *arg, int prio, location loc)
+{
+ char const *msg;
+
+ if (prio < language_prio)
+ {
+ int i;
+ for (i = 0; valid_languages[i].language[0]; i++)
+ if (c_strcasecmp (arg, valid_languages[i].language) == 0)
+ {
+ language_prio = prio;
+ language = &valid_languages[i];
+ return;
+ }
+ msg = _("%s: invalid language");
+ }
+ else if (language_prio == prio)
+ msg = _("multiple language declarations are invalid");
+ else
+ return;
+
+ complain_at (loc, msg, quotearg_colon (arg));
+}
+