mess822x 1.26
mess822x
Loading...
Searching...
No Matches
b64decode.c
Go to the documentation of this file.
1#include "buffer.h"
2#include "logmsg.h"
3#include "getln.h"
4#include "mess822.h"
5#include "exit.h"
6
7#define WHO "b64decode"
8
9stralloc line = {0};
10stralloc temp = {0};
11stralloc out = {0};
13
14int main()
15{
16 int r;
17
18 for (;;) {
19 if (getln(buffer_0,&line,&match,'\n') == -1)
20 logmsg(WHO,111,FATAL,B("unable to read input: ",line.s));
21 if (!stralloc_cat(&temp,&line)) _exit(-1);
22 if (!match) break;
23 }
24
25 r = mess822_b64decode(&out,temp.s,temp.len);
26 if (r > 0) buffer_put(buffer_1,out.s,out.len);
27 buffer_flush(buffer_1);
28
29 _exit(0);
30}
stralloc line
Definition 822body.c:9
int match
Definition 822body.c:10
#define WHO
Definition 822body.c:7
int mess822_b64decode(stralloc *, const char *, int)
stralloc out
Definition b64decode.c:11
stralloc temp
Definition b64decode.c:10
int main()
Definition b64decode.c:14