You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
396 B
22 lines
396 B
/* |
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 |
|
*/ |
|
#include "e.h" |
|
|
|
/* externally accessible functions */ |
|
EAPI const char * |
|
e_user_homedir_get(void) |
|
{ |
|
char *homedir; |
|
int len; |
|
|
|
homedir = getenv("HOME"); |
|
if (!homedir) return "/tmp"; |
|
len = strlen(homedir); |
|
while ((len > 1) && (homedir[len - 1] == '/')) |
|
{ |
|
homedir[len - 1] = 0; |
|
len--; |
|
} |
|
return homedir; |
|
}
|
|
|