Rizin
unix-like reverse engineering framework and cli tools
getopt.in.h File Reference
#include <ctype.h>

Go to the source code of this file.

Classes

struct  option
 

Macros

#define _GETOPT_H   1
 
#define __getopt_argv_const   const
 
#define __GNUC_PREREQ(maj, min)   (0)
 
#define __THROW
 
#define no_argument   0
 
#define required_argument   1
 
#define optional_argument   2
 

Functions

int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW
 
int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW
 
int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW
 

Variables

char * optarg
 
int optind
 
int opterr
 
int optopt
 

Macro Definition Documentation

◆ __getopt_argv_const

#define __getopt_argv_const   const

Definition at line 78 of file getopt.in.h.

◆ __GNUC_PREREQ

#define __GNUC_PREREQ (   maj,
  min 
)    (0)

Definition at line 95 of file getopt.in.h.

◆ __THROW

#define __THROW

Definition at line 100 of file getopt.in.h.

◆ _GETOPT_H

#define _GETOPT_H   1

Definition at line 23 of file getopt.in.h.

◆ no_argument

#define no_argument   0

Definition at line 173 of file getopt.in.h.

◆ optional_argument

#define optional_argument   2

Definition at line 175 of file getopt.in.h.

◆ required_argument

#define required_argument   1

Definition at line 174 of file getopt.in.h.

Function Documentation

◆ getopt()

int getopt ( int  ___argc,
char *const ___argv,
const char *  __shortopts 
)

Definition at line 973 of file getopt.c.

977 {
978  return _getopt_internal (argc, argv, optstring,
979  (const struct option *) 0,
980  (int *) 0,
981  0);
982 }
static static fork const void static count static fd const char const char static newpath char char argv
Definition: sflib.h:40
Definition: getopt.h:84
int _getopt_internal(int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only)
Definition: getopt.c:514

References _getopt_internal(), argv, BADARG, BADCH, EMSG, NULL, optarg, opterr, optind, optopt, optreset, and POSIXLY_CORRECT.

◆ getopt_long()

int getopt_long ( int  ___argc,
char *__getopt_argv_const ___argv,
const char *  __shortopts,
const struct option __longopts,
int __longind 
)

Definition at line 41 of file getopt1.c.

43 {
44  return _getopt_internal (argc, (char **) argv, options, long_options,
45  opt_index, 0, 0);
46 }
static const char struct stat static buf struct stat static buf static vhangup int options
Definition: sflib.h:145

References _getopt_internal(), argv, and options.

◆ getopt_long_only()

int getopt_long_only ( int  ___argc,
char *__getopt_argv_const ___argv,
const char *  __shortopts,
const struct option __longopts,
int __longind 
)

Definition at line 63 of file getopt1.c.

66 {
67  return _getopt_internal (argc, (char **) argv, options, long_options,
68  opt_index, 1, 0);
69 }

References _getopt_internal(), argv, and options.

Variable Documentation

◆ optarg

char* optarg
extern

Definition at line 9 of file getopt.h.

Referenced by _getopt_internal(), getopt(), main(), and parse_real().

◆ opterr

int opterr
extern

Definition at line 5 of file getopt.h.

Referenced by _getopt_internal(), and getopt().

◆ optind

int optind
extern

◆ optopt

int optopt
extern

Definition at line 7 of file getopt.h.

Referenced by _getopt_internal(), and getopt().