RetroArch
Functions | Variables
compat_getopt.c File Reference
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <retro_miscellaneous.h>
#include <compat/getopt.h>
#include <compat/strl.h>
#include <compat/strcasestr.h>
#include <compat/posix_string.h>
#include <retro_assert.h>
Include dependency graph for compat_getopt.c:

Functions

static bool is_short_option (const char *str)
 
static bool is_long_option (const char *str)
 
static int find_short_index (char *const *argv)
 
static int find_long_index (char *const *argv)
 
static int parse_short (const char *optstring, char *const *argv)
 
static int parse_long (const struct option *longopts, char *const *argv)
 
static void shuffle_block (char **begin, char **last, char **end)
 
int getopt_long (int argc, char *argv[], const char *optstring, const struct option *longopts, int *longindex)
 

Variables

char * optarg
 
int optind
 
int opterr
 
int optopt
 

Function Documentation

◆ find_long_index()

static int find_long_index ( char *const argv)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_short_index()

static int find_short_index ( char *const argv)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getopt_long()

int getopt_long ( int  argc,
char *  argv[],
const char *  optstring,
const struct option longopts,
int *  longindex 
)
Here is the call graph for this function:

◆ is_long_option()

static bool is_long_option ( const char *  str)
static
Here is the caller graph for this function:

◆ is_short_option()

static bool is_short_option ( const char *  str)
static
Here is the caller graph for this function:

◆ parse_long()

static int parse_long ( const struct option longopts,
char *const argv 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_short()

static int parse_short ( const char *  optstring,
char *const argv 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ shuffle_block()

static void shuffle_block ( char **  begin,
char **  last,
char **  end 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ optarg

char* optarg

◆ opterr

int opterr

◆ optind

int optind

◆ optopt

int optopt