+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
- * Copyright (C) 2000-2014, International Business Machines
+ * Copyright (C) 2000-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
* file name: ushape.cpp
- * encoding: US-ASCII
+ * encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
count--;
}
- uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, sourceLength);
destSize = u_strlen(dest);
}
tempbuffer[i] = SPACE_CHAR;
}
- uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, sourceLength);
destSize = sourceLength;
}
count--;
}
- uprv_memcpy(dest,tempbuffer, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, sourceLength);
destSize = sourceLength;
}
tempbuffer[j] = LAM_CHAR;
/* to ensure the array index is within the range */
U_ASSERT(dest[i] >= 0xFEF5u
- && dest[i]-0xFEF5u < sizeof(convertLamAlef)/sizeof(convertLamAlef[0]));
+ && dest[i]-0xFEF5u < UPRV_LENGTHOF(convertLamAlef));
tempbuffer[j-1] = convertLamAlef[ dest[i] - 0xFEF5 ];
j--;
countl--;
i--;
j--;
}
- uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, sourceLength);
uprv_free(tempbuffer);
}
if(countr > 0) {
- uprv_memmove(tempbuffer, tempbuffer+countr, sourceLength*U_SIZEOF_UCHAR);
+ u_memmove(tempbuffer, tempbuffer+countr, sourceLength);
if(u_strlen(tempbuffer) < sourceLength) {
for(i=sourceLength-1;i>=sourceLength-countr;i--) {
tempbuffer[i] = SPACE_CHAR;
}
}
}
- uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, sourceLength);
uprv_free(tempbuffer);
j++;
}
- uprv_memcpy(dest, tempbuffer, destSize*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, destSize);
}
}
} else {
/* to ensure the array index is within the range */
U_ASSERT(dest[i] >= 0x064Bu
- && dest[i]-0x064Bu < sizeof(IrrelevantPos)/sizeof(IrrelevantPos[0]));
+ && dest[i]-0x064Bu < UPRV_LENGTHOF(IrrelevantPos));
dest[i] = 0xFE70 + IrrelevantPos[(dest[i] - 0x064B)] + Shape;
}
}else if ((currLink & APRESENT) > 0) {
return 0;
}
}
- uprv_memcpy(tempbuffer, source, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(tempbuffer, source, sourceLength);
if (tempsource != NULL){
uprv_free(tempsource);
}
countSpaces(tempbuffer,destLength,options,&spacesCountl,&spacesCountr);
invertBuffer(tempbuffer,destLength,options,spacesCountl,spacesCountr);
}
- uprv_memcpy(dest, tempbuffer, uprv_min(destLength, destCapacity)*U_SIZEOF_UCHAR);
+ u_memcpy(dest, tempbuffer, uprv_min(destLength, destCapacity));
if(tempbuffer!=buffer) {
uprv_free(tempbuffer);
*pErrorCode=U_BUFFER_OVERFLOW_ERROR;
return sourceLength;
}
- uprv_memcpy(dest, source, sourceLength*U_SIZEOF_UCHAR);
+ u_memcpy(dest, source, sourceLength);
destLength=sourceLength;
}