mnemonicode-0.73/mnencode.c
author Jens Alfke <jens@mooseyard.com>
Thu May 14 20:44:32 2009 -0700 (2009-05-14)
changeset 31 2068331949ee
permissions -rw-r--r--
* Optimized Olivier's MYDirectoryWatcher fix (by caching the watcher's standardized path)
* Added -[NSData my_UTF8ToString] to CollectionUtils.
     1 #include <stdio.h>
     2 #include "mnemonic.h"
     3 
     4 main ()
     5 {
     6   mn_byte buf[0x10000];
     7   char outbuf[0x90000];
     8   int buflen;
     9   int n;
    10 
    11   fprintf (stderr, "%s\n", mn_wordlist_version);
    12 
    13   buflen = fread (buf, 1, sizeof (buf), stdin);
    14   n = mn_encode (buf, buflen, outbuf, sizeof outbuf, MN_F64BITSPERLINE);
    15   if (n == 0)
    16     fwrite (outbuf, 1, strlen (outbuf), stdout);
    17   else
    18     fprintf (stderr, "mn_encode error %d\n", n);
    19   putchar ('\n');
    20 
    21   return 0;
    22 }