masqmail-0.2
annotate src/base64/base64enc.c @ 0:08114f7dcc23
this is masqmail-0.2.21 from oliver kurth
author | meillo@marmaro.de |
---|---|
date | Fri, 26 Sep 2008 17:05:23 +0200 |
parents | |
children | 26e34ae9a3e3 |
rev | line source |
---|---|
meillo@0 | 1 |
meillo@0 | 2 #include <glib.h> |
meillo@0 | 3 #include <stdio.h> |
meillo@0 | 4 #include <stdlib.h> |
meillo@0 | 5 |
meillo@0 | 6 #include "base64.h" |
meillo@0 | 7 |
meillo@0 | 8 int main() |
meillo@0 | 9 { |
meillo@0 | 10 gchar in[58]; |
meillo@0 | 11 gint size; |
meillo@0 | 12 |
meillo@0 | 13 do{ |
meillo@0 | 14 gchar *out; |
meillo@0 | 15 |
meillo@0 | 16 size = fread(in, 1, 54, stdin); |
meillo@0 | 17 out = base64_encode(in, size); |
meillo@0 | 18 fputs(out, stdout); |
meillo@0 | 19 putchar('\n'); |
meillo@0 | 20 g_free(out); |
meillo@0 | 21 }while(size == 54); |
meillo@0 | 22 exit(0); |
meillo@0 | 23 } |
meillo@0 | 24 |