mirror of
https://repo.or.cz/socat.git
synced 2025-05-23 13:12:41 +00:00
READLINE now prints newline on empty input line
This commit is contained in:
parent
920ed1f0a3
commit
68f0143f7b
2 changed files with 7 additions and 0 deletions
4
CHANGES
4
CHANGES
|
@ -37,6 +37,10 @@ Corrections:
|
|||
when malloc() does not initialize memory with zeros.
|
||||
Thanks to Nicolas Cavallari for reporting and fixing this bug.
|
||||
|
||||
The readline() library function does not output the newline of empty
|
||||
input lines. Changed Socat to explicitly print the newline in this
|
||||
case.
|
||||
|
||||
Building:
|
||||
Disabling certain features during configure could break build process.
|
||||
|
||||
|
|
|
@ -204,6 +204,9 @@ ssize_t xioread_readline(struct single *pipe, void *buff, size_t bufsiz) {
|
|||
if (line == NULL) {
|
||||
return 0; /* EOF */
|
||||
}
|
||||
if (strlen(line) == 0) {
|
||||
Write(STDOUT_FILENO, "\n", 1);
|
||||
}
|
||||
#if _WITH_TERMIOS
|
||||
xiotermios_clrflag(pipe->fd, 3, ECHO);
|
||||
xiotermios_flush(pipe->fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue