+/*-------------------------------------.
+| --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)
+ {
+ char const *msg =
+ _("multiple skeleton declarations are invalid");
+ complain_at (loc, msg);
+ }
+}
+
+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 = _("invalid language `%s'");
+ }
+ else if (language_prio == prio)
+ msg = _("multiple language declarations are invalid");
+ else
+ return;
+
+ complain_at (loc, msg, arg);
+}
+