LEFT | RIGHT |
(no file at all) | |
1 // © 2016 and later: Unicode, Inc. and others. | 1 // © 2016 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html | 2 // License & terms of use: http://www.unicode.org/copyright.html |
3 /* | 3 /* |
4 ******************************************************************************* | 4 ******************************************************************************* |
5 * | 5 * |
6 * Copyright (C) 2001-2012, International Business Machines | 6 * Copyright (C) 2001-2012, International Business Machines |
7 * Corporation and others. All Rights Reserved. | 7 * Corporation and others. All Rights Reserved. |
8 * | 8 * |
9 ******************************************************************************* | 9 ******************************************************************************* |
10 * file name: ustr_wcs.cpp | 10 * file name: ustr_wcs.cpp |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 }else{ | 335 }else{ |
336 /* here the source is not null terminated· | 336 /* here the source is not null terminated· |
337 * so it may have nulls embeded and we need to | 337 * so it may have nulls embeded and we need to |
338 * do some extra processing· | 338 * do some extra processing· |
339 */ | 339 */ |
340 int32_t remaining =cStackCap; | 340 int32_t remaining =cStackCap; |
341 ········ | 341 ········ |
342 pSrcLimit = src + srcLength; | 342 pSrcLimit = src + srcLength; |
343 | 343 |
344 for(;;){ | 344 for(;;){ |
345 register int32_t nulLen = 0; | 345 int32_t nulLen = 0; |
346 | 346 |
347 /* find nulls in the string */ | 347 /* find nulls in the string */ |
348 while(nulLen<srcLength && pSrc[nulLen++]!=0){ | 348 while(nulLen<srcLength && pSrc[nulLen++]!=0){ |
349 } | 349 } |
350 | 350 |
351 if((pSrc+nulLen) < pSrcLimit){ | 351 if((pSrc+nulLen) < pSrcLimit){ |
352 /* check if we have enough room in pCSrc */ | 352 /* check if we have enough room in pCSrc */ |
353 if(remaining < (nulLen * MB_CUR_MAX)){ | 353 if(remaining < (nulLen * MB_CUR_MAX)){ |
354 /* should rarely occur */ | 354 /* should rarely occur */ |
355 int32_t len = (pCSrc-pCSave); | 355 int32_t len = (pCSrc-pCSave); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 526 |
527 #else | 527 #else |
528 | 528 |
529 return _strFromWCS(dest,destCapacity,pDestLength,src,srcLength,pErrorCode);········ | 529 return _strFromWCS(dest,destCapacity,pDestLength,src,srcLength,pErrorCode);········ |
530 | 530 |
531 #endif | 531 #endif |
532 | 532 |
533 } | 533 } |
534 | 534 |
535 #endif /* #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) && !UCONF
IG_NO_CONVERSION */ | 535 #endif /* #if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) && !UCONF
IG_NO_CONVERSION */ |
LEFT | RIGHT |