ICU-2194 Only define uprv_syntaxError in C++ for now.

X-SVN-Rev: 12173
This commit is contained in:
George Rhoten 2003-05-29 21:46:31 +00:00
parent 5f333d494d
commit 18d6c753f5
3 changed files with 13 additions and 13 deletions

View file

@ -45,13 +45,13 @@ enum {
_IDNA_MAP_TO_NOTHING = 0x7FF
};
#if defined(XP_CPLUSPLUS)
static inline
void syntaxError(const UChar* rules,
void uprv_syntaxError(const UChar* rules,
int32_t pos,
int32_t rulesLen,
UParseError* parseError) {
UParseError* parseError)
{
if(parseError == NULL){
return;
}
@ -83,7 +83,7 @@ void syntaxError(const UChar* rules,
parseError->postContext[stop-start]= 0;
}
#endif
/* error codes for prototyping
#define U_IDNA_ERROR_START U_ERROR_LIMIT

View file

@ -272,7 +272,7 @@ int32_t StringPrep::map(const UChar* src, int32_t srcLength,
destIndex +=2;
}
}else{
syntaxError(src,srcIndex-U16_LENGTH(ch), srcLength,parseError);
uprv_syntaxError(src,srcIndex-U16_LENGTH(ch), srcLength,parseError);
status = U_IDNA_UNASSIGNED_CODEPOINT_FOUND_ERROR;
return 0;
}
@ -442,7 +442,7 @@ int32_t StringPrep::process(const UChar* src, int32_t srcLength,
if(flag == UIDNA_PROHIBITED
&& isNotProhibited(ch) == FALSE){
status = U_IDNA_PROHIBITED_CODEPOINT_FOUND_ERROR;
syntaxError(b1, b2Index-U16_LENGTH(ch), b2Len, parseError);
uprv_syntaxError(b1, b2Index-U16_LENGTH(ch), b2Len, parseError);
goto CLEANUP;
}
@ -463,7 +463,7 @@ int32_t StringPrep::process(const UChar* src, int32_t srcLength,
// satisfy 2
if( leftToRight == TRUE && rightToLeft == TRUE){
status = U_IDNA_CHECK_BIDI_ERROR;
syntaxError(b2,(rtlPos>ltrPos) ? rtlPos : ltrPos, b2Len, parseError);
uprv_syntaxError(b2,(rtlPos>ltrPos) ? rtlPos : ltrPos, b2Len, parseError);
goto CLEANUP;
}
@ -473,7 +473,7 @@ int32_t StringPrep::process(const UChar* src, int32_t srcLength,
(direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC))
){
status = U_IDNA_CHECK_BIDI_ERROR;
syntaxError(b2, rtlPos, b2Len, parseError);
uprv_syntaxError(b2, rtlPos, b2Len, parseError);
return FALSE;
}

View file

@ -207,13 +207,13 @@ uidna_toASCII(const UChar* src, int32_t srcLength,
/* populate the parseError struct */
if(srcIsLDH==FALSE){
// failPos is always set the index of failure
syntaxError(b1,failPos, b1Len,parseError);
uprv_syntaxError(b1,failPos, b1Len,parseError);
}else if(b1[0] == HYPHEN){
// fail position is 0
syntaxError(b1,0,b1Len,parseError);
uprv_syntaxError(b1,0,b1Len,parseError);
}else{
// the last index in the source is always length-1
syntaxError(b1, (b1Len>0) ? b1Len-1 : b1Len, b1Len,parseError);
uprv_syntaxError(b1, (b1Len>0) ? b1Len-1 : b1Len, b1Len,parseError);
}
goto CLEANUP;
@ -274,7 +274,7 @@ uidna_toASCII(const UChar* src, int32_t srcLength,
}else{
*status = U_IDNA_ACE_PREFIX_ERROR;
//position of failure is 0
syntaxError(b1,0,b1Len,parseError);
uprv_syntaxError(b1,0,b1Len,parseError);
goto CLEANUP;
}
}