Lines Matching refs:sourceLength
611 calculateSize(const UChar *source, int32_t sourceLength, in calculateSize() argument
618 destSize = sourceLength; in calculateSize()
632 for(i=0;i<sourceLength;i++) { in calculateSize()
633 …if( ((isAlefChar(source[i]))&& (i<(sourceLength-1)) &&(source[i+1] == LAM_CHAR)) || (isTashkeelCha… in calculateSize()
638 for(i=0;i<sourceLength;i++) { in calculateSize()
639 …if( ( (source[i] == LAM_CHAR) && (i<(sourceLength-1)) && (isAlefChar(source[i+1]))) || (isTashkeel… in calculateSize()
648 for(i=0;i<sourceLength;i++) { in calculateSize()
668 handleTashkeelWithTatweel(UChar *dest, int32_t sourceLength, in handleTashkeelWithTatweel() argument
672 for(i = 0; i < sourceLength; i++){ in handleTashkeelWithTatweel()
681 return sourceLength; in handleTashkeelWithTatweel()
706 handleGeneratedSpaces(UChar *dest, int32_t sourceLength, in handleGeneratedSpaces() argument
730 tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
739 uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
742 while(i < sourceLength) { in handleGeneratedSpaces()
760 uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
778 while(i < sourceLength) { in handleGeneratedSpaces()
784 destSize = sourceLength; in handleGeneratedSpaces()
801 uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
803 i = j = sourceLength; count = 0; in handleGeneratedSpaces()
821 uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
822 destSize = sourceLength; in handleGeneratedSpaces()
842 uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
845 while(i < sourceLength) { in handleGeneratedSpaces()
863 uprv_memcpy(dest,tempbuffer, sourceLength*U_SIZEOF_UCHAR); in handleGeneratedSpaces()
864 destSize = sourceLength; in handleGeneratedSpaces()
886 expandCompositCharAtBegin(UChar *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCod… in expandCompositCharAtBegin() argument
891 tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR); in expandCompositCharAtBegin()
899 uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR); in expandCompositCharAtBegin()
907 i = j = sourceLength-1; in expandCompositCharAtBegin()
927 uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR); in expandCompositCharAtBegin()
931 destSize = sourceLength; in expandCompositCharAtBegin()
946 expandCompositCharAtEnd(UChar *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode)… in expandCompositCharAtEnd() argument
950 int32_t inpsize = sourceLength; in expandCompositCharAtEnd()
953 tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR); in expandCompositCharAtEnd()
961 uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR); in expandCompositCharAtEnd()
968 i = sourceLength - countr - 1; in expandCompositCharAtEnd()
969 j = sourceLength - 1; in expandCompositCharAtEnd()
988 uprv_memmove(tempbuffer, tempbuffer+countr, sourceLength*U_SIZEOF_UCHAR); in expandCompositCharAtEnd()
989 if(u_strlen(tempbuffer) < sourceLength) { in expandCompositCharAtEnd()
990 for(i=sourceLength-1;i>=sourceLength-countr;i--) { in expandCompositCharAtEnd()
995 uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR); in expandCompositCharAtEnd()
999 destSize = sourceLength; in expandCompositCharAtEnd()
1013 expandCompositCharAtNear(UChar *dest, int32_t sourceLength, int32_t destSize,UErrorCode *pErrorCode, in expandCompositCharAtNear() argument
1020 for(i = 0 ;i<=sourceLength-1;i++) { in expandCompositCharAtNear()
1046 destSize = sourceLength; in expandCompositCharAtNear()
1066 expandCompositChar(UChar *dest, int32_t sourceLength, in expandCompositChar() argument
1081 destSize = expandCompositCharAtEnd(dest, sourceLength, destSize, pErrorCode); in expandCompositChar()
1085 destSize = expandCompositCharAtBegin(dest, sourceLength, destSize, pErrorCode); in expandCompositChar()
1088 destSize = expandCompositCharAtBegin(dest, sourceLength, destSize, pErrorCode); in expandCompositChar()
1092 destSize = expandCompositCharAtEnd(dest, sourceLength, destSize, pErrorCode); in expandCompositChar()
1098 … destSize = expandCompositCharAtNear(dest, sourceLength, destSize, pErrorCode, yehHamzaOption, in expandCompositChar()
1106 destSize = expandCompositCharAtEnd(dest, sourceLength, destSize, pErrorCode); in expandCompositChar()
1112 destSize = expandCompositCharAtBegin(dest, sourceLength, destSize, pErrorCode); in expandCompositChar()
1132 … destSize = expandCompositCharAtNear(dest, sourceLength, destSize, pErrorCode, yehHamzaOption, in expandCompositChar()
1139 destSize = calculateSize(dest,sourceLength,destSize,options); in expandCompositChar()
1179 shapeUnicode(UChar *dest, int32_t sourceLength, in shapeUnicode() argument
1200 for (i = 0; i < sourceLength; i++) { in shapeUnicode()
1216 i = sourceLength - 1; in shapeUnicode()
1334 destSize = sourceLength; in shapeUnicode()
1336 destSize = handleGeneratedSpaces(dest,sourceLength,destSize,options,pErrorCode, shapeVars); in shapeUnicode()
1340 …destSize = expandCompositChar(dest, sourceLength,destSize,options,pErrorCode, SHAPE_MODE,shapeVars… in shapeUnicode()
1351 deShapeUnicode(UChar *dest, int32_t sourceLength, in deShapeUnicode() argument
1367 for(i = 0; i < sourceLength; i++) { in deShapeUnicode()
1374 && (i < (sourceLength - 1)) && isAlefMaksouraChar(dest[i+1] )) { in deShapeUnicode()
1377 } else if ( (seenComposeEnabled == 1) && (isTailChar(inputChar)) && (i< (sourceLength - 1)) in deShapeUnicode()
1390 destSize = sourceLength; in deShapeUnicode()
1392 …destSize = expandCompositChar(dest,sourceLength,destSize,options,pErrorCode,DESHAPE_MODE, shapeVar… in deShapeUnicode()
1405 u_shapeArabic(const UChar *source, int32_t sourceLength, in u_shapeArabic() argument
1420 if( source==NULL || sourceLength<-1 || (dest==NULL && destCapacity!=0) || destCapacity<0 || in u_shapeArabic()
1458 if(sourceLength==-1) { in u_shapeArabic()
1459 sourceLength=u_strlen(source); in u_shapeArabic()
1461 if(sourceLength<=0) { in u_shapeArabic()
1467 ((source<=dest && dest<source+sourceLength) || in u_shapeArabic()
1491 int j=logical_order?-1:2*sourceLength; in u_shapeArabic()
1492 int i=logical_order?-1:sourceLength; in u_shapeArabic()
1493 int end=logical_order?sourceLength:-1; in u_shapeArabic()
1498 tempsource = (UChar *)uprv_malloc(2*sourceLength*U_SIZEOF_UCHAR); in u_shapeArabic()
1519 sourceLength = newSourceLength; in u_shapeArabic()
1526 outputSize=calculateSize(source,sourceLength,destCapacity,options); in u_shapeArabic()
1528 outputSize=sourceLength; in u_shapeArabic()
1541 if(sourceLength>outputSize) { in u_shapeArabic()
1542 outputSize=sourceLength; in u_shapeArabic()
1559 uprv_memcpy(tempbuffer, source, sourceLength*U_SIZEOF_UCHAR); in u_shapeArabic()
1564 if(sourceLength<outputSize) { in u_shapeArabic()
1565 uprv_memset(tempbuffer+sourceLength, 0, (outputSize-sourceLength)*U_SIZEOF_UCHAR); in u_shapeArabic()
1569 countSpaces(tempbuffer,sourceLength,options,&spacesCountl,&spacesCountr); in u_shapeArabic()
1570 invertBuffer(tempbuffer,sourceLength,options,spacesCountl,spacesCountr); in u_shapeArabic()
1588 … destLength = shapeUnicode(tempbuffer,sourceLength,destCapacity,options,pErrorCode,2,shapeVars); in u_shapeArabic()
1591 … destLength = shapeUnicode(tempbuffer,sourceLength,destCapacity,options,pErrorCode,1,shapeVars); in u_shapeArabic()
1601 … destLength = shapeUnicode(tempbuffer,sourceLength,destCapacity,options,pErrorCode,0,shapeVars); in u_shapeArabic()
1606 … destLength = deShapeUnicode(tempbuffer,sourceLength,destCapacity,options,pErrorCode,shapeVars); in u_shapeArabic()
1642 if(destCapacity<sourceLength) { in u_shapeArabic()
1645 return sourceLength; in u_shapeArabic()
1647 uprv_memcpy(dest, source, sourceLength*U_SIZEOF_UCHAR); in u_shapeArabic()
1648 destLength=sourceLength; in u_shapeArabic()