beta-0.89.2
[luatex.git] / source / texk / web2c / lib / fprintreal.c
blobc65e4b277ff52b022acb47ac004b127e8cff08c1
1 /* fprintreal.c: print the real number R in the Pascal format N:M on the
2 file F. Public domain. */
4 #include <w2c/config.h>
5 #include "lib.h"
7 void
8 fprintreal (FILE *f, double r, int n, int m)
10 char fmt[50]; /* Surely enough, since N and M won't be more than 25
11 digits each! */
13 sprintf (fmt, "%%%d.%dlf", n, m);
14 fprintf (f, fmt, r);