aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/testprint.c
blob: 242befb4ef956597bacea3e142410c81d230ebf5 (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]));
}