Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7b1c38a4
Commit
7b1c38a4
authored
Mar 18, 2009
by
Eli Zaretskii
Browse files
(Fuser_login_name): Support float arguments. Doc fix.
parent
0be8a343
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/editfns.c
src/editfns.c
+5
-4
No files found.
src/editfns.c
View file @
7b1c38a4
...
...
@@ -1278,12 +1278,13 @@ This is based on the effective uid, not the real uid.
Also, if the environment variables LOGNAME or USER are set,
that determines the value of this function.
If optional argument UID is an integer, return the login name
of the user
with that uid, or nil if there is no such user. */
)
If optional argument UID is an integer
or a float
, return the login name
of the user
with that uid, or nil if there is no such user. */
)
(
uid
)
Lisp_Object
uid
;
{
struct
passwd
*
pw
;
uid_t
id
;
/* Set up the user name info if we didn't do it before.
(That can happen if Emacs is dumpable
...
...
@@ -1294,9 +1295,9 @@ with that uid, or nil if there is no such user. */)
if
(
NILP
(
uid
))
return
Vuser_login_name
;
CHECK_NUMBER
(
uid
);
id
=
(
uid_t
)
XFLOATINT
(
uid
);
BLOCK_INPUT
;
pw
=
(
struct
passwd
*
)
getpwuid
(
XINT
(
u
id
)
)
;
pw
=
(
struct
passwd
*
)
getpwuid
(
id
);
UNBLOCK_INPUT
;
return
(
pw
?
build_string
(
pw
->
pw_name
)
:
Qnil
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment