diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-10 17:19:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 17:19:51 -0700 |
commit | 61f9c4114e076e77f75db48611283209b33e4202 (patch) | |
tree | 5d959c312b5d6651e16c8cca0c5c80b1f032ee72 /core/unix.c | |
parent | 42c974edd73b48520a5f0d4579510c39a56902c5 (diff) | |
parent | 53fb533a99eef94d5df1a5258bc23ec123f59d6d (diff) | |
download | subsurface-61f9c4114e076e77f75db48611283209b33e4202.tar.gz |
Merge pull request #2737 from Subsurface-divelog/libgitCleanup
Libgit cleanup
Diffstat (limited to 'core/unix.c')
-rw-r--r-- | core/unix.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/core/unix.c b/core/unix.c index 5106278a2..bcac33ff3 100644 --- a/core/unix.c +++ b/core/unix.c @@ -34,36 +34,6 @@ bool subsurface_ignore_font(const char *font) return false; } -void subsurface_user_info(struct user_info *user) -{ - struct passwd *pwd = getpwuid(getuid()); - const char *username = getenv("USER"); - - if (pwd) { - if (!empty_string(pwd->pw_gecos)) { - user->name = strdup(pwd->pw_gecos); - // We only want the name, not the office or phone number - char *c = user->name; - while (*c) { - if (*c == ',') { - *c = '\0'; - break; - } - ++c; - } - } - if (!username) - username = pwd->pw_name; - } - if (!empty_string(username)) { - char hostname[64]; - struct membuffer mb = {}; - gethostname(hostname, sizeof(hostname)); - put_format(&mb, "%s@%s", username, hostname); - user->email = detach_cstring(&mb); - } -} - static const char *system_default_path_append(const char *append) { const char *home = getenv("HOME"); |