|
|
@ -71,9 +71,9 @@ struct ConfigurationManager
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct escape_hash_filter : public boost::iostreams::input_filter
|
|
|
|
struct escape_hash_filter : public boost::iostreams::input_filter
|
|
|
|
{
|
|
|
|
{
|
|
|
|
static const int sEscape = '@';
|
|
|
|
static const int sEscape;
|
|
|
|
static const int sHashIdentifier = 'h';
|
|
|
|
static const int sHashIdentifier;
|
|
|
|
static const int sEscapeIdentifier = 'a';
|
|
|
|
static const int sEscapeIdentifier;
|
|
|
|
|
|
|
|
|
|
|
|
escape_hash_filter();
|
|
|
|
escape_hash_filter();
|
|
|
|
virtual ~escape_hash_filter();
|
|
|
|
virtual ~escape_hash_filter();
|
|
|
@ -114,22 +114,17 @@ int unescape_hash_filter::get(Source & src)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int nextChar = boost::iostreams::get(src);
|
|
|
|
int nextChar = boost::iostreams::get(src);
|
|
|
|
int intended;
|
|
|
|
int intended;
|
|
|
|
switch (nextChar)
|
|
|
|
if (nextChar == escape_hash_filter::sEscapeIdentifier)
|
|
|
|
{
|
|
|
|
|
|
|
|
case escape_hash_filter::sEscapeIdentifier:
|
|
|
|
|
|
|
|
intended = escape_hash_filter::sEscape;
|
|
|
|
intended = escape_hash_filter::sEscape;
|
|
|
|
break;
|
|
|
|
else if (nextChar == escape_hash_filter::sHashIdentifier)
|
|
|
|
case escape_hash_filter::sHashIdentifier:
|
|
|
|
|
|
|
|
intended = '#';
|
|
|
|
intended = '#';
|
|
|
|
break;
|
|
|
|
else if (nextChar == boost::iostreams::WOULD_BLOCK)
|
|
|
|
case boost::iostreams::WOULD_BLOCK:
|
|
|
|
{
|
|
|
|
expectingIdentifier = true;
|
|
|
|
expectingIdentifier = true;
|
|
|
|
intended = nextChar;
|
|
|
|
intended = nextChar;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
intended = '?';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
intended = '?';
|
|
|
|
return intended;
|
|
|
|
return intended;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|