cosmopolitan/libc/fmt
Gautham a6f65eea7c
Scan fixed-width integers in vcscanf (#424)
When a format string like %2x is provided, the width parameter was read
correctly as 2, but it was not used when decoding the number from the
input string (ie instead of reading 2 characters from the input string,
vcscanf read all the characters).

This change uses the value of width within the number decoding loop to
read fixed number of digits correctly. if width is zero (not provided),
the default of width is set as bits.

Fixes #423
2022-06-26 21:27:07 -07:00
..
__xpg_strerror_r.c Add pthread tls api 2022-06-22 07:08:17 -07:00
abs.c Make improvements 2022-04-24 10:06:05 -07:00
atoi.c Make numerous improvements 2021-09-28 01:52:34 -07:00
atol.c Add cpu / mem / fsz limits to build system 2021-08-13 23:40:53 -07:00
atoll.c Add cpu / mem / fsz limits to build system 2021-08-13 23:40:53 -07:00
basename.c Fix basename() and dirname() 2022-04-06 00:13:44 -07:00
bing.c Change license 2020-12-27 17:18:44 -08:00
bing.internal.h Enhance chibicc 2020-12-09 04:00:48 -08:00
conv.h Fixup and polish chibicc some more 2022-06-20 04:32:25 -07:00
dirname.c Fix basename() and dirname() 2022-04-06 00:13:44 -07:00
div.c Change license 2020-12-27 17:18:44 -08:00
divmod10.internal.h Make improvements 2022-03-16 13:40:10 -07:00
fcvt.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
fmt.c Fix %c with nul character 2022-06-12 22:28:19 -07:00
fmt.h Make improvements 2022-04-24 10:06:05 -07:00
fmt.internal.h Make more fixes and improvements 2022-04-21 13:44:59 -07:00
fmt.mk Make fixes and improvements 2022-05-19 16:57:49 -07:00
formatbinary64.c Polish redbean serialization 2022-04-29 06:10:10 -07:00
formatflex64.c Polish redbean serialization 2022-04-29 06:10:10 -07:00
formathex64.c Polish redbean serialization 2022-04-29 06:10:10 -07:00
formatint64thousands.c Add torture test for zipos file descriptors 2022-06-15 16:29:49 -07:00
formatmemorysize.c Add torture test for zipos file descriptors 2022-06-15 16:29:49 -07:00
formatoctal32.c Do code cleanup use duff device linenoise i/o 2022-04-22 18:56:52 -07:00
formatoctal64.c Polish redbean serialization 2022-04-29 06:10:10 -07:00
i128abs.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
imaxabs.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
internal.h Support proper %g, %f, and %a float formatting 2021-03-05 10:31:16 -08:00
itoa.c Support proper %g, %f, and %a float formatting 2021-03-05 10:31:16 -08:00
itoa.h Add torture test for zipos file descriptors 2022-06-15 16:29:49 -07:00
itoa64.c Change noinline to dontinline (#312) 2021-11-12 15:12:18 -08:00
itoa64fixed16.greg.c Make numerous improvements 2021-09-28 01:52:34 -07:00
itoa64radix8.c Change noinline to dontinline (#312) 2021-11-12 15:12:18 -08:00
itoa64radix16.greg.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
itoa128radix10.greg.c Change noinline to dontinline (#312) 2021-11-12 15:12:18 -08:00
labs.c Make improvements 2022-04-24 10:06:05 -07:00
ldiv.c Change license 2020-12-27 17:18:44 -08:00
leb128.h Support Linux binfmt_misc and APE loading on Apple 2022-05-21 09:28:25 -07:00
lengthuint64.c Release redbean 2.0.1 2022-06-14 20:21:34 -07:00
llabs.c Make improvements 2022-04-24 10:06:05 -07:00
lldiv.c Change license 2020-12-27 17:18:44 -08:00
magnumstrs.internal.h Make some quick fixes and cleanup 2022-06-26 02:58:36 -07:00
ntoa.c Make more fixes and improvements 2022-04-21 13:44:59 -07:00
pad.c Make more fixes and improvements 2022-04-21 13:44:59 -07:00
pflink.h Make more fixes and improvements 2022-04-21 13:44:59 -07:00
sizetol.c Add cpu / mem / fsz limits to build system 2021-08-13 23:40:53 -07:00
sleb64.c Productionize new APE loader and more 2021-10-02 08:27:03 -07:00
sleb128.c Productionize new APE loader and more 2021-10-02 08:27:03 -07:00
snprintf.c Support proper %g, %f, and %a float formatting 2021-03-05 10:31:16 -08:00
sprintf.c Support thread local storage 2022-05-16 13:20:08 -07:00
sscanf.c Change license 2020-12-27 17:18:44 -08:00
stoa.c Make build hermetic without shell scripts 2022-05-25 13:55:57 -07:00
strerror.c Make improvements 2022-04-24 10:06:05 -07:00
strerror_r.c Make fixes and improvements 2022-05-19 16:57:49 -07:00
stripext.c Make numerous improvements 2021-09-28 01:52:34 -07:00
stripexts.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
strtoi128.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
strtoimax.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
strtol.c Make numerous improvements 2021-09-28 01:52:34 -07:00
strtol.internal.h Make numerous improvements 2021-09-28 01:52:34 -07:00
strtoll.c Fix typo bug in strtoll (#245) 2021-08-15 12:07:33 -07:00
strtoll_l.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
strtonum.c Change license 2020-12-27 17:18:44 -08:00
strtou128.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
strtoul.c Make numerous improvements 2021-09-28 01:52:34 -07:00
strtoull.c Add cpu / mem / fsz limits to build system 2021-08-13 23:40:53 -07:00
strtoull_l.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
strtoumax.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
swprintf.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
uleb64.c Add Compress() and Uncompress() to redbean 2022-05-16 16:49:20 -07:00
uleb128.c Productionize new APE loader and more 2021-10-02 08:27:03 -07:00
unbing.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
unhexbuf.c Change license 2020-12-27 17:18:44 -08:00
unsleb128.c Change license 2020-12-27 17:18:44 -08:00
unuleb64.c Add Compress() and Uncompress() to redbean 2022-05-16 16:49:20 -07:00
unzleb64.c Productionize new APE loader and more 2021-10-02 08:27:03 -07:00
vcscanf.c Scan fixed-width integers in vcscanf (#424) 2022-06-26 21:27:07 -07:00
vsnprintf.c Make more fixes and improvements 2022-06-13 11:02:13 -07:00
vsprintf.c Support proper %g, %f, and %a float formatting 2021-03-05 10:31:16 -08:00
vsscanf.c Change license 2020-12-27 17:18:44 -08:00
wcstoi128.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstoimax.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstol.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstoll.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstoll_l.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstou128.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstoul.c Make numerous improvements 2021-09-28 01:52:34 -07:00
wcstoull.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstoull_l.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
wcstoumax.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
zleb64.c Support Linux binfmt_misc and APE loading on Apple 2022-05-21 09:28:25 -07:00
zleb128.c Productionize new APE loader and more 2021-10-02 08:27:03 -07:00