-static void get_date (void);
-
-
-void
-init_glob (int argc UNUSED, char **argv)
-{
- set_program_name (argv[0]);
-
- /* FIXME: Allow i18n of other locale items (besides LC_MESSAGES). */
-#if ENABLE_NLS
-#if HAVE_LC_MESSAGES
- setlocale (LC_MESSAGES, "");
-#endif
- setlocale (LC_MONETARY, "");
- bindtextdomain (PACKAGE, locale_dir);
- textdomain (PACKAGE);
-#endif /* ENABLE_NLS */
-
- fn_init ();
- fh_init ();
- getl_initialize ();
-
- /* PORTME: If your system/OS has the nasty tendency to halt with a
- SIGFPE whenever there's a floating-point overflow (or other
- exception), be sure to mask off those bits in the FPU here.
- PSPP wants a guarantee that, no matter what boneheaded
- floating-point operation it performs, the process will not halt. */
-#if HAVE_FEHOLDEXCEPT
- {
- fenv_t foo;
-
- feholdexcept (&foo);
- }
-#elif HAVE___SETFPUCW && defined(_FPU_IEEE)
- __setfpucw (_FPU_IEEE);
-#elif __BORLANDC__
- _control87 (0xffff, 0x137f);
-#endif
-
- /* var.h */
- default_dict = dict_create ();
-
- last_vfm_invocation = time (NULL);
-
- /* lexer.h */
- ds_init (&tokstr, 64);
-
- /* common.h */
- {
- char *cp;
-
- pgmname = argv[0];
- for (;;)
- {
- cp = strchr (pgmname, DIR_SEPARATOR);
- if (!cp)
- break;
- pgmname = &cp[1];
- }
- cur_proc = NULL;
- }
-
-
- init_settings ();
- random_init ();
-
- /* log.h */
- logging = 1;
- logfn = xstrdup ("pspp.log");
- logfile = NULL;
-
- get_date ();
-}
-
-void
-done_glob(void)
-{
- cancel_transformations ();
- dict_destroy (default_dict);
- free (logfn);
- random_done ();
- done_settings ();
- ds_destroy (&tokstr);
-
- fh_done();
-}
-