/[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.26 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.27 by blp, Sun Aug 7 04:39:28 2005 UTC
# Line 540  read_variables (struct pfm_reader *r, st Line 540  read_variables (struct pfm_reader *r, st
540        convert_format (r, &fmt[3], &v->write, v);        convert_format (r, &fmt[3], &v->write, v);
541    
542        /* Range missing values. */        /* Range missing values. */
543        if (match (r, 'B'))        if (match (r, 'B'))
544          {          {
545            v->miss_type = MISSING_RANGE;            double x = read_float (r);
546            v->missing[0] = parse_value (r, v);            double y = read_float (r);
547            v->missing[1] = parse_value (r, v);            mv_add_num_range (&v->miss, x, y);
548          }          }
549        else if (match (r, 'A'))        else if (match (r, 'A'))
550          {          mv_add_num_range (&v->miss, read_float (r), HIGHEST);
           v->miss_type = MISSING_HIGH;  
           v->missing[0] = parse_value (r, v);  
         }  
551        else if (match (r, '9'))        else if (match (r, '9'))
552          {          mv_add_num_range (&v->miss, LOWEST, read_float (r));
           v->miss_type = MISSING_LOW;  
           v->missing[0] = parse_value (r, v);  
         }  
553    
554        /* Single missing values. */        /* Single missing values. */
555        while (match (r, '8'))        while (match (r, '8'))
556          {          {
557            static const int map_next[MISSING_COUNT] =            union value value = parse_value (r, v);
558              {            mv_add_value (&v->miss, &value);
559                MISSING_1, MISSING_2, MISSING_3, -1,          }
               MISSING_RANGE_1, MISSING_LOW_1, MISSING_HIGH_1,  
               -1, -1, -1,  
             };  
   
           static const int map_ofs[MISSING_COUNT] =  
             {  
               -1, 0, 1, 2, -1, -1, -1, 2, 1, 1,  
             };  
   
           v->miss_type = map_next[v->miss_type];  
           if (v->miss_type == -1)  
             error (r, _("Bad missing values for %s."), v->name);  
             
           assert (map_ofs[v->miss_type] != -1);  
           v->missing[map_ofs[v->miss_type]] = parse_value (r, v);  
         }  
560    
561        if (match (r, 'C'))        if (match (r, 'C'))
562          {          {

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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