Global Namespace

Overview

// typedefs

typedef bool fmt_bool;
typedef char fmt_char;
typedef struct fmt_spec fmt_spec;
typedef enum fmt_flag fmt_flag;
typedef enum fmt_spec_kind fmt_spec_kind;
typedef enum fmt_spec_len fmt_spec_len;
typedef enum fmt_spec_type fmt_spec_type;
typedef enum fmt_status fmt_status;

// enums

enum fmt_flag;
enum fmt_spec_kind;
enum fmt_spec_len;
enum fmt_spec_type;
enum fmt_status;

// structs

struct fmt_spec;

// global functions

cmake_minimum_required(VERSION 3. 16);
int main();
void fmt_spec_init(fmt_spec* spec);
fmt_status fmt_read_one(const fmt_char** fmt, fmt_spec* spec);
fmt_bool fmt_read_is_ok(fmt_status status);
fmt_spec* fmt_spec_alloc(void);
void fmt_spec_free(fmt_spec* spec);
char** fmt_str_alloc(fmt_char* str);
void fmt_str_free(fmt_char** str_ptr);
int32_t fmt_spec_get_start_position(fmt_spec* spec, fmt_char** str);
int32_t fmt_spec_get_end_position(fmt_spec* spec, fmt_char** str);
uint32_t fmt_spec_get_kind(fmt_spec* spec);
uint32_t fmt_spec_get_parameter(fmt_spec* spec);
uint32_t fmt_spec_get_width(fmt_spec* spec);
uint32_t fmt_spec_get_precision(fmt_spec* spec);
uint32_t fmt_spec_get_length(fmt_spec* spec);
uint32_t fmt_spec_get_type(fmt_spec* spec);
fmt_bool fmt_spec_get_flag(fmt_spec* spec, fmt_flag flag);
fmt_status fmt_spec_print(fmt_spec* spec, FILE* file);
const char* fmt_spec_len2str(fmt_spec_len len);
const char* fmt_spec_type2str(fmt_spec_type type);
static fmt_status fmt_read_parameter(const fmt_char** fmt, fmt_spec* spec);
static fmt_status fmt_read_flags(const fmt_char** fmt, fmt_spec* spec);
static fmt_status fmt_read_width(const fmt_char** fmt, fmt_spec* spec);
static fmt_status fmt_read_precision(const fmt_char** fmt, fmt_spec* spec);
static fmt_status fmt_read_length(const fmt_char** fmt, fmt_spec* spec);
static fmt_status fmt_read_type(const fmt_char** fmt, fmt_spec* spec);
static uint32_t fmt_str_len(fmt_char* str);
static void print_str_from_to(const fmt_char* start, const fmt_char* end, FILE* f);

// macros

#define CASE_DOUBLE(_char, _projected_type1, _projected_type2)
#define CASE_SINGLE(_char, _projected_type1)
#define CASE_SINGULAR(_char, _projected_type)
#define DBG(...)
#define FMT_CHAR_CONV(__chr)
#define FMT_CHAR_TYPE
#define FMT_CHAR_TYPE_DEFAULT
#define FMT_FALSE
#define FMT_READ(_func_call)
#define FMT_SPEC_LEN_VALUE(__name)
#define FMT_SPEC_LEN_VALUE(__name)
#define FMT_SPEC_TYPE_VALUE(__name)
#define FMT_SPEC_TYPE_VALUE(__name)
#define FMT_START_SYMBOL
#define FMT_TRUE
#define FMT_VALUE_NOT_DEFINED
#define FMT_VALUE_OUT_OF_LINE
#define INC_FMT()
#define TRY_PRINTF(...)

Detailed Documentation

Typedefs

typedef bool fmt_bool

Builtin bool type

typedef enum fmt_status fmt_status

Status codes