]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 16 Sep 2011 19:43:14 +0000 (19:43 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 16 Sep 2011 19:43:14 +0000 (19:43 +0000)
MagickCore/animate.c
MagickCore/display.c
MagickCore/semaphore.c

index 97a3df15bce75f6bcb17a9f99eaa51e0a86c737c..baa6196c247c1a98acd56d780de85670c9842f8f 100644 (file)
@@ -543,8 +543,14 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       status=XSaveImage(display,resource_info,windows,*image,exception);
       if (status == MagickFalse)
         {
-          XNoticeWidget(display,windows,"Unable to write X image:",
-            (*image)->filename);
+          char
+            message[MaxTextExtent];
+
+          (void) FormatLocaleString(message,MaxTextExtent,"%s:%s",
+            exception->reason != (char *) NULL ? exception->reason : "",
+            exception->description != (char *) NULL ? exception->description :
+            "");
+          XNoticeWidget(display,windows,"Unable to save file:",message);
           break;
         }
       break;
index 555cbe699c0412b21922657828c2c9a0bafb18bc..150fb7a6f3416e5826d3f30820768b743438474f 100644 (file)
@@ -7209,8 +7209,14 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       status=XSaveImage(display,resource_info,windows,*image,exception);
       if (status == MagickFalse)
         {
-          XNoticeWidget(display,windows,"Unable to write X image:",
-            (*image)->filename);
+          char
+            message[MaxTextExtent];
+
+          (void) FormatLocaleString(message,MaxTextExtent,"%s:%s",
+            exception->reason != (char *) NULL ? exception->reason : "",
+            exception->description != (char *) NULL ? exception->description :
+            "");
+          XNoticeWidget(display,windows,"Unable to save file:",message);
           break;
         }
       break;
@@ -7223,8 +7229,14 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       status=XPrintImage(display,resource_info,windows,*image,exception);
       if (status == MagickFalse)
         {
-          XNoticeWidget(display,windows,"Unable to print X image:",
-            (*image)->filename);
+          char
+            message[MaxTextExtent];
+
+          (void) FormatLocaleString(message,MaxTextExtent,"%s:%s",
+            exception->reason != (char *) NULL ? exception->reason : "",
+            exception->description != (char *) NULL ? exception->description :
+            "");
+          XNoticeWidget(display,windows,"Unable to print file:",message);
           break;
         }
       break;
index 6e57f4ff39a2c2976518c9835ffe2238aae0ae35..b39e56b5e4e1a22e8da251644fc6a657a744e8a3 100644 (file)
@@ -151,6 +151,17 @@ MagickExport SemaphoreInfo *AllocateSemaphoreInfo(void)
         ThrowFatalException(ResourceLimitFatalError,
           "UnableToInitializeSemaphore");
       }
+#if defined(MAGICKCORE_DEBUG)
+#if defined(PTHREAD_MUTEX_ERRORCHECK)
+    status=pthread_mutex_settype(&mutex_info,PTHREAD_MUTEX_ERRORCHECK);
+    if (status != 0)
+      {
+        errno=status;
+        ThrowFatalException(ResourceLimitFatalError,
+          "UnableToInitializeSemaphore");
+      }
+#endif
+#endif
     status=pthread_mutex_init(&semaphore_info->mutex,&mutex_info);
     if (status != 0)
       {