From c23118e8e48d043e4bb9b4d813a498af8d454d73 Mon Sep 17 00:00:00 2001 From: untir_l <87096069+untir-l@users.noreply.github.com> Date: Thu, 24 Feb 2022 20:27:35 +0530 Subject: Add web app frontend, restructure almost everything - Add web app frontend code - Add .html, .js, .wasm to .gitignore - Restructure Makefile to work with emmake, add build targets for web app, add .html, .js, .wasm to make clean - Explain the pattern in the README - Add explanation of web frontend to README - Restructure README generally for better clarity - Remove "make web app version" from todos in README - Set Doxygen to EXTRACT_ALL so trivial and useless doc comments are not needed when the naming suffices to be explanatory. - Move ascii_binary_str_to_ints to library code in new file hitomezashi_utils.c (and corresponding header) as web app also needs it. - Fix SDL2 include path so it also works with Emscripten - Remove some cluttering and unnecessary doc comments - Improve some doc comments --- lib/hitomezashi_utils.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/hitomezashi_utils.h (limited to 'lib/hitomezashi_utils.h') diff --git a/lib/hitomezashi_utils.h b/lib/hitomezashi_utils.h new file mode 100644 index 0000000..040ea00 --- /dev/null +++ b/lib/hitomezashi_utils.h @@ -0,0 +1,17 @@ +/** @file + * Utilities connected with hitomezashi patterns that may be useful to + * applications. + */ +#ifndef HITOMEZASHI_UTILS_H +#define HITOMEZASHI_UTILS_H + +#include + +/** Convert a string of ASCII digit 0s and 1s, eg. "1010", to a char array of + * numeric 0s and 1s. The return value is **dynamically allocated and must + * be freed**. + * @param len Length of ascii_str, not including any terminating null bytes. + */ +char *hitomezashi_ascii_binary_str_to_ints(char *ascii_str, size_t len); + +#endif // HITOMEZASHI_UTILS_H -- cgit v1.2.3-57-g22cb