~ubuntu-branches/ubuntu/precise/gnupg2/precise-updates

« back to all changes in this revision

Viewing changes to kbx/keybox-errors.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Mueller
  • Date: 2005-03-29 10:30:32 UTC
  • Revision ID: james.westby@ubuntu.com-20050329103032-sj42n2ain3ipx310
Tags: upstream-1.9.15
ImportĀ upstreamĀ versionĀ 1.9.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Generated automatically by mkerrors */
 
2
/* Do not edit! */
 
3
 
 
4
#include <stdio.h>
 
5
#include "keybox-defs.h"
 
6
 
 
7
/**
 
8
 * keybox_strerror:
 
9
 * @err:  Error code 
 
10
 * 
 
11
 * This function returns a textual representaion of the given
 
12
 * errorcode. If this is an unknown value, a string with the value
 
13
 * is returned (Beware: it is hold in a static buffer).
 
14
 * 
 
15
 * Return value: String with the error description.
 
16
 **/
 
17
const char *
 
18
keybox_strerror (KeyboxError err)
 
19
{
 
20
  const char *s;
 
21
  static char buf[25];
 
22
 
 
23
  switch (err)
 
24
    {
 
25
    case KEYBOX_No_Error: s="no error"; break;
 
26
    case KEYBOX_General_Error: s="general error"; break;
 
27
    case KEYBOX_Out_Of_Core: s="out of core"; break;
 
28
    case KEYBOX_Invalid_Value: s="invalid value"; break;
 
29
    case KEYBOX_Timeout: s="timeout"; break;
 
30
    case KEYBOX_Read_Error: s="read error"; break;
 
31
    case KEYBOX_Write_Error: s="write error"; break;
 
32
    case KEYBOX_File_Error: s="file error"; break;
 
33
    case KEYBOX_Blob_Too_Short: s="blob too short"; break;
 
34
    case KEYBOX_Blob_Too_Large: s="blob too large"; break;
 
35
    case KEYBOX_Invalid_Handle: s="invalid handle"; break;
 
36
    case KEYBOX_File_Create_Error: s="file create error"; break;
 
37
    case KEYBOX_File_Open_Error: s="file open error"; break;
 
38
    case KEYBOX_File_Close_Error: s="file close error"; break;
 
39
    case KEYBOX_Nothing_Found: s="nothing found"; break;
 
40
    case KEYBOX_Wrong_Blob_Type: s="wrong blob type"; break;
 
41
    case KEYBOX_Missing_Value: s="missing value"; break;
 
42
    default:  sprintf (buf, "ec=%d", err ); s=buf; break;
 
43
    }
 
44
 
 
45
  return s;
 
46
}
 
47