projects
/
onak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix db4 backend - we weren't actually providing a suitable dbfuncs struct.
[onak.git]
/
main.c
diff --git
a/main.c
b/main.c
index 9580e018519937647bed293a40039fefc8c60bb7..f9c7c8ec87967152fa44d9af5214d31028b9c145 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-4,23
+4,13
@@
#include <unistd.h>
#include "armor.h"
#include <unistd.h>
#include "armor.h"
+#include "charfuncs.h"
#include "keydb.h"
#include "keyid.h"
#include "keyindex.h"
#include "keystructs.h"
#include "parsekey.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;
int main(int argc, char *argv[])
{
struct openpgp_packet_list *packets = NULL;
@@
-35,9
+25,9
@@
int main(int argc, char *argv[])
read_openpgp_stream(getnextchar, ctx, &packets, 0);
*/
fputs("Doing dearmor_openpgp_stream():\n", stderr);
read_openpgp_stream(getnextchar, ctx, &packets, 0);
*/
fputs("Doing dearmor_openpgp_stream():\n", stderr);
- dearmor_openpgp_stream(
getnex
tchar, NULL, &packets);
+ dearmor_openpgp_stream(
stdin_ge
tchar, NULL, &packets);
fputs("Doing armor_openpgp_stream():\n", stderr);
fputs("Doing armor_openpgp_stream():\n", stderr);
- armor_openpgp_stream(
putnex
tchar, NULL, packets);
+ armor_openpgp_stream(
stdout_pu
tchar, NULL, packets);
/*
fputs("Doing parse_keys():\n", stderr);
/*
fputs("Doing parse_keys():\n", stderr);
@@
-47,7
+37,7
@@
int main(int argc, char *argv[])
key_index(keys, true, false, false);
key_index(keys, true, false, false);
- initdb();
+ initdb(
true
);
fetch_key(get_keyid(keys), &newkeys);
cleanupdb();
fetch_key(get_keyid(keys), &newkeys);
cleanupdb();