#include "groonga_in.h"
#include <string.h>
#include <stddef.h>
#include "snip.h"
#include "ctx.h"
Go to the source code of this file.
Functions |
void | grn_bm_tunedbm (grn_ctx *ctx, snip_cond *cond, grn_obj *string, int flags) |
grn_rc | grn_snip_cond_close (grn_ctx *ctx, snip_cond *cond) |
grn_rc | grn_snip_cond_init (grn_ctx *ctx, snip_cond *sc, const char *keyword, unsigned int keyword_len, grn_encoding enc, int flags) |
void | grn_snip_cond_reinit (snip_cond *cond) |
grn_rc | grn_snip_add_cond (grn_ctx *ctx, grn_snip *snip, const char *keyword, unsigned int keyword_len, const char *opentag, unsigned int opentag_len, const char *closetag, unsigned int closetag_len) |
grn_snip * | grn_snip_open (grn_ctx *ctx, int flags, unsigned int width, unsigned int max_results, const char *defaultopentag, unsigned int defaultopentag_len, const char *defaultclosetag, unsigned int defaultclosetag_len, grn_snip_mapping *mapping) |
grn_rc | grn_snip_close_real (grn_ctx *ctx, grn_snip *snip) |
grn_rc | grn_snip_close (grn_ctx *ctx, grn_snip *snip) |
grn_rc | grn_snip_exec (grn_ctx *ctx, grn_snip *snip, const char *string, unsigned int string_len, unsigned int *nresults, unsigned int *max_tagged_len) |
grn_rc | grn_snip_get_result (grn_ctx *ctx, grn_snip *snip, const unsigned int index, char *result, unsigned int *result_len) |
Macro Definition Documentation
#define GRN_BM_BM_COMPARE |
Value:do { \
if (p[-2] == ck) { \
for (
i = 3;
i <= m && p[-(intptr_t)i] == cp[-(intptr_t)i]; ++i) { \
} \
if (i > m) { \
found = p - y - m; \
GRN_BM_COMPARE; \
} \
} \
} while (0)
Definition at line 121 of file snip.c.
#define MAX |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) > (b) ? (a) : (b)) |
#define MIN |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < (b) ? (a) : (b)) |
Function Documentation
grn_rc grn_snip_add_cond |
( |
grn_ctx * |
ctx, |
|
|
grn_snip * |
snip, |
|
|
const char * |
keyword, |
|
|
unsigned int |
keyword_len, |
|
|
const char * |
opentag, |
|
|
unsigned int |
opentag_len, |
|
|
const char * |
closetag, |
|
|
unsigned int |
closetag_len |
|
) |
| |
void grn_snip_cond_reinit |
( |
snip_cond * |
cond | ) |
|
grn_rc grn_snip_exec |
( |
grn_ctx * |
ctx, |
|
|
grn_snip * |
snip, |
|
|
const char * |
string, |
|
|
unsigned int |
string_len, |
|
|
unsigned int * |
nresults, |
|
|
unsigned int * |
max_tagged_len |
|
) |
| |
grn_rc grn_snip_get_result |
( |
grn_ctx * |
ctx, |
|
|
grn_snip * |
snip, |
|
|
const unsigned int |
index, |
|
|
char * |
result, |
|
|
unsigned int * |
result_len |
|
) |
| |
grn_snip* grn_snip_open |
( |
grn_ctx * |
ctx, |
|
|
int |
flags, |
|
|
unsigned int |
width, |
|
|
unsigned int |
max_results, |
|
|
const char * |
defaultopentag, |
|
|
unsigned int |
defaultopentag_len, |
|
|
const char * |
defaultclosetag, |
|
|
unsigned int |
defaultclosetag_len, |
|
|
grn_snip_mapping * |
mapping |
|
) |
| |