]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <mikayla-grace@urban-warrior.org>
Mon, 15 Apr 2019 13:02:06 +0000 (09:02 -0400)
committerCristy <mikayla-grace@urban-warrior.org>
Mon, 15 Apr 2019 13:02:06 +0000 (09:02 -0400)
26 files changed:
MagickCore/Makefile.am
MagickCore/animate.c
MagickCore/blob.c
MagickCore/cache.c
MagickCore/display.c
MagickCore/image.c
MagickCore/log.c
MagickCore/policy-private.h
MagickCore/signature.c
MagickCore/string.c
MagickCore/string_.h
MagickCore/timer.c
MagickCore/timer.h
MagickCore/widget.c
MagickWand/mogrify.c
MagickWand/operation.c
Makefile.in
coders/cin.c
coders/dpx.c
coders/mat.c
coders/pdb.c
coders/pdf.c
coders/ps.c
coders/ps2.c
coders/ps3.c
configure

index 9d8fd113994beeaf7e06865560f9864332d1b28f..39b4a353ca60ce2263906fe4ad08442081c7520e 100644 (file)
@@ -212,6 +212,7 @@ MAGICKCORE_BASE_SRCS = \
        MagickCore/pixel-private.h \
        MagickCore/policy.c \
        MagickCore/policy.h \
+       MagickCore/policy-private.h \
        MagickCore/prepress.c \
        MagickCore/prepress.h \
        MagickCore/property.c \
@@ -268,6 +269,7 @@ MAGICKCORE_BASE_SRCS = \
        MagickCore/thread-private.h \
        MagickCore/timer.c \
        MagickCore/timer.h \
+       MagickCore/timer-private.h \
        MagickCore/token.c \
        MagickCore/token.h \
        MagickCore/token-private.h \
@@ -467,6 +469,7 @@ MAGICKCORE_NOINST_HDRS = \
        MagickCore/string-private.h \
        MagickCore/thread_.h \
        MagickCore/thread-private.h \
+       MagickCore/timer-private.h \
        MagickCore/token-private.h \
        MagickCore/transform-private.h \
        MagickCore/type-private.h \
index 06d3088f10e9c7487e4beebbfb5912f186dfad10..8e6bd70bcc2345b27dce77b65c5304633497186f 100644 (file)
@@ -67,6 +67,7 @@
 #include "MagickCore/resource_.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/transform.h"
 #include "MagickCore/utility.h"
 #include "MagickCore/utility-private.h"
