|
MagickCore
6.7.5
|
#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/hashmap.h"#include "MagickCore/magic.h"#include "MagickCore/magic-private.h"#include "MagickCore/memory_.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 "MagickCore/xml-tree.h"
Go to the source code of this file.
Data Structures | |
| struct | _MagicMapInfo |
Defines | |
| #define | MagicFilename "magic.xml" |
| #define | MagickString(magic) (const unsigned char *) (magic), sizeof(magic)-1 |
Typedefs | |
| typedef struct _MagicMapInfo | MagicMapInfo |
Functions | |
| static MagickBooleanType | InitializeMagicList (ExceptionInfo *) |
| static MagickBooleanType | LoadMagicLists (const char *, ExceptionInfo *) |
| MagickExport const MagicInfo * | GetMagicInfo (const unsigned char *magic, const size_t length, 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) |
| static MagickBooleanType | LoadMagicList (const char *xml, const char *filename, const size_t depth, ExceptionInfo *exception) |
| MagickPrivate MagickBooleanType | MagicComponentGenesis (void) |
| static void * | DestroyMagicElement (void *magic_info) |
| MagickPrivate void | MagicComponentTerminus (void) |
Variables | |
| static const MagicMapInfo | MagicMap [] |
| static LinkedListInfo * | magic_list = (LinkedListInfo *) NULL |
| static SemaphoreInfo * | magic_semaphore = (SemaphoreInfo *) NULL |
| static volatile MagickBooleanType | instantiate_magic = MagickFalse |
| #define MagicFilename "magic.xml" |
Definition at line 64 of file magic.c.
Referenced by InitializeMagicList().
| #define MagickString | ( | magic | ) | (const unsigned char *) (magic), sizeof(magic)-1 |
| typedef struct _MagicMapInfo MagicMapInfo |
| static void* DestroyMagicElement | ( | void * | magic_info | ) | [static] |
Definition at line 1046 of file magic.c.
References _MagicInfo::exempt, MagickFalse, _MagicInfo::path, DestroyString(), _MagicInfo::name, _MagicInfo::target, _MagicInfo::magic, and RelinquishMagickMemory().
Referenced by MagicComponentTerminus().
| MagickExport const MagicInfo* GetMagicInfo | ( | const unsigned char * | magic, |
| const size_t | length, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 248 of file magic.c.
References magic_list, instantiate_magic, MagickFalse, InitializeMagicList(), IsLinkedListEmpty(), GetValueFromLinkedList(), LockSemaphoreInfo(), magic_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _MagicInfo::offset, _MagicInfo::length, _MagicInfo::magic, InsertValueInLinkedList(), RemoveElementByValueFromLinkedList(), and UnlockSemaphoreInfo().
Referenced by SetImageInfo(), GetMagicInfoList(), and GetMagicList().
| MagickExport const MagicInfo** GetMagicInfoList | ( | const char * | pattern, |
| size_t * | number_aliases, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 337 of file magic.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetMagicInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), magic_list, LockSemaphoreInfo(), magic_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _MagicInfo::stealth, MagickFalse, GlobExpression(), _MagicInfo::name, UnlockSemaphoreInfo(), and MagicInfoCompare().
Referenced by ListMagicInfo().
| MagickExport char** GetMagicList | ( | const char * | pattern, |
| size_t * | number_aliases, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 432 of file magic.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetMagicInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), magic_list, LockSemaphoreInfo(), magic_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _MagicInfo::stealth, MagickFalse, GlobExpression(), _MagicInfo::name, ConstantString(), UnlockSemaphoreInfo(), and MagicCompare().
| MagickExport const char* GetMagicName | ( | const MagicInfo * | magic_info | ) |
Definition at line 497 of file magic.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, _MagicInfo::signature, MagickSignature, and _MagicInfo::name.
Referenced by SetImageInfo().
| static MagickBooleanType InitializeMagicList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 527 of file magic.c.
References magic_list, instantiate_magic, MagickFalse, magic_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), LoadMagicLists(), MagicFilename, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetMagicInfo().
| MagickExport MagickBooleanType ListMagicInfo | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 570 of file magic.c.
References GetMagicInfoList(), MagickFalse, LocaleCompare(), FormatLocaleFile(), _MagicInfo::path, _MagicInfo::offset, _MagicInfo::target, RelinquishMagickMemory(), and MagickTrue.
| static MagickBooleanType LoadMagicList | ( | const char * | xml, |
| const char * | filename, | ||
| const size_t | depth, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 663 of file magic.c.
References MaxTextExtent, LogMagickEvent(), ConfigureEvent, GetMagickModule, MagickFalse, magic_list, NewLinkedList(), ThrowFileException, ResourceLimitError, MagickTrue, AcquireString(), GetMagickToken(), CopyMagickString(), LocaleNCompare(), LocaleCompare(), ThrowMagickException(), ConfigureError, GetPathComponent(), HeadPath, ConcatenateMagickString(), DirectorySeparator, FileToString(), RelinquishMagickMemory(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), _MagicInfo::path, ConstantString(), _MagicInfo::exempt, _MagicInfo::signature, MagickSignature, AppendValueToLinkedList(), _MagicInfo::name, _MagicInfo::offset, StringToLong(), _MagicInfo::stealth, IsMagickTrue(), _MagicInfo::target, _MagicInfo::magic, and _MagicInfo::length.
Referenced by LoadMagicLists().
| static MagickBooleanType LoadMagicLists | ( | const char * | filename, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 924 of file magic.c.
References MaxTextExtent, MagickFalse, magic_list, NewLinkedList(), ThrowFileException, ResourceLimitError, MagicMap, AcquireMagickMemory(), ThrowMagickException(), GetMagickModule, _MagicInfo::name, ResetMagickMemory(), _MagicInfo::path, _MagicMapInfo::name, _MagicInfo::offset, _MagicMapInfo::offset, _MagicInfo::target, _MagicMapInfo::magic, _MagicInfo::magic, _MagicInfo::length, _MagicMapInfo::length, _MagicInfo::exempt, MagickTrue, _MagicInfo::signature, MagickSignature, AppendValueToLinkedList(), GetConfigureOptions(), GetNextValueInLinkedList(), CopyMagickString(), GetStringInfoPath(), LoadMagicList(), GetStringInfoDatum(), and DestroyConfigureOptions().
Referenced by InitializeMagicList().
| static int MagicCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
| MagickPrivate MagickBooleanType MagicComponentGenesis | ( | void | ) |
Definition at line 1021 of file magic.c.
References AcquireSemaphoreInfo(), magic_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickPrivate void MagicComponentTerminus | ( | void | ) |
Definition at line 1067 of file magic.c.
References magic_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), magic_list, DestroyLinkedList(), DestroyMagicElement(), instantiate_magic, MagickFalse, UnlockSemaphoreInfo(), and DestroySemaphoreInfo().
Referenced by MagickCoreTerminus().
| static int MagicInfoCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
Definition at line 320 of file magic.c.
References LocaleCompare().
Referenced by GetMagicInfoList().
volatile MagickBooleanType instantiate_magic = MagickFalse [static] |
Definition at line 210 of file magic.c.
Referenced by GetMagicInfo(), InitializeMagicList(), and MagicComponentTerminus().
LinkedListInfo* magic_list = (LinkedListInfo *) NULL [static] |
Definition at line 204 of file magic.c.
Referenced by GetMagicInfo(), GetMagicInfoList(), GetMagicList(), InitializeMagicList(), LoadMagicList(), LoadMagicLists(), and MagicComponentTerminus().
SemaphoreInfo* magic_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 207 of file magic.c.
Referenced by GetMagicInfo(), GetMagicInfoList(), GetMagicList(), InitializeMagicList(), MagicComponentGenesis(), and MagicComponentTerminus().
const MagicMapInfo MagicMap[] [static] |
Definition at line 89 of file magic.c.
Referenced by LoadMagicLists().