OLD | NEW |
1 /******************************************************************** | 1 /******************************************************************** |
2 * COPYRIGHT: | 2 * COPYRIGHT: |
3 * Copyright (c) 1997-2014, International Business Machines Corporation and | 3 * Copyright (c) 1997-2014, International Business Machines Corporation and |
4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
5 ********************************************************************/ | 5 ********************************************************************/ |
6 /* file name: cbiditst.c | 6 /* file name: cbiditst.c |
7 * encoding: US-ASCII | 7 * encoding: US-ASCII |
8 * tab size: 8 (not used) | 8 * tab size: 8 (not used) |
9 * indentation:4 | 9 * indentation:4 |
10 * | 10 * |
(...skipping 4358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4369 | 4369 |
4370 log_verbose("\nExiting TestReorderingMode\n\n"); | 4370 log_verbose("\nExiting TestReorderingMode\n\n"); |
4371 } | 4371 } |
4372 | 4372 |
4373 static const char* inverseBasic(UBiDi *pBiDi, const char *srcChars, int32_t srcL
en, | 4373 static const char* inverseBasic(UBiDi *pBiDi, const char *srcChars, int32_t srcL
en, |
4374 uint32_t option, UBiDiLevel level, char *result)
{ | 4374 uint32_t option, UBiDiLevel level, char *result)
{ |
4375 UErrorCode rc = U_ZERO_ERROR; | 4375 UErrorCode rc = U_ZERO_ERROR; |
4376 int32_t destLen; | 4376 int32_t destLen; |
4377 UChar src[MAXLEN], dest2[MAXLEN]; | 4377 UChar src[MAXLEN], dest2[MAXLEN]; |
4378 | 4378 |
4379 if (pBiDi == NULL || src == NULL) { | 4379 if (pBiDi == NULL || srcChars == NULL) { |
4380 return NULL; | 4380 return NULL; |
4381 } | 4381 } |
4382 ubidi_setReorderingOptions(pBiDi, option); | 4382 ubidi_setReorderingOptions(pBiDi, option); |
4383 pseudoToU16(srcLen, srcChars, src); | 4383 pseudoToU16(srcLen, srcChars, src); |
4384 ubidi_setPara(pBiDi, src, srcLen, level, NULL, &rc); | 4384 ubidi_setPara(pBiDi, src, srcLen, level, NULL, &rc); |
4385 assertSuccessful("ubidi_setPara", &rc); | 4385 assertSuccessful("ubidi_setPara", &rc); |
4386 | 4386 |
4387 *dest2 = 0; | 4387 *dest2 = 0; |
4388 destLen = ubidi_writeReordered(pBiDi, dest2, MAXLEN, | 4388 destLen = ubidi_writeReordered(pBiDi, dest2, MAXLEN, |
4389 UBIDI_DO_MIRRORING, &rc); | 4389 UBIDI_DO_MIRRORING, &rc); |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4913 len = uprv_strlen(TEXT); | 4913 len = uprv_strlen(TEXT); |
4914 pseudoToU16(len, TEXT, src); | 4914 pseudoToU16(len, TEXT, src); |
4915 ubidi_setPara(bidi, src, len, UBIDI_DEFAULT_LTR , NULL, &status); | 4915 ubidi_setPara(bidi, src, len, UBIDI_DEFAULT_LTR , NULL, &status); |
4916 if (U_FAILURE(status)) { | 4916 if (U_FAILURE(status)) { |
4917 log_err("setPara failed with heavily nested brackets - %s", u_errorName(
status)); | 4917 log_err("setPara failed with heavily nested brackets - %s", u_errorName(
status)); |
4918 } | 4918 } |
4919 | 4919 |
4920 ubidi_close(bidi); | 4920 ubidi_close(bidi); |
4921 } | 4921 } |
4922 | 4922 |
OLD | NEW |