From: thurston Date: Sun, 11 Feb 2007 06:12:22 +0000 (+0000) Subject: When displaying printables in graphviz output, print 32 as SP. X-Git-Tag: 2.0_alpha~390 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbaa8217415e1654839c3daf141cc9b3088bf96a;p=external%2Fragel.git When displaying printables in graphviz output, print 32 as SP. git-svn-id: http://svn.complang.org/ragel/trunk@96 052ea7fc-9027-0410-9066-f65837a77df0 --- diff --git a/rlcodegen/gvdotgen.cpp b/rlcodegen/gvdotgen.cpp index 6aa7e76..3be8626 100644 --- a/rlcodegen/gvdotgen.cpp +++ b/rlcodegen/gvdotgen.cpp @@ -31,37 +31,38 @@ std::ostream &GraphvizDotGen::KEY( Key key ) if ( printPrintables && key.isPrintable() ) { // Output values as characters, ensuring we escape the quote (") character char cVal = (char) key.getVal(); - out << "'"; switch ( cVal ) { case '"': case '\\': - out << "\\" << cVal; + out << "'\\" << cVal << "'"; break; case '\a': - out << "\\\\a"; + out << "'\\\\a'"; break; case '\b': - out << "\\\\b"; + out << "'\\\\b'"; break; case '\t': - out << "\\\\t"; + out << "'\\\\t'"; break; case '\n': - out << "\\\\n"; + out << "'\\\\n'"; break; case '\v': - out << "\\\\v"; + out << "'\\\\v'"; break; case '\f': - out << "\\\\f"; + out << "'\\\\f'"; break; case '\r': - out << "\\\\r"; + out << "'\\\\r'"; + break; + case ' ': + out << "SP"; break; default: - out << cVal; + out << "'" << cVal << "'"; break; } - out << "'"; } else { if ( keyOps->isSigned )