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

Diff for /mandoc/main.c between version 1.103 and 1.108

version 1.103, 2010/08/20 01:02:07 version 1.108, 2010/10/11 15:46:19
Line 132  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 132  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "unterminated quoted string",          "unterminated quoted string",
         "argument requires the width argument",          "argument requires the width argument",
         "superfluous width argument",          "superfluous width argument",
         "ignoring argument",  
         "bad date argument",          "bad date argument",
         "bad width argument",          "bad width argument",
         "unknown manual section",          "unknown manual section",
         "section not in conventional manual section",          "section not in conventional manual section",
         "end of line whitespace",          "end of line whitespace",
         "blocks badly nested",          "blocks badly nested",
         "scope open on exit",  
   
         "generic error",          "generic error",
   
Line 150  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 148  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "list type repeated",          "list type repeated",
         "display type repeated",          "display type repeated",
         "argument repeated",          "argument repeated",
           "ignoring argument",
         "manual name not yet set",          "manual name not yet set",
         "obsolete macro ignored",          "obsolete macro ignored",
         "empty macro ignored",          "empty macro ignored",
Line 165  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 164  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "argument count wrong",          "argument count wrong",
         "request scope close w/none open",          "request scope close w/none open",
         "scope already open",          "scope already open",
           "scope open on exit",
         "macro requires line argument(s)",          "macro requires line argument(s)",
         "macro requires body argument(s)",          "macro requires body argument(s)",
         "macro requires argument(s)",          "macro requires argument(s)",
Line 174  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 174  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "missing font type",          "missing font type",
         "line argument(s) will be lost",          "line argument(s) will be lost",
         "body argument(s) will be lost",          "body argument(s) will be lost",
           "paragraph macro ignored",
   
         "generic fatal error",          "generic fatal error",
   
Line 182  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 183  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "unsupported display type",          "unsupported display type",
         "blocks badly nested",          "blocks badly nested",
         "no such block is open",          "no such block is open",
         "scope broken, syntax violated",  
         "line scope broken, syntax violated",          "line scope broken, syntax violated",
         "argument count wrong, violates syntax",          "argument count wrong, violates syntax",
         "child violates parent syntax",          "child violates parent syntax",
Line 231  main(int argc, char *argv[])
Line 231  main(int argc, char *argv[])
                 switch (c) {                  switch (c) {
                 case ('m'):                  case ('m'):
                         if ( ! moptions(&curp.inttype, optarg))                          if ( ! moptions(&curp.inttype, optarg))
                                 return(MANDOCLEVEL_BADARG);                                  return((int)MANDOCLEVEL_BADARG);
                         break;                          break;
                 case ('O'):                  case ('O'):
                         (void)strlcat(curp.outopts, optarg, BUFSIZ);                          (void)strlcat(curp.outopts, optarg, BUFSIZ);
Line 239  main(int argc, char *argv[])
Line 239  main(int argc, char *argv[])
                         break;                          break;
                 case ('T'):                  case ('T'):
                         if ( ! toptions(&curp, optarg))                          if ( ! toptions(&curp, optarg))
                                 return(MANDOCLEVEL_BADARG);                                  return((int)MANDOCLEVEL_BADARG);
                         break;                          break;
                 case ('W'):                  case ('W'):
                         if ( ! woptions(&curp, optarg))                          if ( ! woptions(&curp, optarg))
                                 return(MANDOCLEVEL_BADARG);                                  return((int)MANDOCLEVEL_BADARG);
                         break;                          break;
                 case ('V'):                  case ('V'):
                         version();                          version();
Line 279  main(int argc, char *argv[])
Line 279  main(int argc, char *argv[])
         if (curp.roff)          if (curp.roff)
                 roff_free(curp.roff);                  roff_free(curp.roff);
   
         return(exit_status);          return((int)exit_status);
 }  }
   
   
Line 288  version(void)
Line 288  version(void)
 {  {
   
         (void)printf("%s %s\n", progname, VERSION);          (void)printf("%s %s\n", progname, VERSION);
         exit(MANDOCLEVEL_OK);          exit((int)MANDOCLEVEL_OK);
 }  }
   
   
Line 299  usage(void)
Line 299  usage(void)
         (void)fprintf(stderr, "usage: %s [-V] [-foption] "          (void)fprintf(stderr, "usage: %s [-V] [-foption] "
                         "[-mformat] [-Ooption] [-Toutput] "                          "[-mformat] [-Ooption] [-Toutput] "
                         "[-Werr] [file...]\n", progname);                          "[-Werr] [file...]\n", progname);
         exit(MANDOCLEVEL_BADARG);          exit((int)MANDOCLEVEL_BADARG);
 }  }
   
   
Line 329  resize_buf(struct buf *buf, size_t initial)
Line 329  resize_buf(struct buf *buf, size_t initial)
         buf->buf = realloc(buf->buf, buf->sz);          buf->buf = realloc(buf->buf, buf->sz);
         if (NULL == buf->buf) {          if (NULL == buf->buf) {
                 perror(NULL);                  perror(NULL);
                 exit(MANDOCLEVEL_SYSERR);                  exit((int)MANDOCLEVEL_SYSERR);
         }          }
 }  }
   
Line 551  fdesc(struct curparse *curp)
Line 551  fdesc(struct curparse *curp)
                 }                  }
         }          }
   
         /*  
          * With -Wstop and warnings or errors of at least  
          * the requested level, do not produce output.  
          */  
   
         if (MANDOCLEVEL_OK != exit_status && curp->wstop)  
                 goto cleanup;  
   
         /* NOTE a parser may not have been assigned, yet. */          /* NOTE a parser may not have been assigned, yet. */
   
         if ( ! (man || mdoc)) {          if ( ! (man || mdoc)) {
Line 582  fdesc(struct curparse *curp)
Line 574  fdesc(struct curparse *curp)
                 goto cleanup;                  goto cleanup;
         }          }
   
           /*
            * With -Wstop and warnings or errors of at least
            * the requested level, do not produce output.
            */
   
           if (MANDOCLEVEL_OK != exit_status && curp->wstop)
                   goto cleanup;
   
         /* If unset, allocate output dev now (if applicable). */          /* If unset, allocate output dev now (if applicable). */
   
         if ( ! (curp->outman && curp->outmdoc)) {          if ( ! (curp->outman && curp->outmdoc)) {
Line 809  mmsg(enum mandocerr t, void *arg, int ln, int col, con
Line 809  mmsg(enum mandocerr t, void *arg, int ln, int col, con
   
         level = MANDOCLEVEL_FATAL;          level = MANDOCLEVEL_FATAL;
         while (t < mandoclimits[level])          while (t < mandoclimits[level])
                   /* LINTED */
                 level--;                  level--;
   
         cp = (struct curparse *)arg;          cp = (struct curparse *)arg;

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.108

CVSweb