[Ecm-commits] r2578 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Tue Feb 3 13:39:06 CET 2015


Author: dcleaver
Date: 2015-02-03 13:39:06 +0100 (Tue, 03 Feb 2015)
New Revision: 2578

Modified:
   trunk/eval.c
Log:
Update to allow gmp-ecm on Windows to properly receive and parse expressions from the command line

Modified: trunk/eval.c
===================================================================
--- trunk/eval.c	2015-02-03 06:38:12 UTC (rev 2577)
+++ trunk/eval.c	2015-02-03 12:39:06 UTC (rev 2578)
@@ -116,7 +116,7 @@
         }
 
       /* strip space and tabs out here, and then we DON'T have to mess with them in the rest of the parser */
-      if (!isspace (c))
+      if (!isspace (c) && c != '"' && c != '\'')
 	expr[nCurSize++] = (char) c;
 
       if (nCurSize == nMaxSize)
@@ -193,7 +193,7 @@
   while (*c && !IS_NEWLINE(*c) && *c != ';')
     {
       /* strip space and tabs out here, and then we DON'T have to mess with them in the rest of the parser */
-      if (!isspace((int) *c))
+      if (!isspace((int) *c) && *c != '"' && *c != '\'')
 	expr[nCurSize++] = *c;
       if (nCurSize == nMaxSize)
       {



More information about the Ecm-commits mailing list