/[pspp]/pspp/src/pfm-read.c
ViewVC logotype

Diff of /pspp/src/pfm-read.c

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

revision 1.19 by blp, Sat Mar 12 20:22:18 2005 UTC revision 1.20 by jmd, Wed Apr 13 10:09:59 2005 UTC
# Line 497  read_variables (struct pfm_reader *r, st Line 497  read_variables (struct pfm_reader *r, st
497    if (match (r, '6'))    if (match (r, '6'))
498      {      {
499        weight_name = read_pool_string (r);        weight_name = read_pool_string (r);
500        if (strlen (weight_name) > 8)        if (strlen (weight_name) > SHORT_NAME_LEN)
501          error (r, _("Weight variable name (%s) truncated."), weight_name);          error (r, _("Weight variable name (%s) truncated."), weight_name);
502      }      }
503        
# Line 520  read_variables (struct pfm_reader *r, st Line 520  read_variables (struct pfm_reader *r, st
520        read_string (r, name);        read_string (r, name);
521        for (j = 0; j < 6; j++)        for (j = 0; j < 6; j++)
522          fmt[j] = read_int (r);          fmt[j] = read_int (r);
523    #if 0
524             /* Weirdly enough, there is no # character in the SPSS portable
525             character set, so we can't check for it. */
526          if (strlen (name) > SHORT_NAME_LEN)
527            lose ((r, _("position %d: Variable name has %u characters."),
528                   i, strlen (name)));
529          if ((name[0] < 74 /* A */ || name[0] > 125 /* Z */)
530              && name[0] != 152 /* @ */)
531            lose ((r, _("position %d: Variable name begins with invalid "
532                        "character."), i));
533          if (name[0] >= 100 /* a */ && name[0] <= 125 /* z */)
534            {
535              corrupt_msg (r, _("position %d: Variable name begins with "
536                                "lowercase letter %c."),
537                           i, name[0] - 100 + 'a');
538              name[0] -= 26 /* a - A */;
539            }
540    
541          /* Verify remaining characters of variable name. */
542          for (j = 1; j < (int) strlen (name); j++)
543            {
544              int c = name[j];
545    #endif
546        if (!var_is_valid_name (name, false) || *name == '#')        if (!var_is_valid_name (name, false) || *name == '#')
547          error (r, _("position %d: Invalid variable name `%s'."), name);          error (r, _("position %d: Invalid variable name `%s'."), name);
548        st_uppercase (name);        st_uppercase (name);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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