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.
26 #include "error_table.h"
30 struct error_table et;
33 extern struct et_list * _et_dynamic_list;
35 int init_error_table(const char * const *msgs, long base, int count)
37 struct foobar * new_et;
39 if (!base || !count || !msgs)
42 new_et = (struct foobar *) malloc(sizeof(struct foobar));
44 return ENOMEM; /* oops */
45 new_et->etl.table = &new_et->et;
46 new_et->et.msgs = msgs;
47 new_et->et.base = base;
48 new_et->et.n_msgs= count;
50 new_et->etl.next = _et_dynamic_list;
51 _et_dynamic_list = &new_et->etl;