ICU-1007 improve the consistency check

X-SVN-Rev: 5657
This commit is contained in:
Markus Scherer 2001-08-31 16:40:49 +00:00
parent 70a05a3f24
commit 15b324af73

View File

@ -994,29 +994,29 @@ make32BitNorm(Norm *norm) {
}
}
if((norm->qcFlags&_NORM_QC_NFKC)==0 && norm->lenNFD>0) {
/* a "true" NFKC starter with a canonical decomposition */
if( norm->canonBothCCs>=0x100 || /* lead cc!=0 or */
(other=getNorm(norm->nfd[0]))!=NULL && (other->qcFlags&_NORM_QC_NFKC)!=0 /* nfd[0] not NFC_YES */
) {
fprintf(stderr,
"error: true NFKC starter canonical decomposition[%u] does not begin\n"
" with a true NFKC starter: U+%04lx U+%04lx%s\n",
norm->lenNFD, norm->nfd[0], norm->nfd[1], norm->lenNFD<=2 ? "" : " ...");
exit(U_INVALID_TABLE_FILE);
}
}
if((norm->qcFlags&_NORM_QC_NFKC)==0 && norm->lenNFKD>0) {
/* a "true" NFKC starter with a compatibility decomposition */
if( norm->compatBothCCs>=0x100 || /* lead cc!=0 or */
(other=getNorm(norm->nfkd[0]))!=NULL && (other->qcFlags&_NORM_QC_NFKC)!=0 /* nfkd[0] not NFC_YES */
) {
fprintf(stderr,
"error: true NFKC starter compatibility decomposition[%u] does not begin\n"
" with a true NFKC starter: U+%04lx U+%04lx%s\n",
norm->lenNFKD, norm->nfkd[0], norm->nfkd[1], norm->lenNFKD<=2 ? "" : " ...");
exit(U_INVALID_TABLE_FILE);
if((norm->qcFlags&_NORM_QC_NFKC)==0) {
if(norm->lenNFKD>0) {
/* a "true" NFKC starter with a compatibility decomposition */
if( norm->compatBothCCs>=0x100 || /* lead cc!=0 or */
(other=getNorm(norm->nfkd[0]))!=NULL && (other->qcFlags&_NORM_QC_NFKC)!=0 /* nfkd[0] not NFC_YES */
) {
fprintf(stderr,
"error: true NFKC starter compatibility decomposition[%u] does not begin\n"
" with a true NFKC starter: U+%04lx U+%04lx%s\n",
norm->lenNFKD, norm->nfkd[0], norm->nfkd[1], norm->lenNFKD<=2 ? "" : " ...");
exit(U_INVALID_TABLE_FILE);
}
} else if(norm->lenNFD>0) {
/* a "true" NFKC starter with only a canonical decomposition */
if( norm->canonBothCCs>=0x100 || /* lead cc!=0 or */
(other=getNorm(norm->nfd[0]))!=NULL && (other->qcFlags&_NORM_QC_NFKC)!=0 /* nfd[0] not NFC_YES */
) {
fprintf(stderr,
"error: true NFKC starter canonical decomposition[%u] does not begin\n"
" with a true NFKC starter: U+%04lx U+%04lx%s\n",
norm->lenNFD, norm->nfd[0], norm->nfd[1], norm->lenNFD<=2 ? "" : " ...");
exit(U_INVALID_TABLE_FILE);
}
}
}
}