author | Olivier Scherler <oscherler@femto-byte.com> |
Tue May 12 14:38:30 2009 +0200 (2009-05-12) | |
changeset 30 | 2befbe36c746 |
permissions | -rw-r--r-- |
1 #include <stdio.h>
2 #include "mnemonic.h"
4 main ()
5 {
6 char buf[0x90000];
7 mn_byte outbuf[0x10000];
8 int buflen;
9 int n;
11 buflen = fread (buf, 1, sizeof buf - 1, stdin);
12 buf[buflen] = 0;
14 n = mn_decode (buf, outbuf, sizeof outbuf);
15 if (n < 0)
16 fprintf (stderr, "mn_decode result %d\n", n);
17 else
18 fwrite (outbuf, 1, n, stdout);
20 return 0;
21 }