00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef UFMT_CMN_H
00021 #define UFMT_CMN_H
00022
00023 #include "unicode/utypes.h"
00024
00028 enum
00029 {
00030 ufmt_count,
00031 ufmt_int,
00032 ufmt_char,
00033 ufmt_wchar,
00034 ufmt_string,
00035 ufmt_wstring,
00036 ufmt_pointer,
00037 ufmt_float,
00038 ufmt_double,
00039 ufmt_date,
00040 ufmt_uchar,
00041 ufmt_ustring,
00042 ufmt_last
00043 };
00044
00048 union ufmt_args {
00049 int intValue;
00050 float floatValue;
00051 double doubleValue;
00052 void *ptrValue;
00053 wchar_t wcharValue;
00054 UDate dateValue;
00055 };
00056 typedef union ufmt_args ufmt_args;
00057
00064 #define ufmt_min(a,b) (a) < (b) ? (a) : (b)
00065
00071 int
00072 ufmt_digitvalue(UChar c);
00073
00080 UBool
00081 ufmt_isdigit(UChar c,
00082 int32_t radix);
00083
00095 void
00096 ufmt_ltou(UChar *buffer,
00097 int32_t *len,
00098 long value,
00099 int32_t radix,
00100 UBool uselower,
00101 int32_t minDigits);
00102
00111 long
00112 ufmt_utol(const UChar *buffer,
00113 int32_t *len,
00114 int32_t radix);
00115
00124 UBool
00125 ufmt_isws(UChar c);
00126
00134 UChar*
00135 ufmt_defaultCPToUnicode(const char *s,
00136 int32_t len);
00137
00138
00146 char*
00147 ufmt_unicodeToDefaultCP(const UChar *s,
00148 int32_t len);
00149
00150 #endif
00151
00152
00153
00154