|
a/src/utils/base64.cpp |
|
b/src/utils/base64.cpp |
|
... |
|
... |
268 |
}
|
268 |
}
|
269 |
|
269 |
|
270 |
#ifdef TEST_BASE64
|
270 |
#ifdef TEST_BASE64
|
271 |
#include <stdio.h>
|
271 |
#include <stdio.h>
|
272 |
#include <stdlib.h>
|
272 |
#include <stdlib.h>
|
|
|
273 |
#include <unistd.h>
|
273 |
|
274 |
|
274 |
#include "readfile.h"
|
275 |
#include "readfile.h"
|
275 |
|
276 |
|
276 |
const char *thisprog;
|
277 |
const char *thisprog;
|
277 |
static char usage [] = "testfile\n\n"
|
278 |
static char usage [] = "testfile\n\n"
|
|
... |
|
... |
355 |
string odata;
|
356 |
string odata;
|
356 |
if (!base64_decode(idata, odata)) {
|
357 |
if (!base64_decode(idata, odata)) {
|
357 |
fprintf(stderr, "Decoding failed\n");
|
358 |
fprintf(stderr, "Decoding failed\n");
|
358 |
exit(1);
|
359 |
exit(1);
|
359 |
}
|
360 |
}
|
360 |
write(1, odata.c_str(),
|
361 |
::write(1, odata.c_str(),
|
361 |
odata.size() * sizeof(string::value_type));
|
362 |
odata.size() * sizeof(string::value_type));
|
362 |
exit(0);
|
363 |
exit(0);
|
363 |
}
|
364 |
}
|
364 |
}
|
365 |
}
|
365 |
#endif
|
366 |
#endif
|