version 1.82, 2019/04/03 11:46:09 |
version 1.85, 2019/04/03 14:02:07 |
Line 540 pnode_printrow(struct format *p, struct pnode *pn) |
|
Line 540 pnode_printrow(struct format *p, struct pnode *pn) |
|
} |
} |
|
|
static void |
static void |
pnode_printtgroup1(struct format *p, struct pnode *n) |
pnode_printtgroup1(struct format *f, struct pnode *n) |
{ |
{ |
struct pnode *nc; |
struct pnode *nc; |
|
|
macro_line(p, "Bl -bullet -compact"); |
macro_line(f, "Bl -bullet -compact"); |
while ((nc = pnode_findfirst(n, NODE_ENTRY)) != NULL) { |
while ((nc = pnode_findfirst(n, NODE_ENTRY)) != NULL) { |
macro_line(p, "It"); |
macro_line(f, "It"); |
pnode_print(p, nc); |
pnode_print(f, nc); |
pnode_unlink(nc); |
pnode_unlink(nc); |
} |
} |
macro_line(p, "El"); |
macro_line(f, "El"); |
pnode_unlinksub(n); |
pnode_unlinksub(n); |
} |
} |
|
|
static void |
static void |
pnode_printtgroup(struct format *p, struct pnode *n) |
pnode_printtgroup2(struct format *f, struct pnode *n) |
{ |
{ |
|
struct pnode *nr, *ne; |
|
|
|
macro_line(f, "Bl -tag -width Ds"); |
|
while ((nr = pnode_findfirst(n, NODE_ROW)) != NULL) { |
|
if ((ne = pnode_findfirst(n, NODE_ENTRY)) == NULL) |
|
break; |
|
macro_open(f, "It"); |
|
pnode_print(f, ne); |
|
macro_close(f); |
|
pnode_unlink(ne); |
|
pnode_print(f, nr); |
|
pnode_unlink(nr); |
|
} |
|
macro_line(f, "El"); |
|
pnode_unlinksub(n); |
|
} |
|
|
|
static void |
|
pnode_printtgroup(struct format *f, struct pnode *n) |
|
{ |
struct pnode *nc; |
struct pnode *nc; |
|
|
switch (atoi(pnode_getattr_raw(n, ATTRKEY_COLS, "0"))) { |
switch (atoi(pnode_getattr_raw(n, ATTRKEY_COLS, "0"))) { |
case 1: |
case 1: |
pnode_printtgroup1(p, n); |
pnode_printtgroup1(f, n); |
return; |
return; |
|
case 2: |
|
pnode_printtgroup2(f, n); |
|
return; |
default: |
default: |
break; |
break; |
} |
} |
|
|
macro_line(p, "Bl -ohang"); |
macro_line(f, "Bl -ohang"); |
while ((nc = pnode_findfirst(n, NODE_ROW)) != NULL) { |
while ((nc = pnode_findfirst(n, NODE_ROW)) != NULL) { |
macro_line(p, "It Table Row"); |
macro_line(f, "It Table Row"); |
pnode_printrow(p, nc); |
pnode_printrow(f, nc); |
} |
} |
macro_line(p, "El"); |
macro_line(f, "El"); |
pnode_unlinksub(n); |
pnode_unlinksub(n); |
} |
} |
|
|
Line 601 pnode_printvariablelist(struct format *p, struct pnode |
|
Line 624 pnode_printvariablelist(struct format *p, struct pnode |
|
macro_line(p, "Bl -tag -width Ds"); |
macro_line(p, "Bl -tag -width Ds"); |
TAILQ_FOREACH(pp, &pn->childq, child) { |
TAILQ_FOREACH(pp, &pn->childq, child) { |
if (pp->node == NODE_VARLISTENTRY) |
if (pp->node == NODE_VARLISTENTRY) |
pnode_print(p, pp); |
pnode_printvarlistentry(p, pp); |
else |
else |
macro_nodeline(p, "It", pp, 0); |
macro_nodeline(p, "It", pp, 0); |
} |
} |
Line 867 pnode_print(struct format *p, struct pnode *pn) |
|
Line 890 pnode_print(struct format *p, struct pnode *pn) |
|
break; |
break; |
case NODE_VARIABLELIST: |
case NODE_VARIABLELIST: |
pnode_printvariablelist(p, pn); |
pnode_printvariablelist(p, pn); |
break; |
|
case NODE_VARLISTENTRY: |
|
pnode_printvarlistentry(p, pn); |
|
break; |
break; |
case NODE_VARNAME: |
case NODE_VARNAME: |
macro_open(p, "Va"); |
macro_open(p, "Va"); |