subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1130118 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c libsvn_subr/subst.c
Date Wed, 01 Jun 2011 12:02:32 GMT
Author: julianfoad
Date: Wed Jun  1 12:02:32 2011
New Revision: 1130118

URL: http://svn.apache.org/viewvc?rev=1130118&view=rev
Log:
Rename svn_stream_buffered() and related symbols to ...is_buffered... for
clarity.

* subversion/include/svn_io.h
  (svn_io_buffered_fn_t): Rename to svn_io_is_buffered_fn_t.
  (svn_stream_set_buffered): Rename to svn_stream_set_is_buffered.
  (svn_stream_buffered): Rename to svn_stream_is_buffered.

* subversion/libsvn_subr/stream.c
  (svn_stream_t): Rename 'buffered_fn' to 'is_buffered_fn'.
  (svn_stream_set_buffered): Rename to svn_stream_set_is_buffered.
  (svn_stream_buffered): Rename to svn_stream_is_buffered.
  (svn_stream_create, stream_readline, svn_stream_empty,
   buffered_handler_disown, svn_stream_disown, svn_stream_from_aprfile2,
   svn_stream_from_stringbuf, svn_stream_from_string): Update calls.

* subversion/libsvn_subr/subst.c
  (translated_stream_buffered): Rename to translated_stream_is_buffered.
  (stream_translated): Update calls.

Modified:
    subversion/trunk/subversion/include/svn_io.h
    subversion/trunk/subversion/libsvn_subr/stream.c
    subversion/trunk/subversion/libsvn_subr/subst.c

Modified: subversion/trunk/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1130118&r1=1130117&r2=1130118&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Wed Jun  1 12:02:32 2011
@@ -804,11 +804,11 @@ typedef svn_error_t *(*svn_io_seek_fn_t)
                                          const svn_stream_mark_t *mark);
 
 /** Buffer test handler function for a generic stream. @see svn_stream_t 
- * and svn_stream_buffered().
+ * and svn_stream_is_buffered().
  *
  * @since New in 1.7.
  */
-typedef svn_boolean_t (*svn_io_buffered_fn_t)(void *baton);
+typedef svn_boolean_t (*svn_io_is_buffered_fn_t)(void *baton);
 
 /** Create a generic stream.  @see svn_stream_t. */
 svn_stream_t *
@@ -859,13 +859,13 @@ void
 svn_stream_set_seek(svn_stream_t *stream,
                     svn_io_seek_fn_t seek_fn);
 
-/** Set @a stream's buffer test function to @a buffered_fn
+/** Set @a stream's buffer test function to @a is_buffered_fn
  *
  * @since New in 1.7.
  */
 void
-svn_stream_set_buffered(svn_stream_t *stream,
-                        svn_io_buffered_fn_t buffered_fn);
+svn_stream_set_is_buffered(svn_stream_t *stream,
+                           svn_io_is_buffered_fn_t is_buffered_fn);
 
 /** Create a stream that is empty for reading and infinite for writing. */
 svn_stream_t *
@@ -1156,8 +1156,8 @@ svn_stream_seek(svn_stream_t *stream, co
  *
  * @since New in 1.7.
  */
-svn_boolean_t 
-svn_stream_buffered(svn_stream_t *stream);
+svn_boolean_t
+svn_stream_is_buffered(svn_stream_t *stream);
 
 /** Return a writable stream which, when written to, writes to both of the
  * underlying streams.  Both of these streams will be closed upon closure of

Modified: subversion/trunk/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1130118&r1=1130117&r2=1130118&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/stream.c (original)
+++ subversion/trunk/subversion/libsvn_subr/stream.c Wed Jun  1 12:02:32 2011
@@ -53,7 +53,7 @@ struct svn_stream_t {
   svn_close_fn_t close_fn;
   svn_io_mark_fn_t mark_fn;
   svn_io_seek_fn_t seek_fn;
-  svn_io_buffered_fn_t buffered_fn;
+  svn_io_is_buffered_fn_t is_buffered_fn;
 };
 
 
@@ -72,7 +72,7 @@ svn_stream_create(void *baton, apr_pool_
   stream->close_fn = NULL;
   stream->mark_fn = NULL;
   stream->seek_fn = NULL;
-  stream->buffered_fn = NULL;
+  stream->is_buffered_fn = NULL;
   return stream;
 }
 
@@ -121,10 +121,10 @@ svn_stream_set_seek(svn_stream_t *stream
 }
 
 void
-svn_stream_set_buffered(svn_stream_t *stream,
-                        svn_io_buffered_fn_t buffered_fn)
+svn_stream_set_is_buffered(svn_stream_t *stream,
+                           svn_io_is_buffered_fn_t is_buffered_fn)
 {
-  stream->buffered_fn = buffered_fn;
+  stream->is_buffered_fn = is_buffered_fn;
 }
 
 svn_error_t *
@@ -183,13 +183,13 @@ svn_stream_seek(svn_stream_t *stream, co
   return stream->seek_fn(stream->baton, mark);
 }
 
-svn_boolean_t 
-svn_stream_buffered(svn_stream_t *stream)
+svn_boolean_t
+svn_stream_is_buffered(svn_stream_t *stream)
 {
-  if (stream->buffered_fn == NULL)
+  if (stream->is_buffered_fn == NULL)
     return FALSE;
 
-  return stream->buffered_fn(stream->baton);
+  return stream->is_buffered_fn(stream->baton);
 }
 
 svn_error_t *
@@ -486,7 +486,7 @@ stream_readline(svn_stringbuf_t **string
    * EOL we are looking for. Optimize that common case.
    */
   if (svn_stream_supports_mark(stream) &&
-      svn_stream_buffered(stream) &&
+      svn_stream_is_buffered(stream) &&
       !detect_eol)
     {
       /* We can efficiently read chunks speculatively and reposition the
@@ -676,7 +676,7 @@ seek_handler_empty(void *baton, const sv
 }
 
 static svn_boolean_t
-buffered_handler_empty(void *baton)
+is_buffered_handler_empty(void *baton)
 {
   return FALSE;
 }
@@ -693,7 +693,7 @@ svn_stream_empty(apr_pool_t *pool)
   svn_stream_set_write(stream, write_handler_empty);
   svn_stream_set_mark(stream, mark_handler_empty);
   svn_stream_set_seek(stream, seek_handler_empty);
-  svn_stream_set_buffered(stream, buffered_handler_empty);
+  svn_stream_set_is_buffered(stream, is_buffered_handler_empty);
   return stream;
 }
 
@@ -789,9 +789,9 @@ seek_handler_disown(void *baton, const s
 }
 
 static svn_boolean_t
-buffered_handler_disown(void *baton)
+is_buffered_handler_disown(void *baton)
 {
-  return svn_stream_buffered(baton);
+  return svn_stream_is_buffered(baton);
 }
 
 svn_stream_t *
@@ -804,7 +804,7 @@ svn_stream_disown(svn_stream_t *stream, 
   svn_stream_set_write(s, write_handler_disown);
   svn_stream_set_mark(s, mark_handler_disown);
   svn_stream_set_seek(s, seek_handler_disown);
-  svn_stream_set_buffered(s, buffered_handler_disown);
+  svn_stream_set_is_buffered(s, is_buffered_handler_disown);
 
   return s;
 }
@@ -925,7 +925,7 @@ seek_handler_apr(void *baton, const svn_
 }
 
 static svn_boolean_t
-buffered_handler_apr(void *baton)
+is_buffered_handler_apr(void *baton)
 {
   struct baton_apr *btn = baton;
   return (apr_file_flags_get(btn->file) & APR_BUFFERED) != 0;
@@ -1006,7 +1006,7 @@ svn_stream_from_aprfile2(apr_file_t *fil
   svn_stream_set_skip(stream, skip_handler_apr);
   svn_stream_set_mark(stream, mark_handler_apr);
   svn_stream_set_seek(stream, seek_handler_apr);
-  svn_stream_set_buffered(stream, buffered_handler_apr);
+  svn_stream_set_is_buffered(stream, is_buffered_handler_apr);
 
   if (! disown)
     svn_stream_set_close(stream, close_handler_apr);
@@ -1607,7 +1607,7 @@ seek_handler_stringbuf(void *baton, cons
 }
 
 static svn_boolean_t
-buffered_handler_stringbuf(void *baton)
+is_buffered_handler_stringbuf(void *baton)
 {
   return TRUE;
 }
@@ -1631,7 +1631,7 @@ svn_stream_from_stringbuf(svn_stringbuf_
   svn_stream_set_write(stream, write_handler_stringbuf);
   svn_stream_set_mark(stream, mark_handler_stringbuf);
   svn_stream_set_seek(stream, seek_handler_stringbuf);
-  svn_stream_set_buffered(stream, buffered_handler_stringbuf);
+  svn_stream_set_is_buffered(stream, is_buffered_handler_stringbuf);
   return stream;
 }
 
@@ -1702,7 +1702,7 @@ skip_handler_string(void *baton, apr_siz
 }
 
 static svn_boolean_t
-buffered_handler_string(void *baton)
+is_buffered_handler_string(void *baton)
 {
   return TRUE;
 }
@@ -1725,7 +1725,7 @@ svn_stream_from_string(const svn_string_
   svn_stream_set_mark(stream, mark_handler_string);
   svn_stream_set_seek(stream, seek_handler_string);
   svn_stream_set_skip(stream, skip_handler_string);
-  svn_stream_set_buffered(stream, buffered_handler_string);
+  svn_stream_set_is_buffered(stream, is_buffered_handler_string);
   return stream;
 }
 

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1130118&r1=1130117&r2=1130118&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Wed Jun  1 12:02:32 2011
@@ -1381,12 +1381,12 @@ translated_stream_seek(void *baton, cons
   return SVN_NO_ERROR;
 }
 
-/* Implements svn_io_buffered_fn_t. */
+/* Implements svn_io_is_buffered_fn_t. */
 static svn_boolean_t
-translated_stream_buffered(void *baton)
+translated_stream_is_buffered(void *baton)
 {
   struct translated_stream_baton *b = baton;
-  return svn_stream_buffered(b->stream);
+  return svn_stream_is_buffered(b->stream);
 }
 
 svn_error_t *
@@ -1499,7 +1499,7 @@ stream_translated(svn_stream_t *stream,
   svn_stream_set_close(s, translated_stream_close);
   svn_stream_set_mark(s, translated_stream_mark);
   svn_stream_set_seek(s, translated_stream_seek);
-  svn_stream_set_buffered(s, translated_stream_buffered);
+  svn_stream_set_is_buffered(s, translated_stream_is_buffered);
 
   return s;
 }



Mime
View raw message