aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/testprint.c
blob: b2c04208f96c3a4e2bc1aea68ae48cf1a91fcc28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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]));
}