static char sccsid
[] = "@(#)textblocks.c 1.2 (CWI) 85/10/02";
* Note that this doen't work after MAXLIN lines (see over200.c)
* This returns an int with the name of the diversion,
* in maktab we test later in wide() whether the table entry is a
* pointer to a string, or a character.
* If it is a character, we now it is a diversion, and know it its width
* to be in <diversionname>-
* Very ugly, (looks like we need unions in declaration of structure colstr ?)
gettext(sp
, ilin
, icol
, fn
, sz
)
dprint(".\\\" -- gettext\n");
error("Too many text block diversions");
printf(".nr %d \\n(.lu\n", SL
);
* remember old line length
printf(".am %2s\n", reg(icol
, CRIGHT
));
printf(".di %c+\n", texname
);
printf(".nr %d \\n(.f\n.ft %s\n", S1
, fn
);
vs
= vsize
[stynum
[ilin
]][icol
];
if((sz
&& *sz
) || (vs
&& *vs
)){
printf(".nr %d \\n(.v\n", S2
);
printf(".if \\n(%du>\\n(.vu .sp \\n(%du-\\n(.vu\n",
printf(".ll %sn\n", cll
[icol
]);
printf(".ll \\n(%du*%du/%du\n", SL
, ctspan(ilin
, icol
),
printf(".if \\n(.l<\\n(%2s .ll \\n(%2su\n", reg(icol
, CRIGHT
),
if(ctype(ilin
, icol
) == 'a')
if(line
[0] == 'T' && line
[1] == '}' && line
[2] == tab
)
if(strcmp("T}", line
) == 0)
printf(".ft \\n(%d\n", S1
);
printf(".br\n.ps\n.vs\n");
* Height of last complete diversion in register <diversionname>|
printf(".nr %c| \\n(dn\n", texname
);
* width of last complete diversion in register <diversionname>-
printf(".nr %c- \\n(dl\n", texname
);
texname
= texstr
[++texct
];
printf(".ll \\n(%du\n", SL
);