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

Go to the source code of this file.

Data Structures

struct  _MagicMapInfo


#define MagicFilename   "magic.xml"
#define MagicPattern(magic)   (const unsigned char *) (magic), sizeof(magic)-1


typedef struct _MagicMapInfo MagicMapInfo


static MagickBooleanType IsMagicCacheInstantiated (ExceptionInfo *)
static MagickBooleanType LoadMagicCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
static int CompareMagickInfoSize (const void *a, const void *b)
static LinkedListInfoAcquireMagicCache (const char *filename, ExceptionInfo *exception)
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)


static const MagicMapInfo MagicMap []
static LinkedListInfomagic_cache = (LinkedListInfo *) NULL
static SemaphoreInfomagic_semaphore = (SemaphoreInfo *) NULL

Macro Definition Documentation

◆ MagicFilename

#define MagicFilename   "magic.xml"

Definition at line 66 of file magic.c.

Referenced by IsMagicCacheInstantiated().

◆ MagicPattern

#define MagicPattern (   magic)    (const unsigned char *) (magic), sizeof(magic)-1

Definition at line 67 of file magic.c.

Typedef Documentation

◆ MagicMapInfo

typedef struct _MagicMapInfo MagicMapInfo

Function Documentation

◆ AcquireMagicCache()

◆ CompareMagickInfoSize()

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

Definition at line 250 of file magic.c.

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

Referenced by AcquireMagicCache(), and LoadMagicCache().

◆ DestroyMagicElement()

static void* DestroyMagicElement ( void *  magic_info)

◆ GetMagicInfo()

◆ GetMagicInfoList()

◆ GetMagicList()

◆ GetMagicName()

MagickExport const char* GetMagicName ( const MagicInfo magic_info)

◆ GetMagicPatternExtent()

◆ IsMagicCacheInstantiated()

◆ ListMagicInfo()

◆ LoadMagicCache()

◆ MagicCompare()

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

Definition at line 589 of file magic.c.

References LocaleCompare().

Referenced by GetMagicList().

◆ MagicComponentGenesis()

MagickPrivate MagickBooleanType MagicComponentGenesis ( void  )

Definition at line 1076 of file magic.c.

References AcquireSemaphoreInfo(), magic_semaphore, and MagickTrue.

Referenced by MagickCoreGenesis().

◆ MagicComponentTerminus()

◆ MagicInfoCompare()

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

Definition at line 492 of file magic.c.

References LocaleCompare().

Referenced by GetMagicInfoList().

Variable Documentation

◆ magic_cache

◆ magic_semaphore

◆ MagicMap

const MagicMapInfo MagicMap[]

Definition at line 91 of file magic.c.

Referenced by AcquireMagicCache().