Changeset c7c6afd in mainline for uspace/lib/c/generic/io/kio.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
-
uspace/lib/c/generic/io/kio.c
r240b2e4 rc7c6afd 131 131 } 132 132 133 static int kio_vprintf_str_write(const char *str, size_t size, void *data)133 static errno_t kio_vprintf_str_write(const char *str, size_t size, void *data) 134 134 { 135 size_t wr; 136 137 wr = 0; 138 (void) kio_write(str, size, &wr); 139 return str_nlength(str, wr); 140 } 141 142 static int kio_vprintf_wstr_write(const char32_t *str, size_t size, void *data) 143 { 144 size_t offset = 0; 145 size_t chars = 0; 146 size_t wr; 147 148 while (offset < size) { 149 char buf[STR_BOUNDS(1)]; 150 size_t sz = 0; 151 152 if (chr_encode(str[chars], buf, &sz, STR_BOUNDS(1)) == EOK) 153 kio_write(buf, sz, &wr); 154 155 chars++; 156 offset += sizeof(char32_t); 157 } 158 159 return chars; 135 size_t wr = 0; 136 return kio_write(str, size, &wr); 160 137 } 161 138 … … 172 149 printf_spec_t ps = { 173 150 kio_vprintf_str_write, 174 kio_vprintf_wstr_write,175 151 NULL 176 152 };
Note:
See TracChangeset
for help on using the changeset viewer.