Line | |
---|
1 | #include <stdio.h> |
---|
2 | #include <string.h> |
---|
3 | |
---|
4 | extern int dump_privop_counts (char *buf, int len); |
---|
5 | |
---|
6 | extern int zero_privop_counts (char *buf, int len); |
---|
7 | |
---|
8 | int |
---|
9 | main (int argc, char *argv[]) |
---|
10 | { |
---|
11 | static char buf[8192]; |
---|
12 | int res; |
---|
13 | |
---|
14 | if (argc == 1) |
---|
15 | res = dump_privop_counts (buf, sizeof (buf)); |
---|
16 | else if (argc == 2 && strcmp (argv[1], "--clear") == 0) |
---|
17 | res = zero_privop_counts (buf, sizeof (buf)); |
---|
18 | else |
---|
19 | { |
---|
20 | printf ("usage: %s [--clear]\n", argv[0]); |
---|
21 | return 1; |
---|
22 | } |
---|
23 | printf ("res=%d\n", res); |
---|
24 | fputs (buf, stdout); |
---|
25 | |
---|
26 | return 0; |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.