version 1.1.2.2, 2001/11/30 18:32:45
|
version 1.1.2.3, 2001/12/01 18:38:16
|
|
|
| |
void WQLParser::parse(const Array<Sint8>& text) | void WQLParser::parse(const Array<Sint8>& text) |
{ | { |
|
// ATTN: raise error here: |
|
|
|
if (text.size() == 0 || text[text.size() - 1] != '\0') |
|
return; |
|
|
_text = text; | _text = text; |
_offset = 0; | _offset = 0; |
WQL_parse(); | WQL_parse(); |
|
|
| |
int WQLInput(char* buffer, int& numRead, int numRequested) | int WQLInput(char* buffer, int& numRead, int numRequested) |
{ | { |
int remaining = _text.size() - _offset; |
// |
|
// Be sure to account for the null terminator (the size of the text will |
|
// be one or more; this is fixed checked beforehand by WQLParser::parse()). |
|
// |
|
|
|
int remaining = _text.size() - _offset - 1; |
| |
if (remaining == 0) | if (remaining == 0) |
{ | { |