MagickCore  7.0.8
Convert, Edit, Or Compose Bitmap Images
magic.c File Reference
#include "MagickCore/studio.h"
#include "MagickCore/blob.h"
#include "MagickCore/client.h"
#include "MagickCore/configure.h"
#include "MagickCore/configure-private.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/magic.h"
#include "MagickCore/magic-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
#include "coders/coders.h"
#include "coders/coders-list.h"
Include dependency graph for magic.c:

Go to the source code of this file.

Data Structures

struct  _MagicMapInfo
 
struct  _MagicInfo
 

Macros

#define AddMagickCoder(coder)   Magick ## coder ## Headers
 

Typedefs

typedef struct _MagicMapInfo MagicMapInfo
 

Functions

static MagickBooleanType IsMagicListInstantiated (ExceptionInfo *)
 
static int CompareMagickInfoSize (const void *a, const void *b)
 
static LinkedListInfoAcquireMagicList (ExceptionInfo *exception)
 
static MagickBooleanType IsMagicCacheInstantiated ()
 
MagickExport const MagicInfoGetMagicInfo (const unsigned char *magic, const size_t length, ExceptionInfo *exception)
 
MagickExport size_t GetMagicPatternExtent (ExceptionInfo *exception)
 
static int MagicInfoCompare (const void *x, const void *y)
 
MagickExport const MagicInfo ** GetMagicInfoList (const char *pattern, size_t *number_aliases, ExceptionInfo *exception)
 
static int MagicCompare (const void *x, const void *y)
 
MagickExport char ** GetMagicList (const char *pattern, size_t *number_aliases, ExceptionInfo *exception)
 
MagickExport const char * GetMagicName (const MagicInfo *magic_info)
 
MagickExport MagickBooleanType ListMagicInfo (FILE *file, ExceptionInfo *exception)
 
MagickPrivate MagickBooleanType MagicComponentGenesis (void)
 
static void * DestroyMagicElement (void *magic_info)
 
MagickPrivate void MagicComponentTerminus (void)
 

Variables

static const MagicMapInfo MagicMap []
 
static LinkedListInfomagic_cache = (LinkedListInfo *) NULL
 
static LinkedListInfomagic_list = (LinkedListInfo *) NULL
 
static SemaphoreInfomagic_cache_semaphore = (SemaphoreInfo *) NULL
 
static SemaphoreInfomagic_list_semaphore = (SemaphoreInfo *) NULL
 

Macro Definition Documentation

◆ AddMagickCoder

#define AddMagickCoder (   coder)    Magick ## coder ## Headers

Definition at line 65 of file magic.c.

Typedef Documentation

◆ MagicMapInfo

typedef struct _MagicMapInfo MagicMapInfo

Function Documentation

◆ AcquireMagicList()

◆ CompareMagickInfoSize()

static int CompareMagickInfoSize ( const void *  a,
const void *  b 
)
static

Definition at line 161 of file magic.c.

References _MagicInfo::length, and _MagicInfo::offset.

Referenced by AcquireMagicList(), and GetMagicInfo().

◆ DestroyMagicElement()

static void* DestroyMagicElement ( void *  magic_info)
static

◆ GetMagicInfo()

◆ GetMagicInfoList()

◆ GetMagicList()

◆ GetMagicName()

MagickExport const char* GetMagicName ( const MagicInfo magic_info)

◆ GetMagicPatternExtent()

◆ IsMagicCacheInstantiated()

static MagickBooleanType IsMagicCacheInstantiated ( )
static

◆ IsMagicListInstantiated()

static MagickBooleanType IsMagicListInstantiated ( ExceptionInfo exception)
static

◆ ListMagicInfo()

◆ MagicCompare()

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

Definition at line 524 of file magic.c.

References LocaleCompare().

Referenced by GetMagicList().

◆ MagicComponentGenesis()

MagickPrivate MagickBooleanType MagicComponentGenesis ( void  )

Definition at line 750 of file magic.c.

References AcquireSemaphoreInfo(), magic_list_semaphore, and MagickTrue.

Referenced by MagickCoreGenesis().

◆ MagicComponentTerminus()

◆ MagicInfoCompare()

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

Definition at line 427 of file magic.c.

References LocaleCompare().

Referenced by GetMagicInfoList().

Variable Documentation

◆ magic_cache

LinkedListInfo* magic_cache = (LinkedListInfo *) NULL
static

Definition at line 123 of file magic.c.

Referenced by GetMagicInfo(), IsMagicCacheInstantiated(), and MagicComponentTerminus().

◆ magic_cache_semaphore

SemaphoreInfo* magic_cache_semaphore = (SemaphoreInfo *) NULL
static

Definition at line 127 of file magic.c.

Referenced by GetMagicInfo(), IsMagicCacheInstantiated(), and MagicComponentTerminus().

◆ magic_list

◆ magic_list_semaphore

◆ MagicMap

const MagicMapInfo MagicMap[]
static
Initial value:
=
{
MagickCoderHeader("CGM", 0, "BEGMF")
MagickCoderHeader("FIG", 0, "#FIG")
MagickCoderHeader("HPGL", 0, "IN;")
MagickCoderHeader("ILBM", 8, "ILBM")
}

Definition at line 113 of file magic.c.

Referenced by AcquireMagicList().