1
0
Fork 0
forked from len0rd/rockbox

plugin argparse update to add userdata to callback

fix a couple of gotchas if you aren't using NULL terminated strings

Change-Id: If5d2a60c0c3e1653e26df50bfda7d3191989bca9
This commit is contained in:
William Wilgus 2024-07-26 00:56:13 -04:00
parent e8d7a8baaf
commit e94f778f1c
3 changed files with 24 additions and 10 deletions

View file

@ -54,7 +54,7 @@ int num_parse(const char **parameter, int *number, int *decimal);
* Note: WS at beginning is stripped, **parameter starts at the first NON WS char
* return 0 for arg_callback to quit parsing immediately
*/
void argparse(const char *parameter, int parameter_len,
int (*arg_callback)(char argchar, const char **parameter));
void argparse(const char *parameter, int parameter_len, void *userdata,
int (*arg_callback)(char argchar, const char **parameter, void *userdata));
#endif /* _LIB_ARG_HELPER_H_ */