Categoricals cleanup: New structure 'payload' which reduces the
[pspp] / src / language / data-io / file-handle.q
index 80fdacab78fed60a7610417648201d9ddae9109f..0519803e7fc08080217ae4593382a4d045813780 100644 (file)
@@ -43,7 +43,7 @@
    "FILE HANDLE" (fh_):
      name=string;
      lrecl=integer;
-     tabwidth=integer "x>=0" "%s must be nonnegative";
+     tabwidth=integer;
      mode=mode:!character/binary/image/360;
      recform=recform:fixed/f/variable/v/spanned/vs.
 */
@@ -95,7 +95,12 @@ cmd_file_handle (struct lexer *lexer, struct dataset *ds)
     case FH_CHARACTER:
       properties.mode = FH_MODE_TEXT;
       if (cmd.sbc_tabwidth)
-        properties.tab_width = cmd.n_tabwidth[0];
+        {
+          if (cmd.n_tabwidth[0] >= 0)
+            properties.tab_width = cmd.n_tabwidth[0];
+          else
+            msg (SE, _("%s must not be negative."), "TABWIDTH");
+        }
       break;
     case FH_IMAGE:
       properties.mode = FH_MODE_FIXED;