This commit was generated by cvs2svn to compensate for changes in r77,
which included commits to RCS files with non-trunk default branches. X-SVN-Rev: 78
This commit is contained in:
parent
07a2bc0937
commit
cf6fb83032
@ -51,11 +51,11 @@ int32_t ucmp8_getkBlockCount() { return UCMP8_kBlockCount;}
|
|||||||
int32_t ucmp8_getkIndexCount(){ return UCMP8_kIndexCount;}
|
int32_t ucmp8_getkIndexCount(){ return UCMP8_kIndexCount;}
|
||||||
/* debug flags*/
|
/* debug flags*/
|
||||||
/*=======================================================*/
|
/*=======================================================*/
|
||||||
CAPI int8_t ucmp8_get(CompactByteArray* array, uint16_t index)
|
U_CAPI int8_t ucmp8_get(CompactByteArray* array, uint16_t index)
|
||||||
{
|
{
|
||||||
return (array->fArray[(array->fIndex[index >> UCMP8_kBlockShift] & 0xFFFF) + (index & UCMP8_kBlockMask)]);
|
return (array->fArray[(array->fIndex[index >> UCMP8_kBlockShift] & 0xFFFF) + (index & UCMP8_kBlockMask)]);
|
||||||
}
|
}
|
||||||
CAPI uint8_t ucmp8_getu(CompactByteArray* array, uint16_t index)
|
U_CAPI uint8_t ucmp8_getu(CompactByteArray* array, uint16_t index)
|
||||||
{
|
{
|
||||||
return (uint8_t)ucmp8_get(array,index);
|
return (uint8_t)ucmp8_get(array,index);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,16 @@
|
|||||||
*====================================
|
*====================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CAPI const int32_t UCMP8_kUnicodeCount;
|
U_CAPI const int32_t UCMP8_kUnicodeCount;
|
||||||
CAPI const int32_t UCMP8_kBlockShift;
|
U_CAPI const int32_t UCMP8_kBlockShift;
|
||||||
CAPI const int32_t UCMP8_kBlockCount;
|
U_CAPI const int32_t UCMP8_kBlockCount;
|
||||||
CAPI const int32_t UCMP8_kIndexShift;
|
U_CAPI const int32_t UCMP8_kIndexShift;
|
||||||
CAPI const int32_t UCMP8_kIndexCount;
|
U_CAPI const int32_t UCMP8_kIndexCount;
|
||||||
CAPI const uint32_t UCMP8_kBlockMask;
|
U_CAPI const uint32_t UCMP8_kBlockMask;
|
||||||
|
|
||||||
CAPI int32_t ucmp8_getkUnicodeCount(void);
|
U_CAPI int32_t ucmp8_getkUnicodeCount(void);
|
||||||
CAPI int32_t ucmp8_getkBlockCount(void);
|
U_CAPI int32_t ucmp8_getkBlockCount(void);
|
||||||
CAPI int32_t ucmp8_getkIndexCount(void);
|
U_CAPI int32_t ucmp8_getkIndexCount(void);
|
||||||
typedef struct{
|
typedef struct{
|
||||||
int8_t* fArray;
|
int8_t* fArray;
|
||||||
uint16_t* fIndex;
|
uint16_t* fIndex;
|
||||||
@ -45,29 +45,29 @@ typedef struct{
|
|||||||
bool_t fBogus;
|
bool_t fBogus;
|
||||||
} CompactByteArray;
|
} CompactByteArray;
|
||||||
|
|
||||||
CAPI CompactByteArray* ucmp8_open(int8_t defaultValue);
|
U_CAPI CompactByteArray* ucmp8_open(int8_t defaultValue);
|
||||||
CAPI CompactByteArray* ucmp8_openAdopt(uint16_t* indexArray,
|
U_CAPI CompactByteArray* ucmp8_openAdopt(uint16_t* indexArray,
|
||||||
int8_t* newValues,
|
int8_t* newValues,
|
||||||
int32_t count);
|
int32_t count);
|
||||||
CAPI void ucmp8_close(CompactByteArray* array);
|
U_CAPI void ucmp8_close(CompactByteArray* array);
|
||||||
CAPI bool_t isBogus(const CompactByteArray* array);
|
U_CAPI bool_t isBogus(const CompactByteArray* array);
|
||||||
|
|
||||||
|
|
||||||
CAPI int8_t ucmp8_get(CompactByteArray* array, uint16_t index);
|
U_CAPI int8_t ucmp8_get(CompactByteArray* array, uint16_t index);
|
||||||
CAPI uint8_t ucmp8_getu(CompactByteArray* array, uint16_t index);
|
U_CAPI uint8_t ucmp8_getu(CompactByteArray* array, uint16_t index);
|
||||||
|
|
||||||
CAPI void ucmp8_set(CompactByteArray* array,
|
U_CAPI void ucmp8_set(CompactByteArray* array,
|
||||||
UChar index,
|
UChar index,
|
||||||
int8_t value);
|
int8_t value);
|
||||||
|
|
||||||
CAPI void ucmp8_setRange(CompactByteArray* array,
|
U_CAPI void ucmp8_setRange(CompactByteArray* array,
|
||||||
UChar start,
|
UChar start,
|
||||||
UChar end,
|
UChar end,
|
||||||
int8_t value);
|
int8_t value);
|
||||||
|
|
||||||
CAPI int32_t ucmp8_getCount(const CompactByteArray* array);
|
U_CAPI int32_t ucmp8_getCount(const CompactByteArray* array);
|
||||||
CAPI const int8_t* ucmp8_getArray(const CompactByteArray* array);
|
U_CAPI const int8_t* ucmp8_getArray(const CompactByteArray* array);
|
||||||
CAPI const uint16_t* ucmp8_getIndex(const CompactByteArray* array);
|
U_CAPI const uint16_t* ucmp8_getIndex(const CompactByteArray* array);
|
||||||
|
|
||||||
/* Compact the array.
|
/* Compact the array.
|
||||||
The value of cycle determines how large the overlap can be.
|
The value of cycle determines how large the overlap can be.
|
||||||
@ -76,11 +76,11 @@ CAPI const uint16_t* ucmp8_getIndex(const CompactByteArray* array);
|
|||||||
then using that will be faster than cycle = 1, and get almost the
|
then using that will be faster than cycle = 1, and get almost the
|
||||||
same compression.
|
same compression.
|
||||||
*/
|
*/
|
||||||
CAPI void ucmp8_compact(CompactByteArray* array,
|
U_CAPI void ucmp8_compact(CompactByteArray* array,
|
||||||
uint32_t cycle);
|
uint32_t cycle);
|
||||||
|
|
||||||
/* Expanded takes the array back to a 65536 element array*/
|
/* Expanded takes the array back to a 65536 element array*/
|
||||||
CAPI void ucmp8_expand(CompactByteArray* array);
|
U_CAPI void ucmp8_expand(CompactByteArray* array);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,6 @@
|
|||||||
#include "utypes.h"
|
#include "utypes.h"
|
||||||
|
|
||||||
/* Print a ustring to the specified FILE* in the default codepage */
|
/* Print a ustring to the specified FILE* in the default codepage */
|
||||||
CAPI void uprint(const UChar *s, FILE *f, UErrorCode *status);
|
U_CAPI void uprint(const UChar *s, FILE *f, UErrorCode *status);
|
||||||
|
|
||||||
#endif /* ! UPRINT_H */
|
#endif /* ! UPRINT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user