Changed the definition of factors to be self referential.
[pspp-builds.git] / src / sysfile-info.c
index f35bead75d0e2ee74f763ed36dbd8bb0fcb37626..5a91fc39b4e8d05b3bb9f3780dc5e84e11f014dd 100644 (file)
@@ -18,7 +18,7 @@
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "error.h"
 #include <ctype.h>
 #include <stdlib.h>
 #include "algorithm.h"
@@ -77,9 +77,6 @@ cmd_sysfile_info (void)
   int r, nr;
   int i;
 
-  lex_match_id ("SYSFILE");
-  lex_match_id ("INFO");
-
   lex_match_id ("FILE");
   lex_match ('=');
 
@@ -95,7 +92,7 @@ cmd_sysfile_info (void)
   t = tab_create (2, 9, 0);
   tab_vline (t, TAL_1 | TAL_SPACING, 1, 0, 8);
   tab_text (t, 0, 0, TAB_LEFT, _("File:"));
-  tab_text (t, 1, 0, TAB_LEFT, fh_handle_filename (h));
+  tab_text (t, 1, 0, TAB_LEFT, handle_get_filename (h));
   tab_text (t, 0, 1, TAB_LEFT, _("Label:"));
   {
     const char *label = dict_get_label (d);
@@ -180,8 +177,6 @@ cmd_display (void)
   int n;
   struct variable **vl;
 
-  lex_match_id ("DISPLAY");
-
   if (lex_match_id ("MACROS"))
     display_macros ();
   else if (lex_match_id ("DOCUMENTS"))
@@ -247,7 +242,7 @@ cmd_display (void)
        {
          int i, m;
          for (i = 0, m = n; i < n; i++)
-           if (vl[i]->name[0] != '#')
+           if (dict_class_from_id (vl[i]->name) != DC_SCRATCH)
              {
                vl[i] = NULL;
                m--;