Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ufmt_cmn.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 1998-1999, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *
00009 * File ufmt_cmn.h
00010 *
00011 * Modification History:
00012 *
00013 *   Date        Name        Description
00014 *   12/02/98    stephen        Creation.
00015 *   03/12/99    stephen     Modified for new C API.
00016 *   03/15/99    stephen     Added defaultCPToUnicode, unicodeToDefaultCP
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,      /* special flag for count */
00031   ufmt_int,        /* int */
00032   ufmt_char,       /* int, cast to char */
00033   ufmt_wchar,      /* wchar_t */
00034   ufmt_string,     /* char* */
00035   ufmt_wstring,    /* wchar_t* */
00036   ufmt_pointer,    /* void* */
00037   ufmt_float,      /* float */
00038   ufmt_double,     /* double */
00039   ufmt_date,       /* Date */
00040   ufmt_uchar,      /* int, cast to UChar */
00041   ufmt_ustring,    /* UChar* */
00042   ufmt_last
00043 };
00044 
00048 union ufmt_args {
00049   int     intValue;      /* int, UChar */
00050   float   floatValue;    /* float */
00051   double  doubleValue;   /* double */
00052   void    *ptrValue;     /* any pointer - void*, char*, wchar_t*, UChar* */
00053   wchar_t wcharValue;    /* wchar_t */
00054   UDate   dateValue;     /* Date */
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 

Generated at Tue Dec 5 17:55:35 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000