sparse-array: Improve iteration interface.
[pspp-builds.git] / src / libpspp / sparse-array.h
index e8be2e182bc37fa48fd72964ef52c9d4be58db4b..56360cabc0c47c4f11eb52f17af8fe91b5f088a1 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 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
@@ -49,8 +49,13 @@ void *sparse_array_insert (struct sparse_array *, unsigned long int key);
 void *sparse_array_get (const struct sparse_array *, unsigned long int key);
 bool sparse_array_remove (struct sparse_array *, unsigned long int key);
 
-void *sparse_array_scan (const struct sparse_array *,
-                         unsigned long int *skip,
-                         unsigned long int *key);
+void *sparse_array_first (const struct sparse_array *,
+                          unsigned long int *idxp);
+void *sparse_array_next (const struct sparse_array *,
+                         unsigned long int skip, unsigned long int *idxp);
+void *sparse_array_last (const struct sparse_array *,
+                          unsigned long int *idxp);
+void *sparse_array_prev (const struct sparse_array *,
+                         unsigned long int skip, unsigned long int *idxp);
 
 #endif /* libpspp/sparse-array.h */