Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
snip.c File Reference
#include "groonga_in.h"
#include <string.h>
#include <stddef.h>
#include "snip.h"
#include "ctx.h"
Include dependency graph for snip.c:

Go to the source code of this file.

Macros

#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define GRN_BM_COMPARE
#define GRN_BM_BM_COMPARE

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_snipgrn_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 GRN_BM_COMPARE

Definition at line 85 of file snip.c.

#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 24 of file snip.c.

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 28 of file snip.c.

Function Documentation

void grn_bm_tunedbm ( grn_ctx ctx,
snip_cond cond,
grn_obj string,
int  flags 
)

Definition at line 133 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 343 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_snip_close ( grn_ctx ctx,
grn_snip snip 
)

Definition at line 557 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_snip_close_real ( grn_ctx ctx,
grn_snip snip 
)

Definition at line 526 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_snip_cond_close ( grn_ctx ctx,
snip_cond cond 
)

Definition at line 249 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_snip_cond_init ( grn_ctx ctx,
snip_cond sc,
const char *  keyword,
unsigned int  keyword_len,
grn_encoding  enc,
int  flags 
)

Definition at line 261 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_snip_cond_reinit ( snip_cond cond)

Definition at line 290 of file snip.c.

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 
)

Definition at line 564 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_snip_get_result ( grn_ctx ctx,
grn_snip snip,
const unsigned int  index,
char *  result,
unsigned int *  result_len 
)

Definition at line 735 of file snip.c.

Here is the caller graph for this function:

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 
)

Definition at line 439 of file snip.c.

Here is the call graph for this function:

Here is the caller graph for this function: