w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

uresb.c File Reference
#include "unicode/putil.h"
#include "unicode/ures.h"
#include "unicode/ustdio.h"
#include "unicode/uloc.h"
#include "unicode/ustring.h"
#include "uoptions.h"
#include "toolutil.h"
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
Include dependency graph for uresb.c:

Go to the source code of this file.

Macros

#define URESB_DEFAULTTRUNC   40
 

Functions

const UChargetErrorName (UErrorCode errorNumber)
 
void reportError (UErrorCode *status)
 
static UCharquotedString (const UChar *string)
 
void printOutBundle (UFILE *out, UResourceBundle *resource, int32_t indent, UErrorCode *status)
 
void printIndent (UFILE *out, int32_t indent)
 
void printHex (UFILE *out, const int8_t *what)
 
int main (int argc, char *argv[])
 

Variables

static char * currdir = ((void *)0)
 
static const char * locale = ((void *)0)
 
static const char * encoding = ((void *)0)
 
static const char * resPath = ((void *)0)
 
static const int32_t indentsize = 4
 
static UFILEouterr = ((void *)0)
 
static int32_t truncsize = 40
 
static UBool trunc = 0
 
const UChar baderror [] = { 0x0042, 0x0041, 0x0044, 0x0000 }
 
static UOption options []
 
static UBool VERBOSE = 0
 

Macro Definition Documentation

◆ URESB_DEFAULTTRUNC

#define URESB_DEFAULTTRUNC   40

This program prints out resource bundles - example for ICU workshop TODO: make a complete i18n layout for this program.

Definition at line 45 of file uresb.c.

Function Documentation

◆ getErrorName()

const UChar * getErrorName ( UErrorCode  errorNumber)

◆ main()

◆ printHex()

void printHex ( UFILE out,
const int8_t what 
)

Definition at line 187 of file uresb.c.

References out, u_fprintf, and gen-indic-table::what.

Referenced by printOutBundle().

◆ printIndent()

static void printIndent ( UFILE out,
int32_t  indent 
)

Definition at line 177 of file uresb.c.

References i, inchar(), indent, out, and u_fprintf.

Referenced by printOutBundle().

◆ printOutBundle()

◆ quotedString()

static UChar * quotedString ( const UChar string)
static

Definition at line 191 of file uresb.c.

References len, malloc, np, sp, and u_strlen.

Referenced by printOutBundle().

◆ reportError()

void reportError ( UErrorCode status)

Definition at line 362 of file uresb.c.

References getErrorName(), outerr, status, u_errorName, and u_fprintf.

Referenced by main(), parseMappings(), and printOutBundle().

Variable Documentation

◆ baderror

const UChar baderror[] = { 0x0042, 0x0041, 0x0044, 0x0000 }

Definition at line 60 of file uresb.c.

Referenced by getErrorName().

◆ currdir

char* currdir = ((void *)0)
static

Definition at line 47 of file uresb.c.

Referenced by getErrorName(), and main().

◆ encoding

const char* encoding = ((void *)0)
static

Definition at line 53 of file uresb.c.

◆ indentsize

const int32_t indentsize = 4
static

Definition at line 55 of file uresb.c.

Referenced by printOutBundle().

◆ locale

const char* locale = ((void *)0)
static

Definition at line 52 of file uresb.c.

