mnemonicode-0.73/mndecode.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   char buf[0x90000];
     7   mn_byte outbuf[0x10000];
     8   int buflen;
     9   int n;
    10 
    11   buflen = fread (buf, 1, sizeof buf - 1, stdin);
    12   buf[buflen] = 0;
    13 
    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);
    19 
    20   return 0;
    21 }