range-set: Rename "insert" function "set1", "delete" to "set0".
[pspp] / src / data / datasheet.c
index de59e73fe842f4fa94009d24b626cc9157464306..bee55f0f77ff5ae1d8ddd2cc5908be0cea217435 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010, 2011 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
 
 #include <config.h>
 
-#include <data/datasheet.h>
+#include "data/datasheet.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-#include <data/casereader-provider.h>
-#include <data/casereader.h>
-#include <data/casewriter.h>
-#include <data/lazy-casereader.h>
-#include <data/settings.h>
-#include <libpspp/array.h>
-#include <libpspp/assertion.h>
-#include <libpspp/misc.h>
-#include <libpspp/range-map.h>
-#include <libpspp/range-set.h>
-#include <libpspp/sparse-xarray.h>
-#include <libpspp/taint.h>
-#include <libpspp/tower.h>
-
-#include "minmax.h"
-#include "md4.h"
-#include "xalloc.h"
+#include "data/casereader-provider.h"
+#include "data/casereader.h"
+#include "data/casewriter.h"
+#include "data/lazy-casereader.h"
+#include "data/settings.h"
+#include "libpspp/array.h"
+#include "libpspp/assertion.h"
+#include "libpspp/misc.h"
+#include "libpspp/range-map.h"
+#include "libpspp/range-set.h"
+#include "libpspp/sparse-xarray.h"
+#include "libpspp/taint.h"
+#include "libpspp/tower.h"
+
+#include "gl/minmax.h"
+#include "gl/md4.h"
+#include "gl/xalloc.h"
 
 struct column;
 
@@ -978,7 +978,7 @@ static void
 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
@@ -1228,7 +1228,7 @@ source_create_empty (size_t n_bytes)
   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;
@@ -1247,7 +1247,7 @@ source_create_casereader (struct casereader *reader)
   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);
 
@@ -1301,7 +1301,7 @@ static void
 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--;
 }