diff options
author | bell@sanja.is.com.ua <> | 2002-12-28 01:01:05 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-12-28 01:01:05 +0200 |
commit | fe9e13905649a41bcda1ab4d749a31695b89b870 (patch) | |
tree | 6675c15be87ddec825795b1d2a861d6bc696f109 /sql/gstream.cc | |
parent | e3ba256491f82294f70ce2456eed243e1e7d1919 (diff) | |
download | mariadb-git-fe9e13905649a41bcda1ab4d749a31695b89b870.tar.gz |
postreview fix (SCRUM)
fixed layout
Diffstat (limited to 'sql/gstream.cc')
-rw-r--r-- | sql/gstream.cc | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/sql/gstream.cc b/sql/gstream.cc index 5a58fef6744..a97ed9cae03 100644 --- a/sql/gstream.cc +++ b/sql/gstream.cc @@ -3,36 +3,38 @@ int GTextReadStream::get_next_toc_type() const { const char *cur = m_cur; - while((*cur)&&(strchr(" \t\r\n",*cur))) + while ((*cur)&&(strchr(" \t\r\n",*cur))) { cur++; } - if(!(*cur)) + if (!(*cur)) { return eostream; } - if(((*cur>='a') && (*cur<='z')) || ((*cur>='A') && (*cur<='Z')) || (*cur=='_')) + if (((*cur>='a') && (*cur<='z')) || ((*cur>='A') && (*cur<='Z')) || + (*cur=='_')) { return word; } - if(((*cur>='0') && (*cur<='9')) || (*cur=='-') || (*cur=='+') || (*cur=='.')) + if (((*cur>='0') && (*cur<='9')) || (*cur=='-') || (*cur=='+') || + (*cur=='.')) { return numeric; } - if(*cur == '(') + if (*cur == '(') { return l_bra; } - if(*cur == ')') + if (*cur == ')') { return r_bra; } - if(*cur == ',') + if (*cur == ',') { return comma; } @@ -43,28 +45,28 @@ int GTextReadStream::get_next_toc_type() const const char *GTextReadStream::get_next_word(int *word_len) { const char *cur = m_cur; - while((*cur)&&(strchr(" \t\r\n",*cur))) + while ((*cur)&&(strchr(" \t\r\n",*cur))) { cur++; } m_last_text_position = cur; - if(!(*cur)) + if (!(*cur)) { return 0; } const char *wd_start = cur; - if(((*cur<'a') || (*cur>'z')) && ((*cur<'A') || (*cur>'Z')) && (*cur!='_')) + if (((*cur<'a') || (*cur>'z')) && ((*cur<'A') || (*cur>'Z')) && (*cur!='_')) { return NULL; } ++cur; - while(((*cur>='a') && (*cur<='z')) || ((*cur>='A') && (*cur<='Z')) || (*cur=='_') || - ((*cur>='0') && (*cur<='9'))) + while (((*cur>='a') && (*cur<='z')) || ((*cur>='A') && (*cur<='Z')) || + (*cur=='_') || ((*cur>='0') && (*cur<='9'))) { ++cur; } @@ -79,19 +81,19 @@ const char *GTextReadStream::get_next_word(int *word_len) int GTextReadStream::get_next_number(double *d) { const char *cur = m_cur; - while((*cur)&&(strchr(" \t\r\n",*cur))) + while ((*cur)&&(strchr(" \t\r\n",*cur))) { cur++; } m_last_text_position = cur; - if(!(*cur)) + if (!(*cur)) { set_error_msg("Numeric constant expected"); return 1; } - if(((*cur<'0') || (*cur>'9')) && (*cur!='-') && (*cur!='+') && (*cur!='.')) + if (((*cur<'0') || (*cur>'9')) && (*cur!='-') && (*cur!='+') && (*cur!='.')) { set_error_msg("Numeric constant expected"); return 1; @@ -101,7 +103,7 @@ int GTextReadStream::get_next_number(double *d) *d = strtod(cur, &endptr); - if(endptr) + if (endptr) { m_cur = endptr; } @@ -112,11 +114,11 @@ int GTextReadStream::get_next_number(double *d) char GTextReadStream::get_next_symbol() { const char *cur = m_cur; - while((*cur)&&(strchr(" \t\r\n",*cur))) + while ((*cur)&&(strchr(" \t\r\n",*cur))) { cur++; } - if(!(*cur)) + if (!(*cur)) { return 0; } |