com_err.h revision 178846
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 178846 2008-05-08 11:01:46Z dfr $ */ 35178846Sdfr/* $Id: com_err.h 15566 2005-07-07 14:58:07Z lha $ */ 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> 46178846Sdfr#include <stdarg.h> 4750764Smarkm 4850764Smarkmtypedef void (*errf) __P((const char *, long, const char *, va_list)); 4950764Smarkm 50178846Sdfrconst char * error_message (long); 51178846Sdfrint init_error_table (const char**, long, int); 5250764Smarkm 53127807Snectarvoid com_err_va __P((const char *, long, const char *, va_list)) 54127807Snectar __printflike(3, 0); 5550764Smarkm 56127807Snectarvoid com_err __P((const char *, long, const char *, ...)) 57127807Snectar __printflike(3, 4); 58127807Snectar 59178846Sdfrerrf set_com_err_hook (errf); 60178846Sdfrerrf reset_com_err_hook (void); 6150764Smarkm 62178846Sdfrconst char *error_table_name (int num); 6350764Smarkm 64178846Sdfrvoid add_to_error_table (struct et_list *new_table); 65127807Snectar 6650764Smarkm#endif /* __COM_ERR_H__ */ 67