MagickCore 7.0.10
locale.c File Reference
#include "wizard/studio.h"
#include "wizard/blob.h"
#include "wizard/client.h"
#include "wizard/configure.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hashmap.h"
#include "wizard/locale_.h"
#include "wizard/log.h"
#include "wizard/memory_.h"
#include "wizard/nt-base.h"
#include "wizard/semaphore.h"
#include "wizard/splay-tree.h"
#include "wizard/string_.h"
#include "wizard/token.h"
#include "wizard/utility.h"
#include "wizard/utility-private.h"
#include "wizard/xml-tree.h"
#include "wizard/xml-tree-private.h"
Include dependency graph for locale.c:

Go to the source code of this file.

Macros

#define LocaleFilename   "locale.xml"
 
#define MaxRecursionDepth   200
 

Functions

static WizardBooleanType IsLocaleTreeInstantiated (ExceptionInfo *)
 
static WizardBooleanType LoadLocaleCache (SplayTreeInfo *, const char *, const char *, const char *, const size_t, ExceptionInfo *)
 
static void * DestroyLocaleNode (void *locale_info)
 
static SplayTreeInfoAcquireLocaleSplayTree (const char *filename, const char *locale, ExceptionInfo *exception)
 
static void * DestroyOptions (void *message)
 
WizardExport LinkedListInfoDestroyLocaleOptions (LinkedListInfo *messages)
 
WizardExport ssize_t FormatLocaleFileList (FILE *file, const char *format, va_list operands)
 
WizardExport ssize_t FormatLocaleFile (FILE *file, const char *format,...)
 
WizardExport ssize_t FormatLocaleStringList (char *string, const size_t length, const char *format, va_list operands)
 
WizardExport ssize_t FormatLocaleString (char *string, const size_t length, const char *format,...)
 
WizardExport const LocaleInfoGetLocaleInfo_ (const char *tag, ExceptionInfo *exception)
 
static int LocaleInfoCompare (const void *x, const void *y)
 
WizardExport const LocaleInfo ** GetLocaleInfoList (const char *pattern, size_t *number_messages, ExceptionInfo *exception)
 
static int LocaleTagCompare (const void *x, const void *y)
 
WizardExport char ** GetLocaleList (const char *pattern, size_t *number_messages, ExceptionInfo *exception)
 
WizardExport const char * GetLocaleMessage (const char *tag)
 
WizardExport LinkedListInfoGetLocaleOptions (const char *filename, ExceptionInfo *exception)
 
WizardExport const char * GetLocaleValue (const LocaleInfo *locale_info)
 
WizardExport double InterpretLocaleValue (const char *string, char **sentinal)
 
WizardExport WizardBooleanType ListLocaleInfo (FILE *file, ExceptionInfo *exception)
 
static void ChopLocaleComponents (char *path, const size_t components)
 
static void LocaleFatalErrorHandler (const ExceptionType wizard_unused(severity), const char *reason, const char *description)
 
WizardExport WizardBooleanType LocaleComponentGenesis (void)
 
WizardExport void LocaleComponentTerminus (void)
 

Variables

static const char * LocaleMap
 
static SemaphoreInfolocale_semaphore = (SemaphoreInfo *) NULL
 
static SplayTreeInfolocale_cache = (SplayTreeInfo *) NULL
 

Macro Definition Documentation

◆ LocaleFilename

#define LocaleFilename   "locale.xml"

Definition at line 68 of file locale.c.

◆ MaxRecursionDepth

#define MaxRecursionDepth   200

Definition at line 69 of file locale.c.

Function Documentation

◆ AcquireLocaleSplayTree()

◆ ChopLocaleComponents()

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

Definition at line 1103 of file locale.c.

Referenced by LoadLocaleCache().

◆ DestroyLocaleNode()

static void * DestroyLocaleNode ( void *  locale_info)
static

◆ DestroyLocaleOptions()

WizardExport LinkedListInfo * DestroyLocaleOptions ( LinkedListInfo messages)

◆ DestroyOptions()

static void * DestroyOptions ( void *  message)
static

Definition at line 287 of file locale.c.

References DestroyStringInfo().

Referenced by DestroyLocaleOptions().

◆ FormatLocaleFile()

WizardExport ssize_t FormatLocaleFile ( FILE *  file,
const char *  format,
  ... 
)

Definition at line 371 of file locale.c.

References FormatLocaleFileList().

Referenced by ListLocaleInfo(), ListLogInfo(), and LocaleFatalErrorHandler().

◆ FormatLocaleFileList()

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

Definition at line 326 of file locale.c.

Referenced by FormatLocaleFile().

◆ FormatLocaleString()

◆ FormatLocaleStringList()

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

Definition at line 416 of file locale.c.

Referenced by FormatLocaleString(), and PrintWizardString().

◆ GetLocaleInfo_()

◆ GetLocaleInfoList()

◆ GetLocaleList()

◆ GetLocaleMessage()

WizardExport const char * GetLocaleMessage ( const char *  tag)

◆ GetLocaleOptions()

◆ GetLocaleValue()

WizardExport const char * GetLocaleValue ( const LocaleInfo locale_info)

◆ InterpretLocaleValue()

WizardExport double InterpretLocaleValue ( const char *  string,
char **  sentinal 
)

Definition at line 969 of file locale.c.

Referenced by InterpretSiPrefixValue(), and StringToDouble().

◆ IsLocaleTreeInstantiated()

◆ ListLocaleInfo()

WizardExport WizardBooleanType ListLocaleInfo ( FILE *  file,
ExceptionInfo exception 
)

◆ LoadLocaleCache()

◆ LocaleComponentGenesis()

WizardExport WizardBooleanType LocaleComponentGenesis ( void  )

Definition at line 1392 of file locale.c.

References AcquireSemaphoreInfo(), locale_semaphore, and WizardTrue.

◆ LocaleComponentTerminus()

◆ LocaleFatalErrorHandler()

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

Definition at line 1126 of file locale.c.

References FormatLocaleFile(), GetClientName(), and wizard_unreferenced.

Referenced by LoadLocaleCache().

◆ LocaleInfoCompare()

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

Definition at line 562 of file locale.c.

References LocaleCompare().

Referenced by GetLocaleInfoList().

◆ LocaleTagCompare()

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

Definition at line 659 of file locale.c.

References LocaleCompare().

Referenced by GetLocaleList().

Variable Documentation

◆ locale_cache

◆ locale_semaphore

◆ LocaleMap

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

Definition at line 75 of file locale.c.

Referenced by AcquireLocaleSplayTree().