diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-07-26 00:56:13 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-07-26 00:56:13 -0400 |
commit | e94f778f1c5efdc4d11c61dec0e4a4ab073899d7 (patch) | |
tree | d518af58cb2faf04082adda6aad40c0e70f37b9a /apps/plugins/lib/arg_helper.h | |
parent | e8d7a8baaffbd9060842c8fa959fb5dabf8c0c43 (diff) | |
download | rockbox-e94f778f1c5efdc4d11c61dec0e4a4ab073899d7.tar.gz rockbox-e94f778f1c5efdc4d11c61dec0e4a4ab073899d7.zip |
plugin argparse update to add userdata to callback
fix a couple of gotchas if you aren't using NULL terminated strings
Change-Id: If5d2a60c0c3e1653e26df50bfda7d3191989bca9
Diffstat (limited to 'apps/plugins/lib/arg_helper.h')
-rw-r--r-- | apps/plugins/lib/arg_helper.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/lib/arg_helper.h b/apps/plugins/lib/arg_helper.h index 2cf94ba1dd..638279ee42 100644 --- a/apps/plugins/lib/arg_helper.h +++ b/apps/plugins/lib/arg_helper.h | |||
@@ -54,7 +54,7 @@ int num_parse(const char **parameter, int *number, int *decimal); | |||
54 | * Note: WS at beginning is stripped, **parameter starts at the first NON WS char | 54 | * Note: WS at beginning is stripped, **parameter starts at the first NON WS char |
55 | * return 0 for arg_callback to quit parsing immediately | 55 | * return 0 for arg_callback to quit parsing immediately |
56 | */ | 56 | */ |
57 | void argparse(const char *parameter, int parameter_len, | 57 | void argparse(const char *parameter, int parameter_len, void *userdata, |
58 | int (*arg_callback)(char argchar, const char **parameter)); | 58 | int (*arg_callback)(char argchar, const char **parameter, void *userdata)); |
59 | 59 | ||
60 | #endif /* _LIB_ARG_HELPER_H_ */ | 60 | #endif /* _LIB_ARG_HELPER_H_ */ |