2 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
11 * Copyright (c) 1980 Regents of the University of California.
12 * All rights reserved. The Berkeley software License Agreement
13 * specifies the terms and conditions for redistribution.
16 #pragma ident "%Z%%M% %I% %E% SMI"
18 /* t9.c: write lines for tables over 200 lines */
26 for(useln
=0; useln
<MAXLIN
&& table
[useln
]==0; useln
++);
28 error(gettext("Weird. No data in table."));
29 table
[0]=table
[useln
];
30 for(useln
=nlin
-1; useln
>=0 && (fullbot
[useln
] || instead
[useln
]); useln
--);
32 error(gettext("Weird. No real lines in table."));
34 while (gets1(cstore
=cspace
, MAXSTR
) && domore(cstore
))
44 if (prefix(".TE", dataln
))
46 if (dataln
[0] == '.' && !isdigit((unsigned char)dataln
[1]))
56 case '_': fullbot
[0]= '-'; putline(useln
,0); return(1);
57 case '=': fullbot
[0]= '='; putline(useln
, 0); return(1);
59 for (icol
= 0; icol
<ncol
; icol
++)
61 table
[0][icol
].col
= dataln
;
62 table
[0][icol
].rcol
=0;
63 for(; (ch
= *dataln
) != '\0' && ch
!= tab
; dataln
++)
66 switch(ctype(useln
,icol
))
69 table
[0][icol
].rcol
= maknew(table
[0][icol
].col
);
72 table
[0][icol
].rcol
= table
[0][icol
].col
;
73 table
[0][icol
].col
= "";
76 while (ctype(useln
,icol
+1)== 's') /* spanning */
77 table
[0][++icol
].col
= "";
78 if (ch
== '\0') break;
81 table
[0][icol
].col
= "";