Ejemplo n.º 1
0
permute()
{
int irow, jcol, is;
char *start, *strig;
for(jcol=0; jcol<ncol; jcol++)
	{
	for(irow=1; irow<nlin; irow++)
		{
		if (vspand(irow,jcol,0))
			{
			is = prev(irow);
			if (is<0)
				error("Vertical spanning in first row not allowed");
			start = table[is][jcol].col;
			strig = table[is][jcol].rcol;
			while (irow<nlin &&vspand(irow,jcol,0))
				irow++;
			table[--irow][jcol].col = start;
			table[irow][jcol].rcol = strig;
			while (is<irow)
				{
				table[is][jcol].rcol =0;
				table[is][jcol].col= SPAN;
				is = next(is);
				}
			}
		}
	}
}
Ejemplo n.º 2
0
fullwide(i, lintype)
{
int cr, cl;
if (!pr1403)
	fprintf(tabout, ".nr %d \\n(.v\n.vs \\n(.vu-\\n(.sp\n", SVS);
cr= 0;
while (cr<ncol)
	{
	cl=cr;
	while (i>0 && vspand(prev(i),cl,1))
		cl++;
	for(cr=cl; cr<ncol; cr++)
		if (i>0 && vspand(prev(i),cr,1))
			break;
	if (cl<ncol)
	drawline(i,cl,(cr<ncol?cr-1:cr),lintype,1,0);
	}
fprintf(tabout, "\n");
if (!pr1403)
	fprintf(tabout, ".vs \\n(%du\n", SVS);
}