2
******************************************************************************
4
* Copyright (C) 1998-2001, International Business Machines
5
* Corporation and others. All Rights Reserved.
7
******************************************************************************
11
* Modification History:
13
* Date Name Description
14
* 11/19/98 stephen Creation.
15
* 03/12/99 stephen Modified for new C API.
16
******************************************************************************
22
#include "unicode/utypes.h"
23
#include "unicode/ustdio.h"
27
* Struct encapsulating a single uprintf format specification.
29
struct u_printf_spec_info {
30
UChar fSpec; /* Conversion specification */
32
int32_t fPrecision; /* Precision */
33
int32_t fWidth; /* Width */
35
UChar fPadChar; /* Padding character */
37
UBool fAlt; /* # flag */
38
UBool fSpace; /* Space flag */
39
UBool fLeft; /* - flag */
40
UBool fShowSign; /* + flag */
41
UBool fZero; /* 0 flag */
43
UBool fIsLongDouble; /* L flag */
44
UBool fIsShort; /* h flag */
45
UBool fIsLong; /* l flag */
46
UBool fIsLongLong; /* ll flag */
48
typedef struct u_printf_spec_info u_printf_spec_info;
52
* A u_printf handler function.
53
* A u_printf handler is responsible for handling a single u_printf
54
* format specification, for example 'd' or 's'.
55
* @param stream The UFILE to which to write output.
56
* @param info A pointer to a <TT>u_printf_spec_info</TT> struct containing
57
* information on the format specification.
58
* @param args A pointer to the argument data
59
* @return The number of Unicode characters written to <TT>stream</TT>.
61
typedef int32_t (*u_printf_handler) (UFILE *stream,
62
const u_printf_spec_info *info,
63
const ufmt_args *args);