/[man-db]/man-db/src/whatis.c
ViewVC logotype

Diff of /man-db/src/whatis.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by cjwatson, Mon Apr 28 14:12:43 2003 UTC revision 1.31 by cjwatson, Thu May 1 15:54:03 2003 UTC
# Line 183  static __inline__ int use_grep (char *pa Line 183  static __inline__ int use_grep (char *pa
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 = "^";
# Line 599  static void search (char *page) Line 600  static void search (char *page)
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]));
# Line 611  int main (int argc, char *argv[]) Line 612  int main (int argc, char *argv[])
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);
# Line 674  int main (int argc, char *argv[]) Line 675  int main (int argc, char *argv[])
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,

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26