From b5d53cd4210a74c65a42b6387dd78c4e5bc9c17f Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Fri, 19 Jun 2026 23:11:10 +0530 Subject: license & uci --- src/uci/command.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/uci/command.h (limited to 'src/uci/command.h') diff --git a/src/uci/command.h b/src/uci/command.h new file mode 100644 index 0000000..ba9c51d --- /dev/null +++ b/src/uci/command.h @@ -0,0 +1,21 @@ +#ifndef UCI_COMMAND_H +#define UCI_COMMAND_H + +#define MAX_TOKEN_SIZE 32 + +typedef struct { + char root[MAX_TOKEN_SIZE]; + int args_count; + int args_capacity; + char* args; + bool empty; +} ucicmd; + +ucicmd ucicmd_init(); +void ucicmd_add(ucicmd* cmd, const char* token); +void ucicmd_set_root(ucicmd* cmd, const char* token); +void ucicmd_append_arg(ucicmd* cmd, const char* token); +char* ucicmd_get_arg(ucicmd cmd, int i); +void ucicmd_deinit(ucicmd cmd); + +#endif // UCI_COMMAND_H -- cgit v1.2.3