summaryrefslogtreecommitdiff
path: root/cli/hitomezashi_cli.h
diff options
context:
space:
mode:
authoruntir_l <87096069+untir-l@users.noreply.github.com>2022-02-19 05:40:09 +0000
committeruntir-l <87096069+untir-l@users.noreply.github.com>2022-02-25 09:56:49 +0000
commit8a7dde79de6edee01571d2eb4a333d8256f4c342 (patch)
tree786b305ed2b1b0896c6b651d6585feeae7fc447a /cli/hitomezashi_cli.h
parent581bc2dd768ca0af390b9abb41a5c89f1bca19e3 (diff)
downloadhitomezashi-8a7dde79de6edee01571d2eb4a333d8256f4c342.tar
hitomezashi-8a7dde79de6edee01571d2eb4a333d8256f4c342.tar.gz
hitomezashi-8a7dde79de6edee01571d2eb4a333d8256f4c342.zip
Improve docs, don't initialise SDL until arguments are already handled
Diffstat (limited to 'cli/hitomezashi_cli.h')
-rw-r--r--cli/hitomezashi_cli.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/hitomezashi_cli.h b/cli/hitomezashi_cli.h
index d83de7b..9f7825c 100644
--- a/cli/hitomezashi_cli.h
+++ b/cli/hitomezashi_cli.h
@@ -25,12 +25,17 @@ enum Hitomezashi_Cli_Exit_Code {
/** Read and parse arguments, ensure they are valid, and give back the
* information in usable form to the caller. Also calls hitomezashi_cli_help()
* if -h is passed.
+ * Note that *x_pattern and *y_pattern are dynamically allocated and should be
+ * freed by the caller when no longer needed.
*/
void hitomezashi_cli_handle_args(char **out_file_path, int *x_pattern_len,
int *y_pattern_len, char **x_pattern,
char **y_pattern, int *gap, int *thickness,
int argc, char **argv);
-/** Print the help text and exit. */
+/** Print the help text and exit.
+ * Exits with Hitomezashi_Cli_Exit_Code_Success (0) on success, and
+ * Hitomezashi_Cli_Exit_Code_Print_Help (2) on failure.
+ */
void hitomezashi_cli_help(void);
/** Convert a string composed of ASCII 0 and 1 digits, eg\. "01010", to an array
* of numeric 0s and 1s stored as char. */