On Thu, Aug 27, 2009 at 07:29:03PM +0100, Stefan Sperling wrote:
> On Thu, Aug 27, 2009 at 06:51:28PM +0200, Daniel Näslund wrote:
I used your suggestions for the log message.
[[[
Create a new callback for svn_stream_readline() that can replace, add or
delete characters from a line.
* subversion/include/svn_io.h
(svn_io_line_transformer_cb_t): Declare
(svn_stream_set_line_transformer_callback): Declare
(svn_stream_readline): Document line transforming.
* subversion/libsvn_subr/stream.c
(svn_stream_t): Add new field 'transformer_cb'.
(svn_stream_create): Initialize the new field.
(svn_stream_set_line_transformer_callback): New function to set the
line transformer callback on a stream.
* subversion/tests/libsvn_subr/stream-tests.c
(line_transformer): An implementation of
svn_io_line_transformer_cb_t, reverses the supplied line.
(test_stream_line_transformer): New test, testing line
transformations on a stream.
(test_stream_line_filter_and_transformer): New test, testing line
transformations as well as line filtering on a stream.
]]]
> Please check stream->line_transformer_cb != NULL outside of
> line_transformer(). The code flow is then easier to understand
> in svn_stream_readline() itself. And you don't need to create
> the stringbuf inside here.
Done
I used your suggestions for doc strings.
Once again, thanks for all the time you're "investing" in me. Hopefully
a will gain speed and accuracy and in the end be a good investment. :-).
Mvh
Daniel
Received on 2009-08-27 21:25:17 CEST