/* PSPP - a program for statistical analysis.
- Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (!source_read (&old_col, prow, &src))
{
/* FIXME: back out col changes. */
- return false;
+ break;
}
resize_cb (&src, &dst, resize_cb_aux);
if (!source_write (col, prow, &dst))
{
/* FIXME: back out col changes. */
- return false;
+ break;
}
}
+ value_destroy (&src, old_width);
+ value_destroy (&dst, new_width);
+ if (lrow < n_rows)
+ return false;
release_source (ds, old_col.source);
}
md4_process_bytes (&size, sizeof size, ctx);
}
- for (rsn = range_set_first (axis->available); rsn != NULL;
- rsn = range_set_next (axis->available, rsn))
+ RANGE_SET_FOR_EACH (rsn, axis->available)
{
unsigned long int start = range_set_node_get_start (rsn);
unsigned long int end = range_set_node_get_end (rsn);
axis_make_available (struct axis *axis,
unsigned long int start, unsigned long int width)
{
- range_set_insert (axis->available, start, width);
+ range_set_set1 (axis->available, start, width);
}
/* Extends the total physical length of AXIS by WIDTH and returns
size_t row_size = n_bytes + 4 * sizeof (void *);
size_t max_memory_rows = settings_get_workspace () / row_size;
source->avail = range_set_create ();
- range_set_insert (source->avail, 0, n_bytes);
+ range_set_set1 (source->avail, 0, n_bytes);
source->data = sparse_xarray_create (n_bytes, MAX (max_memory_rows, 4));
source->backing = NULL;
source->backing_rows = 0;
size_t n_columns;
size_t i;
- range_set_delete (source->avail, 0, n_bytes);
+ range_set_set0 (source->avail, 0, n_bytes);
source->backing = reader;
source->backing_rows = casereader_count_cases (reader);
source_release_column (struct source *source, int ofs, int width)
{
assert (width >= 0);
- range_set_insert (source->avail, ofs, width_to_n_bytes (width));
+ range_set_set1 (source->avail, ofs, width_to_n_bytes (width));
if (source->backing != NULL)
source->n_used--;
}