+ free (mrset);
+ }
+}
+
+/* Returns true if the UTF-8 encoded NAME is a valid name for a multiple
+ response set in a dictionary encoded in DICT_ENCODING, false otherwise. If
+ ISSUE_ERROR is true, issues an explanatory error message on failure. */
+bool
+mrset_is_valid_name (const char *name, const char *dict_encoding,
+ bool issue_error)
+{
+ if (!id_is_valid (name, dict_encoding, issue_error))
+ return false;
+
+ if (name[0] != '$')
+ {
+ if (issue_error)
+ msg (SE, _("%s is not a valid name for a multiple response "
+ "set. Multiple response set names must begin with "
+ "`$'."), name);
+ return false;