From 3b2ef7aaa9d8e06b1acedbc0df49c73d289250ea Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Sat, 9 Apr 2022 05:45:41 +0000 Subject: [PATCH] Stuff FossilOrigin-Name: 7e92c4062ac339f217fc46de8f90fd6654dd8521907e40f7de3bccf9730f3345 --- src/key.h | 1 - src/query.c | 29 +++++++++++++++-------------- src/query.h | 8 ++++++++ 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/key.h b/src/key.h index ba18bdb..0e26e46 100644 --- a/src/key.h +++ b/src/key.h @@ -29,7 +29,6 @@ struct key_value_refs { char* key; void* val; - struct form_props form; void (*func)(char*, struct form_props*, void*); }; diff --git a/src/query.c b/src/query.c index 4ce5e36..6e91327 100644 --- a/src/query.c +++ b/src/query.c @@ -76,20 +76,21 @@ char* read_post_data(struct query_values* post) // BEGIN Query references struct key_value_refs refs[] = { - { "content", &(post->content), { 0 }, key_string }, - { "itype", &(post->itype), { 0 }, key_string }, - { "id", &(post->id), { 0 }, key_string }, - { "theme", &(post->theme), { 0 }, key_string }, - { "themeclr", &(post->themeclr), { 0 }, key_string }, - { "jsactions", &(post->jsactions), { 0 }, key_string }, - { "jsreply", &(post->jsreply), { 0 }, key_string }, - { "jslive", &(post->jslive), { 0 }, key_string }, - { "username", &(post->username), { 0 }, key_string }, - { "password", &(post->password), { 0 }, key_string }, - { "replyid", &(post->replyid), { 0 }, key_string }, - { "min_id", &(post->min_id), { 0 }, key_string }, - { "max_id", &(post->max_id), { 0 }, key_string }, - { "start_id", &(post->start_id), { 0 }, key_string } + { "content", &(post->content), key_string }, + { "itype", &(post->itype), key_string }, + { "id", &(post->id), key_string }, + { "theme", &(post->theme), key_string }, + { "themeclr", &(post->themeclr), key_string }, + { "jsactions", &(post->jsactions), key_string }, + { "jsreply", &(post->jsreply), key_string }, + { "jslive", &(post->jslive), key_string }, + { "username", &(post->username), key_string }, + { "password", &(post->password), key_string }, + { "replyid", &(post->replyid), key_string }, + { "min_id", &(post->min_id), key_string }, + { "max_id", &(post->max_id), key_string }, + { "start_id", &(post->start_id), key_string }, + { "file", &(post->file), key_form } }; // END Query references diff --git a/src/query.h b/src/query.h index f894b13..d539630 100644 --- a/src/query.h +++ b/src/query.h @@ -27,6 +27,12 @@ struct http_query_info char* val; }; +struct http_array +{ + char* content; + size_t array_size; +} + struct query_values { // Config @@ -45,6 +51,8 @@ struct query_values char* min_id; char* max_id; char* start_id; + + struct http_array file; }; struct get_values