#ifndef L2SU_MAIN_H_INCLUDED #define L2SU_MAIN_H_INCLUDED #include "command.h" #include "instance.h" #include struct l2_user_paths { const char *config; const char *data; }; struct tag_l2_state_t { struct l2_user_paths paths; /* eventually instances and other stuff will be stored in a hash table or something, * but for now a doubly-linked list accomplishes our goals */ struct l2_instance *instance_head; struct l2_instance *instance_tail; }; extern struct tag_l2_state_t l2_state; /* homecooked string methods */ char *l2_launcher_strapp(char *target, const char *src); /* launcher utilities */ char *l2_launcher_find_config_path(void); char *l2_launcher_find_data_path(void); int l2_launcher_open_config(const char *path, int flags, mode_t mode); int l2_launcher_mkdir_parents(const char *path); #endif /* include guard */