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:
parent
e8d7a8baaf
commit
e94f778f1c
3 changed files with 24 additions and 10 deletions
|
@ -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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue