summaryrefslogtreecommitdiff
path: root/sql/gstream.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-12-28 01:01:05 +0200
committerunknown <bell@sanja.is.com.ua>2002-12-28 01:01:05 +0200
commit3ab0ddc294891f31b65f92fb7af265047db15d52 (patch)
tree6675c15be87ddec825795b1d2a861d6bc696f109 /sql/gstream.cc
parent7388e9bd5b4604b351386e9d86888d94e4ac4d30 (diff)
downloadmariadb-git-3ab0ddc294891f31b65f92fb7af265047db15d52.tar.gz
postreview fix (SCRUM)
fixed layout sql/filesort.cc: fixed layout sql/gstream.cc: fixed layout sql/item.cc: postreview fix sql/item.h: postreview fix sql/item_cmpfunc.cc: postreview fix sql/item_cmpfunc.h: fixed layout sql/item_func.h: fixed layout sql/item_row.h: fixed layout sql/item_strfunc.cc: fixed layout sql/item_subselect.cc: postreview fix sql/item_subselect.h: postreview fix sql/nt_servc.cc: fixed layout sql/opt_range.cc: fixed layout sql/password.c: fixed layout sql/spatial.cc: fixed layout sql/sql_help.cc: fixed layout sql/sql_lex.cc: fixed layout sql/sql_olap.cc: fixed layout sql/sql_select.cc: fixed layout sql/sql_show.cc: fixed layout sql/sql_string.cc: fixed layout sql/sql_table.cc: fixed layout sql/stacktrace.c: fixed layout
Diffstat (limited to 'sql/gstream.cc')
-rw-r--r--sql/gstream.cc38
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;
}