diff options
author | Stefan Hoffmann <stefan991@gmail.com> | 2014-03-06 23:20:29 +0100 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-13 17:18:44 -0300 |
commit | ce31410c7953a19421a2f2df2d3e6654601da930 (patch) | |
tree | d07b8af604b81c6323ba5dc405fcdd7f9397abf6 /src/os_unix.c | |
parent | 6fd9f090fc66c3ba38dc07ea6c982c3124735f32 (diff) | |
download | rneovim-ce31410c7953a19421a2f2df2d3e6654601da930.tar.gz rneovim-ce31410c7953a19421a2f2df2d3e6654601da930.tar.bz2 rneovim-ce31410c7953a19421a2f2df2d3e6654601da930.zip |
moved mch_get_user_name() and mch_get_uname() into os/users.c
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 3bbe056cc6..9ed034f4c1 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1078,34 +1078,6 @@ int vim_is_fastterm(char_u *name) } /* - * Insert user name in s[len]. - * Return OK if a name found. - */ -int mch_get_user_name(char_u *s, int len) -{ - return mch_get_uname(getuid(), s, len); -} - -/* - * Insert user name for "uid" in s[len]. - * Return OK if a name found. - */ -int mch_get_uname(uid_t uid, char_u *s, int len) -{ -#if defined(HAVE_PWD_H) && defined(HAVE_GETPWUID) - struct passwd *pw; - - if ((pw = getpwuid(uid)) != NULL - && pw->pw_name != NULL && *(pw->pw_name) != NUL) { - vim_strncpy(s, (char_u *)pw->pw_name, len - 1); - return OK; - } -#endif - sprintf((char *)s, "%d", (int)uid); /* assumes s is long enough */ - return FAIL; /* a number is not a name */ -} - -/* * Insert host name is s[len]. */ |