diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-08-27 22:21:14 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-08-27 22:21:14 +0530 |
| commit | 93f1e82cedbf2fcd45ac413cbf2a654e0f65f0b3 (patch) | |
| tree | 5af71701d99071adf348735518b8dd1f560c3475 /src/uci.c | |
| parent | 5a02743c0c9563f41a8c3821a7bbce4fc3b0b839 (diff) | |
Diffstat (limited to 'src/uci.c')
| -rw-r--r-- | src/uci.c | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -11,27 +11,7 @@ #include "ipc/state.h" #include "ipc/uci.h" -void load_from_message(uci_cmd_t* cmd, const char* message) { - char token[MAX_TOKEN_SIZE]; - int i = 0, k = 0; - - while (message[i] != 0 && message[i] != '\n' && message[i] != '\r') { - if (message[i] != ' ') { - token[k++] = message[i++]; - continue; - } - if (k == 0) { - i++; - continue; - } - i++; - token[k] = 0; - uci_cmd_add(cmd, token); - k = 0; - } - token[k] = 0; - uci_cmd_add(cmd, token); -} +void load_from_message(uci_cmd_t* cmd, const char* message); // split a raw stdin chunk into lines and parse each into its own command. void load_from_buffer( |
