projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
psppire-var-sheet: Hard-code size of pixbuf cells.
[pspp]
/
src
/
libpspp
/
range-set.c
diff --git
a/src/libpspp/range-set.c
b/src/libpspp/range-set.c
index efa3b4d670e7e06c3c560ebc64ade1bf4d45ae21..fc02f3720f8128d638ef67e1d81100fb4f9fe781 100644
(file)
--- a/
src/libpspp/range-set.c
+++ b/
src/libpspp/range-set.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* 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
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
@@
-23,17
+23,17
@@
#include <config.h>
#include <config.h>
-#include
<libpspp/range-set.h>
+#include
"libpspp/range-set.h"
#include <limits.h>
#include <stdlib.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 *,
static int compare_range_set_nodes (const struct bt_node *,
const struct bt_node *,
@@
-106,8
+106,8
@@
range_set_destroy (struct range_set *rs)
/* Inserts the region starting at START and extending for WIDTH
into RS. */
void
/* Inserts the region starting at START and extending for WIDTH
into RS. */
void
-range_set_
insert
(struct range_set *rs,
-
unsigned long int start, unsigned long int width)
+range_set_
set1
(struct range_set *rs,
+ unsigned long int start, unsigned long int width)
{
unsigned long int end = start + width;
struct range_set_node *node;
{
unsigned long int end = start + width;
struct range_set_node *node;
@@
-152,11
+152,11
@@
range_set_insert (struct range_set *rs,
}
}
}
}
-/*
Insert
s the region starting at START and extending for WIDTH
+/*
Delete
s the region starting at START and extending for WIDTH
from RS. */
void
from RS. */
void
-range_set_
delete
(struct range_set *rs,
-
unsigned long int start, unsigned long int width)
+range_set_
set0
(struct range_set *rs,
+ unsigned long int start, unsigned long int width)
{
unsigned long int end = start + width;
struct range_set_node *node;
{
unsigned long int end = start + width;
struct range_set_node *node;
@@
-287,7
+287,7
@@
range_set_allocate_fully (struct range_set *rs, unsigned long int request,
bool
range_set_contains (const struct range_set *rs_, unsigned long int position)
{
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
if (position < rs->cache_end && position >= rs->cache_start)
return rs->cache_value;
else
@@
-328,7
+328,7
@@
range_set_contains (const struct range_set *rs_, unsigned long int position)
unsigned long int
range_set_scan (const struct range_set *rs_, unsigned long int start)
{
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;
unsigned long int retval = ULONG_MAX;
struct bt_node *bt_node;