This patchset removes all occurrences of {,E,F}GREP_PROGRAM outside grep.c. #ifdefs are avoided by splitting search.c into multiple files and letting the linker drop those that are not used. I tested that there is basically no change in executable size for any of {,e,f}grep.
I have one that removes the remaining occurrences, but it introduces new strings so it would require another snapshot before submitting the .POT file to the translation project. Paolo Bonzini (9): grep: remove getpagesize.h grep: remove one #ifdef grep: change struct matcher termination grep: make egrep/fgrep use struct matcher grep: eliminate {COMPILE,EXECUTE}_{RET,ARGS,FCT} grep: remove one #ifdef grep: split search.c grep: prepare for libification of *search.c grep: libify *search.c po/POTFILES.in | 4 +- src/Makefile.am | 16 +- src/dfasearch.c | 387 ++++++++++++++++++++++++ src/esearch.c | 15 +- src/fsearch.c | 9 +- src/getpagesize.h | 61 ---- src/grep.c | 22 +- src/grep.h | 33 +-- src/gsearch.c | 29 ++ src/kwsearch.c | 161 ++++++++++ src/pcresearch.c | 177 +++++++++++ src/search.c | 858 ----------------------------------------------------- src/search.h | 61 ++++ src/searchutils.c | 141 +++++++++ 14 files changed, 1004 insertions(+), 970 deletions(-) create mode 100644 src/dfasearch.c delete mode 100644 src/getpagesize.h create mode 100644 src/gsearch.c create mode 100644 src/kwsearch.c create mode 100644 src/pcresearch.c delete mode 100644 src/search.c create mode 100644 src/search.h create mode 100644 src/searchutils.c