delegate.c File Reference

#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/blob.h"
#include "MagickCore/client.h"
#include "MagickCore/configure.h"
#include "MagickCore/constitute.h"
#include "MagickCore/delegate.h"
#include "MagickCore/delegate-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/fx-private.h"
#include "MagickCore/image-private.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/list.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/nt-base-private.h"
#include "MagickCore/option.h"
#include "MagickCore/policy.h"
#include "MagickCore/property.h"
#include "MagickCore/resource_.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/signature.h"
#include "MagickCore/string_.h"
#include "MagickCore/token.h"
#include "MagickCore/token-private.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
#include "MagickCore/xml-tree.h"
#include "MagickCore/xml-tree-private.h"

Defines

#define DelegateFilename   "delegates.xml"
#define WarnNoImageReturn(format, letter)
#define WarnNoImageInfoReturn(format, letter)
#define ExtendInterpretText(string_length)
#define AppendKeyValue2Text(key, value)
#define AppendString2Text(string)

Functions

static MagickBooleanType IsDelegateCacheInstantiated (ExceptionInfo *)
static MagickBooleanType LoadDelegateCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
static LinkedListInfoAcquireDelegateCache (const char *filename, ExceptionInfo *exception)
MagickPrivate MagickBooleanType DelegateComponentGenesis (void)
static void * DestroyDelegate (void *delegate_info)
MagickPrivate void DelegateComponentTerminus (void)
MagickExport int ExternalDelegateCommand (const MagickBooleanType asynchronous, const MagickBooleanType verbose, const char *command, char *message, ExceptionInfo *exception)
static char * SanitizeDelegateString (const char *source)
static char * GetMagickPropertyLetter (ImageInfo *image_info, Image *image, const char letter, ExceptionInfo *exception)
static char * InterpretDelegateProperties (ImageInfo *image_info, Image *image, const char *embed_text, ExceptionInfo *exception)
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 DelegateInfoGetDelegateInfo (const char *decode, const char *encode, ExceptionInfo *exception)
static int DelegateInfoCompare (const void *x, const void *y)
MagickExport const DelegateInfo ** GetDelegateInfoList (const char *pattern, size_t *number_delegates, ExceptionInfo *exception)
static int DelegateCompare (const void *x, const void *y)
MagickExport char ** GetDelegateList (const char *pattern, size_t *number_delegates, ExceptionInfo *exception)
MagickExport ssize_t GetDelegateMode (const DelegateInfo *delegate_info)
MagickExport MagickBooleanType GetDelegateThreadSupport (const DelegateInfo *delegate_info)
static MagickBooleanType CopyDelegateFile (const char *source, const char *destination, const MagickBooleanType overwrite)
MagickExport MagickBooleanType InvokeDelegate (ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception)
MagickExport MagickBooleanType ListDelegateInfo (FILE *file, ExceptionInfo *exception)

Variables

static const char * DelegateMap
static LinkedListInfodelegate_cache = (LinkedListInfo *) NULL
static SemaphoreInfodelegate_semaphore = (SemaphoreInfo *) NULL

Define Documentation

#define AppendKeyValue2Text ( key,
value   ) 
Value:
DisableMSCWarning(4127) \
{ \
  size_t length=strlen(key)+strlen(value)+2; \
  if ((size_t) (q-interpret_text+length+1) >= extent) \
    { \
      extent+=length; \
      interpret_text=(char *) ResizeQuantumMemory(interpret_text,extent+ \
        MaxTextExtent,sizeof(*interpret_text)); \
      if (interpret_text == (char *) NULL) \
        return((char *) NULL); \
      q=interpret_text+strlen(interpret_text); \
     } \
   q+=FormatLocaleString(q,extent,"%s=%s\n",(key),(value)); \
} \
RestoreMSCWarning

Referenced by InterpretImageProperties().

#define AppendString2Text ( string   ) 
Value:
DisableMSCWarning(4127) \
{ \
  size_t length=strlen((string)); \
  if ((size_t) (q-interpret_text+length+1) >= extent) \
    { \
      extent+=length; \
      interpret_text=(char *) ResizeQuantumMemory(interpret_text,extent+ \
        MaxTextExtent,sizeof(*interpret_text)); \
      if (interpret_text == (char *) NULL) \
        return((char *) NULL); \
      q=interpret_text+strlen(interpret_text); \
    } \
  (void) CopyMagickString(q,(string),extent); \
  q+=length; \
} \
RestoreMSCWarning

Referenced by InterpretDelegateProperties(), and InterpretImageProperties().

#define DelegateFilename   "delegates.xml"
#define ExtendInterpretText ( string_length   ) 
Value:
DisableMSCWarning(4127) \
{ \
  size_t length=(string_length); \
  if ((size_t) (q-interpret_text+length+1) >= extent) \
    { \
      extent+=length; \
      interpret_text=(char *) ResizeQuantumMemory(interpret_text,extent+ \
        MaxTextExtent,sizeof(*interpret_text)); \
      if (interpret_text == (char *) NULL) \
        return((char *) NULL); \
      q=interpret_text+strlen(interpret_text); \
   } \
} \
RestoreMSCWarning

Referenced by InterpretDelegateProperties(), and InterpretImageProperties().

#define WarnNoImageInfoReturn ( format,
letter   ) 
Value:
if (image_info == (ImageInfo *) NULL) \
    { \
      (void) ThrowMagickException(exception,GetMagickModule(),OptionWarning, \
        "NoImageInfoForProperty",format,letter); \
      break; \
    }

Referenced by GetMagickProperty(), and GetMagickPropertyLetter().

#define WarnNoImageReturn ( format,
letter   ) 
Value:
if (image == (Image *) NULL) \
    { \
      (void) ThrowMagickException(exception,GetMagickModule(),OptionWarning, \
        "NoImageForProperty",format,letter); \
      break; \
    }

Referenced by GetMagickProperty(), and GetMagickPropertyLetter().


Function Documentation

static LinkedListInfo* AcquireDelegateCache ( const char *  filename,
ExceptionInfo exception 
) [static]
static MagickBooleanType CopyDelegateFile ( const char *  source,
const char *  destination,
const MagickBooleanType  overwrite 
) [static]
static int DelegateCompare ( const void *  x,
const void *  y 
) [static]

References LocaleCompare().

Referenced by GetDelegateList().

MagickPrivate MagickBooleanType DelegateComponentGenesis ( void   ) 
MagickPrivate void DelegateComponentTerminus ( void   ) 
static int DelegateInfoCompare ( const void *  x,
const void *  y 
) [static]

References LocaleCompare().

Referenced by GetDelegateInfoList().

static void* DestroyDelegate ( void *  delegate_info  )  [static]
MagickExport int ExternalDelegateCommand ( const MagickBooleanType  asynchronous,
const MagickBooleanType  verbose,
const char *  command,
char *  message,
ExceptionInfo exception 
)
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 
)
MagickExport const DelegateInfo** GetDelegateInfoList ( const char *  pattern,
size_t *  number_delegates,
ExceptionInfo exception 
)
MagickExport char** GetDelegateList ( const char *  pattern,
size_t *  number_delegates,
ExceptionInfo exception 
)
MagickExport ssize_t GetDelegateMode ( const DelegateInfo delegate_info  ) 
MagickExport MagickBooleanType GetDelegateThreadSupport ( const DelegateInfo delegate_info  ) 
static char* GetMagickPropertyLetter ( ImageInfo image_info,
Image image,
const char  letter,
ExceptionInfo exception 
) [static]
static char* InterpretDelegateProperties ( ImageInfo image_info,
Image image,
const char *  embed_text,
ExceptionInfo exception 
) [static]
MagickExport MagickBooleanType InvokeDelegate ( ImageInfo image_info,
Image image,
const char *  decode,
const char *  encode,
ExceptionInfo exception 
)
static MagickBooleanType IsDelegateCacheInstantiated ( ExceptionInfo exception  )  [static]
MagickExport MagickBooleanType ListDelegateInfo ( FILE *  file,
ExceptionInfo exception 
)
static MagickBooleanType LoadDelegateCache ( LinkedListInfo cache,
const char *  xml,
const char *  filename,
const size_t  depth,
ExceptionInfo exception 
)
static char* SanitizeDelegateString ( const char *  source  )  [static]

References AcquireString().

Referenced by GetMagickPropertyLetter().


Variable Documentation

const char* DelegateMap [static]

Referenced by AcquireDelegateCache().


Generated on 18 Dec 2019 for MagickCore by  doxygen 1.6.1