From 4a5679e42d5f89b7eaf495784d4465cda20bd2ea Mon Sep 17 00:00:00 2001 From: Dave Slattengren Date: Mon, 15 Aug 1983 17:12:20 -0800 Subject: [PATCH] date and time created 83/08/15 10:12:20 by slatteng SCCS-vsn: local/ditroff/ditroff.old.okeeffe/eqn/sqrt.c 1.1 --- .../ditroff/ditroff.old.okeeffe/eqn/sqrt.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 usr/src/local/ditroff/ditroff.old.okeeffe/eqn/sqrt.c diff --git a/usr/src/local/ditroff/ditroff.old.okeeffe/eqn/sqrt.c b/usr/src/local/ditroff/ditroff.old.okeeffe/eqn/sqrt.c new file mode 100644 index 0000000000..16e9df007e --- /dev/null +++ b/usr/src/local/ditroff/ditroff.old.okeeffe/eqn/sqrt.c @@ -0,0 +1,24 @@ +# include "e.h" + +sqrt(p2) int p2; { + int nps; + + nps = EFFPS(((eht[p2]*9)/10+(res/POINT-1))/(res/POINT)); + yyval = p2; + if (ttype == DEVCAT || ttype == DEVAPS) + eht[yyval] = VERT( EM(1.2, nps) ); + else if (ttype == DEV202) + eht[yyval] = VERT( EM(1.0, nps) ); + if(dbg)printf(".\tsqrt: S%d <- S%d;b=%d, h=%d\n", + yyval, p2, ebase[yyval], eht[yyval]); + if (rfont[yyval] == ITAL) + printf(".as %d \\|\n", yyval); + nrwid(p2, ps, p2); + printf(".ds %d \\v'%du'\\s%d", yyval, ebase[p2], nps); /* proper position for sqrt */ + if (ttype == DEVCAT || ttype == DEVAPS) + printf("\\v'-.2m'\\(sr\\l'\\n(%du\\(rn'\\v'.2m'", p2); + else + printf("\\(sr\\l'\\n(%du\\(rn'", p2); /* .95 best for 10; .9 best for 16 */ + printf("\\s%d\\v'%du'\\h'-\\n(%du'\\*(%d\n", ps, -ebase[p2], p2, p2); + lfont[yyval] = ROM; +} -- 2.20.1