- if (!g_markup_parse_context_end_parse (context, error))
- {
- g_prefix_error (error, "%s: ", filename);
- return NULL;
+ /* back out any changes from this file */
+ for (item = state.this_file_schemas; item; item = item->next)
+ g_hash_table_remove (state.schema_table, item->data);
+
+ for (item = state.this_file_flagss; item; item = item->next)
+ g_hash_table_remove (state.flags_table, item->data);
+
+ for (item = state.this_file_enums; item; item = item->next)
+ g_hash_table_remove (state.enum_table, item->data);
+
+ /* let them know */
+ fprintf (stderr, "%s: %s. ", filename, error->message);
+ g_clear_error (&error);
+
+ if (strict)
+ {
+ /* Translators: Do not translate "--strict". */
+ fprintf (stderr, _("--strict was specified; exiting.\n"));
+ g_hash_table_unref (state.schema_table);
+ g_hash_table_unref (state.flags_table);
+ g_hash_table_unref (state.enum_table);
+
+ return NULL;
+ }
+ else
+ fprintf (stderr, _("This entire file has been ignored.\n"));