@@ -2173,10 +2174,10 @@ MagickExport Image *XAnimateImages(Display *display,
     /*
       Handle a window event.
     */
-    timestamp=time((time_t *) NULL);
+    timestamp=GetMagickTime();
     (void) XNextEvent(display,&event);
     if (windows->image.stasis == MagickFalse)
-      windows->image.stasis=(time((time_t *) NULL)-timestamp) > 0 ?
+      windows->image.stasis=(GetMagickTime()-timestamp) > 0 ?
         MagickTrue : MagickFalse;
     if (event.xany.window == windows->command.id)
       {
index 77868e1bc74cc18417c16a898feb154fac9edb5b..7de1023f69ce16d6a7c67e19a2cb843eb8a95f3c 100644 (file)
@@ -68,6 +68,7 @@
 #include "MagickCore/semaphore.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/token.h"
 #include "MagickCore/utility.h"
 #include "MagickCore/utility-private.h"
@@ -1736,7 +1737,7 @@ MagickExport void GetBlobInfo(BlobInfo *blob_info)
   (void) memset(blob_info,0,sizeof(*blob_info));
   blob_info->type=UndefinedStream;
   blob_info->quantum=(size_t) MagickMaxBlobExtent;
-  blob_info->properties.st_mtime=time((time_t *) NULL);
+  blob_info->properties.st_mtime=GetMagickTime();
   blob_info->properties.st_ctime=blob_info->properties.st_mtime;
   blob_info->debug=IsEventLogging();
   blob_info->reference_count=1;
index f521a09a08d71c826b0a76d15eb4eb2b1066f5a4..0197385ac34a43b8adac90876e96fd614d311148 100644 (file)
@@ -70,6 +70,7 @@
 #include "MagickCore/splay-tree.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/thread-private.h"
 #include "MagickCore/utility.h"
 #include "MagickCore/utility-private.h"
@@ -1681,10 +1682,10 @@ static Cache GetImagePixelCache(Image *image,const MagickBooleanType clone,
         Set the expire time in seconds.
       */
       cache_timelimit=GetMagickResourceLimit(TimeResource);
-      cache_epoch=time((time_t *) NULL);
+      cache_epoch=GetMagickTime();
     }
   if ((cache_timelimit != MagickResourceInfinity) &&
-      ((MagickSizeType) (time((time_t *) NULL)-cache_epoch) >= cache_timelimit))
+      ((MagickSizeType) (GetMagickTime()-cache_epoch) >= cache_timelimit))
     {
 #if defined(ECANCELED)
       errno=ECANCELED;
index 4e8e7eb15298d14703d89763b7afd7d6b710595a..0ceae38805bd804c6900dcec2ba8f57ba71acd93 100644 (file)
@@ -87,6 +87,7 @@
 #include "MagickCore/statistic.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/transform.h"
 #include "MagickCore/transform-private.h"
 #include "MagickCore/threshold.h"
@@ -15073,7 +15074,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
     Respond to events.
   */
   delay=display_image->delay/MagickMax(display_image->ticks_per_second,1L);
-  timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
+  timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
   update_time=0;
   if (resource_info->update != MagickFalse )
     {
@@ -15098,7 +15099,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
     if (windows->image.mapped != MagickFalse )
       if ((display_image->delay != 0) || (resource_info->update != 0))
         {
-          if (timer < time((time_t *) NULL))
+          if (timer < GetMagickTime())
             {
               if (resource_info->update == MagickFalse)
                 *state|=NextImageState | ExitState;
@@ -15127,7 +15128,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
                       }
                   delay=display_image->delay/MagickMax(
                     display_image->ticks_per_second,1L);
-                  timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
+                  timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
                 }
             }
           if (XEventsQueued(display,QueuedAfterFlush) == 0)
@@ -15139,12 +15140,12 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
               continue;
             }
         }
-    timestamp=time((time_t *) NULL);
+    timestamp=GetMagickTime();
     (void) XNextEvent(display,&event);
     if ((windows->image.stasis == MagickFalse) ||
         (windows->magnify.stasis == MagickFalse))
       {
-        if ((time((time_t *) NULL)-timestamp) > 0)
+        if ((GetMagickTime()-timestamp) > 0)
           {
             windows->image.stasis=MagickTrue;
             windows->magnify.stasis=MagickTrue;
@@ -15371,7 +15372,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
           }
         delay=display_image->delay/MagickMax(display_image->ticks_per_second,
           1L);
-        timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
+        timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
         break;
       }
       case ButtonRelease:
@@ -15763,7 +15764,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
             XRefreshWindow(display,&windows->image,&event);
             delay=display_image->delay/MagickMax(
               display_image->ticks_per_second,1L);
-            timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
+            timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
             break;
           }
         if ((event.xexpose.window == windows->magnify.id) &&
@@ -15824,7 +15825,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
           }
         delay=display_image->delay/MagickMax(
           display_image->ticks_per_second,1L);
-        timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
+        timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
         break;
       }
       case KeyRelease:
index c089ab3578f59bc250a382b4467dbf8f4d16b34f..a7a9c0078cdef8f846cd7733cca3f54c95372c86 100644 (file)
@@ -96,6 +96,7 @@
 #include "MagickCore/thread-private.h"
 #include "MagickCore/threshold.h"
 #include "MagickCore/timer.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/token.h"
 #include "MagickCore/token-private.h"
 #include "MagickCore/utility.h"
@@ -207,7 +208,7 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
   image->channel_mask=DefaultChannels;
   image->channel_map=AcquirePixelChannelMap();
   image->blob=CloneBlobInfo((BlobInfo *) NULL);
-  image->timestamp=time((time_t *) NULL);
+  image->timestamp=GetMagickTime();
   image->debug=IsEventLogging();
   image->reference_count=1;
   image->semaphore=AcquireSemaphoreInfo();
index 4ec9467dd9abf407b7b286fa335b1d403990ec8c..b494cd33a7f918a09efa66add10cd88d3b5e7f67 100644 (file)
 #include "MagickCore/timer.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
-#include "MagickCore/token.h"
 #include "MagickCore/thread_.h"
 #include "MagickCore/thread-private.h"
+#include "MagickCore/timer-private.h"
+#include "MagickCore/token.h"
 #include "MagickCore/utility.h"
 #include "MagickCore/utility-private.h"
 #include "MagickCore/version.h"
@@ -975,7 +976,7 @@ static char *TranslateEvent(const char *module,const char *function,
   exception=AcquireExceptionInfo();
   log_info=(LogInfo *) GetLogInfo("*",exception);
   exception=DestroyExceptionInfo(exception);
-  seconds=time((time_t *) NULL);
+  seconds=GetMagickTime();
   elapsed_time=GetElapsedTime(&log_info->timer);
   user_time=GetUserTime(&log_info->timer);
   text=AcquireString(event);
index 04659eb43368a7f3b9931b7b3208b17d86893f89..79ec719f888a54d0db08362717456711f5f0aaa9 100644 (file)
@@ -13,7 +13,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
-  MagickCore private image color methods.
+  MagickCore private policy methods.
 */
 #ifndef MAGICKCORE_POLICY_PRIVATE_H
 #define MAGICKCORE_POLICY_PRIVATE_H
index 2315ac0e7a3f6c9b0c19a4fe3f3dd6f1081a32b0..10223eab5c01f1e7ebb6960c1da16cf6ee81310b 100644 (file)
@@ -53,6 +53,7 @@
 #include "MagickCore/signature.h"
 #include "MagickCore/signature-private.h"
 #include "MagickCore/string_.h"
+#include "MagickCore/timer-private.h"
 /*
   Define declarations.
 */
@@ -138,7 +139,7 @@ MagickPrivate SignatureInfo *AcquireSignatureInfo(void)
   lsb_first=1;
   signature_info->lsb_first=(int) (*(char *) &lsb_first) == 1 ? MagickTrue :
     MagickFalse;
-  signature_info->timestamp=(ssize_t) time((time_t *) NULL);
+  signature_info->timestamp=(ssize_t) GetMagickTime();
   signature_info->signature=MagickCoreSignature;
   InitializeSignature(signature_info);
   return(signature_info);
index a96a35df3a4e95a7b87d1d6bf7db3b182af5ff2d..738bc5d21026f80064e2ba5000e67ffffada3853 100644 (file)
@@ -1161,86 +1161,6 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size,
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%  F o r m a t M a g i c k T i m e                                            %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  FormatMagickTime() returns the specified time in the Internet date/time
-%  format and the length of the timestamp.
-%
-%  The format of the FormatMagickTime method is:
-%
-%      ssize_t FormatMagickTime(const time_t time,const size_t length,
-%        char *timestamp)
-%
-%  A description of each parameter follows.
-%
-%    o time:  the time since the Epoch (00:00:00 UTC, January 1, 1970),
-%      measured in seconds.
-%
-%    o length: the maximum length of the string.
-%
-%    o timestamp:  Return the Internet date/time here.
-%
-*/
-MagickExport ssize_t FormatMagickTime(const time_t time,const size_t length,
-  char *timestamp)
-{
-  ssize_t
-    count;
-
-  struct tm
-    gm_time,
-    local_time;
-
-  time_t
-    timezone;
-
-  assert(timestamp != (char *) NULL);
-  (void) memset(&local_time,0,sizeof(local_time));
-  (void) memset(&gm_time,0,sizeof(gm_time));
-#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
-  (void) localtime_r(&time,&local_time);
-#else
-  {
-    struct tm
-      *my_time;
-
-    my_time=localtime(&time);
-    if (my_time != (struct tm *) NULL)
-      (void) memcpy(&local_time,my_time,sizeof(local_time));
-  }
-#endif
-#if defined(MAGICKCORE_HAVE_GMTIME_R)
-  (void) gmtime_r(&time,&gm_time);
-#else
-  {
-    struct tm
-      *my_time;
-
-    my_time=gmtime(&time);
-    if (my_time != (struct tm *) NULL)
-      (void) memcpy(&gm_time,my_time,sizeof(gm_time));
-  }
-#endif
-  timezone=(time_t) ((local_time.tm_min-gm_time.tm_min)/60+
-    local_time.tm_hour-gm_time.tm_hour+24*((local_time.tm_year-
-    gm_time.tm_year) != 0 ? (local_time.tm_year-gm_time.tm_year) :
-    (local_time.tm_yday-gm_time.tm_yday)));
-  count=FormatLocaleString(timestamp,length,
-    "%04d-%02d-%02dT%02d:%02d:%02d%+03ld:00",local_time.tm_year+1900,
-    local_time.tm_mon+1,local_time.tm_mday,local_time.tm_hour,
-    local_time.tm_min,local_time.tm_sec,(long) timezone);
-  return(count);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
 %   G e t E n v i r o n m e n t V a l u e                                     %
 %                                                                             %
 %                                                                             %
index 2417b736c5b93c180dce56f2e96b9a7a2a9f69b1..41721821cb29b3b1abddaa3684f800e9eb695fe9 100644 (file)
@@ -83,8 +83,7 @@ extern MagickExport size_t
 
 extern MagickExport ssize_t
   FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *,
-    const size_t,char *),
-  FormatMagickTime(const time_t,const size_t,char *);
+    const size_t,char *);
 
 extern MagickExport StringInfo
   *AcquireStringInfo(const size_t),
