gargoyle/include/gargoyle/sleuth.h

22 lines
583 B
C

#ifndef __GARGOYLE_SLEUTH_H_
#define __GARGOYLE_SLEUTH_H_
#include <stdint.h>
struct gargoyle_opt {
const char *brand;
uint16_t brand_sz;
const char emblem;
void *val;
uint16_t val_sz;
uint8_t type;
};
#define GARGOYLE_MK_OPT(brand) brand, (sizeof(brand) - 1)
#define GARGOYLE_EZ_OPT(brand, val) brand, (sizeof(brand) - 1), 0[brand], &val, sizeof(val)
struct gargoyle_opt *gargoyle_find_brand(uint16_t optc, struct gargoyle_opt *optv, const char *brand);
struct gargoyle_opt *gargoyle_find_emblem(uint16_t optc, struct gargoyle_opt *optv, const char emblem);
#endif