/* PSPP - a program for statistical analysis.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 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 <libpspp/range-set.h>
+#include "libpspp/range-set.h"
#include <limits.h>
#include <stdlib.h>
-#include <libpspp/assertion.h>
-#include <libpspp/compiler.h>
-#include <libpspp/pool.h>
+#include "libpspp/assertion.h"
+#include "libpspp/compiler.h"
+#include "libpspp/pool.h"
-#include "minmax.h"
-#include "xalloc.h"
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
static int compare_range_set_nodes (const struct bt_node *,
const struct bt_node *,
}
}
-/* Inserts the region starting at START and extending for WIDTH
+/* Deletes the region starting at START and extending for WIDTH
from RS. */
void
range_set_delete (struct range_set *rs,
bool
range_set_contains (const struct range_set *rs_, unsigned long int position)
{
- struct range_set *rs = (struct range_set *) rs_;
+ struct range_set *rs = CONST_CAST (struct range_set *, rs_);
if (position < rs->cache_end && position >= rs->cache_start)
return rs->cache_value;
else
unsigned long int
range_set_scan (const struct range_set *rs_, unsigned long int start)
{
- struct range_set *rs = (struct range_set *) rs_;
+ struct range_set *rs = CONST_CAST (struct range_set *, rs_);
unsigned long int retval = ULONG_MAX;
struct bt_node *bt_node;