gimp r27303 - in branches/gimp-2-6: . plug-ins/file-psd



Author: neo
Date: Fri Oct 17 20:30:54 2008
New Revision: 27303
URL: http://svn.gnome.org/viewvc/gimp?rev=27303&view=rev

Log:
2008-10-17  Sven Neumann  <sven gimp org>

	Merged from trunk:

	* plug-ins/file-psd/psd-save.c (xfwrite): fixed handling of 
empty
	strings. Don't quit silently, write an error message to stderr 
at
	least.



Modified:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/plug-ins/file-psd/psd-save.c

Modified: branches/gimp-2-6/plug-ins/file-psd/psd-save.c
==============================================================================
--- branches/gimp-2-6/plug-ins/file-psd/psd-save.c	(original)
+++ branches/gimp-2-6/plug-ins/file-psd/psd-save.c	Fri Oct 17 20:30:54 2008
@@ -436,9 +436,12 @@
          glong          len,
          const gchar   *why)
 {
+  if (len == 0)
+    return;
+
   if (fwrite (buf, len, 1, fd) == 0)
     {
-      IFDBG printf (" Function: xfwrite: Error while writing '%s'\n", why);
+      g_printerr ("%s: Error while writing '%s'\n", G_STRFUNC, why);
       gimp_quit ();
     }
 }
@@ -458,7 +461,7 @@
   pos = ftell (fd);
   if (fwrite (&b, 1, 2, fd) == 0)
     {
-      IFDBG printf (" Function: write_gchar: Error while writing '%s'\n", why);
+      g_printerr ("%s: Error while writing '%s'\n", G_STRFUNC, why);
       gimp_quit ();
     }
   fseek (fd, pos + 1, SEEK_SET);
@@ -479,7 +482,7 @@
 
   if (fwrite (&b, 1, 2, fd) == 0)
     {
-      IFDBG printf (" Function: write_gint16: Error while writing '%s'\n", why);
+      g_printerr ("%s: Error while writing '%s'\n", G_STRFUNC, why);
       gimp_quit ();
     }
 }
@@ -501,7 +504,7 @@
 
   if (fwrite (&b, 1, 4, fd) == 0)
     {
-      IFDBG printf (" Function: write_gint32: Error while writing '%s'\n", why);
+      g_printerr ("%s: Error while writing '%s'\n", G_STRFUNC, why);
       gimp_quit ();
     }
 }
@@ -626,7 +629,8 @@
       return 2;                                         /* Indexed */
     default:
       g_message (_("Error: Can't convert GIMP base imagetype to PSD mode"));
-      IFDBG printf ("PSD Save: gimpBaseType value is %d, can't convert to PSD mode", gimpBaseType);
+      IFDBG printf ("PSD Save: gimpBaseType value is %d, "
+                    "can't convert to PSD mode", gimpBaseType);
       gimp_quit ();
       return 3;                            /* Return RGB by default */
     }



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