OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 /* | 8 /* |
9 | 9 |
10 Copyright 1987, 1988 by the Student Information Processing Board | 10 Copyright 1987, 1988 by the Student Information Processing Board |
11 of the Massachusetts Institute of Technology | 11 of the Massachusetts Institute of Technology |
12 | 12 |
13 Permission to use, copy, modify, and distribute this software | 13 Permission to use, copy, modify, and distribute this software |
14 and its documentation for any purpose and without fee is | 14 and its documentation for any purpose and without fee is |
15 hereby granted, provided that the above copyright notice | 15 hereby granted, provided that the above copyright notice |
16 appear in all copies and that both that copyright notice and | 16 appear in all copies and that both that copyright notice and |
17 this permission notice appear in supporting documentation, | 17 this permission notice appear in supporting documentation, |
18 and that the names of M.I.T. and the M.I.T. S.I.P.B. not be | 18 and that the names of M.I.T. and the M.I.T. S.I.P.B. not be |
19 used in advertising or publicity pertaining to distribution | 19 used in advertising or publicity pertaining to distribution |
20 of the software without specific, written prior permission. | 20 of the software without specific, written prior permission. |
21 M.I.T. and the M.I.T. S.I.P.B. make no representations about | 21 M.I.T. and the M.I.T. S.I.P.B. make no representations about |
22 the suitability of this software for any purpose. It is | 22 the suitability of this software for any purpose. It is |
23 provided "as is" without express or implied warranty. | 23 provided "as is" without express or implied warranty. |
24 | 24 |
25 */ | 25 */ |
26 | 26 |
27 #include <string.h> | 27 #include <string.h> |
28 #ifdef SUNOS4 | |
29 #include "md/sunos4.h" /* for strerror */ | |
30 #endif | |
31 #include <assert.h> | 28 #include <assert.h> |
32 #include <errno.h> | 29 #include <errno.h> |
33 #include "prmem.h" | 30 #include "prmem.h" |
34 #include "prerror.h" | 31 #include "prerror.h" |
35 | 32 |
36 #define ERRCODE_RANGE 8 /* # of bits to shift table number */ | 33 #define ERRCODE_RANGE 8 /* # of bits to shift table number */ |
37 #define BITS_PER_CHAR 6 /* # bits to shift per character in name */ | 34 #define BITS_PER_CHAR 6 /* # bits to shift per character in name */ |
38 | 35 |
39 #ifdef NEED_SYS_ERRLIST | 36 #ifdef NEED_SYS_ERRLIST |
40 extern char const * const sys_errlist[]; | 37 extern char const * const sys_errlist[]; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 callback_lookup = lookup; | 196 callback_lookup = lookup; |
200 callback_newtable = newtable; | 197 callback_newtable = newtable; |
201 callback_private = cb_private; | 198 callback_private = cb_private; |
202 | 199 |
203 if (callback_newtable) { | 200 if (callback_newtable) { |
204 for (et = Table_List; et; et = et->next) { | 201 for (et = Table_List; et; et = et->next) { |
205 et->table_private = callback_newtable(et->table, callback_private); | 202 et->table_private = callback_newtable(et->table, callback_private); |
206 } | 203 } |
207 } | 204 } |
208 } | 205 } |
OLD | NEW |