-/*----- Error reporting ---------------------------------------------------*/
-
-/* --- @key_strerror@ --- *
- *
- * Arguments: @int err@ = error code from @key_new@
- *
- * Returns: Pointer to error string.
- *
- * Use: Translates a @KERR@ error code into a human-readable
- * string.
- */
-
-const char *key_strerror(int err)
-{
- char *tab[] = {
- "No error",
- "Bad tag string",
- "Bad type string",
- "Bad comment string",
- "Keyid already exists",
- "Key tag already exists",
- "Key file is read-only",
- "Key will eventually expire",
- "Bad key flags string",
- "Unknown error code"
- };
-
- unsigned e = -err;
- if (e >= KERR_MAX)
- e = KERR_MAX;
- return (tab[e]);
-}
-