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 fromto(int p1
, int p2
, int p3
)
24 lfont
[yyval
] = rfont
[yyval
] = 0;
25 h1
= eht
[yyval
] = eht
[p1
];
31 printf(".nr %d \\n(%d\n", yyval
, p1
);
34 printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n",
35 p2
, yyval
, yyval
, p2
);
36 eht
[yyval
] += eht
[p2
];
41 printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n",
42 p3
, yyval
, yyval
, p3
);
43 eht
[yyval
] += eht
[p3
];
45 printf(".ds %d ", yyval
); /* bottom of middle box */
47 printf("\\v'%du'\\h'\\n(%du-\\n(%du/2u'\\s%d\\*(%d\\s%d",
48 eht
[p2
]-ebase
[p2
]+b1
, yyval
, p2
, pss
, p2
, EFFPS(ps
));
49 printf("\\h'-\\n(%du-\\n(%du/2u'\\v'%du'\\\n",
50 yyval
, p2
, -(eht
[p2
]-ebase
[p2
]+b1
));
53 printf("\\h'\\n(%du-\\n(%du/2u'\\*(%d\\h'\\n(%du-\\n(%du/2u'\\\n",
54 yyval
, p1
, p1
, yyval
, p1
);
56 printf("\\h'\\n(%du-\\n(%du/2u'\\*(%d\\h'\\n(%du-\\n(%du+2u/2u'\\\n",
57 yyval
, p1
, p1
, yyval
, p1
);
60 printf("\\v'%du'\\h'-\\n(%du-\\n(%du/2u'\\s%d\\*(%d\\s%d"
61 "\\h'\\n(%du-\\n(%du/2u'\\v'%du'\\\n",
62 -(h1
-b1
+ebase
[p3
]), yyval
, p3
, pss
, p3
, EFFPS(ps
),
63 yyval
, p3
, (h1
-b1
+ebase
[p3
]));
66 ebase
[yyval
] = b
+ b1
;
68 printf(".\tfrom to: S%d <- %d f %d t %d; h=%d b=%d\n",
69 yyval
, p1
, p2
, p3
, eht
[yyval
], ebase
[yyval
]);
71 if (p2
> 0) ofree(p2
);
72 if (p3
> 0) ofree(p3
);