Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 43874 invoked from network); 3 Dec 2010 11:11:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Dec 2010 11:11:49 -0000 Received: (qmail 57858 invoked by uid 500); 3 Dec 2010 11:11:49 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 57784 invoked by uid 500); 3 Dec 2010 11:11:49 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 57777 invoked by uid 99); 3 Dec 2010 11:11:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 11:11:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 11:11:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5A2162388C1C; Fri, 3 Dec 2010 11:09:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1041774 [12/35] - in /httpd/site/trunk: docs/apreq/docs/libapreq2/ xdocs/apreq/docs/libapreq2/ Date: Fri, 03 Dec 2010 11:09:45 -0000 To: cvs@httpd.apache.org From: issac@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101203110948.5A2162388C1C@eris.apache.org> Modified: httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__util_8h.html URL: http://svn.apache.org/viewvc/httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__util_8h.html?rev=1041774&r1=1041773&r2=1041774&view=diff ============================================================================== --- httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__util_8h.html [utf-8] (original) +++ httpd/site/trunk/docs/apreq/docs/libapreq2/apreq__util_8h.html [utf-8] Fri Dec 3 11:09:42 2010 @@ -1,7 +1,7 @@ - libapreq2-2.12: libapreq2: include/apreq_util.h File Reference + libapreq2-2.13: libapreq2: include/apreq_util.h File Reference - - -
- + + +

include/apreq_util.h File Reference

Utility functions for apreq. More...

#include "apr_file_io.h"
@@ -37,47 +34,47 @@ Go to the source code of this file. - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

Functions

char * apreq_join (apr_pool_t *p, const char *sep, const apr_array_header_t *arr, apreq_join_t mode)
char * apreq_join (apr_pool_t *p, const char *sep, const apr_array_header_t *arr, apreq_join_t mode)
apr_ssize_t apreq_index (const char *hay, apr_size_t hlen, const char *ndl, apr_size_t nlen, const apreq_match_t type)
apr_ssize_t apreq_index (const char *hay, apr_size_t hlen, const char *ndl, apr_size_t nlen, const apreq_match_t type)
apr_size_t apreq_quote (char *dest, const char *src, const apr_size_t slen)
apr_size_t apreq_quote (char *dest, const char *src, const apr_size_t slen)
apr_size_t apreq_quote_once (char *dest, const char *src, const apr_size_t slen)
apr_size_t apreq_quote_once (char *dest, const char *src, const apr_size_t slen)
apr_size_t apreq_encode (char *dest, const char *src, const apr_size_t slen)
apr_size_t apreq_encode (char *dest, const char *src, const apr_size_t slen)
apr_size_t apreq_cp1252_to_utf8 (char *dest, const char *src, apr_size_t slen)
apr_size_t apreq_cp1252_to_utf8 (char *dest, const char *src, apr_size_t slen)
apreq_charset_t apreq_charset_divine (const char *src, apr_size_t slen)
apreq_charset_t apreq_charset_divine (const char *src, apr_size_t slen)
apr_status_t apreq_decode (char *dest, apr_size_t *dlen, const char *src, apr_size_t slen)
apr_status_t apreq_decode (char *dest, apr_size_t *dlen, const char *src, apr_size_t slen)
apr_status_t apreq_decodev (char *dest, apr_size_t *dlen, struct iovec *v, int nelts)
apr_status_t apreq_decodev (char *dest, apr_size_t *dlen, struct iovec *v, int nelts)
static APR_INLINE char * apreq_escape (apr_pool_t *p, const char *src, const apr_size_t slen)
static APR_INLINE char * apreq_escape (apr_pool_t *p, const char *src, const apr_size_t slen)
static APR_INLINE apr_ssize_t apreq_unescape (char *str)
static APR_INLINE apr_ssize_t apreq_unescape (char *str)
apr_int64_t apreq_atoi64f (const char *s)
apr_int64_t apreq_atoi64f (const char *s)
apr_int64_t apreq_atoi64t (const char *s)
apr_int64_t apreq_atoi64t (const char *s)
apr_status_t apreq_brigade_fwrite (apr_file_t *f, apr_off_t *wlen, apr_bucket_brigade *bb)
apr_status_t apreq_brigade_fwrite (apr_file_t *f, apr_off_t *wlen, apr_bucket_brigade *bb)
apr_status_t apreq_file_mktemp (apr_file_t **fp, apr_pool_t *pool, const char *path)
apr_status_t apreq_file_mktemp (apr_file_t **fp, apr_pool_t *pool, const char *path)
static APR_INLINE apr_status_t apreq_brigade_setaside (apr_bucket_brigade *bb, apr_pool_t *p)
static APR_INLINE apr_status_t apreq_brigade_setaside (apr_bucket_brigade *bb, apr_pool_t *p)
static APR_INLINE apr_status_t apreq_brigade_copy (apr_bucket_brigade *d, apr_bucket_brigade *s)
static APR_INLINE apr_status_t apreq_brigade_copy (apr_bucket_brigade *d, apr_bucket_brigade *s)
static APR_INLINE void apreq_brigade_move (apr_bucket_brigade *d, apr_bucket_brigade *s, apr_bucket *e)
static APR_INLINE void apreq_brigade_move (apr_bucket_brigade *d, apr_bucket_brigade *s, apr_bucket *e)
apr_status_t apreq_header_attribute (const char *hdr, const char *name, const apr_size_t nlen, const char **val, apr_size_t *vlen)
apr_status_t apreq_header_attribute (const char *hdr, const char *name, const apr_size_t nlen, const char **val, apr_size_t *vlen)
apr_status_t apreq_brigade_concat (apr_pool_t *pool, const char *temp_dir, apr_size_t brigade_limit, apr_bucket_bri gade *out, apr_bucket_brigade *in)
apr_status_t apreq_brigade_concat (apr_pool_t *pool, const char *temp_dir, apr_size_t brigade_limit, apr_bucket_brigad e *out, apr_bucket_brigade *in)
apr_file_tapreq_brigade_spoolfile (apr_bucket_brigade *bb)
apr_file_tapreq_brigade_spoolfile (apr_bucket_brigade *bb)


