MagickCore
7.0.0
|
#include "MagickCore/studio.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/hashmap.h"
#include "MagickCore/memory_.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/signature-private.h"
#include "MagickCore/string_.h"
Go to the source code of this file.
Data Structures | |
struct | _ElementInfo |
struct | _EntryInfo |
struct | _LinkedListInfo |
struct | _HashmapInfo |
Macros | |
#define | MaxCapacities 20 |
Typedefs | |
typedef struct _ElementInfo | ElementInfo |
typedef struct _EntryInfo | EntryInfo |
#define MaxCapacities 20 |
Referenced by IncreaseHashmapCapacity().
typedef struct _ElementInfo ElementInfo |
typedef struct _EntryInfo EntryInfo |
MagickExport MagickBooleanType AppendValueToLinkedList | ( | LinkedListInfo * | list_info, |
const void * | value | ||
) |
Definition at line 155 of file hashmap.c.
References AcquireMagickMemory(), _LinkedListInfo::capacity, _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, IsEventLogging(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by GetConfigureOptions(), GetConfigurePaths(), GetLocaleOptions(), LoadColorList(), LoadColorLists(), LoadConfigureList(), LoadConfigureLists(), LoadDelegateList(), LoadLogList(), LoadLogLists(), LoadMagicList(), LoadMagicLists(), LoadMimeList(), LoadPolicyList(), LoadPolicyLists(), and ThrowException().
MagickExport void ClearLinkedList | ( | LinkedListInfo * | list_info, |
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 212 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
MagickExport MagickBooleanType CompareHashmapString | ( | const void * | target, |
const void * | source | ||
) |
Definition at line 268 of file hashmap.c.
References IsMagickTrue, and LocaleCompare().
MagickExport MagickBooleanType CompareHashmapStringInfo | ( | const void * | target, |
const void * | source | ||
) |
Definition at line 306 of file hashmap.c.
References IsMagickTrue, and LocaleCompare().
MagickExport HashmapInfo* DestroyHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 335 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::debug, DestroyLinkedList(), DestroySemaphoreInfo(), GetMagickModule, GetNextValueInLinkedList(), _LinkedListInfo::head, IfMagickTrue, _EntryInfo::key, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishMagickMemory(), _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport LinkedListInfo* DestroyLinkedList | ( | LinkedListInfo * | list_info, |
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 405 of file hashmap.c.
References _LinkedListInfo::debug, DestroySemaphoreInfo(), GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by ColorComponentTerminus(), ConfigureComponentTerminus(), DelegateComponentTerminus(), DestroyConfigureOptions(), DestroyExceptionInfo(), DestroyHashmap(), DestroyLocaleOptions(), GetConfigureOptions(), GetLocaleOptions(), LogComponentTerminus(), MagicComponentTerminus(), MimeComponentTerminus(), and PolicyComponentTerminus().
MagickExport void* GetLastValueInLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 456 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by ThrowException().
MagickExport void* GetNextKeyInHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 495 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::debug, GetMagickModule, GetNextValueInLinkedList(), _LinkedListInfo::head, _HashmapInfo::head_of_list, IfMagickFalse, IfMagickTrue, _EntryInfo::key, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, and UnlockSemaphoreInfo().
MagickExport void* GetNextValueInHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 558 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::debug, GetMagickModule, GetNextValueInLinkedList(), _LinkedListInfo::head, _HashmapInfo::head_of_list, IfMagickFalse, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* GetNextValueInLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 621 of file hashmap.c.
References _LinkedListInfo::debug, GetMagickModule, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by CatchException(), DestroyHashmap(), GetColorCompliance(), GetColorInfoList(), GetColorList(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), GetLocaleOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMagicInfo(), GetMagicInfoList(), GetMagickHomeURL(), GetMagicList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetNextKeyInHashmap(), GetNextValueInHashmap(), GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), GetThresholdMap(), GetValueFromHashmap(), InheritException(), IsRightsAuthorized(), ListThresholdMaps(), LoadCoderLists(), LoadColorLists(), LoadConfigureLists(), LoadDelegateLists(), LoadLocaleLists(), LoadLogLists(), LoadMagicLists(), LoadMimeLists(), LoadPolicyLists(), LoadTypeLists(), PutEntryInHashmap(), QueryColorname(), and RemoveEntryFromHashmap().
MagickExport size_t GetNumberOfElementsInLinkedList | ( | const LinkedListInfo * | list_info | ) |
Definition at line 698 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, IfMagickTrue, LogMagickEvent(), MagickSignature, _LinkedListInfo::signature, and TraceEvent.
Referenced by GetColorInfoList(), GetColorList(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetDelegateInfoList(), GetDelegateList(), GetLogInfoList(), GetLogList(), GetMagicInfoList(), GetMagicList(), GetMimeInfoList(), GetMimeList(), GetPolicyInfoList(), and GetPolicyList().
MagickExport size_t GetNumberOfEntriesInHashmap | ( | const HashmapInfo * | hashmap_info | ) |
Definition at line 664 of file hashmap.c.
References _HashmapInfo::debug, _HashmapInfo::entries, GetMagickModule, IfMagickTrue, LogMagickEvent(), MagickSignature, _HashmapInfo::signature, and TraceEvent.
MagickExport void* GetValueFromHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key | ||
) |
Definition at line 732 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::debug, GetMagickModule, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, IfMagickTrue, _EntryInfo::key, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* GetValueFromLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index | ||
) |
Definition at line 811 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by GetColorCompliance(), GetConfigureInfo(), GetDelegateInfo(), GetLogInfo(), GetMagicInfo(), GetMimeInfo(), GetPolicyInfo(), and SetLogEventMask().
MagickExport size_t HashPointerType | ( | const void * | pointer | ) |
Definition at line 873 of file hashmap.c.
Referenced by NewHashmap().
MagickExport size_t HashStringInfoType | ( | const void * | string_info | ) |
Definition at line 962 of file hashmap.c.
References AcquireSignatureInfo(), DestroySignatureInfo(), FinalizeSignature(), GetSignatureDigest(), GetStringInfoDatum(), and UpdateSignature().
MagickExport size_t HashStringType | ( | const void * | string | ) |
Definition at line 909 of file hashmap.c.
References AcquireSignatureInfo(), DestroySignatureInfo(), DestroyStringInfo(), FinalizeSignature(), GetSignatureDigest(), GetStringInfoDatum(), StringToStringInfo(), and UpdateSignature().
|
static |
Definition at line 1448 of file hashmap.c.
References AcquireQuantumMemory(), _HashmapInfo::capacity, DestroySemaphoreInfo(), _LinkedListInfo::elements, _EntryInfo::hash, _LinkedListInfo::head, LockSemaphoreInfo(), MagickFalse, MagickSignature, MagickTrue, _HashmapInfo::map, MaxCapacities, NewLinkedList(), _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), ResetMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by PutEntryInHashmap().
MagickExport MagickBooleanType InsertValueInLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index, | ||
const void * | value | ||
) |
Definition at line 1015 of file hashmap.c.
References AcquireMagickMemory(), _LinkedListInfo::capacity, _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by GetColorCompliance(), GetConfigureInfo(), GetDelegateInfo(), GetLogInfo(), GetMagicInfo(), GetMimeInfo(), GetPolicyInfo(), and PutEntryInHashmap().
MagickExport MagickBooleanType InsertValueInSortedLinkedList | ( | LinkedListInfo * | list_info, |
int(*)(const void *, const void *) | compare, | ||
void ** | replace, | ||
const void * | value | ||
) |
Definition at line 1118 of file hashmap.c.
References AcquireMagickMemory(), _LinkedListInfo::capacity, _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _ElementInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
MagickExport MagickBooleanType IsHashmapEmpty | ( | const HashmapInfo * | hashmap_info | ) |
Definition at line 1205 of file hashmap.c.
References _HashmapInfo::debug, _HashmapInfo::entries, GetMagickModule, IfMagickTrue, IsMagickTrue, LogMagickEvent(), MagickSignature, _HashmapInfo::signature, and TraceEvent.
MagickExport MagickBooleanType IsLinkedListEmpty | ( | const LinkedListInfo * | list_info | ) |
Definition at line 1236 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, IfMagickTrue, IsMagickTrue, LogMagickEvent(), MagickSignature, _LinkedListInfo::signature, and TraceEvent.
Referenced by GetColorCompliance(), GetConfigureInfo(), GetDelegateInfo(), GetLogInfo(), GetMagicInfo(), GetMimeInfo(), GetPolicyInfo(), IsEventLogging(), LoadDelegateLists(), and LoadMimeLists().
MagickExport MagickBooleanType LinkedListToArray | ( | LinkedListInfo * | list_info, |
void ** | array | ||
) |
Definition at line 1271 of file hashmap.c.
References _LinkedListInfo::debug, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _ElementInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
MagickExport HashmapInfo* NewHashmap | ( | const size_t | capacity, |
size_t(*)(const void *) | hash, | ||
MagickBooleanType(*)(const void *, const void *) | compare, | ||
void *(*)(void *) | relinquish_key, | ||
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 1340 of file hashmap.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), AllocateSemaphoreInfo(), _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::debug, _HashmapInfo::entries, _HashmapInfo::hash, HashPointerType(), IsEventLogging(), MagickSignature, _HashmapInfo::map, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, ResetMagickMemory(), ResourceLimitFatalError, _HashmapInfo::semaphore, _HashmapInfo::signature, and ThrowFatalException.
MagickExport LinkedListInfo* NewLinkedList | ( | const size_t | capacity | ) |
Definition at line 1399 of file hashmap.c.
References AcquireMagickMemory(), AllocateSemaphoreInfo(), _LinkedListInfo::capacity, _LinkedListInfo::debug, _LinkedListInfo::elements, _LinkedListInfo::head, MagickFalse, MagickSignature, _LinkedListInfo::next, ResetMagickMemory(), ResourceLimitFatalError, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, and ThrowFatalException.
Referenced by GetConfigureOptions(), GetConfigurePaths(), GetExceptionInfo(), GetLocaleOptions(), IncreaseHashmapCapacity(), LoadColorList(), LoadColorLists(), LoadConfigureList(), LoadConfigureLists(), LoadDelegateList(), LoadLogList(), LoadLogLists(), LoadMagicList(), LoadMagicLists(), LoadMimeList(), LoadPolicyList(), LoadPolicyLists(), and PutEntryInHashmap().
MagickExport MagickBooleanType PutEntryInHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key, | ||
const void * | value | ||
) |
Definition at line 1530 of file hashmap.c.
References AcquireMagickMemory(), _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::debug, _LinkedListInfo::elements, _HashmapInfo::entries, GetMagickModule, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, IfMagickFalse, IfMagickTrue, IncreaseHashmapCapacity(), InsertValueInLinkedList(), _EntryInfo::key, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _HashmapInfo::map, NewLinkedList(), _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishMagickMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* RemoveElementByValueFromLinkedList | ( | LinkedListInfo * | list_info, |
const void * | value | ||
) |
Definition at line 1634 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by GetColorCompliance(), GetConfigureInfo(), GetDelegateInfo(), GetLogInfo(), GetMagicInfo(), GetMimeInfo(), and GetPolicyInfo().
MagickExport void* RemoveElementFromLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index | ||
) |
Definition at line 1708 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by PutEntryInHashmap(), and RemoveEntryFromHashmap().
MagickExport void* RemoveEntryFromHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key | ||
) |
Definition at line 1782 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::debug, _HashmapInfo::entries, GetMagickModule, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, IfMagickTrue, _EntryInfo::key, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::relinquish_key, RelinquishMagickMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* RemoveLastElementFromLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 1871 of file hashmap.c.
References _LinkedListInfo::debug, _LinkedListInfo::elements, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, TraceEvent, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by ClearMagickException().
MagickExport void ResetHashmapIterator | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 1932 of file hashmap.c.
References _HashmapInfo::debug, GetMagickModule, _HashmapInfo::head_of_list, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickSignature, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, and UnlockSemaphoreInfo().
MagickExport void ResetLinkedListIterator | ( | LinkedListInfo * | list_info | ) |
Definition at line 1968 of file hashmap.c.
References _LinkedListInfo::debug, GetMagickModule, _LinkedListInfo::head, IfMagickTrue, LockSemaphoreInfo(), LogMagickEvent(), MagickSignature, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, TraceEvent, and UnlockSemaphoreInfo().
Referenced by CatchException(), GetColorCompliance(), GetColorInfoList(), GetColorList(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), GetLocaleOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMagicInfo(), GetMagicInfoList(), GetMagicList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), InheritException(), IsRightsAuthorized(), and QueryColorname().