1#pragma once
 2
 3/*
 4 * Command line arguments parser.
 5 */
 6
 7#include <stdarg.h>
 8
 9#include <pw_types.h>
10#include <pw_interfaces.h>
11#include <pw_status.h>
12#include <pw_task.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18[[nodiscard]] bool pw_parse_kvargs(int argc, char* argv[], PwValuePtr result);
19/*
20 * The encoding for arguments is assumed to be UTF-8.
21 *
22 * Arguments starting from 1 are expected in the form of key=value.
23 * If an argument contains no '=', it goes to key and the value is set to null.
24 *
25 * argv[0] is added to the mapping as is under key 0.
26 */
27
28#ifdef __cplusplus
29}
30#endif