f1d493fdae954dc4543517f9c52ea6150bbdf62b
[krb5.git] / src / util / et / error_table.h
1 /*
2  * Copyright 1988 by the Student Information Processing Board of the
3  * Massachusetts Institute of Technology.
4  *
5  * For copyright info, see mit-sipb-copyright.h.
6  */
7
8 #ifndef _ET_H
9
10 /* This directory doesn't really know about the krb5 world. The following
11    windows defines are usually hidden in k5-config.h. For now I'll just
12    place here what is needed from that file. Later we may decide to do
13    it differently.
14 */
15 #ifdef _WINDOWS
16 #define INTERFACE             __far __export __pascal
17 #define INTERFACE_C           __far __export __cdecl
18 #define sys_nerr              _sys_nerr
19 #define sys_errlist           _sys_errlist
20 int __far __pascal MessageBox (void __far *, const char __far*, const char __far*, unsigned int);
21 #define MB_ICONEXCLAMATION    0x0030
22 #else
23 #define INTERFACE
24 #define INTERFACE_C
25 extern int errno;
26 #endif
27
28 struct error_table {
29     char const * const * msgs;
30     long base;
31     int n_msgs;
32 };
33 struct et_list {
34     struct et_list *next;
35     const struct error_table *table;
36 };
37 extern struct et_list * _et_list;
38
39 #define ERRCODE_RANGE   8       /* # of bits to shift table number */
40 #define BITS_PER_CHAR   6       /* # bits to shift per character in name */
41
42 #if defined(__STDC__) || defined(KRB5_PROVIDE_PROTOTYPES)
43 extern const char *error_table_name (long);
44 #else 
45 extern const char *error_table_name ();
46 #endif
47
48 #define _ET_H
49 #endif