print single space for "arbitrary whitespace" and nothing for "skip"
This commit is contained in:
@ -699,6 +699,10 @@ formatOutput()
|
||||
fieldAddress.clear();
|
||||
continue;
|
||||
}
|
||||
case StreamProtocolParser::whitespace:
|
||||
outputLine.append(' ');
|
||||
case StreamProtocolParser::skip:
|
||||
continue;
|
||||
case esc:
|
||||
// escaped literal byte
|
||||
command = *commandIndex++;
|
||||
@ -722,11 +726,20 @@ printSeparator()
|
||||
long i = 0;
|
||||
for (; i < separator.length(); i++)
|
||||
{
|
||||
if (separator[i] == StreamProtocolParser::skip ||
|
||||
separator[i] == StreamProtocolParser::whitespace) continue; // wildcards
|
||||
if (separator[i] == esc) i++; // escaped literal byte
|
||||
switch (separator[i])
|
||||
{
|
||||
case StreamProtocolParser::whitespace:
|
||||
outputLine.append(' '); // print single space
|
||||
case StreamProtocolParser::skip:
|
||||
continue;
|
||||
case esc:
|
||||
// escaped literal byte
|
||||
i++;
|
||||
default:
|
||||
// literal byte
|
||||
outputLine.append(separator[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool StreamCore::
|
||||
|
Reference in New Issue
Block a user