2011-05-16 6.6.9-10 Cristy <quetzlzacatenango@image...>
* Don't use comma as a separator for stroked text (reference
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=18742).
+ * Use C locale when generating or interpretting SVG.
2011-05-15 6.6.9-9 Cristy <quetzlzacatenango@image...>
* New version 6.6.9-9.
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `uselocale' function. */
+#undef HAVE_USELOCALE
+
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP
<configure name="VERSION" value="6.6.9"/>
<configure name="LIB_VERSION" value="0x669"/>
<configure name="LIB_VERSION_NUMBER" value="6,6,9,10"/>
- <configure name="SVN_REVISION" value="4448" />
- <configure name="RELEASE_DATE" value="2011-05-18"/>
+ <configure name="SVN_REVISION" value="4455" />
+ <configure name="RELEASE_DATE" value="2011-05-19"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
-MAGICK_SVN_REVISION=4448
+MAGICK_SVN_REVISION=4455
LIBS="$MATH_LIBS $LIBS"
-for ac_func in atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr usleep utime vsprintf vsnprintf waitpid _wfopen _wstat
+for ac_func in atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vsprintf vsnprintf waitpid _wfopen _wstat
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
LIBS="$MATH_LIBS $LIBS"
AC_SUBST(MATH_LIBS)
-AC_CHECK_FUNCS([atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr usleep utime vsprintf vsnprintf waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
#
# Check for clock_gettime().
See the License for the specific language governing permissions and
limitations under the License.
- MagickCore localre private methods.
+ MagickCore locale private methods.
*/
#ifndef _MAGICKCORE_LOCALE_PRIVATE_H
#define _MAGICKCORE_LOCALE_PRIVATE_H
extern "C" {
#endif
+extern MagickExport locale_t
+ AcquireMagickLocale(void);
+
+extern MagickExport void
+ DestroyMagickLocale(void);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
static volatile MagickBooleanType
instantiate_locale = MagickFalse;
+
+static volatile locale_t
+ locale_cache = (locale_t) NULL;
\f
/*
Forward declarations.
% %
% %
% %
++ A c q u i r e M a g i c k L o c a l e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% AcquireMagickLocale() allocates the C locale object, or (locale_t) 0 with
+% errno set if it cannot be acquired.
+%
+% The format of the AcquireMagickLocale method is:
+%
+% locale_t AcquireMagickLocale(void)
+%
+*/
+MagickExport locale_t AcquireMagickLocale(void)
+{
+#if defined(MAGICKCORE_HAVE_NEWLOCALE)
+ if (locale_cache == (locale_t) NULL)
+ locale_cache=newlocale(LC_ALL_MASK,"C",(locale_t) 0);
+#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
+ if (locale_cache == (locale_t) NULL)
+ locale_cache=_create_locale(LC_ALL,"C");
+#endif
+ return(locale_cache);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% D e s t r o y L o c a l e O p t i o n s %
% %
% %
% %
% %
% %
++ D e s t r o y M a g i c k L o c a l e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DestroyMagickLocale() releases the resources allocated for a locale object
+% returned by a call to the AcquireMagickLocale() method.
+%
+% The format of the DestroyMagickLocale method is:
+%
+% void DestroyMagickLocale(void)
+%
+*/
+MagickExport void DestroyMagickLocale(void)
+{
+#if defined(MAGICKCORE_HAVE_NEWLOCALE)
+ if (locale_cache != (locale_t) NULL)
+ freelocale(locale_cache);
+#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
+ if (locale_cache != (locale_t) NULL)
+ _free_locale(locale_cache);
+#endif
+ locale_cache=(locale_t) NULL;
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ G e t L o c a l e I n f o _ %
% %
% %
if (locale_semaphore == (SemaphoreInfo *) NULL)
AcquireSemaphoreInfo(&locale_semaphore);
LockSemaphoreInfo(locale_semaphore);
- if (locale_list != (SplayTreeInfo *) NULL)
- locale_list=DestroySplayTree(locale_list);
+ DestroyMagickLocale();
instantiate_locale=MagickFalse;
UnlockSemaphoreInfo(locale_semaphore);
DestroySemaphoreInfo(&locale_semaphore);
#define MAGICKCORE_HAVE_UNISTD_H 1
#endif
+/* Define to 1 if you have the `uselocale' function. */
+#ifndef MAGICKCORE_HAVE_USELOCALE
+#define MAGICKCORE_HAVE_USELOCALE 1
+#endif
+
/* Define to 1 if you have the `usleep' function. */
#ifndef MAGICKCORE_HAVE_USLEEP
#define MAGICKCORE_HAVE_USLEEP 1
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/list.h"
+#include "magick/locale-private.h"
#include "magick/log.h"
#include "magick/memory_.h"
#include "magick/property.h"
int
n;
-#if defined(MAGICKCORE_HAVE_VSNPRINTF)
+#if defined(MAGICKCORE_HAVE_VSNPRINTF_L)
+ {
+ locale_t
+ locale;
+
+ locale=AcquireMagickLocale();
+ if (locale == (locale_t) NULL)
+ n=vsnprintf(string,length,format,operands);
+ else
+ n=vsnprintf_l(string,length,format,operands);
+ }
+#elif defined(MAGICKCORE_HAVE_VSNPRINTF)
+#if defined(MAGICKCORE_HAVE_USELOCALE)
+ {
+ locale_t
+ locale,
+ previous_locale;
+
+ locale=AcquireMagickLocale();
+ if (locale == (locale_t) NULL)
+ n=vsnprintf(string,length,format,operands);
+ else
+ {
+ previous_locale=uselocale(locale);
+ n=vsnprintf(string,length,format,operands);
+ uselocale(previous_locale);
+ }
+ }
+#else
n=vsnprintf(string,length,format,operands);
+#endif
#else
n=vsprintf(string,format,operands);
#endif
{
while (isspace((int) ((unsigned char) *p)) != 0)
p++;
- if (*p == '\0')
+ if (*p == '\0')
break;
(*argc)++;
if (*p == '"')
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% StringToDouble() returns the contents of a file as a string.
+% StringToDouble() interprets the string as a floating point number and
+% returns its value as a double. If sentinal is not a null pointer, the
+% method also sets the value pointed by sentinal to point to the first
+% character after the number.
%
% The format of the StringToDouble method is:
%
%
% A description of each parameter follows:
%
-% o value: the string value.
+% o value: the string value.
%
% o sentinal: if sentinal is not NULL, a pointer to the character after the
% last character used in the conversion is stored in the location
*/
MagickExport double StringToDouble(const char *value,char **sentinal)
{
+#if defined(MAGICKCORE_HAVE_STRTOD_L)
+ {
+ locale_t
+ locale;
+
+ locale=AcquireMagickLocale();
+ if (locale != (locale_t) NULL)
+ return(strtod_l(value,sentinal,locale));
+ }
+#endif
return(strtod(value,sentinal));
}
\f
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "4448"
+#define MagickSVNRevision "4455"
#define MagickLibVersion 0x669
#define MagickLibVersionText "6.6.9"
#define MagickLibVersionNumber 4,0,1
#define MagickLibAddendum "-10"
#define MagickLibInterface 4
#define MagickLibMinInterface 4
-#define MagickReleaseDate "2011-05-18"
+#define MagickReleaseDate "2011-05-19"
#define MagickChangeDate "20110516"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)