OSSP CVS Repository

ossp - Difference in ossp-pkg/var/var.pod versions 1.28 and 1.29
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/var/var.pod 1.28 -> 1.29

--- var.pod      2002/03/07 09:14:05     1.28
+++ var.pod      2002/03/07 12:11:09     1.29
@@ -53,6 +53,8 @@
 B<var_config>,
 B<var_unescape>,
 B<var_expand>, 
+B<var_formatv>, 
+B<var_format>, 
 B<var_strerror>.
 
 =item Variables:
@@ -624,6 +626,26 @@
 and C<VAR_ERR_OUT_OF_MEMORY> errors, I<dst_ptr> and I<dst_len> are
 undefined.
 
+=item var_rc_t B<var_formatv>(var_t *I<var>, char **I<dst_ptr>, int I<force_expand>, const char *I<fmt>, va_list I<ap>);
+
+This is a high-level function on top of B<var_expand> which expands
+simple printf(3)-style constructs before expanding the complex variable
+constructs. So, this is something of a combination between sprintf(3)
+and B<var_expand>.
+
+It expands simple "C<%s>" (string, type "C<char *>"), "C<%d>" (integer
+number, type "C<int>") and "C<%c>" (character, type "C<int>") constructs
+in I<fmt>. The values are taken from the variable argument vector I<ap>.
+After this expansion the result is passed through B<var_expand> by
+passing through the I<var>, I<dst_ptr> and I<force_expand> arguments.
+The final result is a malloc(3)'ed buffer provided in I<dst_ptr> which
+the caller has to free(3) later.
+
+=item var_rc_t B<var_format>(var_t *I<var>, char **I<dst_ptr>, int I<force_expand>, const char *I<fmt>, ...);
+
+This is just a wrapper around B<var_formatv> which translates the
+variable argument list into C<va_list>.
+
 =item var_rc_t B<var_strerror>(var_t *I<var>, var_rc_t I<rc>, char **I<str>);
 
 This can be used to map any B<var_rc_t> return codes (as returned by all

CVSTrac 2.0.1