cosmetic changes
This commit is contained in:
@ -1057,14 +1057,6 @@ compileNumber(unsigned long& number, const char*& source, unsigned long max)
|
|||||||
|
|
||||||
bool StreamProtocolParser::Protocol::
|
bool StreamProtocolParser::Protocol::
|
||||||
compileString(StreamBuffer& buffer, const char*& source,
|
compileString(StreamBuffer& buffer, const char*& source,
|
||||||
FormatType formatType, Client* client, int quoted)
|
|
||||||
{
|
|
||||||
return compileStringInternal(buffer, source, formatType, client, quoted, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool StreamProtocolParser::Protocol::
|
|
||||||
compileStringInternal(StreamBuffer& buffer, const char*& source,
|
|
||||||
FormatType formatType, Client* client, int quoted, int recursionDepth)
|
FormatType formatType, Client* client, int quoted, int recursionDepth)
|
||||||
{
|
{
|
||||||
bool escaped = false;
|
bool escaped = false;
|
||||||
@ -1074,8 +1066,8 @@ compileStringInternal(StreamBuffer& buffer, const char*& source,
|
|||||||
line = getLineNumber(source);
|
line = getLineNumber(source);
|
||||||
|
|
||||||
debug("StreamProtocolParser::Protocol::compileString "
|
debug("StreamProtocolParser::Protocol::compileString "
|
||||||
"line %d source=\"%s\"\n",
|
"line %d source=\"%s\" recursionDepth=%d\n",
|
||||||
line, source);
|
line, source, recursionDepth);
|
||||||
|
|
||||||
// coding is done in two steps:
|
// coding is done in two steps:
|
||||||
// 1) read a line from protocol source and code quoted strings,
|
// 1) read a line from protocol source and code quoted strings,
|
||||||
@ -1258,7 +1250,7 @@ compileStringInternal(StreamBuffer& buffer, const char*& source,
|
|||||||
source += strlen(source)+1+sizeof(int);
|
source += strlen(source)+1+sizeof(int);
|
||||||
p = value();
|
p = value();
|
||||||
int saveline = line;
|
int saveline = line;
|
||||||
if (!compileStringInternal(buffer, p, formatType, client, false, recursionDepth + 1))
|
if (!compileString(buffer, p, formatType, client, false, recursionDepth + 1))
|
||||||
return false;
|
return false;
|
||||||
line = saveline;
|
line = saveline;
|
||||||
continue;
|
continue;
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
bool compileCommands(StreamBuffer&, const char*& source, Client*);
|
bool compileCommands(StreamBuffer&, const char*& source, Client*);
|
||||||
bool replaceVariable(StreamBuffer&, const char* varname);
|
bool replaceVariable(StreamBuffer&, const char* varname);
|
||||||
const Variable* getVariable(const char* name);
|
const Variable* getVariable(const char* name);
|
||||||
bool compileStringInternal(StreamBuffer& buffer, const char*& source,
|
bool compileString(StreamBuffer& buffer, const char*& source,
|
||||||
FormatType formatType, Client*, int quoted, int recursionDepth);
|
FormatType formatType, Client*, int quoted, int recursionDepth);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -75,7 +75,9 @@ public:
|
|||||||
bool compileNumber(unsigned long& number, const char*& source,
|
bool compileNumber(unsigned long& number, const char*& source,
|
||||||
unsigned long max = 0xFFFFFFFF);
|
unsigned long max = 0xFFFFFFFF);
|
||||||
bool compileString(StreamBuffer& buffer, const char*& source,
|
bool compileString(StreamBuffer& buffer, const char*& source,
|
||||||
FormatType formatType = NoFormat, Client* = NULL, int quoted = false);
|
FormatType formatType = NoFormat, Client* client = NULL, int quoted = false) {
|
||||||
|
return compileString(buffer, source, formatType, client, quoted, 0);
|
||||||
|
}
|
||||||
bool checkUnused();
|
bool checkUnused();
|
||||||
~Protocol();
|
~Protocol();
|
||||||
void report();
|
void report();
|
||||||
|
Reference in New Issue
Block a user