chore: organize code

add -Wextra by default
pipefd to communicate better with parent and forked process
rustify some stuff
add the desktop parser to the file read
This commit is contained in:
2025-08-27 22:02:14 +02:00
parent 056ec64bcb
commit 109c9bd0be
17 changed files with 185 additions and 113 deletions

View File

@@ -11,11 +11,17 @@
#include "keys.h"
int find_keyname(enum Keys* at, const char* name);
enum Keys find_ansi(const char* seq);
struct option_keys {
bool is_some;
enum Keys key;
};
struct option_keys find_ansi(const char* seq);
void read_press(u_char* length, char* out);
// non blocking, waits up to tv or interrupt, returns true if actually read
bool read_press_nb(u_char* length, char* out, struct timeval* tv);
// UTF8
//
bool utf8_iscont(char byte);
size_t utf8len(const char* str);
size_t utf8len_until(const char* str, const char* until);
@@ -24,6 +30,8 @@ const char* utf8back(const char* str);
const char* utf8seek(const char* str);
const char* utf8seekn(const char* str, size_t n);
// Vector
//
struct Vector {
uint32_t length;
uint32_t capacity;