summaryrefslogtreecommitdiff
path: root/src/searchutils.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@penguin.cs.ucla.edu>2014-04-03 18:14:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-04-05 16:32:44 -0700
commit8d0fcb8a231acfdb45fbab7c9df14cda90756c55 (patch)
treebe61d493a74abd1a1077a7601812aad97ad37a9c /src/searchutils.c
parentd80c9a5da2c5e04844ac39f8cdd45e6425b2dde6 (diff)
downloadgrep-8d0fcb8a231acfdb45fbab7c9df14cda90756c55.tar.gz
grep: simplify dfa.c by having it not include mbsupport.h directly
* src/mbsupport.h: Remove. * src/Makefile.am (noinst_HEADERS): Remove mbsupport.h. * src/dfa.c, src/grep.c, src/search.h: Don't include mbsupport.h. * src/dfa.c: Include wchar.h and wctype.h unconditionally, as this simplifies the use of dfa.c in grep, and it does no harm in gawk. (setlocale, static_assert): Remove gawk-specific hacks, as gawk now does these itself. (struct dfa, dfambcache, mbs_to_wchar) (is_valid_unibyte_character, setbit_wc, using_utf8, FETCH_WC) (addtok_wc, add_utf8_anychar, atom, state_index, epsclosure) (dfaanalyze, dfastate, prepare_wc_buf, dfaoptimize, dfafree, dfamust): * src/dfasearch.c (EGexecute): * src/grep.c (main): * src/searchutils.c (mbtoupper): Assume MBS_SUPPORT.
Diffstat (limited to 'src/searchutils.c')
-rw-r--r--src/searchutils.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/searchutils.c b/src/searchutils.c
index babb31f0..6749945f 100644
--- a/src/searchutils.c
+++ b/src/searchutils.c
@@ -48,7 +48,6 @@ kwsinit (kwset_t *kwset)
xalloc_die ();
}
-#if MBS_SUPPORT
/* Convert BEG, an *N-byte string, to uppercase, and write the
NUL-terminated result into malloc'd storage. Upon success, set *N
to the length (in bytes) of the resulting string (not including the
@@ -276,4 +275,3 @@ is_mb_middle (const char **good, const char *buf, const char *end,
/* P == BUF here. */
return 0 < match_len && match_len < mbrlen (p, end - p, &cur_state);
}
-#endif /* MBS_SUPPORT */