/[pspp]/pspp/src/apply-dict.c
ViewVC logotype

Diff of /pspp/src/apply-dict.c

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

revision 1.8 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.9 by blp, Sun Aug 7 04:39:28 2005 UTC
# Line 129  cmd_apply_dictionary (void) Line 129  cmd_apply_dictionary (void)
129              }              }
130          }          }
131    
132        if (s->miss_type != MISSING_NONE && t->width > MAX_SHORT_STRING)        if (!mv_is_empty (&s->miss) && t->width > MAX_SHORT_STRING)
133          msg (SW, _("Cannot apply missing values from source file to "          msg (SW, _("Cannot apply missing values from source file to "
134                     "long string variable %s."),                     "long string variable %s."),
135               s->name);               s->name);
136        else if (s->miss_type != MISSING_NONE)        else if (!mv_is_empty (&s->miss))
137          {          {
138            if (t->width < s->width)            if (mv_is_resizable (&s->miss, t->width))
139              {              {
140                static const int miss_count[MISSING_COUNT] =                mv_copy (&t->miss, &s->miss);
141                  {                mv_resize (&t->miss, t->width);
142                    0, 1, 2, 3, 2, 1, 1, 3, 2, 2,              }
                 };  
   
               int j, k;  
                 
               for (j = 0; j < miss_count[s->miss_type]; j++)  
                 for (k = t->width; k < s->width; k++)  
                   if (s->missing[j].s[k] != ' ')  
                     goto skip_missing_values;  
             }  
   
           t->miss_type = s->miss_type;  
           memcpy (t->missing, s->missing, sizeof s->missing);  
143          }          }
     skip_missing_values: ;  
144    
145        if (s->type == NUMERIC)        if (s->type == NUMERIC)
146          {          {

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