summaryrefslogtreecommitdiff
path: root/include/apr_tables.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/apr_tables.h')
-rw-r--r--include/apr_tables.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/include/apr_tables.h b/include/apr_tables.h
index 194af02f2f09..27974c0e8ca7 100644
--- a/include/apr_tables.h
+++ b/include/apr_tables.h
@@ -179,7 +179,7 @@ APR_DECLARE(void) apr_array_cat(apr_array_header_t *dst,
* @param p The pool to allocate the copy of the array out of
* @param arr The array to copy
* @return An exact copy of the array passed in
- * @remark The alternate apr_array_copy_hdr copies only the header, and arranges
+ * @remark The alternate apr_array_copy_hdr() copies only the header, and arranges
* for the elements to be copied if (and only if) the code subsequently
* does a push or arraycat.
*/
@@ -191,7 +191,7 @@ APR_DECLARE(apr_array_header_t *) apr_array_copy(apr_pool_t *p,
* @param p The pool to allocate the copy of the array out of
* @param arr The array to copy
* @return An exact copy of the array passed in
- * @remark The alternate apr_array_copy copies the *entire* array.
+ * @remark The alternate apr_array_copy() copies the *entire* array.
*/
APR_DECLARE(apr_array_header_t *) apr_array_copy_hdr(apr_pool_t *p,
const apr_array_header_t *arr);
@@ -318,7 +318,7 @@ APR_DECLARE(void) apr_table_unset(apr_table_t *t, const char *key);
* @param t The table to search for the data
* @param key The key to merge data for (case does not matter)
* @param val The data to add
- * @remark If the key is not found, then this function acts like apr_table_add
+ * @remark If the key is not found, then this function acts like apr_table_add()
*/
APR_DECLARE(void) apr_table_merge(apr_table_t *t, const char *key,
const char *val);
@@ -330,7 +330,7 @@ APR_DECLARE(void) apr_table_merge(apr_table_t *t, const char *key,
* @param t The table to search for the data
* @param key The key to merge data for (case does not matter)
* @param val The data to add
- * @remark If the key is not found, then this function acts like apr_table_addn
+ * @remark If the key is not found, then this function acts like apr_table_addn()
*/
APR_DECLARE(void) apr_table_mergen(apr_table_t *t, const char *key,
const char *val);
@@ -380,6 +380,7 @@ APR_DECLARE(apr_table_t *) apr_table_overlay(apr_pool_t *p,
* @remark Iteration continues while this callback function returns non-zero.
* To export the callback function for apr_table_[v]do() it must be declared
* in the _NONSTD convention.
+ * @see apr_table_do @see apr_table_vdo
*/
typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
const char *value);
@@ -392,7 +393,7 @@ typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
* in the table. Otherwise, the function is invoked only for those
* elements matching the keys specified.
*
- * If an invocation of the @param comp function returns zero,
+ * If an invocation of the comp function returns zero,
* iteration will continue using the next specified key, if any.
*
* @param comp The function to run
@@ -401,7 +402,7 @@ typedef int (apr_table_do_callback_fn_t)(void *rec, const char *key,
* @param ... A varargs array of zero or more (char *) keys followed by NULL
* @return FALSE if one of the comp() iterations returned zero; TRUE if all
* iterations returned non-zero
- * @see apr_table_do_callback_fn_t
+ * @see apr_table_do_callback_fn_t @see apr_table_vdo
*/
APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
void *rec, const apr_table_t *t, ...)
@@ -412,13 +413,13 @@ APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
/**
* Iterate over a table running the provided function once for every
- * element in the table. The @param vp varargs parameter must be a
+ * element in the table. The vp varargs parameter must be a
* list of zero or more (char *) keys followed by a NULL pointer. If
* zero keys are given, the @param comp function will be invoked for
* every element in the table. Otherwise, the function is invoked
* only for those elements matching the keys specified.
*
- * If an invocation of the @param comp function returns zero,
+ * If an invocation of the comp function returns zero,
* iteration will continue using the next specified key, if any.
*
* @param comp The function to run
@@ -427,7 +428,7 @@ APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
* @param vp List of zero or more (char *) keys followed by NULL
* @return FALSE if one of the comp() iterations returned zero; TRUE if all
* iterations returned non-zero
- * @see apr_table_do_callback_fn_t
+ * @see apr_table_do_callback_fn_t @see apr_table_do
*/
APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
void *rec, const apr_table_t *t, va_list vp);
@@ -436,6 +437,8 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
#define APR_OVERLAP_TABLES_SET (0)
/** flag for overlap to use apr_table_mergen */
#define APR_OVERLAP_TABLES_MERGE (1)
+/** flag for overlap to use apr_table_addn */
+#define APR_OVERLAP_TABLES_ADD (2)
/**
* For each element in table b, either use setn or mergen to add the data
* to table a. Which method is used is determined by the flags passed in.
@@ -444,6 +447,7 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
* @param flags How to add the table to table a. One of:
* APR_OVERLAP_TABLES_SET Use apr_table_setn
* APR_OVERLAP_TABLES_MERGE Use apr_table_mergen
+ * APR_OVERLAP_TABLES_ADD Use apr_table_addn
* @remark When merging duplicates, the two values are concatenated,
* separated by the string ", ".
* @remark This function is highly optimized, and uses less memory and CPU cycles
@@ -461,6 +465,9 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
* if (flags & APR_OVERLAP_TABLES_MERGE) {
* apr_table_mergen(a, belt[i].key, belt[i].val);
* }
+ * else if (flags & APR_OVERLAP_TABLES_ADD) {
+ * apr_table_addn(a, belt[i].key, belt[i].val);
+ * }
* else {
* apr_table_setn(a, belt[i].key, belt[i].val);
* }
@@ -484,7 +491,8 @@ APR_DECLARE(void) apr_table_overlap(apr_table_t *a, const apr_table_t *b,
*
* @param t Table.
* @param flags APR_OVERLAP_TABLES_MERGE to merge, or
- * APR_OVERLAP_TABLES_SET to overwrite
+ * APR_OVERLAP_TABLES_SET to overwrite, or
+ * APR_OVERLAP_TABLES_ADD to add
* @remark When merging duplicates, the two values are concatenated,
* separated by the string ", ".
*/