Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
parse-options.c File Reference
#include "util.h"
#include "parse-options.h"
#include "cache.h"
#include "header.h"

Go to the source code of this file.

Macros

#define OPT_SHORT   1
 
#define OPT_UNSET   2
 
#define USAGE_OPTS_WIDTH   24
 
#define USAGE_GAP   2
 

Functions

void parse_options_start (struct parse_opt_ctx_t *ctx, int argc, const char **argv, int flags)
 
int parse_options_step (struct parse_opt_ctx_t *ctx, const struct option *options, const char *const usagestr[])
 
int parse_options_end (struct parse_opt_ctx_t *ctx)
 
int parse_options (int argc, const char **argv, const struct option *options, const char *const usagestr[], int flags)
 
void usage_with_options (const char *const *usagestr, const struct option *opts)
 
int parse_options_usage (const char *const *usagestr, const struct option *opts)
 
int parse_opt_verbosity_cb (const struct option *opt, const char *arg __maybe_unused, int unset)
 

Macro Definition Documentation

#define OPT_SHORT   1

Definition at line 6 of file parse-options.c.

#define OPT_UNSET   2

Definition at line 7 of file parse-options.c.

#define USAGE_GAP   2

Definition at line 446 of file parse-options.c.

#define USAGE_OPTS_WIDTH   24

Definition at line 445 of file parse-options.c.

Function Documentation

int parse_opt_verbosity_cb ( const struct option opt,
const char *arg  __maybe_unused,
int  unset 
)

Definition at line 568 of file parse-options.c.

int parse_options ( int  argc,
const char **  argv,
const struct option options,
const char *const  usagestr[],
int  flags 
)

Definition at line 414 of file parse-options.c.

int parse_options_end ( struct parse_opt_ctx_t ctx)

Definition at line 407 of file parse-options.c.

void parse_options_start ( struct parse_opt_ctx_t ctx,
int  argc,
const char **  argv,
int  flags 
)

Definition at line 303 of file parse-options.c.

int parse_options_step ( struct parse_opt_ctx_t ctx,
const struct option options,
const char *const  usagestr[] 
)

Definition at line 320 of file parse-options.c.

int parse_options_usage ( const char *const usagestr,
const struct option opts 
)

Definition at line 561 of file parse-options.c.

void usage_with_options ( const char *const usagestr,
const struct option opts 
)

Definition at line 553 of file parse-options.c.