GNOME Bugzilla – Bug 161833
Corrections for iochannel_stream example
Last modified: 2005-01-05 15:58:17 UTC
Attached is the patch for the iochannel_stream (fdstream) example I attached to bug #138259, revised to match the version of fdstream.h and fdstream.cc now in glibmm-2.5.2 and CVS.
Created attachment 35063 [details] [review] Patch for iochannel_stream example
Following up from bug 138259, if the convert option is thought to be valuable, it would be possible to retain this by having a read buffer in fdstream large enough to take and putback six bytes (the largest space occupied by a UTF-8 character). This would require rewriting fdstream::underflow(), but in compensation fdstream::xsputn() could be omitted, as if a read buffer were provided then std::streambuf::xsputn() would be adequate for the purpose. I can provide a patch if that would be helpful (it is simple to implement), but for an example it is a perhaps over the top. Chris
Thanks, but I'm not sure what should be in the ChangeLog for this. Please try to create patches as per these guidelines: http://www.gtkmm.org/bugs.shtml#CreatingPatches You might put your comment about the conversion in the code.
OK. I will provide a composite patch with the original patch plus comments about codeset conversion in the header file plus an entry for the ChangeLog this evening or tomorrow against the current CVS (unless you have already applied the patch to CVS in which case I will provide a patch for the comments and ChangeLog entry only).
Created attachment 35448 [details] [review] Composite patch, against CVS. This follows up my post of earlier today, with a composite patch against
Thanks and well done. Applied.