Improve portability to NetBSD and Alpha.
[pspp-builds.git] / src / ui / terminal / main.c
index 9712fb8be5a80945bbaa2038cab25b9517471a75..e2cd180d9d03a58506228333c0ed729d1af82876 100644 (file)
 #include <fenv.h>
 #endif
 
+#if HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -108,7 +112,7 @@ main (int argc, char **argv)
 
   factory = fastfile_factory_create ();
 
-  the_dataset = create_dataset (factory);
+  the_dataset = create_dataset (factory, NULL, NULL);
 
   if (parse_command_line (argc, argv, the_source_stream))
     {
@@ -118,9 +122,8 @@ main (int argc, char **argv)
 
       for (;;)
         {
-          int result = cmd_parse (the_lexer, the_dataset,
-                                 proc_has_source (the_dataset)
-                                 ? CMD_STATE_DATA : CMD_STATE_INITIAL);
+          int result = cmd_parse (the_lexer, the_dataset);
+
           if (result == CMD_EOF || result == CMD_FINISH)
             break;
           if (result == CMD_CASCADING_FAILURE &&
@@ -159,6 +162,8 @@ fpu_init (void)
   feholdexcept (&foo);
 #elif HAVE___SETFPUCW && defined(_FPU_IEEE)
   __setfpucw (_FPU_IEEE);
+#elif HAVE_FPSETMASK
+  fpsetmask (0);
 #endif
 }