diff src/lex.l @ 2621:337a09dd1c06

[project @ 1997-01-24 21:49:41 by jwe]
author jwe
date Fri, 24 Jan 1997 21:55:06 +0000
parents ae47b0911863
children 7a820bb7f406
line wrap: on
line diff
--- a/src/lex.l	Thu Jan 23 16:26:26 1997 +0000
+++ b/src/lex.l	Fri Jan 24 21:55:06 1997 +0000
@@ -1341,8 +1341,17 @@
 static void
 handle_number (char *yytext)
 {
+  char *tmp = strsave (yytext);
+
+  char *idx = strpbrk (tmp, "Dd");
+
+  if (idx)
+    *idx = 'e';
+
   double value;
-  int nread = sscanf (yytext, "%lf", &value);
+  int nread = sscanf (tmp, "%lf", &value);
+
+  delete [] tmp;
 
   // If yytext doesn't contain a valid number, we are in deep doo doo.