* Copyright (c) 1991 The Regents of the University of California.
* This module is believed to contain source code proprietary to AT&T.
* Use and redistribution is subject to the Berkeley Software License
* Agreement and your Software Agreement with AT&T (Western Electric).
static char sccsid
[] = "@(#)matrix.c 4.3 (Berkeley) 4/17/91";
column(type
, p1
) int type
, p1
; {
printf(".\t%d column of", type
);
printf(", rows=%d\n",lp
[p1
]);
int nrow
, ncol
, i
, j
, k
, hb
, b
, val
[100];
nrow
= lp
[p1
]; /* disaster if rows inconsistent */
for( i
=p1
; i
<ct
; i
+= lp
[i
]+2 ){
if(dbg
)printf(".\tcolct=%d\n",lp
[i
]);
for( k
=1; k
<=nrow
; k
++ ) {
for( i
=0; i
<ncol
; i
++ ) {
hb
= max(hb
, eht
[lp
[j
]]-ebase
[lp
[j
]]);
b
= max(b
, ebase
[lp
[j
]]);
if(dbg
)printf(".\trow %d: b=%d, hb=%d\n", k
, b
, hb
);
for( i
=0; i
<ncol
; i
++ ) {
for( i
=0; i
<ncol
; i
++ ) {
lpile(lp
[j
+lp
[j
]+1], j
+1, j
+lp
[j
]+1);
eht
[yyval
] = eht
[val
[0]];
ebase
[yyval
] = ebase
[val
[0]];
lfont
[yyval
] = rfont
[yyval
] = 0;
if(dbg
)printf(".\tmatrix S%d: r=%d, c=%d, h=%d, b=%d\n",
yyval
,nrow
,ncol
,eht
[yyval
],ebase
[yyval
]);
printf(".ds %d \"", yyval
);
for( i
=0; i
<ncol
; i
++ ) {
printf("\\*(%d%s", val
[i
], i
==ncol
-1 ? "" : space
);