Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b91834c3
Commit
b91834c3
authored
Jul 12, 2006
by
YAMAMOTO Mitsuharu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include blockinput.h.
(Fuser_login_name, Fuser_full_name): Add BLOCK_INPUT around getpwuid/getpwnam.
parent
8c8a7c58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/editfns.c
src/editfns.c
+13
-2
No files found.
src/editfns.c
View file @
b91834c3
...
...
@@ -56,6 +56,7 @@ Boston, MA 02110-1301, USA. */
#include "coding.h"
#include "frame.h"
#include "window.h"
#include "blockinput.h"
#ifdef STDC_HEADERS
#include <float.h>
...
...
@@ -1302,7 +1303,9 @@ with that uid, or nil if there is no such user. */)
return
Vuser_login_name
;
CHECK_NUMBER
(
uid
);
BLOCK_INPUT
;
pw
=
(
struct
passwd
*
)
getpwuid
(
XINT
(
uid
));
UNBLOCK_INPUT
;
return
(
pw
?
build_string
(
pw
->
pw_name
)
:
Qnil
);
}
...
...
@@ -1356,9 +1359,17 @@ name, or nil if there is no such user. */)
if
(
NILP
(
uid
))
return
Vuser_full_name
;
else
if
(
NUMBERP
(
uid
))
pw
=
(
struct
passwd
*
)
getpwuid
((
uid_t
)
XFLOATINT
(
uid
));
{
BLOCK_INPUT
;
pw
=
(
struct
passwd
*
)
getpwuid
((
uid_t
)
XFLOATINT
(
uid
));
UNBLOCK_INPUT
;
}
else
if
(
STRINGP
(
uid
))
pw
=
(
struct
passwd
*
)
getpwnam
(
SDATA
(
uid
));
{
BLOCK_INPUT
;
pw
=
(
struct
passwd
*
)
getpwnam
(
SDATA
(
uid
));
UNBLOCK_INPUT
;
}
else
error
(
"Invalid UID specification"
);
...
...
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