projects
/
debian
/
pforth
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6aa1010
)
Make sure terminal output is unbuffered on POSIX systems (#110)
author
jpellegrini
<j_p@aleph0.info>
Mon, 4 Apr 2022 00:23:55 +0000
(21:23 -0300)
committer
GitHub
<noreply@github.com>
Mon, 4 Apr 2022 00:23:55 +0000
(17:23 -0700)
Call setvbuf on terminal initialization in
csrc/posix/pf_io_posix.c. At least on one platform (OpenWRT),
pForth was buffering the characters while the user typed,
instead of echoing them immediately; this fixes that issue.
Fixes #109
Fixes #87
csrc/posix/pf_io_posix.c
patch
|
blob
|
history
diff --git
a/csrc/posix/pf_io_posix.c
b/csrc/posix/pf_io_posix.c
index bd0c50e704fa7a8d25cf3433d44526110893dea5..156e8608617c976afca67180820f59735bacec71 100644
(file)
--- a/
csrc/posix/pf_io_posix.c
+++ b/
csrc/posix/pf_io_posix.c
@@
-131,6
+131,10
@@
void sdTerminalInit(void)
{
perror("sdTerminalInit: tcsetattr");
}
+ if (setvbuf(stdout, NULL, _IONBF, (size_t) 0) != 0)
+ {
+ perror("sdTerminalInit: setvbuf");
+ }
}
}