MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
delegate.c File Reference
Include dependency graph for delegate.c:

Go to the source code of this file.

Macros

#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 * 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
 

Macro Definition Documentation

◆ AppendKeyValue2Text

#define AppendKeyValue2Text (   key,
  value 
)
Value:
{ \
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+ \
MagickPathExtent,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)); \
}
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:466
MagickExport void * ResizeQuantumMemory(void *memory, const size_t count, const size_t quantum)
Definition: memory.c:1457
#define MagickPathExtent

◆ AppendString2Text

#define AppendString2Text (   string)
Value:
{ \
size_t length=strlen((string)); \
if ((size_t) (q-interpret_text+length+1) >= extent) \
{ \
extent+=length; \
interpret_text=(char *) ResizeQuantumMemory(interpret_text,extent+ \
MagickPathExtent,sizeof(*interpret_text)); \
if (interpret_text == (char *) NULL) \
return((char *) NULL); \
q=interpret_text+strlen(interpret_text); \
} \
(void) CopyMagickString(q,(string),extent); \
q+=length; \
}
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:731

◆ DelegateFilename

#define DelegateFilename   "delegates.xml"

Definition at line 91 of file delegate.c.

◆ ExtendInterpretText

#define ExtendInterpretText (   string_length)
Value:
{ \
size_t length=(string_length); \
if ((size_t) (q-interpret_text+length+1) >= extent) \
{ \
extent+=length; \
interpret_text=(char *) ResizeQuantumMemory(interpret_text,extent+ \
MagickPathExtent,sizeof(*interpret_text)); \
if (interpret_text == (char *) NULL) \
return((char *) NULL); \
q=interpret_text+strlen(interpret_text); \
} \
}

◆ WarnNoImageInfoReturn

#define WarnNoImageInfoReturn (   format,
  letter 
)
Value:
if (image_info == (ImageInfo *) NULL) \
{ \
"NoImageInfoForProperty",format,letter); \
break; \
}
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1145
@ OptionWarning
Definition: exception.h:33
#define GetMagickModule()
Definition: log.h:28

◆ WarnNoImageReturn

#define WarnNoImageReturn (   format,
  letter 
)
Value:
if (image == (Image *) NULL) \
{ \
"NoImageForProperty",format,letter); \
break; \
}
Definition: image.h:152

Function Documentation

◆ AcquireDelegateCache()

◆ CopyDelegateFile()

static MagickBooleanType CopyDelegateFile ( const char *  source,
const char *  destination,
const MagickBooleanType  overwrite 
)
static

◆ DelegateCompare()

static int DelegateCompare ( const void *  x,
const void *  y 
)
static

Definition at line 1421 of file delegate.c.

References LocaleCompare().

Referenced by GetDelegateList().

◆ DelegateComponentGenesis()

MagickPrivate MagickBooleanType DelegateComponentGenesis ( void  )

Definition at line 254 of file delegate.c.

References AcquireSemaphoreInfo(), delegate_semaphore, and MagickTrue.

Referenced by MagickCoreGenesis().

◆ DelegateComponentTerminus()

◆ DelegateInfoCompare()

static int DelegateInfoCompare ( const void *  x,
const void *  y 
)
static

Definition at line 1310 of file delegate.c.

References LocaleCompare().

Referenced by GetDelegateInfoList().

◆ DestroyDelegate()

◆ ExternalDelegateCommand()

◆ GetDelegateCommand()

◆ GetDelegateCommands()

MagickExport const char * GetDelegateCommands ( const DelegateInfo delegate_info)

◆ GetDelegateInfo()

◆ GetDelegateInfoList()

◆ GetDelegateList()

◆ GetDelegateMode()

MagickExport ssize_t GetDelegateMode ( const DelegateInfo delegate_info)

◆ GetDelegateThreadSupport()

◆ GetMagickPropertyLetter()

static char * GetMagickPropertyLetter ( ImageInfo image_info,
Image image,
const char  letter,
ExceptionInfo exception 
)
static

◆ InterpretDelegateProperties()

◆ InvokeDelegate()

◆ IsDelegateCacheInstantiated()

◆ ListDelegateInfo()

◆ LoadDelegateCache()

Variable Documentation

◆ delegate_cache

◆ delegate_semaphore

◆ DelegateMap

const char* DelegateMap
static

Definition at line 97 of file delegate.c.

Referenced by AcquireDelegateCache().