On Tue, Jul 13, 2010 at 7:12 PM, Alex Deucher <[email protected]> wrote: > On Tue, Jul 13, 2010 at 6:35 PM, Jamey Sharp <[email protected]> wrote: >> @@ -1387,8 +1384,12 @@ doPolyText(ClientPtr client, PTclosurePtr c) >> if (c->pDraw) >> { >> c->xorg += *((INT8 *)(c->pElt + 1)); /* must be signed */ >> - c->xorg = (* c->polyText)(c->pDraw, c->pGC, c->xorg, c->yorg, >> - *c->pElt, c->pElt + TextEltHeader); >> + if (c->reqType == X_PolyText8) >> + c->xorg = (* c->pGC->ops->PolyText8)(c->pDraw, c->pGC, >> c->xorg, c->yorg, >> + *c->pElt, (char *) (c->pElt + TextEltHeader)); >> + else >> + c->xorg = (* c->pGC->ops->PolyText16)(c->pDraw, c->pGC, >> c->xorg, c->yorg, >> + *c->pElt, (unsigned short *) (c->pElt + >> TextEltHeader)); > > > What's going on here? c->xorg += *((INT8 *)(c->pElt + 1)); followed > by c->xorg = ... > Can the += line be removed?
Not exactly: c->xorg is passed to the PolyText op, which returns the new value for c->xorg. I agree it looks funny, but I believe it was correct before, and I don't think I've changed how it works. We could use a local variable instead of the closure's xorg field but I don't think that's really better. Jamey _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
