30 lines
613 B
C
30 lines
613 B
C
/*
|
|
* Copyright 2023 Oleg Borodin <borodin@unix7.org>
|
|
*/
|
|
|
|
#ifndef GCONFIG_H_QWERTY
|
|
#define GCONFIG_H_QWERTY
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <clcomp.h>
|
|
#include <vmapper.h>
|
|
|
|
typedef struct {
|
|
clcomp_t lexer;
|
|
vmapper_t mapper;
|
|
int argc;
|
|
char ** argv;
|
|
} clconfig_t;
|
|
|
|
#define GCONF_STR MAPPER_STR
|
|
#define GCONF_INT MAPPER_INT
|
|
#define GCONF_BOOL MAPPER_BOOL
|
|
|
|
void clconfig_init(clconfig_t* clconfig, int argc, char **argv);
|
|
int clconfig_bind(clconfig_t* clconfig, int type, char* name, void* ptr);
|
|
int clconfig_parse(clconfig_t* clconfig);
|
|
void clconfig_destroy(clconfig_t* clconfig);
|
|
|
|
#endif
|