Sujet : Re: Can 'graphics' be a file descriptor?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 01. Jan 2025, 23:33:34
Autres entêtes
Organisation : None to speak of
Message-ID : <87ikqytb9d.fsf@nosuchdomain.example.com>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13)
wij <
wyniijj5@gmail.com> writes:
On Wed, 2025-01-01 at 01:29 -0800, Keith Thompson wrote:
[...]
A file *descriptor* is a small integer referring to some file-like
entity, used with open/close/read/write. There's no such thing in
standard C; it's a POSIX concept.
[...]
I would like to have opinions about the idea "graphics being a file
descriptor". The implement is irrevent for the discussion. Some
imagination is required.
Why do you insist on referring to "file descriptors"? That's a specific
term with a specific meaning: a small integer value used in POSIX I/O
(not in standard C).
If you mean FILE* pointers, the discussion might have some relevance to
C. If you really mean POSIX file descriptors, comp.unix.programmer
might be a better place.
Sure, you could have a graphics system where a program interacts with
the display by reading and writing to FILE* pointers. You'd have to
encode the operations and returned data as streams of bytes. I'm not
convinced there would be much advantage.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */