}
static byte *
-cf_parse_lookup(byte *str, int *ptr, char **t)
+cf_parse_lookup(byte *str, int *ptr, byte **t)
{
- char **n = t;
+ byte **n = t;
uns total_len = 0;
while (*n && strcasecmp(*n, str)) {
total_len += strlen(*n) + 2;
case CT_DOUBLE: bprintf(fb, "%lg ", *(double*)ptr); break;
case CT_IP: bprintf(fb, "%08x ", *(uns*)ptr); break;
case CT_STRING: bprintf(fb, "'%s' ", *(byte**)ptr); break;
- case CT_LOOKUP: bprintf(fb, "%s ", *(int*)ptr >= 0 ? u->lookup[ *(int*)ptr ] : "???"); break;
+ case CT_LOOKUP: bprintf(fb, "%s ", *(int*)ptr >= 0 ? u->lookup[ *(int*)ptr ] : (byte*) "???"); break;
case CT_USER:
if (u->utype->dumper)
u->utype->dumper(fb, ptr);
union cf_union {
struct cf_section *sec; // declaration of a section or a list
cf_parser *par; // parser function
- char **lookup; // NULL-terminated sequence of allowed strings for lookups
+ byte **lookup; // NULL-terminated sequence of allowed strings for lookups
struct cf_user_type *utype; // specification of the user-defined type
} u;
enum cf_class cls:16; // attribute class
struct cf_section ipaccess_cf = {
CF_TYPE(struct ipaccess_entry),
CF_ITEMS {
- CF_LOOKUP("Mode", PTR_TO(struct ipaccess_entry, allow), ((char*[]) { "deny", "allow", NULL })),
+ CF_LOOKUP("Mode", PTR_TO(struct ipaccess_entry, allow), ((byte*[]) { "deny", "allow", NULL })),
CF_USER("IP", PTR_TO(struct ipaccess_entry, addr), &addrmask_type),
CF_END
}