From cvs-return-24485-apmail-httpd-cvs-archive=httpd.apache.org@httpd.apache.org Sat Feb 11 16:55:06 2006 Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 52552 invoked from network); 11 Feb 2006 16:55:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Feb 2006 16:55:03 -0000 Received: (qmail 95070 invoked by uid 500); 11 Feb 2006 16:54:24 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 93889 invoked by uid 500); 11 Feb 2006 16:54:14 -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 93413 invoked by uid 99); 11 Feb 2006 16:54:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Feb 2006 08:54:10 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 11 Feb 2006 08:53:33 -0800 Received: (qmail 49098 invoked by uid 65534); 11 Feb 2006 16:53:13 -0000 Message-ID: <20060211165313.49095.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r377002 [25/31] - in /httpd/site/trunk: docs/apreq/docs/libapreq2/ xdocs/apreq/docs/libapreq2/ Date: Sat, 11 Feb 2006 16:52:48 -0000 To: cvs@httpd.apache.org From: joes@apache.org X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: httpd/site/trunk/xdocs/apreq/docs/libapreq2/apreq__util_8h-source.html URL: http://svn.apache.org/viewcvs/httpd/site/trunk/xdocs/apreq/docs/libapreq2/apreq__util_8h-source.html?rev=377002&r1=377001&r2=377002&view=diff ============================================================================== --- httpd/site/trunk/xdocs/apreq/docs/libapreq2/apreq__util_8h-source.html (original) +++ httpd/site/trunk/xdocs/apreq/docs/libapreq2/apreq__util_8h-source.html Sat Feb 11 08:52:42 2006 @@ -1,7 +1,7 @@ - libapreq2-2.06-dev: libapreq2: include/apreq_util.h Source File + libapreq2-2.07: libapreq2: include/apreq_util.h Source File - - - -

apreq_util.h

