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

Diff for /mandoc/main.c between version 1.285 and 1.286

version 1.285, 2017/03/03 14:23:23 version 1.286, 2017/03/20 14:32:24
Line 93  static void    fs_search(const struct mansearch *,
Line 93  static void    fs_search(const struct mansearch *,
                                 const struct manpaths *, int, char**,                                  const struct manpaths *, int, char**,
                                 struct manpage **, size_t *);                                  struct manpage **, size_t *);
 static  int               koptions(int *, char *);  static  int               koptions(int *, char *);
 static  int               moptions(int *, char *);  static  void              moptions(int *, char *);
 static  void              mmsg(enum mandocerr, enum mandoclevel,  static  void              mmsg(enum mandocerr, enum mandoclevel,
                                 const char *, int, int, const char *);                                  const char *, int, int, const char *);
 static  void              outdata_alloc(struct curparse *);  static  void              outdata_alloc(struct curparse *);
Line 442  main(int argc, char *argv[])
Line 442  main(int argc, char *argv[])
         }          }
 #endif  #endif
   
         if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))          if (search.argmode == ARG_FILE)
                 return (int)MANDOCLEVEL_BADARG;                  moptions(&options, auxpaths);
   
         mchars_alloc();          mchars_alloc();
         curp.mp = mparse_alloc(options, curp.wlevel, mmsg, defos);          curp.mp = mparse_alloc(options, curp.wlevel, mmsg, defos);
Line 919  koptions(int *options, char *arg)
Line 919  koptions(int *options, char *arg)
         return 1;          return 1;
 }  }
   
 static int  static void
 moptions(int *options, char *arg)  moptions(int *options, char *arg)
 {  {
   
         if (arg == NULL)          if (arg == NULL)
                 /* nothing to do */;                  return;
         else if (0 == strcmp(arg, "doc"))          if (strcmp(arg, "doc") == 0)
                 *options |= MPARSE_MDOC;                  *options |= MPARSE_MDOC;
         else if (0 == strcmp(arg, "andoc"))          else if (strcmp(arg, "an") == 0)
                 /* nothing to do */;  
         else if (0 == strcmp(arg, "an"))  
                 *options |= MPARSE_MAN;                  *options |= MPARSE_MAN;
         else {  
                 warnx("-m %s: Bad argument", arg);  
                 return 0;  
         }  
   
         return 1;  
 }  }
   
 static int  static int

Legend:
Removed from v.1.285  
changed lines
  Added in v.1.286

CVSweb