Tim Peters <tim_one@email.msn.com>: > > [Tim suggests to use fgets(), preparing the buffer with non-null > > bytes, and searching for a null byte from the right.] No, I haven't forgotten about the curses autoconfig stuff. But... This mess reminds me. For some work I'm doing right now, it would be very useful if there were a way to query the end-of-file status of a file descriptor without actually doing a read. I don't see this ability anywhere in the 2.0 API. Questions: 1. Am I missing something obvious? 2. If the answer to 1 is that I am not, in fact, being a dumbass, what is the right way to support this? The obvious alternatives are an eof member (analogous to the existing `closed' member, or an eof() method. I favor the latter. 3. If we agree on a design, I'm willing to implement this at least for Unix. Should be a small project. -- <a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a> The direct use of physical force is so poor a solution to the problem of limited resources that it is commonly employed only by small children and great nations. -- David Friedman
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4