Go to the documentation of this file.
00001 /*
-00002 **  Copyright 2003-2005  The Apache Software Foundation
+
+
+
+

include/apreq_util.h

Go to the documentation of this file.
00001 /*
+00002 **  Copyright 2003-2006  The Apache Software Foundation
 00003 **
 00004 **  Licensed under the Apache License, Version 2.0 (the "License");
 00005 **  you may not use this file except in compliance with the License.
@@ -39,150 +50,153 @@
 00023 
 00024 #ifdef  __cplusplus
 00025  extern "C" {
-00026 #endif 
+00026 #endif
 00027 
-00052 APREQ_DECLARE(char *) apreq_join(apr_pool_t *p, 
-00053                                  const char *sep, 
-00054                                  const apr_array_header_t *arr, 
-00055                                  apreq_join_t mode);
+00052 APREQ_DECLARE(char *) apreq_join(apr_pool_t *p,
+00053                                  const char *sep,
+00054                                  const apr_array_header_t *arr,
+00055                                  apreq_join_t mode);
 00056 
-00069 APREQ_DECLARE(apr_ssize_t) apreq_index(const char* hay, apr_size_t hlen, 
-00070                                        const char* ndl, apr_size_t nlen, 
-00071                                        const apreq_match_t type);
+00069 APREQ_DECLARE(apr_ssize_t) apreq_index(const char* hay, apr_size_t hlen,
+00070                                        const char* ndl, apr_size_t nlen,
+00071                                        const apreq_match_t type);
 00072 
-00085 APREQ_DECLARE(apr_size_t) apreq_quote(char *dest, const char *src, 
-00086                                       const apr_size_t slen);
+00085 APREQ_DECLARE(apr_size_t) apreq_quote(char *dest, const char *src,
+00086                                       const apr_size_t slen);
 00087 
-00101 APREQ_DECLARE(apr_size_t) apreq_quote_once(char *dest, const char *src, 
-00102                                            const apr_size_t slen);
+00101 APREQ_DECLARE(apr_size_t) apreq_quote_once(char *dest, const char *src,
+00102                                            const apr_size_t slen);
 00103 
-00114 APREQ_DECLARE(apr_size_t) apreq_encode(char *dest, const char *src, 
-00115                                        const apr_size_t slen);
+00114 APREQ_DECLARE(apr_size_t) apreq_encode(char *dest, const char *src,
+00115                                        const apr_size_t slen);
 00116 
-00128 APREQ_DECLARE(apr_size_t) apreq_cp1252_to_utf8(char *dest,
-00129                                                const char *src, apr_size_t slen);
+00128 APREQ_DECLARE(apr_size_t) apreq_cp1252_to_utf8(char *dest,
+00129                                                const char *src, apr_size_t slen);
 00130 
-00151 APREQ_DECLARE(apr_status_t) apreq_decode(char *dest, apr_size_t *dlen,
-00152                                          const char *src, apr_size_t slen);
-00153 
-00174 APREQ_DECLARE(apr_status_t) apreq_decodev(char *dest, apr_size_t *dlen,
-00175                                           struct iovec *v, int nelts);
-00176 
-00189 static APR_INLINE
-00190 char *apreq_escape(apr_pool_t *p, const char *src, const apr_size_t slen)
-00191 {
-00192     char *rv;
-00193 
-00194     if (src == NULL)
-00195         return NULL;
-00196 
-00197     rv = apr_palloc(p, 3 * slen + 1);
-00198     apreq_encode(rv, src, slen);
-00199     return rv;
-00200 }
-00201 
-00209 static APR_INLINE apr_ssize_t apreq_unescape(char *str)
-00210 {
-00211     apr_size_t len;
-00212     apr_status_t rv = apreq_decode(str, &len, str, strlen(str));
-00213     if (rv == APR_SUCCESS)
-00214         return (apr_ssize_t)len;
-00215     else
-00216         return -1;
-00217 }
-00218 
-00230 APREQ_DECLARE(apr_int64_t) apreq_atoi64f(const char *s);
-00231 
-00243 APREQ_DECLARE(apr_int64_t) apreq_atoi64t(const char *s);
-00244 
-00262 APREQ_DECLARE(apr_status_t) apreq_brigade_fwrite(apr_file_t *f,
-00263                                                  apr_off_t *wlen,
-00264                                                  apr_bucket_brigade *bb);
-00281 APREQ_DECLARE(apr_status_t) apreq_file_mktemp(apr_file_t **fp, 
-00282                                               apr_pool_t *pool,
-00283                                               const char *path);
-00284 
-00294 static APR_INLINE
-00295 apr_status_t apreq_brigade_setaside(apr_bucket_brigade *bb, apr_pool_t *p)
-00296 {
-00297     apr_bucket *e;
-00298     for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb);
-00299          e = APR_BUCKET_NEXT(e))
-00300     {
-00301         apr_status_t rv = apr_bucket_setaside(e, p);
-00302         if (rv != APR_SUCCESS)
-00303             return rv;
-00304     }
-00305     return APR_SUCCESS;
-00306 }
-00307 
-00308 
-00321 static APR_INLINE
-00322 apr_status_t apreq_brigade_copy(apr_bucket_brigade *d, apr_bucket_brigade *s) {
-00323     apr_bucket *e;
-00324     for (e = APR_BRIGADE_FIRST(s); e != APR_BRIGADE_SENTINEL(s);
-00325          e = APR_BUCKET_NEXT(e))
-00326     {
-00327         apr_bucket *c;
-00328         apr_status_t rv = apr_bucket_copy(e, &c);
-00329         if (rv != APR_SUCCESS)
-00330             return rv;
-00331 
-00332         APR_BRIGADE_INSERT_TAIL(d, c);
-00333     }
-00334     return APR_SUCCESS;
-00335 }
-00336 
-00348 static APR_INLINE
-00349 void apreq_brigade_move(apr_bucket_brigade *d, apr_bucket_brigade *s,
-00350                         apr_bucket *e)
-00351 {
-00352     apr_bucket *f;     
-00353 
-00354     if (e != APR_BRIGADE_SENTINEL(s)) {
-00355         f = APR_RING_FIRST(&s->list);
-00356         if (f == e) /* zero buckets to be moved */
-00357             return;
-00358 
-00359         /* obtain the last bucket to be moved */
-00360         e = APR_RING_PREV(e, link);
-00361 
-00362         APR_RING_UNSPLICE(f, e, link);
-00363         APR_RING_SPLICE_HEAD(&d->list, f, e, apr_bucket, link);
-00364     }
-00365     else {
-00366         APR_BRIGADE_CONCAT(d, s);
-00367     }
-00368 }
-00369 
-00370 
-00384 APREQ_DECLARE(apr_status_t) apreq_header_attribute(const char *hdr,
-00385                                                    const char *name,
-00386                                                    const apr_size_t nlen,
-00387                                                    const char **val,
-00388                                                    apr_size_t *vlen);
-00389 
-00390 
-00408 APREQ_DECLARE(apr_status_t) apreq_brigade_concat(apr_pool_t *pool,
-00409                                                  const char *temp_dir,
-00410                                                  apr_size_t brigade_limit,
-00411                                                  apr_bucket_brigade *out, 
-00412                                                  apr_bucket_brigade *in);
-00413 
-00422 APREQ_DECLARE(apr_file_t *)apreq_brigade_spoolfile(apr_bucket_brigade *bb);
-00423 
-00424 #ifdef __cplusplus
-00425  }
-00426 #endif
+00142 APREQ_DECLARE(apreq_charset_t) apreq_charset_divine(const char *src,
+00143                                                     apr_size_t slen);
+00144 
+00165 APREQ_DECLARE(apr_status_t) apreq_decode(char *dest, apr_size_t *dlen,
+00166                                          const char *src, apr_size_t slen);
+00167 
+00188 APREQ_DECLARE(apr_status_t) apreq_decodev(char *dest, apr_size_t *dlen,
+00189                                           struct iovec *v, int nelts);
+00190 
+00203 static APR_INLINE
+00204 char *apreq_escape(apr_pool_t *p, const char *src, const apr_size_t slen)
+00205 {
+00206     char *rv;
+00207 
+00208     if (src == NULL)
+00209         return NULL;
+00210 
+00211     rv = (char *)apr_palloc(p, 3 * slen + 1);
+00212     apreq_encode(rv, src, slen);
+00213     return rv;
+00214 }
+00215 
+00223 static APR_INLINE apr_ssize_t apreq_unescape(char *str)
+00224 {
+00225     apr_size_t len;
+00226     apr_status_t rv = apreq_decode(str, &len, str, strlen(str));
+00227     if (rv == APR_SUCCESS)
+00228         return (apr_ssize_t)len;
+00229     else
+00230         return -1;
+00231 }
+00232 
+00244 APREQ_DECLARE(apr_int64_t) apreq_atoi64f(const char *s);
+00245 
+00257 APREQ_DECLARE(apr_int64_t) apreq_atoi64t(const char *s);
+00258 
+00276 APREQ_DECLARE(apr_status_t) apreq_brigade_fwrite(apr_file_t *f,
+00277                                                  apr_off_t *wlen,
+00278                                                  apr_bucket_brigade *bb);
+00295 APREQ_DECLARE(apr_status_t) apreq_file_mktemp(apr_file_t **fp,
+00296                                               apr_pool_t *pool,
+00297                                               const char *path);
+00298 
+00308 static APR_INLINE
+00309 apr_status_t apreq_brigade_setaside(apr_bucket_brigade *bb, apr_pool_t *p)
+00310 {
+00311     apr_bucket *e;
+00312     for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb);
+00313          e = APR_BUCKET_NEXT(e))
+00314     {
+00315         apr_status_t rv = apr_bucket_setaside(e, p);
+00316         if (rv != APR_SUCCESS)
+00317             return rv;
+00318     }
+00319     return APR_SUCCESS;
+00320 }
+00321 
+00322 
+00335 static APR_INLINE
+00336 apr_status_t apreq_brigade_copy(apr_bucket_brigade *d, apr_bucket_brigade *s) {
+00337     apr_bucket *e;
+00338     for (e = APR_BRIGADE_FIRST(s); e != APR_BRIGADE_SENTINEL(s);
+00339          e = APR_BUCKET_NEXT(e))
+00340     {
+00341         apr_bucket *c;
+00342         apr_status_t rv = apr_bucket_copy(e, &c);
+00343         if (rv != APR_SUCCESS)
+00344             return rv;
+00345 
+00346         APR_BRIGADE_INSERT_TAIL(d, c);
+00347     }
+00348     return APR_SUCCESS;
+00349 }
+00350 
+00362 static APR_INLINE
+00363 void apreq_brigade_move(apr_bucket_brigade *d, apr_bucket_brigade *s,
+00364                         apr_bucket *e)
+00365 {
+00366     apr_bucket *f;
+00367 
+00368     if (e != APR_BRIGADE_SENTINEL(s)) {
+00369         f = APR_RING_FIRST(&s->list);
+00370         if (f == e) /* zero buckets to be moved */
+00371             return;
+00372 
+00373         /* obtain the last bucket to be moved */
+00374         e = APR_RING_PREV(e, link);
+00375 
+00376         APR_RING_UNSPLICE(f, e, link);
+00377         APR_RING_SPLICE_HEAD(&d->list, f, e, apr_bucket, link);
+00378     }
+00379     else {
+00380         APR_BRIGADE_CONCAT(d, s);
+00381     }
+00382 }
+00383 
+00384 
+00398 APREQ_DECLARE(apr_status_t) apreq_header_attribute(const char *hdr,
+00399                                                    const char *name,
+00400                                                    const apr_size_t nlen,
+00401                                                    const char **val,
+00402                                                    apr_size_t *vlen);
+00403 
+00404 
+00422 APREQ_DECLARE(apr_status_t) apreq_brigade_concat(apr_pool_t *pool,
+00423                                                  const char *temp_dir,
+00424                                                  apr_size_t brigade_limit,
+00425                                                  apr_bucket_brigade *out,
+00426                                                  apr_bucket_brigade *in);
 00427 
-00428 #endif /* APREQ_UTIL_H */
+00436 APREQ_DECLARE(apr_file_t *)apreq_brigade_spoolfile(apr_bucket_brigade *bb);
+00437 
+00438 #ifdef __cplusplus
+00439  }
+00440 #endif
+00441 
+00442 #endif /* APREQ_UTIL_H */