diff --git a/MagickCache/MagickCache.h b/MagickCache/MagickCache.h index a5ccdc0..73b88cf 100644 --- a/MagickCache/MagickCache.h +++ b/MagickCache/MagickCache.h @@ -1,5 +1,5 @@ /* - Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization + Copyright 1999 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 @@ -29,7 +29,7 @@ #include #include -#include +#include "MagickCache/version.h" #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/MagickCache/magick-cache-private.h b/MagickCache/magick-cache-private.h index a53e03f..4921f72 100644 --- a/MagickCache/magick-cache-private.h +++ b/MagickCache/magick-cache-private.h @@ -1,5 +1,5 @@ /* - Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization + Copyright 1999 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 diff --git a/MagickCache/magick-cache.c b/MagickCache/magick-cache.c index 909515f..c21f3f6 100644 --- a/MagickCache/magick-cache.c +++ b/MagickCache/magick-cache.c @@ -433,8 +433,7 @@ MagickExport MagickBooleanType ClearMagickCacheResourceException( % % The format of the GetMagickCacheResourceExtent method is: % -% const size_t GetMagickCacheResourceExtent( -% const MagickCacheResource *resource) +% size_t GetMagickCacheResourceExtent(const MagickCacheResource *resource) % % A description of each parameter follows: % @@ -1023,7 +1022,7 @@ MagickExport MagickBooleanType GetMagickCacheResource(MagickCache *cache, % % The format of the GetMagickCacheResourceBlob method is: % -% const void *GetMagickCacheResourceBlob(MagickCache *cache, +% void *GetMagickCacheResourceBlob(MagickCache *cache, % MagickCacheResource *resource) % % A description of each parameter follows: @@ -1344,7 +1343,7 @@ MagickExport MagickBooleanType GetMagickCacheResourceID(MagickCache *cache, % % The format of the GetMagickCacheResourceImage method is: % -% const Image *GetMagickCacheResourceImage(MagickCache *cache, +% Image *GetMagickCacheResourceImage(MagickCache *cache, % MagickCacheResource *resource,const char *extract) % % A description of each parameter follows: @@ -1436,7 +1435,7 @@ MagickExport Image *GetMagickCacheResourceImage(MagickCache *cache, % % The format of the GetMagickCacheResourceIRI method is: % -% const char *GetMagickCacheResourceIRI(MagickCacheResource *resource) +% char *GetMagickCacheResourceIRI(MagickCacheResource *resource) % % A description of each parameter follows: % @@ -1467,7 +1466,7 @@ MagickExport char *GetMagickCacheResourceIRI( % % The format of the GetMagickCacheResourceMeta method is: % -% const char *GetMagickCacheResourceMeta(MagickCacheResource *resource) +% char *GetMagickCacheResourceMeta(MagickCacheResource *resource) % % A description of each parameter follows: % @@ -1529,7 +1528,7 @@ MagickExport char *GetMagickCacheResourceMeta(MagickCache *cache, % % The format of the GetMagickCacheResourceSize method is: % -% const void GetMagickCacheResourceSize( +% void GetMagickCacheResourceSize( % const MagickCacheResource *resource,size_t *columns,size_t *rows) % % A description of each parameter follows: @@ -1562,7 +1561,7 @@ MagickExport void GetMagickCacheResourceSize( % % The format of the GetMagickCacheResourceTimestamp method is: % -% const time_t GetMagickCacheResourceTimestamp( +% time_t GetMagickCacheResourceTimestamp( % const MagickCacheResource *resource) % % A description of each parameter follows: @@ -1594,8 +1593,7 @@ MagickExport time_t GetMagickCacheResourceTimestamp( % % The format of the GetMagickCacheResourceTTL method is: % -% const time_t GetMagickCacheResourceTTL( -% const MagickCacheResource *resource) +% time_t GetMagickCacheResourceTTL(const MagickCacheResource *resource) % % A description of each parameter follows: % @@ -1626,7 +1624,7 @@ MagickExport time_t GetMagickCacheResourceTTL( % % The format of the GetMagickCacheResourceType method is: % -% const MagickCacheResourceType GetMagickCacheResourceType( +% MagickCacheResourceType GetMagickCacheResourceType( % const MagickCacheResource *resource) % % A description of each parameter follows: @@ -1658,7 +1656,7 @@ MagickExport MagickCacheResourceType GetMagickCacheResourceType( % % The format of the GetMagickCacheResourceVersion method is: % -% const size_t GetMagickCacheResourceVersion( +% size_t GetMagickCacheResourceVersion( % const MagickCacheResource *resource) % % A description of each parameter follows: @@ -1690,7 +1688,7 @@ MagickExport size_t GetMagickCacheResourceVersion( % % The format of the GetMagickCacheResource method is: % -% const time_t GetMagickCacheResourceTimestamp(const MagickCache *cache) +% time_t GetMagickCacheResourceTimestamp(const MagickCache *cache) % % A description of each parameter follows: % @@ -1770,8 +1768,7 @@ MagickExport MagickBooleanType IdentifyMagickCacheResource(MagickCache *cache, (void) GetMagickUTCTime(&resource->timestamp,×tamp); (void) strftime(iso8601,sizeof(iso8601),"%FT%TZ",×tamp); expired=' '; - if ((resource->ttl != 0) && - (difftime(time(0),resource->timestamp) > (double) resource->ttl)) + if ((resource->ttl != 0) && ((resource->timestamp+resource->ttl) < time(0))) expired='*'; (void) fprintf(file,"%s%s %s %g:%g:%g:%g%c %s\n",GetMagickCacheResourceIRI( resource),size,extent,(double) (resource->ttl/(3600*24)),(double) @@ -1819,8 +1816,7 @@ MagickExport MagickBooleanType IsMagickCacheResourceExpired(MagickCache *cache, status=GetMagickCacheResource(cache,resource); if (status == MagickFalse) return(status); - if ((resource->ttl != 0) && - (difftime(time(0),resource->timestamp) > (double) resource->ttl)) + if ((resource->ttl != 0) && ((resource->timestamp+resource->ttl) <= time(0))) { errno=ESTALE; return(MagickTrue); diff --git a/MagickCache/version.c b/MagickCache/version.c index 7bfcfea..853b748 100644 --- a/MagickCache/version.c +++ b/MagickCache/version.c @@ -17,7 +17,7 @@ % March 2022 % % % % % -% Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization % +% Copyright 1999 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 % diff --git a/Makefile b/Makefile index eab5a83..9b4d64e 100644 --- a/Makefile +++ b/Makefile @@ -216,7 +216,7 @@ AUTOHEADER = ${SHELL} '/home/cristy/MagickCache/missing' autoheader AUTOMAKE = ${SHELL} '/home/cristy/MagickCache/missing' automake-1.16 AWK = gawk CC = gcc -CCDEPMODE = depmode=none +CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 CPP = gcc -E CPPFLAGS = @@ -224,7 +224,7 @@ CSCOPE = cscope CTAGS = ctags CXX = g++ CXXCPP = g++ -E -CXXDEPMODE = depmode=none +CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H @@ -256,7 +256,7 @@ LIPO = LN_S = ln -s LTLIBOBJS = LT_SYS_LIBRARY_PATH = -MAGICKCACHE_GIT_REVISION = 212:ad75fab:20231204 +MAGICKCACHE_GIT_REVISION = 213:609152b:20231205 MAGICKCACHE_LIBRARY_AGE = 0 MAGICKCACHE_LIBRARY_CURRENT = 0 MAGICKCACHE_LIBRARY_CURRENT_MIN = 0 @@ -271,8 +271,8 @@ MAGICKCACHE_MINOR_VERSION = 0 MAGICKCACHE_PATCHLEVEL_VERSION = 1 MAGICKCACHE_PCFLAGS = MAGICKCACHE_VERSION = 1.0.0-1 -MAGICKCORE_CFLAGS = -I/usr/local/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=64 -MAGICKCORE_LIBS = -L/usr/local/lib -lMagickCore-7.Q16HDRI +MAGICKCORE_CFLAGS = -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 +MAGICKCORE_LIBS = -lMagickCore-7.Q16HDRI MAGICKPP_LIB_VERSION_TEXT = 1.0.0 MAKEINFO = ${SHELL} '/home/cristy/MagickCache/missing' makeinfo MANIFEST_TOOL = : @@ -299,7 +299,7 @@ PACKAGE_VERSION_ADDENDUM = -1 PATH_SEPARATOR = : PKG_CONFIG = /usr/bin/pkg-config PKG_CONFIG_LIBDIR = -PKG_CONFIG_PATH = /usr/local//lib/pkgconfig +PKG_CONFIG_PATH = RANLIB = ranlib SED = /usr/bin/sed SET_MAKE = diff --git a/configure b/configure index a5a89c0..54bfd5e 100755 --- a/configure +++ b/configure @@ -3953,7 +3953,7 @@ MAGICKCACHE_PATCHLEVEL_VERSION=1 MAGICKCACHE_VERSION=1.0.0-1 -MAGICKCACHE_GIT_REVISION=212:ad75fab:20231204 +MAGICKCACHE_GIT_REVISION=213:609152b:20231205 # Substitute library versioning diff --git a/tests/magick-cache.c b/tests/magick-cache.c index be9e0cb..ddebec1 100644 --- a/tests/magick-cache.c +++ b/tests/magick-cache.c @@ -242,7 +242,7 @@ static MagickBooleanType MagickCacheCLI(int argc,char **argv, (void) FormatLocaleFile(stdout,"%g: put magick cache (image)\n",(double) tests); tests++; - (void) strcpy(image_info->filename,"rose.miff"); + (void) strcpy(image_info->filename,"rose:"); if (cache != (MagickCache *) NULL) rose=ReadImage(image_info,exception); if ((cache != (MagickCache *) NULL) &&