- for( i = 0 ; i < nv ; ++i )
- var_set_display_width (v[i], lex_integer (lexer));
+ if (width < 0)
+ {
+ msg (SE, _("Variable display width must be a positive integer."));
+ free (v);
+ return CMD_FAILURE;
+ }
+ width = MIN (width, 2 * MAX_STRING);
+
+ for( i = 0 ; i < nv ; ++i )
+ var_set_display_width (v[i], width);