183 |
if (access (whatis_file, R_OK) == 0) { |
if (access (whatis_file, R_OK) == 0) { |
184 |
char *esc_page = escape_shell (page); |
char *esc_page = escape_shell (page); |
185 |
char *esc_file = escape_shell (whatis_file); |
char *esc_file = escape_shell (whatis_file); |
186 |
char *flags, *anchor, *command; |
const char *flags, *anchor; |
187 |
|
char *command; |
188 |
#if defined(WHATIS) |
#if defined(WHATIS) |
189 |
flags = get_def ("whatis_grep_flags", WHATIS_GREP_FLAGS); |
flags = get_def ("whatis_grep_flags", WHATIS_GREP_FLAGS); |
190 |
anchor = "^"; |
anchor = "^"; |
600 |
int main (int argc, char *argv[]) |
int main (int argc, char *argv[]) |
601 |
{ |
{ |
602 |
int c; |
int c; |
603 |
char *manp = NULL, *alt_systems = ""; |
const char *manp = NULL, *alt_systems = ""; |
604 |
char *llocale = 0, *locale; |
char *llocale = NULL, *locale; |
605 |
int option_index; |
int option_index; |
606 |
|
|
607 |
program_name = xstrdup (basename (argv[0])); |
program_name = xstrdup (basename (argv[0])); |
612 |
/* Obviously can't translate this. */ |
/* Obviously can't translate this. */ |
613 |
error (0, 0, "can't set the locale; make sure $LC_* and $LANG " |
error (0, 0, "can't set the locale; make sure $LC_* and $LANG " |
614 |
"are correct"); |
"are correct"); |
615 |
locale = "C"; |
locale = xstrdup ("C"); |
616 |
} |
} |
617 |
bindtextdomain (PACKAGE, LOCALEDIR); |
bindtextdomain (PACKAGE, LOCALEDIR); |
618 |
textdomain (PACKAGE); |
textdomain (PACKAGE); |
675 |
issued as an argument or in $MANOPT */ |
issued as an argument or in $MANOPT */ |
676 |
if (llocale) { |
if (llocale) { |
677 |
setlocale (LC_ALL, llocale); |
setlocale (LC_ALL, llocale); |
678 |
|
free (locale); |
679 |
locale = xstrdup (llocale); |
locale = xstrdup (llocale); |
680 |
if (debug) |
if (debug) |
681 |
fprintf(stderr, |
fprintf(stderr, |