|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/blob.h"#include "MagickCore/client.h"#include "MagickCore/configure.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/hashmap.h"#include "MagickCore/locale_.h"#include "MagickCore/locale-private.h"#include "MagickCore/log.h"#include "MagickCore/memory_.h"#include "MagickCore/semaphore.h"#include "MagickCore/splay-tree.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/token.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.h"#include "MagickCore/xml-tree.h"
Go to the source code of this file.
Defines | |
| #define | LocaleFilename "locale.xml" |
| #define | MaxRecursionDepth 200 |
Functions | |
| static MagickBooleanType | InitializeLocaleList (ExceptionInfo *) |
| static MagickBooleanType | LoadLocaleLists (const char *, const char *, ExceptionInfo *) |
| static void * | DestroyOptions (void *message) |
| MagickExport LinkedListInfo * | DestroyLocaleOptions (LinkedListInfo *messages) |
| MagickPrivate ssize_t | FormatLocaleFileList (FILE *file, const char *restrict format, va_list operands) |
| MagickExport ssize_t | FormatLocaleFile (FILE *file, const char *restrict format,...) |
| MagickPrivate ssize_t | FormatLocaleStringList (char *restrict string, const size_t length, const char *restrict format, va_list operands) |
| MagickExport ssize_t | FormatLocaleString (char *restrict string, const size_t length, const char *restrict format,...) |
| MagickExport const LocaleInfo * | GetLocaleInfo_ (const char *tag, ExceptionInfo *exception) |
| static int | LocaleInfoCompare (const void *x, const void *y) |
| MagickExport const LocaleInfo ** | GetLocaleInfoList (const char *pattern, size_t *number_messages, ExceptionInfo *exception) |
| static int | LocaleTagCompare (const void *x, const void *y) |
| MagickExport char ** | GetLocaleList (const char *pattern, size_t *number_messages, ExceptionInfo *exception) |
| MagickExport const char * | GetLocaleMessage (const char *tag) |
| MagickExport LinkedListInfo * | GetLocaleOptions (const char *filename, ExceptionInfo *exception) |
| MagickExport const char * | GetLocaleValue (const LocaleInfo *locale_info) |
| MagickExport double | InterpretLocaleValue (const char *restrict string, char **restrict sentinal) |
| MagickExport MagickBooleanType | ListLocaleInfo (FILE *file, ExceptionInfo *exception) |
| static void | ChopLocaleComponents (char *path, const size_t components) |
| static void * | DestroyLocaleNode (void *locale_info) |
| static void | LocaleFatalErrorHandler (const ExceptionType magick_unused(severity), const char *reason, const char *description) |
| static MagickBooleanType | LoadLocaleList (const char *xml, const char *filename, const char *locale, const size_t depth, ExceptionInfo *exception) |
| MagickPrivate MagickBooleanType | LocaleComponentGenesis (void) |
| MagickPrivate void | LocaleComponentTerminus (void) |
Variables | |
| static const char * | LocaleMap = "</localemap>" |
| static SemaphoreInfo * | locale_semaphore = (SemaphoreInfo *) NULL |
| static SplayTreeInfo * | locale_list = (SplayTreeInfo *) NULL |
| static volatile MagickBooleanType | instantiate_locale = MagickFalse |
| #define LocaleFilename "locale.xml" |
Definition at line 65 of file locale.c.
Referenced by InitializeLocaleList().
| static void ChopLocaleComponents | ( | char * | path, |
| const size_t | components | ||
| ) | [static] |
Definition at line 1015 of file locale.c.
Referenced by LoadLocaleList().
| static void* DestroyLocaleNode | ( | void * | locale_info | ) | [static] |
Definition at line 1038 of file locale.c.
References _LocaleInfo::path, DestroyString(), _LocaleInfo::tag, _LocaleInfo::message, and RelinquishMagickMemory().
Referenced by LoadLocaleList().
| MagickExport LinkedListInfo* DestroyLocaleOptions | ( | LinkedListInfo * | messages | ) |
Definition at line 206 of file locale.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, DestroyLinkedList(), and DestroyOptions().
Referenced by LoadLocaleLists().
| static void* DestroyOptions | ( | void * | message | ) | [static] |
Definition at line 201 of file locale.c.
References DestroyStringInfo().
Referenced by DestroyLocaleOptions().
| MagickExport ssize_t FormatLocaleFile | ( | FILE * | file, |
| const char *restrict | format, | ||
| ... | |||
| ) |
Definition at line 285 of file locale.c.
References FormatLocaleFileList().
Referenced by RenderPostscript(), ListCoderInfo(), ListColorInfo(), ListConfigureInfo(), ListDelegateInfo(), DistortImage(), SparseColorImage(), TracePath(), DefaultErrorHandler(), DefaultFatalErrorHandler(), DefaultWarningHandler(), FxEvaluateSubexpression(), GetNumberColors(), PrintChannelFeatures(), PrintChannelStatistics(), IdentifyImage(), OptimizeLayerFrames(), ListLocaleInfo(), LocaleFatalErrorHandler(), CloseMagickLog(), ListLogInfo(), DestroyLogElement(), LogMagickEventList(), ListMagicInfo(), ListMagickInfo(), ListMimeInfo(), ParseKernelName(), AcquireKernelInfo(), MorphologyApply(), ScaleGeometryKernelInfo(), ShowKernelInfo(), ListCommandOptions(), ListPolicyInfo(), ResamplePixelColor(), ScaleResampleFilter(), AcquireResizeFilter(), ListMagickResourceInfo(), Classify(), LockSemaphoreInfo(), UnlockSemaphoreInfo(), PrintStringInfo(), ListThresholdMapFile(), ListThresholdMaps(), ListTypeInfo(), and SystemCommand().
| MagickPrivate ssize_t FormatLocaleFileList | ( | FILE * | file, |
| const char *restrict | format, | ||
| va_list | operands | ||
| ) |
| MagickExport ssize_t FormatLocaleString | ( | char *restrict | string, |
| const size_t | length, | ||
| const char *restrict | format, | ||
| ... | |||
| ) |
Definition at line 380 of file locale.c.
References FormatLocaleStringList().
Referenced by AnnotateImage(), RenderPostscript(), BlobToImage(), ImageToBlob(), ImagesToBlob(), InjectImageBlob(), OpenBlob(), DestroyPixelCache(), ExtendCache(), OpenPixelCache(), ConcatenateColorComponent(), ConcatentateHexColorComponent(), GetConfigureOptions(), GetConfigurePaths(), InvokeDelegate(), DistortImage(), DrawClipPath(), DrawImage(), DrawPatternPath(), DrawPrimitive(), BlurImage(), ConvolveImage(), PreviewImage(), SelectiveBlurImage(), GetLocaleExceptionMessage(), ThrowMagickExceptionList(), ColorMatrixImage(), FxChannelStatistics(), FxEvaluateSubexpression(), PolaroidImage(), VignetteImage(), IdentifyImage(), ClipImagePath(), InterpretImageFilename(), SyncImageSettings(), GetLocaleMessage(), GetLocaleOptions(), TranslateEvent(), TranslateFilename(), MagickToMime(), SetImageProgress(), MontageImageList(), MorphologyApply(), SetImageProfile(), GetEXIFProperty(), TracePSClippath(), TraceSVGClippath(), GetImageProperty(), GetMagickProperty(), InterpretImageProperties(), ThumbnailImage(), GetPathTemplate(), ListMagickResourceInfo(), FormatMagickSize(), FormatMagickTime(), StringToList(), ListTypeInfo(), LoadTypeLists(), AppendImageFormat(), GetExecutionPath(), GetMagickHomeURL(), CanonicalXMLContent(), EncodePredefinedEntities(), XMLTreeTagToXML(), and XMLTreeInfoToXML().
| MagickPrivate ssize_t FormatLocaleStringList | ( | char *restrict | string, |
| const size_t | length, | ||
| const char *restrict | format, | ||
| va_list | operands | ||
| ) |
| MagickExport const LocaleInfo* GetLocaleInfo_ | ( | const char * | tag, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 421 of file locale.c.
References locale_list, instantiate_locale, MagickFalse, InitializeLocaleList(), GetNumberOfNodesInSplayTree(), LocaleCompare(), ResetSplayTreeIterator(), GetNextValueInSplayTree(), and GetValueFromSplayTree().
Referenced by GetLocaleInfoList(), GetLocaleList(), and GetLocaleMessage().
| MagickExport const LocaleInfo** GetLocaleInfoList | ( | const char * | pattern, |
| size_t * | number_messages, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 491 of file locale.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetLocaleInfo_(), AcquireQuantumMemory(), GetNumberOfNodesInSplayTree(), locale_list, LockSemaphoreInfo(), locale_semaphore, ResetSplayTreeIterator(), GetNextValueInSplayTree(), _LocaleInfo::stealth, MagickFalse, GlobExpression(), _LocaleInfo::tag, MagickTrue, UnlockSemaphoreInfo(), and LocaleInfoCompare().
Referenced by ListLocaleInfo().
| MagickExport char** GetLocaleList | ( | const char * | pattern, |
| size_t * | number_messages, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 586 of file locale.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetLocaleInfo_(), AcquireQuantumMemory(), GetNumberOfNodesInSplayTree(), locale_list, LockSemaphoreInfo(), locale_semaphore, GetNextValueInSplayTree(), _LocaleInfo::stealth, MagickFalse, GlobExpression(), _LocaleInfo::tag, MagickTrue, ConstantString(), UnlockSemaphoreInfo(), and LocaleTagCompare().
| MagickExport const char* GetLocaleMessage | ( | const char * | tag | ) |
Definition at line 651 of file locale.c.
References MaxTextExtent, AcquireExceptionInfo(), FormatLocaleString(), GetLocaleInfo_(), DestroyExceptionInfo(), and _LocaleInfo::message.
Referenced by GetLocaleExceptionMessage().
| MagickExport LinkedListInfo* GetLocaleOptions | ( | const char * | filename, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 699 of file locale.c.
References MaxTextExtent, LogMagickEvent(), TraceEvent, GetMagickModule, CopyMagickString(), NewLinkedList(), GetConfigurePaths(), ResetLinkedListIterator(), GetNextValueInLinkedList(), FormatLocaleString(), LocaleEvent, ConfigureFileToStringInfo(), AppendValueToLinkedList(), DestroyLinkedList(), RelinquishMagickMemory(), AcquireStringInfo(), SetStringInfoLength(), SetStringInfoDatum(), and SetStringInfoPath().
Referenced by LoadLocaleLists().
| MagickExport const char* GetLocaleValue | ( | const LocaleInfo * | locale_info | ) |
Definition at line 782 of file locale.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, _LocaleInfo::signature, MagickSignature, and _LocaleInfo::message.
| static MagickBooleanType InitializeLocaleList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 812 of file locale.c.
References locale_list, instantiate_locale, MagickFalse, locale_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), ConstantString(), GetEnvironmentValue(), LoadLocaleLists(), LocaleFilename, DestroyString(), MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetLocaleInfo_().
| MagickExport double InterpretLocaleValue | ( | const char *restrict | string, |
| char **restrict | sentinal | ||
| ) |
Definition at line 881 of file locale.c.
Referenced by StringToDouble(), StringToDoubleInterval(), and InterpretSiPrefixValue().
| MagickExport MagickBooleanType ListLocaleInfo | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 936 of file locale.c.
References GetLocaleInfoList(), MagickFalse, LocaleCompare(), FormatLocaleFile(), _LocaleInfo::path, RelinquishMagickMemory(), and MagickTrue.
| static MagickBooleanType LoadLocaleList | ( | const char * | xml, |
| const char * | filename, | ||
| const char * | locale, | ||
| const size_t | depth, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1068 of file locale.c.
References MaxTextExtent, LogMagickEvent(), ConfigureEvent, GetMagickModule, MagickFalse, locale_list, NewSplayTree(), CompareSplayTreeString(), DestroyLocaleNode(), MagickTrue, SetFatalErrorHandler(), LocaleFatalErrorHandler(), AcquireString(), GetMagickToken(), CopyMagickString(), LocaleNCompare(), LocaleCompare(), ThrowMagickException(), ConfigureError, GetPathComponent(), HeadPath, ConcatenateMagickString(), DirectorySeparator, FileToString(), RelinquishMagickMemory(), ChopLocaleComponents(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), _LocaleInfo::path, ConstantString(), _LocaleInfo::tag, _LocaleInfo::message, _LocaleInfo::signature, MagickSignature, AddValueToSplayTree(), and ResourceLimitError.
Referenced by LoadLocaleLists().
| static MagickBooleanType LoadLocaleLists | ( | const char * | filename, |
| const char * | locale, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1328 of file locale.c.
References LoadLocaleList(), LocaleMap, MagickFalse, GetLocaleOptions(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), DestroyLocaleOptions(), locale_list, GetNumberOfNodesInSplayTree(), and MagickTrue.
Referenced by InitializeLocaleList().
| MagickPrivate MagickBooleanType LocaleComponentGenesis | ( | void | ) |
Definition at line 1391 of file locale.c.
References AcquireSemaphoreInfo(), locale_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickPrivate void LocaleComponentTerminus | ( | void | ) |
Definition at line 1415 of file locale.c.
References locale_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), instantiate_locale, MagickFalse, UnlockSemaphoreInfo(), and DestroySemaphoreInfo().
Referenced by MagickCoreTerminus().
| static void LocaleFatalErrorHandler | ( | const ExceptionType | magick_unusedseverity, |
| const char * | reason, | ||
| const char * | description | ||
| ) | [static] |
Definition at line 1053 of file locale.c.
References FormatLocaleFile(), and GetClientName().
Referenced by LoadLocaleList().
| static int LocaleInfoCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
Definition at line 474 of file locale.c.
References LocaleCompare().
Referenced by GetLocaleInfoList().
| static int LocaleTagCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
volatile MagickBooleanType instantiate_locale = MagickFalse [static] |
Definition at line 102 of file locale.c.
Referenced by GetLocaleInfo_(), InitializeLocaleList(), and LocaleComponentTerminus().
SplayTreeInfo* locale_list = (SplayTreeInfo *) NULL [static] |
Definition at line 94 of file locale.c.
Referenced by GetLocaleInfo_(), GetLocaleInfoList(), GetLocaleList(), InitializeLocaleList(), LoadLocaleList(), and LoadLocaleLists().
SemaphoreInfo* locale_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 91 of file locale.c.
Referenced by GetLocaleInfoList(), GetLocaleList(), InitializeLocaleList(), LocaleComponentGenesis(), and LocaleComponentTerminus().
const char* LocaleMap = "</localemap>" [static] |
Definition at line 79 of file locale.c.
Referenced by LoadLocaleLists().