mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
libs/libc/stdio/lib_libvsprintf.c: Back out most of commit d0254b1c79. While logic seemed correct, verify against glibc showed differs. The output now matches the output form glibc:
This code sequence:
printf("%3.3u %3.3u %3.3u %3.3u %3.3u\n",
9, 99, 999, 9999, 99999);
printf("%3u %3u %3u %3u %3u\n",
9, 99, 999, 9999, 99999);
printf("%3.3lu %3.3lu %3.3lu %3.3lu %3.3lu\n",
9L, 99L, 999L, 9999L, 99999L);
printf("%3u %3u %3u %3u %3u\n",
9L, 99L, 999L, 9999L, 99999L);
printf("%3.3llu %3.3llu %3.3llu %3.3llu %3.3llu\n",
9LL, 99LL, 999LL, 9999LL, 99999LL);
printf("%3llu %3llu %3llu %3llu %3llu\n",
9LL, 99LL, 999LL, 9999LL, 99999LL);
Generates:
009 099 999 9999 99999
9 99 999 9999 99999
009 099 999 9999 99999
9 99 999 9999 99999
009 099 999 9999 99999
9 99 999 9999 99999
For both NuttX and glibc.
This commit is contained in:
+156
-216
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user