Subversion Repositories HelenOS

Rev

Rev 2927 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2927 Rev 4347
Line 33... Line 33...
33
 */
33
 */
34
 
34
 
35
#ifndef KERN_PRINTF_CORE_H_
35
#ifndef KERN_PRINTF_CORE_H_
36
#define KERN_PRINTF_CORE_H_
36
#define KERN_PRINTF_CORE_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <typedefs.h>
39
#include <arch/arg.h>
39
#include <arch/arg.h>
40
 
40
 
41
/** Structure for specifying output methods for different printf clones. */
41
/** Structure for specifying output methods for different printf clones. */
42
struct printf_spec {
42
typedef struct {
43
    /* Output function, returns count of printed characters or EOF */
43
    /* UTF-8 output function, returns number of printed UTF-8 characters or EOF */
44
    int (*write)(void *, size_t, void *);
44
    int (*write_utf8)(const char *, size_t, void *);
-
 
45
   
45
    /* Support data - output stream specification, its state, locks,... */
46
    /* UTF-32 output function, returns number of printed UTF-32 characters or EOF */
46
    void *data;
47
    int (*write_utf32)(const wchar_t *, size_t, void *);
47
 
48
   
-
 
49
    /* User data - output stream specification, state, locks, etc. */
48
};
50
    void *data;
-
 
51
} printf_spec_t;
49
 
52
 
50
int printf_core(const char *fmt, struct printf_spec *ps, va_list ap);
53
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
51
 
54
 
52
#endif
55
#endif
53
 
56
 
54
/** @}
57
/** @}
55
 */
58
 */