From 15b324af73aa1bfac0ed69732ba07ae8078d2598 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 31 Aug 2001 16:40:49 +0000 Subject: [PATCH] ICU-1007 improve the consistency check X-SVN-Rev: 5657 --- icu4c/source/tools/gennorm/store.c | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/icu4c/source/tools/gennorm/store.c b/icu4c/source/tools/gennorm/store.c index c2f4cec116f..99ef7393f98 100644 --- a/icu4c/source/tools/gennorm/store.c +++ b/icu4c/source/tools/gennorm/store.c @@ -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); + } } } }