ICU-1005 removing unused code

X-SVN-Rev: 5022
This commit is contained in:
Vladimir Weinstein 2001-06-19 22:46:02 +00:00
parent a7268db185
commit b6476563b2
4 changed files with 1 additions and 48 deletions

View File

@ -45,8 +45,6 @@ CntTable *uprv_cnttab_open(CompactIntArray *mapping, UErrorCode *status) {
}
CntTable *tbl = (CntTable *)uprv_malloc(sizeof(CntTable));
tbl->mapping = mapping;
//tbl->elements = uhash_open(uhash_hashLong, uhash_compareLong, status);
//uhash_setValueDeleter(tbl->elements, deleteCntElement);
tbl->elements = (ContractionTable **)uprv_malloc(INIT_EXP_TABLE_SIZE*sizeof(ContractionTable *));
tbl->capacity = INIT_EXP_TABLE_SIZE;
uprv_memset(tbl->elements, 0, INIT_EXP_TABLE_SIZE*sizeof(ContractionTable *));
@ -90,23 +88,6 @@ ContractionTable *addATableElement(CntTable *table, uint32_t *key, UErrorCode *s
return el;
}
int32_t uprv_cnttab_moveTable(CntTable *table, uint32_t oldOffset, uint32_t newOffset, UErrorCode *status) {
uint32_t i, CE;
int32_t difference = newOffset - oldOffset;
if(U_FAILURE(*status)) {
return 0;
}
for(i = 0; i<=0xFFFF; i++) {
CE = ucmp32_get(table->mapping, i);
if(isContraction(CE)) {
CE = constructContractCE(getContractOffset(CE)+difference);
ucmp32_set(table->mapping, (UChar)i, CE);
}
}
return table->position;
}
int32_t uprv_cnttab_constructTable(CntTable *table, uint32_t mainOffset, UErrorCode *status) {
int32_t i = 0, j = 0;
if(U_FAILURE(*status) || table->size == 0) {
@ -158,7 +139,6 @@ int32_t uprv_cnttab_constructTable(CntTable *table, uint32_t mainOffset, UErrorC
}
*cpPointer = ((ccMin==ccMax)?1:0 << 8) | ccMax;
/*uprv_memcpy(cpPointer, table->elements[i]->codePoints, size*sizeof(UChar));*/
uprv_memcpy(CEPointer, table->elements[i]->CEs, size*sizeof(uint32_t));
for(j = 0; j<size; j++) {
if(isContraction(*(CEPointer+j))) {
@ -407,14 +387,7 @@ int32_t uprv_cnttab_findCP(CntTable *table, uint32_t element, UChar codePoint, U
return 0;
}
/*int32_t pos =*/ return _cnttab_findCP(_cnttab_getContractionTable(table, element), codePoint);
/*
if(pos < 0) {
return 0;
} else {
return pos;
}
*/
return _cnttab_findCP(_cnttab_getContractionTable(table, element), codePoint);
}
uint32_t uprv_cnttab_getCE(CntTable *table, uint32_t element, uint32_t position, UErrorCode *status) {

View File

@ -52,8 +52,6 @@ void uprv_cnttab_close(CntTable *table);
/* construct the table for output */
int32_t uprv_cnttab_constructTable(CntTable *table, uint32_t mainOffset, UErrorCode *status);
/* moves table around... since we have absolute offsets from the start of the table */
int32_t uprv_cnttab_moveTable(CntTable *table, uint32_t oldOffset, uint32_t newOffset, UErrorCode *status);
/* adds more contractions in table. If element is non existant, it creates on. Returns element handle */
uint32_t uprv_cnttab_addContraction(CntTable *table, uint32_t element, UChar codePoint, uint32_t value, UErrorCode *status);
/* sets a part of contraction sequence in table. If element is non existant, it creates on. Returns element handle */

View File

@ -120,23 +120,6 @@ void ucol_tok_initTokenList(UColTokenParser *src, const UChar *rules, const uint
src->resultLen = 0;
}
/* -1 off, 1 on, 0 neither */
int32_t ucol_uprv_tok_isOnorOf(const UChar* onoff) {
if(onoff) {
if(u_tolower(*onoff) == 0x006F /*'o'*/) {
onoff++;
if(u_tolower(*onoff) == 0x006e /*'n'*/) {
return 1;
} else if(u_tolower(*onoff) == 0x0066 /*'f'*/) {
onoff++;
if(u_tolower(*onoff) == 0x0066 /*'f'*/) {
return -1;
}
}
}
}
return 0;
}
void ucol_uprv_tok_setOptionInImage(UColOptionSet *opts, UColAttribute attrib, UColAttributeValue value) {
switch(attrib) {

View File

@ -116,7 +116,6 @@ U_CFUNC uint32_t ucol_tok_assembleTokenList(UColTokenParser *src, UErrorCode *st
U_CFUNC void ucol_tok_closeTokenList(UColTokenParser *src);
void deleteToken(void *token);
int32_t ucol_uprv_tok_isOnorOf(const UChar* onoff);
void ucol_uprv_tok_setOptionInImage(UColOptionSet *opts, UColAttribute attrib, UColAttributeValue value);
UBool ucol_uprv_tok_readAndSetOption(UColOptionSet *opts, const UChar* start, const UChar *end, UBool *variableTop, UBool *top, UErrorCode *status);