Changeset c7c6afd in mainline for kernel/generic/src/printf/vprintf.c
- Timestamp:
- 2025-04-13T23:27:44Z (4 weeks ago)
- Children:
- b6061f8c
- Parents:
- 240b2e4 (diff), f5e1692 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Wayne Thornton <wmthornton-dev@…> (2025-04-13 23:27:44)
- git-committer:
- GitHub <noreply@…> (2025-04-13 23:27:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/printf/vprintf.c
r240b2e4 rc7c6afd 36 36 #include <console/console.h> 37 37 #include <print.h> 38 #include <printf /printf_core.h>38 #include <printf_core.h> 39 39 #include <putchar.h> 40 40 #include <str.h> … … 42 42 #include <typedefs.h> 43 43 44 static int vprintf_str_write(const char *str, size_t size, void *data)44 static errno_t vprintf_str_write(const char *str, size_t size, void *data) 45 45 { 46 46 size_t offset = 0; 47 size_t chars = 0;48 47 49 while (offset < size) {48 while (offset < size) 50 49 putuchar(str_decode(str, &offset, size)); 51 chars++;52 }53 50 54 return chars; 55 } 56 57 static int vprintf_wstr_write(const char32_t *str, size_t size, void *data) 58 { 59 size_t offset = 0; 60 size_t chars = 0; 61 62 while (offset < size) { 63 putuchar(str[chars]); 64 chars++; 65 offset += sizeof(char32_t); 66 } 67 68 return chars; 51 return EOK; 69 52 } 70 53 … … 92 75 printf_spec_t ps = { 93 76 vprintf_str_write, 94 vprintf_wstr_write,95 77 NULL 96 78 };
Note:
See TracChangeset
for help on using the changeset viewer.