]> andersk Git - moira.git/blame - util/et/init_et.c
Command line printer manipulation client, and build goo.
[moira.git] / util / et / init_et.c
CommitLineData
d1b2a10e 1/*
2 * $Header$
3 * $Source$
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>
a91a6d50 13#include <stdlib.h>
14#include <errno.h>
d1b2a10e 15#include "error_table.h"
16#include "mit-sipb-copyright.h"
17
a91a6d50 18static const char rcsid[] = "$Id$";
d1b2a10e 19
20struct foobar {
21 struct et_list etl;
22 struct error_table et;
23};
24
a91a6d50 25extern struct et_list *_et_list;
d1b2a10e 26
a91a6d50 27int init_error_table(const char *const *msgs, int base, int count)
d1b2a10e 28{
29 struct foobar * new_et;
30
31 if (!base || !count || !msgs)
32 return 0;
33
a91a6d50 34 new_et = malloc(sizeof(struct foobar));
d1b2a10e 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}
This page took 0.082274 seconds and 6 git commands to generate.