Changeset 5b7f418 in mainline for uspace/lib/libc/generic/io/printf_core.c
- Timestamp:
- 2009-04-06T15:08:00Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7b0297b
- Parents:
- a78d001
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/printf_core.c
ra78d001 r5b7f418 249 249 */ 250 250 static int print_str(char *str, int width, unsigned int precision, 251 251 uint32_t flags, printf_spec_t *ps) 252 252 { 253 253 if (str == NULL) … … 297 297 */ 298 298 static int print_wstr(wchar_t *str, int width, unsigned int precision, 299 299 uint32_t flags, printf_spec_t *ps) 300 300 { 301 301 if (str == NULL) 302 302 return printf_putstr(nullstr, ps); 303 303 304 if (*str == U_BOM) 305 str++; 306 304 307 /* Print leading spaces. */ 305 308 size_t strw = wstr_length(str); 306 309 if (precision == 0) 307 310 precision = strw; 308 311 309 312 /* Left padding */ 310 313 count_t counter = 0; … … 316 319 } 317 320 } 318 321 319 322 /* Part of @a wstr fitting into the alloted space. */ 320 323 int retval; … … 322 325 if ((retval = printf_wputnchars(str, size, ps)) < 0) 323 326 return -counter; 324 327 325 328 counter += retval; 326 329 327 330 /* Right padding */ 328 331 while (width-- > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.