X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fsparse-array.h;h=69e2ed9546f95a80966fd70113b1ce2c68777e7f;hb=2e4f99b049133c801ca4feffddb86bbf33de3978;hp=e8be2e182bc37fa48fd72964ef52c9d4be58db4b;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp diff --git a/src/libpspp/sparse-array.h b/src/libpspp/sparse-array.h index e8be2e182b..69e2ed9546 100644 --- a/src/libpspp/sparse-array.h +++ b/src/libpspp/sparse-array.h @@ -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 @@ -36,7 +36,7 @@ #include #include -#include +struct pool; struct sparse_array *sparse_array_create (size_t elem_size); struct sparse_array *sparse_array_create_pool (struct pool *, @@ -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 */