Author: stefan2
Date: Sun Jun 26 20:19:26 2011
New Revision: 1139932

URL: http://svn.apache.org/viewvc?rev=1139932&view=rev
Log:
* subversion/libsvn_subr/svn_base64.c
  (encode_bytes, decode_bytes): Clarify docstrings.

Patch by: danielsh

Modified:
    subversion/trunk/subversion/libsvn_subr/svn_base64.c

Modified: subversion/trunk/subversion/libsvn_subr/svn_base64.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_base64.c?rev=1139932&r1=1139931&r2=1139932&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/svn_base64.c (original)
+++ subversion/trunk/subversion/libsvn_subr/svn_base64.c Sun Jun 26 20:19:26 
2011
@@ -108,12 +108,14 @@ encode_line(svn_stringbuf_t *str, const 
   str->len += BASE64_LINELEN;
 }
 
-/* Base64-encode a byte string which may or may not be the totality of
-   the data being encoded.  INBUF and *INBUFLEN carry the leftover
-   data from call to call, and *LINELEN carries the length of the
-   current output line.  Make INBUF have room for three characters and
-   initialize *INBUFLEN and *LINELEN to 0.  Output will be appended to
-   STR.  Include newlines every so often if BREAK_LINES is true. */
+/* (Continue to) Base64-encode the byte string DATA (of length LEN)
+   into STR. Include newlines every so often if BREAK_LINES is true.
+   INBUF, INBUFLEN, and LINELEN are used internally; the caller shall
+   make INBUF have room for three characters and initialize *INBUFLEN
+   and *LINELEN to 0.
+
+   INBUF and *INBUFLEN carry the leftover data from call to call, and
+   *LINELEN carries the length of the current output line. */
 static void
 encode_bytes(svn_stringbuf_t *str, const void *data, apr_size_t len,
              unsigned char *inbuf, size_t *inbuflen, size_t *linelen,
@@ -390,12 +392,14 @@ decode_line(svn_stringbuf_t *str, const 
 }
 
 
-/* Decode a byte string which may or may not be the total amount of
-   data being decoded.  INBUF and *INBUFLEN carry the leftover bytes
-   from call to call, and *DONE keeps track of whether we've seen an
-   '=' which terminates the encoded data.  Have room for four bytes in
-   INBUF and initialize *INBUFLEN to 0 and *DONE to FALSE.  Output
-   will be appended to STR.  */
+/* (Continue to) Base64-decode the byte string DATA (of length LEN)
+   into STR. INBUF, INBUFLEN, and DONE are used internally; the
+   caller shall have room for four bytes in INBUF and initialize
+   *INBUFLEN to 0 and *DONE to FALSE.
+
+   INBUF and *INBUFLEN carry the leftover bytes from call to call, and
+   *DONE keeps track of whether we've seen an '=' which terminates the
+   encoded data. */
 static void
 decode_bytes(svn_stringbuf_t *str, const char *data, apr_size_t len,
              unsigned char *inbuf, int *inbuflen, svn_boolean_t *done)


Reply via email to