Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apr_getopt.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  */
16 
17 #ifndef APR_GETOPT_H
18 #define APR_GETOPT_H
19 
25 #include "apr_pools.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30 
42 typedef void (apr_getopt_err_fn_t)(void *arg, const char *err, ...);
43 
45 typedef struct apr_getopt_t apr_getopt_t;
46 
50 struct apr_getopt_t {
56  void *errarg;
58  int ind;
60  int opt;
62  int reset;
64  int argc;
66  const char **argv;
68  char const* place;
74  int skip_end;
75 };
76 
79 
85  const char *name;
87  int optch;
89  int has_arg;
91  const char *description;
92 };
93 
104  int argc, const char * const *argv);
105 
122 APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
123  char *option_ch, const char **option_arg);
124 
151  const apr_getopt_option_t *opts,
152  int *option_ch,
153  const char **option_arg);
156 #ifdef __cplusplus
157 }
158 #endif
159 
160 #endif /* ! APR_GETOPT_H */
apr_status_t apr_getopt(apr_getopt_t *os, const char *opts, char *option_ch, const char **option_arg)
int argc
Definition: apr_getopt.h:64
Definition: apr_getopt.h:50
const char * name
Definition: apr_getopt.h:85
int reset
Definition: apr_getopt.h:62
int ind
Definition: apr_getopt.h:58
APR memory allocation.
const char * description
Definition: apr_getopt.h:91
void( apr_getopt_err_fn_t)(void *arg, const char *err,...)
Definition: apr_getopt.h:42
dav_error * err
Definition: mod_dav.h:203
apr_getopt_err_fn_t * errfn
Definition: apr_getopt.h:54
apr_status_t apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont, int argc, const char *const *argv)
int has_arg
Definition: apr_getopt.h:89
void * errarg
Definition: apr_getopt.h:56
int interleave
Definition: apr_getopt.h:70
int optch
Definition: apr_getopt.h:87
#define APR_DECLARE(x)
Definition: macros.h:6
char const * place
Definition: apr_getopt.h:68
int skip_start
Definition: apr_getopt.h:72
apr_status_t apr_getopt_long(apr_getopt_t *os, const apr_getopt_option_t *opts, int *option_ch, const char **option_arg)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
typedef void(APR_THREAD_FUNC *PFN_HSE_IO_COMPLETION)(EXTENSION_CONTROL_BLOCK *ecb
int apr_status_t
Definition: apr_errno.h:44
int opt
Definition: apr_getopt.h:60
const char ** argv
Definition: apr_getopt.h:66
apr_pool_t * cont
Definition: apr_getopt.h:52
int skip_end
Definition: apr_getopt.h:74
Definition: apr_getopt.h:83