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

Diff for /mandoc/Attic/mdocml.c between version 1.17 and 1.18

version 1.17, 2008/12/04 11:25:29 version 1.18, 2008/12/09 00:27:17
Line 54  int
Line 54  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         int              c;          int              c;
         char            *out, *in;          char            *out, *in, *opts, *v;
         struct md_args   args;          struct md_args   args;
   #define ALL              0
   #define ERROR            1
           char            *toks[] = { "all", "error", NULL };
   
         extern char     *optarg;          extern char     *optarg;
         extern int       optind;          extern int       optind;
Line 66  main(int argc, char *argv[])
Line 69  main(int argc, char *argv[])
   
         args.type = MD_XML;          args.type = MD_XML;
   
         while (-1 != (c = getopt(argc, argv, "c:ef:o:vW")))          while (-1 != (c = getopt(argc, argv, "c:ef:o:vW:")))
                 switch (c) {                  switch (c) {
                 case ('c'):                  case ('c'):
                         if (args.type != MD_HTML)                          if (args.type != MD_HTML)
Line 93  main(int argc, char *argv[])
Line 96  main(int argc, char *argv[])
                         args.verbosity++;                          args.verbosity++;
                         break;                          break;
                 case ('W'):                  case ('W'):
                         args.warnings |= MD_WARN_ALL;                          opts = optarg;
                           while (*opts)
                                   switch (getsubopt(&opts, toks, &v)) {
                                   case (ALL):
                                           args.warnings |= MD_WARN_ALL;
                                           break;
                                   case (ERROR):
                                           args.warnings |= MD_WARN_ERROR;
                                           break;
                                   default:
                                           usage();
                                           return(1);
                                   }
                         break;                          break;
                 default:                  default:
                         usage();                          usage();
Line 250  usage(void)
Line 265  usage(void)
 {  {
         extern char     *__progname;          extern char     *__progname;
   
         (void)printf("usage: %s [-vW] [-f filter] [-o outfile] "          (void)printf("usage: %s [-v] [-Wwarn...]  [-f filter] "
                         "[infile]\n", __progname);                          "[-o outfile] [infile]\n", __progname);
 }  }
   

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

CVSweb