/[pspp]/pspp/src/list.q
ViewVC logotype

Diff of /pspp/src/list.q

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

revision 1.18 by blp, Mon Oct 24 02:51:32 2005 UTC revision 1.19 by blp, Wed Oct 26 05:06:14 2005 UTC
# Line 191  cmd_list (void) Line 191  cmd_list (void)
191              {              {
192                /* Add the weight variable to the end of the variable list. */                /* Add the weight variable to the end of the variable list. */
193                cmd.n_variables++;                cmd.n_variables++;
194                cmd.v_variables = xrealloc (cmd.v_variables,                cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
195                                            (cmd.n_variables                                             sizeof *cmd.v_variables);
                                            * sizeof *cmd.v_variables));  
196                cmd.v_variables[cmd.n_variables - 1]                cmd.v_variables[cmd.n_variables - 1]
197                  = dict_get_weight (default_dict);                  = dict_get_weight (default_dict);
198              }              }
# Line 215  cmd_list (void) Line 214  cmd_list (void)
214    
215        /* Add the weight variable at the beginning of the variable list. */        /* Add the weight variable at the beginning of the variable list. */
216        cmd.n_variables++;        cmd.n_variables++;
217        cmd.v_variables = xrealloc (cmd.v_variables,        cmd.v_variables = xnrealloc (cmd.v_variables,
218                                    cmd.n_variables * sizeof *cmd.v_variables);                                     cmd.n_variables, sizeof *cmd.v_variables);
219        memmove (&cmd.v_variables[1], &cmd.v_variables[0],        memmove (&cmd.v_variables[1], &cmd.v_variables[0],
220                 (cmd.n_variables - 1) * sizeof *cmd.v_variables);                 (cmd.n_variables - 1) * sizeof *cmd.v_variables);
221        cmd.v_variables[0] = &casenum_var;        cmd.v_variables[0] = &casenum_var;
# Line 303  write_header (struct outp_driver *d) Line 302  write_header (struct outp_driver *d)
302        size_t x;        size_t x;
303                
304        /* Allocate, initialize header. */        /* Allocate, initialize header. */
305        prc->header = xmalloc (sizeof (char *) * prc->header_rows);        prc->header = xnmalloc (prc->header_rows, sizeof *prc->header);
306        {        {
307          int w = n_chars_width (d);          int w = n_chars_width (d);
308          for (i = 0; i < prc->header_rows; i++)          for (i = 0; i < prc->header_rows; i++)

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

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