[BACK]Return to apropos.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/Attic/apropos.c between version 1.33 and 1.34

version 1.33, 2012/06/09 17:49:13 version 1.34, 2013/07/05 09:33:02
Line 37  main(int argc, char *argv[])
Line 37  main(int argc, char *argv[])
         struct mansearch search;          struct mansearch search;
         size_t           i, sz;          size_t           i, sz;
         struct manpage  *res;          struct manpage  *res;
         char            *conf_file, *defpaths, *auxpaths;  
         struct manpaths  paths;          struct manpaths  paths;
           char            *defpaths, *auxpaths;
           char            *conf_file;
         char            *progname;          char            *progname;
         extern char     *optarg;          extern char     *optarg;
         extern int       optind;          extern int       optind;
Line 49  main(int argc, char *argv[])
Line 50  main(int argc, char *argv[])
         else          else
                 ++progname;                  ++progname;
   
         auxpaths = defpaths = conf_file = NULL;          whatis = (0 == strncmp(progname, "whatis", 6));
   
         memset(&paths, 0, sizeof(struct manpaths));          memset(&paths, 0, sizeof(struct manpaths));
         memset(&search, 0, sizeof(struct mansearch));          memset(&search, 0, sizeof(struct mansearch));
         whatis = (0 == strcmp(progname, "whatis"));  
   
           auxpaths = defpaths = NULL;
           conf_file = NULL;
   
         while (-1 != (ch = getopt(argc, argv, "C:M:m:S:s:")))          while (-1 != (ch = getopt(argc, argv, "C:M:m:S:s:")))
                 switch (ch) {                  switch (ch) {
                 case ('C'):                  case ('C'):
Line 99  main(int argc, char *argv[])
Line 103  main(int argc, char *argv[])
         free(res);          free(res);
         return(sz ? EXIT_SUCCESS : EXIT_FAILURE);          return(sz ? EXIT_SUCCESS : EXIT_FAILURE);
 usage:  usage:
         fprintf(stderr, "usage: %s [-C conf] "          fprintf(stderr, "usage: %s [-C file] [-M path] [-m path] "
                                   "[-M paths] "                          "[-S arch] [-s section]%s ...\n", progname,
                                   "[-m paths] "                          whatis ? " name" : "\n               expression");
                                   "[-S arch] "  
                                   "[-s section] "  
                                   "expr ...\n",  
                                   progname);  
         return(EXIT_FAILURE);          return(EXIT_FAILURE);
 }  }

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

CVSweb