aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/util.h
blob: f03f13efbdb9828769a5c3a2e9a2baeda8d75b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <glib.h>

typedef struct {
    gchar* environmental;
    gchar* default_value;
} XDG_Var;

gchar* get_xdg_var (XDG_Var xdg);

gchar* find_xdg_file (int xdg_type, const char* filename);

gboolean file_exists(const char* filename);

char *
str_replace (const char* search, const char* replace, const char* string);

gboolean
for_each_line_in_file(const gchar *path, void (*callback)(const gchar *l, void *c), void *user_data);