From cd50beca3a8b3a4c71de93aaf621347d6860b31d Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 22 Jun 2019 11:48:39 +0200 Subject: [PATCH] mescc: Mes C Library: Support GNU Awk: vsscanf: Support %f. * lib/stdio/vsscanf.c (vsscanf): Support %f. --- lib/stdio/vsscanf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/stdio/vsscanf.c b/lib/stdio/vsscanf.c index 4ea05f27..102ad3a0 100644 --- a/lib/stdio/vsscanf.c +++ b/lib/stdio/vsscanf.c @@ -66,6 +66,15 @@ vsscanf (char const *s, char const *template, va_list ap) count++; break; } + case 'e': + case 'f': + case 'g': + case 'E': + case 'G': + { + float *f = va_arg (ap, float *); + *f = strtod (p, &p); + } default: { eputs ("vsscanf: not supported: %:");