chore: implement vectors

also seems to address several of these:
https://github.com/javalsai/lidm/issues/3#issuecomment-2423933131

not sure about the issue itself, might be permission stuff
This commit is contained in:
2024-10-19 17:48:20 +02:00
parent 01ddd62852
commit a0b68491ba
7 changed files with 38 additions and 92 deletions

View File

@@ -3,6 +3,8 @@
#include <sys/types.h>
#include <util.h>
enum session_type {
XORG,
WAYLAND,
@@ -16,11 +18,6 @@ struct session {
enum session_type type;
};
struct sessions_list {
u_int16_t length;
struct session *sessions;
};
struct sessions_list *get_avaliable_sessions();
struct Vector get_avaliable_sessions();
#endif

View File

@@ -2,9 +2,10 @@
#define _UIH_
#include <config.h>
#include <util.h>
void setup(struct config);
int load(struct users_list *, struct sessions_list *);
int load(struct Vector * users, struct Vector * sessions);
void print_err(const char *);
void print_errno(const char *);

View File

@@ -3,17 +3,14 @@
#include <sys/types.h>
#include <util.h>
struct user {
char *shell;
char *username;
char *display_name;
};
struct users_list {
u_int16_t length;
struct user *users;
};
struct users_list *get_human_users();
struct Vector get_human_users();
#endif