After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 161833 - Corrections for iochannel_stream example
Corrections for iochannel_stream example
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: examples
2.5.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-12-20 22:04 UTC by Chris Vine
Modified: 2005-01-05 15:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for iochannel_stream example (9.70 KB, patch)
2004-12-20 22:06 UTC, Chris Vine
none Details | Review
Composite patch, against CVS. (13.43 KB, patch)
2005-01-04 21:55 UTC, Chris Vine
none Details | Review

Description Chris Vine 2004-12-20 22:04:59 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.
Comment 1 Chris Vine 2004-12-20 22:06:05 UTC
Created attachment 35063 [details] [review]
Patch for iochannel_stream example
Comment 2 Chris Vine 2004-12-29 20:16:36 UTC
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
Comment 3 Murray Cumming 2005-01-04 10:37:40 UTC
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.
Comment 4 Chris Vine 2005-01-04 12:49:23 UTC
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).
Comment 5 Chris Vine 2005-01-04 21:55:50 UTC
Created attachment 35448 [details] [review]
Composite patch, against CVS.

This follows up my post of earlier today, with a composite patch against
Comment 6 Murray Cumming 2005-01-05 15:58:17 UTC
Thanks and well done. Applied.