Detailed Description

@@ -87,17 +84,17 @@ This header contains useful functions fo
  • string <-> array converters
  • substring search functions
  • simple encoders & decoders for urlencoded strings
  • simple time, date, & file-size converters

Function Documentation

- +
- + - +
apr_int64_t apreq_atoi64f apr_int64_t apreq_atoi64f ( const char *  s  ) 
@@ -111,21 +108,21 @@ Converts file sizes (KMG) to bytes

Returns:
64-bit integer representation of s.
-
Todo:
What happens when s is malformed? Should this return an unsigned value instead?
+
Todo:
What happens when s is malformed? Should this return an unsigned value instead?

- +

- + - +
apr_int64_t apreq_atoi64t apr_int64_t apreq_atoi64t ( const char *  s  ) 
@@ -139,18 +136,18 @@ Converts time strings (YMDhms) to second
Returns:
64-bit integer representation of s as seconds.
-
Todo:
What happens when s is malformed? Should this return an unsigned value instead?
+
Todo:
What happens when s is malformed? Should this return an unsigned value instead?

- +

- + - + @@ -162,7 +159,7 @@ Converts time strings (YMDhms) to second - + @@ -180,7 +177,7 @@ Converts time strings (YMDhms) to second - +
apr_status_t apreq_brigade_concat apr_status_t apreq_brigade_concat (apr_pool_tapr_pool_t pool,
apr_size_t apr_size_t  brigade_limit,
)
@@ -198,17 +195,17 @@ Concatenates the brigades, spooling larg
Returns:
APR_SUCCESS.

-Error status code resulting from either apr_brigade_length(), apreq_file_mktemp(), apreq_brigade_fwrite(), or apr_file_seek().

-
Todo:
Flesh out these error codes, making them as explicit as possible.
+Error status code resulting from either apr_brigade_length(), apreq_file_mktemp(), apreq_brigade_fwrite(), or apr_file_seek(). +
Todo:
Flesh out these error codes, making them as explicit as possible.

- +

