summaryrefslogtreecommitdiffstats
path: root/src/lib9/fmt/test.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-26 23:07:37 +0000
committerrsc <devnull@localhost>2004-12-26 23:07:37 +0000
commitdf121a0027e6dc08abe6fc907c9af2593a263c17 (patch)
tree46d2da9546978f65073bab77217e3ce5d2dff544 /src/lib9/fmt/test.c
parenta76c0fd4a9a9a9a64893db614dd146a5819a6e0c (diff)
downloadplan9port-df121a0027e6dc08abe6fc907c9af2593a263c17.tar.gz
plan9port-df121a0027e6dc08abe6fc907c9af2593a263c17.zip
import changes from plan 9
Diffstat (limited to 'src/lib9/fmt/test.c')
-rw-r--r--src/lib9/fmt/test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib9/fmt/test.c b/src/lib9/fmt/test.c
index 650f0f55..d66377ed 100644
--- a/src/lib9/fmt/test.c
+++ b/src/lib9/fmt/test.c
@@ -11,6 +11,7 @@
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
+#include <stdio.h>
#include <stdarg.h>
#include <utf.h>
#include "plan9.h"
@@ -32,10 +33,12 @@ main(int argc, char *argv[])
print("e: %e %e %e\n", 3.14159, 3.14159e10, 3.14159e-10);
print("f: %f %f %f\n", 3.14159, 3.14159e10, 3.14159e-10);
print("smiley: %C\n", (Rune)0x263a);
- print("%g %.18\n", 2e25, 2e25);
+ print("%g %.18g\n", 2e25, 2e25);
print("%2.18g\n", 1.0);
+ print("%2.18f\n", 1.0);
print("%f\n", 3.1415927/4);
print("%d\n", 23);
print("%i\n", 23);
+ print("%0.10d\n", 12345);
return 0;
}