Rizin
unix-like reverse engineering framework and cli tools
main.c File Reference
#include <rz_main.h>
#include <rz_util.h>

Go to the source code of this file.

Functions

int MAIN_NAME (int argc, const ARGV_TYPE **argv)
 

Function Documentation

◆ MAIN_NAME()

int MAIN_NAME ( int  argc,
const ARGV_TYPE **  argv 
)

Definition at line 7 of file main.c.

7  {
8  char **utf8_argv = ARGV_TYPE_TO_UTF8(argc, argv);
9  int rc = 1;
10  const char *prog_name = rz_file_basename(utf8_argv[0]);
11  RzMain *m = rz_main_new(prog_name);
12  if (m) {
13  rc = rz_main_run(m, argc, (const char **)utf8_argv);
14  rz_main_free(m);
15  }
16  FREE_UTF8_ARGV(argc, utf8_argv);
17  return rc;
18 }
RZ_API void rz_main_free(RzMain *m)
Definition: main.c:40
RZ_API int rz_main_run(RzMain *m, int argc, const char **argv)
Definition: main.c:44
RZ_API RzMain * rz_main_new(const char *name)
Definition: main.c:24
static static fork const void static count static fd const char const char static newpath char char argv
Definition: sflib.h:40
RZ_API const char * rz_file_basename(const char *path)
Definition: file.c:83
#define ARGV_TYPE_TO_UTF8(argc, argv)
Definition: rz_main.h:30
#define FREE_UTF8_ARGV(argc, utf8_argv)
Definition: rz_main.h:31

References argv, ARGV_TYPE_TO_UTF8, FREE_UTF8_ARGV, regress::m, rz_file_basename(), rz_main_free(), rz_main_new(), and rz_main_run().