#include "magick/studio.h"#include "magick/property.h"#include "magick/blob.h"#include "magick/client.h"#include "magick/configure.h"#include "magick/constitute.h"#include "magick/delegate.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/hashmap.h"#include "magick/list.h"#include "magick/memory_.h"#include "magick/policy.h"#include "magick/resource_.h"#include "magick/semaphore.h"#include "magick/string_.h"#include "magick/token.h"#include "magick/utility.h"#include "magick/xml-tree.h"
Go to the source code of this file.
Defines | |
| #define | DelegateFilename "delegates.xml" |
Functions | |
| static MagickBooleanType | InitializeDelegateList (ExceptionInfo *) |
| static MagickBooleanType | LoadDelegateLists (const char *, ExceptionInfo *) |
| MagickExport MagickBooleanType | DelegateComponentGenesis (void) |
| static void * | DestroyDelegate (void *delegate_info) |
| MagickExport void | DelegateComponentTerminus (void) |
| MagickExport char * | GetDelegateCommand (const ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception) |
| MagickExport const char * | GetDelegateCommands (const DelegateInfo *delegate_info) |
| MagickExport const DelegateInfo * | GetDelegateInfo (const char *decode, const char *encode, ExceptionInfo *exception) |
| static int | DelegateInfoCompare (const void *x, const void *y) |
| MagickExport const DelegateInfo ** | GetDelegateInfoList (const char *pattern, unsigned long *number_delegates, ExceptionInfo *exception) |
| static int | DelegateCompare (const void *x, const void *y) |
| MagickExport char ** | GetDelegateList (const char *pattern, unsigned long *number_delegates, ExceptionInfo *exception) |
| MagickExport long | GetDelegateMode (const DelegateInfo *delegate_info) |
| MagickExport MagickBooleanType | GetDelegateThreadSupport (const DelegateInfo *delegate_info) |
| static size_t | MagickMin (const size_t x, const size_t y) |
| static MagickBooleanType | CopyDelegateFile (const char *source, const char *destination) |
| MagickExport MagickBooleanType | InvokeDelegate (ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | ListDelegateInfo (FILE *file, ExceptionInfo *exception) |
| static MagickBooleanType | LoadDelegateList (const char *xml, const char *filename, const unsigned long depth, ExceptionInfo *exception) |
Variables | |
| static const char * | DelegateMap |
| static LinkedListInfo * | delegate_list = (LinkedListInfo *) NULL |
| static SemaphoreInfo * | delegate_semaphore = (SemaphoreInfo *) NULL |
| static volatile MagickBooleanType | instantiate_delegate = MagickFalse |
| #define DelegateFilename "delegates.xml" |
Definition at line 71 of file delegate.c.
Referenced by InitializeDelegateList().
| static MagickBooleanType CopyDelegateFile | ( | const char * | source, | |
| const char * | destination | |||
| ) | [static] |
Definition at line 761 of file delegate.c.
References AcquireQuantumMemory(), close, fstat, GetPathAttributes(), MagickFalse, MagickMaxBufferExtent, MagickMin(), MagickTrue, O_BINARY, open, read, RelinquishMagickMemory(), S_MODE, stat, and write.
Referenced by InvokeDelegate().
| static int DelegateCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
Definition at line 559 of file delegate.c.
References LocaleCompare().
Referenced by GetDelegateList().
| MagickExport MagickBooleanType DelegateComponentGenesis | ( | void | ) |
Definition at line 165 of file delegate.c.
References AcquireSemaphoreInfo(), delegate_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickExport void DelegateComponentTerminus | ( | void | ) |
Definition at line 209 of file delegate.c.
References AcquireSemaphoreInfo(), delegate_list, delegate_semaphore, DestroyDelegate(), DestroyLinkedList(), DestroySemaphoreInfo(), instantiate_delegate, LockSemaphoreInfo(), MagickFalse, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
| static int DelegateInfoCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
Definition at line 453 of file delegate.c.
References LocaleCompare().
Referenced by GetDelegateInfoList().
| static void* DestroyDelegate | ( | void * | delegate_info | ) | [static] |
Definition at line 190 of file delegate.c.
References _DelegateInfo::commands, _DelegateInfo::decode, DestroyString(), _DelegateInfo::encode, _DelegateInfo::path, and RelinquishMagickMemory().
Referenced by DelegateComponentTerminus().
| MagickExport char* GetDelegateCommand | ( | const ImageInfo * | image_info, | |
| Image * | image, | |||
| const char * | decode, | |||
| const char * | encode, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 258 of file delegate.c.
References _DelegateInfo::commands, _Image::debug, DelegateError, DestroyString(), _Image::filename, GetDelegateInfo(), GetMagickModule, InterpretImageProperties(), LogMagickEvent(), MagickFalse, MagickSignature, RelinquishMagickMemory(), ResourceLimitError, _Image::signature, _ImageInfo::signature, StringToList(), ThrowMagickException(), and TraceEvent.
| MagickExport const char* GetDelegateCommands | ( | const DelegateInfo * | delegate_info | ) |
Definition at line 327 of file delegate.c.
References _DelegateInfo::commands, GetMagickModule, LogMagickEvent(), MagickSignature, _DelegateInfo::signature, and TraceEvent.
| MagickExport const DelegateInfo* GetDelegateInfo | ( | const char * | decode, | |
| const char * | encode, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 364 of file delegate.c.
References _DelegateInfo::decode, delegate_list, delegate_semaphore, _DelegateInfo::encode, GetNextValueInLinkedList(), GetValueFromLinkedList(), InitializeDelegateList(), InsertValueInLinkedList(), instantiate_delegate, IsLinkedListEmpty(), LocaleCompare(), LockSemaphoreInfo(), MagickFalse, _DelegateInfo::mode, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), and UnlockSemaphoreInfo().
Referenced by GetDelegateCommand(), GetDelegateInfoList(), GetDelegateList(), InvokeDelegate(), IsMagickConflict(), ReadImage(), and WriteImage().
| MagickExport const DelegateInfo** GetDelegateInfoList | ( | const char * | pattern, | |
| unsigned long * | number_delegates, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 478 of file delegate.c.
References AcquireQuantumMemory(), _DelegateInfo::decode, delegate_list, delegate_semaphore, DelegateInfoCompare(), _DelegateInfo::encode, GetDelegateInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, ResetLinkedListIterator(), _DelegateInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
Referenced by ListDelegateInfo().
| MagickExport char** GetDelegateList | ( | const char * | pattern, | |
| unsigned long * | number_delegates, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 574 of file delegate.c.
References AcquireQuantumMemory(), ConstantString(), _DelegateInfo::decode, delegate_list, delegate_semaphore, DelegateCompare(), _DelegateInfo::encode, GetDelegateInfo(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, ResetLinkedListIterator(), _DelegateInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
| MagickExport long GetDelegateMode | ( | const DelegateInfo * | delegate_info | ) |
Definition at line 642 of file delegate.c.
References GetMagickModule, LogMagickEvent(), MagickSignature, _DelegateInfo::mode, _DelegateInfo::signature, and TraceEvent.
Referenced by WriteImage().
| MagickExport MagickBooleanType GetDelegateThreadSupport | ( | const DelegateInfo * | delegate_info | ) |
Definition at line 674 of file delegate.c.
References GetMagickModule, LogMagickEvent(), MagickSignature, _DelegateInfo::signature, _DelegateInfo::thread_support, and TraceEvent.
Referenced by ReadImage(), and WriteImage().
| static MagickBooleanType InitializeDelegateList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 705 of file delegate.c.
References AcquireSemaphoreInfo(), delegate_list, delegate_semaphore, DelegateFilename, instantiate_delegate, LoadDelegateLists(), LockSemaphoreInfo(), MagickFalse, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetDelegateInfo().
| MagickExport MagickBooleanType InvokeDelegate | ( | ImageInfo * | image_info, | |
| Image * | image, | |||
| const char * | decode, | |||
| const char * | encode, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 834 of file delegate.c.
References AcquireUniqueFilename(), AcquireUniqueSymbolicLink(), _ImageInfo::adjoin, CloneImageInfo(), _DelegateInfo::commands, ConcatenateString(), CopyDelegateFile(), CopyMagickString(), _Image::debug, _DelegateInfo::decode, DelegateError, DelegatePolicyDomain, DestroyImageInfo(), DestroyString(), _DelegateInfo::encode, ExecutePolicyRights, _ImageInfo::filename, _Image::filename, FileOpenError, FormatMagickString(), GetDelegateInfo(), GetMagickModule, GetNextImageInList(), InterpretImageProperties(), IsRightsAuthorized(), LocaleCompare(), LocaleUpper(), LogMagickEvent(), _Image::magick, _ImageInfo::magick, MagickFalse, MagickSignature, MagickTrue, MaxTextExtent, _DelegateInfo::mode, PolicyError, RelinquishMagickMemory(), RelinquishUniqueFileResource(), ResourceLimitError, SetImageInfo(), _Image::signature, _ImageInfo::signature, _DelegateInfo::spawn, StringToList(), SystemCommand(), _ImageInfo::temporary, ThrowFileException, ThrowMagickException(), TraceEvent, _ImageInfo::unique, _ImageInfo::verbose, WriteImage(), and _ImageInfo::zero.
Referenced by ReadImage(), and WriteImage().
| MagickExport MagickBooleanType ListDelegateInfo | ( | FILE * | file, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1103 of file delegate.c.
References ConcatenateMagickString(), CopyMagickString(), DestroyString(), GetDelegateInfoList(), LocaleCompare(), MagickFalse, MagickTrue, MaxTextExtent, _DelegateInfo::path, RelinquishMagickMemory(), StringToList(), and StripString().
| static MagickBooleanType LoadDelegateList | ( | const char * | xml, | |
| const char * | filename, | |||
| const unsigned long | depth, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 1203 of file delegate.c.
References AcquireMagickMemory(), AcquireString(), AppendValueToLinkedList(), _DelegateInfo::commands, ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), _DelegateInfo::decode, delegate_list, DirectorySeparator, _DelegateInfo::encode, FileToString(), GetMagickModule, GetMagickToken(), GetPathComponent(), HeadPath, IsMagickTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, MaxTextExtent, _DelegateInfo::mode, NewLinkedList(), NTGhostscriptEXE(), _DelegateInfo::path, RelinquishMagickMemory(), ResetMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _DelegateInfo::signature, _DelegateInfo::spawn, _DelegateInfo::stealth, SubstituteString(), _DelegateInfo::thread_support, ThrowFatalException, ThrowFileException, and ThrowMagickException().
Referenced by LoadDelegateLists().
| static MagickBooleanType LoadDelegateLists | ( | const char * | filename, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1466 of file delegate.c.
References delegate_list, DelegateMap, DestroyConfigureOptions(), GetConfigureOptions(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), IsLinkedListEmpty(), LoadDelegateList(), MagickFalse, and MagickTrue.
Referenced by InitializeDelegateList().
| static size_t MagickMin | ( | const size_t | x, | |
| const size_t | y | |||
| ) | [inline, static] |
Definition at line 754 of file delegate.c.
Referenced by CopyDelegateFile().
LinkedListInfo* delegate_list = (LinkedListInfo *) NULL [static] |
Definition at line 132 of file delegate.c.
Referenced by DelegateComponentTerminus(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), InitializeDelegateList(), LoadDelegateList(), and LoadDelegateLists().
SemaphoreInfo* delegate_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 135 of file delegate.c.
Referenced by DelegateComponentGenesis(), DelegateComponentTerminus(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), and InitializeDelegateList().
const char* DelegateMap [static] |
Definition at line 77 of file delegate.c.
Referenced by LoadDelegateLists().
volatile MagickBooleanType instantiate_delegate = MagickFalse [static] |
Definition at line 138 of file delegate.c.
Referenced by DelegateComponentTerminus(), GetDelegateInfo(), and InitializeDelegateList().
1.6.1