61#define ConfigureFilename "configure.xml"
79 {
"NAME",
"ImageMagick" }
158 sizeof(*configure_info));
162 "memory allocation failed `%s'",strerror(errno));
165 (void) memset(configure_info,0,
sizeof(*configure_info));
166 configure_info->
path=(
char *)
"[built-in]";
167 configure_info->
name=(
char *) p->
name;
174 "memory allocation failed `%s'",strerror(errno));
246 if (p->
value != (
char *) NULL)
248 if (p->
name != (
char *) NULL)
250 if (p->
path != (
char *) NULL)
254 return((
void *) NULL);
348 if ((name == (
const char *) NULL) || (strcasecmp(name,
"*") == 0))
355 if (strcasecmp(name,p->
name) == 0)
361 "no such configure list `%s'",name);
399#if defined(__cplusplus) || defined(c_plusplus)
411 if (strcasecmp((*p)->path,(*q)->path) == 0)
412 return(strcasecmp((*p)->name,(*q)->name));
413 return(strcasecmp((*p)->path,(*q)->path));
416#if defined(__cplusplus) || defined(c_plusplus)
435 assert(pattern != (
char *) NULL);
437 assert(number_options != (
size_t *) NULL);
462 *number_options=(size_t) i;
495#if defined(__cplusplus) || defined(c_plusplus)
507 return(strcasecmp(*p,*q));
510#if defined(__cplusplus) || defined(c_plusplus)
529 assert(pattern != (
char *) NULL);
531 assert(number_options != (
size_t *) NULL);
535 return((
char **) NULL);
540 if (options == (
char **) NULL)
541 return((
char **) NULL);
554 options[i]=(
char *) NULL;
555 *number_options=(size_t) i;
601 assert(filename != (
const char *) NULL);
614 while (element != (
const char *) NULL)
618 "Searching for configure file: \"%s\"",path);
626#if defined(WIZARDSTOOLKIT_WINDOWS_SUPPORT)
631 blob=(
char *) NTResourceToBlob(filename);
632 if (blob != (
char *) NULL)
644 "unable to open configure file `%s'",filename);
678#define RegistryKey "ConfigurePath"
679#define WizardsToolkitDLL "Wizard's Toolkit.dll"
687 assert(filename != (
const char *) NULL);
706 if (configure_path != (
char *) NULL)
708 for (p=configure_path-1; p != (
char *) NULL; )
712 if (q != (
char *) NULL)
714 q=path+strlen(path)-1;
724#if defined(WIZARDSTOOLKIT_INSTALLED_SUPPORT)
725#if defined(WIZARDSTOOLKIT_CONFIGURE_PATH)
729#if defined(WIZARDSTOOLKIT_SHARE_PATH)
733#if defined(WIZARDSTOOLKIT_SHAREARCH_PATH)
735 WIZARDSTOOLKIT_SHAREARCH_PATH));
737#if defined(WIZARDSTOOLKIT_DOCUMENTATION_PATH)
741#if defined(WIZARDSTOOLKIT_SHARE_PATH)
745#if defined(WIZARDSTOOLKIT_WINDOWS_SUPPORT) && !(defined(WIZARDSTOOLKIT_CONFIGURE_PATH) || defined(WIZARDSTOOLKIT_SHARE_PATH))
754 if (key_value != (
unsigned char *) NULL)
772 if (home != (
char *) NULL)
774#if !defined(WIZARDSTOOLKIT_POSIX_SUPPORT)
787 WIZARDSTOOLKIT_SHAREARCH_PATH);
795#if !defined(WIZARDSTOOLKIT_POSIX_SUPPORT)
815 WIZARDSTOOLKIT_SHAREARCH_PATH);
829 if (home == (
char *) NULL)
831 if (home == (
char *) NULL)
833 if (home == (
char *) NULL)
835 if (home != (
char *) NULL)
847 if (home != (
char *) NULL)
859#if defined(WIZARDSTOOLKIT_WINDOWS_SUPPORT)
875 if (key_value == (
unsigned char *) NULL)
912 return(configure_info->
value);
996 if (file == (FILE *) NULL)
1001 path=(
const char *) NULL;
1002 for (i=0; i < (ssize_t) number_options; i++)
1006 if ((path == (
const char *) NULL) ||
1007 (strcasecmp(path,configure_info[i]->path) != 0))
1009 if (configure_info[i]->path != (
char *) NULL)
1010 (
void) fprintf(file,
"\nPath: %s\n\n",configure_info[i]->path);
1011 (void) fprintf(file,
"Name Value\n");
1012 (void) fprintf(file,
"-------------------------------------------------"
1013 "------------------------------\n");
1015 path=configure_info[i]->
path;
1017 if (configure_info[i]->name != (
char *) NULL)
1018 name=configure_info[i]->name;
1019 (void) fprintf(file,
"%s",name);
1020 for (j=(ssize_t) strlen(name); j <= 12; j++)
1021 (
void) fprintf(file,
" ");
1022 (void) fprintf(file,
" ");
1024 if (configure_info[i]->value != (
char *) NULL)
1025 value=configure_info[i]->value;
1026 (void) fprintf(file,
"%s",value);
1027 (void) fprintf(file,
"\n");
1029 (void) fflush(file);
1067 const char *xml,
const char *filename,
const size_t depth,
1088 "Loading configure map \"%s\" ...",filename);
1089 if (xml == (
const char *) NULL)
1102 if (attribute != (
const char *) NULL)
1106 ConfigureError,
"include element nested too deeply `%s'",filename);
1136 sizeof(*configure_info));
1139 (void) memset(configure_info,0,
sizeof(*configure_info));
1144 if (attribute != (
const char *) NULL)
1147 if (attribute != (
const char *) NULL)
1150 if (attribute != (
const char *) NULL)
WizardExport const char * GetClientPath(void)
#define ThrowFatalException(severity, tag)
WizardExport WizardBooleanType ThrowWizardException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *format,...)
WizardExport void ResetLinkedListIterator(LinkedListInfo *list_info)
WizardExport size_t GetNumberOfElementsInLinkedList(const LinkedListInfo *list_info)
WizardExport WizardBooleanType AppendValueToLinkedList(LinkedListInfo *list_info, const void *value)
WizardExport WizardBooleanType InsertValueInLinkedList(LinkedListInfo *list_info, const size_t index, const void *value)
WizardExport void * RemoveElementByValueFromLinkedList(LinkedListInfo *list_info, const void *value)
WizardExport LinkedListInfo * NewLinkedList(const size_t capacity)
WizardExport void * GetNextValueInLinkedList(LinkedListInfo *list_info)
WizardExport LinkedListInfo * DestroyLinkedList(LinkedListInfo *list_info, void *(*relinquish_value)(void *))
WizardExport ssize_t FormatLocaleString(char *string, const size_t length, const char *format,...)
WizardBooleanType LogWizardEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
#define GetWizardModule()
WizardExport void * AcquireWizardMemory(const size_t size)
WizardExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
WizardExport void * RelinquishWizardMemory(void *memory)
WizardExport void RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
WizardExport SemaphoreInfo * AcquireSemaphoreInfo(void)
WizardExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
WizardExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
WizardExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
WizardExport void SetStringInfoLength(StringInfo *string_info, const size_t length)
WizardExport char * DestroyString(char *string)
WizardExport void SetStringInfoPath(StringInfo *string_info, const char *path)
WizardExport char * ConstantString(const char *source)
WizardExport size_t ConcatenateWizardString(char *destination, const char *source, const size_t length)
WizardExport StringInfo * AcquireStringInfo(const size_t length)
WizardExport StringInfo * ConfigureFileToStringInfo(const char *filename)
WizardExport char * AcquireString(const char *source)
WizardExport void SetStringInfoDatum(StringInfo *string_info, const unsigned char *source)
WizardExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
WizardExport char * GetEnvironmentValue(const char *name)
WizardExport size_t CopyWizardString(char *destination, const char *source, const size_t length)
WizardExport const char * GetStringInfoPath(const StringInfo *string_info)
WizardExport StringInfo * DestroyStringInfo(StringInfo *string_info)
#define DirectorySeparator
#define DirectoryListSeparator
WizardExport WizardBooleanType GlobExpression(const char *expression, const char *pattern, const WizardBooleanType case_insensitive)
WizardExport void ChopPathComponents(char *, const size_t)
WizardExport WizardBooleanType IsWizardTrue(const char *value)
WizardExport void GetPathComponent(const char *path, PathType type, char *component)
#define WIZARDSTOOLKIT_SHARE_RELATIVE_PATH
#define WIZARDSTOOLKIT_DOCUMENTATION_PATH
#define WIZARDSTOOLKIT_CONFIGURE_RELATIVE_PATH
#define WIZARDSTOOLKIT_CONFIGURE_PATH
#define WIZARDSTOOLKIT_SHARE_PATH
unsigned int WizardStatusType
WizardPrivate char * FileToXML(const char *, const size_t)
WizardExport XMLTreeInfo * DestroyXMLTree(XMLTreeInfo *xml_info)
WizardExport const char * GetXMLTreeAttribute(XMLTreeInfo *xml_info, const char *tag)
WizardExport XMLTreeInfo * NewXMLTree(const char *xml, ExceptionInfo *exception)
WizardExport XMLTreeInfo * GetNextXMLTreeTag(XMLTreeInfo *xml_info)
WizardExport XMLTreeInfo * GetXMLTreeChild(XMLTreeInfo *xml_info, const char *tag)