[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn_base64.c encode_bytes docstring

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Sat, 25 Jun 2011 14:25:19 +0300

[[[
* subversion/libsvn_subr/svn_base64.c
  (encode_bytes, decode_bytes): Clarify docstrings.
]]]

[[[
Index: subversion/libsvn_subr/svn_base64.c
===================================================================
--- subversion/libsvn_subr/svn_base64.c (revision 1139515)
+++ subversion/libsvn_subr/svn_base64.c (working copy)
@@ -108,12 +108,14 @@ encode_line(svn_stringbuf_t *str, const char *data
   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 char **dat
 }
 
 
-/* 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)
]]]
Received on 2011-06-25 13:29:19 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.