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