Parse a string supposed to be a double.
472 if (space_before)
while (isspace(*d)) d++;
473 for (st = INIT, p = d ; *p ; p++)
478 if (st == INIT || st == NEED_DIG) st = DIG;
479 else if (st == NEED_DIG_DEC) st = DIG_DEC;
480 else if (st == NEED_DIG_EXP || st == EXP) st = DIG_EXP;
481 else if (st == DIG || st == DIG_DEC || st == DIG_EXP);
486 if (st == DIG) st = NEED_DIG_DEC;
489 else if (*p ==
'-' || *p ==
'+')
491 if (st == INIT) st = NEED_DIG;
492 else if (st == EXP) st = NEED_DIG_EXP;
495 else if (*p ==
'e' || *p ==
'E')
497 if (st == DIG || st == DIG_DEC) st = EXP;
500 else if (isspace(*p))
502 if (!space_after)
gml_lwpgerror(
"invalid GML representation", 11);
503 if (st == DIG || st == DIG_DEC || st == DIG_EXP)st = END;
504 else if (st == NEED_DIG_DEC) st = END;
511 if (st != DIG && st != NEED_DIG_DEC && st != DIG_DEC && st != DIG_EXP && st != END)
static void gml_lwpgerror(char *msg, int error_code)