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

uscanf.h File Reference

Go to the source code of this file.

Compounds

struct  u_scanf_spec_info

Typedefs

typedef struct u_scanf_spec_info u_scanf_spec_info
typedef int32_t (* u_scanf_info )(const u_scanf_spec_info *info, int32_t *argtypes, int32_t n)
 A u_scanf info function. More...

typedef int32_t (* u_scanf_handler )(UFILE *stream, const u_scanf_spec_info *info, ufmt_args *args, const UChar *fmt, int32_t *consumed)
 A u_scanf handler function. More...


Functions

int32_t u_scanf_register_handler (UChar spec, u_scanf_info info, u_scanf_handler handler)
 Register a u_scanf handler function with u_scanf. More...


Typedef Documentation

typedef int32_t (* u_scanf_handler)(UFILE *stream, const u_scanf_spec_info *info, ufmt_args *args, const UChar *fmt, int32_t *consumed)
 

A u_scanf handler function.

A u_scanf handler is responsible for handling a single u_scanf format specification, for example 'd' or 's'.

Parameters:
stream   The UFILE to which to write output.
info   A pointer to a u_scanf_spec_info struct containing information on the format specification.
args   A pointer to the argument data
fmt   A pointer to the first character in the format string following the spec.
consumed   On output, set to the number of characters consumed in fmt.
Returns:
The number of arguments converted and assigned, or -1 if an error occurred.

Definition at line 73 of file uscanf.h.

typedef int32_t (* u_scanf_info)(const u_scanf_spec_info *info, int32_t *argtypes, int32_t n)
 

A u_scanf info function.

A u_scanf info is reponsible for reporting to u_scanf how many arguments are required for the u_scanf_spec_info info, and what their types are.

Parameters:
info   A pointer to a uscan_info struct containing information on the format specification.
argtypes   The array to receive the types of arguments specified by info.
n   The number of available slots in the array argtypes
Returns:
The number of arguments required by info.

Definition at line 54 of file uscanf.h.

typedef struct u_scanf_spec_info u_scanf_spec_info
 

Definition at line 40 of file uscanf.h.


Function Documentation

int32_t u_scanf_register_handler ( UChar spec,
u_scanf_info info,
u_scanf_handler handler )
 

Register a u_scanf handler function with u_scanf.

Parameters:
spec   The format specififier handled by the handler func.
nfo   A pointer to the u_scanf_info function used to determine how many arguments are required for spec, and what their types are.
handler   A pointer to the u_scanf_handler function.
Returns:
0 if successful


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