X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fstringi-set.h;h=ea4fad6bcf47e9cc34ae54aebe6867652f65b005;hb=409dfe7159b9b0fd96c67cfddd4ffa93e05aa9b2;hp=caccca8626e389a6e244b80d2d0f05bfc05dece2;hpb=ac4a498528bce608cd2009bef01fd08d049a02af;p=pspp diff --git a/src/libpspp/stringi-set.h b/src/libpspp/stringi-set.h index caccca8626..ea4fad6bcf 100644 --- a/src/libpspp/stringi-set.h +++ b/src/libpspp/stringi-set.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 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 @@ -22,7 +22,7 @@ This is a convenient wrapper around a "struct hmap" for storing strings. */ #include -#include +#include "libpspp/hmap.h" /* A node in the string set. */ struct stringi_set_node @@ -60,8 +60,13 @@ static inline size_t stringi_set_count (const struct stringi_set *); static inline bool stringi_set_is_empty (const struct stringi_set *); bool stringi_set_contains (const struct stringi_set *, const char *); +bool stringi_set_contains_len (const struct stringi_set *, const char *, + size_t length); struct stringi_set_node *stringi_set_find_node (const struct stringi_set *, - const char *); + const char *); +struct stringi_set_node *stringi_set_find_node_len (const struct stringi_set *, + const char *, + size_t length); bool stringi_set_insert (struct stringi_set *, const char *); bool stringi_set_insert_nocopy (struct stringi_set *, char *); @@ -77,6 +82,9 @@ void stringi_set_union_and_intersection (struct stringi_set *, void stringi_set_intersect (struct stringi_set *, const struct stringi_set *); void stringi_set_subtract (struct stringi_set *, const struct stringi_set *); +char **stringi_set_get_array (const struct stringi_set *); +char **stringi_set_get_sorted_array (const struct stringi_set *); + static inline const struct stringi_set_node *stringi_set_first ( const struct stringi_set *); static inline const struct stringi_set_node *stringi_set_next (