- + @@ -222,7 +219,7 @@ Error status code resulting from either - +
static APR_INLINE apr_status_t apreq_brigade_copy static APR_INLINE apr_status_t apreq_brigade_copy ( apr_bucket_brigade d,
) [static] [static]
@@ -242,20 +239,20 @@ Error status code from an unsuccessful a

- +

- + - + - + @@ -267,7 +264,7 @@ Error status code from an unsuccessful a - +
apr_status_t apreq_brigade_fwrite apr_status_t apreq_brigade_fwrite (apr_file_tapr_file_t f,
apr_off_tapr_off_t wlen,
)
@@ -283,12 +280,12 @@ Writes brigade to a file.

Returns:
APR_SUCCESS.

-Error status code from either an unsuccessful apr_bucket_read(), or a failed apr_file_writev().

+Error status code from either an unsuccessful apr_bucket_read(), or a failed apr_file_writev().
Remarks:
This function leaks a bucket brigade into bb->p whenever the final bucket in bb is a spool bucket.

- +

@@ -313,7 +310,7 @@ Error status code from either an unsucce - +
) [static] [static]
@@ -332,12 +329,12 @@ Move the front of a brigade.

- +

- + @@ -345,13 +342,13 @@ Move the front of a brigade.

- + - +
static APR_INLINE apr_status_t apreq_brigade_setaside static APR_INLINE apr_status_t apreq_brigade_setaside ( apr_bucket_brigade bb,
apr_pool_tapr_pool_t p 
) [static] [static]
@@ -370,17 +367,17 @@ Error status code from an unsuccessful a

- +

- + - +
apr_file_t* apreq_brigade_spoolfile apr_file_t* apreq_brigade_spoolfile ( apr_bucket_brigade bb  ) 
@@ -397,12 +394,12 @@ Determines the spool file used by the br

- +

- + @@ -410,13 +407,13 @@ Determines the spool file used by the br - + - +
apreq_charset_t apreq_charset_divine apreq_charset_t apreq_charset_divine ( const char *  src,
apr_size_t apr_size_t  slen 
)
@@ -437,12 +434,12 @@ APREQ_CHARSET_CP1252 if the string has c

- +

- + @@ -456,13 +453,13 @@ APREQ_CHARSET_CP1252 if the string has c - + - +
apr_size_t apreq_cp1252_to_utf8 apr_size_t apreq_cp1252_to_utf8 ( char *  dest,
apr_size_t apr_size_t  slen 
)
@@ -481,12 +478,12 @@ Convert a string from cp1252 to utf8. Ca

- +

- + @@ -494,7 +491,7 @@ Convert a string from cp1252 to utf8. Ca - + @@ -506,13 +503,13 @@ Convert a string from cp1252 to utf8. Ca - + - +
apr_status_t apreq_decode apr_status_t apreq_decode ( char *  dest,
apr_size_tapr_size_t dlen,
apr_size_t apr_size_t  slen 
)
@@ -530,17 +527,17 @@ Url-decodes a string.

Returns:
APR_SUCCESS.

APR_INCOMPLETE if the string ends in the middle of an escape sequence.

-APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input.

+APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input.
Remarks:
In the non-success case, dlen will be set to include the last succesfully decoded value. This function decodes %uXXXX into a utf8 (wide) character, following ECMA-262 (the Javascript spec) Section B.2.1.

- +

- + @@ -548,7 +545,7 @@ APR_INCOMPLETE if the string ends in the - + @@ -566,7 +563,7 @@ APR_INCOMPLETE if the string ends in the - +
apr_status_t apreq_decodev apr_status_t apreq_decodev ( char *  dest,
apr_size_tapr_size_t dlen,
)
@@ -584,17 +581,17 @@ Url-decodes an iovec array.

Returns:
APR_SUCCESS.

APR_INCOMPLETE if the iovec ends in the middle of an escape sequence.

-APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input.

+APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input.
Remarks:
In the non-APR_SUCCESS case, dlen will be set to include the last succesfully decoded value. This function decodes %uXXXX into a utf8 (wide) character, following ECMA-262 (the Javascript spec) Section B.2.1.

- +

