186 |
const char *flags, *anchor; |
const char *flags, *anchor; |
187 |
char *command; |
char *command; |
188 |
#if defined(WHATIS) |
#if defined(WHATIS) |
189 |
flags = get_def ("whatis_grep_flags", WHATIS_GREP_FLAGS); |
flags = get_def_user ("whatis_grep_flags", WHATIS_GREP_FLAGS); |
190 |
anchor = "^"; |
anchor = "^"; |
191 |
#elif defined(APROPOS) |
#elif defined(APROPOS) |
192 |
#ifdef REGEX |
#ifdef REGEX |
193 |
if (regex) |
if (regex) |
194 |
flags = get_def ("apropos_regex_grep_flags", |
flags = get_def_user ("apropos_regex_grep_flags", |
195 |
APROPOS_REGEX_GREP_FLAGS); |
APROPOS_REGEX_GREP_FLAGS); |
196 |
else |
else |
197 |
#endif |
#endif |
198 |
flags = get_def ("apropos_grep_flags", |
flags = get_def_user ("apropos_grep_flags", |
199 |
APROPOS_GREP_FLAGS); |
APROPOS_GREP_FLAGS); |
200 |
anchor = ""; |
anchor = ""; |
201 |
#endif |
#endif |
202 |
|
|
203 |
command = strappend (NULL, get_def ("grep", GREP), " ", flags, |
command = strappend (NULL, get_def_user ("grep", GREP), |
204 |
|
" ", flags, |
205 |
" ", anchor, esc_page, " ", esc_file, |
" ", anchor, esc_page, " ", esc_file, |
206 |
NULL); |
NULL); |
207 |
status = (system (command) == 0); |
status = (system (command) == 0); |