Changeset bd1deed in mainline for kernel/generic/src/printf/vprintf.c
- Timestamp:
- 2007-02-11T20:04:08Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c993e45
- Parents:
- ce8aed1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/printf/vprintf.c
rce8aed1 rbd1deed 37 37 #include <putchar.h> 38 38 39 int vprintf_write(const char *str, size_t count, void *unused); 39 static int vprintf_write(const char *str, size_t count, void *unused) 40 { 41 size_t i; 42 for (i = 0; i < count; i++) 43 putchar(str[i]); 44 return i; 45 } 40 46 41 int vprintf_write(const char *str, size_t count, void *unused)47 int puts(const char *s) 42 48 { 43 size_t i = 0;44 for ( ; i < count; i++)45 putchar(s tr[i]);49 size_t i; 50 for (i = 0; s[i] != 0; i++) 51 putchar(s[i]); 46 52 return i; 47 53 } … … 49 55 int vprintf(const char *fmt, va_list ap) 50 56 { 51 struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL};57 struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; 52 58 return printf_core(fmt, &ps, ap); 53 59
Note:
See TracChangeset
for help on using the changeset viewer.