Parse a string supposed to be a double.
479 if (space_before)
while (isspace(*d)) d++;
480 for (st = INIT, p = d ; *p ; p++)
485 if (st == INIT || st == NEED_DIG) st = DIG;
486 else if (st == NEED_DIG_DEC) st = DIG_DEC;
487 else if (st == NEED_DIG_EXP || st == EXP) st = DIG_EXP;
488 else if (st == DIG || st == DIG_DEC || st == DIG_EXP);
493 if (st == DIG) st = NEED_DIG_DEC;
496 else if (*p ==
'-' || *p ==
'+')
498 if (st == INIT) st = NEED_DIG;
499 else if (st == EXP) st = NEED_DIG_EXP;
502 else if (*p ==
'e' || *p ==
'E')
504 if (st == DIG || st == DIG_DEC) st = EXP;
507 else if (isspace(*p))
509 if (!space_after)
gml_lwpgerror(
"invalid GML representation", 11);
510 if (st == DIG || st == DIG_DEC || st == DIG_EXP)st = END;
511 else if (st == NEED_DIG_DEC) st = END;
518 if (st != DIG && st != NEED_DIG_DEC && st != DIG_DEC && st != DIG_EXP && st != END)
static void gml_lwpgerror(char *msg, __attribute__((__unused__)) int error_code)