Checkout
Ivan Zhakov
committed
on 30 Oct 15
Implement svn_base64_encode2() with BREAK_LINES flag to control whether
insert newlines periodically or not. The old svn_base64_encode() was… Show more
Implement svn_base64_encode2() with BREAK_LINES flag to control whether

insert newlines periodically or not. The old svn_base64_encode() was

inserting newlines unconditionally.

* subversion/include/svn_base64.h

 (svn_base64_encode2): New function declaration.

 (svn_base64_encode): Deprecate.  

* subversion/libsvn_subr/base64.c

 (encode_baton): Add BREAK_LINES field.

 (encode_data, finish_encoding_data): Use EB->BREAK_LINES flag.

 (svn_base64_encode2): Revv from svn_base64_encode(). Add BREAK_LINES.

  argument and save it in ENCODE_BATON.

* subversion/libsvn_subr/deprecated.c

 (svn_base64_encode): Call svn_base64_encode2() with BREAK_LINES=TRUE.

* subversion/mod_dav_svn/util.c

 (dav_svn__make_base64_output_stream): Use svn_base64_encode2() with

  BREAK_LINES=TRUE.

* subversion/tests/libsvn_delta/svndiff-test.c

 (main): Use svn_base64_encode2() with BREAK_LINES=TRUE.

* subversion/tests/libsvn_subr/stream-test.c

 (test_stream_base64, test_stream_base64_2): Test svn_base64_encode2() with

  BREAK_LINES=TRUE and BREAK_LINES=FALSE.

Show less