mescc: Mes C Library: Support GNU Awk: vsscanf: Support %f.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 22 Jun 2019 09:48:39 +0000 (11:48 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 22 Jun 2019 09:48:39 +0000 (11:48 +0200)
* lib/stdio/vsscanf.c (vsscanf): Support %f.

lib/stdio/vsscanf.c

index 4ea05f270ffd878ab4e9c74abac88fb149fca2fc..102ad3a0e51e11726fd63adf472203fce79722e5 100644 (file)
@@ -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: %:");