| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * | 3 * |
| 4 * Copyright (C) 2009-2014, International Business Machines | 4 * Copyright (C) 2009-2014, International Business Machines |
| 5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
| 6 * | 6 * |
| 7 ******************************************************************************* | 7 ******************************************************************************* |
| 8 * file name: bidiconf.cpp | 8 * file name: bidiconf.cpp |
| 9 * encoding: US-ASCII | 9 * encoding: US-ASCII |
| 10 * tab size: 8 (not used) | 10 * tab size: 8 (not used) |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 LocalUBiDiPointer ubidi(ubidi_open()); | 273 LocalUBiDiPointer ubidi(ubidi_open()); |
| 274 ubidi_setClassCallback(ubidi.getAlias(), biDiConfUBiDiClassCallback, NULL, | 274 ubidi_setClassCallback(ubidi.getAlias(), biDiConfUBiDiClassCallback, NULL, |
| 275 NULL, NULL, errorCode); | 275 NULL, NULL, errorCode); |
| 276 if(errorCode.logIfFailureAndReset("ubidi_setClassCallback()")) { | 276 if(errorCode.logIfFailureAndReset("ubidi_setClassCallback()")) { |
| 277 return; | 277 return; |
| 278 } | 278 } |
| 279 lineNumber=0; | 279 lineNumber=0; |
| 280 levelsCount=0; | 280 levelsCount=0; |
| 281 orderingCount=0; | 281 orderingCount=0; |
| 282 errorCount=0; | 282 errorCount=0; |
| 283 // paraLevelName must be initialized in case the first non-comment line is i
n error |
| 284 paraLevelName="N/A"; |
| 283 while(errorCount<10 && fgets(line, (int)sizeof(line), bidiTestFile.getAlias(
))!=NULL) { | 285 while(errorCount<10 && fgets(line, (int)sizeof(line), bidiTestFile.getAlias(
))!=NULL) { |
| 284 ++lineNumber; | 286 ++lineNumber; |
| 285 // Remove trailing comments and whitespace. | 287 // Remove trailing comments and whitespace. |
| 286 char *commentStart=strchr(line, '#'); | 288 char *commentStart=strchr(line, '#'); |
| 287 if(commentStart!=NULL) { | 289 if(commentStart!=NULL) { |
| 288 *commentStart=0; | 290 *commentStart=0; |
| 289 } | 291 } |
| 290 u_rtrim(line); | 292 u_rtrim(line); |
| 291 const char *start=u_skipWhitespace(line); | 293 const char *start=u_skipWhitespace(line); |
| 292 if(*start==0) { | 294 if(*start==0) { |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 671 } |
| 670 return isOk; | 672 return isOk; |
| 671 } | 673 } |
| 672 | 674 |
| 673 void BiDiConformanceTest::printErrorLine() { | 675 void BiDiConformanceTest::printErrorLine() { |
| 674 ++errorCount; | 676 ++errorCount; |
| 675 errln("Input line %5d: %s", (int)lineNumber, line); | 677 errln("Input line %5d: %s", (int)lineNumber, line); |
| 676 errln(UnicodeString("Input string: ")+inputString); | 678 errln(UnicodeString("Input string: ")+inputString); |
| 677 errln("Para level: %s", paraLevelName); | 679 errln("Para level: %s", paraLevelName); |
| 678 } | 680 } |
| OLD | NEW |