]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/wand-view.c
...
[imagemagick] / MagickWand / wand-view.c
index af1c074cd0ec34665be3042a0d786fc42d7e3814..a4ff6e52010540b91578eeaceeee3d86d1cc2618 100644 (file)
 %                        MagickWand Wand View Methods                         %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                March 2003                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -65,7 +65,7 @@ struct _WandView
     id;
 
   char
-    name[MaxTextExtent],
+    name[MagickPathExtent],
     *description;
 
   RectangleInfo
@@ -124,7 +124,7 @@ WandExport WandView *CloneWandView(const WandView *wand_view)
     i;
 
   assert(wand_view != (WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   if (wand_view->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand_view->name);
   clone_view=(WandView *) AcquireMagickMemory(sizeof(*clone_view));
@@ -133,7 +133,7 @@ WandExport WandView *CloneWandView(const WandView *wand_view)
       wand_view->name);
   (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
   clone_view->id=AcquireWandId();
-  (void) FormatLocaleString(clone_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_view->name,MagickPathExtent,"%s-%.20g",
     WandViewId,(double) clone_view->id);
   clone_view->description=ConstantString(wand_view->description);
   clone_view->image=CloneImage(wand_view->image,0,0,MagickTrue,
@@ -148,7 +148,7 @@ WandExport WandView *CloneWandView(const WandView *wand_view)
   clone_view->debug=wand_view->debug;
   if (clone_view->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_view->name);
-  clone_view->signature=WandSignature;
+  clone_view->signature=MagickWandSignature;
   return(clone_view);
 }
 \f
@@ -192,13 +192,13 @@ static PixelWand ***DestroyPixelsThreadSet(PixelWand ***pixel_wands,
 WandExport WandView *DestroyWandView(WandView *wand_view)
 {
   assert(wand_view != (WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   wand_view->pixel_wands=DestroyPixelsThreadSet(wand_view->pixel_wands,
     wand_view->extent.width);
   wand_view->image=DestroyImage(wand_view->image);
   wand_view->view=DestroyCacheView(wand_view->view);
   wand_view->exception=DestroyExceptionInfo(wand_view->exception);
-  wand_view->signature=(~WandSignature);
+  wand_view->signature=(~MagickWandSignature);
   RelinquishWandId(wand_view->id);
   wand_view=(WandView *) RelinquishMagickMemory(wand_view);
   return(wand_view);
@@ -278,7 +278,7 @@ WandExport MagickBooleanType DuplexTransferWandViewIterator(WandView *source,
     y;
 
   assert(source != (WandView *) NULL);
-  assert(source->signature == WandSignature);
+  assert(source->signature == MagickWandSignature);
   if (transfer == (DuplexTransferWandViewMethod) NULL)
     return(MagickFalse);
   source_image=source->wand->images;
@@ -303,14 +303,14 @@ WandExport MagickBooleanType DuplexTransferWandViewIterator(WandView *source,
       sync;
 
     register const Quantum
-      *restrict duplex_pixels,
-      *restrict pixels;
+      *magick_restrict duplex_pixels,
+      *magick_restrict pixels;
 
     register ssize_t
       x;
 
     register Quantum
-      *restrict destination_pixels;
+      *magick_restrict destination_pixels;
 
     if (status == MagickFalse)
       continue;
@@ -417,12 +417,12 @@ WandExport char *GetWandViewException(const WandView *wand_view,
     *description;
 
   assert(wand_view != (const WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   if (wand_view->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand_view->name);
   assert(severity != (ExceptionType *) NULL);
   *severity=wand_view->exception->severity;
-  description=(char *) AcquireQuantumMemory(2UL*MaxTextExtent,
+  description=(char *) AcquireQuantumMemory(2UL*MagickPathExtent,
     sizeof(*description));
   if (description == (char *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
@@ -431,14 +431,14 @@ WandExport char *GetWandViewException(const WandView *wand_view,
   if (wand_view->exception->reason != (char *) NULL)
     (void) CopyMagickString(description,GetLocaleExceptionMessage(
       wand_view->exception->severity,wand_view->exception->reason),
-        MaxTextExtent);
+        MagickPathExtent);
   if (wand_view->exception->description != (char *) NULL)
     {
-      (void) ConcatenateMagickString(description," (",MaxTextExtent);
+      (void) ConcatenateMagickString(description," (",MagickPathExtent);
       (void) ConcatenateMagickString(description,GetLocaleExceptionMessage(
         wand_view->exception->severity,wand_view->exception->description),
-        MaxTextExtent);
-      (void) ConcatenateMagickString(description,")",MaxTextExtent);
+        MagickPathExtent);
+      (void) ConcatenateMagickString(description,")",MagickPathExtent);
     }
   return(description);
 }
@@ -468,7 +468,7 @@ WandExport char *GetWandViewException(const WandView *wand_view,
 WandExport RectangleInfo GetWandViewExtent(const WandView *wand_view)
 {
   assert(wand_view != (WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   return(wand_view->extent);
 }
 \f
@@ -536,7 +536,7 @@ WandExport MagickBooleanType GetWandViewIterator(WandView *source,
     y;
 
   assert(source != (WandView *) NULL);
-  assert(source->signature == WandSignature);
+  assert(source->signature == MagickWandSignature);
   if (get == (GetWandViewMethod) NULL)
     return(MagickFalse);
   source_image=source->wand->images;
@@ -619,7 +619,7 @@ WandExport PixelWand **GetWandViewPixels(const WandView *wand_view)
     id = GetOpenMPThreadId();
 
   assert(wand_view != (WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   return(wand_view->pixel_wands[id]);
 }
 \f
@@ -648,7 +648,7 @@ WandExport PixelWand **GetWandViewPixels(const WandView *wand_view)
 WandExport MagickWand *GetWandViewWand(const WandView *wand_view)
 {
   assert(wand_view != (WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   return(wand_view->wand);
 }
 \f
@@ -682,7 +682,7 @@ WandExport MagickBooleanType IsWandView(const WandView *wand_view)
 
   if (wand_view == (const WandView *) NULL)
     return(MagickFalse);
-  if (wand_view->signature != WandSignature)
+  if (wand_view->signature != MagickWandSignature)
     return(MagickFalse);
   length=strlen(WandViewId);
   if (LocaleNCompare(wand_view->name,WandViewId,length) != 0)
@@ -749,14 +749,14 @@ WandExport WandView *NewWandView(MagickWand *wand)
     *wand_view;
 
   assert(wand != (MagickWand *) NULL);
-  assert(wand->signature == WandSignature);
+  assert(wand->signature == MagickWandSignature);
   wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view));
   if (wand_view == (WandView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
   wand_view->id=AcquireWandId();
-  (void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(wand_view->name,MagickPathExtent,"%s-%.20g",
     WandViewId,(double) wand_view->id);
   wand_view->description=ConstantString("WandView");
   wand_view->wand=wand;
@@ -770,7 +770,7 @@ WandExport WandView *NewWandView(MagickWand *wand)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
   wand_view->debug=IsEventLogging();
-  wand_view->signature=WandSignature;
+  wand_view->signature=MagickWandSignature;
   return(wand_view);
 }
 \f
@@ -811,14 +811,14 @@ WandExport WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
     *wand_view;
 
   assert(wand != (MagickWand *) NULL);
-  assert(wand->signature == WandSignature);
+  assert(wand->signature == MagickWandSignature);
   wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view));
   if (wand_view == (WandView *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
   wand_view->id=AcquireWandId();
-  (void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(wand_view->name,MagickPathExtent,"%s-%.20g",
     WandViewId,(double) wand_view->id);
   wand_view->description=ConstantString("WandView");
   exception=AcquireExceptionInfo();
@@ -834,7 +834,7 @@ WandExport WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
   wand_view->debug=IsEventLogging();
-  wand_view->signature=WandSignature;
+  wand_view->signature=MagickWandSignature;
   return(wand_view);
 }
 \f
@@ -866,7 +866,7 @@ MagickExport void SetWandViewDescription(WandView *wand_view,
   const char *description)
 {
   assert(wand_view != (WandView *) NULL);
-  assert(wand_view->signature == WandSignature);
+  assert(wand_view->signature == MagickWandSignature);
   wand_view->description=ConstantString(description);
 }
 \f
@@ -935,7 +935,7 @@ WandExport MagickBooleanType SetWandViewIterator(WandView *destination,
     y;
 
   assert(destination != (WandView *) NULL);
-  assert(destination->signature == WandSignature);
+  assert(destination->signature == MagickWandSignature);
   if (set == (SetWandViewMethod) NULL)
     return(MagickFalse);
   destination_image=destination->wand->images;
@@ -962,7 +962,7 @@ WandExport MagickBooleanType SetWandViewIterator(WandView *destination,
       x;
 
     register Quantum
-      *restrict pixels;
+      *magick_restrict pixels;
 
     if (status == MagickFalse)
       continue;
@@ -1071,7 +1071,7 @@ WandExport MagickBooleanType TransferWandViewIterator(WandView *source,
     y;
 
   assert(source != (WandView *) NULL);
-  assert(source->signature == WandSignature);
+  assert(source->signature == MagickWandSignature);
   if (transfer == (TransferWandViewMethod) NULL)
     return(MagickFalse);
   source_image=source->wand->images;
@@ -1096,13 +1096,13 @@ WandExport MagickBooleanType TransferWandViewIterator(WandView *source,
       sync;
 
     register const Quantum
-      *restrict pixels;
+      *magick_restrict pixels;
 
     register ssize_t
       x;
 
     register Quantum
-      *restrict destination_pixels;
+      *magick_restrict destination_pixels;
 
     if (status == MagickFalse)
       continue;
@@ -1227,7 +1227,7 @@ WandExport MagickBooleanType UpdateWandViewIterator(WandView *source,
     y;
 
   assert(source != (WandView *) NULL);
-  assert(source->signature == WandSignature);
+  assert(source->signature == MagickWandSignature);
   if (update == (UpdateWandViewMethod) NULL)
     return(MagickFalse);
   source_image=source->wand->images;
@@ -1253,7 +1253,7 @@ WandExport MagickBooleanType UpdateWandViewIterator(WandView *source,
       x;
 
     register Quantum
-      *restrict pixels;
+      *magick_restrict pixels;
 
     if (status == MagickFalse)
       continue;