X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fvector.c;h=9a0d749265529f92332a2877feb5a1ad1db9c225;hb=084280e4bfd6b94c26320e72553a9a38201610a3;hp=2296672dc22363be9e0641f009c2744b0e2efe85;hpb=18febf84744dc7ab4248542c2f88d91c01ef3fa1;p=pspp-builds.git diff --git a/src/vector.c b/src/vector.c index 2296672d..9a0d7492 100644 --- a/src/vector.c +++ b/src/vector.c @@ -18,10 +18,11 @@ 02111-1307, USA. */ #include -#include +#include "error.h" #include #include "alloc.h" #include "command.h" +#include "dictionary.h" #include "error.h" #include "lexer.h" #include "misc.h" @@ -43,8 +44,6 @@ cmd_vector (void) /* Maximum allocated position for vecnames, plus one position. */ char *endp = NULL; - lex_match_id ("VECTOR"); - cp = vecnames = xmalloc (256); endp = &vecnames[256]; do @@ -114,7 +113,7 @@ cmd_vector (void) int ndig; /* Name of an individual variable to be created. */ - char name[9]; + char name[SHORT_NAME_LEN + 1]; /* Vector variables. */ struct variable **v; @@ -132,13 +131,13 @@ cmd_vector (void) if (!lex_force_match (')')) goto fail; - /* First check that all the generated variable names are 8 + /* First check that all the generated variable names are SHORT_NAME_LEN characters or shorter. */ ndig = intlog10 (nv); for (cp = vecnames; *cp;) { int len = strlen (cp); - if (len + ndig > 8) + if (len + ndig > SHORT_NAME_LEN) { msg (SE, _("%s%d is too long for a variable name."), cp, nv); goto fail;