X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_ignorelist.h;h=a7fa86d5482caa71f4b1028430dc3c8a017bb24e;hb=461ea8f0de4ea5b6106e681c3436b02e59324f68;hp=30d508b076d414c937e32459dc40e1e508b3b2eb;hpb=ba5aa781cacb54b167867929759bda738c386a91;p=collectd.git diff --git a/src/utils_ignorelist.h b/src/utils_ignorelist.h index 30d508b0..a7fa86d5 100644 --- a/src/utils_ignorelist.h +++ b/src/utils_ignorelist.h @@ -1,5 +1,5 @@ /** - * collectd - src/config_list.h + * collectd - src/utils_ignorelist.h * Copyright (C) 2006 Lubos Stanek * * This program is free software; you can redistribute it and/ @@ -12,10 +12,9 @@ * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public Licence for more details. * - * You should have received a copy of the GNU General Public - * Licence along with this program; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, - * USA. + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: * Lubos Stanek @@ -28,10 +27,10 @@ #ifndef UTILS_IGNORELIST_H #define UTILS_IGNORELIST_H 1 -#include "common.h" +#include "collectd.h" #if HAVE_REGEX_H -# include +#include #endif /* public prototypes */ @@ -43,39 +42,28 @@ typedef struct ignorelist_s ignorelist_t; * create the ignorelist_t with known ignore state * return pointer to ignorelist_t */ -ignorelist_t *ignorelist_create (int ignore); - -/* - * create ignorelist_t and initialize the ignore state to 0 - * return pointer to ignorelist_t - */ -ignorelist_t *ignorelist_init (void); +ignorelist_t *ignorelist_create(int invert); /* * free memory used by ignorelist_t */ -void ignorelist_free (ignorelist_t *conflist); +void ignorelist_free(ignorelist_t *il); /* * set ignore state of the ignorelist_t */ -void ignorelist_ignore (ignorelist_t *conflist, int ignore); -/* - * get number of entries in the ignorelist_t - * return int number - */ -int ignorelist_num (ignorelist_t *conflist); +void ignorelist_set_invert(ignorelist_t *il, int invert); /* * append entry to ignorelist_t - * return 1 for success + * returns zero on success, non-zero upon failure. */ -int ignorelist_add (ignorelist_t *conflist, const char *entry); +int ignorelist_add(ignorelist_t *il, const char *entry); /* * check list for entry * return 1 for ignored entry */ -int ignorelist_ignored (ignorelist_t *conflist, const char *entry); +int ignorelist_match(ignorelist_t *il, const char *entry); #endif /* UTILS_IGNORELIST_H */