--- ray/src/rt/text.c 1989/02/02 10:41:47 1.1 +++ ray/src/rt/text.c 1989/07/27 22:25:17 1.3 @@ -89,9 +89,10 @@ RAY *r; /* first, discover position in text */ ap = m->oargs.farg; - v[0] = r->rop[0] - ap[0]; - v[1] = r->rop[1] - ap[1]; - v[2] = r->rop[2] - ap[2]; + multp3(v, r->rop, r->robx); + v[0] -= ap[0]; + v[1] -= ap[1]; + v[2] -= ap[2]; col = x = DOT(v, ap+3) / DOT(ap+3, ap+3); lno = y = DOT(v, ap+6) / DOT(ap+6, ap+6); x -= col; @@ -159,7 +160,7 @@ int col; txt[1] = NULL; } else { /* text file */ if ((s = getpath(tm->oargs.sarg[tndx(tm)], - libpath)) == NULL) { + libpath, R_OK)) == NULL) { sprintf(errmsg, "cannot find text file \"%s\"", tm->oargs.sarg[tndx(tm)]); error(USER, errmsg); @@ -210,7 +211,7 @@ char *fname; if (!strcmp(f->name, fname)) return(f); /* load the font file */ - if ((pathname = getpath(fname, libpath)) == NULL) { + if ((pathname = getpath(fname, libpath, R_OK)) == NULL) { sprintf(errmsg, "cannot find font file \"%s\"", fname); error(USER, errmsg); }