Data Structures | Defines | Typedefs | Functions | Variables

# configure.c File Reference

`#include "wizard/studio.h"`
`#include "wizard/blob.h"`
`#include "wizard/client.h"`
`#include "wizard/configure.h"`
`#include "wizard/exception.h"`
`#include "wizard/exception-private.h"`
`#include "wizard/hashmap.h"`
`#include "wizard/log.h"`
`#include "wizard/memory_.h"`
`#include "wizard/semaphore.h"`
`#include "wizard/string_.h"`
`#include "wizard/token.h"`
`#include "wizard/utility.h"`
`#include "wizard/xml-tree.h"`

## Data Structures
struct | _ConfigureMapInfo
## Defines
#define | ConfigureFilename "configure.xml"
## Typedefs
typedef struct _ConfigureMapInfo | ConfigureMapInfo
## Functions
static WizardBooleanType | InitializeConfigureList (ExceptionInfo *)
static WizardBooleanType | LoadConfigureLists (const char *, ExceptionInfo *)
WizardExport WizardBooleanType | ConfigureComponentGenesis (void)
static void * | DestroyConfigureElement (void *configure_info)
WizardExport void | ConfigureComponentTerminus (void)
static void * | DestroyOptions (void *option)
WizardExport LinkedListInfo * | DestroyConfigureOptions (LinkedListInfo *options)
WizardExport const ConfigureInfo * | GetConfigureInfo (const char *name, ExceptionInfo *exception)
static int | ConfigureInfoCompare (const void *x, const void *y)
WizardExport const ConfigureInfo ** | GetConfigureInfoList (const char *pattern, size_t *number_options, ExceptionInfo *exception)
static int | ConfigureCompare (const void *x, const void *y)
WizardExport char ** | GetConfigureList (const char *pattern, size_t *number_options, ExceptionInfo *exception)
WizardExport LinkedListInfo * | GetConfigureOptions (const char *filename, ExceptionInfo *exception)
WizardExport LinkedListInfo * | GetConfigurePaths (const char *filename, ExceptionInfo *exception)
WizardExport const char * | GetConfigureValue (const ConfigureInfo *configure_info)
WizardExport WizardBooleanType | ListConfigureInfo (FILE *file, ExceptionInfo *exception)
static WizardBooleanType | LoadConfigureList (const char *xml, const char *filename, const size_t depth, ExceptionInfo *exception)
## Variables
static const ConfigureMapInfo | ConfigureMap []
static LinkedListInfo * | configure_list = (LinkedListInfo *) NULL
static SemaphoreInfo * | configure_semaphore = (SemaphoreInfo *) NULL
static volatile WizardBooleanType | instantiate_configure = WizardFalse

## Define Documentation

#define ConfigureFilename "configure.xml"

Referenced by InitializeConfigureList().

## Typedef Documentation

typedef struct _ConfigureMapInfo ConfigureMapInfo

## Function Documentation

static int ConfigureCompare | ( | const void * | x,
|  | const void * | y |
| ) |  |  | `[static]`

References strcasecmp.

Referenced by GetConfigureList().

WizardExport WizardBooleanType ConfigureComponentGenesis | ( | void |  | ) |

References AcquireSemaphoreInfo(), configure_semaphore, and WizardTrue.

Referenced by WizardsToolkitGenesis().

WizardExport void ConfigureComponentTerminus | ( | void |  | ) |

References AcquireSemaphoreInfo(), configure_list, configure_semaphore, DestroyConfigureElement(), DestroyLinkedList(), DestroySemaphoreInfo(), instantiate_configure, LockSemaphoreInfo(), and UnlockSemaphoreInfo().

static int ConfigureInfoCompare | ( | const void * | x,
|  | const void * | y |
| ) |  |  | `[static]`

References strcasecmp.

Referenced by GetConfigureInfoList().

static void* DestroyConfigureElement | ( | void * | configure_info | ) | `[static]`

References _ConfigureInfo::exempt, _ConfigureInfo::name, _ConfigureInfo::path, RelinquishWizardMemory(), _ConfigureInfo::value, and WizardFalse.

