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

Diff for /mandoc/man_term.c between version 1.228 and 1.229

version 1.228, 2019/01/05 21:18:26 version 1.229, 2019/06/27 12:20:18
Line 146  terminal_man(void *arg, const struct roff_meta *man)
Line 146  terminal_man(void *arg, const struct roff_meta *man)
 {  {
         struct mtermp            mt;          struct mtermp            mt;
         struct termp            *p;          struct termp            *p;
         struct roff_node        *n;          struct roff_node        *n, *nc, *nn;
         size_t                   save_defindent;          size_t                   save_defindent;
   
         p = (struct termp *)arg;          p = (struct termp *)arg;
Line 165  terminal_man(void *arg, const struct roff_meta *man)
Line 165  terminal_man(void *arg, const struct roff_meta *man)
   
         n = man->first->child;          n = man->first->child;
         if (p->synopsisonly) {          if (p->synopsisonly) {
                 while (n != NULL) {                  for (nn = NULL; n != NULL; n = n->next) {
                         if (n->tok == MAN_SH &&                          if (n->tok != MAN_SH)
                             n->child->child->type == ROFFT_TEXT &&                                  continue;
                             !strcmp(n->child->child->string, "SYNOPSIS")) {                          nc = n->child->child;
                                 if (n->child->next->child != NULL)                          if (nc->type != ROFFT_TEXT)
                                         print_man_nodelist(p, &mt,                                  continue;
                                             n->child->next->child, man);                          if (strcmp(nc->string, "SYNOPSIS") == 0)
                                 term_newln(p);  
                                 break;                                  break;
                         }                          if (nn == NULL && strcmp(nc->string, "NAME") == 0)
                         n = n->next;                                  nn = n;
                 }                  }
                   if (n == NULL)
                           n = nn;
                   p->flags |= TERMP_NOSPACE;
                   if (n != NULL && (n = n->child->next->child) != NULL)
                           print_man_nodelist(p, &mt, n, man);
                   term_newln(p);
         } else {          } else {
                 term_begin(p, print_man_head, print_man_foot, man);                  term_begin(p, print_man_head, print_man_foot, man);
                 p->flags |= TERMP_NOSPACE;                  p->flags |= TERMP_NOSPACE;

Legend:
Removed from v.1.228  
changed lines
  Added in v.1.229

CVSweb