Rizin
unix-like reverse engineering framework and cli tools
getopt1.c File Reference
#include <config.h>
#include "getopt.h"
#include "getopt_int.h"
#include <stdio.h>

Go to the source code of this file.

Macros

#define NULL   0
 

Functions

int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index)
 
int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d)
 
int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index)
 
int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d)
 

Macro Definition Documentation

◆ NULL

#define NULL   0

Definition at line 37 of file getopt1.c.

Function Documentation

◆ _getopt_long_only_r()

int _getopt_long_only_r ( int  argc,
char **  argv,
const char *  options,
const struct option long_options,
int opt_index,
struct _getopt_data d 
)

Definition at line 72 of file getopt1.c.

75 {
76  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
77  1, 0, d);
78 }
static static fork const void static count static fd const char const char static newpath char char argv
Definition: sflib.h:40
static const char struct stat static buf struct stat static buf static vhangup int options
Definition: sflib.h:145
#define d(i)
Definition: sha256.c:44
int _getopt_internal_r(int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct, struct _getopt_data *d)
Definition: getopt.c:358

References _getopt_internal_r(), argv, d, and options.

◆ _getopt_long_r()

int _getopt_long_r ( int  argc,
char **  argv,
const char *  options,
const struct option long_options,
int opt_index,
struct _getopt_data d 
)

Definition at line 49 of file getopt1.c.

52 {
53  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
54  0, 0, d);
55 }

References _getopt_internal_r(), argv, d, and options.

◆ getopt_long()

int getopt_long ( int  argc,
char *__getopt_argv_const argv,
const char *  options,
const struct option long_options,
int opt_index 
)

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 }
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, and options.

◆ getopt_long_only()

int getopt_long_only ( int  argc,
char *__getopt_argv_const argv,
const char *  options,
const struct option long_options,
int opt_index 
)

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.