/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * * Copyright (C) 2000 Helix Code, Inc. * * Authors: Michael Zucchi * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public License * as published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with the Gnome Library; see the file COPYING.LIB. If not, * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef _WORDINDEX_H #define _WORDINDEX_H #include #include "block.h" #include "index.h" struct _IBEXWord; /* not used yet */ typedef void (*IBEXNormaliseFunc)(char *source, int len, char *dest); struct _IBEXWordClass { int (*sync)(struct _IBEXWord *); int (*flush)(struct _IBEXWord *); int (*close)(struct _IBEXWord *); void (*index_pre)(struct _IBEXWord *); /* get ready for doing a lot of indexing. may be a nop */ void (*index_post)(struct _IBEXWord *); void (*unindex_name)(struct _IBEXWord *, const char *name); /* unindex all entries for name */ gboolean (*contains_name)(struct _IBEXWord *, const char *name); /* index contains data for name */ GPtrArray *(*find)(struct _IBEXWord *, const char *word); /* returns all matches for word */ gboolean (*find_name)(struct _IBEXWord *, const char *name, const char *word); /* find if name contains word */ void (*add)(struct _IBEXWord *, const char *name, const char *word); /* adds a single word to name */ void (*add_list)(struct _IBEXWord *, const char *name, GPtrArray *words);/* adds a bunch of words to a given name */ }; struct _IBEXWord { struct _IBEXWordClass *klass; struct _IBEXStore *wordstore; struct _IBEXIndex *wordindex; struct _IBEXStore *namestore; struct _IBEXIndex *nameindex; /* word caching info (should probably be modularised) */ GHashTable *wordcache; /* word->struct _wordcache mapping */ struct _list wordnodes; /* LRU list of wordcache structures */ int wordcount; /* how much space used in cache */ int precount; GHashTable *namecache; /* a list of names (only), cached for quick reference */ int nameinit; }; struct _IBEXWord *ibex_create_word_index(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot); /* alternate implemenation */ struct _IBEXWord *ibex_create_word_index_mem(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot); #endif /* !_WORDINDEX_H */ serve-10.1.2'>dependabot/npm_and_yarn/devel/electron4/files/serve-10.1.2 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* - Update to 0.10.5clsung2007-07-185-35/+21
* - Request update to 0.10.4clsung2006-12-293-10/+16
* - unbreak on 4.xclsung2006-12-213-4/+24
* - I'll maintain these two ports from now on.clsung2006-11-061-1/+1
* Now builds on sparc64kris2006-09-181-4/+0
* - Mark broken on 4.Xpav2006-04-041-0/+4
* - Update to 0.10.3pav2006-04-012-5/+5
* Update to 0.10.2erwin2006-01-242-9/+7
* - Pass maintainership to rui@ruilopes.comgarga2005-11-041-1/+1
* BROKEN on sparc64: Does not compile completelykris2005-08-311-0/+4
* - Update to 0.9.14sem2005-07-312-15/+9
* BROKEN on !i386: Does not compilekris2005-03-271-4/+4
* Fix plist (add missing man pages).thierry2005-01-031-4/+6
* Upgrade to 0.9.13.thierry2004-12-292-5/+3