-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
40 lines (37 loc) · 820 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "Posit.h"
// *********************************************************************
void process_arg(char *arg)
{
if (*arg == '?')
{
printf("usage pp [args]\n");
exit(0);
}
else
{
printf("unknown arg '-%s'\n", arg);
}
}
// *********************************************************************
int main(int argc, char **argv)
{
for (int i = 1; i < argc; i++)
{
char *cp = argv[i];
if (*cp == '-')
{
process_arg(++cp);
}
}
posit_config(2);
posit_dump(0x83, 8); printf("\n");
posit_config(2);
posit_dump(0x39b3, 16); printf("\n");
posit_config(3);
posit_dump(0x7e,8); printf("\n");
printf(" All done.");
return 0;
}