caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier@Theory.Stanford.EDU>
To: Chet.Murthy@inria.fr
Cc: caml-list@margaux
Subject: Re: Printf and friends
Date: Tue, 18 May 1993 18:01:33 -0700 (PDT)	[thread overview]
Message-ID: <9305190101.AA18032@Tamuz.Stanford.EDU> (raw)
In-Reply-To: <16074.737150131@margaux.inria.fr> from "Chet.Murthy@inria.fr" at May 11, 93 09:55:31 pm

> Est-il possible d'avoir aussi
>      "sprintf"
> Ou bien, est-il possible de le coder, a partir de "printf"??

Tel que "fprintf" est ecrit actuellement, il fait ses sorties
caractere par caractere, ou champ par champ, sans construire de chaine
intermediaire. Ce n'est donc pas immediat d'implementer sprintf;
enfin, il y a du code a dupliquer. Une autre possibilite serait
d'avoir des canaux d'entree-sortie non seulement sur des fichiers,
mais aussi sur des chaines, afin de pouvoir recuperer la sortie de
fprintf, mais ca non plus n'est pas facile.

FYI: dans la libc, sprintf est implemente en construisant un FILE * bidon
avec la chaine destination comme buffer, et en passant ca a _doprnt,
mais evidemment casuppose que la chaine destination est allouee au
prealable par l'utilisateur, et qu'elle est assez grande... Beurk.

- Xavier





      reply	other threads:[~1993-05-24  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-14 10:53 murthy
1993-05-19  1:01 ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9305190101.AA18032@Tamuz.Stanford.EDU \
    --to=xavier@theory.stanford.edu \
    --cc=Chet.Murthy@inria.fr \
    --cc=caml-list@margaux \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).