ICU-567 MacOS

X-SVN-Rev: 2366
This commit is contained in:
Steven R. Loomis 2000-08-28 21:36:13 +00:00
parent 00f74db99a
commit bd94ac5ec8
7 changed files with 29 additions and 6 deletions

View file

@ -61,7 +61,7 @@ u_loccache_get(const char *loc)
/* since we know the cache will be empty. But, it simplifies */
/* the code a great deal. */
result = uhash_get(gLocaleCache, loc);
result = (ULocaleBundle*)uhash_get(gLocaleCache, loc);
/* If the bundle wasn't found, create it and add it to the cache */
if(result == 0) {
@ -72,7 +72,7 @@ u_loccache_get(const char *loc)
umtx_lock(0);
/* Make sure the cache didn't change while we were locking it */
result = uhash_get(gLocaleCache, loc);
result = (ULocaleBundle*)uhash_get(gLocaleCache, loc);
if(result == 0) {
result = tempBundle;
uhash_put(gLocaleCache, tempBundle->fLocale, tempBundle, &status);

View file

@ -25,7 +25,7 @@
#include <stdarg.h>
#include "unicode/utypes.h"
#include <unicode/ucnv.h>
#include "unicode/ucnv.h"
#define U_EOF 0xFFFF

View file

@ -249,7 +249,7 @@ static void iterateTestsWithLevel ( const TestNode* root,
/* we want these messages to be at 0 indent. so just push the indent level breifly. */
saveIndent = INDENT_LEVEL;
INDENT_LEVEL = 0;
log_info("%s%s%c\n", (list[i]->test||mode==SHOWTESTS)?"---":"",pathToFunction, list[i]->test?'\0':TEST_SEPARATOR );
log_info("%s%s%c\n", (list[i]->test||mode==SHOWTESTS)?"---":"",pathToFunction, list[i]->test?' ':TEST_SEPARATOR );
INDENT_LEVEL = saveIndent;
iterateTestsWithLevel ( root->child, len, list, mode );

View file

@ -78,6 +78,9 @@ UOption options[]={
};
#ifdef XP_MAC_CONSOLE
#include <console.h>
#endif
int
main(int argc,
@ -91,6 +94,10 @@ main(int argc,
const char *encoding = "";
UBool verbose;
#ifdef XP_MAC_CONSOLE
argc = ccommand(&argv);
#endif
argc = u_parseArgs(argc, (const char**)argv, sizeof(options)/sizeof(options[0]), options);
/* error handling, printing usage message */

View file

@ -158,14 +158,14 @@ static UBool get(UHashtable *hash, const struct UString* tag) {
static void put(UHashtable *hash, const struct UString *tag,
UErrorCode* status) {
struct UString* key = uprv_malloc(sizeof(struct UString));
struct UString* key = (struct UString*)uprv_malloc(sizeof(struct UString));
ustr_init(key);
ustr_cpy(key, tag, status);
uhash_put(hash, key, (void*)1, status);
}
static void freeUString(void* ustr) {
ustr_deinit(ustr);
ustr_deinit((struct UString*)ustr);
uprv_free(ustr);
}

View file

@ -34,6 +34,10 @@
#include "uoptions.h"
#include "tzdat.h"
#ifdef XP_MAC_CONSOLE
# include <console.h>
#endif
#define INPUT_FILE "tz.txt"
#define OUTPUT_FILE "tz.dat"
@ -135,6 +139,9 @@ private:
int main(int argc, const char *argv[]) {
gentz x;
#ifdef XP_MAC_CONSOLE
argc=ccommand((char***)&argv);
#endif
return x.main(argc, argv);
}

View file

@ -33,6 +33,10 @@
#include "unewdata.h"
#include "ucmpwrit.h"
#ifdef XP_MAC_CONSOLE
# include <console.h>
#endif
#define DEBUG 0
/*
@ -255,6 +259,11 @@ int main(int argc, const char *argv[])
size_t destdirlen;
char* dot = NULL, *outBasename;
char cnvName[UCNV_MAX_FULL_FILE_NAME_LENGTH];
int i;
#ifdef XP_MAC_CONSOLE
argc = ccommand((char***)&argv);
#endif
/* preset then read command line options */
options[4].value=u_getDataDirectory();