com_err.h revision 127807
150764Smarkm/*
2127807Snectar * Copyright (c) 1997 - 2001 Kungliga Tekniska H�gskolan
350764Smarkm * (Royal Institute of Technology, Stockholm, Sweden).
450764Smarkm * All rights reserved.
550764Smarkm *
650764Smarkm * Redistribution and use in source and binary forms, with or without
750764Smarkm * modification, are permitted provided that the following conditions
850764Smarkm * are met:
950764Smarkm *
1050764Smarkm * 1. Redistributions of source code must retain the above copyright
1150764Smarkm *    notice, this list of conditions and the following disclaimer.
1250764Smarkm *
1350764Smarkm * 2. Redistributions in binary form must reproduce the above copyright
1450764Smarkm *    notice, this list of conditions and the following disclaimer in the
1550764Smarkm *    documentation and/or other materials provided with the distribution.
1650764Smarkm *
17127807Snectar * 3. Neither the name of the Institute nor the names of its contributors
1850764Smarkm *    may be used to endorse or promote products derived from this software
1950764Smarkm *    without specific prior written permission.
2050764Smarkm *
2150764Smarkm * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
2250764Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2350764Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2450764Smarkm * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
2550764Smarkm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2650764Smarkm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2750764Smarkm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2850764Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2950764Smarkm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3050764Smarkm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3150764Smarkm * SUCH DAMAGE.
3250764Smarkm */
3350764Smarkm
3455984Sbde/* $FreeBSD: head/contrib/com_err/com_err.h 127807 2004-04-03 21:17:01Z nectar $ */
35127807Snectar/* $Id: com_err.h,v 1.9 2001/05/11 20:03:36 assar Exp $ */
3650764Smarkm
3750764Smarkm/* MIT compatible com_err library */
3850764Smarkm
3950764Smarkm#ifndef __COM_ERR_H__
4050764Smarkm#define __COM_ERR_H__
4150764Smarkm
4255984Sbde#include <sys/cdefs.h>
4350764Smarkm#include <stdarg.h>
4450764Smarkm
4550764Smarkm#include <com_right.h>
4650764Smarkm
4750764Smarkmtypedef void (*errf) __P((const char *, long, const char *, va_list));
4850764Smarkm
4950764Smarkmconst char * error_message __P((long));
5050764Smarkmint init_error_table __P((const char**, long, int));
5150764Smarkm
52127807Snectarvoid com_err_va __P((const char *, long, const char *, va_list))
53127807Snectar    __printflike(3, 0);
5450764Smarkm
55127807Snectarvoid com_err __P((const char *, long, const char *, ...))
56127807Snectar    __printflike(3, 4);
57127807Snectar
5850764Smarkmerrf set_com_err_hook __P((errf));
5950764Smarkmerrf reset_com_err_hook __P((void));
6050764Smarkm
61127807Snectarconst char *error_table_name  __P((int num));
6250764Smarkm
63127807Snectarvoid add_to_error_table __P((struct et_list *new_table));
64127807Snectar
6550764Smarkm#endif /* __COM_ERR_H__ */
66