ICU-282 changed udata_create() to have the directory as its first

argument, as suggested by Markus (so it now looks like udata_open() and
friends); updated the Doc++ documentation for the directory argument;
changed all tools to put the directory first.

X-SVN-Rev: 890
This commit is contained in:
Yves Arrouye 2000-03-04 01:19:19 +00:00
parent 3b573e9f06
commit 5e1d719c5c
9 changed files with 17 additions and 8 deletions

View File

@ -149,7 +149,7 @@ main(int argc, char *argv[]) {
}
/* create the output file */
out=udata_create(DATA_TYPE, COMMON_DATA_NAME, destdir, &dataInfo, U_COPYRIGHT_STRING, &errorCode);
out=udata_create(destdir, DATA_TYPE, COMMON_DATA_NAME, &dataInfo, U_COPYRIGHT_STRING, &errorCode);
if(U_FAILURE(errorCode)) {
fprintf(stderr, "gencmn: unable to open output file - error %s\n", u_errorName(errorCode));
exit(errorCode);

View File

@ -170,7 +170,7 @@ main(int argc, char *argv[]) {
qsort(aliases, aliasCount, sizeof(Alias), compareAliases);
/* create the output file */
out=udata_create(DATA_TYPE, DATA_NAME, destdir, &dataInfo,
out=udata_create(destdir, DATA_TYPE, DATA_NAME, &dataInfo,
haveCopyright ? U_COPYRIGHT_STRING : NULL, &errorCode);
if(U_FAILURE(errorCode)) {
fprintf(stderr, "gencnval: unable to open output file - error %s\n", u_errorName(errorCode));

View File

@ -634,7 +634,7 @@ generateData(const char *dataDir) {
long dataLength;
int16_t token;
pData=udata_create(DATA_TYPE, DATA_NAME, dataDir, &dataInfo,
pData=udata_create(dataDir, DATA_TYPE, DATA_NAME, &dataInfo,
haveCopyright ? U_COPYRIGHT_STRING : NULL, &errorCode);
if(U_FAILURE(errorCode)) {
fprintf(stderr, "gennames: unable to create data memory, error %d\n", errorCode);

View File

@ -926,7 +926,7 @@ generateData(const char *dataDir) {
}
/* write the data */
pData=udata_create(DATA_TYPE, DATA_NAME, dataDir, &dataInfo,
pData=udata_create(dataDir, DATA_TYPE, DATA_NAME, &dataInfo,
haveCopyright ? U_COPYRIGHT_STRING : NULL, &errorCode);
if(U_FAILURE(errorCode)) {
fprintf(stderr, "genprops: unable to create data memory, error %d\n", errorCode);

View File

@ -376,3 +376,9 @@ static void make_col(const char *filename, UErrorCode *status)
ucol_close(coll);
}
}
/*
* Local Variables:
* indent-tabs-mode: nil
* End:
*/

View File

@ -226,7 +226,7 @@ int32_t gentz::writeTzDatFile(const char *destdir) {
*(uint16_t*)&(dataInfo.dataVersion[0]) = header.versionYear;
*(uint16_t*)&(dataInfo.dataVersion[2]) = header.versionSuffix;
pdata = udata_create(TZ_DATA_TYPE, TZ_DATA_NAME, destdir, &dataInfo,
pdata = udata_create(destdir, TZ_DATA_TYPE, TZ_DATA_NAME, &dataInfo,
useCopyright ? U_COPYRIGHT_STRING : 0, &status);
if (U_FAILURE(status)) {
die("Unable to create data memory");

View File

@ -252,7 +252,7 @@ void writeConverterData(UConverterSharedData_1_4 *mySharedData, const char *cnvN
UNewDataMemory *mem;
uint32_t sz2;
mem = udata_create("cnv", cnvName, cnvDir, &dataInfo, U_COPYRIGHT_STRING, status);
mem = udata_create(cnvDir, "cnv", cnvName, &dataInfo, U_COPYRIGHT_STRING, status);
WriteConverterSharedData(mem, mySharedData);

View File

@ -29,7 +29,7 @@ struct UNewDataMemory {
};
U_CAPI UNewDataMemory * U_EXPORT2
udata_create(const char *type, const char *name, const char *dir,
udata_create(const char *dir, const char *type, const char *name,
const UDataInfo *pInfo,
const char *comment,
UErrorCode *pErrorCode) {

View File

@ -40,6 +40,9 @@ typedef struct UNewDataMemory UNewDataMemory;
*
* See udata.h .
*
* @param dir A string that specifies the directory where the data will be
* written. If <code>NULL</code>, then
* <code>u_getDataDirectory</code> is used.
* @param type A string that specifies the type of data to be written.
* For example, resource bundles are written with type "res",
* conversion tables with type "cnv".
@ -54,7 +57,7 @@ typedef struct UNewDataMemory UNewDataMemory;
* @param pErrorCode An ICU UErrorCode parameter. It must not be <code>NULL</code>.
*/
U_CAPI UNewDataMemory * U_EXPORT2
udata_create(const char *type, const char *name, const char *dir,
udata_create(const char *dir, const char *type, const char *name,
const UDataInfo *pInfo,
const char *comment,
UErrorCode *pErrorCode);