}
}
- if (lamAlefOption || tashkeelOption){
- tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
- /* Test for NULL */
- if(tempbuffer == NULL) {
- *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return 0;
- }
+ tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
+ /* Test for NULL */
+ if(tempbuffer == NULL) {
+ *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
+ return 0;
+ }
+
+ if (lamAlefOption || tashkeelOption){
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
i = j = 0; count = 0;
}
if(lamAlefOption || tashkeelOption){
- tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
-
- /* Test for NULL */
- if(tempbuffer == NULL) {
- *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return 0;
- }
-
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
+
i = j = sourceLength; count = 0;
+
while(i >= 0) {
if ( (lamAlefOption && dest[i] == LAMALEF_SPACE_SUB) ||
(tashkeelOption && dest[i] == TASHKEEL_SPACE_SUB) ){
}
if(lamAlefOption || tashkeelOption){
- tempbuffer = (UChar *)uprv_malloc((sourceLength+1)*U_SIZEOF_UCHAR);
- /* Test for NULL */
- if(tempbuffer == NULL) {
- *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
- return 0;
- }
-
uprv_memset(tempbuffer, 0, (sourceLength+1)*U_SIZEOF_UCHAR);
i = j = 0; count = 0;