summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib/fprintreal.c
blob: 27424b3d470f7279dc459bd7c1f205bc05c22556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* fprintreal.c: print the real number R in the Pascal format N:M on the
   file F.  Public domain. */

#include "config.h"
#include "lib.h"

void
fprintreal (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);
}