-void surf_parse_error(char *msg)
-{
- fprintf(stderr, "Parse error on line %d: %s\n", surf_parse_lineno, msg);
- abort();
-}
-
-void surf_parse_get_double(double *value, const char *string)
-{
- int ret = 0;
- ret = sscanf(string, "%lg", value);
- if (ret != 1)
- surf_parse_error(bprintf("%s is not a double", string));
-}
-
-void surf_parse_get_int(int *value, const char *string)
-{
- int ret = 0;
- ret = sscanf(string, "%d", value);
- if (ret != 1)
- surf_parse_error(bprintf("%s is not an integer", string));
-}