mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
14 lines
334 B
C
14 lines
334 B
C
#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]));
|
|
}
|