Commit | Line | Data |
---|---|---|
805e021f CE |
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-cr.h. | |
6 | */ | |
7 | ||
8 | #include <sys/types.h> | |
9 | #include <errno.h> | |
10 | ||
11 | #ifndef _AFS_ET_H | |
12 | ||
13 | struct error_table { | |
14 | char const *const *msgs; | |
15 | int base; | |
16 | int n_msgs; | |
17 | }; | |
18 | struct et_list { | |
19 | struct et_list *next; | |
20 | const struct error_table *table; | |
21 | }; | |
22 | ||
23 | ||
24 | #define ERRCODE_RANGE 8 /* # of bits to shift table number */ | |
25 | #define BITS_PER_CHAR 6 /* # bits to shift per character in name */ | |
26 | ||
27 | extern char const *afs_error_table_name(int num); | |
28 | extern void afs_add_to_error_table(struct et_list *new_table); | |
29 | extern const char *afs_com_right(struct et_list *list, long code); | |
30 | extern const char *afs_com_right_r(struct et_list *list, long code, char *str, size_t len); | |
31 | ||
32 | #ifdef AFS_OLD_COM_ERR | |
33 | #define error_table_name afs_error_table_name | |
34 | #define add_to_error_table(X) afs_add_to_error_table(X) | |
35 | #endif /* AFS_OLD_COM_ERR */ | |
36 | #define _AFS_ET_H | |
37 | #endif |