Changeset eec616b in mainline for kernel/generic/include


Ignore:
Timestamp:
2009-03-24T14:43:25Z (17 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)

Location:
kernel/generic/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/console/chardev.h

    r74c8da2c reec616b  
    7272typedef struct {
    7373        /** Write character to output. */
    74         void (* write)(struct outdev *, char c, bool silent);
     74        void (* write)(struct outdev *, wchar_t c, bool silent);
    7575} outdev_operations_t;
    7676
  • kernel/generic/include/console/console.h

    r74c8da2c reec616b  
    5353extern uint8_t _getc(indev_t *indev);
    5454extern count_t gets(indev_t *indev, char *buf, size_t buflen);
    55 extern void putchar(char c);
    5655extern unative_t sys_klog(int fd, const void * buf, size_t count);
    5756
  • kernel/generic/include/print.h

    r74c8da2c reec616b  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    4747extern int puts(const char *s);
    4848extern int printf(const char *fmt, ...);
    49 extern int sprintf(char *str, const char *fmt, ...);
    5049extern int snprintf(char *str, size_t size, const char *fmt, ...);
    5150
    5251extern int vprintf(const char *fmt, va_list ap);
    53 extern int vsprintf(char *str, const char *fmt, va_list ap);
    5452extern int vsnprintf(char *str, size_t size, const char *fmt, va_list ap);
    5553
  • 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
  • kernel/generic/include/putchar.h

    r74c8da2c reec616b  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_PUTCHAR_H_
    3737
    38 extern void putchar(const char ch);
     38extern void putchar(const wchar_t ch);
    3939
    4040#endif
Note: See TracChangeset for help on using the changeset viewer.