25 enum Gis_read_stream::enum_tok_types Gis_read_stream::get_next_toc_type()
30 if (my_isvar_start(&my_charset_bin, *m_cur))
32 if ((*m_cur >=
'0' && *m_cur <=
'9') || *m_cur ==
'-' || *m_cur ==
'+')
44 bool Gis_read_stream::get_next_word(
LEX_STRING *res)
47 res->str= (
char*) m_cur;
49 if ((m_cur >= m_limit) || !my_isvar_start(&my_charset_bin, *m_cur))
57 while ((m_cur < m_limit) && my_isvar(&my_charset_bin, *m_cur))
60 res->length= (uint32) (m_cur - res->str);
72 bool Gis_read_stream::get_next_number(
double *d)
79 if ((m_cur >= m_limit) ||
80 ((*m_cur < '0' || *m_cur >
'9') && *m_cur !=
'-' && *m_cur !=
'+'))
82 set_error_msg(
"Numeric constant expected");
86 *d = my_strntod(m_charset, (
char *)m_cur,
87 (uint) (m_limit-m_cur), &endptr, &err);
96 bool Gis_read_stream::check_next_symbol(
char symbol)
99 if ((m_cur >= m_limit) || (*m_cur != symbol))
102 strmov(buff,
"'?' expected");
116 void Gis_read_stream::set_error_msg(
const char *
msg)
118 size_t len= strlen(msg);
119 m_err_msg= (
char *) my_realloc(m_err_msg, (uint) len + 1, MYF(MY_ALLOW_ZERO_PTR));
120 memcpy(m_err_msg, msg, len + 1);