MagickCore 6.9.12
|
#include "magick/studio.h"
#include "magick/blob.h"
#include "magick/client.h"
#include "magick/configure.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/hashmap.h"
#include "magick/image-private.h"
#include "magick/locale_.h"
#include "magick/locale-private.h"
#include "magick/log.h"
#include "magick/memory_.h"
#include "magick/nt-base-private.h"
#include "magick/semaphore.h"
#include "magick/splay-tree.h"
#include "magick/string_.h"
#include "magick/token.h"
#include "magick/utility.h"
#include "magick/xml-tree.h"
#include "magick/xml-tree-private.h"
Go to the source code of this file.
Macros | |
#define | LocaleFilename "locale.xml" |
#define | MaxRecursionDepth 200 |
Functions | |
static MagickBooleanType | IsLocaleTreeInstantiated (ExceptionInfo *) |
static MagickBooleanType | LoadLocaleCache (SplayTreeInfo *, const char *, const char *, const char *, const size_t, ExceptionInfo *) |
static void * | DestroyLocaleNode (void *locale_info) |
static SplayTreeInfo * | AcquireLocaleSplayTree (const char *filename, const char *locale, ExceptionInfo *exception) |
static void * | DestroyOptions (void *message) |
MagickExport LinkedListInfo * | DestroyLocaleOptions (LinkedListInfo *messages) |
MagickExport ssize_t | FormatLocaleFileList (FILE *file, const char *magick_restrict format, va_list operands) |
MagickExport ssize_t | FormatLocaleFile (FILE *file, const char *magick_restrict format,...) |
MagickExport ssize_t | FormatLocaleStringList (char *magick_restrict string, const size_t length, const char *magick_restrict format, va_list operands) |
MagickExport ssize_t | FormatLocaleString (char *magick_restrict string, const size_t length, const char *magick_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 *magick_restrict string, char **magick_restrict sentinal) |
MagickExport MagickBooleanType | ListLocaleInfo (FILE *file, ExceptionInfo *exception) |
static void | ChopLocaleComponents (char *path, const size_t components) |
static void | LocaleFatalErrorHandler (const ExceptionType magick_unused(severity), const char *reason, const char *description) |
MagickExport int | LocaleCompare (const char *p, const char *q) |
MagickExport void | LocaleLower (char *string) |
MagickExport int | LocaleLowercase (const int c) |
MagickExport int | LocaleNCompare (const char *p, const char *q, const size_t length) |
MagickExport void | LocaleUpper (char *string) |
MagickExport int | LocaleUppercase (const int c) |
MagickExport MagickBooleanType | LocaleComponentGenesis (void) |
MagickExport void | LocaleComponentTerminus (void) |
Variables | |
static const char * | LocaleMap |
static const unsigned char | AsciiMap [] |
static SemaphoreInfo * | locale_semaphore = (SemaphoreInfo *) NULL |
static SplayTreeInfo * | locale_cache = (SplayTreeInfo *) NULL |
|
static |
Definition at line 215 of file locale.c.
References CompareSplayTreeString(), DestroyLocaleNode(), DestroyLocaleOptions(), GetLocaleOptions(), GetNextValueInLinkedList(), GetNumberOfNodesInSplayTree(), GetStringInfoDatum(), GetStringInfoPath(), LoadLocaleCache(), LocaleMap, MagickTrue, NewSplayTree(), ResourceLimitFatalError, and ThrowFatalException.
Referenced by IsLocaleTreeInstantiated().
|
static |
Definition at line 1140 of file locale.c.
Referenced by LoadLocaleCache().
|
static |
Definition at line 200 of file locale.c.
References DestroyString(), _LocaleInfo::message, _LocaleInfo::path, RelinquishMagickMemory(), and _LocaleInfo::tag.
Referenced by AcquireLocaleSplayTree().
MagickExport LinkedListInfo * DestroyLocaleOptions | ( | LinkedListInfo * | messages | ) |
Definition at line 324 of file locale.c.
References DestroyLinkedList(), DestroyOptions(), GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickFalse, and TraceEvent.
Referenced by AcquireLocaleSplayTree().
|
static |
Definition at line 319 of file locale.c.
References DestroyStringInfo().
Referenced by DestroyLocaleOptions().
MagickExport ssize_t FormatLocaleFile | ( | FILE * | file, |
const char *magick_restrict | format, | ||
... | |||
) |
Definition at line 404 of file locale.c.
References FormatLocaleFileList().
Referenced by AcquireResizeFilter(), AutoThresholdImage(), Classify(), CloseMagickLog(), DefaultErrorHandler(), DefaultFatalErrorHandler(), DefaultWarningHandler(), DestroyLogElement(), DistortImage(), ExternalDelegateCommand(), FxEvaluateSubexpression(), GetNumberColors(), IdentifyImage(), ListCoderInfo(), ListColorInfo(), ListCommandOptions(), ListConfigureInfo(), ListDelegateInfo(), ListLocaleInfo(), ListLogInfo(), ListMagicInfo(), ListMagickInfo(), ListMagickResourceInfo(), ListMagickVersion(), ListMimeInfo(), ListPolicyInfo(), ListThresholdMapFile(), ListThresholdMaps(), ListTypeInfo(), LocaleFatalErrorHandler(), LockSemaphoreInfo(), LogMagickEventList(), MorphologyApply(), OptimizeLayerFrames(), ParseKernelName(), PrintChannelFeatures(), PrintChannelLocations(), PrintChannelMoments(), PrintChannelPerceptualHash(), PrintChannelStatistics(), PrintStringInfo(), RenderPostscript(), ResamplePixelColor(), ScaleGeometryKernelInfo(), ScaleResampleFilter(), ShowKernelInfo(), SparseColorImage(), and UnlockSemaphoreInfo().
MagickExport ssize_t FormatLocaleFileList | ( | FILE * | file, |
const char *magick_restrict | format, | ||
va_list | operands | ||
) |
Definition at line 359 of file locale.c.
Referenced by FormatLocaleFile().
MagickExport ssize_t FormatLocaleString | ( | char *magick_restrict | string, |
const size_t | length, | ||
const char *magick_restrict | format, | ||
... | |||
) |
Definition at line 499 of file locale.c.
References FormatLocaleStringList().
Referenced by AcquireTypeCache(), AnnotateImage(), AppendImageFormat(), AutoThresholdImage(), BlobToImage(), BlurImageChannel(), CannyEdgeImage(), CanonicalXMLContent(), ClipImagePath(), ClonePixelCacheRepository(), ColorMatrixImage(), ConcatenateColorComponent(), ConcatentateHexColorComponent(), ConnectPixelCacheServer(), DeleteMagickRegistry(), DeskewImage(), DestroyPixelCache(), DistortImage(), DistributePixelCacheServer(), DrawPatternPath(), DrawPrimitive(), EncodePredefinedEntities(), FilterImageChannel(), FormatMagickSize(), FormatMagickTime(), FormatPixelSize(), FxChannelStatistics(), GaussianBlurImageChannel(), GetConfigureBlob(), GetConfigureOptions(), GetConfigurePaths(), GetExecutionPath(), GetEXIFProperty(), GetImageProperty(), GetLocaleExceptionMessage(), GetLocaleMessage(), GetLocaleOptions(), GetMagickHomeURL(), GetMagickProperty(), GetMagickPropertyLetter(), GetMagickRegistry(), GetPageGeometry(), GetPathTemplate(), HoughLineImage(), IdentifyImage(), ImagesToBlob(), ImageToBlob(), InjectImageBlob(), InterpretImageFilename(), InterpretImageProperties(), InvokeDelegate(), ListMagickResourceInfo(), ListTypeInfo(), MagickToMime(), MontageImageList(), MorphologyApply(), OpenBlob(), OpenPixelCache(), PingBlob(), PolaroidImage(), PreviewImage(), RenderMVGContent(), RenderPostscript(), SelectiveBlurImageChannel(), SetImageProgress(), SetMagickRegistry(), SetPixelCacheExtent(), StringToStrings(), SyncImageSettings(), ThrowMagickExceptionList(), ThumbnailImage(), TraceBezierCurve(), TracePSClippath(), TraceSVGClippath(), TranslateEvent(), TranslateFilename(), VignetteImage(), XMLTreeInfoToXML(), and XMLTreeTagToXML().
MagickExport ssize_t FormatLocaleStringList | ( | char *magick_restrict | string, |
const size_t | length, | ||
const char *magick_restrict | format, | ||
va_list | operands | ||
) |
Definition at line 450 of file locale.c.
Referenced by FormatImageAttribute(), FormatImageProperty(), FormatLocaleString(), and FormatString().
MagickExport const LocaleInfo * GetLocaleInfo_ | ( | const char * | tag, |
ExceptionInfo * | exception | ||
) |
Definition at line 540 of file locale.c.
References GetNextValueInSplayTree(), GetValueFromSplayTree(), IsLocaleTreeInstantiated(), locale_cache, locale_semaphore, LocaleCompare(), LockSemaphoreInfo(), MagickFalse, ResetSplayTreeIterator(), and UnlockSemaphoreInfo().
Referenced by GetLocaleInfoList(), GetLocaleList(), and GetLocaleMessage().
MagickExport const LocaleInfo ** GetLocaleInfoList | ( | const char * | pattern, |
size_t * | number_messages, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 613 of file locale.c.
References AcquireQuantumMemory(), GetLocaleInfo_(), GetMagickModule, GetNextValueInSplayTree(), GetNumberOfNodesInSplayTree(), GlobExpression(), IsEventLogging(), locale_cache, locale_semaphore, LocaleInfoCompare(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickTrue, ResetSplayTreeIterator(), _LocaleInfo::stealth, _LocaleInfo::tag, TraceEvent, and UnlockSemaphoreInfo().
Referenced by ListLocaleInfo().
MagickExport char ** GetLocaleList | ( | const char * | pattern, |
size_t * | number_messages, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 709 of file locale.c.
References AcquireQuantumMemory(), ConstantString(), GetLocaleInfo_(), GetMagickModule, GetNextValueInSplayTree(), GetNumberOfNodesInSplayTree(), GlobExpression(), IsEventLogging(), locale_cache, locale_semaphore, LocaleTagCompare(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickTrue, _LocaleInfo::stealth, _LocaleInfo::tag, TraceEvent, and UnlockSemaphoreInfo().
MagickExport const char * GetLocaleMessage | ( | const char * | tag | ) |
Definition at line 775 of file locale.c.
References AcquireExceptionInfo(), DestroyExceptionInfo(), FormatLocaleString(), GetLocaleInfo_(), MaxTextExtent, and _LocaleInfo::message.
Referenced by GetLocaleExceptionMessage().
MagickExport LinkedListInfo * GetLocaleOptions | ( | const char * | filename, |
ExceptionInfo * | exception | ||
) |
Definition at line 823 of file locale.c.
References AcquireStringInfo(), AppendValueToLinkedList(), ConfigureFileToStringInfo(), CopyMagickString(), DestroyLinkedList(), FormatLocaleString(), GetConfigurePaths(), GetMagickModule, GetNextValueInLinkedList(), IsEventLogging(), LocaleEvent, LogMagickEvent(), MagickFalse, MaxTextExtent, NewLinkedList(), RelinquishMagickMemory(), ResetLinkedListIterator(), SetStringInfoDatum(), SetStringInfoLength(), SetStringInfoPath(), and TraceEvent.
Referenced by AcquireLocaleSplayTree().
MagickExport const char * GetLocaleValue | ( | const LocaleInfo * | locale_info | ) |
Definition at line 908 of file locale.c.
References GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _LocaleInfo::message, _LocaleInfo::signature, and TraceEvent.
MagickExport double InterpretLocaleValue | ( | const char *magick_restrict | string, |
char **magick_restrict | sentinal | ||
) |
Definition at line 1006 of file locale.c.
Referenced by GetDrawValue(), InterpretSiPrefixValue(), StringToDouble(), and StringToDoubleInterval().
|
static |
Definition at line 940 of file locale.c.
References AcquireLocaleSplayTree(), ActivateSemaphoreInfo(), ConstantString(), DestroyString(), GetEnvironmentValue(), locale_cache, locale_semaphore, LocaleFilename, LockSemaphoreInfo(), MagickFalse, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetLocaleInfo_().
MagickExport MagickBooleanType ListLocaleInfo | ( | FILE * | file, |
ExceptionInfo * | exception | ||
) |
Definition at line 1061 of file locale.c.
References FormatLocaleFile(), GetLocaleInfoList(), LocaleCompare(), MagickFalse, MagickTrue, _LocaleInfo::path, and RelinquishMagickMemory().
static MagickBooleanType LoadLocaleCache | ( | SplayTreeInfo * | cache, |
const char * | xml, | ||
const char * | filename, | ||
const char * | locale, | ||
const size_t | depth, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1179 of file locale.c.
References AcquireMagickMemory(), AcquireString(), AddValueToSplayTree(), ChopLocaleComponents(), ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, FileToXML(), GetMagickModule, GetNextToken(), GetPathComponent(), HeadPath, LoadLocaleCache(), LocaleCompare(), LocaleFatalErrorHandler(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickMin, MagickTrue, MaxTextExtent, _LocaleInfo::message, _LocaleInfo::path, RelinquishMagickMemory(), ResourceLimitError, ResourceLimitFatalError, SetFatalErrorHandler(), _LocaleInfo::signature, _LocaleInfo::tag, ThrowFatalException, and ThrowMagickException().
Referenced by AcquireLocaleSplayTree(), and LoadLocaleCache().
MagickExport int LocaleCompare | ( | const char * | p, |
const char * | q | ||
) |
Definition at line 1441 of file locale.c.
References AsciiMap.
Referenced by AcquireStreamPixels(), AcquireVirtualMemory(), AppendImageFormat(), CoderCompare(), CoderInfoCompare(), ColorCompare(), ColorInfoCompare(), CompareHashmapString(), CompareSplayTreeString(), ConfigureCompare(), ConfigureInfoCompare(), DelegateCompare(), DelegateInfoCompare(), DeleteImageProfile(), DrawPrimitive(), ExpandFilenames(), ExportCharPixel(), ExportDoublePixel(), ExportFloatPixel(), ExportIntegerPixel(), ExportLongPixel(), ExportQuantumPixel(), ExportShortPixel(), FileCompare(), FileToBlob(), FileToImage(), FileToXML(), FxEvaluateSubexpression(), FxGetSymbol(), Get8BIMProperty(), GetCoderInfo(), GetColorCompliance(), GetCommandOptionFlags(), GetConfigureInfo(), GetDelegateInfo(), GetEXIFProperty(), GetLocaleInfo_(), GetLogInfo(), GetMagickInfo(), GetMagickProperty(), GetMVGMacros(), GetPathComponent(), GetPolicyInfo(), GetQuantumInfo(), GetThresholdMapFile(), GetTypeInfo(), GetTypeInfoByFamily(), GlobExpression(), GradientImage(), HuffmanEncodeImage(), IdentifyImage(), ImageToFile(), ImportCharPixel(), ImportDoublePixel(), ImportFloatPixel(), ImportIntegerPixel(), ImportLongPixel(), ImportQuantumPixel(), ImportShortPixel(), InvokeDelegate(), InvokeDynamicImageFilter(), IsMagickTrue(), IsOptionMember(), IsPathAccessible(), IsSkipTag(), IsStringNotFalse(), IsStringTrue(), IsTaintImage(), ListCoderInfo(), ListColorInfo(), ListConfigureInfo(), ListDelegateInfo(), ListFiles(), ListLocaleInfo(), ListLogInfo(), ListMagicInfo(), ListPolicyInfo(), ListTypeInfo(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMagicCache(), LoadPolicyCache(), LoadTypeCache(), LocaleInfoCompare(), LocaleTagCompare(), LogCompare(), LogInfoCompare(), MagicCompare(), MagicInfoCompare(), MagickCompare(), MagickInfoCompare(), MontageImageList(), OpenBlob(), OpenPixelCache(), ParseCommandOption(), ParseKernelArray(), PingImages(), ProfileImage(), QueryMagickColorCompliance(), RandomChannelThresholdImage(), ReadImage(), ReadImages(), RegisterStaticModule(), RemoveImageProfile(), RenderMVGContent(), RenderType(), SetImageInfo(), SetImageOption(), SetImageProfileInternal(), SetImageProperty(), StreamImagePixels(), ThrowException(), ThumbnailImage(), TranslateEvent(), TypeCompare(), TypeInfoCompare(), UnregisterMagickInfo(), UnregisterStaticModule(), WriteImage(), and WriteTo8BimProfile().
MagickExport MagickBooleanType LocaleComponentGenesis | ( | void | ) |
Definition at line 1685 of file locale.c.
References AllocateSemaphoreInfo(), locale_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
MagickExport void LocaleComponentTerminus | ( | void | ) |
Definition at line 1713 of file locale.c.
References ActivateSemaphoreInfo(), DestroySemaphoreInfo(), DestroySplayTree(), locale_cache, locale_semaphore, LockSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
|
static |
Definition at line 1163 of file locale.c.
References FormatLocaleFile(), GetClientName(), and magick_unreferenced.
Referenced by LoadLocaleCache().
|
static |
Definition at line 596 of file locale.c.
References LocaleCompare().
Referenced by GetLocaleInfoList().
MagickExport void LocaleLower | ( | char * | string | ) |
Definition at line 1496 of file locale.c.
References LocaleToLowercase().
Referenced by GetColorTuple(), GetMagickProperty(), MagickToMime(), QueryMagickColorCompliance(), SetImageProfileInternal(), and ThumbnailImage().
MagickExport int LocaleLowercase | ( | const int | c | ) |
Definition at line 1528 of file locale.c.
References LocaleToLowercase().
MagickExport int LocaleNCompare | ( | const char * | p, |
const char * | q, | ||
const size_t | length | ||
) |
Definition at line 1570 of file locale.c.
References AsciiMap.
Referenced by DrawPrimitive(), FxChannelStatistics(), FxEvaluateSubexpression(), FxGetSymbol(), FxOperatorPrecedence(), GetGeometry(), GetImageProperty(), GetMagickProperty(), GetNextToken(), GetPageGeometry(), GetProfilesFromResourceBlock(), InterpretDelegateProperties(), InterpretImageFilename(), InterpretImageProperties(), IsFxFunction(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadLogCache(), LoadMagicCache(), LoadPolicyCache(), LoadTypeCache(), OpenBlob(), ParseCSSColor(), ParseGeometry(), ParseLogHandlers(), QueryMagickColorCompliance(), ReadInlineImage(), and WriteTo8BimProfile().
|
static |
MagickExport void LocaleUpper | ( | char * | string | ) |
Definition at line 1630 of file locale.c.
References LocaleToUppercase().
Referenced by InvokeDelegate(), and SetImageInfo().
MagickExport int LocaleUppercase | ( | const int | c | ) |
Definition at line 1662 of file locale.c.
References LocaleToUppercase().
|
static |
Definition at line 92 of file locale.c.
Referenced by LocaleCompare(), and LocaleNCompare().
|
static |
Definition at line 123 of file locale.c.
Referenced by GetLocaleInfo_(), GetLocaleInfoList(), GetLocaleList(), IsLocaleTreeInstantiated(), and LocaleComponentTerminus().
|
static |
Definition at line 120 of file locale.c.
Referenced by GetLocaleInfo_(), GetLocaleInfoList(), GetLocaleList(), IsLocaleTreeInstantiated(), LocaleComponentGenesis(), and LocaleComponentTerminus().
|
static |
Definition at line 76 of file locale.c.
Referenced by AcquireLocaleSplayTree().