mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
jitterbug 10: Added better diagnostic on datafile open
X-Trac-URL: https://ssl.icu-project.org/trac/ticket/8 git-svn-id: http://source.icu-project.org/repos/icu/icu/trunk@34 0a8b766c-62c9-45f9-954d-7f2943c9ead0
This commit is contained in:
parent
67b1848be8
commit
7c652f27dd
1 changed files with 11 additions and 7 deletions
|
@ -302,14 +302,18 @@ void UnicodeTest::TestUnicodeData()
|
|||
char buffer[1000];
|
||||
char* bufferPtr, *dirPtr;
|
||||
char path[256];
|
||||
|
||||
const char* datafile = "UnicodeData-3.0.0.txt";
|
||||
|
||||
strcpy(path , icu_getDefaultDataDirectory());
|
||||
strcat(path, "UnicodeData-3.0.0.txt");
|
||||
|
||||
input = fopen( path, "r");
|
||||
#ifdef WIN32
|
||||
assert(input != 0);
|
||||
#endif
|
||||
strcat(path, datafile);
|
||||
|
||||
input = fopen( path, "r");
|
||||
if (input == 0)
|
||||
{
|
||||
errln("Failed to open: " + UnicodeString(datafile));
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t unicode;
|
||||
for(;;) {
|
||||
bufferPtr = fgets(buffer, 999, input);
|
||||
|
|
Loading…
Add table
Reference in a new issue