diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/utils.c b/src/utils.c index e7ffa45..037010e 100644 --- a/src/utils.c +++ b/src/utils.c @@ -27,9 +27,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "debug.h" #include "options.h" -static char *feh_user_name = NULL; -static char *feh_tmp_dir = NULL; - /* eprintf: print error message and exit */ void eprintf(char *fmt, ...) { @@ -146,18 +143,6 @@ char *estrjoin(const char *separator, ...) return string; } -char *stroflen(char c, int l) -{ - static char buf[1024]; - int i = 0; - - buf[0] = '\0'; - while (l--) - buf[i++] = c; - buf[i] = '\0'; - return buf; -} - /* free the result please */ char *feh_unique_filename(char *path, char *basename) { @@ -205,32 +190,3 @@ char *ereadfile(char *path) return estrdup(buffer); } - -char *feh_get_tmp_dir(void) -{ - char *tmp; - if (feh_tmp_dir) - return feh_tmp_dir; - tmp = getenv("TMPDIR"); - if (!tmp) - tmp = getenv("TMP"); - if (!tmp) - tmp = getenv("TEMP"); - if (!tmp) - tmp = "/tmp"; - feh_tmp_dir = estrdup(tmp); - return feh_tmp_dir; -} - -char *feh_get_user_name(void) -{ - struct passwd *pw = NULL; - - if (feh_user_name) - return feh_user_name; - setpwent(); - pw = getpwuid(getuid()); - endpwent(); - feh_user_name = estrdup(pw->pw_name); - return feh_user_name; -} |