Enlightenment CVS committal
Author : sebastid
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_file
Modified Files:
ecore_file_path.c
Log Message:
Remove leading and trailing whitespace.
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file_path.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ecore_file_path.c 28 Sep 2005 02:19:13 -0000 1.8
+++ ecore_file_path.c 28 Sep 2005 02:26:08 -0000 1.9
@@ -79,15 +79,14 @@
/* Maybe the app has arguments */
file = strdup(app);
if (!file) return 0;
- p = strchr(file, ' ');
- if (!p)
- p = strchr(file, '\t');
- if (!p)
- p = strchr(file, '\n');
- if (p)
- {
- while (isspace(*(p - 1))) --p;
+ while ((*file) && isspace(*file))
+ file++;
+ p = file;
+ while ((*p) && !isspace(*p))
+ p++;
+ if ((p) && (*p))
+ {
*p = '\0';
if (ecore_file_exists(file) && ecore_file_can_exec(file)) return 1;
ecore_list_goto_first(__ecore_file_path_bin);
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs