mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
Send a generic “overrides” list to the server, containing options in text, on the format “section.key=value”. This reduces the size of the base client/server protocol packet, as well as opens up for a generic -o,--override command line option (not yet implemented).
26 lines
565 B
C
26 lines
565 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
struct client_string {
|
|
uint16_t len;
|
|
/* char str[static len]; */
|
|
};
|
|
|
|
struct client_data {
|
|
bool hold:1;
|
|
bool no_wait:1;
|
|
uint8_t reserved:6;
|
|
|
|
uint16_t cwd_len;
|
|
uint16_t override_count;
|
|
uint16_t argc;
|
|
|
|
/* char cwd[static cwd_len]; */
|
|
/* struct client_string overrides[static override_count]; */
|
|
/* struct client_string argv[static argc]; */
|
|
} __attribute__((packed));
|
|
|
|
_Static_assert(sizeof(struct client_data) == 7, "protocol struct size error");
|