MagickCore 7.0.10
|
#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hash.h"
#include "wizard/hashmap.h"
#include "wizard/memory_.h"
#include "wizard/semaphore.h"
#include "wizard/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 |
typedef struct _ElementInfo ElementInfo |
typedef struct _EntryInfo EntryInfo |
WizardExport WizardBooleanType AppendValueToLinkedList | ( | LinkedListInfo * | list_info, |
const void * | value | ||
) |
Definition at line 149 of file hashmap.c.
References AcquireWizardMemory(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, WizardFalse, WizardSignature, and WizardTrue.
Referenced by AcquireConfigureCache(), AcquireLogCache(), GetConfigureOptions(), GetConfigurePaths(), GetLocaleOptions(), LoadConfigureCache(), LoadLogCache(), LoadMimeCache(), and ThrowException().
WizardExport void ClearLinkedList | ( | LinkedListInfo * | list_info, |
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 203 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
WizardExport WizardBooleanType CompareHashmapString | ( | const void * | target, |
const void * | source | ||
) |
Definition at line 257 of file hashmap.c.
References WizardFalse, and WizardTrue.
WizardExport WizardBooleanType CompareHashmapStringInfo | ( | const void * | target, |
const void * | source | ||
) |
Definition at line 295 of file hashmap.c.
References CompareStringInfo(), WizardFalse, and WizardTrue.
WizardExport HashmapInfo * DestroyHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 329 of file hashmap.c.
References _HashmapInfo::capacity, DestroyLinkedList(), GetNextValueInLinkedList(), _LinkedListInfo::head, _EntryInfo::key, LockSemaphoreInfo(), _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishSemaphoreInfo(), RelinquishWizardMemory(), _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), _EntryInfo::value, and WizardSignature.
WizardExport LinkedListInfo * DestroyLinkedList | ( | LinkedListInfo * | list_info, |
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 397 of file hashmap.c.
References _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, RelinquishSemaphoreInfo(), RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by ConfigureComponentTerminus(), DestroyConfigureOptions(), DestroyExceptionInfo(), DestroyHashmap(), DestroyLocaleOptions(), GetConfigureOptions(), GetLocaleOptions(), LogComponentTerminus(), and MimeComponentTerminus().
WizardExport void * GetLastValueInLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 446 of file hashmap.c.
References _LinkedListInfo::elements, LockSemaphoreInfo(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by ThrowException().
WizardExport void * GetNextKeyInHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 483 of file hashmap.c.
References _HashmapInfo::capacity, GetNextValueInLinkedList(), _LinkedListInfo::head, _HashmapInfo::head_of_list, _EntryInfo::key, LockSemaphoreInfo(), _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), WizardFalse, WizardSignature, and WizardTrue.
WizardExport void * GetNextValueInHashmap | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 544 of file hashmap.c.
References _HashmapInfo::capacity, GetNextValueInLinkedList(), _LinkedListInfo::head, _HashmapInfo::head_of_list, LockSemaphoreInfo(), _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), _EntryInfo::value, WizardFalse, WizardSignature, and WizardTrue.
WizardExport void * GetNextValueInLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 605 of file hashmap.c.
References LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by AcquireConfigureCache(), AcquireLocaleSplayTree(), AcquireLogCache(), AcquireMimeCache(), CatchException(), DestroyHashmap(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetLocaleOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetNextKeyInHashmap(), GetNextValueInHashmap(), GetValueFromHashmap(), InheritException(), PutEntryInHashmap(), and RemoveEntryFromHashmap().
WizardExport size_t GetNumberOfElementsInLinkedList | ( | const LinkedListInfo * | list_info | ) |
Definition at line 678 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::signature, and WizardSignature.
Referenced by GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetLogInfoList(), GetLogList(), GetMimeInfoList(), and GetMimeList().
WizardExport size_t GetNumberOfEntriesInHashmap | ( | const HashmapInfo * | hashmap_info | ) |
Definition at line 646 of file hashmap.c.
References _HashmapInfo::entries, _HashmapInfo::signature, and WizardSignature.
WizardExport void * GetValueFromHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key | ||
) |
Definition at line 710 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::compare, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, _EntryInfo::key, LockSemaphoreInfo(), _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), _EntryInfo::value, WizardSignature, and WizardTrue.
WizardExport void * GetValueFromLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index | ||
) |
Definition at line 787 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by SetLogEventMask().
WizardExport size_t HashPointerType | ( | const void * | pointer | ) |
Definition at line 847 of file hashmap.c.
Referenced by NewHashmap().
WizardExport size_t HashStringInfoType | ( | const void * | string | ) |
Definition at line 941 of file hashmap.c.
References GetStringInfoDatum(), and GetStringInfoLength().
WizardExport size_t HashStringType | ( | const void * | string | ) |
Definition at line 883 of file hashmap.c.
References AcquireHashInfo(), CRC64Hash, DestroyHashInfo(), FinalizeHash(), GetHashDigest(), GetStringInfoDatum(), GetStringInfoLength(), InitializeHash(), StringToStringInfo(), and UpdateHash().
|
static |
Definition at line 1410 of file hashmap.c.
References AcquireQuantumMemory(), _HashmapInfo::capacity, _LinkedListInfo::elements, _EntryInfo::hash, _LinkedListInfo::head, LockSemaphoreInfo(), _HashmapInfo::map, MaxCapacities, NewLinkedList(), _ElementInfo::next, _LinkedListInfo::next, RelinquishSemaphoreInfo(), RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), _ElementInfo::value, WizardFalse, and WizardTrue.
Referenced by PutEntryInHashmap().
WizardExport WizardBooleanType InsertValueInLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index, | ||
const void * | value | ||
) |
Definition at line 991 of file hashmap.c.
References AcquireWizardMemory(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, WizardFalse, WizardSignature, and WizardTrue.
Referenced by GetConfigureInfo(), GetLogInfo(), GetMimeInfo(), and PutEntryInHashmap().
WizardExport WizardBooleanType InsertValueInSortedLinkedList | ( | LinkedListInfo * | list_info, |
int(*)(const void *, const void *) | compare, | ||
void ** | replace, | ||
const void * | value | ||
) |
Definition at line 1092 of file hashmap.c.
References AcquireWizardMemory(), _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, WizardFalse, WizardSignature, and WizardTrue.
WizardExport WizardBooleanType IsHashmapEmpty | ( | const HashmapInfo * | hashmap_info | ) |
Definition at line 1177 of file hashmap.c.
References _HashmapInfo::entries, _HashmapInfo::signature, WizardFalse, WizardSignature, and WizardTrue.
WizardExport WizardBooleanType IsLinkedListEmpty | ( | const LinkedListInfo * | list_info | ) |
Definition at line 1206 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::signature, WizardFalse, WizardSignature, and WizardTrue.
Referenced by AcquireMimeCache(), and IsEventLogging().
WizardExport WizardBooleanType LinkedListToArray | ( | LinkedListInfo * | list_info, |
void ** | array | ||
) |
Definition at line 1239 of file hashmap.c.
References _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), _ElementInfo::value, WizardFalse, WizardSignature, and WizardTrue.
WizardExport HashmapInfo * NewHashmap | ( | const size_t | capacity, |
size_t(*)(const void *) | hash, | ||
WizardBooleanType(*)(const void *, const void *) | compare, | ||
void *(*)(void *) | relinquish_key, | ||
void *(*)(void *) | relinquish_value | ||
) |
Definition at line 1306 of file hashmap.c.
References AcquireQuantumMemory(), AcquireSemaphoreInfo(), AcquireWizardMemory(), CacheDomain, _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::entries, _HashmapInfo::hash, HashPointerType(), _HashmapInfo::map, MemoryError, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, _HashmapInfo::semaphore, _HashmapInfo::signature, ThrowWizardFatalError, and WizardSignature.
WizardExport LinkedListInfo * NewLinkedList | ( | const size_t | capacity | ) |
Definition at line 1362 of file hashmap.c.
References AcquireSemaphoreInfo(), AcquireWizardMemory(), CacheDomain, _LinkedListInfo::capacity, _LinkedListInfo::elements, _LinkedListInfo::head, MemoryError, _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, ThrowWizardFatalError, and WizardSignature.
Referenced by AcquireConfigureCache(), AcquireLogCache(), AcquireMimeCache(), GetConfigureOptions(), GetConfigurePaths(), GetExceptionInfo(), GetLocaleOptions(), IncreaseHashmapCapacity(), and PutEntryInHashmap().
WizardExport WizardBooleanType PutEntryInHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key, | ||
const void * | value | ||
) |
Definition at line 1493 of file hashmap.c.
References AcquireWizardMemory(), _HashmapInfo::capacity, _HashmapInfo::compare, _LinkedListInfo::elements, _HashmapInfo::entries, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, IncreaseHashmapCapacity(), InsertValueInLinkedList(), _EntryInfo::key, LockSemaphoreInfo(), _HashmapInfo::map, NewLinkedList(), _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishWizardMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), _EntryInfo::value, WizardFalse, WizardSignature, and WizardTrue.
WizardExport void * RemoveElementByValueFromLinkedList | ( | LinkedListInfo * | list_info, |
const void * | value | ||
) |
Definition at line 1595 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by GetConfigureInfo(), GetLogInfo(), and GetMimeInfo().
WizardExport void * RemoveElementFromLinkedList | ( | LinkedListInfo * | list_info, |
const size_t | index | ||
) |
Definition at line 1667 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by PutEntryInHashmap(), and RemoveEntryFromHashmap().
WizardExport void * RemoveEntryFromHashmap | ( | HashmapInfo * | hashmap_info, |
const void * | key | ||
) |
Definition at line 1739 of file hashmap.c.
References _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::entries, GetNextValueInLinkedList(), _EntryInfo::hash, _HashmapInfo::hash, _LinkedListInfo::head, _EntryInfo::key, LockSemaphoreInfo(), _HashmapInfo::map, _LinkedListInfo::next, _HashmapInfo::relinquish_key, RelinquishWizardMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), _EntryInfo::value, WizardSignature, and WizardTrue.
WizardExport void * RemoveLastElementFromLinkedList | ( | LinkedListInfo * | list_info | ) |
Definition at line 1826 of file hashmap.c.
References _LinkedListInfo::elements, _LinkedListInfo::head, LockSemaphoreInfo(), _ElementInfo::next, _LinkedListInfo::next, RelinquishWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, UnlockSemaphoreInfo(), _ElementInfo::value, and WizardSignature.
Referenced by ClearWizardException().
WizardExport void ResetHashmapIterator | ( | HashmapInfo * | hashmap_info | ) |
Definition at line 1885 of file hashmap.c.
References _HashmapInfo::head_of_list, LockSemaphoreInfo(), _HashmapInfo::next, _HashmapInfo::semaphore, _HashmapInfo::signature, UnlockSemaphoreInfo(), WizardFalse, and WizardSignature.
WizardExport void ResetLinkedListIterator | ( | LinkedListInfo * | list_info | ) |
Definition at line 1919 of file hashmap.c.
References _LinkedListInfo::head, LockSemaphoreInfo(), _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, UnlockSemaphoreInfo(), and WizardSignature.
Referenced by CatchException(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetLocaleOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), and InheritException().