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

Diff for /mandoc/main.c between version 1.33 and 1.34

version 1.33, 2009/07/04 09:01:55 version 1.34, 2009/07/04 11:10:36
Line 554  toptions(enum outt *tflags, char *arg)
Line 554  toptions(enum outt *tflags, char *arg)
 static int  static int
 foptions(int *fflags, char *arg)  foptions(int *fflags, char *arg)
 {  {
         char            *v;          char            *v, *o;
         char            *toks[6];          char            *toks[6];
   
         toks[0] = "ign-scope";          toks[0] = "ign-scope";
Line 564  foptions(int *fflags, char *arg)
Line 564  foptions(int *fflags, char *arg)
         toks[4] = "strict";          toks[4] = "strict";
         toks[5] = NULL;          toks[5] = NULL;
   
         while (*arg)          while (*arg) {
                   o = arg;
                 switch (getsubopt(&arg, toks, &v)) {                  switch (getsubopt(&arg, toks, &v)) {
                 case (0):                  case (0):
                         *fflags |= IGN_SCOPE;                          *fflags |= IGN_SCOPE;
Line 583  foptions(int *fflags, char *arg)
Line 584  foptions(int *fflags, char *arg)
                                    NO_IGN_MACRO | NO_IGN_CHARS;                                     NO_IGN_MACRO | NO_IGN_CHARS;
                         break;                          break;
                 default:                  default:
                         warnx("bad argument: -f%s", suboptarg);                          warnx("bad argument: -f%s", o);
                         return(0);                          return(0);
                 }                  }
           }
   
         return(1);          return(1);
 }  }
Line 594  foptions(int *fflags, char *arg)
Line 596  foptions(int *fflags, char *arg)
 static int  static int
 woptions(int *wflags, char *arg)  woptions(int *wflags, char *arg)
 {  {
         char            *v;          char            *v, *o;
         char            *toks[5];          char            *toks[5];
   
         toks[0] = "all";          toks[0] = "all";
Line 603  woptions(int *wflags, char *arg)
Line 605  woptions(int *wflags, char *arg)
         toks[3] = "error";          toks[3] = "error";
         toks[4] = NULL;          toks[4] = NULL;
   
         while (*arg)          while (*arg) {
                   o = arg;
                 switch (getsubopt(&arg, toks, &v)) {                  switch (getsubopt(&arg, toks, &v)) {
                 case (0):                  case (0):
                         *wflags |= WARN_WALL;                          *wflags |= WARN_WALL;
Line 618  woptions(int *wflags, char *arg)
Line 621  woptions(int *wflags, char *arg)
                         *wflags |= WARN_WERR;                          *wflags |= WARN_WERR;
                         break;                          break;
                 default:                  default:
                         warnx("bad argument: -W%s", suboptarg);                          warnx("bad argument: -W%s", o);
                         return(0);                          return(0);
                 }                  }
           }
   
         return(1);          return(1);
 }  }

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

CVSweb