Mon, 16 Sep 2019 19:50:39 -0400
zephyr: Remove support for compilers without __STDC__.
| 12424 | 1 | #include "zephyr_err.h" |
| 2 | ||
| 2086 | 3 | static const char * const text[] = { |
| 4 | "Packet too long or buffer too small", | |
| 5 | "Notice header too large", | |
| 6 | "Illegal value in notice", | |
| 7 | "Can't get host manager port", | |
| 8 | "Can't assign port", | |
| 9 | "Bad packet format", | |
| 10 | "Incompatible version numbers", | |
| 11 | "No port opened", | |
| 12 | "No notices match criteria", | |
| 13 | "Input queue too long", | |
| 14 | "Hostmanager not responding", | |
| 15 | "Internal error", | |
| 16 | "No previous call to ZLocateUser", | |
| 17 | "No more locations available", | |
| 18 | "Field too long for buffer", | |
| 19 | "Improperly formatted field", | |
| 20 | "SERVNAK received", | |
| 21 | "Server could not verify authentication", | |
| 22 | "Not logged-in", | |
| 23 | "No previous call to ZRetrieveSubscriptions", | |
| 24 | "No more subscriptions available", | |
| 25 | "Too many subscriptions to transmit", | |
| 26 | "End of file detected during read", | |
| 27 | 0 | |
| 28 | }; | |
| 29 | ||
| 30 | struct error_table { | |
| 31 | char const * const * msgs; | |
| 32 | long base; | |
| 33 | int n_msgs; | |
| 34 | }; | |
| 35 | struct et_list { | |
| 36 | struct et_list *next; | |
| 37 | const struct error_table * table; | |
| 38 | }; | |
| 39 | extern struct et_list *_et_list; | |
| 40 | ||
| 41 | static const struct error_table et = { text, -772103680L, 23 }; | |
| 42 | ||
| 43 | static struct et_list link = { 0, 0 }; | |
| 44 | ||
|
39829
ce056c64e426
zephyr: Remove support for compilers without __STDC__.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
15435
diff
changeset
|
45 | void |
|
ce056c64e426
zephyr: Remove support for compilers without __STDC__.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
15435
diff
changeset
|
46 | initialize_zeph_error_table(void) |
|
ce056c64e426
zephyr: Remove support for compilers without __STDC__.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
15435
diff
changeset
|
47 | { |
| 2086 | 48 | if (!link.table) { |
| 49 | link.next = _et_list; | |
| 50 | link.table = &et; | |
| 51 | _et_list = &link; | |
| 52 | } | |
| 53 | } |