Enlightenment CVS committal
Author : onefang
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/examples
Modified Files:
exe_example.c
Log Message:
The line dancing craze spreads it's evil tenticles.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/examples/exe_example.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- exe_example.c 11 Dec 2005 06:52:07 -0000 1.1
+++ exe_example.c 16 Dec 2005 04:03:04 -0000 1.2
@@ -19,8 +19,21 @@
ev = event;
printf(" [*] DATA RET EXE %p - %p [%i bytes]\n", ev->exe, ev->data,
ev->size);
- for (i = 0; i < ev->size; i++)
- putchar(((unsigned char *)ev->data)[i]);
+
+ if (ev->lines)
+ {
+ int i;
+
+ for (i = 0; ev->lines[i].line != NULL; i++)
+ {
+ printf("%d %s\n", ev->lines[i].size, ev->lines[i].line);
+ }
+ }
+ else
+ {
+ for (i = 0; i < ev->size; i++)
+ putchar(((unsigned char *)ev->data)[i]);
+ }
printf("\n");
return 1;
}
@@ -46,7 +59,7 @@
NULL);
ecore_exe_pipe_write(exe1, "ls\n", 3);
exe2 = ecore_exe_pipe_run("/usr/bin/find / -print",
- ECORE_EXE_PIPE_READ,
+ ECORE_EXE_PIPE_READ |
ECORE_EXE_PIPE_READ_LINE_BUFFERED,
NULL);
exe3 = ecore_exe_pipe_run("/bin/cat",
ECORE_EXE_PIPE_WRITE,
-------------------------------------------------------
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