
28 Feb
2005
28 Feb
'05
10:39 p.m.
My next question is what is the best way to deal with an "output" device having a different cr\lf than another one?
Hi Brian, My suggestion is to create another separate filter which does nothing but convert \n to \r\n and add it to the chain: class newline_conversion_filter : public output_filter { public: template<typename Sink> void put(Sink& dest, int c) { if (c == '\n') { boost::io::put(dest, '\r'); boost::io::put(dest, '\n'); } else { boost::io::put(dest, c); } } }; Does this help? -- Christopher Diggins http://www.ootl.org