Referenced by _clearUAttributesAndKeyType(), _getDisplayNameForComponent(), _getStringOrCopyKey(), _SCSUOpen(), _setUnicodeExtensions(), ULocRuns::add(), LocalePriorityList::add(), LocaleRuns::add(), addPatternExample(), collectCurrencyNames(), number::impl::CompactHandler::CompactHandler(), TimeZoneGenericNames::createInstance(), numparse::impl::NumberParserImpl::createParserFromProperties(), numparse::impl::NumberParserImpl::createSimpleParser(), date(), finit_owner(), StandardPluralRanges::forLocale(), ICULocaleService::get(), getCacheEntry(), getCodesFromLocale(), getCurrencyNameCount(), LocaleKeyFactory::getDisplayName(), CFactory::getDisplayName(), ICUService::getDisplayName(), ICUService::getDisplayNames(), getErrorName(), DayPeriodRules::getInstance(), ParagraphLayout::getLanguageCode(), graphite2::Locale2Lang::getMsId(), U_NAMESPACE_BEGIN::getPluralRangesData(), getSortKey_current(), getSortKey_legacy(), getWhen(), gr_face_name_lang_for_locale(), U_NAMESPACE_BEGIN::hashLocale(), idForLocale(), init_resb_result(), initCollator_current(), initCollator_legacy(), TZGNCore::initialize(), TimeZoneNamesImpl::initialize(), RelativeDateFormat::initializeCalendar(), LocaleUtility::initNameFromLocale(), graphite2::Face::languageForLocale(), linebreakstart(), loadWeekdayNames(), LocalePriorityList::LocalePriorityList(), number::impl::LocalizedNumberFormatterAsFormat::LocalizedNumberFormatterAsFormat(), main(), XLikelySubtags::makeMaximizedLsrFrom(), makeRBNF(), LocalePriorityList::Iterator::next(), number::impl::NumberPropertyMapper::oldToNew(), U_NAMESPACE_USE::LocaleFromTag::operator()(), ParagraphLayout::ParagraphLayout(), pl_addLocaleRun_68(), number::impl::CompactData::populate(), ICULocaleService::registerInstance(), RelativeDateFormat::RelativeDateFormat(), remapPlatformDependentCodepage(), replaceFieldTypesExample(), number::impl::NumberFormatterImpl::resolvePluralRules(), SRBRoot::setLocale(), SimpleLocaleKeyFactory::SimpleLocaleKeyFactory(), TimeZoneNamesDelegate::TimeZoneNamesDelegate(), TimeZoneNamesImpl::TimeZoneNamesImpl(), toUpperCase(), TTFGetFontName(), TZGNCore::TZGNCore(), u_catopen_68(), u_fadopt_68(), u_finit_68(), u_fopen_68(), u_fopen_u_68(), u_formatMessage_68(), u_formatMessageWithError_68(), u_fsetlocale_68(), u_fstropen_68(), u_parseMessage_68(), u_parseMessageWithError_68(), u_strToLower_68(), u_strToTitle_68(), u_strToUpper_68(), u_vformatMessage_68(), u_vformatMessageWithError_68(), u_vparseMessage_68(), u_vparseMessageWithError_68(), ubrk_open_68(), ucal_getKeywordValuesForLocale_68(), ucal_getTimeZoneDisplayName_68(), ucal_open_68(), ucase_getCaseLocale_68(), ucasemap_open_68(), ucasemap_setLocale_68(), ucnv_createAlgorithmicConverter_68(), ucol_getFunctionalEquivalent_68(), ucol_getKeywordValuesForLocale_68(), ucol_getShortDefinitionString_68(), ucurr_countCurrencies_68(), ucurr_forLocale_68(), ucurr_forLocaleAndDate_68(), ucurr_getKeywordValuesForLocale_68(), ucurr_getName_68(), ucurr_getPluralName_68(), ucurr_register_68(), udat_open_68(), udatpg_open_68(), udtitvfmt_open_68(), ugender_getInstance_68(), ulistfmt_open_68(), ulistfmt_openForType_68(), uloc_getDisplayCountry_68(), uloc_getDisplayKeywordValue_68(), uloc_getDisplayLanguage_68(), uloc_getDisplayName_68(), uloc_getDisplayScript_68(), uloc_getDisplayScriptInContext(), uloc_getDisplayVariant_68(), uloc_getLocaleForLCID_68(), uloc_getTableStringWithFallback_68(), uloc_isRightToLeft_68(), umsg_open_68(), umsg_setLocale_68(), unum_open_68(), unumf_openForSkeletonAndLocale_68(), unumf_openForSkeletonAndLocaleWithError_68(), unumrf_openForSkeletonWithCollapseAndIdentityFallback_68(), unumsys_open_68(), uplrules_open_68(), uplrules_openForType_68(), uprv_currencyLeads(), uprv_parseCurrency_68(), ureldatefmt_open_68(), ures_findResource_68(), ures_getKeywordValues_68(), usearch_open_68(), ustrcase_getCaseLocale_68(), and ustrcase_getTitleBreakIterator_68().

◆ options

UOption options[]
static
Initial value:
={
{ "help" , ((void *)0) , ((void *)0) , ((void *)0) , 'h' , UOPT_NO_ARG , 0 } ,
{ "help" , ((void *)0) , ((void *)0) , ((void *)0) , '?' , UOPT_NO_ARG , 0 } ,
{ "locale", ((void *)0) , ((void *)0) , ((void *)0) , 'l', UOPT_REQUIRES_ARG, 0 },
{ "encoding" , ((void *)0) , ((void *)0) , ((void *)0) , 'e' , UOPT_REQUIRES_ARG , 0 } ,
{ "path", ((void *)0) , ((void *)0) , ((void *)0) , 'p', UOPT_OPTIONAL_ARG, 0 },
{ "truncate", ((void *)0) , ((void *)0) , ((void *)0) , 't', UOPT_OPTIONAL_ARG, 0 },
{ "verbose" , ((void *)0) , ((void *)0) , ((void *)0) , 'v' , UOPT_NO_ARG , 0 }
}
@ UOPT_OPTIONAL_ARG
Definition: uoptions.h:50
@ UOPT_NO_ARG
Definition: uoptions.h:50
@ UOPT_REQUIRES_ARG
Definition: uoptions.h:50

Definition at line 69 of file uresb.c.

◆ outerr

UFILE* outerr = ((void *)0)
static

Definition at line 56 of file uresb.c.

Referenced by main(), and reportError().

◆ resPath

const char* resPath = ((void *)0)
static

Definition at line 54 of file uresb.c.

Referenced by main(), and ures_getByKeyWithFallback_68().

◆ trunc

UBool trunc = 0
static

Definition at line 58 of file uresb.c.

Referenced by main(), and printOutBundle().

◆ truncsize

int32_t truncsize = 40
static

Definition at line 57 of file uresb.c.

Referenced by main(), and printOutBundle().

◆ VERBOSE

UBool VERBOSE = 0
static

Definition at line 79 of file uresb.c.

Referenced by main(), and printOutBundle().