ucx/utils.h

changeset 146
aa376dba1ba8
parent 144
b6dcc9d112eb
child 147
1aa598f36872
     1.1 --- a/ucx/utils.h	Wed Aug 14 16:07:49 2013 +0200
     1.2 +++ b/ucx/utils.h	Fri Aug 16 13:40:10 2013 +0200
     1.3 @@ -179,10 +179,10 @@
     1.4  int ucx_memcmp(void *ptr1, void *ptr2, void *n);
     1.5  
     1.6  /**
     1.7 - * A printf like function which writes the output to a stream using a write
     1.8 - * function.
     1.9 - * @param stream the stream where to write the data
    1.10 - * @param wfc the write function for the stream
    1.11 + * A <code>printf()</code> like function which writes the output to a stream by
    1.12 + * using a write_func().
    1.13 + * @param stream the stream the data is written to
    1.14 + * @param wfc the write function
    1.15   * @param fmt format string
    1.16   * @param ... additional arguments
    1.17   * @return the total number of bytes written
    1.18 @@ -190,10 +190,9 @@
    1.19  int ucx_fprintf(void *stream, write_func wfc, const char *fmt, ...);
    1.20  
    1.21  /**
    1.22 - * Same as ucx_fprintf() but with an argument list instead of variadic
    1.23 - * arguments.
    1.24 - * @param stream the stream where to write the data
    1.25 - * @param wfc the write function for the stream
    1.26 + * <code>va_list</code> version of ucx_fprintf().
    1.27 + * @param stream the stream the data is written to
    1.28 + * @param wfc the write function
    1.29   * @param fmt format string
    1.30   * @param ap argument list
    1.31   * @return the total number of bytes written
    1.32 @@ -202,30 +201,32 @@
    1.33  int ucx_vfprintf(void *stream, write_func wfc, const char *fmt, va_list ap);
    1.34  
    1.35  /**
    1.36 - * A printf like function which stores the result in a newly created string.
    1.37 + * A <code>printf()</code> like function which allocates space for a sstr_t
    1.38 + * the result is written to.
    1.39   * 
    1.40 - * The sstr_t data is allocated with the allocators ucx_allocator_malloc
    1.41 - * function. So it is implementation depended, whether the returned
    1.42 - * sstr_t.ptr pointer must be passed to the allocators ucx_allocator_free
    1.43 - * function manually.
    1.44 + * <b>Attention</b>: The sstr_t data is allocated with the allocators
    1.45 + * ucx_allocator_malloc() function. So it is implementation dependent, if
    1.46 + * the returned sstr_t.ptr pointer must be passed to the allocators
    1.47 + * ucx_allocator_free() function manually.
    1.48   * 
    1.49 - * The sstr_t.ptr of the return value will <i>always</i> be <code>NULL</code>-
    1.50 - * terminated.
    1.51 + * <b>Note</b>: The sstr_t.ptr of the return value will <i>always</i> be
    1.52 + * <code>NULL</code>-terminated.
    1.53   * 
    1.54 - * @param allocator a valid instance of an UcxAllocator
    1.55 + * @param allocator the UcxAllocator used for allocating the result sstr_t
    1.56   * @param fmt format string
    1.57   * @param ... additional arguments
    1.58 - * @return a new string
    1.59 + * @return a sstr_t containing the formatted string
    1.60   */
    1.61  sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...);
    1.62  
    1.63  /**
    1.64 - * Same as ucx_asprintf() but with an argument list instead of variadic
    1.65 - * arguments.
    1.66 - * @param allocator a valid instance of an UcxAllocator
    1.67 + * <code>va_list</code> version of ucx_asprintf().
    1.68 + * 
    1.69 + * @param allocator the UcxAllocator used for allocating the result sstr_t
    1.70   * @param fmt format string
    1.71   * @param ap argument list
    1.72 - * @return a new string
    1.73 + * @return a sstr_t containing the formatted string
    1.74 + * @see ucx_asprintf()
    1.75   */
    1.76  sstr_t ucx_vasprintf(UcxAllocator *allocator, const char *fmt, va_list ap);
    1.77  

mercurial