Changeset 369a5f8 in mainline for uspace/lib/c
- Timestamp:
- 2010-04-20T15:01:43Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9efff92
- Parents:
- 9f1362d4
- Location:
- uspace/lib/c
- Files:
-
- 9 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
r9f1362d4 r369a5f8 79 79 generic/io/printf_core.c \ 80 80 generic/io/console.c \ 81 generic/io/screenbuffer.c \ 81 82 generic/malloc.c \ 82 83 generic/sysinfo.c \ -
uspace/lib/c/generic/io/asprintf.c
r9f1362d4 r369a5f8 61 61 int asprintf(char **strp, const char *fmt, ...) 62 62 { 63 struct printf_specps = {63 printf_spec_t ps = { 64 64 asprintf_str_write, 65 65 asprintf_wstr_write, -
uspace/lib/c/generic/io/screenbuffer.c
r9f1362d4 r369a5f8 34 34 35 35 #include <io/style.h> 36 #include <io/screenbuffer.h> 36 37 #include <malloc.h> 37 38 #include <unistd.h> 38 #include "screenbuffer.h"39 39 40 40 /** Store one character to screenbuffer. -
uspace/lib/c/generic/io/vprintf.c
r9f1362d4 r369a5f8 76 76 int vfprintf(FILE *stream, const char *fmt, va_list ap) 77 77 { 78 struct printf_specps = {78 printf_spec_t ps = { 79 79 vprintf_str_write, 80 80 vprintf_wstr_write, -
uspace/lib/c/include/io/color.h
r9f1362d4 r369a5f8 36 36 #define LIBC_IO_COLOR_H_ 37 37 38 enum console_color{38 typedef enum { 39 39 COLOR_BLACK = 0, 40 40 COLOR_BLUE = 1, … … 48 48 CATTR_BRIGHT = 8, 49 49 CATTR_BLINK = 8 50 } ;50 } console_color_t; 51 51 52 52 #endif -
uspace/lib/c/include/io/console.h
r9f1362d4 r369a5f8 44 44 } console_ev_type_t; 45 45 46 enum {46 typedef enum { 47 47 CONSOLE_CCAP_NONE = 0, 48 48 CONSOLE_CCAP_STYLE, 49 49 CONSOLE_CCAP_INDEXED, 50 50 CONSOLE_CCAP_RGB 51 } ;51 } console_caps_t; 52 52 53 53 /** Console event structure. */ -
uspace/lib/c/include/io/keycode.h
r9f1362d4 r369a5f8 51 51 * they really are organized here by position, rather than by label. 52 52 */ 53 enum keycode{53 typedef enum { 54 54 55 55 /* Main block row 1 */ … … 199 199 } keycode_t; 200 200 201 enum keymod{201 typedef enum { 202 202 KM_LSHIFT = 0x001, 203 203 KM_RSHIFT = 0x002, -
uspace/lib/c/include/io/klog.h
r9f1362d4 r369a5f8 33 33 */ 34 34 35 #ifndef LIBC_ STREAM_H_36 #define LIBC_ STREAM_H_35 #ifndef LIBC_IO_KLOG_H_ 36 #define LIBC_IO_KLOG_H_ 37 37 38 38 #include <sys/types.h> 39 39 40 extern size_t klog_write(const void * buf, size_t size);40 extern size_t klog_write(const void *, size_t); 41 41 extern void klog_update(void); 42 42 -
uspace/lib/c/include/io/printf_core.h
r9f1362d4 r369a5f8 40 40 41 41 /** Structure for specifying output methods for different printf clones. */ 42 typedef struct printf_spec{42 typedef struct { 43 43 /* String output function, returns number of printed characters or EOF */ 44 44 int (*str_write)(const char *, size_t, void *); … … 51 51 } printf_spec_t; 52 52 53 int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);53 extern int printf_core(const char *, printf_spec_t *, va_list); 54 54 55 55 #endif -
uspace/lib/c/include/io/screenbuffer.h
r9f1362d4 r369a5f8 33 33 */ 34 34 35 #ifndef SCREENBUFFER_H__36 #define SCREENBUFFER_H__35 #ifndef LIBC_SCREENBUFFER_H__ 36 #define LIBC_SCREENBUFFER_H__ 37 37 38 38 #include <stdint.h> … … 41 41 #include <bool.h> 42 42 43 #define DEFAULT_FOREGROUND 0x000000 /**< default console foreground color */ 44 #define DEFAULT_BACKGROUND 0xf0f0f0 /**< default console background color */ 43 typedef enum { 44 at_style, 45 at_idx, 46 at_rgb 47 } attr_type_t; 45 48 46 49 typedef struct { … … 59 62 } attr_rgb_t; 60 63 64 typedef union { 65 attr_style_t s; 66 attr_idx_t i; 67 attr_rgb_t r; 68 } attr_val_t; 69 61 70 typedef struct { 62 enum { 63 at_style, 64 at_idx, 65 at_rgb 66 } t; 67 union { 68 attr_style_t s; 69 attr_idx_t i; 70 attr_rgb_t r; 71 } a; 71 attr_type_t t; 72 attr_val_t a; 72 73 } attrs_t; 73 74 … … 121 122 * 122 123 */ 123 static inline intattrs_same(attrs_t a1, attrs_t a2)124 static inline bool attrs_same(attrs_t a1, attrs_t a2) 124 125 { 125 126 if (a1.t != a2.t) 126 return 0;127 return false; 127 128 128 129 switch (a1.t) { … … 138 139 } 139 140 140 return 0;141 return false; 141 142 } 142 143 -
uspace/lib/c/include/io/style.h
r9f1362d4 r369a5f8 36 36 #define LIBC_IO_STYLE_H_ 37 37 38 enum console_style{38 typedef enum { 39 39 STYLE_NORMAL = 0, 40 40 STYLE_EMPHASIS = 1, 41 41 STYLE_INVERTED = 2, 42 42 STYLE_SELECTED = 3 43 } ;43 } console_style_t; 44 44 45 45 #endif
Note:
See TracChangeset
for help on using the changeset viewer.