Apache HTTPD
apr_escape.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#ifndef APR_ESCAPE_H
21#define APR_ESCAPE_H
22#include "apr.h"
23#include "apr_general.h"
24#ifdef __cplusplus
25extern "C" {
26#endif
27
34/* Simple escape/unescape functions.
35 *
36 * The design goal of these functions are:
37 *
38 * - Avoid unnecessary work.
39 *
40 * In most cases the strings passed in do not need to be escaped at all. In
41 * these cases the original string will be returned.
42 *
43 * - Lowest possible memory footprint.
44 *
45 * The amount of memory allocated for a given encoding is calculated based
46 * on the exact amount of memory needed, and not the theoretical worst case
47 * scenario.
48 *
49 */
50
56#define APR_ESCAPE_STRING (-1)
57
61#define APR_ESCAPE_LDAP_DN (0x01)
62
66#define APR_ESCAPE_LDAP_FILTER (0x02)
67
71#define APR_ESCAPE_LDAP_ALL (0x03)
72
87
100APR_DECLARE(const char *) apr_pescape_shell(apr_pool_t *p, const char *str)
102
122 apr_size_t *len);
123
141 const char *forbid, const char *reserved, int plus)
143
156
166 const char *str) __attribute__((nonnull(1)));
167
189
209 int partial) __attribute__((nonnull(1)));
210
224
235 const char *str) __attribute__((nonnull(1)));
236
255
268 int toasc) __attribute__((nonnull(1)));
269
287
302
324
343 int quote);
344
356
369
382
395 int colon, apr_size_t *len);
396
410
425
427#ifdef __cplusplus
428}
429#endif
430
431#endif /* !APR_ESCAPE_H */
APR Miscellaneous library routines.
const char apr_ssize_t slen
Definition apr_escape.h:86
const char * url
Definition apr_escape.h:120
const void apr_size_t int colon
Definition apr_escape.h:355
const char apr_ssize_t int partial
Definition apr_escape.h:188
const char * str
Definition apr_escape.h:85
const void * src
Definition apr_escape.h:354
const char * path
Definition apr_escape.h:187
const char apr_ssize_t const char * forbid
Definition apr_escape.h:121
const char apr_ssize_t const char const char int plus
Definition apr_escape.h:121
const void apr_size_t srclen
Definition apr_escape.h:355
const char apr_ssize_t const char const char * reserved
Definition apr_escape.h:121
const char apr_ssize_t apr_size_t * len
Definition apr_escape.h:86
const char apr_ssize_t int quote
Definition apr_escape.h:323
const void apr_ssize_t int flags
Definition apr_escape.h:409
const char apr_ssize_t int toasc
Definition apr_escape.h:254
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
Definition apr_pools.h:646
apr_size_t size
int apr_status_t
Definition apr_errno.h:44
const char apr_status_t(*) apr_pool_t *poo __attribute__)((nonnull(2, 4)))
Definition apr_pools.h:567
apr_pool_t * p
Definition md_event.c:32