VARIABLE ROLE: Use correct system file representation.
[pspp] / src / data / sys-file-reader.c
index d38113e2883a47fb237548b856ab95cceb57e55a..4138fa912806f5934842452979cc0f51c2e5b13f 100644 (file)
@@ -1921,19 +1921,19 @@ assign_variable_roles (struct sfm_reader *r, struct dictionary *dict)
           switch (value)
             {
             case 0:
-              role = ROLE_NONE;
+              role = ROLE_INPUT;
               break;
 
             case 1:
-              role = ROLE_INPUT;
+              role = ROLE_OUTPUT;
               break;
 
             case 2:
-              role = ROLE_OUTPUT;
+              role = ROLE_BOTH;
               break;
 
             case 3:
-              role = ROLE_BOTH;
+              role = ROLE_NONE;
               break;
 
             case 4:
@@ -1945,9 +1945,9 @@ assign_variable_roles (struct sfm_reader *r, struct dictionary *dict)
               break;
 
             default:
-              role = ROLE_NONE;
+              role = ROLE_INPUT;
               if (n_warnings++ == 0)
-                sys_warn (r, 0, _("Invalid role for variable %s."),
+                sys_warn (r, -1, _("Invalid role for variable %s."),
                           var_get_name (var));
             }
 
@@ -1956,7 +1956,7 @@ assign_variable_roles (struct sfm_reader *r, struct dictionary *dict)
     }
 
   if (n_warnings > 1)
-    sys_warn (r, 0, _("%zu other variables had invalid roles."),
+    sys_warn (r, -1, _("%zu other variables had invalid roles."),
               n_warnings - 1);
 }