version 1.82, 2019/04/03 11:46:09 |
version 1.83, 2019/04/03 12:29:47 |
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); |
|
if (f->linestate == LINE_MACRO) |
|
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); |
} |
} |
|
|