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

Diff for /mandoc/Attic/mdocml.c between version 1.25 and 1.26

version 1.25, 2008/12/28 00:34:20 version 1.26, 2008/12/28 21:25:09
Line 181  buf_begin(struct md_parse *p)
Line 181  buf_begin(struct md_parse *p)
 static void  static void
 print_node(const struct mdoc_node *n, int indent)  print_node(const struct mdoc_node *n, int indent)
 {  {
         const char      *p, *t;          const char       *p, *t;
         int              i, j;          int               i, j;
         size_t           argc;          size_t            argc, sz;
         struct mdoc_arg *argv;          char            **params;
           struct mdoc_arg  *argv;
   
         argv = NULL;          argv = NULL;
         argc = 0;          argc = 0;
           params = NULL;
           sz = 0;
   
         switch (n->type) {          switch (n->type) {
         case (MDOC_TEXT):          case (MDOC_TEXT):
Line 202  print_node(const struct mdoc_node *n, int indent)
Line 205  print_node(const struct mdoc_node *n, int indent)
         case (MDOC_HEAD):          case (MDOC_HEAD):
                 p = mdoc_macronames[n->data.head.tok];                  p = mdoc_macronames[n->data.head.tok];
                 t = "block-head";                  t = "block-head";
                   params = n->data.head.args;
                   sz = n->data.head.sz;
                 break;                  break;
         case (MDOC_ELEM):          case (MDOC_ELEM):
                 assert(NULL == n->child);                  assert(NULL == n->child);
Line 209  print_node(const struct mdoc_node *n, int indent)
Line 214  print_node(const struct mdoc_node *n, int indent)
                 t = "element";                  t = "element";
                 argv = n->data.elem.argv;                  argv = n->data.elem.argv;
                 argc = n->data.elem.argc;                  argc = n->data.elem.argc;
                   params = n->data.elem.args;
                   sz = n->data.elem.sz;
                 break;                  break;
         case (MDOC_BLOCK):          case (MDOC_BLOCK):
                 p = mdoc_macronames[n->data.block.tok];                  p = mdoc_macronames[n->data.block.tok];
Line 231  print_node(const struct mdoc_node *n, int indent)
Line 238  print_node(const struct mdoc_node *n, int indent)
                         (void)printf(" \"%s\"", argv[i].value[j]);                          (void)printf(" \"%s\"", argv[i].value[j]);
         }          }
   
           for (i = 0; i < (int)sz; i++)
                   (void)printf(" \"%s\"", params[i]);
   
         (void)printf("\n");          (void)printf("\n");
   
         if (n->child)          if (n->child)
Line 340  msg_err(void *arg, int tok, int col, enum mdoc_err typ
Line 350  msg_err(void *arg, int tok, int col, enum mdoc_err typ
                 fmt = "scope: closure macro `%s' has no context";                  fmt = "scope: closure macro `%s' has no context";
                 break;                  break;
         case (ERR_SCOPE_NONEST):          case (ERR_SCOPE_NONEST):
                 fmt = "scope: macro `%s' may not be nested";                  fmt = "scope: macro `%s' may not be nested in the current context";
                 break;                  break;
         case (ERR_MACRO_NOTSUP):          case (ERR_MACRO_NOTSUP):
                 fmt = "macro `%s' not supported";                  fmt = "macro `%s' not supported";

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

CVSweb