Enlightenment CVS committal

Author  : handyande
Project : e17
Module  : apps/e_utils

Dir     : e17/apps/e_utils/src/bin/e17setroot


Modified Files:
        e17setroot.c 


Log Message:
Use ecore_file patch from Chad Kittel
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17setroot/e17setroot.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- e17setroot.c        5 Jun 2005 05:04:02 -0000       1.21
+++ e17setroot.c        17 Jul 2005 19:41:27 -0000      1.22
@@ -10,6 +10,7 @@
 #include <E_Lib.h>
 #include <Engrave.h>
 #include <Ecore.h>
+#include <Ecore_File.h>
 
 #include "config.h"
 
@@ -125,53 +126,6 @@
         e_bg_img_file = argv[optind];
 }
 
-/* return dir from a full path filename */
-char *_e_bg_bg_file_getdir(char *path) {
-   char *ptr;
-   char *c;
-   char *dir;
-   int i = 0;
-
-   ptr=path;
-   c=strrchr(ptr, '/');
-   if (!c)
-     return ".";
-   dir = malloc(strlen(path) + 1);
-
-   while(ptr != c) {
-      dir[i] = *ptr;
-      ptr++;
-      i++;
-   }
-
-   dir[i] = '\0';
-   return dir;
-}
-
-/* return filename from a full path filename */
-char *_e_bg_bg_file_getfile(char *path) {
-   char *ptr;
-   char *c;
-   char *file;
-   int i;
-
-   i = 0;
-   ptr = path;
-   c = strrchr(ptr, '/');
-   if (!c)
-     return path;
-   file = malloc(strlen(ptr) + 1);
-
-   while(ptr != c) {
-      file[i] = *ptr;
-      ptr++;
-      i++;
-   }
-
-   file[i] = '\0';
-   return c;
-}
-
 /* strip extention from a file */
 char *_e_bg_bg_file_stripext(char *path) {
    char *ptr;
@@ -219,11 +173,11 @@
       return;
    }
    
-   file = _e_bg_bg_file_getfile(filename);
-   dir = _e_bg_bg_file_getdir(filename);
+   file = ecore_file_get_file(filename);
+   dir = ecore_file_get_dir(filename);
 
    filenoext = _e_bg_bg_file_stripext(filename);
-   filenoext = _e_bg_bg_file_getfile(filenoext);
+   filenoext = ecore_file_get_file(filenoext);
 
    /* Set up edj path */
    edj_file = malloc(strlen(getenv("HOME")) +  strlen("/.e/e/backgrounds/") 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to