/** * An input to some of the functions in this file specifying whether to write data * as C/C++ code initializers or as TOML.
*/ typedefenum UTargetSyntax {
UPRV_TARGET_SYNTAX_CCODE = 0,
UPRV_TARGET_SYNTAX_TOML = 1,
} UTargetSyntax;
/** * Creates a source text file and writes a header comment with the ICU copyright. * Writes a C/Java-style comment with the generator name.
*/
U_CAPI FILE * U_EXPORT2
usrc_create(constchar *path, constchar *filename, int32_t copyrightYear, constchar *generator);
/** * Creates a source text file and writes a header comment with the ICU copyright. * Writes the comment with # lines, as used in scripts and text data.
*/
U_CAPI FILE * U_EXPORT2
usrc_createTextData(constchar *path, constchar *filename, int32_t copyrightYear, constchar *generator);
/** * Writes the ICU copyright to a file stream, with configurable year and comment style.
*/
U_CAPI void U_EXPORT2
usrc_writeCopyrightHeader(FILE *f, constchar *prefix, int32_t copyrightYear);
/** * Writes information about the file being machine-generated.
*/
U_CAPI void U_EXPORT2
usrc_writeFileNameGeneratedBy(
FILE *f, constchar *prefix, constchar *filename, constchar *generator);
/** * Writes the contents of an array of 8/16/32/64-bit words. * The prefix and postfix are optional (can be NULL) and are written first/last. * The prefix may contain a %ld or similar field for the array length. * The {} and declaration etc. need to be included in prefix/postfix or * printed before and after the array contents.
*/
U_CAPI void U_EXPORT2
usrc_writeArray(FILE *f, constchar *prefix, constvoid *p, int32_t width, int32_t length, constchar *indent, constchar *postfix);
/** * Calls usrc_writeArray() for the index and data arrays of a frozen UTrie2. * Only the index array is written for a 16-bit UTrie2. In this case, dataPrefix * is ignored and can be NULL.
*/
U_CAPI void U_EXPORT2
usrc_writeUTrie2Arrays(FILE *f, constchar *indexPrefix, constchar *dataPrefix, const UTrie2 *pTrie, constchar *postfix);
/** * Writes the UTrie2 struct values. * The {} and declaration etc. need to be included in prefix/postfix or * printed before and after the array contents.
*/
U_CAPI void U_EXPORT2
usrc_writeUTrie2Struct(FILE *f, constchar *prefix, const UTrie2 *pTrie, constchar *indexName, constchar *dataName, constchar *postfix);
/** * Calls usrc_writeArray() for the index and data arrays of a UCPTrie.
*/
U_CAPI void U_EXPORT2
usrc_writeUCPTrieArrays(FILE *f, constchar *indexPrefix, constchar *dataPrefix, const UCPTrie *pTrie, constchar *postfix,
UTargetSyntax syntax);
/** * Writes the UCPTrie struct values. * The {} and declaration etc. need to be included in prefix/postfix or * printed before and after the array contents.
*/
U_CAPI void U_EXPORT2
usrc_writeUCPTrieStruct(FILE *f, constchar *prefix, const UCPTrie *pTrie, constchar *indexName, constchar *dataName, constchar *postfix,
UTargetSyntax syntax);
/** * Writes the UCPMap ranges list. * * The "valueNameGetter" argument is optional; ignored if nullptr. * If present, it will be used to look up value name strings.
*/
U_CAPI void U_EXPORT2
usrc_writeUCPMap(
FILE *f, const UCPMap *pMap,
icu::ValueNameGetter *valueNameGetter,
UTargetSyntax syntax);
#endif// __cplusplus
/** * Writes the contents of an array of mostly invariant characters. * Characters 0..0x1f are printed as numbers, * others as characters with single quotes: '%c'. * * The prefix and postfix are optional (can be NULL) and are written first/last. * The prefix may contain a %ld or similar field for the array length. * The {} and declaration etc. need to be included in prefix/postfix or * printed before and after the array contents.
*/
U_CAPI void U_EXPORT2
usrc_writeArrayOfMostlyInvChars(FILE *f, constchar *prefix, constchar *p, int32_t length, constchar *postfix);
/** * Writes a syntactically valid Unicode string in all ASCII, escaping quotes * and non-ASCII characters.
*/
U_CAPI void U_EXPORT2
usrc_writeStringAsASCII(FILE *f, const UChar* ptr, int32_t length,
UTargetSyntax syntax);
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.