X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..2ca993e82fb37b597a3c73ecd1586a139a6579c5:/icuSources/tools/toolutil/writesrc.h?ds=sidebyside diff --git a/icuSources/tools/toolutil/writesrc.h b/icuSources/tools/toolutil/writesrc.h index 4519cf18..f4ca0810 100644 --- a/icuSources/tools/toolutil/writesrc.h +++ b/icuSources/tools/toolutil/writesrc.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2005-2010, International Business Machines +* Copyright (C) 2005-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -24,21 +24,21 @@ #include "utrie2.h" /** - * Create a source text file and write a header comment with the ICU copyright. - * Writes a C/Java-style comment. + * 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(const char *path, const char *filename); +usrc_create(const char *path, const char *filename, const char *generator); /** - * Create a source text file and write a header comment with the ICU copyright. + * 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(const char *path, const char *filename); +usrc_createTextData(const char *path, const char *filename, const char *generator); /** - * Write the contents of an array of 8/16/32-bit words. + * Writes the contents of an array of 8/16/32-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 @@ -73,4 +73,20 @@ usrc_writeUTrie2Struct(FILE *f, const char *indexName, const char *dataName, const char *postfix); +/** + * 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, + const char *prefix, + const char *p, int32_t length, + const char *postfix); + #endif