Referenced by ConfigureComponentTerminus().

WizardExport LinkedListInfo* DestroyConfigureOptions | ( | LinkedListInfo * | options | ) |

References DestroyLinkedList(), DestroyOptions(), GetWizardModule, LogWizardEvent(), and TraceEvent.

Referenced by LoadConfigureLists(), LoadLogLists(), and LoadMimeLists().

static void* DestroyOptions | ( | void * | option | ) | `[static]`

References DestroyStringInfo().

Referenced by DestroyConfigureOptions().

WizardExport const ConfigureInfo* GetConfigureInfo | ( | const char * | name,
|  | ExceptionInfo * | exception |
| ) |  |  |

References configure_list, configure_semaphore, GetNextValueInLinkedList(), GetValueFromLinkedList(), GetWizardModule, InitializeConfigureList(), InsertValueInLinkedList(), instantiate_configure, IsLinkedListEmpty(), LockSemaphoreInfo(), _ConfigureInfo::name, OptionWarning, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), strcasecmp, ThrowWizardException(), UnlockSemaphoreInfo(), and WizardFalse.

Referenced by GetConfigureInfoList(), and GetConfigureList().

WizardExport const ConfigureInfo** GetConfigureInfoList | ( | const char * | pattern,
|  | size_t * | number_options,
|  | ExceptionInfo * | exception |
| ) |  |  |

