freebsd-dev/gnu/usr.bin/grep/mbcache.h
tjr b9668a8847 Make grep run much (~10x) faster in multibyte locales by caching the wide
character representation of input data across calls to dfaexec(), and by
caching the lengths of character across calls to check_multibyte_string().

Obtained from:	Fedora (Tim Waugh)
2004-07-04 16:16:59 +00:00

12 lines
222 B
C

/* $FreeBSD$ */
#ifndef MB_CACHE_DEFINED
#define MB_CACHE_DEFINED
struct mb_cache
{
size_t len;
const char *orig_buf; /* not the only reference; do not free */
wchar_t *wcs_buf;
unsigned char *mblen_buf;
};
#endif