mess822x
1.26
mess822x
Loading...
Searching...
No Matches
mess822x-1.26
src
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
9
stralloc
line
= {0};
10
stralloc
temp
= {0};
11
stralloc
out
= {0};
12
int
match
;
13
14
int
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
}
line
stralloc line
Definition
822body.c:9
match
int match
Definition
822body.c:10
WHO
#define WHO
Definition
822body.c:7
mess822.h
mess822_b64decode
int mess822_b64decode(stralloc *, const char *, int)
Definition
mess822_base64.c:21
out
stralloc out
Definition
b64decode.c:11
temp
stralloc temp
Definition
b64decode.c:10
main
int main()
Definition
b64decode.c:14
Generated on
for mess822x by
1.15.0