Parse a string supposed to be a double.
557 if (space_before)
while (isspace(*d)) d++;
558 for (st = INIT, p = d ; *p ; p++)
563 if (st == INIT || st == NEED_DIG) st = DIG;
564 else if (st == NEED_DIG_DEC) st = DIG_DEC;
565 else if (st == NEED_DIG_EXP || st == EXP) st = DIG_EXP;
566 else if (st == DIG || st == DIG_DEC || st == DIG_EXP);
571 if (st == DIG) st = NEED_DIG_DEC;
574 else if (*p ==
'-' || *p ==
'+')
576 if (st == INIT) st = NEED_DIG;
577 else if (st == EXP) st = NEED_DIG_EXP;
580 else if (*p ==
'e' || *p ==
'E')
582 if (st == DIG || st == DIG_DEC) st = EXP;
585 else if (isspace(*p))
587 if (!space_after)
gml_lwpgerror(
"invalid GML representation", 11);
588 if (st == DIG || st == DIG_DEC || st == DIG_EXP)st = END;
589 else if (st == NEED_DIG_DEC) st = END;
596 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)