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
* 12/02/98 stephen Creation.
15
* 03/13/99 stephen Modified for new C API.
16
******************************************************************************
22
#include "unicode/ustdio.h"
26
* Struct encapsulating a single uscanf format specification.
28
struct u_scanf_spec_info {
29
UChar fSpec; /* Format specification */
31
int32_t fWidth; /* Width */
33
UChar fPadChar; /* Padding character */
35
UBool fIsLongDouble; /* L flag */
36
UBool fIsShort; /* h flag */
37
UBool fIsLong; /* l flag */
38
UBool fIsLongLong; /* ll flag */
40
typedef struct u_scanf_spec_info u_scanf_spec_info;
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
52
* @param consumed On output, set to the number of characters consumed
54
* @return The number of arguments converted and assigned, or -1 if an
57
typedef int32_t (*u_scanf_handler) (UFILE *stream,
58
const u_scanf_spec_info *info,