summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-03-09 15:05:26 +1000
committerDave Airlie <airlied@redhat.com>2011-03-10 11:01:51 +1000
commit5fb329a04a18835ce864d0563f6dfeb3d3c78d69 (patch)
treecb75ce3c0c36a2cefc169946f5b192764c679d00 /Xext
parent0bccfcc97b2300b83aa4693454c27ac87f23f221 (diff)
panoramiX: convert 1->panoramiXNumScreens loops to use macro (v2)
This converts all the remaining 1->num loops to the macro, this removes nearly all the panoramiXNumScreens usage in loops, and is a step to replacing it. v2: move some from the other patch. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/panoramiX.c6
-rw-r--r--Xext/panoramiXprocs.c2
-rw-r--r--Xext/shm.c2
-rw-r--r--Xext/xvdisp.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index d10af70c4..74241d8bc 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -413,7 +413,7 @@ static void XineramaInitData(ScreenPtr pScreen)
PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
- for (i = 1; i < PanoramiXNumScreens; i++) {
+ FOR_NSCREENS_FORWARD_SKIP(i) {
pScreen = screenInfo.screens[i];
w = pScreen->x + pScreen->width;
h = pScreen->y + pScreen->height;
@@ -740,7 +740,7 @@ PanoramiXMaybeAddDepth(DepthPtr pDepth)
int j, k;
Bool found = FALSE;
- for (j = 1; j < PanoramiXNumScreens; j++) {
+ FOR_NSCREENS_FORWARD_SKIP(j) {
pScreen = screenInfo.screens[j];
for (k = 0; k < pScreen->numDepths; k++) {
if (pScreen->allowedDepths[k].depth == pDepth->depth) {
@@ -773,7 +773,7 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual)
int j, k;
Bool found = FALSE;
- for (j = 1; j < PanoramiXNumScreens; j++) {
+ FOR_NSCREENS_FORWARD_SKIP(j) {
pScreen = screenInfo.screens[j];
found = FALSE;
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 4eb9a13c5..9ea461173 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -1840,7 +1840,7 @@ int PanoramiXGetImage(ClientPtr client)
}
drawables[0] = pDraw;
- for(i = 1; i < PanoramiXNumScreens; i++) {
+ FOR_NSCREENS_FORWARD_SKIP(i) {
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
DixGetAttrAccess);
if (rc != Success)
diff --git a/Xext/shm.c b/Xext/shm.c
index 62947206b..b08af821b 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -848,7 +848,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return BadAlloc;
drawables[0] = pDraw;
- for(i = 1; i < PanoramiXNumScreens; i++) {
+ FOR_NSCREENS_FORWARD_SKIP(i) {
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
DixReadAccess);
if (rc != Success)
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index beb26a973..b96843159 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1918,7 +1918,7 @@ void XineramifyXv(void)
MatchingAdaptors[0] = refAdapt;
isOverlay = hasOverlay(refAdapt);
- for(j = 1; j < PanoramiXNumScreens; j++)
+ FOR_NSCREENS_FORWARD_SKIP(j)
MatchingAdaptors[j] = matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay);
/* now create a resource for each port */