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


Groups > comp.lang.c > #389758

Re: Something like string-streams existing in "C"?

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: Something like string-streams existing in "C"?
Date 2024-12-20 10:45 -0800
Organization None to speak of
Message-ID <87o716w5w2.fsf@nosuchdomain.example.com> (permalink)
References (2 earlier) <20241219114135.611@kylheku.com> <20241219220435.00001140@yahoo.com> <20241219140545.869@kylheku.com> <vk2jtp$34hel$1@dont-email.me> <20241220130056.000029e4@yahoo.com>

Show all headers | View raw


Michael S <already5chosen@yahoo.com> writes:
> On Thu, 19 Dec 2024 23:14:17 -0300
> Thiago Adams <thiago.adams@gmail.com> wrote:
[...]
>> The standard should have a string stream compatible with FILE because
>> - differently of asprintf - if cannot be implemented separately.
>
> What level of compatibility?
> IMHO, the level that makes sense is where compatibility excludes
> fopen, fclose and fflush. I.e. you have new functions, mem_fopen()
> and mem_fclose() and do not allow fflush(). Pluse, you add few more
> functions or macros for direct access to buffer.

POSIX defines fmemopen(), similar to fopen().

FILE *fmemopen(void *restrict buf, size_t max_size, const char *restrict mode);

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

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


Thread

Something like string-streams existing in "C"? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-19 02:30 +0100
  Re: Something like string-streams existing in "C"? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-18 18:14 -0800
  Re: Something like string-streams existing in "C"? Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-19 04:41 +0000
  Re: Something like string-streams existing in "C"? BlueManedHawk <bluemanedhawk@invalid.invalid> - 2024-12-19 08:32 -0500
    Re: Something like string-streams existing in "C"? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-19 19:47 +0000
      Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-19 22:04 +0200
        Re: Something like string-streams existing in "C"? Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-19 22:06 +0000
          Re: Something like string-streams existing in "C"? Thiago Adams <thiago.adams@gmail.com> - 2024-12-19 23:14 -0300
            Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-20 13:00 +0200
              Re: Something like string-streams existing in "C"? Thiago Adams <thiago.adams@gmail.com> - 2024-12-20 08:32 -0300
                Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-20 14:55 +0200
                Re: Something like string-streams existing in "C"? Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-20 20:39 +0000
              Re: Something like string-streams existing in "C"? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-20 10:45 -0800
          Re: Something like string-streams existing in "C"? Michael S <already5chosen@yahoo.com> - 2024-12-20 12:38 +0200
  Re: Something like string-streams existing in "C"? scott@slp53.sl.home (Scott Lurndal) - 2024-12-19 13:53 +0000
  Re: Something like string-streams existing in "C"? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-20 03:56 +0100

csiph-web