2 * Copyright 2005 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 */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
20 column(int type
, int p1
)
26 printf(".\t%d column of", type
);
27 for (i
= p1
+ 1; i
< ct
; i
++)
28 printf(" S%d", lp
[i
]);
29 printf(", rows=%d\n", lp
[p1
]);
37 int nrow
, ncol
, i
, j
, k
, hb
, b
, val
[100];
41 nrow
= lp
[p1
]; /* disaster if rows inconsistent */
43 for (i
= p1
; i
< ct
; i
+= lp
[i
] + 2) {
45 if (dbg
) printf(".\tcolct=%d\n", lp
[i
]);
47 for (k
= 1; k
<= nrow
; k
++) {
50 for (i
= 0; i
< ncol
; i
++) {
51 hb
= max(hb
, eht
[lp
[j
]]-ebase
[lp
[j
]]);
52 b
= max(b
, ebase
[lp
[j
]]);
55 if (dbg
) printf(".\trow %d: b=%d, hb=%d\n", k
, b
, hb
);
57 for (i
= 0; i
< ncol
; i
++) {
64 for (i
= 0; i
< ncol
; i
++) {
65 lpile(lp
[j
+lp
[j
]+1], j
+1, j
+lp
[j
]+1);
70 eht
[yyval
] = eht
[val
[0]];
71 ebase
[yyval
] = ebase
[val
[0]];
72 lfont
[yyval
] = rfont
[yyval
] = 0;
74 printf(".\tmatrix S%d: r=%d, c=%d, h=%d, b=%d\n",
75 yyval
, nrow
, ncol
, eht
[yyval
], ebase
[yyval
]);
76 printf(".ds %d \"", yyval
);
77 for (i
= 0; i
< ncol
; i
++) {
78 printf("\\*(%d%s", val
[i
], i
== ncol
-1 ? "" : space
);