6 * Copyright 1986, 1987, 1988 by MIT Information Systems and
7 * the MIT Student Information Processing Board.
9 * Permission to use, copy, modify, and distribute this software and
10 * its documentation for any purpose is hereby granted, provided that
11 * the names of M.I.T. and the M.I.T. S.I.P.B. not be used in
12 * advertising or publicity pertaining to distribution of the software
13 * without specific, written prior permission. M.I.T. and the
14 * M.I.T. S.I.P.B. make no representations about the suitability of
15 * this software for any purpose. It is provided "as is" without
16 * express or implied warranty.
25 #include "error_table.h"
33 struct error_table et;
36 extern struct et_list * _et_list;
39 int init_error_table(const char * const *msgs, int base, int count)
41 int init_error_table(msgs, base, count)
42 const char * const * msgs;
47 struct foobar * new_et;
49 if (!base || !count || !msgs)
52 new_et = (struct foobar *) malloc(sizeof(struct foobar));
54 return ENOMEM; /* oops */
55 new_et->etl.table = &new_et->et;
56 new_et->et.msgs = msgs;
57 new_et->et.base = base;
58 new_et->et.n_msgs= count;
60 new_et->etl.next = _et_list;
61 _et_list = &new_et->etl;