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

Diff for /mandoc/Attic/mdocml.c between version 1.22 and 1.23

version 1.22, 2008/12/15 02:23:12 version 1.23, 2008/12/17 17:18:38
Line 265  parse_begin(struct md_parse *p)
Line 265  parse_begin(struct md_parse *p)
                 for (i = 0; i < sz; i++) {                  for (i = 0; i < sz; i++) {
                         if ('\n' != p->buf[i]) {                          if ('\n' != p->buf[i]) {
                                 if (pos < sizeof(line)) {                                  if (pos < sizeof(line)) {
                                         /* LINTED */                                          sv[(int)pos] = p->buf[(int)i];
                                         sv[pos] = p->buf[i];                                          line[(int)pos++] =
                                         line[pos++] = p->buf[i];                                                  p->buf[(int)i];
                                         continue;                                          continue;
                                 }                                  }
                                 warnx("%s: line %d too long",                                  warnx("%s: line %d too long",
Line 306  msg_err(void *arg, int tok, int col, enum mdoc_err typ
Line 306  msg_err(void *arg, int tok, int col, enum mdoc_err typ
         case (ERR_SYNTAX_WS):          case (ERR_SYNTAX_WS):
                 lit = "syntax: whitespace in argument";                  lit = "syntax: whitespace in argument";
                 break;                  break;
           case (ERR_SYNTAX_ARGS):
                   fmt = "syntax: macro `%s' arguments malformed";
                   break;
         case (ERR_SCOPE_BREAK):          case (ERR_SCOPE_BREAK):
                 /* Which scope is broken? */                  /* Which scope is broken? */
                 fmt = "macro `%s' breaks prior explicit scope";                  fmt = "macro `%s' breaks prior explicit scope";
Line 316  msg_err(void *arg, int tok, int col, enum mdoc_err typ
Line 319  msg_err(void *arg, int tok, int col, enum mdoc_err typ
         case (ERR_MACRO_NOTCALL):          case (ERR_MACRO_NOTCALL):
                 fmt = "macro `%s' not callable";                  fmt = "macro `%s' not callable";
                 break;                  break;
           case (ERR_SEC_PROLOGUE):
                   fmt = "macro `%s' cannot be called in the prologue";
                   break;
           case (ERR_SEC_NPROLOGUE):
                   fmt = "macro `%s' called outside of prologue";
                   break;
         case (ERR_ARGS_GE1):          case (ERR_ARGS_GE1):
                 fmt = "macro `%s' expects one or more arguments";                  fmt = "macro `%s' expects one or more arguments";
                 break;                  break;
           case (ERR_ARGS_MANY):
                   fmt = "macro `%s' has too many arguments";
                   break;
           case (ERR_SEC_PROLOGUE_OO):
                   fmt = "prologue macro `%s' is out-of-order";
                   break;
           case (ERR_SEC_PROLOGUE_REP):
                   fmt = "prologue macro `%s' repeated";
                   break;
           case (ERR_SEC_NAME):
                   lit = "`NAME' section must be first";
                   break;
         default:          default:
                 abort();                  abort();
                 /* NOTREACHED */                  /* NOTREACHED */
Line 333  msg_err(void *arg, int tok, int col, enum mdoc_err typ
Line 354  msg_err(void *arg, int tok, int col, enum mdoc_err typ
                                 p->name, p->lnn, lit);                                  p->name, p->lnn, lit);
   
         if (p->dbg < 1) {          if (p->dbg < 1) {
                 (void)fprintf(stderr, " (column %d)\n", col);                  if (-1 != col)
                           (void)fprintf(stderr, " (column %d)\n", col);
                 return(0);                  return(0);
           } else if (-1 == col) {
                   (void)fprintf(stderr, "\nFrom: %s", p->line);
                   return(0);
         }          }
   
         (void)fprintf(stderr, "\nFrom: %s\n      ", p->line);          (void)fprintf(stderr, "\nFrom: %s\n      ", p->line);
Line 360  msg_msg(void *arg, int col, const char *msg)
Line 385  msg_msg(void *arg, int col, const char *msg)
         (void)printf("%s:%d: %s", p->name, p->lnn, msg);          (void)printf("%s:%d: %s", p->name, p->lnn, msg);
   
         if (p->dbg < 3) {          if (p->dbg < 3) {
                 (void)printf(" (column %d)\n", col);                  if (-1 != col)
                           (void)printf(" (column %d)\n", col);
                 return;                  return;
           } else if (-1 == col) {
                   (void)printf("\nFrom %s\n", p->line);
                   return;
         }          }
   
         (void)printf("\nFrom: %s\n      ", p->line);          (void)printf("\nFrom: %s\n      ", p->line);
Line 392  msg_warn(void *arg, int tok, int col, enum mdoc_warn t
Line 421  msg_warn(void *arg, int tok, int col, enum mdoc_warn t
                 break;                  break;
         case (WARN_SYNTAX_MACLIKE):          case (WARN_SYNTAX_MACLIKE):
                 lit = "syntax: macro-like argument";                  lit = "syntax: macro-like argument";
                   break;
           case (WARN_SEC_OO):
                   lit = "section is out of conventional order";
                 break;                  break;
         case (WARN_ARGS_GE1):          case (WARN_ARGS_GE1):
                 fmt = "macro `%s' suggests one or more arguments";                  fmt = "macro `%s' suggests one or more arguments";

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

CVSweb