From: stephan b. <sg...@us...> - 2004-12-27 18:08:59
|
Update of /cvsroot/pclasses/pclasses2/src/s11n/io/parens In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26819/src/s11n/io/parens Modified Files: parens_serializer.cpp Log Message: Added \n ==> \\\n entity translation. Index: parens_serializer.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/s11n/io/parens/parens_serializer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- parens_serializer.cpp 26 Dec 2004 17:28:57 -0000 1.1 +++ parens_serializer.cpp 27 Dec 2004 18:08:48 -0000 1.2 @@ -15,17 +15,17 @@ template <typename MapT> void operator()( MapT & map ) { - // The order of these escapes is - // signifant. We only do + // We only do // double-backslashes to accomodate // the case that the final chars in a // property is a backslash (yes, this // has happened, and it hosed the // data, because it inadvertently // escaped a control token.). - map["\\"] = "\\\\"; + //map["\\"] = "\\\\"; map[")"] = "\\)"; map["("] = "\\("; + map["\n"] = "\\\n"; // It is not strictly necessary to escape \(, // but we do so because Parens is intended to // be easy for hand-editing, and not escaping @@ -54,7 +54,6 @@ #define SERINST(NodeT) \ register_serializer< parens_serializer< NodeT > > \ ( "s11n::io::parens_serializer", "parens" ); - /// ^^^ WTF does gcc make me qualify those namespaces? SERINST(::P::s11n::data_node); SERINST(::P::s11n::s11n_node); |