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