imap_err.c revision 65f0aab98b20b5994a726ab90d355248bcddfffd
1/*
2 * imap_err.c:
3 * This file is automatically generated; please do not edit it.
4 */
5
6#include <stdlib.h>
7
8static const char * const text[] = {
9	   "System I/O error",
10	   "Permission denied",
11	   "Over quota",
12	   "Too many user flags in mailbox",
13	   "Mailbox has an invalid format",
14	   "Operation is not supported on mailbox",
15	   "Mailbox does not exist",
16	   "Mailbox already exists",
17	   "Invalid mailbox name",
18	   "Mailbox is locked by POP server",
19	   "Unknown/invalid partition",
20	   "Invalid identifier",
21	   "Message contains NUL characters",
22	   "Message contains bare newlines",
23	   "Message contains non-ASCII characters in headers",
24	   "Message contains invalid header",
25	   "Message has no header/body separator",
26	   "Quota root does not exist",
27	   "Unrecognized character set",
28	   "Invalid user",
29	   "Login incorrect",
30	   "Anonymous login is not permitted",
31	   "Unsupported quota resource",
32	   "Mailbox is over quota",
33	   "Mailbox is at %d%% of quota",
34	   "Message %d no longer exists",
35	   "Unable to checkpoint \\Seen state",
36	   "Unable to preserve \\Seen state",
37	   "LOGOUT received",
38	   "Completed",
39    0
40};
41
42struct error_table {
43    char const * const * msgs;
44    long base;
45    int n_msgs;
46};
47struct et_list {
48    struct et_list *next;
49    const struct error_table * table;
50};
51extern struct et_list *_et_list;
52
53const struct error_table et_imap_error_table = { text, -1904809472L, 30 };
54
55static struct et_list link = { 0, 0 };
56
57void initialize_imap_error_table_r(struct et_list **list);
58void initialize_imap_error_table(void);
59
60void initialize_imap_error_table(void) {
61    initialize_imap_error_table_r(&_et_list);
62}
63
64/* For Heimdal compatibility */
65void initialize_imap_error_table_r(struct et_list **list)
66{
67    struct et_list *et, **end;
68
69    for (end = list, et = *list; et; end = &et->next, et = et->next)
70        if (et->table->msgs == text)
71            return;
72    et = malloc(sizeof(struct et_list));
73    if (et == 0) {
74        if (!link.table)
75            et = &link;
76        else
77            return;
78    }
79    et->table = &et_imap_error_table;
80    et->next = 0;
81    *end = et;
82}
83