Mercurial > emacs
comparison src/editfns.c @ 21202:ef954087e7b9
(Fformat): Properly print floats.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 17 Mar 1998 08:16:35 +0000 |
parents | ea520c42a342 |
children | 47e189a470d2 |
comparison
equal
deleted
inserted
replaced
21201:425bf2edf1d4 | 21202:ef954087e7b9 |
---|---|
2422 | 2422 |
2423 bcopy (this_format_start, this_format, | 2423 bcopy (this_format_start, this_format, |
2424 format - this_format_start); | 2424 format - this_format_start); |
2425 this_format[format - this_format_start] = 0; | 2425 this_format[format - this_format_start] = 0; |
2426 | 2426 |
2427 sprintf (p, this_format, XINT (args[n])); | 2427 if (INTEGERP (args[n])) |
2428 sprintf (p, this_format, XINT (args[n])); | |
2429 else | |
2430 sprintf (p, this_format, XFLOAT (args[n])->data); | |
2428 | 2431 |
2429 this_nchars = strlen (p); | 2432 this_nchars = strlen (p); |
2430 p += this_nchars; | 2433 p += this_nchars; |
2431 nchars += this_nchars; | 2434 nchars += this_nchars; |
2432 } | 2435 } |