23 lines
670 B
C
23 lines
670 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) GARGOYLE_MK_OPT(brand), 0[brand], &val, sizeof(val)
|
|
#define GARGOYLE_CS_OPT(brand, val) GARGOYLE_MK_OPT(brand), 0[brand], &val[0], 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
|