diff options
author | rsc <devnull@localhost> | 2006-05-22 14:56:13 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-05-22 14:56:13 +0000 |
commit | 4b65e43c54c2ca1394babed18cc02f4fffc22e16 (patch) | |
tree | 67a95b4e2d6861019fd9dd4e1253fb6a1e1ec20f /src/lib9/testprint.c | |
parent | e17e1a71c2923717723f7038d6e123b6452e0b13 (diff) | |
download | plan9port-4b65e43c54c2ca1394babed18cc02f4fffc22e16.tar.gz plan9port-4b65e43c54c2ca1394babed18cc02f4fffc22e16.tar.bz2 plan9port-4b65e43c54c2ca1394babed18cc02f4fffc22e16.zip |
more tests
Diffstat (limited to 'src/lib9/testprint.c')
-rw-r--r-- | src/lib9/testprint.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib9/testprint.c b/src/lib9/testprint.c new file mode 100644 index 00000000..242befb4 --- /dev/null +++ b/src/lib9/testprint.c @@ -0,0 +1,14 @@ +#include <u.h> +#include <libc.h> + +void +main(int argc, char **argv) +{ + char c; + + c = argv[1][strlen(argv[1])-1]; + if(c == 'f' || c == 'e' || c == 'g' || c == 'F' || c == 'E' || c == 'G') + print(argv[1], atof(argv[2])); + else if(c == 'x' || c == 'u' || c == 'd' || c == 'c' || c == 'C' || c == 'X') + print(argv[1], atoi(argv[2])); +} |