Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/efreet

Dir     : e17/libs/efreet/src/lib


Modified Files:
        efreet_mime.c efreet_trash.c 


Log Message:
- cleanups

===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_mime.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- efreet_mime.c       2 Aug 2008 21:48:44 -0000       1.38
+++ efreet_mime.c       2 Aug 2008 22:09:04 -0000       1.39
@@ -152,21 +152,15 @@
     if ((type = efreet_mime_special_check(file)))
         return type;
 
-    /*
-     * Check magics with priority > 80
-     */
+    /* Check magics with priority > 80 */
     if ((type = efreet_mime_magic_check_priority(file, 0, 80)))
         return type;
 
-    /*
-     * Check globs
-     */
+    /* Check globs */
     if ((type = efreet_mime_globs_type_get(file)))
         return type;
 
-    /*
-     * Check rest of magics
-     */
+    /* Check rest of magics */
     if ((type = efreet_mime_magic_check_priority(file, 80, 0)))
         return type;
 
@@ -200,8 +194,7 @@
     pp = p;
     while (*pp)
     {
-        if (*pp == '/')
-            *pp = '-';
+        if (*pp == '/') *pp = '-';
         pp++;
     }
     ecore_list_append(icons, p);
@@ -236,7 +229,6 @@
 
     /* Search for icons using list */
     icon = efreet_icon_list_find(theme, icons, size);
-
     ecore_list_destroy(icons);
 
     return icon;
@@ -266,9 +258,7 @@
     const char *s;
     char *ext, *mime;
 
-    /*
-     * Check in the extension hash for the type
-     */
+    /* Check in the extension hash for the type */
     ext = strchr(file, '.');
     if (ext)
     {
@@ -284,9 +274,7 @@
         }
     }
 
-    /*
-     * Fallback to the other globs if not found
-     */
+    /* Fallback to the other globs if not found */
     ecore_list_first_goto(globs);
     while ((g = ecore_list_next(globs)))
     {
@@ -602,14 +590,13 @@
     char buf[32];
     int i;
 
-    if (!(f = fopen(file, "r")))
-        return NULL;
+    if (!(f = fopen(file, "r"))) return NULL;
 
     i = fread(buf, 1, sizeof(buf), f);
     fclose(f);
 
-    if (i == 0)
-        return "application/octet-stream";
+    if (i == 0) return "application/octet-stream";
+
     /*
      * Check for ASCII control characters in the first 32 bytes.
      * Line Feeds, carriage returns, and tabs are ignored as they are
@@ -1105,7 +1092,6 @@
             else if ((level > e->indent) && match)
             {
                 fclose(f);
-
                 if (last_mime) return last_mime;
             }
 
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_trash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- efreet_trash.c      16 Jul 2008 19:45:12 -0000      1.1
+++ efreet_trash.c      2 Aug 2008 22:09:04 -0000       1.2
@@ -193,9 +193,7 @@
     files = ecore_file_ls(buf);
 
     while (infofile = ecore_list_next(files))
-    {
         printf("FILE: %s\n", infofile);
-    }
 
     return files;
 }
@@ -284,7 +282,6 @@
     memset(dest, 0, PATH_MAX * 3 + 4);
     snprintf(dest, strlen(uri->protocol) + 4, "%s://", uri->protocol);
 
-
     /* Most app doesn't handle the hostname in the uri so it's put to NULL */
     for (i = strlen(uri->protocol) + 3, p = uri->path; *p != '\0'; p++, i++)
     {
@@ -311,6 +308,5 @@
     IF_RELEASE(uri->protocol);
     IF_RELEASE(uri->path);
     IF_RELEASE(uri->hostname);
-    free(uri);
-    uri = NULL;
+    FREE(uri);
 }



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to