]>
git.saurik.com Git - apple/icu.git/blob - icuSources/tools/toolutil/writesrc.h
2 *******************************************************************************
4 * Copyright (C) 2005, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 * file name: writesrc.h
10 * tab size: 8 (not used)
13 * created on: 2005apr23
14 * created by: Markus W. Scherer
16 * Helper functions for writing source code for data.
19 #ifndef __WRITESRC_H__
20 #define __WRITESRC_H__
23 #include "unicode/utypes.h"
27 * Create a source text file and write a header comment with the ICU copyright.
29 U_CAPI
FILE * U_EXPORT2
30 usrc_create(const char *path
, const char *filename
);
33 * Write the contents of an array of 8/16/32-bit words.
34 * The prefix and postfix are optional (can be NULL) and are written first/last.
35 * The prefix may contain a %ld or similar field for the array length.
36 * The {} and declaration etc. need to be included in prefix/postfix or
37 * printed before and after the array contents.
40 usrc_writeArray(FILE *f
,
42 const void *p
, int32_t width
, int32_t length
,
46 * Calls usrc_writeArray() for the index and data arrays of a runtime UTrie.
47 * Only the index array is written for a 16-bit UTrie. In this case, dataPrefix
48 * is ignored and can be NULL.
51 usrc_writeUTrieArrays(FILE *f
,
52 const char *indexPrefix
, const char *dataPrefix
,
57 * Writes the UTrie struct values.
58 * The {} and declaration etc. need to be included in prefix/postfix or
59 * printed before and after the array contents.
60 * If getFoldingOffsetName==NULL then "utrie_defaultGetFoldingOffset" is printed.
63 usrc_writeUTrieStruct(FILE *f
,
66 const char *indexName
, const char *dataName
,
67 const char *getFoldingOffsetName
,