Deutsch English Français Italiano |
<0bfa49a6d580546ab2db91aeac7627afb19e492d.camel@gmail.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: wij <wyniijj5@gmail.com> Newsgroups: comp.lang.c Subject: Re: Can 'graphics' be a file descriptor? Date: Wed, 01 Jan 2025 19:05:11 +0800 Organization: A noiseless patient Spider Lines: 27 Message-ID: <0bfa49a6d580546ab2db91aeac7627afb19e492d.camel@gmail.com> References: <d0fcbe9e7b29ce6f9a0604058475b0aa9a23d5cb.camel@gmail.com> <87msgaubjj.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Date: Wed, 01 Jan 2025 12:05:12 +0100 (CET) Injection-Info: dont-email.me; posting-host="07e9084d35e98e2c9c23b4b63e81553f"; logging-data="2891858"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FVPWCcW1riEctXJbxsFcA" User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) Cancel-Lock: sha1:2khWLxYNY/AAPJwAbBraY05yq9g= In-Reply-To: <87msgaubjj.fsf@nosuchdomain.example.com> Bytes: 2115 On Wed, 2025-01-01 at 01:29 -0800, Keith Thompson wrote: > wij <wyniijj5@gmail.com> writes: > > In recent revision of libwy (a C++ library that wraps Clib functions), = I feel > > the so called 'graphics' can be a file descriptor. >=20 > A file *descriptor* is a small integer referring to some file-like > entity, used with open/close/read/write.=C2=A0 There's no such thing in > standard C; it's a POSIX concept. >=20 > I don't think you're actually working with file descriptors, though it's > hard to tell. >=20 > > =C2=A0 if((r=3Dpopen(GrSvr,cpid,frd,fwr))!=3DOk) { > > =C2=A0=C2=A0=C2=A0 WY_THROW(r); > > =C2=A0 } >=20 > popen() is a POSIX function.=C2=A0 It takes two arguments, not four. >=20 > The code you posted is C++.=C2=A0 Why are you posting it to comp.lang.c? >=20 > [...] I would like to have opinions about the idea "graphics being a file descrip= tor". The implement is irrevent for the discussion. Some imagination is required.