Ignore:
Timestamp:
2009-03-24T14:43:25Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f29e336
Parents:
74c8da2c
Message:

Unicode aware printf and family functions
(this breaks some things, but will be fixed soon)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/printf/printf_core.h

    r74c8da2c reec616b  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_PRINTF_CORE_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <arch/arg.h>
    4040
    4141/** Structure for specifying output methods for different printf clones. */
    42 struct printf_spec {
    43         /* Output function, returns count of printed characters or EOF */
    44         int (*write)(void *, size_t, void *);
    45         /* Support data - output stream specification, its state, locks,... */
     42typedef struct {
     43        /* UTF-8 output function, returns number of printed UTF-8 characters or EOF */
     44        int (*write_utf8)(const char *, size_t, void *);
     45       
     46        /* UTF-32 output function, returns number of printed UTF-32 characters or EOF */
     47        int (*write_utf32)(const wchar_t *, size_t, void *);
     48       
     49        /* User data - output stream specification, state, locks, etc. */
    4650        void *data;
     51} printf_spec_t;
    4752
    48 };
    49 
    50 int printf_core(const char *fmt, struct printf_spec *ps, va_list ap);
     53int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
    5154
    5255#endif
Note: See TracChangeset for help on using the changeset viewer.