~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

Viewing changes to source/extra/ustdio/uprintf.h

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
******************************************************************************
3
 
*
4
 
*   Copyright (C) 1998-2001, International Business Machines
5
 
*   Corporation and others.  All Rights Reserved.
6
 
*
7
 
******************************************************************************
8
 
*
9
 
* File uprintf.h
10
 
*
11
 
* Modification History:
12
 
*
13
 
*   Date        Name        Description
14
 
*   11/19/98    stephen        Creation.
15
 
*   03/12/99    stephen     Modified for new C API.
16
 
******************************************************************************
17
 
*/
18
 
 
19
 
#ifndef UPRINTF_H
20
 
#define UPRINTF_H
21
 
 
22
 
#include "unicode/utypes.h"
23
 
#include "unicode/ustdio.h"
24
 
#include "ufmt_cmn.h"
25
 
 
26
 
/**
27
 
 * Struct encapsulating a single uprintf format specification.
28
 
 */
29
 
struct u_printf_spec_info {
30
 
  UChar     fSpec;            /* Conversion specification */
31
 
 
32
 
  int32_t    fPrecision;        /* Precision  */
33
 
  int32_t    fWidth;            /* Width  */
34
 
 
35
 
  UChar     fPadChar;        /* Padding character  */
36
 
 
37
 
  UBool     fAlt;            /* # flag  */
38
 
  UBool     fSpace;            /* Space flag  */
39
 
  UBool     fLeft;            /* - flag  */
40
 
  UBool     fShowSign;        /* + flag  */
41
 
  UBool     fZero;            /* 0 flag  */
42
 
 
43
 
  UBool     fIsLongDouble;        /* L flag  */
44
 
  UBool     fIsShort;        /* h flag  */
45
 
  UBool     fIsLong;        /* l flag  */
46
 
  UBool     fIsLongLong;        /* ll flag  */
47
 
};
48
 
typedef struct u_printf_spec_info u_printf_spec_info;
49
 
 
50
 
 
51
 
/**
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>.
60
 
 */
61
 
typedef int32_t (*u_printf_handler) (UFILE             *stream,
62
 
                     const u_printf_spec_info     *info,
63
 
                     const ufmt_args            *args);
64
 
 
65
 
 
66
 
#endif
67