masqmail-0.2
diff 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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/base64/base64enc.c Fri Sep 26 17:05:23 2008 +0200 1.3 @@ -0,0 +1,24 @@ 1.4 + 1.5 +#include <glib.h> 1.6 +#include <stdio.h> 1.7 +#include <stdlib.h> 1.8 + 1.9 +#include "base64.h" 1.10 + 1.11 +int main() 1.12 +{ 1.13 + gchar in[58]; 1.14 + gint size; 1.15 + 1.16 + do{ 1.17 + gchar *out; 1.18 + 1.19 + size = fread(in, 1, 54, stdin); 1.20 + out = base64_encode(in, size); 1.21 + fputs(out, stdout); 1.22 + putchar('\n'); 1.23 + g_free(out); 1.24 + }while(size == 54); 1.25 + exit(0); 1.26 +} 1.27 +