/[pspp]/pspp/src/vector.c
ViewVC logotype

Diff of /pspp/src/vector.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jmd, Fri Apr 29 01:02:16 2005 UTC revision 1.9 by blp, Mon May 2 06:21:21 2005 UTC
# Line 62  cmd_vector (void) Line 62  cmd_vector (void)
62              }              }
63    
64            for (cp2 = cp; cp2 < cp; cp2 += strlen (cp))            for (cp2 = cp; cp2 < cp; cp2 += strlen (cp))
65              if (!strcmp (cp2, tokid))              if (!strcasecmp (cp2, tokid))
66                {                {
67                  msg (SE, _("Vector name %s is given twice."), tokid);                  msg (SE, _("Vector name %s is given twice."), tokid);
68                  goto fail;                  goto fail;
# Line 92  cmd_vector (void) Line 92  cmd_vector (void)
92              {              {
93                /* There's more than one vector name. */                /* There's more than one vector name. */
94                msg (SE, _("A slash must be used to separate each vector "                msg (SE, _("A slash must be used to separate each vector "
95                     "specification when using the long form.  Commands "                           "specification when using the long form.  Commands "
96                     "such as VECTOR A,B=Q1 TO Q20 are not supported."));                           "such as VECTOR A,B=Q1 TO Q20 are not supported."));
97                goto fail;                goto fail;
98              }              }
99    
# Line 131  cmd_vector (void) Line 131  cmd_vector (void)
131            if (!lex_force_match (')'))            if (!lex_force_match (')'))
132              goto fail;              goto fail;
133    
134            /* First check that all the generated variable names are SHORT_NAME_LEN            /* First check that all the generated variable names
135               characters or shorter. */               are LONG_NAME_LEN characters or shorter. */
136            ndig = intlog10 (nv);            ndig = intlog10 (nv);
137            for (cp = vecnames; *cp;)            for (cp = vecnames; *cp;)
138              {              {
139                int len = strlen (cp);                int len = strlen (cp);
140                if (len + ndig > SHORT_NAME_LEN)                if (len + ndig > LONG_NAME_LEN)
141                  {                  {
142                    msg (SE, _("%s%d is too long for a variable name."), cp, nv);                    msg (SE, _("%s%d is too long for a variable name."), cp, nv);
143                    goto fail;                    goto fail;
# Line 153  cmd_vector (void) Line 153  cmd_vector (void)
153                    sprintf (name, "%s%d", cp, i + 1);                    sprintf (name, "%s%d", cp, i + 1);
154                    if (dict_lookup_var (default_dict, name))                    if (dict_lookup_var (default_dict, name))
155                      {                      {
156                        msg (SE, _("There is already a variable named %s."), name);                        msg (SE, _("There is already a variable named %s."),
157                               name);
158                        goto fail;                        goto fail;
159                      }                      }
160                  }                  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26