34#include "apr_arch_misc.h"
49 (*os)->errarg = (
void*)(
stderr);
63 (*os)->interleave = 0;
65 (*os)->skip_start = 1;
72 char *optch,
const char **
optarg)
90 if ((os->
opt = (
int) *os->
place++) == (
int)
':' ||
96 if (os->
opt == (
int)
'-') {
103 (os->
errfn)(os->
errarg,
"%s: illegal option -- %c\n",
117 else if (os->
argc <= ++os->
ind) {
125 "%s: option requires an argument -- %c\n",
202 int *optch,
const char **
optarg)
233 if (*
p ==
'-' &&
p[1] !=
'\0') {
239 if (
opts[
i].optch == 0)
245 && (
p[
len] ==
'\0' ||
p[
len] ==
'='))
249 *optch =
opts[
i].optch;
251 if (
opts[
i].has_arg) {
284 if (
opts[
i].optch == 0)
292 if (
opts[
i].has_arg) {
const char apr_size_t len
APR general purpose library routines.
static void reverse(const char **argv, int start, int len)
static apr_status_t serr(apr_getopt_t *os, const char *err, const char *str, apr_status_t status)
static void permute(apr_getopt_t *os)
static apr_status_t cerr(apr_getopt_t *os, const char *err, int ch, apr_status_t status)
apr_file_t apr_off_t start
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
void() apr_getopt_err_fn_t(void *arg, const char *err,...)
apr_int32_t apr_int32_t apr_int32_t err
apr_getopt_err_fn_t * errfn