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

« back to all changes in this revision

Viewing changes to source/extra/ustdio/uscanf.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 uscanf.h
10
 
*
11
 
* Modification History:
12
 
*
13
 
*   Date        Name        Description
14
 
*   12/02/98    stephen        Creation.
15
 
*   03/13/99    stephen     Modified for new C API.
16
 
******************************************************************************
17
 
*/
18
 
 
19
 
#ifndef USCANF_H
20
 
#define USCANF_H
21
 
 
22
 
#include "unicode/ustdio.h"
23
 
#include "ufmt_cmn.h"
24
 
 
25
 
/**
26
 
 * Struct encapsulating a single uscanf format specification.
27
 
 */
28
 
struct u_scanf_spec_info {
29
 
  UChar     fSpec;            /* Format specification  */
30
 
 
31
 
  int32_t    fWidth;            /* Width  */
32
 
 
33
 
  UChar     fPadChar;        /* Padding character  */
34
 
 
35
 
  UBool     fIsLongDouble;        /* L flag  */
36
 
  UBool     fIsShort;        /* h flag  */
37
 
  UBool     fIsLong;        /* l flag  */
38
 
  UBool     fIsLongLong;        /* ll flag  */
39
 
};
40
 
typedef struct u_scanf_spec_info u_scanf_spec_info;
41
 
 
42
 
/**
43
 
 * A u_scanf handler function.  
44
 
 * A u_scanf handler is responsible for handling a single u_scanf 
45
 
 * format specification, for example 'd' or 's'.
46
 
 * @param stream The UFILE to which to write output.
47
 
 * @param info A pointer to a <TT>u_scanf_spec_info</TT> struct containing
48
 
 * information on the format specification.
49
 
 * @param args A pointer to the argument data
50
 
 * @param fmt A pointer to the first character in the format string
51
 
 * following the spec.
52
 
 * @param consumed On output, set to the number of characters consumed
53
 
 * in <TT>fmt</TT>.
54
 
 * @return The number of arguments converted and assigned, or -1 if an
55
 
 * error occurred.
56
 
 */
57
 
typedef int32_t (*u_scanf_handler) (UFILE            *stream,
58
 
                   const u_scanf_spec_info     *info,
59
 
                   ufmt_args  *args,
60
 
                   const UChar            *fmt,
61
 
                   int32_t            *consumed);
62
 
 
63
 
 
64
 
#endif
65