From ba56db507fc807dbf2edd6b5222d9a6184ba26ca Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 20 May 2011 02:08:11 +0000 Subject: [PATCH] --- magick/MagickCore.h | 3 +++ magick/locale.c | 18 ++++++++++-------- magick/locale_.h | 12 ++++++------ magick/studio.h | 6 +++--- wand/MagickWand.h | 3 +++ wand/studio.h | 6 +++--- 6 files changed, 28 insertions(+), 20 deletions(-) diff --git a/magick/MagickCore.h b/magick/MagickCore.h index 144dc33bd..e44bb6729 100644 --- a/magick/MagickCore.h +++ b/magick/MagickCore.h @@ -36,6 +36,9 @@ extern "C" { #if defined(_magickcore_inline) && !defined(inline) # define inline _magickcore_inline #endif +#if defined(_magickcore_restrict) && !defined(restrict) +# define restrict _magickcore_restrict +#endif # if defined(__cplusplus) || defined(c_plusplus) # undef inline # endif diff --git a/magick/locale.c b/magick/locale.c index de6d3127a..8ef79d82f 100644 --- a/magick/locale.c +++ b/magick/locale.c @@ -221,8 +221,8 @@ MagickExport LinkedListInfo *DestroyLocaleOptions(LinkedListInfo *messages) % */ -MagickExport ssize_t FormatLocaleFileList(FILE *file,const char *format, - va_list operands) +MagickExport ssize_t FormatLocaleFileList(FILE *file, + const char *restrict format,va_list operands) { int n; @@ -262,7 +262,8 @@ MagickExport ssize_t FormatLocaleFileList(FILE *file,const char *format, return((ssize_t) n); } -MagickExport ssize_t FormatLocaleFile(FILE *file,const char *format,...) +MagickExport ssize_t FormatLocaleFile(FILE *file,const char *restrict format, + ...) { ssize_t n; @@ -307,8 +308,8 @@ MagickExport ssize_t FormatLocaleFile(FILE *file,const char *format,...) % */ -MagickExport ssize_t FormatLocaleStringList(char *string,const size_t length, - const char *format,va_list operands) +MagickExport ssize_t FormatLocaleStringList(char *restrict string, + const size_t length,const char *restrict format,va_list operands) { int n; @@ -343,8 +344,8 @@ MagickExport ssize_t FormatLocaleStringList(char *string,const size_t length, return((ssize_t) n); } -MagickExport ssize_t FormatLocaleString(char *string,const size_t length, - const char *format,...) +MagickExport ssize_t FormatLocaleString(char *restrict string, + const size_t length,const char *restrict format,...) { ssize_t n; @@ -842,7 +843,8 @@ static MagickBooleanType InitializeLocaleList(ExceptionInfo *exception) % referenced by sentinal. % */ -MagickExport double InterpretLocaleValue(const char *string,char **sentinal) +MagickExport double InterpretLocaleValue(const char *restrict string, + char **restrict sentinal) { double value; diff --git a/magick/locale_.h b/magick/locale_.h index 199beb68c..96a32c74a 100644 --- a/magick/locale_.h +++ b/magick/locale_.h @@ -53,7 +53,7 @@ extern MagickExport const LocaleInfo **GetLocaleInfoList(const char *,size_t *,ExceptionInfo *); extern MagickExport double - InterpretLocaleValue(const char *,char **); + InterpretLocaleValue(const char *restrict,char **restrict); extern MagickExport LinkedListInfo *DestroyLocaleOptions(LinkedListInfo *), @@ -64,14 +64,14 @@ extern MagickExport MagickBooleanType LocaleComponentGenesis(void); extern MagickExport ssize_t - FormatLocaleFile(FILE *,const char *,...) + FormatLocaleFile(FILE *,const char *restrict,...) magick_attribute((format (printf,2,3))), - FormatLocaleFileList(FILE *,const char *,va_list) + FormatLocaleFileList(FILE *,const char *restrict,va_list) magick_attribute((format (printf,2,0))), - FormatLocaleString(char *,const size_t,const char *,...) + FormatLocaleString(char *restrict,const size_t,const char *restrict,...) magick_attribute((format (printf,3,4))), - FormatLocaleStringList(char *,const size_t,const char *,va_list) - magick_attribute((format (printf,3,0))); + FormatLocaleStringList(char *restrict,const size_t,const char *restrict, + va_list) magick_attribute((format (printf,3,0))); extern MagickExport void LocaleComponentTerminus(void); diff --git a/magick/studio.h b/magick/studio.h index 81c5a0654..f80c6b0f9 100644 --- a/magick/studio.h +++ b/magick/studio.h @@ -46,12 +46,12 @@ extern "C" { #if defined(_magickcore_inline) && !defined(inline) # define inline _magickcore_inline #endif -# if defined(__cplusplus) || defined(c_plusplus) -# undef inline -# endif #if defined(_magickcore_restrict) && !defined(restrict) # define restrict _magickcore_restrict #endif +# if defined(__cplusplus) || defined(c_plusplus) +# undef inline +# endif #endif #if defined(MAGICKCORE_NAMESPACE_PREFIX) diff --git a/wand/MagickWand.h b/wand/MagickWand.h index 956ef4d08..46afbbed7 100644 --- a/wand/MagickWand.h +++ b/wand/MagickWand.h @@ -36,6 +36,9 @@ extern "C" { #if defined(_magickcore_inline) && !defined(inline) # define inline _magickcore_inline #endif +#if defined(_magickcore_restrict) && !defined(restrict) +# define restrict _magickcore_restrict +#endif # if defined(__cplusplus) || defined(c_plusplus) # undef inline # endif diff --git a/wand/studio.h b/wand/studio.h index 22793b5ff..e4628fe9f 100644 --- a/wand/studio.h +++ b/wand/studio.h @@ -46,12 +46,12 @@ extern "C" { #if defined(_magickcore_inline) && !defined(inline) # define inline _magickcore_inline #endif -# if defined(__cplusplus) || defined(c_plusplus) -# undef inline -# endif #if defined(_magickcore_restrict) && !defined(restrict) # define restrict _magickcore_restrict #endif +# if defined(__cplusplus) || defined(c_plusplus) +# undef inline +# endif #endif #if !defined(const) -- 2.40.0