MagickCore
7.0.0
|
#include "MagickCore/studio.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/locale_.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 150 of file hashmap.c.
References AcquireMagickMemory(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by AcquireColorCache(), AcquireConfigureCache(), AcquireLogCache(), AcquirePolicyCache(), GetConfigureOptions(), GetConfigurePaths(), GetLocaleOptions(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLogCache(), LoadMimeCache(), LoadPolicyCache(), and ThrowException().
MagickExport void ClearLinkedList | ( | LinkedListInfo * | list_info, |
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 204 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by ClearMagickException(), and DestroyExceptionInfo().
MagickExport MagickBooleanType CompareHashmapString | ( | const void * | target, |
const void * | source | ||
) |
Definition at line 258 of file hashmap.c.
References LocaleCompare(), MagickFalse, and MagickTrue.
MagickExport MagickBooleanType CompareHashmapStringInfo | ( | const void * | target, |
const void * | source | ||
) |
Definition at line 296 of file hashmap.c.
References CompareStringInfo(), MagickFalse, and MagickTrue.
MagickExport HashmapInfo* DestroyHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 330 of file hashmap.c.
References _HashmapInfo::capacity, DestroyLinkedList(), GetNextValueInLinkedList(), _LinkedListInfo::head, _EntryInfo::key, LockSemaphoreInfo(), MagickCoreSignature, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishMagickMemory(), RelinquishSemaphoreInfo(), _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport LinkedListInfo* DestroyLinkedList | ( | LinkedListInfo * | list_info, |
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 398 of file hashmap.c.
References _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, RelinquishMagickMemory(), RelinquishSemaphoreInfo(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, 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 447 of file hashmap.c.
References _LinkedListInfo::elements, LockSemaphoreInfo(), MagickCoreSignature, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by ThrowException().
MagickExport void* GetNextKeyInHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 484 of file hashmap.c.
References _HashmapInfo::capacity, GetNextValueInLinkedList(), _LinkedListInfo::head, _HashmapInfo::head_of_list, _EntryInfo::key, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, and UnlockSemaphoreInfo().
MagickExport void* GetNextValueInHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 545 of file hashmap.c.
References _HashmapInfo::capacity, GetNextValueInLinkedList(), _LinkedListInfo::head, _HashmapInfo::head_of_list, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* GetNextValueInLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 606 of file hashmap.c.
References LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by AcquireCoderCache(), AcquireColorCache(), AcquireConfigureCache(), AcquireDelegateCache(), AcquireLocaleSplayTree(), AcquireLogCache(), AcquireMagicCache(), AcquireMimeCache(), AcquirePolicyCache(), AcquireTypeCache(), CatchException(), DestroyHashmap(), GetColorCompliance(), GetColorInfoList(), GetColorList(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), GetLocaleOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMagicInfo(), GetMagicInfoList(), GetMagickHomeURL(), GetMagicList(), GetMagicPatternExtent(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetNextKeyInHashmap(), GetNextValueInHashmap(), GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), GetThresholdMap(), GetValueFromHashmap(), InheritException(), IsRightsAuthorized(), ListThresholdMaps(), PutEntryInHashmap(), QueryColorname(), and RemoveEntryFromHashmap().
MagickExport size_t GetNumberOfElementsInLinkedList | ( | const LinkedListInfo * | list_info | ) |
Definition at line 679 of file hashmap.c.
References _LinkedListInfo::elements, MagickCoreSignature, and _LinkedListInfo::signature.
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 647 of file hashmap.c.
References _HashmapInfo::entries, MagickCoreSignature, and _HashmapInfo::signature.
MagickExport void* GetValueFromHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key | ||
) |
Definition at line 711 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::compare, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, _EntryInfo::key, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* GetValueFromLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index | ||
) |
Definition at line 788 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by SetLogEventMask(), and SetLogMethod().
MagickExport size_t HashPointerType | ( | const void * | pointer | ) |
Definition at line 848 of file hashmap.c.
Referenced by NewHashmap().
MagickExport size_t HashStringInfoType | ( | const void * | string_info | ) |
Definition at line 937 of file hashmap.c.
References AcquireSignatureInfo(), DestroySignatureInfo(), FinalizeSignature(), GetSignatureDigest(), GetStringInfoDatum(), and UpdateSignature().
MagickExport size_t HashStringType | ( | const void * | string | ) |
Definition at line 884 of file hashmap.c.
References AcquireSignatureInfo(), DestroySignatureInfo(), DestroyStringInfo(), FinalizeSignature(), GetSignatureDigest(), GetStringInfoDatum(), StringToStringInfo(), and UpdateSignature().
|
static |
Definition at line 1411 of file hashmap.c.
References AcquireQuantumMemory(), _HashmapInfo::capacity, _LinkedListInfo::elements, _EntryInfo::hash, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _HashmapInfo::map, MaxCapacities, NewLinkedList(), _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), RelinquishSemaphoreInfo(), 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 990 of file hashmap.c.
References AcquireMagickMemory(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, 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 1091 of file hashmap.c.
References AcquireMagickMemory(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _ElementInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by AcquireMagicCache(), and LoadMagicCache().
MagickExport MagickBooleanType IsHashmapEmpty | ( | const HashmapInfo * | hashmap_info | ) |
Definition at line 1176 of file hashmap.c.
References _HashmapInfo::entries, MagickCoreSignature, MagickFalse, MagickTrue, and _HashmapInfo::signature.
MagickExport MagickBooleanType IsLinkedListEmpty | ( | const LinkedListInfo * | list_info | ) |
Definition at line 1205 of file hashmap.c.
References _LinkedListInfo::elements, MagickCoreSignature, MagickFalse, MagickTrue, and _LinkedListInfo::signature.
Referenced by AcquireDelegateCache(), AcquireMimeCache(), and IsEventLogging().
MagickExport MagickBooleanType LinkedListToArray | ( | LinkedListInfo * | list_info, |
void ** | array | ||
) |
Definition at line 1238 of file hashmap.c.
References _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _ElementInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, 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 1305 of file hashmap.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), AcquireSemaphoreInfo(), _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::entries, _HashmapInfo::hash, HashPointerType(), MagickCoreSignature, _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 1363 of file hashmap.c.
References AcquireMagickMemory(), AcquireSemaphoreInfo(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, MagickCoreSignature, _LinkedListInfo::next, ResetMagickMemory(), ResourceLimitFatalError, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, and ThrowFatalException.
Referenced by AcquireColorCache(), AcquireConfigureCache(), AcquireDelegateCache(), AcquireLogCache(), AcquireMagicCache(), AcquireMimeCache(), AcquirePolicyCache(), GetConfigureOptions(), GetConfigurePaths(), GetLocaleOptions(), IncreaseHashmapCapacity(), InitializeExceptionInfo(), and PutEntryInHashmap().
MagickExport MagickBooleanType PutEntryInHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key, | ||
const void * | value | ||
) |
Definition at line 1495 of file hashmap.c.
References AcquireMagickMemory(), _HashmapInfo::capacity, _HashmapInfo::compare, _LinkedListInfo::elements, _HashmapInfo::entries, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, IncreaseHashmapCapacity(), InsertValueInLinkedList(), _EntryInfo::key, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _HashmapInfo::map, NewLinkedList(), _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishMagickMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* RemoveElementByValueFromLinkedList | ( | LinkedListInfo * | list_info, |
const void * | value | ||
) |
Definition at line 1597 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, 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 1669 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
Referenced by PutEntryInHashmap(), and RemoveEntryFromHashmap().
MagickExport void* RemoveEntryFromHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key | ||
) |
Definition at line 1741 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::entries, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, _EntryInfo::key, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::relinquish_key, RelinquishMagickMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), and _EntryInfo::value.
MagickExport void* RemoveLastElementFromLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 1828 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _ElementInfo::next, _LinkedListInfo::next, RelinquishMagickMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), and _ElementInfo::value.
MagickExport void ResetHashmapIterator | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 1887 of file hashmap.c.
References _HashmapInfo::head_of_list, LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, and UnlockSemaphoreInfo().
MagickExport void ResetLinkedListIterator | ( | LinkedListInfo * | list_info | ) |
Definition at line 1921 of file hashmap.c.
References _LinkedListInfo::head, LockSemaphoreInfo(), MagickCoreSignature, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, and UnlockSemaphoreInfo().
Referenced by CatchException(), GetColorCompliance(), GetColorInfoList(), GetColorList(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), GetLocaleOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMagicInfo(), GetMagicInfoList(), GetMagicList(), GetMagicPatternExtent(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), InheritException(), IsRightsAuthorized(), and QueryColorname().