Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

apr_getopt.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation 00002 * 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 */ 00015 00016 #ifndef APR_GETOPT_H 00017 #define APR_GETOPT_H 00018 00024 #include "apr_pools.h" 00025 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif /* __cplusplus */ 00029 00039 typedef void (apr_getopt_err_fn_t)(void *arg, const char *err, ...); 00040 00042 typedef struct apr_getopt_t apr_getopt_t; 00043 00047 struct apr_getopt_t { 00049 apr_pool_t *cont; 00051 apr_getopt_err_fn_t *errfn; 00053 void *errarg; 00055 int ind; 00057 int opt; 00059 int reset; 00061 int argc; 00063 const char **argv; 00065 char const* place; 00067 int interleave; 00069 int skip_start; 00071 int skip_end; 00072 }; 00073 00075 typedef struct apr_getopt_option_t apr_getopt_option_t; 00076 00080 struct apr_getopt_option_t { 00082 const char *name; 00084 int optch; 00086 int has_arg; 00088 const char *description; 00089 }; 00090 00100 APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont, 00101 int argc, const char * const *argv); 00102 00119 APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts, 00120 char *option_ch, const char **option_arg); 00121 00147 APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os, 00148 const apr_getopt_option_t *opts, 00149 int *option_ch, 00150 const char **option_arg); 00153 #ifdef __cplusplus 00154 } 00155 #endif 00156 00157 #endif /* ! APR_GETOPT_H */

Generated on Tue Aug 10 17:42:34 2004 for Apache Portable Runtime by doxygen 1.3.7