Revision 23740,
1.1 KB
checked in by broder, 16 years ago
(diff) |
In moira:
* New CVS snapshot (Trac: #195)
* Drop patches that have been incorporated upstream.
* Update to build without krb4 on systems that no longer have it.
This doesn't build yet on squeeze, which lacks a krb4 library, but I'm
committing now before I start hacking away at a patch to fix that.
|
Line | |
---|
1 | /* |
---|
2 | * $Header: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/util/et/init_et.c,v 1.2 1998-02-05 22:13:10 danw Exp $ |
---|
3 | * $Source: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/util/et/init_et.c,v $ |
---|
4 | * $Locker: $ |
---|
5 | * |
---|
6 | * Copyright 1986, 1987, 1988 by MIT Information Systems and |
---|
7 | * the MIT Student Information Processing Board. |
---|
8 | * |
---|
9 | * For copyright info, see mit-sipb-copyright.h. |
---|
10 | */ |
---|
11 | |
---|
12 | #include <stdio.h> |
---|
13 | #include <stdlib.h> |
---|
14 | #include <errno.h> |
---|
15 | #include "error_table.h" |
---|
16 | #include "mit-sipb-copyright.h" |
---|
17 | |
---|
18 | static const char rcsid[] = "$Id: init_et.c,v 1.2 1998-02-05 22:13:10 danw Exp $"; |
---|
19 | |
---|
20 | struct foobar { |
---|
21 | struct et_list etl; |
---|
22 | struct error_table et; |
---|
23 | }; |
---|
24 | |
---|
25 | extern struct et_list *_et_list; |
---|
26 | |
---|
27 | int init_error_table(const char *const *msgs, int base, int count) |
---|
28 | { |
---|
29 | struct foobar * new_et; |
---|
30 | |
---|
31 | if (!base || !count || !msgs) |
---|
32 | return 0; |
---|
33 | |
---|
34 | new_et = malloc(sizeof(struct foobar)); |
---|
35 | if (!new_et) |
---|
36 | return errno; /* oops */ |
---|
37 | new_et->etl.table = &new_et->et; |
---|
38 | new_et->et.msgs = msgs; |
---|
39 | new_et->et.base = base; |
---|
40 | new_et->et.n_msgs= count; |
---|
41 | |
---|
42 | new_et->etl.next = _et_list; |
---|
43 | _et_list = &new_et->etl; |
---|
44 | return 0; |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.