X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/576754568dc383e78065e88e05eeb2d078524f9c..ce8be6edbed5c435a8f957781a26e6f9eac6fcec:/main.c diff --git a/main.c b/main.c index b140c8e..58e3ca7 100644 --- a/main.c +++ b/main.c @@ -4,23 +4,13 @@ #include #include "armor.h" +#include "charfuncs.h" #include "keydb.h" #include "keyid.h" #include "keyindex.h" #include "keystructs.h" #include "parsekey.h" -int getnextchar(void *ctx, size_t count, unsigned char *c) -{ - return (!read(0, c, count)); -} - -int putnextchar(void *ctx, size_t count, unsigned char *c) -{ - return (!write(1, c, count)); -} - - int main(int argc, char *argv[]) { struct openpgp_packet_list *packets = NULL; @@ -32,12 +22,12 @@ int main(int argc, char *argv[]) void *ctx = NULL; fputs("Doing read_openpgp_stream():\n", stderr); - read_openpgp_stream(getnextchar, ctx, &packets); + read_openpgp_stream(getnextchar, ctx, &packets, 0); */ fputs("Doing dearmor_openpgp_stream():\n", stderr); - dearmor_openpgp_stream(getnextchar, NULL, &packets); + dearmor_openpgp_stream(stdin_getchar, NULL, &packets); fputs("Doing armor_openpgp_stream():\n", stderr); - armor_openpgp_stream(putnextchar, NULL, packets); + armor_openpgp_stream(stdout_putchar, NULL, packets); /* fputs("Doing parse_keys():\n", stderr);