apr_lib.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_LIB_H
00018 #define APR_LIB_H
00019 
00028 #include "apr.h"
00029 #include "apr_errno.h"
00030 
00031 #if APR_HAVE_CTYPE_H
00032 #include <ctype.h>
00033 #endif
00034 #if APR_HAVE_STDARG_H
00035 #include <stdarg.h>
00036 #endif
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif /* __cplusplus */
00041 
00052 #define HUGE_STRING_LEN 8192
00053 
00054 /*
00055  * Define the structures used by the APR general-purpose library.
00056  */
00057 
00059 typedef struct apr_vformatter_buff_t apr_vformatter_buff_t;
00060 
00064 struct apr_vformatter_buff_t {
00066     char *curpos;
00068     char *endpos;
00069 };
00070 
00084 APR_DECLARE(const char *) apr_filepath_name_get(const char *pathname);
00085 
00087 APR_DECLARE(const char *) apr_filename_of_pathname(const char *pathname);
00088 
00095 #ifdef WIN32
00096 #define apr_killpg(x, y)
00097 #else /* WIN32 */
00098 #ifdef NO_KILLPG
00099 #define apr_killpg(x, y)        (kill (-(x), (y)))
00100 #else /* NO_KILLPG */
00101 #define apr_killpg(x, y)        (killpg ((x), (y)))
00102 #endif /* NO_KILLPG */
00103 #endif /* WIN32 */
00104 
00166 APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *b),
00167                                 apr_vformatter_buff_t *c, const char *fmt,
00168                                 va_list ap);
00169 
00176 APR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char *pwbuf, 
00177                                            apr_size_t *bufsize);
00178 
00190 #define apr_isalnum(c) (isalnum(((unsigned char)(c))))
00191 
00192 #define apr_isalpha(c) (isalpha(((unsigned char)(c))))
00193 
00194 #define apr_iscntrl(c) (iscntrl(((unsigned char)(c))))
00195 
00196 #define apr_isdigit(c) (isdigit(((unsigned char)(c))))
00197 
00198 #define apr_isgraph(c) (isgraph(((unsigned char)(c))))
00199 
00200 #define apr_islower(c) (islower(((unsigned char)(c))))
00201 
00202 #ifdef isascii
00203 #define apr_isascii(c) (isascii(((unsigned char)(c))))
00204 #else
00205 #define apr_isascii(c) (((c) & ~0x7f)==0)
00206 #endif
00207 
00208 #define apr_isprint(c) (isprint(((unsigned char)(c))))
00209 
00210 #define apr_ispunct(c) (ispunct(((unsigned char)(c))))
00211 
00212 #define apr_isspace(c) (isspace(((unsigned char)(c))))
00213 
00214 #define apr_isupper(c) (isupper(((unsigned char)(c))))
00215 
00216 #define apr_isxdigit(c) (isxdigit(((unsigned char)(c))))
00217 
00218 #define apr_tolower(c) (tolower(((unsigned char)(c))))
00219 
00220 #define apr_toupper(c) (toupper(((unsigned char)(c))))
00221 
00224 #ifdef __cplusplus
00225 }
00226 #endif
00227 
00228 #endif  /* ! APR_LIB_H */

Generated on Mon Nov 26 11:47:26 2007 for Apache Portable Runtime by  doxygen 1.5.2