summaryrefslogtreecommitdiffstats
path: root/src/lib/home-expand.h
blob: 5ba2ff797bfcd53e80506798bc7344f3bb3cfb5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef HOME_EXPAND_H
#define HOME_EXPAND_H

/* expand ~/ or ~user/ in beginning of path. If user is unknown, the original
   path is returned without modification. */
const char *home_expand(const char *path);
/* Returns 0 if ok, -1 if user wasn't found. */
int home_try_expand(const char **path);
/* Expand ~/ in the beginning of the path with the give home directory. */
const char *home_expand_tilde(const char *path, const char *home);

#endif