- + @@ -608,13 +605,13 @@ APR_INCOMPLETE if the iovec ends in the - + - +
apr_size_t apreq_encode apr_size_t apreq_encode ( char *  dest,
const apr_size_t const apr_size_t  slen 
)
@@ -633,14 +630,14 @@ Url-encodes a string.

- +

- + @@ -652,13 +649,13 @@ Url-encodes a string.

- + - +
static APR_INLINE char* apreq_escape (apr_pool_tapr_pool_t p,
const apr_size_t const apr_size_t  slen 
) [static] [static]
@@ -678,20 +675,20 @@ Returns an url-encoded copy of a string.

- +

- + - + - + @@ -703,7 +700,7 @@ Returns an url-encoded copy of a string. - +
apr_status_t apreq_file_mktemp apr_status_t apreq_file_mktemp (apr_file_t ** apr_file_t **  fp,
apr_pool_tapr_pool_t pool,
)
@@ -719,16 +716,16 @@ Makes a temporary file.

Returns:
APR_SUCCESS.

-Error status code from unsuccessful apr_filepath_merge(), or a failed apr_file_mktemp().

+Error status code from unsuccessful apr_filepath_merge(), or a failed apr_file_mktemp().

- +

- + @@ -742,7 +739,7 @@ Error status code from unsuccessful - + @@ -754,13 +751,13 @@ Error status code from unsuccessful - + - +
apr_status_t apreq_header_attribute apr_status_t apreq_header_attribute ( const char *  hdr, const apr_size_t const apr_size_t  nlen,
apr_size_tapr_size_t vlen 
)
@@ -778,17 +775,17 @@ Search a header string for the value of
Returns:
APR_SUCCESS.

-APREQ_ERROR_NOATTR if the attribute is not found.

-APREQ_ERROR_BADSEQ if an unpaired quote mark was detected.

+APREQ_ERROR_NOATTR if the attribute is not found.

+APREQ_ERROR_BADSEQ if an unpaired quote mark was detected.

- +

- + @@ -796,7 +793,7 @@ Search a header string for the value of - + @@ -808,19 +805,19 @@ Search a header string for the value of - + - + - +
apr_ssize_t apreq_index apr_ssize_t apreq_index ( const char *  hay,
apr_size_t apr_size_t  hlen,
apr_size_t apr_size_t  nlen,
const apreq_match_t const apreq_match_t  type 
)
@@ -841,14 +838,14 @@ Returns offset of match string's locatio

- +

- + @@ -866,13 +863,13 @@ Returns offset of match string's locatio - + - +
char* apreq_join (apr_pool_tapr_pool_t p,
apreq_join_t apreq_join_t  mode 
)
@@ -884,7 +881,7 @@ Join an array of values. The result is a - +
p Pool to allocate return value.
sep String that is inserted between the joined values.
arr Array of apreq_value_t entries.
arr Array of apreq_value_t entries.
mode Join type- see apreq_join_t.
@@ -892,12 +889,12 @@ Join an array of values. The result is a

- +

- + @@ -911,13 +908,13 @@ Join an array of values. The result is a - + - +
apr_size_t apreq_quote apr_size_t apreq_quote ( char *  dest,
const apr_size_t const apr_size_t  slen 
)
@@ -937,12 +934,12 @@ Places a quoted copy of src into dest. E

- +

- + @@ -956,20 +953,20 @@ Places a quoted copy of src into dest. E - + - +
apr_size_t apreq_quote_once apr_size_t apreq_quote_once ( char *  dest,
const apr_size_t const apr_size_t  slen 
)

-Same as apreq_quote() except when src begins and ends in quote marks. In that case it assumes src is quoted correctly, and just copies src to dest.

+Same as apreq_quote() except when src begins and ends in quote marks. In that case it assumes src is quoted correctly, and just copies src to dest.

Parameters:
@@ -982,17 +979,17 @@ Same as +
dest Location of quoted copy. Must be large enough to hold the copy and trailing null byte.
- + - +
static APR_INLINE apr_ssize_t apreq_unescape static APR_INLINE apr_ssize_t apreq_unescape ( char *  str  )  [static] [static]
@@ -1009,13 +1006,14 @@ An in-situ url-decoder.

+