index 878905edf676cc629c327673152cadaf66eaa6ea..b3d0b545e07a7899fc9662d6961ee3d412ce32aa 100644 (file)
 #include "MagickCore/studio.h"
 #include "MagickCore/exception.h"
 #include "MagickCore/exception-private.h"
+#include "MagickCore/locale_.h"
 #include "MagickCore/log.h"
 #include "MagickCore/memory_.h"
 #include "MagickCore/memory-private.h"
 #include "MagickCore/nt-base-private.h"
 #include "MagickCore/timer.h"
+#include "MagickCore/timer-private.h"
 \f
 /*
   Define declarations.
@@ -225,6 +227,86 @@ static double ElapsedTime(void)
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%  F o r m a t M a g i c k T i m e                                            %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  FormatMagickTime() returns the specified time in the Internet date/time
+%  format and the length of the timestamp.
+%
+%  The format of the FormatMagickTime method is:
+%
+%      ssize_t FormatMagickTime(const time_t time,const size_t length,
+%        char *timestamp)
+%
+%  A description of each parameter follows.
+%
+%    o time:  the time since the Epoch (00:00:00 UTC, January 1, 1970),
+%      measured in seconds.
+%
+%    o length: the maximum length of the string.
+%
+%    o timestamp:  Return the Internet date/time here.
+%
+*/
+MagickExport ssize_t FormatMagickTime(const time_t time,const size_t length,
+  char *timestamp)
+{
+  ssize_t
+    count;
+
+  struct tm
+    gm_time,
+    local_time;
+
+  time_t
+    timezone;
+
+  assert(timestamp != (char *) NULL);
+  (void) memset(&local_time,0,sizeof(local_time));
+  (void) memset(&gm_time,0,sizeof(gm_time));
+#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
+  (void) localtime_r(&time,&local_time);
+#else
+  {
+    struct tm
+      *my_time;
+
+    my_time=localtime(&time);
+    if (my_time != (struct tm *) NULL)
+      (void) memcpy(&local_time,my_time,sizeof(local_time));
+  }
+#endif
+#if defined(MAGICKCORE_HAVE_GMTIME_R)
+  (void) gmtime_r(&time,&gm_time);
+#else
+  {
+    struct tm
+      *my_time;
+
+    my_time=gmtime(&time);
+    if (my_time != (struct tm *) NULL)
+      (void) memcpy(&gm_time,my_time,sizeof(gm_time));
+  }
+#endif
+  timezone=(time_t) ((local_time.tm_min-gm_time.tm_min)/60+
+    local_time.tm_hour-gm_time.tm_hour+24*((local_time.tm_year-
+    gm_time.tm_year) != 0 ? (local_time.tm_year-gm_time.tm_year) :
+    (local_time.tm_yday-gm_time.tm_yday)));
+  count=FormatLocaleString(timestamp,length,
+    "%04d-%02d-%02dT%02d:%02d:%02d%+03ld:00",local_time.tm_year+1900,
+    local_time.tm_mon+1,local_time.tm_mday,local_time.tm_hour,
+    local_time.tm_min,local_time.tm_sec,(long) timezone);
+  return(count);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %   G e t E l a p s e d T i m e                                               %
 %                                                                             %
 %                                                                             %
@@ -260,6 +342,29 @@ MagickExport double GetElapsedTime(TimerInfo *time_info)
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%   G e t M a g i c k T i m e                                                 %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  GetMagickTime() returns the time as the number of seconds since the Epoch.
+%
+%  The format of the GetElapsedTime method is:
+%
+%      time_t GetElapsedTime(void)
+%
+*/
+MagickPrivate time_t GetMagickTime(void)
+{
+  return(time((time_t *) NULL));
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 +   G e t T i m e r I n f o                                                   %
 %                                                                             %
 %                                                                             %
index f88439fb2d61fc33408b1a2541302f37a58a5482..988463511e30af473dcd112ccc860a6620c31ed3 100644 (file)
@@ -57,6 +57,9 @@ extern MagickExport double
 extern MagickExport MagickBooleanType
   ContinueTimer(TimerInfo *);
 
+extern MagickExport ssize_t
+  FormatMagickTime(const time_t,const size_t,char *);
+
 extern MagickExport TimerInfo
   *AcquireTimerInfo(void),
   *DestroyTimerInfo(TimerInfo *);
index 346e4274d81ff4c0609f34f387457d1a91692732..62d3ad204556737a9f7ae228bde6351c8ab0a1bb 100644 (file)
@@ -49,6 +49,7 @@
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
 #include "MagickCore/string_.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/token.h"
 #include "MagickCore/token-private.h"
 #include "MagickCore/utility.h"
@@ -8188,11 +8189,11 @@ MagickPrivate void XNoticeWidget(Display *display,XWindows *windows,
   /*
     Respond to X events.
   */
-  timer=time((time_t *) NULL)+Timeout;
+  timer=GetMagickTime()+Timeout;
   state=UpdateConfigurationState;
   do
   {
-    if (time((time_t *) NULL) > timer)
+    if (GetMagickTime() > timer)
       break;
     if (state & UpdateConfigurationState)
       {
index 0eefa407aaceb7e10126f8db9b00083a347996aa..0b75f36becec4066b6c75591816d4586c1977f67 100644 (file)
 #include "MagickWand/MagickWand.h"
 #include "MagickWand/magick-wand-private.h"
 #include "MagickWand/mogrify-private.h"
+#include "MagickCore/blob-private.h"
 #include "MagickCore/composite-private.h"
 #include "MagickCore/image-private.h"
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/string-private.h"
 #include "MagickCore/thread-private.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/utility-private.h"
-#include "MagickCore/blob-private.h"
 #if defined(MAGICKCORE_HAVE_UTIME_H)
 #include <utime.h>
 #endif
@@ -7483,7 +7484,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
 
             if (*option == '+')
               {
-                seed=(unsigned long) time((time_t *) NULL);
+                seed=(unsigned long) GetMagickTime();
                 SetRandomSecretKey(seed);
                 break;
               }
index c93c123e110b9180951ae3205da48d4c11c45bcf..e8781bc45ad6037a584d8f1fbeddb6f283d13737 100644 (file)
@@ -61,6 +61,7 @@
 #include "MagickCore/pixel-private.h"
 #include "MagickCore/string-private.h"
 #include "MagickCore/thread-private.h"
+#include "MagickCore/timer-private.h"
 \f
 /*
   Constant declaration.
@@ -1334,7 +1335,7 @@ WandPrivate void CLISettingOptionInfo(MagickCLI *cli_wand,
             CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           SetRandomSecretKey(
                IfSetOption ? (unsigned long) StringToUnsignedLong(arg1)
-                           : (unsigned long) time((time_t *) NULL) );
+                           : (unsigned long) GetMagickTime() );
           break;
         }
       if (LocaleCompare("size",option+1) == 0)
index 41ad92ae0985406f4eb87d88c6700977df31150d..bd22419a944fc08475a4b5c745d607a5d23ba69b 100644 (file)
@@ -480,7 +480,8 @@ am__MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURC
        MagickCore/option-private.h MagickCore/paint.c \
        MagickCore/paint.h MagickCore/pixel.c MagickCore/pixel.h \
        MagickCore/pixel-accessor.h MagickCore/pixel-private.h \
-       MagickCore/policy.c MagickCore/policy.h MagickCore/prepress.c \
+       MagickCore/policy.c MagickCore/policy.h \
+       MagickCore/policy-private.h MagickCore/prepress.c \
        MagickCore/prepress.h MagickCore/property.c \
        MagickCore/property.h MagickCore/profile.c \
        MagickCore/profile.h MagickCore/profile-private.h \
@@ -506,7 +507,8 @@ am__MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURC
        MagickCore/string_.h MagickCore/string-private.h \
        MagickCore/studio.h MagickCore/thread.c MagickCore/thread_.h \
        MagickCore/thread-private.h MagickCore/timer.c \
-       MagickCore/timer.h MagickCore/token.c MagickCore/token.h \
+       MagickCore/timer.h MagickCore/timer-private.h \
+       MagickCore/token.c MagickCore/token.h \
        MagickCore/token-private.h MagickCore/transform.c \
        MagickCore/transform.h MagickCore/threshold.c \
        MagickCore/threshold.h MagickCore/type.c MagickCore/type.h \
@@ -4910,6 +4912,7 @@ MAGICKCORE_BASE_SRCS = \
        MagickCore/pixel-private.h \
        MagickCore/policy.c \
        MagickCore/policy.h \
+       MagickCore/policy-private.h \
        MagickCore/prepress.c \
        MagickCore/prepress.h \
        MagickCore/property.c \
@@ -4966,6 +4969,7 @@ MAGICKCORE_BASE_SRCS = \
        MagickCore/thread-private.h \
        MagickCore/timer.c \
        MagickCore/timer.h \
+       MagickCore/timer-private.h \
        MagickCore/token.c \
        MagickCore/token.h \
        MagickCore/token-private.h \
@@ -5160,6 +5164,7 @@ MAGICKCORE_NOINST_HDRS = \
        MagickCore/string-private.h \
        MagickCore/thread_.h \
        MagickCore/thread-private.h \
+       MagickCore/timer-private.h \
        MagickCore/token-private.h \
        MagickCore/transform-private.h \
        MagickCore/type-private.h \
index c1276505f248765487e5edb1f9e2bcc4995125c4..d79f1c3bffe3001829c8c3dff66251854aa05be4 100644 (file)
@@ -59,6 +59,7 @@
 #include "MagickCore/list.h"
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/option.h"
@@ -69,7 +70,7 @@
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
-#include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 \f
 /*
   Typedef declaration.
@@ -990,7 +991,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
       sizeof(cin.file.filename));
   offset+=WriteBlob(image,sizeof(cin.file.filename),(unsigned char *)
     cin.file.filename);
-  seconds=time((time_t *) NULL);
+  seconds=GetMagickTime();
 #if defined(MAGICKCORE_HAVE_LOCALTIME_R)
   (void) localtime_r(&seconds,&local_time);
 #else
@@ -1093,7 +1094,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
       sizeof(cin.origination.filename));
   offset+=WriteBlob(image,sizeof(cin.origination.filename),(unsigned char *)
     cin.origination.filename);
-  seconds=time((time_t *) NULL);
+  seconds=GetMagickTime();
   (void) memset(timestamp,0,sizeof(timestamp));
   (void) strftime(timestamp,MagickPathExtent,"%Y:%m:%d:%H:%M:%S%Z",&local_time);
   (void) memset(cin.origination.create_date,0,
index f30763ecbbff9cf789e26fe502dda45878751233..f6aa4b38d36fd76a10753fe3609595d561538ef1 100644 (file)
@@ -65,6 +65,7 @@
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/string-private.h"
+#include "MagickCore/timer-private.h"
 \f
 /*
   Define declaration.
@@ -1587,7 +1588,7 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image,
     (void) strncpy(dpx.file.filename,value,sizeof(dpx.file.filename)-1);
   offset+=WriteBlob(image,sizeof(dpx.file.filename),(unsigned char *)
     dpx.file.filename);
-  seconds=time((time_t *) NULL);
+  seconds=GetMagickTime();
   (void) FormatMagickTime(seconds,sizeof(dpx.file.timestamp),
     dpx.file.timestamp);
   offset+=WriteBlob(image,sizeof(dpx.file.timestamp),(unsigned char *)
index f31e59a187486d1e27540f41a74379c23e110a62..3eb4571e2ed9bed28268719e1ba4fc1959497fd7 100644 (file)
@@ -74,6 +74,7 @@
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/transform.h"
 #include "MagickCore/utility-private.h"
 #if defined(MAGICKCORE_ZLIB_DELEGATE)
@@ -1605,7 +1606,7 @@ static MagickBooleanType WriteMATImage(const ImageInfo *image_info,Image *image,
     return(MagickFalse);
   image->depth=8;
 
-  current_time=time((time_t *) NULL);
+  current_time=GetMagickTime();
 #if defined(MAGICKCORE_HAVE_LOCALTIME_R)
   (void) localtime_r(&current_time,&local_time);
 #else
index 0ab8b498bcad1bb99c4201ec3bef962da92cb7ee..5a1f59885151cb38ea831833378475d0c5187f06 100644 (file)
@@ -64,6 +64,7 @@
 #include "MagickCore/list.h"
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/pixel-accessor.h"
@@ -72,7 +73,7 @@
 #include "MagickCore/quantum-private.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/utility.h"
 \f
 /*
@@ -815,7 +816,7 @@ static MagickBooleanType WritePDBImage(const ImageInfo *image_info,Image *image,
   (void) CopyMagickString(pdb_info.name,filename,sizeof(pdb_info.name));
   pdb_info.attributes=0;
   pdb_info.version=0;
-  pdb_info.create_time=time((time_t *) NULL);
+  pdb_info.create_time=GetMagickTime();
   pdb_info.modify_time=pdb_info.create_time;
   pdb_info.archive_time=0;
   pdb_info.modify_number=0;
index e2d96b866cc54f5d4343027558b3160af62cac1f..26938afe2a371629e7ec4826d58c80b2fef09a25 100644 (file)
@@ -76,6 +76,7 @@
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/token.h"
 #include "MagickCore/transform.h"
 #include "MagickCore/utility.h"
@@ -1451,7 +1452,7 @@ RestoreMSCWarning
       value=GetImageProperty(image,"date:create",exception);
       if (value != (const char *) NULL)
         (void) CopyMagickString(create_date,value,MagickPathExtent);
-      (void) FormatMagickTime(time((time_t *) NULL),MagickPathExtent,timestamp);
+      (void) FormatMagickTime(GetMagickTime(),MagickPathExtent,timestamp);
       url=(char *) MagickAuthoritativeURL;
       escape=EscapeParenthesis(basename);
       i=FormatLocaleString(xmp_profile,MagickPathExtent,XMPProfile,
@@ -3007,7 +3008,7 @@ RestoreMSCWarning
         }
     }
   (void) WriteBlobString(image,buffer);
-  seconds=time((time_t *) NULL);
+  seconds=GetMagickTime();
 #if defined(MAGICKCORE_HAVE_LOCALTIME_R)
   (void) localtime_r(&seconds,&local_time);
 #else
index cfc0f82ce5c55ea949b06254da3d6d0e85ed2829..f5dcde5b1706af9b343b9f82f098d36628bc89e1 100644 (file)
@@ -61,6 +61,7 @@
 #include "MagickCore/list.h"
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/nt-base-private.h"
@@ -72,7 +73,7 @@
 #include "MagickCore/quantum-private.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/token.h"
 #include "MagickCore/transform.h"
 #include "MagickCore/utility.h"
@@ -1670,7 +1671,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image,
         (void) FormatLocaleString(buffer,MagickPathExtent,"%%%%Title: (%s)\n",
           image->filename);
         (void) WriteBlobString(image,buffer);
-        timer=time((time_t *) NULL);
+        timer=GetMagickTime();
         (void) FormatMagickTime(timer,MagickPathExtent,date);
         (void) FormatLocaleString(buffer,MagickPathExtent,
           "%%%%CreationDate: (%s)\n",date);
index 8a05a3d2ad04924b5997727ff162f8c44d87539e..206eb4fcb93b0f97072741dc77c30883a147b4c1 100644 (file)
@@ -57,6 +57,7 @@
 #include "MagickCore/list.h"
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/monitor-private.h"
@@ -67,7 +68,7 @@
 #include "MagickCore/resource_.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
-#include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/utility.h"
 \f
 /*
@@ -569,7 +570,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image,
         (void) FormatLocaleString(buffer,MagickPathExtent,"%%%%Title: (%s)\n",
           image->filename);
         (void) WriteBlobString(image,buffer);
-        timer=time((time_t *) NULL);
+        timer=GetMagickTime();
         (void) FormatMagickTime(timer,MagickPathExtent,date);
         (void) FormatLocaleString(buffer,MagickPathExtent,
           "%%%%CreationDate: (%s)\n",date);
index 24bccf1fe2f2d0ac967d59ba052a0b0a98e37ebf..6c5721d5257b8d0aae34acaedd8c6f87e6114d15 100644 (file)
@@ -60,6 +60,7 @@
 #include "MagickCore/list.h"
 #include "MagickCore/magick.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/module.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/option.h"
@@ -70,9 +71,9 @@
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/module.h"
+#include "MagickCore/timer-private.h"
 #include "MagickCore/token.h"
 #include "MagickCore/utility.h"
-#include "MagickCore/module.h"
 \f
 /*
   Define declarations.
@@ -1018,7 +1019,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image,
         (void) FormatLocaleString(buffer,MagickPathExtent,"%%%%Title: %s\n",
           image->filename);
         (void) WriteBlobString(image,buffer);
-        timer=time((time_t *) NULL);
+        timer=GetMagickTime();
         (void) FormatMagickTime(timer,MagickPathExtent,date);
         (void) FormatLocaleString(buffer,MagickPathExtent,
           "%%%%CreationDate: %s\n",date);
index cb8bf5e31720051571121267d7bb5790ae108471..a80bb605e0eee9596c0586b89fb90a3fe02b0345 100755 (executable)
--- a/configure
+++ b/configure
@@ -4570,7 +4570,7 @@ MAGICK_PATCHLEVEL_VERSION=41
 
 MAGICK_VERSION=7.0.8-41
 
-MAGICK_GIT_REVISION=15514:5e0211cfa:20190413
+MAGICK_GIT_REVISION=15524:68c4a9ce9:20190415
 
 
 # Substitute library versioning