From 0f834b91a4768673833ab4917e87d86c237bb1a6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 23 Mar 2012 10:05:55 +0100 Subject: libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update 23 Mar 2012 --- xorg-server/mi/mipolytext.c | 62 ++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 29 deletions(-) (limited to 'xorg-server/mi/mipolytext.c') diff --git a/xorg-server/mi/mipolytext.c b/xorg-server/mi/mipolytext.c index 508e0ffa7..02c45882f 100644 --- a/xorg-server/mi/mipolytext.c +++ b/xorg-server/mi/mipolytext.c @@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. - Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved @@ -71,34 +70,37 @@ miPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n, i; int w; - CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ + CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ - GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)chars, - Linear8Bit, &n, charinfo); + GetGlyphs(pGC->font, (unsigned long) count, (unsigned char *) chars, + Linear8Bit, &n, charinfo); w = 0; - for (i=0; i < n; i++) w += charinfo[i]->metrics.characterWidth; + for (i = 0; i < n; i++) + w += charinfo[i]->metrics.characterWidth; if (n != 0) - (*pGC->ops->PolyGlyphBlt)( - pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); - return x+w; + (*pGC->ops->PolyGlyphBlt) (pDraw, pGC, x, y, n, charinfo, + FONTGLYPHS(pGC->font)); + return x + w; } int -miPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) +miPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, + unsigned short *chars) { unsigned long n, i; int w; - CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ + CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ - GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)chars, - (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, - &n, charinfo); + GetGlyphs(pGC->font, (unsigned long) count, (unsigned char *) chars, + (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, + &n, charinfo); w = 0; - for (i=0; i < n; i++) w += charinfo[i]->metrics.characterWidth; + for (i = 0; i < n; i++) + w += charinfo[i]->metrics.characterWidth; if (n != 0) - (*pGC->ops->PolyGlyphBlt)( - pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); - return x+w; + (*pGC->ops->PolyGlyphBlt) (pDraw, pGC, x, y, n, charinfo, + FONTGLYPHS(pGC->font)); + return x + w; } void @@ -106,25 +108,27 @@ miImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n; FontPtr font = pGC->font; - CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ + CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ - GetGlyphs(font, (unsigned long)count, (unsigned char *)chars, - Linear8Bit, &n, charinfo); - if (n !=0 ) - (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font)); + GetGlyphs(font, (unsigned long) count, (unsigned char *) chars, + Linear8Bit, &n, charinfo); + if (n != 0) + (*pGC->ops->ImageGlyphBlt) (pDraw, pGC, x, y, n, charinfo, + FONTGLYPHS(font)); } void miImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, - int count, unsigned short *chars) + int count, unsigned short *chars) { unsigned long n; FontPtr font = pGC->font; - CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ + CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ - GetGlyphs(font, (unsigned long)count, (unsigned char *)chars, - (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, - &n, charinfo); - if (n !=0 ) - (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font)); + GetGlyphs(font, (unsigned long) count, (unsigned char *) chars, + (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, + &n, charinfo); + if (n != 0) + (*pGC->ops->ImageGlyphBlt) (pDraw, pGC, x, y, n, charinfo, + FONTGLYPHS(font)); } -- cgit v1.2.3