[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jitter and libtextstyle

From: Bruno Haible
Subject: Re: jitter and libtextstyle
Date: Mon, 14 Oct 2019 17:15:54 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-165-generic; KDE/5.18.0; x86_64; ; )

Hi Luca,

José writes:
> First, PREFIX_print_program currently is invoked like:
>     pvm_print_program (stdout, prog);
> Where the first argument is a FILE*.

A bit of background regarding why 'FILE *' is not a universal type
for output streams:
  - The FILE streams in <stdio.h> are not extensible (therefore e.g. fmemopen
    and open_memstream cannot be provided portably by gnulib),
  - There is fdopen. But on Windows, file descriptors cannot be for as many
    purposes as on Unix. Use of a file descriptor to communicate data between
    two places in a program would either require a separate process or a
    separate thread for the text I/O - both of which are guaranteed to produce
    more problems than they fix. Keep It Simple!

This is why I had to create the 'ostream' type hierarchy. And this is why
a more abstract type ('void *' in the simplest case) for denoting an output
stream is needed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]