/usr/include/sary/searcher.h is in libsary-dev 1:1.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #ifndef __SARY_SEARCHER_H__
#define __SARY_SEARCHER_H__
#include <glib.h>
#include <sary/mmap.h>
#include <sary/text.h>
#include <sary/i.h>
#include <sary/saryconfig.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _SarySearcher SarySearcher;
typedef struct {
const gchar *str;
SaryInt len; /* length of pattern */
SaryInt skip; /* length of bytes which can be skipped */
} SaryPattern;
typedef struct {
SaryInt *first;
SaryInt *last;
} SaryResult;
SarySearcher* sary_searcher_new (const gchar
*file_name);
SarySearcher* sary_searcher_new2 (const gchar *file_name,
const gchar *array_name);
void sary_searcher_destroy (SarySearcher *searcher);
gboolean sary_searcher_search (SarySearcher *searcher,
const gchar *pattern);
gboolean sary_searcher_search2 (SarySearcher *searcher,
const gchar *pattern,
SaryInt len);
gboolean sary_searcher_isearch (SarySearcher *searcher,
const gchar *pattern,
SaryInt len);
void sary_searcher_isearch_reset (SarySearcher *searcher);
gboolean sary_searcher_icase_search (SarySearcher *searcher,
const gchar *pattern);
gboolean sary_searcher_icase_search2 (SarySearcher *searcher,
const gchar *pattern,
SaryInt len);
gboolean sary_searcher_multi_search (SarySearcher *searcher,
gchar **patterns,
gint npatterns);
SaryText* sary_searcher_get_text (SarySearcher *searcher);
SaryMmap* sary_searcher_get_array (SarySearcher *searcher);
gchar* sary_searcher_get_next_line (SarySearcher *searcher);
gchar* sary_searcher_get_next_line2 (SarySearcher *searcher,
SaryInt *len);
gchar* sary_searcher_get_next_context_lines (SarySearcher *searcher,
SaryInt backward,
SaryInt forward);
gchar* sary_searcher_get_next_context_lines2 (SarySearcher *searcher,
SaryInt backward,
SaryInt forward,
SaryInt *len);
gchar* sary_searcher_get_next_tagged_region (SarySearcher *searcher,
const gchar
*start_tag,
const gchar *end_tag);
gchar* sary_searcher_get_next_tagged_region2 (SarySearcher *searcher,
const gchar
*start_tag,
SaryInt start_tag_len,
const gchar *end_tag,
SaryInt end_tag_len,
SaryInt *len);
SaryText* sary_searcher_get_next_occurrence (SarySearcher *searcher);
SaryInt sary_searcher_get_next_position (SarySearcher *searcher);
SaryInt sary_searcher_count_occurrences (SarySearcher *searcher);
void sary_searcher_sort_occurrences (SarySearcher *searcher);
void sary_searcher_enable_cache (SarySearcher *searcher);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __SARY_SEARCHER_H__ */
|