65 #define ConfigureFilename "configure.xml" 93 #if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 134 (void) memset(configure_info,0,
sizeof(*configure_info));
137 configure_info->
path=(
char *) path;
138 configure_info->
name=(
char *) name;
139 configure_info->
value=(
char *) value;
147 configure_info->
exempt=exempt;
166 #if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 265 if (p->
value != (
char *) NULL)
267 if (p->
name != (
char *) NULL)
269 if (p->
path != (
char *) NULL)
273 return((
void *) NULL);
367 if ((name == (
const char *) NULL) || (
LocaleCompare(name,
"*") == 0))
415 #if defined(__cplusplus) || defined(c_plusplus) 432 #if defined(__cplusplus) || defined(c_plusplus) 451 assert(pattern != (
char *) NULL);
452 assert(number_options != (
size_t *) NULL);
479 *number_options=(size_t) i;
512 #if defined(__cplusplus) || defined(c_plusplus) 527 #if defined(__cplusplus) || defined(c_plusplus) 546 assert(pattern != (
char *) NULL);
547 assert(number_options != (
size_t *) NULL);
553 return((
char **) NULL);
556 if (options == (
char **) NULL)
557 return((
char **) NULL);
570 options[i]=(
char *) NULL;
571 *number_options=(size_t) i;
608 assert(option != (
const char *) NULL);
615 return((
char *) NULL);
617 if ((value == (
const char *) NULL) || (*value ==
'\0'))
618 return((
char *) NULL);
664 assert(filename != (
const char *) NULL);
678 while (element != (
const char *) NULL)
683 "Searching for configure file: \"%s\"",path);
691 #if defined(MAGICKCORE_WINDOWS_SUPPORT) 697 blob=(
char *) NTResourceToBlob(filename);
698 if (blob != (
char *) NULL)
710 "UnableToOpenConfigureFile",
"`%s'",filename);
744 #define RegistryKey "ConfigurePath" 745 #define MagickCoreDLL "CORE_RL_MagickCore_.dll" 746 #define MagickCoreDebugDLL "CORE_DB_MagickCore_.dll" 754 assert(filename != (
const char *) NULL);
768 if (configure_path != (
char *) NULL)
774 for (p=configure_path-1; p != (
char *) NULL; )
778 if (q != (
char *) NULL)
780 q=path+strlen(path)-1;
790 #if defined(MAGICKCORE_INSTALLED_SUPPORT) 791 #if defined(MAGICKCORE_SHARE_PATH) 794 #if defined(MAGICKCORE_SHAREARCH_PATH) 796 MAGICKCORE_SHAREARCH_PATH));
798 #if defined(MAGICKCORE_CONFIGURE_PATH) 802 #if defined(MAGICKCORE_DOCUMENTATION_PATH) 806 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !(defined(MAGICKCORE_CONFIGURE_PATH) || defined(MAGICKCORE_SHARE_PATH)) 815 if (key_value != (
unsigned char *) NULL)
833 if (home != (
char *) NULL)
835 #if !defined(MAGICKCORE_POSIX_SUPPORT) || defined( __VMS ) 847 MAGICKCORE_SHAREARCH_PATH);
855 #if !defined(MAGICKCORE_POSIX_SUPPORT) || defined( __VMS ) 875 MAGICKCORE_SHAREARCH_PATH);
889 #if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__MINGW32__) 890 if (home == (
char *) NULL)
892 if (home == (
char *) NULL)
894 if (home == (
char *) NULL)
897 if (home != (
char *) NULL)
908 if (home != (
char *) NULL)
920 #if defined(MAGICKCORE_WINDOWS_SUPPORT) 937 if (key_value == (
unsigned char *) NULL)
942 if (NTGetModulePath(
"Magick.dll",module_path) !=
MagickFalse)
951 "\\inc\\lib\\auto\\Image\\Magick\\");
958 "no configuration paths found",
"`%s'",filename);
990 return(configure_info->
value);
1074 if (file == (
const FILE *) NULL)
1079 path=(
const char *) NULL;
1080 for (i=0; i < (ssize_t) number_options; i++)
1084 if ((path == (
const char *) NULL) ||
1087 if (configure_info[i]->path != (
char *) NULL)
1089 configure_info[i]->path);
1092 "-------------------------------------------------" 1093 "------------------------------\n");
1095 path=configure_info[i]->
path;
1097 if (configure_info[i]->name != (
char *) NULL)
1098 name=configure_info[i]->name;
1100 for (j=(ssize_t) strlen(name); j <= 20; j++)
1104 if (configure_info[i]->value != (
char *) NULL)
1105 value=configure_info[i]->value;
1109 (void) fflush(file);
1115 #if !MAGICKCORE_ZERO_CONFIGURATION_SUPPORT 1148 const char *xml,
const char *filename,
const size_t depth,
1171 "Loading configure file \"%s\" ...",filename);
1176 for (q=(
char *) xml; *q !=
'\0'; )
1208 while (((*token !=
'/') && (*(token+1) !=
'>')) && (*q !=
'\0'))
1235 if (file_xml != (
char *) NULL)
1252 sizeof(*configure_info));
1253 (void) memset(configure_info,0,
sizeof(*configure_info));
1268 configure_info->
name);
1275 (void)
GetNextToken(q,(
const char **) NULL,extent,token);
#define MagickMaxRecursionDepth
#define MAGICKCORE_CONFIGURE_PATH
MagickExport const char * GetMagickDelegates(void)
MagickExport size_t ConcatenateMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
MagickExport void SetStringInfoPath(StringInfo *string_info, const char *path)
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
#define MAGICKCORE_CONFIGURE_RELATIVE_PATH
MagickExport void ResetLinkedListIterator(LinkedListInfo *list_info)
MagickExport LinkedListInfo * DestroyLinkedList(LinkedListInfo *list_info, void *(*relinquish_value)(void *))
MagickExport SemaphoreInfo * AcquireSemaphoreInfo(void)
MagickExport MagickBooleanType InsertValueInLinkedList(LinkedListInfo *list_info, const size_t index, const void *value)
MagickExport ExceptionInfo * AcquireExceptionInfo(void)
MagickExport MagickBooleanType AppendValueToLinkedList(LinkedListInfo *list_info, const void *value)
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
MagickExport void * RemoveElementByValueFromLinkedList(LinkedListInfo *list_info, const void *value)
MagickExport const char * GetMagickFeatures(void)
MagickExport MagickBooleanType AcquireUniqueFilename(char *path)
MagickExport void * GetNextValueInLinkedList(LinkedListInfo *list_info)
#define MAGICKCORE_SHARE_PATH
#define MagickCoreSignature
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
#define MAGICKCORE_SHARE_RELATIVE_PATH
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
#define DirectorySeparator
unsigned int MagickStatusType
MagickExport char * AcquireString(const char *source)
MagickExport MagickBooleanType GlobExpression(const char *magick_restrict expression, const char *magick_restrict pattern, const MagickBooleanType case_insensitive)
MagickExport void * AcquireCriticalMemory(const size_t size)
MagickExport StringInfo * DestroyStringInfo(StringInfo *string_info)
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
MagickExport int LocaleNCompare(const char *p, const char *q, const size_t length)
MagickExport magick_hot_spot size_t GetNextToken(const char *magick_restrict start, const char **magick_restrict end, const size_t extent, char *magick_restrict token)
MagickExport const char * GetMagickQuantumDepth(size_t *depth)
MagickExport MagickBooleanType IsStringTrue(const char *value)
MagickExport MagickBooleanType IsEventLogging(void)
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
MagickExport char * GetEnvironmentValue(const char *name)
MagickExport StringInfo * ConfigureFileToStringInfo(const char *filename)
MagickExport LinkedListInfo * NewLinkedList(const size_t capacity)
MagickExport StringInfo * AcquireStringInfo(const size_t length)
MagickExport int LocaleCompare(const char *p, const char *q)
#define GetMagickModule()
MagickExport const char * GetStringInfoPath(const StringInfo *string_info)
MagickExport void SetStringInfoLength(StringInfo *string_info, const size_t length)
MagickExport char * DestroyString(char *string)
MagickExport void * AcquireMagickMemory(const size_t size)
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
MagickExport size_t GetNumberOfElementsInLinkedList(const LinkedListInfo *list_info)
MagickExport void * RelinquishMagickMemory(void *memory)
#define magick_unreferenced(x)
MagickPrivate void ChopPathComponents(char *, const size_t)
#define MAGICKCORE_DOCUMENTATION_PATH
MagickPrivate char * FileToXML(const char *, const size_t)
MagickExport void RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
MagickExport char * ConstantString(const char *source)
#define DirectoryListSeparator
MagickExport void SetStringInfoDatum(StringInfo *string_info, const unsigned char *source)
MagickExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *exception)
MagickExport const char * GetClientPath(void)