X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fsparse-array.h;h=69e2ed9546f95a80966fd70113b1ce2c68777e7f;hb=a8c6e993d9146233cf380be16c0790f5c5d4b715;hp=09c714811cd3bb515ff58e4d144714611cb3ea34;hpb=f5c108becd49d78f4898cab11352291f5689d24e;p=pspp diff --git a/src/libpspp/sparse-array.h b/src/libpspp/sparse-array.h index 09c714811c..69e2ed9546 100644 --- a/src/libpspp/sparse-array.h +++ b/src/libpspp/sparse-array.h @@ -1,20 +1,18 @@ -/* PSPP - computes sample statistics. - Copyright (C) 2007 Free Software Foundation, Inc. +/* PSPP - a program for statistical analysis. + 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 the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ /* Sparse array data structure. @@ -38,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 *, @@ -51,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 */