kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 8b528e033466b61bb82e595f35859f4f2bb6644b
parent 4f9044c6e0d9785f66e927e24ed24a87020d6694
Author: Joris Vink <joris@coders.se>
Date:   Tue, 27 Dec 2016 09:22:13 +0100

Add asset_sha1_* and asset_serve_* to assets.h.

Diffstat:
src/cli.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/cli.c b/src/cli.c @@ -197,7 +197,6 @@ static const char *gen_dirs[] = { }; static const char *http_serveable_function = - "int asset_serve_%s_%s(struct http_request *);\n\n" "int\n" "asset_serve_%s_%s(struct http_request *req)\n" "{\n" @@ -788,6 +787,9 @@ cli_write_asset(const char *n, const char *e) cli_file_writef(s_fd, "extern u_int8_t asset_%s_%s[];\n", n, e); cli_file_writef(s_fd, "extern u_int32_t asset_len_%s_%s;\n", n, e); cli_file_writef(s_fd, "extern time_t asset_mtime_%s_%s;\n", n, e); + cli_file_writef(s_fd, "extern const char *asset_sha1_%s_%s;\n", n, e); + cli_file_writef(s_fd, + "int asset_serve_%s_%s(struct http_request *);\n", n, e); } static void @@ -860,6 +862,7 @@ cli_build_asset(char *fpath, struct dirent *dp) cli_file_writef(out, "#include <sys/types.h>\n\n"); cli_file_writef(out, "#include <kore/kore.h>\n"); cli_file_writef(out, "#include <kore/http.h>\n\n"); + cli_file_writef(out, "#include \"assets.h\"\n\n"); /* Write the file data as a byte array. */ cli_file_writef(out, "u_int8_t asset_%s_%s[] = {\n", name, ext);