/usr/share/cagefs-skeleton/usr/include/unicode
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** * Copyright (c) 2003-2004, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Author: Alan Liu * Created: March 19 2003 * Since: ICU 2.6 ********************************************************************** */ #ifndef UCAT_H #define UCAT_H #include "unicode/utypes.h" #include "unicode/ures.h" /** * \file * \brief C API: Message Catalog Wrappers * * This C API provides look-alike functions that deliberately resemble * the POSIX catopen, catclose, and catgets functions. The underlying * implementation is in terms of ICU resource bundles, rather than * POSIX message catalogs. * * The ICU resource bundles obey standard ICU inheritance policies. * To facilitate this, sets and messages are flattened into one tier. * This is done by creating resource bundle keys of the form * <set_num>%<msg_num> where set_num is the set number and msg_num is * the message number, formatted as decimal strings. * * Example: Consider a message catalog containing two sets: * * Set 1: Message 4 = "Good morning." * Message 5 = "Good afternoon." * Message 7 = "Good evening." * Message 8 = "Good night." * Set 4: Message 14 = "Please " * Message 19 = "Thank you." * Message 20 = "Sincerely," * * The ICU resource bundle source file would, assuming it is named * "greet.txt", would look like this: * * greet * { * 1%4 { "Good morning." } * 1%5 { "Good afternoon." } * 1%7 { "Good evening." } * 1%8 { "Good night." } * * 4%14 { "Please " } * 4%19 { "Thank you." } * 4%20 { "Sincerely," } * } * * The catgets function is commonly used in combination with functions * like printf and strftime. ICU components like message format can * be used instead, although they use a different format syntax. * There is an ICU package, icuio, that provides some of * the POSIX-style formatting API. */ U_CDECL_BEGIN /** * An ICU message catalog descriptor, analogous to nl_catd. * * @stable ICU 2.6 */ typedef UResourceBundle* u_nl_catd; /** * Open and return an ICU message catalog descriptor. The descriptor * may be passed to u_catgets() to retrieve localized strings. * * @param name string containing the full path pointing to the * directory where the resources reside followed by the package name * e.g. "/usr/resource/my_app/resources/guimessages" on a Unix system. * If NULL, ICU default data files will be used. * * Unlike POSIX, environment variables are not interpolated within the * name. * * @param locale the locale for which we want to open the resource. If * NULL, the default ICU locale will be used (see uloc_getDefault). If * strlen(locale) == 0, the root locale will be used. * * @param ec input/output error code. Upon output, * U_USING_FALLBACK_WARNING indicates that a fallback locale was * used. For example, 'de_CH' was requested, but nothing was found * there, so 'de' was used. U_USING_DEFAULT_WARNING indicates that the * default locale data or root locale data was used; neither the * requested locale nor any of its fallback locales were found. * * @return a message catalog descriptor that may be passed to * u_catgets(). If the ec parameter indicates success, then the caller * is responsible for calling u_catclose() to close the message * catalog. If the ec parameter indicates failure, then NULL will be * returned. * * @stable ICU 2.6 */ U_STABLE u_nl_catd U_EXPORT2 u_catopen(const char* name, const char* locale, UErrorCode* ec); /** * Close an ICU message catalog, given its descriptor. * * @param catd a message catalog descriptor to be closed. May be NULL, * in which case no action is taken. * * @stable ICU 2.6 */ U_STABLE void U_EXPORT2 u_catclose(u_nl_catd catd); /** * Retrieve a localized string from an ICU message catalog. * * @param catd a message catalog descriptor returned by u_catopen. * * @param set_num the message catalog set number. Sets need not be * numbered consecutively. * * @param msg_num the message catalog message number within the * set. Messages need not be numbered consecutively. * * @param s the default string. This is returned if the string * specified by the set_num and msg_num is not found. It must be * zero-terminated. * * @param len fill-in parameter to receive the length of the result. * May be NULL, in which case it is ignored. * * @param ec input/output error code. May be U_USING_FALLBACK_WARNING * or U_USING_DEFAULT_WARNING. U_MISSING_RESOURCE_ERROR indicates that * the set_num/msg_num tuple does not specify a valid message string * in this catalog. * * @return a pointer to a zero-terminated UChar array which lives in * an internal buffer area, typically a memory mapped/DLL file. The * caller must NOT delete this pointer. If the call is unsuccessful * for any reason, then s is returned. This includes the situation in * which ec indicates a failing error code upon entry to this * function. * * @stable ICU 2.6 */ U_STABLE const UChar* U_EXPORT2 u_catgets(u_nl_catd catd, int32_t set_num, int32_t msg_num, const UChar* s, int32_t* len, UErrorCode* ec); U_CDECL_END #endif /*UCAT_H*/ /*eof*/
.
Edit
..
Edit
alphaindex.h
Edit
appendable.h
Edit
basictz.h
Edit
brkiter.h
Edit
bytestream.h
Edit
bytestrie.h
Edit
bytestriebuilder.h
Edit
calendar.h
Edit
caniter.h
Edit
casemap.h
Edit
char16ptr.h
Edit
chariter.h
Edit
choicfmt.h
Edit
coleitr.h
Edit
coll.h
Edit
compactdecimalformat.h
Edit
curramt.h
Edit
currpinf.h
Edit
currunit.h
Edit
datefmt.h
Edit
dbbi.h
Edit
dcfmtsym.h
Edit
decimfmt.h
Edit
docmain.h
Edit
dtfmtsym.h
Edit
dtintrv.h
Edit
dtitvfmt.h
Edit
dtitvinf.h
Edit
dtptngen.h
Edit
dtrule.h
Edit
edits.h
Edit
enumset.h
Edit
errorcode.h
Edit
fieldpos.h
Edit
filteredbrk.h
Edit
fmtable.h
Edit
format.h
Edit
formattedvalue.h
Edit
fpositer.h
Edit
gender.h
Edit
gregocal.h
Edit
icudataver.h
Edit
icuplug.h
Edit
idna.h
Edit
listformatter.h
Edit
localebuilder.h
Edit
localematcher.h
Edit
localpointer.h
Edit
locdspnm.h
Edit
locid.h
Edit
measfmt.h
Edit
measunit.h
Edit
measure.h
Edit
messagepattern.h
Edit
msgfmt.h
Edit
normalizer2.h
Edit
normlzr.h
Edit
nounit.h
Edit
numberformatter.h
Edit
numberrangeformatter.h
Edit
numfmt.h
Edit
numsys.h
Edit
parseerr.h
Edit
parsepos.h
Edit
platform.h
Edit
plurfmt.h
Edit
plurrule.h
Edit
ptypes.h
Edit
putil.h
Edit
rbbi.h
Edit
rbnf.h
Edit
rbtz.h
Edit
regex.h
Edit
region.h
Edit
reldatefmt.h
Edit
rep.h
Edit
resbund.h
Edit
schriter.h
Edit
scientificnumberformatter.h
Edit
search.h
Edit
selfmt.h
Edit
simpleformatter.h
Edit
simpletz.h
Edit
smpdtfmt.h
Edit
sortkey.h
Edit
std_string.h
Edit
strenum.h
Edit
stringoptions.h
Edit
stringpiece.h
Edit
stringtriebuilder.h
Edit
stsearch.h
Edit
symtable.h
Edit
tblcoll.h
Edit
timezone.h
Edit
tmunit.h
Edit
tmutamt.h
Edit
tmutfmt.h
Edit
translit.h
Edit
tzfmt.h
Edit
tznames.h
Edit
tzrule.h
Edit
tztrans.h
Edit
ubidi.h
Edit
ubiditransform.h
Edit
ubrk.h
Edit
ucal.h
Edit
ucasemap.h
Edit
ucat.h
Edit
uchar.h
Edit
ucharstrie.h
Edit
ucharstriebuilder.h
Edit
uchriter.h
Edit
uclean.h
Edit
ucnv.h
Edit
ucnv_cb.h
Edit
ucnv_err.h
Edit
ucnvsel.h
Edit
ucol.h
Edit
ucoleitr.h
Edit
uconfig.h
Edit
ucpmap.h
Edit
ucptrie.h
Edit
ucsdet.h
Edit
ucurr.h
Edit
udat.h
Edit
udata.h
Edit
udateintervalformat.h
Edit
udatpg.h
Edit
udisplaycontext.h
Edit
uenum.h
Edit
ufieldpositer.h
Edit
uformattable.h
Edit
uformattedvalue.h
Edit
ugender.h
Edit
uidna.h
Edit
uiter.h
Edit
uldnames.h
Edit
ulistformatter.h
Edit
uloc.h
Edit
ulocdata.h
Edit
umachine.h
Edit
umisc.h
Edit
umsg.h
Edit
umutablecptrie.h
Edit
unifilt.h
Edit
unifunct.h
Edit
unimatch.h
Edit
unirepl.h
Edit
uniset.h
Edit
unistr.h
Edit
unorm.h
Edit
unorm2.h
Edit
unum.h
Edit
unumberformatter.h
Edit
unumsys.h
Edit
uobject.h
Edit
upluralrules.h
Edit
uregex.h
Edit
uregion.h
Edit
ureldatefmt.h
Edit
urename.h
Edit
urep.h
Edit
ures.h
Edit
uscript.h
Edit
usearch.h
Edit
uset.h
Edit
usetiter.h
Edit
ushape.h
Edit
uspoof.h
Edit
usprep.h
Edit
ustdio.h
Edit
ustream.h
Edit
ustring.h
Edit
ustringtrie.h
Edit
utext.h
Edit
utf.h
Edit
utf16.h
Edit
utf32.h
Edit
utf8.h
Edit
utf_old.h
Edit
utmscale.h
Edit
utrace.h
Edit
utrans.h
Edit
utypes.h
Edit
uvernum.h
Edit
uversion.h
Edit
vtzone.h
Edit