Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #95599

Re: designing a filter interface for FILE*

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: designing a filter interface for FILE*
Date 2016-11-02 09:38 -0700
Organization None to speak of
Message-ID <lnshr925x8.fsf@kst-u.example.com> (permalink)
References <6314f428-19b2-4ac4-9a39-7e5c2c98203e@googlegroups.com>

Show all headers | View raw


luser droog <luser.droog@gmail.com> writes:
> Two distinct feature-requests have conspired to produce
> a requirement for my application (postscript interpreter
> library) to support /interfaced/ FILE objects. So I'm
> following my usual course: a public brainstorm.
>
> So I need to make in internal `struct file` type with
> variant subtypes, and `my_read()` and `my_write()` functions
> which use `getchar()` and `putchar()` only on real FILE*
> variants.
>
> I also need a "mock file" which is backed by a counted 
> string.
[snip]

If you're able to assume POSIX support, take a look at fmemopen().
If you have further questions about fmemopen(), I suggest
comp.unix.programmer.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

designing a filter interface for FILE* luser droog <luser.droog@gmail.com> - 2016-11-02 06:53 -0700
  Re: designing a filter interface for FILE* Keith Thompson <kst-u@mib.org> - 2016-11-02 09:38 -0700
    Re: designing a filter interface for FILE* luser droog <luser.droog@gmail.com> - 2016-11-03 15:07 -0700

csiph-web