gegl r2062 - in trunk: . gegl/buffer gegl/graph gegl/module



Author: neo
Date: Tue Feb 19 10:03:24 2008
New Revision: 2062
URL: http://svn.gnome.org/viewvc/gegl?rev=2062&view=rev

Log:
2008-02-19  Sven Neumann  <sven gimp org>

	* gegl/module/gegldatafiles.c
	* gegl/graph/gegl-node.c
	* gegl/graph/gegl-node-context.c
	* gegl/buffer/gegl-cache.c
	* gegl/buffer/gegl-tile-mem.c
	* gegl/buffer/gegl-buffer.c: organized includes.

	* gegl/buffer/gegl-buffer-load.c
	* gegl/buffer/gegl-buffer-save.c: fixed error handling.


Modified:
   trunk/ChangeLog
   trunk/gegl/buffer/gegl-buffer-load.c
   trunk/gegl/buffer/gegl-buffer-save.c
   trunk/gegl/buffer/gegl-buffer.c
   trunk/gegl/buffer/gegl-cache.c
   trunk/gegl/buffer/gegl-tile-mem.c
   trunk/gegl/graph/gegl-node-context.c
   trunk/gegl/graph/gegl-node.c
   trunk/gegl/module/gegldatafiles.c

Modified: trunk/gegl/buffer/gegl-buffer-load.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-load.c	(original)
+++ trunk/gegl/buffer/gegl-buffer-load.c	Tue Feb 19 10:03:24 2008
@@ -15,14 +15,17 @@
  *
  * Copyright 2006, 2007 Ãyvind KolÃs <pippin gimp org>
  */
+
 #include "config.h"
 
+#include <string.h>
+#include <errno.h>
+
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <string.h>
-#include <glib.h>
+
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
@@ -30,7 +33,8 @@
 #include <io.h>
 #endif
 
-#include "../gegl-types.h"
+#include "gegl-types.h"
+
 #include "gegl-buffer-types.h"
 #include "gegl-buffer.h"
 #include "gegl-storage.h"
@@ -104,7 +108,12 @@
   info->fd   = g_open (info->path, O_RDONLY, 0);
   if (info->fd == -1)
     {
-      g_message ("Unable to open '%s' for loading a buffer", info->path);
+      gchar *name = g_filename_display_name (info->path);
+
+      g_message ("Unable to open '%s' for loading a buffer: %s",
+                 name, g_strerror (errno));
+      g_free (name);
+
       load_info_destroy (info);
       return;
     }

Modified: trunk/gegl/buffer/gegl-buffer-save.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-save.c	(original)
+++ trunk/gegl/buffer/gegl-buffer-save.c	Tue Feb 19 10:03:24 2008
@@ -18,12 +18,14 @@
 
 #include "config.h"
 
+#include <string.h>
+#include <errno.h>
+
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <string.h>
-#include <glib.h>
+
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
@@ -37,7 +39,8 @@
 #endif
 #endif
 
-#include "../gegl-types.h"
+#include "gegl-types.h"
+
 #include "gegl-buffer-types.h"
 #include "gegl-buffer.h"
 #include "gegl-storage.h"
@@ -158,10 +161,16 @@
 
   strcpy (info->header.magic, "_G_E_G_L");
   info->path = g_strdup (path);
-  info->fd   = g_open (info->path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+  info->fd   = g_open (info->path,
+                       O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
   if (info->fd == -1)
     {
-      g_message ("Unable to open '%s' when saving a buffer", info->path);
+      gchar *name = g_filename_display_name (info->path);
+
+      g_message ("Unable to open '%s' when saving a buffer: %s",
+                 name, g_strerror (errno));
+      g_free (name);
+
       save_info_destroy (info);
       return;
     }

Modified: trunk/gegl/buffer/gegl-buffer.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer.c	(original)
+++ trunk/gegl/buffer/gegl-buffer.c	Tue Feb 19 10:03:24 2008
@@ -18,15 +18,13 @@
 
 #include "config.h"
 
-#include <limits.h>
 #include <math.h>
 #include <string.h>
 
-#include <glib.h>
 #include <glib-object.h>
-#include <glib/gstdio.h>
 
-#include "../gegl-types.h"
+#include "gegl-types.h"
+
 #include "gegl-buffer-types.h"
 #include "gegl-buffer.h"
 #include "gegl-buffer-allocator.h"

Modified: trunk/gegl/buffer/gegl-cache.c
==============================================================================
--- trunk/gegl/buffer/gegl-cache.c	(original)
+++ trunk/gegl/buffer/gegl-cache.c	Tue Feb 19 10:03:24 2008
@@ -16,18 +16,22 @@
  * Copyright (C) 2003, 2004, 2006 Ãyvind KolÃs
  */
 
-#include <stdio.h>
+#include "config.h"
+
 #include <string.h>
 
 #include <glib-object.h>
-#include <gobject/gvaluecollector.h>
 
-#include "gegl-types.h"
 #include <babl/babl.h>
+
+#include "gegl-types.h"
+#include "gegl-utils.h"
+
 #include "graph/gegl-node.h"
+
 #include "gegl-cache.h"
 #include "gegl-region.h"
-#include "../gegl-utils.h"
+
 
 enum
 {

Modified: trunk/gegl/buffer/gegl-tile-mem.c
==============================================================================
--- trunk/gegl/buffer/gegl-tile-mem.c	(original)
+++ trunk/gegl/buffer/gegl-tile-mem.c	Tue Feb 19 10:03:24 2008
@@ -19,15 +19,8 @@
 #include "config.h"
 
 #include <string.h>
-#include <errno.h>
-
-#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
 #include <glib-object.h>
-#include <glib/gstdio.h>
 
 #include "gegl-tile-backend.h"
 #include "gegl-tile-mem.h"

Modified: trunk/gegl/graph/gegl-node-context.c
==============================================================================
--- trunk/gegl/graph/gegl-node-context.c	(original)
+++ trunk/gegl/graph/gegl-node-context.c	Tue Feb 19 10:03:24 2008
@@ -21,15 +21,16 @@
 
 #define GEGL_INTERNAL
 
-#include <stdio.h>
 #include <string.h>
 
 #include <glib-object.h>
+
 #include "gegl-types.h"
 
 #include "gegl-node-context.h"
 #include "gegl-node.h"
 #include "gegl-pad.h"
+
 #include "operation/gegl-operation.h"
 
 static void     gegl_node_context_class_init   (GeglNodeContextClass  *klass);

Modified: trunk/gegl/graph/gegl-node.c
==============================================================================
--- trunk/gegl/graph/gegl-node.c	(original)
+++ trunk/gegl/graph/gegl-node.c	Tue Feb 19 10:03:24 2008
@@ -21,11 +21,11 @@
 
 #include "config.h"
 
-#include <stdio.h>
 #include <string.h>
 
 #include <glib-object.h>
 #include <gobject/gvaluecollector.h>
+
 #include "gegl-types.h"
 
 #include "gegl-node.h"
@@ -33,9 +33,11 @@
 #include "gegl-pad.h"
 #include "gegl-utils.h"
 #include "gegl-visitable.h"
+
 #include "operation/gegl-operation.h"
 #include "operation/gegl-operations.h"
 #include "operation/gegl-operation-meta.h"
+
 #include "process/gegl-eval-mgr.h"
 #include "process/gegl-have-visitor.h"
 #include "process/gegl-prepare-visitor.h"
@@ -483,8 +485,6 @@
   return NULL;
 }
 
-#include <stdio.h>
-
 gboolean
 gegl_node_connect_to (GeglNode    *source,
                       const gchar *source_pad_name,
@@ -1106,8 +1106,6 @@
   va_end (var_args);
 }
 
-#include <stdio.h>
-
 void
 gegl_node_set_valist (GeglNode    *self,
                       const gchar *first_property_name,

Modified: trunk/gegl/module/gegldatafiles.c
==============================================================================
--- trunk/gegl/module/gegldatafiles.c	(original)
+++ trunk/gegl/module/gegldatafiles.c	Tue Feb 19 10:03:24 2008
@@ -19,12 +19,12 @@
  * Datafiles module copyight (C) 1996 Federico Mena Quintero
  * federico nuclecu unam mx
  */
+
 #include "config.h"
 
-#include <stdlib.h>
 #include <string.h>
-#include <sys/types.h>
 
+#include <sys/types.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -198,7 +198,6 @@
               file_data.atime    = filestat.st_atime;
               file_data.mtime    = filestat.st_mtime;
               file_data.ctime    = filestat.st_ctime;
-    
 
               if (! err)
                 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]