Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/tex/web2c/lib/fprintreal.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/* fprintreal.c: print the real number R in the Pascal format N:M on the
   file F.  */

#include "config.h"

void
fprintreal P4C(FILE*, f, double, r, int, n, int, m)
{
  char fmt[50];  /* Surely enough, since N and M won't be more than 25
                    digits each!  */

  sprintf (fmt, "%%%d.%dlf", n, m);
  fprintf (f, fmt, r);
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].