MagickCore 7.0.10
|
#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"
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 SplayTreeInfo * | AcquireLocaleSplayTree (const char *filename, const char *locale, ExceptionInfo *exception) |
static void * | DestroyOptions (void *message) |
WizardExport LinkedListInfo * | DestroyLocaleOptions (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 LocaleInfo * | GetLocaleInfo_ (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 LinkedListInfo * | GetLocaleOptions (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 SemaphoreInfo * | locale_semaphore = (SemaphoreInfo *) NULL |
static SplayTreeInfo * | locale_cache = (SplayTreeInfo *) NULL |
|
static |
Definition at line 182 of file locale.c.
References CompareSplayTreeString(), DestroyLocaleNode(), DestroyLocaleOptions(), GetLocaleOptions(), GetNextValueInLinkedList(), GetNumberOfNodesInSplayTree(), GetStringInfoDatum(), GetStringInfoPath(), LoadLocaleCache(), locale_cache, LocaleMap, NewSplayTree(), ResourceFatalError, ThrowFatalException, and WizardTrue.
Referenced by IsLocaleTreeInstantiated().
|
static |
Definition at line 1103 of file locale.c.
Referenced by LoadLocaleCache().
|
static |
Definition at line 167 of file locale.c.
References DestroyString(), _LocaleInfo::message, _LocaleInfo::path, RelinquishWizardMemory(), and _LocaleInfo::tag.
Referenced by AcquireLocaleSplayTree().
WizardExport LinkedListInfo * DestroyLocaleOptions | ( | LinkedListInfo * | messages | ) |
Definition at line 292 of file locale.c.
References DestroyLinkedList(), DestroyOptions(), GetWizardModule, LogWizardEvent(), and TraceEvent.
Referenced by AcquireLocaleSplayTree().
|
static |
Definition at line 287 of file locale.c.
References DestroyStringInfo().
Referenced by DestroyLocaleOptions().
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().
WizardExport ssize_t FormatLocaleFileList | ( | FILE * | file, |
const char * | format, | ||
va_list | operands | ||
) |
Definition at line 326 of file locale.c.
Referenced by FormatLocaleFile().
WizardExport ssize_t FormatLocaleString | ( | char * | string, |
const size_t | length, | ||
const char * | format, | ||
... | |||
) |
Definition at line 465 of file locale.c.
References FormatLocaleStringList().
Referenced by CanonicalXMLContent(), EncodePredefinedEntities(), FormatWizardSize(), FormatWizardTime(), GetConfigureOptions(), GetConfigurePaths(), GetExecutionPath(), GetHashHexDigest(), GetLocaleExceptionMessage(), GetLocaleMessage(), GetLocaleOptions(), GetPassphrase(), GetPathTemplate(), PrintKeyringProperties(), ThrowWizardExceptionList(), TranslateEvent(), TranslateFilename(), WizardToMime(), XMLTreeInfoToXML(), and XMLTreeTagToXML().
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().
WizardExport const LocaleInfo * GetLocaleInfo_ | ( | const char * | tag, |
ExceptionInfo * | exception | ||
) |
Definition at line 506 of file locale.c.
References GetNextValueInSplayTree(), GetValueFromSplayTree(), IsLocaleTreeInstantiated(), locale_cache, locale_semaphore, LocaleCompare(), LockSemaphoreInfo(), ResetSplayTreeIterator(), UnlockSemaphoreInfo(), and WizardFalse.
Referenced by GetLocaleInfoList(), GetLocaleList(), and GetLocaleMessage().
WizardExport const LocaleInfo ** GetLocaleInfoList | ( | const char * | pattern, |
size_t * | number_messages, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 579 of file locale.c.
References AcquireQuantumMemory(), GetLocaleInfo_(), GetNextValueInSplayTree(), GetNumberOfNodesInSplayTree(), GetWizardModule, GlobExpression(), locale_cache, locale_semaphore, LocaleInfoCompare(), LockSemaphoreInfo(), LogWizardEvent(), ResetSplayTreeIterator(), _LocaleInfo::stealth, _LocaleInfo::tag, TraceEvent, UnlockSemaphoreInfo(), WizardFalse, and WizardTrue.
Referenced by ListLocaleInfo().
WizardExport char ** GetLocaleList | ( | const char * | pattern, |
size_t * | number_messages, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 674 of file locale.c.
References AcquireQuantumMemory(), ConstantString(), GetLocaleInfo_(), GetNextValueInSplayTree(), GetNumberOfNodesInSplayTree(), GetWizardModule, GlobExpression(), locale_cache, locale_semaphore, LocaleTagCompare(), LockSemaphoreInfo(), LogWizardEvent(), _LocaleInfo::stealth, _LocaleInfo::tag, TraceEvent, UnlockSemaphoreInfo(), WizardFalse, and WizardTrue.
WizardExport const char * GetLocaleMessage | ( | const char * | tag | ) |
Definition at line 739 of file locale.c.
References AcquireExceptionInfo(), DestroyExceptionInfo(), FormatLocaleString(), GetLocaleInfo_(), _LocaleInfo::message, and WizardLocaleExtent.
Referenced by GetLocaleExceptionMessage().
WizardExport LinkedListInfo * GetLocaleOptions | ( | const char * | filename, |
ExceptionInfo * | exception | ||
) |
Definition at line 787 of file locale.c.
References AcquireStringInfo(), AppendValueToLinkedList(), ConfigureFileToStringInfo(), CopyWizardString(), DestroyLinkedList(), FormatLocaleString(), GetConfigurePaths(), GetNextValueInLinkedList(), GetWizardModule, LocaleEvent, LogWizardEvent(), NewLinkedList(), RelinquishWizardMemory(), ResetLinkedListIterator(), SetStringInfoDatum(), SetStringInfoLength(), SetStringInfoPath(), TraceEvent, and WizardPathExtent.
Referenced by AcquireLocaleSplayTree().
WizardExport const char * GetLocaleValue | ( | const LocaleInfo * | locale_info | ) |
Definition at line 872 of file locale.c.
References GetWizardModule, LogWizardEvent(), _LocaleInfo::message, _LocaleInfo::signature, TraceEvent, and WizardSignature.
WizardExport double InterpretLocaleValue | ( | const char * | string, |
char ** | sentinal | ||
) |
Definition at line 969 of file locale.c.
Referenced by InterpretSiPrefixValue(), and StringToDouble().
|
static |
Definition at line 903 of file locale.c.
References AcquireLocaleSplayTree(), ActivateSemaphoreInfo(), ConstantString(), DestroyString(), GetEnvironmentValue(), locale_cache, locale_semaphore, LocaleFilename, LockSemaphoreInfo(), UnlockSemaphoreInfo(), WizardFalse, and WizardTrue.
Referenced by GetLocaleInfo_().
WizardExport WizardBooleanType ListLocaleInfo | ( | FILE * | file, |
ExceptionInfo * | exception | ||
) |
Definition at line 1023 of file locale.c.
References FormatLocaleFile(), GetLocaleInfoList(), LocaleCompare(), _LocaleInfo::path, RelinquishWizardMemory(), WizardFalse, and WizardTrue.
static WizardBooleanType LoadLocaleCache | ( | SplayTreeInfo * | locale_cache, |
const char * | xml, | ||
const char * | filename, | ||
const char * | locale, | ||
const size_t | depth, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1142 of file locale.c.
References AcquireString(), AcquireWizardMemory(), AddValueToSplayTree(), ChopLocaleComponents(), ConcatenateWizardString(), ConfigureError, ConfigureEvent, ConstantString(), CopyWizardString(), DirectorySeparator, FileToXML(), GetNextToken(), GetPathComponent(), GetWizardModule, HeadPath, LoadLocaleCache(), locale_cache, LocaleCompare(), LocaleFatalErrorHandler(), LocaleNCompare(), LogWizardEvent(), _LocaleInfo::message, _LocaleInfo::path, RelinquishWizardMemory(), ResourceFatalError, SetFatalErrorHandler(), _LocaleInfo::signature, _LocaleInfo::tag, ThrowFatalException, ThrowWizardException(), WizardFalse, WizardLocaleExtent, WizardMin, WizardPathExtent, WizardSignature, and WizardTrue.
Referenced by AcquireLocaleSplayTree(), and LoadLocaleCache().
WizardExport WizardBooleanType LocaleComponentGenesis | ( | void | ) |
Definition at line 1392 of file locale.c.
References AcquireSemaphoreInfo(), locale_semaphore, and WizardTrue.
WizardExport void LocaleComponentTerminus | ( | void | ) |
Definition at line 1420 of file locale.c.
References ActivateSemaphoreInfo(), DestroySplayTree(), locale_cache, locale_semaphore, LockSemaphoreInfo(), RelinquishSemaphoreInfo(), and UnlockSemaphoreInfo().
|
static |
Definition at line 1126 of file locale.c.
References FormatLocaleFile(), GetClientName(), and wizard_unreferenced.
Referenced by LoadLocaleCache().
|
static |
Definition at line 562 of file locale.c.
References LocaleCompare().
Referenced by GetLocaleInfoList().
|
static |
|
static |
Definition at line 90 of file locale.c.
Referenced by AcquireLocaleSplayTree(), GetLocaleInfo_(), GetLocaleInfoList(), GetLocaleList(), IsLocaleTreeInstantiated(), LoadLocaleCache(), and LocaleComponentTerminus().
|
static |
Definition at line 87 of file locale.c.
Referenced by GetLocaleInfo_(), GetLocaleInfoList(), GetLocaleList(), IsLocaleTreeInstantiated(), LocaleComponentGenesis(), and LocaleComponentTerminus().
|
static |
Definition at line 75 of file locale.c.
Referenced by AcquireLocaleSplayTree().