mirror of
https://github.com/jarun/nnn.git
synced 2025-02-26 03:01:32 +00:00
Get rid of getchar()
This commit is contained in:
parent
4ea0d70217
commit
c54ba35ce0
1 changed files with 4 additions and 4 deletions
|
@ -567,7 +567,7 @@ static char * const utils[] = {
|
||||||
#define MSG_NEW_PATH 19
|
#define MSG_NEW_PATH 19
|
||||||
#define MSG_LINK_PREFIX 20
|
#define MSG_LINK_PREFIX 20
|
||||||
#define MSG_COPY_NAME 21
|
#define MSG_COPY_NAME 21
|
||||||
#define MSG_CONTINUE 22
|
#define MSG_RETURN 22
|
||||||
#define MSG_SEL_MISSING 23
|
#define MSG_SEL_MISSING 23
|
||||||
#define MSG_ACCESS 24
|
#define MSG_ACCESS 24
|
||||||
#define MSG_EMPTY_FILE 25
|
#define MSG_EMPTY_FILE 25
|
||||||
|
@ -2084,10 +2084,10 @@ static int spawn(char *file, char *arg1, char *arg2, char *arg3, uchar_t flag)
|
||||||
DPRINTF_D(pid);
|
DPRINTF_D(pid);
|
||||||
|
|
||||||
if ((flag & F_CONFIRM) || ((flag & F_CHKRTN) && retstatus)) {
|
if ((flag & F_CONFIRM) || ((flag & F_CHKRTN) && retstatus)) {
|
||||||
status = write(STDOUT_FILENO, messages[MSG_CONTINUE],
|
status = write(STDOUT_FILENO, messages[MSG_RETURN], xstrlen(messages[MSG_RETURN]));
|
||||||
xstrlen(messages[MSG_CONTINUE]));
|
(void)status;
|
||||||
|
status = read(STDIN_FILENO, g_buf, PATH_MAX);
|
||||||
(void)status;
|
(void)status;
|
||||||
while (getchar() != '\n') {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag & F_NORMAL)
|
if (flag & F_NORMAL)
|
||||||
|
|
Loading…
Add table
Reference in a new issue