mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 14:25:03 +02:00
- config now is more toml like
- no need to declare all fields, it implements defaults
- no yanderedev code, introspection babbyyy 😎
- desktop and config files parser semi-unification
- misc tweaks all over (mainly allocation failures handling)
34 lines
781 B
C
34 lines
781 B
C
#ifndef UTILH_
|
|
#define UTILH_
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "keys.h"
|
|
|
|
int find_keyname(enum keys* at, char* name);
|
|
enum keys find_ansi(char*);
|
|
void read_press(u_char*, char*);
|
|
|
|
struct Vector {
|
|
uint32_t length;
|
|
uint32_t capacity;
|
|
void** pages;
|
|
};
|
|
|
|
extern const struct Vector VEC_NEW;
|
|
int vec_resize(struct Vector*, size_t size);
|
|
int vec_reserve(struct Vector*, size_t size);
|
|
int vec_reserve_exact(struct Vector*, size_t size);
|
|
int vec_push(struct Vector*, void* item);
|
|
void vec_free(struct Vector*);
|
|
void vec_clear(struct Vector*);
|
|
void vec_reset(struct Vector*);
|
|
void* vec_pop(struct Vector*); // won't free it, nor shrink vec list space
|
|
void* vec_get(struct Vector*, size_t index);
|
|
|
|
#endif
|