From d2d11ec3ae6f94d5b49cbaf90e7f9ca18c252d29 Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 28 Mar 2012 13:53:49 +0000 Subject: [PATCH] --- MagickCore/blob.c | 1 + MagickCore/cache.c | 1 + MagickCore/locale.c | 1 + MagickCore/module.c | 1 + MagickCore/nt-base-private.h | 2 - MagickCore/nt-base.c | 80 ++++++++++++++++++------------------ MagickCore/nt-feature.c | 2 + MagickCore/string.c | 1 + MagickCore/type.c | 1 + MagickCore/utility-private.h | 1 + MagickWand/script-token.c | 7 ++-- coders/xtrn.c | 6 +-- 12 files changed, 56 insertions(+), 48 deletions(-) diff --git a/MagickCore/blob.c b/MagickCore/blob.c index b12daf123..b2a2e5cbd 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -41,6 +41,7 @@ Include declarations. */ #include "MagickCore/studio.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/blob.h" #include "MagickCore/blob-private.h" #include "MagickCore/cache.h" diff --git a/MagickCore/cache.c b/MagickCore/cache.c index b431cb93f..2d6787ecd 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -54,6 +54,7 @@ #include "MagickCore/log.h" #include "MagickCore/magick.h" #include "MagickCore/memory_.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/pixel.h" #include "MagickCore/pixel-accessor.h" #include "MagickCore/policy.h" diff --git a/MagickCore/locale.c b/MagickCore/locale.c index a84a5d43e..7164f5a5e 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -50,6 +50,7 @@ #include "MagickCore/locale-private.h" #include "MagickCore/log.h" #include "MagickCore/memory_.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/semaphore.h" #include "MagickCore/splay-tree.h" #include "MagickCore/string_.h" diff --git a/MagickCore/module.c b/MagickCore/module.c index e72d16b94..d76e094ec 100644 --- a/MagickCore/module.c +++ b/MagickCore/module.c @@ -54,6 +54,7 @@ #include "MagickCore/memory_.h" #include "MagickCore/module.h" #include "MagickCore/module-private.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/policy.h" #include "MagickCore/semaphore.h" #include "MagickCore/splay-tree.h" diff --git a/MagickCore/nt-base-private.h b/MagickCore/nt-base-private.h index 4f947e61a..bc7c2f4fa 100644 --- a/MagickCore/nt-base-private.h +++ b/MagickCore/nt-base-private.h @@ -399,8 +399,6 @@ extern MagickPrivate MagickBooleanType NTGatherRandomData(const size_t,unsigned char *), NTGetExecutionPath(char *,const size_t), NTGetModulePath(const char *,char *), - NTIsMagickConflict(const char *), - NTLoadTypeLists(SplayTreeInfo *,ExceptionInfo *), NTReportEvent(const char *,const MagickBooleanType), NTReportException(const char *,const MagickBooleanType); diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index 18a3e83ad..aaa76ade5 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -46,6 +46,8 @@ #include "MagickCore/log.h" #include "MagickCore/magick.h" #include "MagickCore/memory_.h" +#include "MagickCore/nt-base.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/resource_.h" #include "MagickCore/resource-private.h" #include "MagickCore/timer.h" @@ -231,7 +233,7 @@ BOOL WINAPI DllMain(HINSTANCE handle,DWORD reason,LPVOID lpvReserved) % process. % */ -MagickExport int Exit(int status) +MagickPrivate int Exit(int status) { if (IsWindows95()) TerminateProcess(GetCurrentProcess(),(unsigned int) status); @@ -264,7 +266,7 @@ MagickExport int Exit(int status) % o time_zone: the time zone. % */ -MagickExport int gettimeofday (struct timeval *time_value, +MagickPrivate int gettimeofday (struct timeval *time_value, struct timezone *time_zone) { #define EpochFiletime MagickLLConstant(116444736000000000) @@ -324,7 +326,7 @@ MagickExport int gettimeofday (struct timeval *time_value, % int IsWindows95() % */ -MagickExport int IsWindows95() +MagickPrivate int IsWindows95() { OSVERSIONINFO version_info; @@ -361,7 +363,7 @@ MagickExport int IsWindows95() % o argv: the wide-character command line arguments. % */ -MagickExport char **NTArgvToUTF8(const int argc,wchar_t **argv) +MagickPrivate char **NTArgvToUTF8(const int argc,wchar_t **argv) { char **utf8; @@ -418,7 +420,7 @@ MagickExport char **NTArgvToUTF8(const int argc,wchar_t **argv) % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport int NTCloseDirectory(DIR *entry) +MagickPrivate int NTCloseDirectory(DIR *entry) { (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(entry != (DIR *) NULL); @@ -449,7 +451,7 @@ MagickExport int NTCloseDirectory(DIR *entry) % o handle: Specifies a handle to a previously loaded dynamic module. % */ -MagickExport int NTCloseLibrary(void *handle) +MagickPrivate int NTCloseLibrary(void *handle) { if (IsWindows95()) return(FreeLibrary((HINSTANCE) handle)); @@ -483,7 +485,7 @@ static BOOL ControlHandler(DWORD type) return(FALSE); } -MagickExport int NTControlHandler(void) +MagickPrivate int NTControlHandler(void) { return(SetConsoleCtrlHandler((PHANDLER_ROUTINE) ControlHandler,TRUE)); } @@ -507,7 +509,7 @@ MagickExport int NTControlHandler(void) % double NTElapsedTime(void) % */ -MagickExport double NTElapsedTime(void) +MagickPrivate double NTElapsedTime(void) { union { @@ -554,7 +556,7 @@ MagickExport double NTElapsedTime(void) % o description: Specifies any description to the reason. % */ -MagickExport void NTErrorHandler(const ExceptionType severity, +MagickPrivate void NTErrorHandler(const ExceptionType severity, const char *reason,const char *description) { char @@ -607,7 +609,7 @@ MagickExport void NTErrorHandler(const ExceptionType severity, % int NTExitLibrary(void) % */ -MagickExport int NTExitLibrary(void) +MagickPrivate int NTExitLibrary(void) { return(0); } @@ -637,7 +639,7 @@ MagickExport int NTExitLibrary(void) % random: the random data is returned here. % */ -MagickExport MagickBooleanType NTGatherRandomData(const size_t length, +MagickPrivate MagickBooleanType NTGatherRandomData(const size_t length, unsigned char *random) { #if defined(MAGICKCORE_CIPHER_SUPPORT) && defined(_MSC_VER) && (_MSC_VER > 1200) @@ -695,7 +697,7 @@ MagickExport MagickBooleanType NTGatherRandomData(const size_t length, % o extent: the maximum extent of the path. % */ -MagickExport MagickBooleanType NTGetExecutionPath(char *path, +MagickPrivate MagickBooleanType NTGetExecutionPath(char *path, const size_t extent) { GetModuleFileName(0,path,(DWORD) extent); @@ -764,7 +766,7 @@ char *NTGetLastError(void) % const char *NTGetLibraryError(void) % */ -MagickExport const char *NTGetLibraryError(void) +MagickPrivate const char *NTGetLibraryError(void) { static char last_error[MaxTextExtent]; @@ -840,7 +842,7 @@ void *NTGetLibrarySymbol(void *handle,const char *name) % path: the module path is returned here. % */ -MagickExport MagickBooleanType NTGetModulePath(const char *module,char *path) +MagickPrivate MagickBooleanType NTGetModulePath(const char *module,char *path) { char module_path[MaxTextExtent]; @@ -1101,7 +1103,7 @@ static int NTGhostscriptGetString(const char *name,BOOL *is_64_bit,char *value, return(FALSE); } -MagickExport int NTGhostscriptDLL(char *path,int length) +MagickPrivate int NTGhostscriptDLL(char *path,int length) { static char dll[MaxTextExtent] = { "" }; @@ -1146,7 +1148,7 @@ MagickExport int NTGhostscriptDLL(char *path,int length) % const GhostInfo *NTGhostscriptDLLVectors(void) % */ -MagickExport const GhostInfo *NTGhostscriptDLLVectors(void) +MagickPrivate const GhostInfo *NTGhostscriptDLLVectors(void) { if (NTGhostscriptLoadDLL() == FALSE) return((GhostInfo *) NULL); @@ -1179,7 +1181,7 @@ MagickExport const GhostInfo *NTGhostscriptDLLVectors(void) % o length: length of buffer. % */ -MagickExport int NTGhostscriptEXE(char *path,int length) +MagickPrivate int NTGhostscriptEXE(char *path,int length) { register char *p; @@ -1230,7 +1232,7 @@ MagickExport int NTGhostscriptEXE(char *path,int length) % o length: length of the path buffer. % */ -MagickExport int NTGhostscriptFonts(char *path,int length) +MagickPrivate int NTGhostscriptFonts(char *path,int length) { char buffer[MaxTextExtent], @@ -1276,7 +1278,7 @@ MagickExport int NTGhostscriptFonts(char *path,int length) % int NTGhostscriptLoadDLL(void) % */ -MagickExport int NTGhostscriptLoadDLL(void) +MagickPrivate int NTGhostscriptLoadDLL(void) { char path[MaxTextExtent]; @@ -1325,7 +1327,7 @@ MagickExport int NTGhostscriptLoadDLL(void) % int NTGhostscriptUnLoadDLL(void) % */ -MagickExport int NTGhostscriptUnLoadDLL(void) +MagickPrivate int NTGhostscriptUnLoadDLL(void) { int status; @@ -1356,7 +1358,7 @@ MagickExport int NTGhostscriptUnLoadDLL(void) % int NTInitializeLibrary(void) % */ -MagickExport int NTInitializeLibrary(void) +MagickPrivate int NTInitializeLibrary(void) { return(0); } @@ -1376,11 +1378,11 @@ MagickExport int NTInitializeLibrary(void) % % The format of the NTMapMemory method is: % -% MagickExport void *NTMapMemory(char *address,size_t length,int protection, +% MagickPrivate void *NTMapMemory(char *address,size_t length,int protection, % int access,int file,MagickOffsetType offset) % */ -MagickExport void *NTMapMemory(char *address,size_t length,int protection, +MagickPrivate void *NTMapMemory(char *address,size_t length,int protection, int flags,int file,MagickOffsetType offset) { DWORD @@ -1465,7 +1467,7 @@ MagickExport void *NTMapMemory(char *address,size_t length,int protection, % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport DIR *NTOpenDirectory(const char *path) +MagickPrivate DIR *NTOpenDirectory(const char *path) { char file_specification[MaxTextExtent]; @@ -1542,7 +1544,7 @@ static const char *GetSearchPath( void ) #endif } -MagickExport void *NTOpenLibrary(const char *filename) +MagickPrivate void *NTOpenLibrary(const char *filename) { #define MaxPathElements 31 @@ -1623,7 +1625,7 @@ MagickExport void *NTOpenLibrary(const char *filename) % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport struct dirent *NTReadDirectory(DIR *entry) +MagickPrivate struct dirent *NTReadDirectory(DIR *entry) { int status; @@ -1680,7 +1682,7 @@ MagickExport struct dirent *NTReadDirectory(DIR *entry) % "LibPath", "CoderModulesPath", "FilterModulesPath", "SharePath". % */ -MagickExport unsigned char *NTRegistryKeyLookup(const char *subkey) +MagickPrivate unsigned char *NTRegistryKeyLookup(const char *subkey) { char package_key[MaxTextExtent]; @@ -1767,7 +1769,7 @@ MagickExport unsigned char *NTRegistryKeyLookup(const char *subkey) % o error: MagickTrue the event is an error. % */ -MagickExport MagickBooleanType NTReportEvent(const char *event, +MagickPrivate MagickBooleanType NTReportEvent(const char *event, const MagickBooleanType error) { const char @@ -1814,7 +1816,7 @@ MagickExport MagickBooleanType NTReportEvent(const char *event, % o id: Specifies a string that identifies the resource. % */ -MagickExport unsigned char *NTResourceToBlob(const char *id) +MagickPrivate unsigned char *NTResourceToBlob(const char *id) { char path[MaxTextExtent]; @@ -1896,7 +1898,7 @@ MagickExport unsigned char *NTResourceToBlob(const char *id) % stream. % */ -MagickExport void NTSeekDirectory(DIR *entry,ssize_t position) +MagickPrivate void NTSeekDirectory(DIR *entry,ssize_t position) { (void) position; (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); @@ -1927,7 +1929,7 @@ MagickExport void NTSeekDirectory(DIR *entry,ssize_t position) % for DLL's that can be dynamically loaded. % */ -MagickExport int NTSetSearchPath(const char *path) +MagickPrivate int NTSetSearchPath(const char *path) { #if defined(MAGICKCORE_LTDL_DELEGATE) lt_dlsetsearchpath(path); @@ -1966,7 +1968,7 @@ MagickExport int NTSetSearchPath(const char *path) % o flags: Option flags (ignored for Windows). % */ -MagickExport int NTSyncMemory(void *address,size_t length,int flags) +MagickPrivate int NTSyncMemory(void *address,size_t length,int flags) { (void) flags; if (FlushViewOfFile(address,length) == MagickFalse) @@ -1997,7 +1999,7 @@ MagickExport int NTSyncMemory(void *address,size_t length,int flags) % o command: This string is the command to execute. % */ -MagickExport int NTSystemCommand(const char *command) +MagickPrivate int NTSystemCommand(const char *command) { char local_command[MaxTextExtent]; @@ -2073,7 +2075,7 @@ MagickExport int NTSystemCommand(const char *command) % o name: _SC_PAGE_SIZE or _SC_PHYS_PAGES. % */ -MagickExport ssize_t NTSystemConfiguration(int name) +MagickPrivate ssize_t NTSystemConfiguration(int name) { switch (name) { @@ -2148,7 +2150,7 @@ MagickExport ssize_t NTSystemConfiguration(int name) % o entry: Specifies a pointer to a DIR structure. % */ -MagickExport ssize_t NTTellDirectory(DIR *entry) +MagickPrivate ssize_t NTTellDirectory(DIR *entry) { assert(entry != (DIR *) NULL); return(0); @@ -2178,7 +2180,7 @@ MagickExport ssize_t NTTellDirectory(DIR *entry) % o length: the file length. % */ -MagickExport int NTTruncateFile(int file,off_t length) +MagickPrivate int NTTruncateFile(int file,off_t length) { DWORD file_pointer; @@ -2225,7 +2227,7 @@ MagickExport int NTTruncateFile(int file,off_t length) % o length: the length of the binary large object. % */ -MagickExport int NTUnmapMemory(void *map,size_t length) +MagickPrivate int NTUnmapMemory(void *map,size_t length) { (void) length; if (UnmapViewOfFile(map) == 0) @@ -2252,7 +2254,7 @@ MagickExport int NTUnmapMemory(void *map,size_t length) % double NTUserTime(void) % */ -MagickExport double NTUserTime(void) +MagickPrivate double NTUserTime(void) { DWORD status; @@ -2321,7 +2323,7 @@ MagickExport double NTUserTime(void) % o description: Specifies any description to the reason. % */ -MagickExport void NTWarningHandler(const ExceptionType severity, +MagickPrivate void NTWarningHandler(const ExceptionType severity, const char *reason,const char *description) { char diff --git a/MagickCore/nt-feature.c b/MagickCore/nt-feature.c index 845a67b68..f1f977e74 100644 --- a/MagickCore/nt-feature.c +++ b/MagickCore/nt-feature.c @@ -55,6 +55,8 @@ #include "MagickCore/memory_.h" #include "MagickCore/monitor.h" #include "MagickCore/monitor-private.h" +#include "MagickCore/nt-base.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/pixel-accessor.h" #include "MagickCore/quantum.h" #include "MagickCore/string_.h" diff --git a/MagickCore/string.c b/MagickCore/string.c index 71856b47d..fc9bb573c 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -48,6 +48,7 @@ #include "MagickCore/locale_.h" #include "MagickCore/log.h" #include "MagickCore/memory_.h" +#include "MagickCore/nt-base-private.h" #include "MagickCore/property.h" #include "MagickCore/resource_.h" #include "MagickCore/signature-private.h" diff --git a/MagickCore/type.c b/MagickCore/type.c index 4be03715b..6699e987c 100644 --- a/MagickCore/type.c +++ b/MagickCore/type.c @@ -49,6 +49,7 @@ #include "MagickCore/hashmap.h" #include "MagickCore/log.h" #include "MagickCore/memory_.h" +#include "MagickCore/nt-feature.h" #include "MagickCore/nt-base-private.h" #include "MagickCore/option.h" #include "MagickCore/semaphore.h" diff --git a/MagickCore/utility-private.h b/MagickCore/utility-private.h index 5afc1cd58..df0160d83 100644 --- a/MagickCore/utility-private.h +++ b/MagickCore/utility-private.h @@ -24,6 +24,7 @@ extern "C" { #include "MagickCore/memory_.h" #include "MagickCore/nt-base.h" +#include "MagickCore/nt-base-private.h" extern MagickPrivate char **GetPathComponents(const char *,size_t *), diff --git a/MagickWand/script-token.c b/MagickWand/script-token.c index a8bb07ee9..c2bf46b1f 100644 --- a/MagickWand/script-token.c +++ b/MagickWand/script-token.c @@ -38,12 +38,11 @@ /* Include declarations. */ -#ifndef SCRIPT_TOKEN_TESTING #include "MagickWand/studio.h" -#include "MagickCore/memory_.h" -#include "MagickCore/string-private.h" +#include "MagickWand/MagickWand.h" #include "MagickWand/script-token.h" -#endif +#include "MagickCore/string-private.h" +#include "MagickCore/utility-private.h" /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/coders/xtrn.c b/coders/xtrn.c index 4fbb2b24e..64c5ca086 100644 --- a/coders/xtrn.c +++ b/coders/xtrn.c @@ -148,7 +148,7 @@ static Image *ReadXTRNImage(const ImageInfo *image_info, (void) sscanf(clone_info->filename,"%lx,%lx",¶m1,¶m2); image_ptr=(Image **) param2; if (*image_ptr != (Image *)NULL) - image=CloneImage(*image_ptr,0,0,MagickFalse,&(*image_ptr)->exception); + image=CloneImage(*image_ptr,0,0,MagickFalse,exception); #ifdef ALL_IMAGEINFO image_info_ptr=(ImageInfo **) param1; if (*image_info_ptr != (ImageInfo *)NULL) @@ -595,7 +595,7 @@ static MagickBooleanType WriteXTRNImage(const ImageInfo *image_info,Image *image SetImageInfo(clone_info,1,exception); (void) CopyMagickString(image->magick,clone_info->magick, MaxTextExtent); - status=WriteStream(clone_info,image,fifo); + status=WriteStream(clone_info,image,fifo,exception); if (status == MagickFalse) CatchImageException(image); } @@ -624,7 +624,7 @@ static MagickBooleanType WriteXTRNImage(const ImageInfo *image_info,Image *image SetImageInfo(clone_info,1,exception); (void) CopyMagickString(image->magick,clone_info->magick, MaxTextExtent); - status=WriteStream(clone_info,image,SafeArrayFifo); + status=WriteStream(clone_info,image,SafeArrayFifo,exception); if (status == MagickFalse) CatchImageException(image); } -- 2.40.0