aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/midash.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/mi/midash.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/mi/midash.c')
-rw-r--r--xorg-server/mi/midash.c40
1 files changed, 18 insertions, 22 deletions
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;