aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keybox-errors.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2001-11-10 18:06:11 +0000
committerWerner Koch <[email protected]>2001-11-10 18:06:11 +0000
commitfcfec25620c2cb04d96e7e0efbec1fb5f065a806 (patch)
tree61639ff37273e9c89149523db6fbfb7bb60d4f7d /kbx/keybox-errors.c
parentImplemented server main loop and started with import command. (diff)
downloadgnupg-fcfec25620c2cb04d96e7e0efbec1fb5f065a806.tar.gz
gnupg-fcfec25620c2cb04d96e7e0efbec1fb5f065a806.zip
Started with keybox implementation by basing it on code from the GnuPG
devel branch.
Diffstat (limited to 'kbx/keybox-errors.c')
-rw-r--r--kbx/keybox-errors.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/kbx/keybox-errors.c b/kbx/keybox-errors.c
new file mode 100644
index 000000000..bd03cdff3
--- /dev/null
+++ b/kbx/keybox-errors.c
@@ -0,0 +1,40 @@
+/* Generated automatically by mkerrors */
+/* Do not edit! */
+
+#include <stdio.h>
+#include "keybox-defs.h"
+
+/**
+ * keybox_strerror:
+ * @err: Error code
+ *
+ * This function returns a textual representaion of the given
+ * errorcode. If this is an unknown value, a string with the value
+ * is returned (Beware: it is hold in a static buffer).
+ *
+ * Return value: String with the error description.
+ **/
+const char *
+keybox_strerror (KeyboxError err)
+{
+ const char *s;
+ static char buf[25];
+
+ switch (err)
+ {
+ case KEYBOX_No_Error: s="no error"; break;
+ case KEYBOX_General_Error: s="general error"; break;
+ case KEYBOX_Out_Of_Core: s="out of core"; break;
+ case KEYBOX_Invalid_Value: s="invalid value"; break;
+ case KEYBOX_Timeout: s="timeout"; break;
+ case KEYBOX_Read_Error: s="read error"; break;
+ case KEYBOX_Write_Error: s="write error"; break;
+ case KEYBOX_File_Error: s="file error"; break;
+ case KEYBOX_Blob_Too_Short: s="blob too short"; break;
+ case KEYBOX_Blob_Too_Large: s="blob too large"; break;
+ default: sprintf (buf, "ec=%d", err ); s=buf; break;
+ }
+
+ return s;
+}
+