Deutsch English Français Italiano |
<vk2jtp$34hel$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams <thiago.adams@gmail.com> Newsgroups: comp.lang.c Subject: Re: Something like string-streams existing in "C"? Date: Thu, 19 Dec 2024 23:14:17 -0300 Organization: A noiseless patient Spider Lines: 34 Message-ID: <vk2jtp$34hel$1@dont-email.me> References: <vjvsvb$2i07u$1@dont-email.me> <vk179b$2s9oa$1@bluemanedhawk.eternal-september.org> <20241219114135.611@kylheku.com> <20241219220435.00001140@yahoo.com> <20241219140545.869@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 20 Dec 2024 03:14:18 +0100 (CET) Injection-Info: dont-email.me; posting-host="3045803944876f5f2c9d51c66b2d6b32"; logging-data="3294677"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Uv1g33advQhfY7ANUu9+t6QFs61j/9KM=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:R9jnwR8PalucF0EcDtXsXFDSiws= In-Reply-To: <20241219140545.869@kylheku.com> Content-Language: en-GB Bytes: 2292 Em 12/19/2024 7:06 PM, Kaz Kylheku escreveu: > On 2024-12-19, Michael S <already5chosen@yahoo.com> wrote: >> On Thu, 19 Dec 2024 19:47:28 -0000 (UTC) >> Kaz Kylheku <643-408-1753@kylheku.com> wrote: >> >>> On 2024-12-19, BlueManedHawk <bluemanedhawk@invalid.invalid> wrote: >>>> The ‘asprintf’ subroutine is standardized by POSIX.1-2024, meaning >>>> that you can use it now and blame somebody else if it doesn't work. >>>> If you >>> >>> Regardless of how it is made visible, you can detect it via a compile >>> test in a configure script, and provide your own if it wasn't found: >>> >>> #if !HAVE_ASPRINTF >>> >>> int asprintf(char **out, const char *fmt, ...) >>> { >>> ... // more or less trivial to implement using malloc, realloc and >>> vsprintf >> >> Don't you mean, vsnprintf ? > > That detail will become obvious when you try to implement it. > I did on implementation in 2020 (not using it) http://thradams.com/vadsprintf.html The standard should have a string stream compatible with FILE because - differently of asprintf - if cannot be implemented separately.