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

Diff for /mandoc/tree.c between version 1.56 and 1.57

version 1.56, 2014/10/10 08:44:24 version 1.57, 2014/10/10 12:19:25
Line 265  print_box(const struct eqn_box *ep, int indent)
Line 265  print_box(const struct eqn_box *ep, int indent)
         int              i;          int              i;
         const char      *t;          const char      *t;
   
           static const char *posnames[] = {
               NULL, "sup", "subsup", "sub",
               "to", "from", "fromto",
               "over", "sqrt", NULL };
   
         if (NULL == ep)          if (NULL == ep)
                 return;                  return;
         for (i = 0; i < indent; i++)          for (i = 0; i < indent; i++)
Line 293  print_box(const struct eqn_box *ep, int indent)
Line 298  print_box(const struct eqn_box *ep, int indent)
                 break;                  break;
         }          }
   
         assert(t);          fputs(t, stdout);
         printf("%s(size=%d, args=%zu(%zu), pos=%d, font=%d, pile=%d, l=\"%s\", r=\"%s\") %s\n",          if (ep->pos)
             t, EQN_DEFSIZE == ep->size ? 0 : ep->size,                  printf(" pos=%s", posnames[ep->pos]);
             ep->args, ep->expectargs,          if (ep->left)
             ep->pos, ep->font, ep->pile,                  printf(" left=\"%s\"", ep->left);
             ep->left ? ep->left : "",          if (ep->right)
             ep->right ? ep->right : "",                  printf(" right=\"%s\"", ep->right);
             ep->text ? ep->text : "");          if (ep->top)
                   printf(" top=\"%s\"", ep->top);
           if (ep->bottom)
                   printf(" bottom=\"%s\"", ep->bottom);
           if (ep->text)
                   printf(" text=\"%s\"", ep->text);
           if (ep->font)
                   printf(" font=%d", ep->font);
           if (ep->size != EQN_DEFSIZE)
                   printf(" size=%d", ep->size);
           if (ep->expectargs != UINT_MAX && ep->expectargs != ep->args)
                   printf(" badargs=%zu(%zu)", ep->args, ep->expectargs);
           else if (ep->args)
                   printf(" args=%zu", ep->args);
           putchar('\n');
   
         print_box(ep->first, indent + 1);          print_box(ep->first, indent + 1);
         print_box(ep->next, indent);          print_box(ep->next, indent);

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

CVSweb