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

Liste des GroupesRevenir à cl c  
Sujet : Re: Something like string-streams existing in "C"?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 20. Dec 2024, 19:45:01
Autres entêtes
Organisation : None to speak of
Message-ID : <87o716w5w2.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7
User-Agent : Gnus/5.13 (Gnus v5.13)
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 */

Date Sujet#  Auteur
19 Dec 24 * Something like string-streams existing in "C"?15Janis Papanagnou
19 Dec 24 +- Re: Something like string-streams existing in "C"?1Keith Thompson
19 Dec 24 +- Re: Something like string-streams existing in "C"?1Lawrence D'Oliveiro
19 Dec 24 +* Re: Something like string-streams existing in "C"?11BlueManedHawk
19 Dec 24 i`* Re: Something like string-streams existing in "C"?10Kaz Kylheku
19 Dec 24 i `* Re: Something like string-streams existing in "C"?9Michael S
19 Dec 24 i  `* Re: Something like string-streams existing in "C"?8Kaz Kylheku
20 Dec 24 i   +* Re: Something like string-streams existing in "C"?6Thiago Adams
20 Dec 24 i   i`* Re: Something like string-streams existing in "C"?5Michael S
20 Dec 24 i   i +* Re: Something like string-streams existing in "C"?3Thiago Adams
20 Dec 24 i   i i+- Re: Something like string-streams existing in "C"?1Michael S
20 Dec 24 i   i i`- Re: Something like string-streams existing in "C"?1Lawrence D'Oliveiro
20 Dec 24 i   i `- Re: Something like string-streams existing in "C"?1Keith Thompson
20 Dec 24 i   `- Re: Something like string-streams existing in "C"?1Michael S
20 Dec 24 `- Re: Something like string-streams existing in "C"?1Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal