#include "argparse.h"
Go to the source code of this file.
Functions | |
static const char * | prefix_skip (const char *str, const char *prefix) |
static int | prefix_cmp (const char *str, const char *prefix) |
static void | argparse_error (struct argparse *This, const struct argparse_option *opt, const char *reason) |
static int | argparse_getvalue (struct argparse *This, const struct argparse_option *opt, int flags) |
static void | argparse_options_check (const struct argparse_option *options) |
static int | argparse_short_opt (struct argparse *This, const struct argparse_option *options) |
static int | argparse_long_opt (struct argparse *This, const struct argparse_option *options) |
int | argparse_init (struct argparse *This, struct argparse_option *options, const char *const *usage, int flags) |
int | argparse_parse (struct argparse *This, int argc, const char **argv) |
void | argparse_usage (struct argparse *This) |
int | argparse_help_cb (struct argparse *This, const struct argparse_option *option, int terminate) |
Macros | |
#define | OPT_UNSET 1 |
Function Documentation
|
static |
Definition at line 16 of file argparse.c.
Referenced by argparse_long_opt().
|
static |
Definition at line 23 of file argparse.c.
Referenced by argparse_long_opt().
|
static |
Definition at line 33 of file argparse.c.
Referenced by argparse_getvalue().
|
static |
Definition at line 46 of file argparse.c.
Referenced by argparse_long_opt(), and argparse_short_opt().
|
static |
Definition at line 137 of file argparse.c.
Referenced by argparse_parse().
|
static |
Definition at line 157 of file argparse.c.
Referenced by argparse_parse().
|
static |
Definition at line 169 of file argparse.c.
Referenced by argparse_parse().
int argparse_init | ( | struct argparse * | This, |
struct argparse_option * | options, | ||
const char *const * | usage, | ||
int | flags | ||
) |
- Examples:
- bypass/watchdog/bypass_watchdog_example.c, net/capfileconvert/capfileconvert_example.c, net/ipfdemo/ipfdemo_example.c, net/readcapfile/readcapfile_example.c, net/replayGS/replayGS_example.c, net/transmit_multifunction/transmit_multifunction_example.c, and statUsage/statUsage_example.c.
Definition at line 208 of file argparse.c.
Referenced by main().
int argparse_parse | ( | struct argparse * | This, |
int | argc, | ||
const char ** | argv | ||
) |
- Examples:
- bypass/watchdog/bypass_watchdog_example.c, net/capfileconvert/capfileconvert_example.c, net/ipfdemo/ipfdemo_example.c, net/readcapfile/readcapfile_example.c, net/replayGS/replayGS_example.c, net/transmit_multifunction/transmit_multifunction_example.c, and statUsage/statUsage_example.c.
Definition at line 219 of file argparse.c.
Referenced by main().
void argparse_usage | ( | struct argparse * | This | ) |
Definition at line 286 of file argparse.c.
Referenced by argparse_help_cb(), argparse_parse(), and main().
int argparse_help_cb | ( | struct argparse * | This, |
const struct argparse_option * | option, | ||
int | terminate | ||
) |
Definition at line 388 of file argparse.c.
Macro Definition Documentation
#define OPT_UNSET 1 |
Copyright (C) 2012-2015 Yecheng Fu <cofyc.jackson at gmail dot com> All rights reserved.
Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Note: Some small changes has been made by Natatech.
Definition at line 13 of file argparse.c.
Referenced by argparse_getvalue(), and argparse_long_opt().