Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
ipc.c
Log Message:
Compatibility fix for E-Slides.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -3 -r1.203 -r1.204
--- ipc.c 15 Feb 2005 22:18:59 -0000 1.203
+++ ipc.c 15 Feb 2005 22:24:03 -0000 1.204
@@ -1257,6 +1257,40 @@
}
}
+/*
+ * Compatibility stuff - DO NOT USE
+ */
+static int
+IPC_Compat(const char *params)
+{
+ int ok = 0;
+ char param1[128];
+ const char *p;
+ int len;
+
+ if (!params)
+ goto done;
+
+ len = 0;
+ param1[0] = '\0';
+ sscanf(params, "%127s %n", param1, &len);
+ p = params + len;
+
+ ok = 1;
+ if (!strcmp(param1, "goto_desktop"))
+ {
+ if (*p == '?')
+ IpcPrintf("Current Desktop: %d\n", DesksGetCurrent());
+ }
+ else
+ {
+ ok = 0;
+ }
+
+ done:
+ return ok;
+}
+
/* the IPC Array */
/* the format of an IPC member of the IPC array is as follows:
@@ -1504,8 +1538,7 @@
int
HandleIPC(const char *params, Client * c)
{
- int i;
- int num;
+ int i, num, ok;
char w[FILEPATH_LEN_MAX];
const IpcItem **lst, *ipc;
@@ -1518,6 +1551,7 @@
word(params, 1, w);
+ ok = 0;
for (i = 0; i < num; i++)
{
ipc = lst[i];
@@ -1530,12 +1564,16 @@
else
ipc->func(NULL, c);
- IpcPrintFlush(c);
- CommsFlush(c);
- return 1;
+ ok = 1;
+ break;
}
- return 0;
+ if (!ok)
+ ok = IPC_Compat(params);
+
+ IpcPrintFlush(c);
+ CommsFlush(c);
+ return ok;
}
int
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs