Enlightenment CVS committal
Author : doursse
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/software_xcb
Modified Files:
evas_engine.c evas_outbuf.c
Log Message:
iteration fixes
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_engine.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_engine.c 3 Dec 2005 09:27:53 -0000 1.6
+++ evas_engine.c 18 Dec 2005 11:49:28 -0000 1.7
@@ -1293,15 +1293,16 @@
evas_engine_software_xcb_screen_get(XCBConnection *conn, int screen)
{
XCBSCREENIter i;
- int cur;
if (!conn) return NULL;
i = XCBConnSetupSuccessRepRootsIter(XCBGetSetup(conn));
if (screen > i.rem - 1) return NULL; /* screen must be between 0 and i.rem
- 1 */
- for (cur = 0; cur <= screen; XCBSCREENNext(&i), ++cur) {}
+ for (; i.rem; --screen, XCBSCREENNext(&i))
+ if (screen == 0)
+ return i.data;
- return i.data;
+ return NULL;
}
static XCBVISUALTYPE *
@@ -1310,7 +1311,6 @@
XCBSCREEN *scr;
XCBDEPTH *d;
XCBVISUALTYPEIter iter;
- int cur;
if (!conn) return NULL;
scr = evas_engine_software_xcb_screen_get(conn, screen);
@@ -1319,7 +1319,7 @@
if (!d) return NULL;
iter = XCBDEPTHVisualsIter(d);
- for (cur = 0 ; cur < iter.rem ; XCBVISUALTYPENext(&iter), ++cur)
+ for (; iter.rem ; XCBVISUALTYPENext(&iter))
if (scr->root_visual.id == iter.data->visual_id.id)
return iter.data;
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/software_xcb/evas_outbuf.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_outbuf.c 18 Dec 2005 11:25:09 -0000 1.6
+++ evas_outbuf.c 18 Dec 2005 11:49:28 -0000 1.7
@@ -600,13 +600,12 @@
int h)
{
int i;
- XCBSCREEN *screen;
+ XCBSCREEN *screen = NULL;
{
XCBGetGeometryRep *geom;
XCBDRAWABLE root;
XCBSCREENIter i;
- int cur;
geom = XCBGetGeometryReply (buf->priv.x.conn, XCBGetGeometry
(buf->priv.x.conn, draw), 0);
root.window = geom->root;
@@ -614,7 +613,7 @@
geom = XCBGetGeometryReply (buf->priv.x.conn, XCBGetGeometry
(buf->priv.x.conn, root), 0);
i = XCBConnSetupSuccessRepRootsIter(XCBGetSetup(buf->priv.x.conn));
- for (cur = 0; cur < i.rem; XCBSCREENNext(&i), ++cur)
+ for (; i.rem; XCBSCREENNext(&i))
if (i.data->root.xid == geom->root.xid)
{
screen = i.data;
@@ -747,7 +746,7 @@
perf->x.screen_num = 0;
i = XCBConnSetupSuccessRepRootsIter(XCBGetSetup(conn));
- for (cur = 0; cur < i.rem; XCBSCREENNext(&i), ++cur)
+ for (cur = 0; i.rem; XCBSCREENNext(&i), ++cur)
if (i.data->root.xid == geom->root.xid)
{
perf->x.screen_num = cur;
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs