MagickCore  7.0.0
locale.c File Reference
Include dependency graph for locale.c:

Go to the source code of this file.

Macros

#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 LinkedListInfoDestroyLocaleOptions (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 LocaleInfoGetLocaleInfo_ (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 LinkedListInfoGetLocaleOptions (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
 
static SemaphoreInfolocale_semaphore = (SemaphoreInfo *) NULL
 
static SplayTreeInfolocale_list = (SplayTreeInfo *) NULL
 
static volatile MagickBooleanType instantiate_locale = MagickFalse
 

Macro Definition Documentation

#define LocaleFilename   "locale.xml"

Definition at line 66 of file locale.c.

Referenced by InitializeLocaleList().

#define MaxRecursionDepth   200

Definition at line 67 of file locale.c.

Function Documentation

static void ChopLocaleComponents ( char *  path,
const size_t  components 
)
static

Definition at line 1017 of file locale.c.

Referenced by LoadLocaleList().

static void* DestroyLocaleNode ( void *  locale_info)
static
MagickExport LinkedListInfo* DestroyLocaleOptions ( LinkedListInfo messages)

Definition at line 208 of file locale.c.

References DestroyLinkedList(), DestroyOptions(), GetMagickModule, LogMagickEvent(), and TraceEvent.

Referenced by LoadLocaleLists().

static void* DestroyOptions ( void *  message)
static

Definition at line 203 of file locale.c.

References DestroyStringInfo().

Referenced by DestroyLocaleOptions().

MagickPrivate ssize_t FormatLocaleFileList ( FILE *  file,
const char *restrict  format,
va_list  operands 
)

Definition at line 242 of file locale.c.

MagickExport ssize_t FormatLocaleString ( char *restrict  string,
const size_t  length,
const char *restrict  format,
  ... 
)

Definition at line 382 of file locale.c.

References FormatLocaleStringList().

Referenced by AnnotateImage(), AppendImageFormat(), BlobToImage(), BlurImage(), CanonicalXMLContent(), ClipImagePath(), ClonePixelCacheRepository(), ColorMatrixImage(), ConcatenateColorComponent(), ConcatentateHexColorComponent(), ConnectPixelCacheServer(), DeskewImage(), DestroyPixelCache(), DistortImage(), DistributePixelCacheServer(), DrawClipPath(), DrawImage(), DrawPatternPath(), DrawPrimitive(), EncodePredefinedEntities(), FormatMagickSize(), FormatMagickTime(), FxChannelStatistics(), FxEvaluateSubexpression(), GaussianBlurImage(), GetConfigureOptions(), GetConfigurePaths(), GetExecutionPath(), GetEXIFProperty(), GetLocaleExceptionMessage(), GetLocaleMessage(), GetLocaleOptions(), GetMagickHomeURL(), GetMagickProperty(), GetMagickPropertyLetter(), GetPathTemplate(), IdentifyImage(), ImagesToBlob(), ImageToBlob(), InjectImageBlob(), InterpretImageFilename(), InterpretImageProperties(), InvokeDelegate(), ListMagickResourceInfo(), ListTypeInfo(), LoadTypeLists(), MagickToMime(), MontageImageList(), MorphologyApply(), OpenBlob(), OpenPixelCache(), PolaroidImage(), PreviewImage(), RenderPostscript(), SelectiveBlurImage(), SetImageProfile(), SetImageProgress(), SetPixelCacheExtent(), StringToList(), SyncImageSettings(), ThrowMagickExceptionList(), ThumbnailImage(), TracePSClippath(), TraceSVGClippath(), TranslateEvent(), TranslateFilename(), VignetteImage(), XMLTreeInfoToXML(), and XMLTreeTagToXML().

MagickPrivate ssize_t FormatLocaleStringList ( char *restrict  string,
const size_t  length,
const char *restrict  format,
va_list  operands 
)

Definition at line 333 of file locale.c.

MagickExport const char* GetLocaleMessage ( const char *  tag)
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 MagickBooleanType LoadLocaleLists ( const char *  filename,
const char *  locale,
ExceptionInfo exception 
)
MagickPrivate MagickBooleanType LocaleComponentGenesis ( void  )

Definition at line 1393 of file locale.c.

References AcquireSemaphoreInfo(), locale_semaphore, and MagickTrue.

Referenced by MagickCoreGenesis().

static void LocaleFatalErrorHandler ( const ExceptionType   magick_unusedseverity,
const char *  reason,
const char *  description 
)
static

Definition at line 1055 of file locale.c.

References FormatLocaleFile(), and GetClientName().

Referenced by LoadLocaleList().

static int LocaleInfoCompare ( const void *  x,
const void *  y 
)
static

Definition at line 476 of file locale.c.

References LocaleCompare().

Referenced by GetLocaleInfoList().

static int LocaleTagCompare ( const void *  x,
const void *  y 
)
static

Definition at line 573 of file locale.c.

References LocaleCompare().

Referenced by GetLocaleList().

Variable Documentation

volatile MagickBooleanType instantiate_locale = MagickFalse
static

Definition at line 104 of file locale.c.

Referenced by GetLocaleInfo_(), InitializeLocaleList(), and LocaleComponentTerminus().

SemaphoreInfo* locale_semaphore = (SemaphoreInfo *) NULL
static
const char* LocaleMap
static
Initial value:
=
"<?xml version=\"1.0\"?>"
"<localemap>"
" <locale name=\"C\">"
" <Exception>"
" <Message name=\"\">"
" </Message>"
" </Exception>"
" </locale>"
"</localemap>"

Definition at line 81 of file locale.c.

Referenced by LoadLocaleLists().