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/midash.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'xorg-server/mi/midash.c') diff --git a/xorg-server/mi/midash.c b/xorg-server/mi/midash.c index ba64d354f..78cbaf25e 100644 --- a/xorg-server/mi/midash.c +++ b/xorg-server/mi/midash.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 @@ -53,38 +52,35 @@ SOFTWARE. #include "mifpoly.h" void -miStepDash ( - int dist, /* distance to step */ - int *pDashIndex, /* current dash */ - unsigned char *pDash, /* dash list */ - int numInDashList, /* total length of dash list */ - int *pDashOffset /* offset into current dash */ +miStepDash(int dist, /* distance to step */ + int *pDashIndex, /* current dash */ + unsigned char *pDash, /* dash list */ + int numInDashList, /* total length of dash list */ + int *pDashOffset /* offset into current dash */ ) { - int dashIndex, dashOffset; + int dashIndex, dashOffset; int totallen; - int i; - + int i; + dashIndex = *pDashIndex; dashOffset = *pDashOffset; - if (dist < pDash[dashIndex] - dashOffset) - { - *pDashOffset = dashOffset + dist; - return; + if (dist < pDash[dashIndex] - dashOffset) { + *pDashOffset = dashOffset + dist; + return; } dist -= pDash[dashIndex] - dashOffset; if (++dashIndex == numInDashList) - dashIndex = 0; + dashIndex = 0; totallen = 0; for (i = 0; i < numInDashList; i++) - totallen += pDash[i]; + totallen += pDash[i]; if (totallen <= dist) - dist = dist % totallen; - while (dist >= pDash[dashIndex]) - { - dist -= pDash[dashIndex]; - if (++dashIndex == numInDashList) - dashIndex = 0; + dist = dist % totallen; + while (dist >= pDash[dashIndex]) { + dist -= pDash[dashIndex]; + if (++dashIndex == numInDashList) + dashIndex = 0; } *pDashIndex = dashIndex; *pDashOffset = dist; -- cgit v1.2.3