- if (n->child)
- print_man_nodelist(p, &mt, n->child, meta);
-
- term_end(p);
-}
-
-
-static size_t
-a2height(const struct termp *p, const char *cp)
-{
- struct roffsu su;
-
- if ( ! a2roffsu(cp, &su, SCALE_VS))
- SCALE_VS_INIT(&su, atoi(cp));
-
- return(term_vspan(p, &su));
-}
-
-
-static int
-a2width(const struct termp *p, const char *cp)
-{
- struct roffsu su;
-
- if ( ! a2roffsu(cp, &su, SCALE_BU))
- return(-1);
-
- return((int)term_hspan(p, &su));
+ n = man->first->child;
+ if (p->synopsisonly) {
+ for (nn = NULL; n != NULL; n = n->next) {
+ if (n->tok != MAN_SH)
+ continue;
+ nc = n->child->child;
+ if (nc->type != ROFFT_TEXT)
+ continue;
+ if (strcmp(nc->string, "SYNOPSIS") == 0)
+ break;
+ if (nn == NULL && strcmp(nc->string, "NAME") == 0)
+ 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 {
+ term_begin(p, print_man_head, print_man_foot, man);
+ p->flags |= TERMP_NOSPACE;
+ if (n != NULL)
+ print_man_nodelist(p, &mt, n, man);
+ term_end(p);
+ }
+ p->defindent = save_defindent;