2 * Copyright 1987 by MIT Student Information Processing Board
4 * For copyright info, see mit-sipb-cr.h.
14 #include "error_table.h"
15 #include "mit-sipb-cr.h"
18 static const char char_set
[] =
19 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
24 afs_error_table_name(int num
)
30 /* num = aa aaa abb bbb bcc ccc cdd ddd d?? ??? ??? */
32 num
>>= ERRCODE_RANGE
;
33 /* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
35 /* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
36 for (i
= 4; i
>= 0; i
--) {
37 ch
= (num
>> BITS_PER_CHAR
* i
) & ((1 << BITS_PER_CHAR
) - 1);
39 *p
++ = char_set
[ch
- 1];
42 return (lcstring(buf
, buf
, sizeof(buf
)));