+static void dict_unset_split_var (struct dictionary *, struct variable *);
+static void dict_unset_mrset_var (struct dictionary *, struct variable *);
+
+/* Returns the encoding for data in dictionary D. The return value is a
+ nonnull string that contains an IANA character set name. */
+const char *
+dict_get_encoding (const struct dictionary *d)
+{
+ return d->encoding ;
+}
+
+/* Returns true if UTF-8 string ID is an acceptable identifier in DICT's
+ encoding, false otherwise. If ISSUE_ERROR is true, issues an explanatory
+ error message on failure. */
+bool
+dict_id_is_valid (const struct dictionary *dict, const char *id,
+ bool issue_error)
+{
+ return (!dict->names_must_be_ids
+ || id_is_valid (id, dict->encoding, issue_error));
+}
+
+void
+dict_set_change_callback (struct dictionary *d,
+ void (*changed) (struct dictionary *, void*),
+ void *data)
+{
+ d->changed = changed;
+ d->changed_data = data;
+}
+
+/* Discards dictionary D's caseproto. (It will be regenerated
+ lazily, on demand.) */
+static void
+invalidate_proto (struct dictionary *d)
+{
+ caseproto_unref (d->proto);
+ d->proto = NULL;
+}
+
+/* Print a representation of dictionary D to stdout, for
+ debugging purposes. */
+void
+dict_dump (const struct dictionary *d)
+{
+ int i;
+ for (i = 0 ; i < d->var_cnt ; ++i )
+ {
+ const struct variable *v = d->var[i].var;
+ printf ("Name: %s;\tdict_idx: %zu; case_idx: %zu\n",
+ var_get_name (v),
+ var_get_dict_index (v),
+ var_get_case_index (v));
+
+ }
+}
+
+/* Associate CALLBACKS with DICT. Callbacks will be invoked whenever
+ the dictionary or any of the variables it contains are modified.
+ Each callback will get passed CALLBACK_DATA.
+ Any callback may be NULL, in which case it'll be ignored.
+*/
+void
+dict_set_callbacks (struct dictionary *dict,
+ const struct dict_callbacks *callbacks,
+ void *callback_data)
+{
+ dict->callbacks = callbacks;
+ dict->cb_data = callback_data;
+}
+
+/* Shallow copy the callbacks from SRC to DEST */
+void
+dict_copy_callbacks (struct dictionary *dest,
+ const struct dictionary *src)
+{
+ dest->callbacks = src->callbacks;
+ dest->cb_data = src->cb_data;
+}