Cthulhu  0.2.10
Cthulhu compiler collection
setup.c File Reference
#include "setup/setup.h"
#include "arena/arena.h"
#include "argparse/argparse.h"
#include "backtrace/backtrace.h"
#include "base/log.h"
#include "base/panic.h"
#include "base/util.h"
#include "config/config.h"
#include "core/macros.h"
#include "format/backtrace.h"
#include "format/colour.h"
#include "format/config.h"
#include "format/version.h"
#include "io/console.h"
#include "io/io.h"
#include "memory/memory.h"
#include "notify/notify.h"
#include "os/core.h"
#include "setup/memory.h"
#include "std/str.h"
#include "std/vector.h"
#include <limits.h>
Include dependency graph for setup.c:

Go to the source code of this file.

Data Structures

struct  error_context_t
 system error handler More...
 

Macros

#define NAME_BUFFER_SIZE   256
 consts More...
 
#define PATH_BUFFER_SIZE   512
 
#define INT_BIT   (sizeof(int) * CHAR_BIT)
 the top bit is reserved for the exit flag More...
 
#define SHOULD_EXIT   (1 << (INT_BIT - 1))
 
#define HEADING_OPTION_COUNT   (sizeof(kHeadingOptions) / sizeof(cfg_choice_t))
 

Functions

void setup_default (arena_t *arena)
 public api More...
 
setup_options_t setup_options (version_info_t info, cfg_group_t *root)
 setup default options More...
 
STA_DECL setup_init_t setup_parse (int argc, const char **argv, setup_options_t setup)
 parse the command line More...
 
STA_DECL bool setup_should_exit (const setup_init_t *init)
 public accessor api More...
 
STA_DECL int setup_exit_code (const setup_init_t *init)
 get the exit code More...
 
STA_DECL int setup_exit_help (setup_options_t setup, const setup_init_t *init)
 print the help message and exit More...
 

Macro Definition Documentation

◆ HEADING_OPTION_COUNT

#define HEADING_OPTION_COUNT   (sizeof(kHeadingOptions) / sizeof(cfg_choice_t))

Definition at line 68 of file setup.c.

◆ INT_BIT

#define INT_BIT   (sizeof(int) * CHAR_BIT)

the top bit is reserved for the exit flag

Definition at line 33 of file setup.c.

◆ NAME_BUFFER_SIZE

#define NAME_BUFFER_SIZE   256

consts

Definition at line 29 of file setup.c.

◆ PATH_BUFFER_SIZE

#define PATH_BUFFER_SIZE   512

Definition at line 30 of file setup.c.

◆ SHOULD_EXIT

#define SHOULD_EXIT   (1 << (INT_BIT - 1))

Definition at line 34 of file setup.c.