Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 4292 → Rev 4155

/branches/network/uspace/lib/libc/include/event.h
File deleted
/branches/network/uspace/lib/libc/include/ipc/console.h
40,7 → 40,6
typedef enum {
CONSOLE_GETKEY = IPC_FIRST_USER_METHOD,
CONSOLE_PUTCHAR,
CONSOLE_WRITE,
CONSOLE_CLEAR,
CONSOLE_GOTO,
CONSOLE_GETSIZE,
48,8 → 47,7
CONSOLE_SET_STYLE,
CONSOLE_SET_COLOR,
CONSOLE_SET_RGB_COLOR,
CONSOLE_CURSOR_VISIBILITY,
CONSOLE_KCON_ENABLE
CONSOLE_CURSOR_VISIBILITY
} console_request_t;
 
#endif
/branches/network/uspace/lib/libc/include/console.h
37,22 → 37,10
 
#include <console/style.h>
#include <console/color.h>
#include <sys/types.h>
#include <bool.h>
 
extern void console_open(bool);
extern void console_close(void);
 
extern int console_phone_get(bool);
extern void console_wait(void);
 
extern void console_clear(void);
extern void console_goto(int, int);
extern void console_putchar(wchar_t);
extern ssize_t console_write(const char *buf, size_t nbyte);
extern void console_putstr(const char *s);
extern void console_flush(void);
 
extern int console_get_size(int *, int *);
extern void console_set_style(int);
extern void console_set_color(int, int, int);
59,8 → 47,6
extern void console_set_rgb_color(int, int);
extern void console_cursor_visibility(int);
 
extern void console_kcon_enable(void);
 
#endif
/** @}
/branches/network/uspace/lib/libc/include/string.h
37,50 → 37,7
 
#include <mem.h>
#include <sys/types.h>
#include <bool.h>
 
#define U_SPECIAL '?'
#define U_BOM 0xfeff
 
/**< No size limit constant */
#define STR_NO_LIMIT ((size_t) -1)
 
/**< Maximum size of a string containing cnt characters */
#define STR_BOUNDS(cnt) (cnt << 2)
 
extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz);
 
extern size_t str_size(const char *str);
extern size_t wstr_size(const wchar_t *str);
 
extern size_t str_lsize(const char *str, count_t max_len);
extern size_t wstr_lsize(const wchar_t *str, count_t max_len);
 
extern count_t str_length(const char *str);
extern count_t wstr_length(const wchar_t *wstr);
 
extern count_t str_nlength(const char *str, size_t size);
extern count_t wstr_nlength(const wchar_t *str, size_t size);
 
extern bool ascii_check(wchar_t ch);
extern bool chr_check(wchar_t ch);
 
extern int str_cmp(const char *s1, const char *s2);
extern int str_lcmp(const char *s1, const char *s2, count_t max_len);
 
extern void str_ncpy(char *dst, const char *src, size_t size);
extern void wstr_nstr(char *dst, const wchar_t *src, size_t size);
 
extern const char *str_chr(const char *str, wchar_t ch);
 
extern bool wstr_linsert(wchar_t *str, wchar_t ch, count_t pos, count_t max_pos);
extern bool wstr_remove(wchar_t *str, count_t pos);
 
/*
* TODO: Get rid of this.
*/
 
extern int strcmp(const char *, const char *);
extern int strncmp(const char *, const char *, size_t);
extern int stricmp(const char *, const char *);
/branches/network/uspace/lib/libc/include/stdio.h
69,7 → 69,6
 
extern int puts(const char *);
extern int putchar(int);
extern int fflush(FILE *);
 
extern int printf(const char *, ...);
extern int asprintf(char **, const char *, ...);
/branches/network/uspace/lib/libc/include/unistd.h
60,7 → 60,7
extern int chdir(const char *);
extern char *getcwd(char *buf, size_t);
 
extern void _exit(int status) __attribute__ ((noreturn));
extern void _exit(int status);
extern void *sbrk(ssize_t incr);
extern int usleep(unsigned long usec);
extern unsigned int sleep(unsigned int seconds);
/branches/network/uspace/lib/libc/include/kbd/kbd.h
35,8 → 35,6
#ifndef LIBC_KBD_H_
#define LIBC_KBD_H_
 
#include <sys/types.h>
 
typedef enum kbd_ev_type {
KE_PRESS,
KE_RELEASE
54,7 → 52,7
unsigned int mods;
 
/** The character that was generated or '\0' for none. */
wchar_t c;
char c;
} kbd_event_t;
 
extern int kbd_get_event(kbd_event_t *);
/branches/network/uspace/lib/libc/include/io/stream.h
39,13 → 39,17
 
#define EMFILE -17
 
extern void open_console(void);
extern void close_console(void);
extern void klog_update(void);
 
extern ssize_t read_stdin(void *, size_t);
extern ssize_t write_stdout(const void *, size_t);
extern ssize_t write_stderr(const void *, size_t);
extern int flush_stdout(void);
 
extern int get_console_phone(void);
extern void console_wait(void);
 
#endif
 
/** @}
/branches/network/uspace/lib/libc/include/io/printf_core.h
39,19 → 39,16
#include <stdarg.h>
 
/** Structure for specifying output methods for different printf clones. */
typedef struct printf_spec {
/* String output function, returns number of printed characters or EOF */
int (*str_write)(const char *, size_t, void *);
struct printf_spec {
/* Output function, returns count of printed characters or EOF */
int (*write)(void *, size_t, void *);
/* Support data - output stream specification, its state, locks,... */
void *data;
/* Wide string output function, returns number of printed characters or EOF */
int (*wstr_write)(const wchar_t *, size_t, void *);
};
/* User data - output stream specification, state, locks, etc. */
void *data;
} printf_spec_t;
int printf_core(const char *fmt, struct printf_spec *ps ,va_list ap);
 
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
 
#endif
 
/** @}
/branches/network/uspace/lib/libc/include/sys/types.h
37,11 → 37,11
 
#include <libarch/types.h>
 
typedef unsigned long size_t;
typedef signed long ssize_t;
typedef long off_t;
typedef int mode_t;
 
typedef int32_t wchar_t;
 
typedef volatile uint8_t ioport8_t;
typedef volatile uint16_t ioport16_t;
typedef volatile uint32_t ioport32_t;