Comments (4)
There is absolutely no ISO C or Posix way to do this.
On Windows, fflush(stdin) works.
On Linux and *BSD, fpurge(stdin) works.
On Solaris, _fpurge(stdin) works: note leading underscore.
Note that this flushes only the contents of the process's own stdio buffer; it does not affect characters still living in a kernel buffer.
from medley.
grep -r fflush'(stdin)' src inc
src/dbgtool.c: fflush(stdin); \
src/dbgtool.c: fflush(stdin); \
src/dbgtool.c: fflush(stdin);
src/testtool.c: fflush(stdin); \
src/common.c: fflush(stdin);
src/common.c: fflush(stdin);
src/uraid.c: fflush(stdin);
src/uraid.c: fflush(stdin);
src/uraid.c: fflush(stdin);
src/uraid.c: fflush(stdin);
so not so important; not clear to me what bad thing will happen if fflush(stdin) doesn't do anything.
from medley.
from medley.
... because it's about to drop into its internal debugger and read input that the user was not expecting, so it wants to flush the input buffer and ensure that it is not reading typeahead.
from medley.
Related Issues (20)
- Interlisp Book: DJVU versions HOT 1
- 404s HOT 1
- Grouping related PDFs into subfolders in Google Drive storage area HOT 2
- Proposed font coercion for tiny font sizes to next existing size (helvetica 2 → helvetica 6) HOT 4
- Broken .deb and out of date glibc when installing x86_64 Medley on Debian 11 Bullseye HOT 3
- CLOS defmethod does not mark forms to be saved by file manager HOT 3
- clean up MAIKO MOVDs so that initialization is rational HOT 1
- TEDIT lineleading doesn't conform to documentation HOT 2
- warning about online control-W HOT 11
- Cannot (LOAD 'NEW-CLOS-BROWSER 'PROP) from medley/clos due to inconsistent symbol exports HOT 2
- When man decides to look for a TEDIT documentation file, it should be case-insensitive
- register article after Steve's talk
- grammar errors in Interlisp.github.io pages HOT 3
- Moving charset management into the external format HOT 1
- 12/8/23 website review
- Shift-snapped bitmap cleared in TEdit when changing scale HOT 4
- SAVEVM on accidential window close
- Character case mismatch when launching Medley on Linux with Caps Lock on HOT 1
- Need automation for producing All*.pdf for different repos:
- should be possible to increase stack space HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medley.