32 lines
698 B
C
32 lines
698 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 comp;
|
|
vmapper_t vmapper;
|
|
int argc;
|
|
char** argv;
|
|
char* errstr;
|
|
} 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);
|
|
char* clconfig_geterr(clconfig_t * clconfig);
|
|
void clconfig_destroy(clconfig_t * clconfig);
|
|
|
|
#endif
|