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

Diff of /pspp/src/get.c

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

revision 1.20 by blp, Mon Nov 15 09:51:22 2004 UTC revision 1.21 by jmd, Tue Jan 18 11:31:45 2005 UTC
# Line 242  cmd_save (void) Line 242  cmd_save (void)
242      {      {
243        procedure (save_write_case_func, t);        procedure (save_write_case_func, t);
244        save_trns_free (&t->h);        save_trns_free (&t->h);
245          free(t);
246        return CMD_SUCCESS;        return CMD_SUCCESS;
247      }      }
248    else    else
# Line 549  cmd_export (void) Line 550  cmd_export (void)
550    
551    procedure (export_write_case_func, proc);    procedure (export_write_case_func, proc);
552    export_proc_free (proc);    export_proc_free (proc);
553      free (proc);
554    
555    return CMD_SUCCESS;    return CMD_SUCCESS;
556    
557   error:   error:
558    dict_destroy (dict);    dict_destroy (dict);
559    export_proc_free (proc);    export_proc_free (proc);
560      free (proc);
561    return CMD_FAILURE;    return CMD_FAILURE;
562  }  }
563    
# Line 1623  finish_case_map (struct dictionary *d) Line 1626  finish_case_map (struct dictionary *d)
1626    for (i = 0; i < var_cnt; i++)    for (i = 0; i < var_cnt; i++)
1627      {      {
1628        struct variable *v = dict_get_var (d, i);        struct variable *v = dict_get_var (d, i);
1629        int src_fv = *(int *) var_detach_aux (v);        int *src_fv = (int *) var_detach_aux (v);
1630        size_t idx;        size_t idx;
1631    
1632        if (v->fv != src_fv)        if (v->fv != *src_fv)
1633          identity_map = 0;          identity_map = 0;
1634                
1635        for (idx = 0; idx < v->nv; idx++)        for (idx = 0; idx < v->nv; idx++)
1636          {          {
1637            int src_idx = src_fv + idx;            int src_idx = *src_fv + idx;
1638            int dst_idx = v->fv + idx;            int dst_idx = v->fv + idx;
1639                        
1640            assert (map->map[dst_idx] == -1);            assert (map->map[dst_idx] == -1);
1641            map->map[dst_idx] = src_idx;            map->map[dst_idx] = src_idx;
1642          }          }
1643          free (src_fv);
1644      }      }
1645    
1646    if (identity_map)    if (identity_map)

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

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