ICU-4707 Fix some compiler warnings
X-SVN-Rev: 19391
This commit is contained in:
parent
a977c0adc7
commit
02470e105b
@ -314,26 +314,20 @@ invertBuffer(UChar *buffer,int32_t size,uint32_t options,int32_t *spacesCountl,i
|
||||
* later it'll be converted into the 0xFExx LamAlefs
|
||||
* in the shaping function.
|
||||
*/
|
||||
static UChar
|
||||
static U_INLINE UChar
|
||||
changeLamAlef(UChar ch) {
|
||||
|
||||
switch(ch) {
|
||||
case 0x0622 :
|
||||
return(0x065C);
|
||||
break;
|
||||
return 0x065C;
|
||||
case 0x0623 :
|
||||
return(0x065D);
|
||||
break;
|
||||
return 0x065D;
|
||||
case 0x0625 :
|
||||
return(0x065E);
|
||||
break;
|
||||
return 0x065E;
|
||||
case 0x0627 :
|
||||
return(0x065F);
|
||||
break;
|
||||
default :
|
||||
return(0);
|
||||
break;
|
||||
return 0x065F;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -348,11 +342,9 @@ specialChar(UChar ch) {
|
||||
(ch>0x0647 && ch<0x064a)||(ch==0x0629) ) {
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
if( ch>=0x064B && ch<= 0x0652 )
|
||||
else if( ch>=0x064B && ch<= 0x0652 )
|
||||
return (2);
|
||||
else
|
||||
if( (ch>=0x0653 && ch<= 0x0655) || ch == 0x0670 ||
|
||||
else if( (ch>=0x0653 && ch<= 0x0655) || ch == 0x0670 ||
|
||||
(ch>=0xFE70 && ch<= 0xFE7F) )
|
||||
return (3);
|
||||
else
|
||||
@ -408,39 +400,27 @@ countSpaces(UChar *dest,int32_t size,uint32_t options,int32_t *spacesCountl,int3
|
||||
*Name : isTashkeelChar
|
||||
*Function : Returns 1 for Tashkeel characters else return 0
|
||||
*/
|
||||
static int32_t
|
||||
static U_INLINE int32_t
|
||||
isTashkeelChar(UChar ch) {
|
||||
|
||||
if( ch>=0x064B && ch<= 0x0652 )
|
||||
return (1);
|
||||
else
|
||||
return (0);
|
||||
return (int32_t)( ch>=0x064B && ch<= 0x0652 );
|
||||
}
|
||||
|
||||
/*
|
||||
*Name : isAlefChar
|
||||
*Function : Returns 1 for Alef characters else return 0
|
||||
*/
|
||||
static int32_t
|
||||
static U_INLINE int32_t
|
||||
isAlefChar(UChar ch) {
|
||||
|
||||
if( (ch==0x0622)||(ch==0x0623)||(ch==0x0625)||(ch==0x0627) )
|
||||
return (1);
|
||||
else
|
||||
return (0);
|
||||
return (int32_t)( (ch==0x0622)||(ch==0x0623)||(ch==0x0625)||(ch==0x0627) );
|
||||
}
|
||||
|
||||
/*
|
||||
*Name : isLamAlefChar
|
||||
*Function : Returns 1 for LamAlef characters else return 0
|
||||
*/
|
||||
static int32_t
|
||||
static U_INLINE int32_t
|
||||
isLamAlefChar(UChar ch) {
|
||||
|
||||
if( (ch>=0xFEF5)&&(ch<=0xFEFC) )
|
||||
return (1);
|
||||
else
|
||||
return (0);
|
||||
return (int32_t)( (ch>=0xFEF5)&&(ch<=0xFEFC) );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -886,13 +866,14 @@ shapeUnicode(UChar *dest, int32_t sourceLength,
|
||||
if (flag == 1) {
|
||||
Shape = (Shape == 1 || Shape == 3) ? 1 : 0;
|
||||
}
|
||||
else
|
||||
if(flag == 2) {
|
||||
else if(flag == 2) {
|
||||
if( (lastLink & LINKL) && (nextLink & LINKR) && (tashkeelFlag == 1) &&
|
||||
dest[i] != 0x064C && dest[i] != 0x064D ) {
|
||||
dest[i] != 0x064C && dest[i] != 0x064D )
|
||||
{
|
||||
Shape = 1;
|
||||
if( (nextLink&ALEFTYPE) == ALEFTYPE && (lastLink&LAMTYPE) == LAMTYPE )
|
||||
if( (nextLink&ALEFTYPE) == ALEFTYPE && (lastLink&LAMTYPE) == LAMTYPE ) {
|
||||
Shape = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Shape = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user