Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Can 'graphics' be a file descriptor? Date: Wed, 01 Jan 2025 14:33:34 -0800 Organization: None to speak of Lines: 27 Message-ID: <87ikqytb9d.fsf@nosuchdomain.example.com> References: <87msgaubjj.fsf@nosuchdomain.example.com> <0bfa49a6d580546ab2db91aeac7627afb19e492d.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 01 Jan 2025 23:33:36 +0100 (CET) Injection-Info: dont-email.me; posting-host="b52a82344e56e00245aea888d7eb8d49"; logging-data="3126714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18bvZp6+cMnyz4QOSQGaobs" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:1ciPk9lHgbLXR9f0Te+lwBXiU9o= sha1:ObT9IYVM+G4yMa9sA9idx8+hgLw= Bytes: 2284 wij 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.com void Void(void) { Void(); } /* The recursive call of the void */