Fixed a bug which caused a crash when reading non-existent files.
[pspp] / src / glob.c
index 9b4f93c4e62fa5adac77728994a391dcef7018a5..9cbcc0c6761602a86316f6d538b901b3248e876a 100644 (file)
@@ -127,6 +127,7 @@ init_glob (int argc UNUSED, char **argv)
 #endif /* ENABLE_NLS */
 
   fn_init ();
+  fh_init ();
   getl_initialize ();
 
   /* PORTME: If your system/OS has the nasty tendency to halt with a
@@ -180,6 +181,18 @@ init_glob (int argc UNUSED, char **argv)
   get_date ();
 }
 
+void
+done_glob(void)
+{
+  cancel_transformations ();
+  dict_destroy (default_dict);
+  free (logfn);
+  done_settings ();
+  ds_destroy (&tokstr);
+
+  fh_done();
+}
+
 static void
 get_date (void)
 {