References AcquireQuantumMemory(), configure_list, configure_semaphore, ConfigureInfoCompare(), GetConfigureInfo(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetWizardModule, GlobExpression(), LockSemaphoreInfo(), LogWizardEvent(), _ConfigureInfo::name, ResetLinkedListIterator(), _ConfigureInfo::stealth, TraceEvent, UnlockSemaphoreInfo(), and WizardFalse.

Referenced by ListConfigureInfo().

WizardExport char** GetConfigureList | ( | const char * | pattern,
|  | size_t * | number_options,
|  | ExceptionInfo * | exception |
| ) |  |  |

References AcquireQuantumMemory(), configure_list, configure_semaphore, ConfigureCompare(), ConstantString(), GetConfigureInfo(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetWizardModule, GlobExpression(), LockSemaphoreInfo(), LogWizardEvent(), _ConfigureInfo::name, ResetLinkedListIterator(), _ConfigureInfo::stealth, TraceEvent, UnlockSemaphoreInfo(), and WizardFalse.

WizardExport LinkedListInfo* GetConfigureOptions | ( | const char * | filename,
|  | ExceptionInfo * | exception |
| ) |  |  |

References AppendValueToLinkedList(), ConfigureEvent, ConfigureFileToStringInfo(), ConfigureWarning, CopyWizardString(), DestroyLinkedList(), FormatWizardString(), GetConfigurePaths(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetWizardModule, LogWizardEvent(), MaxTextExtent, NewLinkedList(), NTResourceToBlob(), RelinquishWizardMemory(), ResetLinkedListIterator(), SetStringInfoPath(), StringToStringInfo(), ThrowWizardException(), and TraceEvent.

Referenced by LoadConfigureLists(), LoadLogLists(), and LoadMimeLists().

WizardExport LinkedListInfo* GetConfigurePaths | ( | const char * | filename,
|  | ExceptionInfo * | exception |
| ) |  |  |

References AcquireString(), AppendValueToLinkedList(), ChopPathComponents(), ConcatenateWizardString(), ConstantString(), CopyWizardString(), DirectoryListSeparator, DirectorySeparator, FormatWizardString(), GetClientPath(), GetEnvironmentValue(), GetWizardModule, LogWizardEvent(), MaxTextExtent, NewLinkedList(), NTGetModulePath(), NTRegistryKeyLookup(), RelinquishWizardMemory(), RemoveElementByValueFromLinkedList(), TraceEvent, WIZARDSTOOLKIT_CONFIGURE_PATH, WIZARDSTOOLKIT_CONFIGURE_RELATIVE_PATH, WIZARDSTOOLKIT_DOCUMENTATION_PATH, WIZARDSTOOLKIT_SHARE_CONFIGURE_PATH, WIZARDSTOOLKIT_SHARE_CONFIGURE_RELATIVE_PATH, and WIZARDSTOOLKIT_SHARE_PATH.

Referenced by GetConfigureOptions().

WizardExport const char* GetConfigureValue | ( | const ConfigureInfo * | configure_info | ) |

References GetWizardModule, LogWizardEvent(), _ConfigureInfo::signature, TraceEvent, _ConfigureInfo::value, and WizardSignature.

static WizardBooleanType InitializeConfigureList | ( | ExceptionInfo * | exception | ) | `[static]`

References AcquireSemaphoreInfo(), configure_list, configure_semaphore, ConfigureFilename, instantiate_configure, LoadConfigureLists(), LockSemaphoreInfo(), UnlockSemaphoreInfo(), WizardFalse, and WizardTrue.

Referenced by GetConfigureInfo().

WizardExport WizardBooleanType ListConfigureInfo | ( | FILE * | file,
|  | ExceptionInfo * | exception |
| ) |  |  |

References GetConfigureInfoList(), _ConfigureInfo::path, RelinquishWizardMemory(), strcasecmp, WizardFalse, and WizardTrue.

static WizardBooleanType LoadConfigureList | ( | const char * | xml,
|  | const char * | filename,
|  | const size_t | depth,
|  | ExceptionInfo * | exception |
| ) |  |  | `[static]`

References AcquireWizardMemory(), AppendValueToLinkedList(), ConcatenateWizardString(), configure_list, ConfigureEvent, ConstantString(), DestroyXMLTree(), DirectorySeparator, _ConfigureInfo::exempt, FileToString(), GetNextXMLTreeTag(), GetPathComponent(), GetWizardModule, GetXMLTreeAttribute(), GetXMLTreeChild(), HeadPath, IsWizardTrue(), LogWizardEvent(), MaxTextExtent, _ConfigureInfo::name, NewLinkedList(), NewXMLTree(), _ConfigureInfo::path, RelinquishWizardMemory(), ResetWizardMemory(), ResourceFatalError, _ConfigureInfo::signature, _ConfigureInfo::stealth, ThrowFatalException, ThrowWizardException(), _ConfigureInfo::value, and WizardFalse.

Referenced by LoadConfigureLists().

static WizardBooleanType LoadConfigureLists | ( | const char * | filename,
|  | ExceptionInfo * | exception |
| ) |  |  |

References AcquireWizardMemory(), AppendValueToLinkedList(), configure_list, ConfigureMap, CopyWizardString(), DestroyConfigureOptions(), _ConfigureInfo::exempt, FileError, GetConfigureOptions(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), GetWizardModule, LoadConfigureList(), _ConfigureMapInfo::name, _ConfigureInfo::name, NewLinkedList(), _ConfigureInfo::path, ResetWizardMemory(), _ConfigureInfo::signature, ThrowFileException, ThrowWizardException(), _ConfigureMapInfo::value, _ConfigureInfo::value, WizardFalse, and WizardTrue.

Referenced by InitializeConfigureList().

## Variable Documentation

LinkedListInfo* configure_list = (LinkedListInfo *) NULL`[static]`

Referenced by ConfigureComponentTerminus(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), InitializeConfigureList(), LoadConfigureList(), and LoadConfigureLists().

SemaphoreInfo* configure_semaphore = (SemaphoreInfo *) NULL`[static]`

Referenced by ConfigureComponentGenesis(), ConfigureComponentTerminus(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), and InitializeConfigureList().

const ConfigureMapInfo ConfigureMap[]`[static]`

Initial value:

      {
        { "NAME", "ImageMagick" }
      }

Referenced by LoadConfigureLists().

volatile WizardBooleanType instantiate_configure = WizardFalse`[static]`

Referenced by ConfigureComponentTerminus(), GetConfigureInfo(), and InitializeConfigureList().