str-two-way.h File Reference

#include <limits.h>
#include <stdint.h>

Include dependency graph for str-two-way.h:

Go to the source code of this file.

Defines

#define LONG_NEEDLE_THRESHOLD   32U
#define MAX(a, b)   ((a < b) ? (b) : (a))
#define CANON_ELEMENT(c)   c
#define CMP_FUNC   memcmp

Functions

static size_t critical_factorization (const unsigned char *needle, size_t needle_len, size_t *period)
static RETURN_TYPE two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len)
static RETURN_TYPE two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len)


Define Documentation

#define CANON_ELEMENT (  )     c

Definition at line 75 of file str-two-way.h.

Referenced by critical_factorization(), two_way_long_needle(), and two_way_short_needle().

#define CMP_FUNC   memcmp

Definition at line 78 of file str-two-way.h.

Referenced by two_way_long_needle(), and two_way_short_needle().

#define LONG_NEEDLE_THRESHOLD   32U

Definition at line 65 of file str-two-way.h.

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

Definition at line 71 of file str-two-way.h.


Function Documentation

static size_t critical_factorization ( const unsigned char *  needle,
size_t  needle_len,
size_t *  period 
) [static]

Definition at line 105 of file str-two-way.h.

References CANON_ELEMENT.

Referenced by two_way_long_needle(), and two_way_short_needle().

Here is the caller graph for this function:

static RETURN_TYPE two_way_long_needle ( const unsigned char *  haystack,
size_t  haystack_len,
const unsigned char *  needle,
size_t  needle_len 
) [static]

Definition at line 306 of file str-two-way.h.

References CANON_ELEMENT, CMP_FUNC, critical_factorization(), and MAX.

Here is the call graph for this function:

static RETURN_TYPE two_way_short_needle ( const unsigned char *  haystack,
size_t  haystack_len,
const unsigned char *  needle,
size_t  needle_len 
) [static]

Definition at line 212 of file str-two-way.h.

References CANON_ELEMENT, CMP_FUNC, critical_factorization(), and MAX.

Here is the call graph for this function:


Generated on Sun Jul 26 17:23:15 2009 for GNU libmicrohttpd by  doxygen 1.5.9