Path: blob/main/crypto/krb5/src/util/et/com_err.h
105541 views
/*1* Copyright 1988, Student Information Processing Board of the2* Massachusetts Institute of Technology.3*4* Copyright 1995 by Cygnus Support.5*6* For copyright and distribution info, see the documentation supplied7* with this package.8*/910/* Header file for common error description library. */1112#ifndef __COM_ERR_H1314#if defined(_WIN32)15#include <win-mac.h>16#endif1718#ifndef KRB5_CALLCONV19#define KRB5_CALLCONV20#define KRB5_CALLCONV_C21#endif2223#include <stdarg.h>2425typedef long errcode_t;26typedef void (*et_old_error_hook_func) (const char *, errcode_t,27const char *, va_list ap);2829struct error_table {30/*@shared@*/ char const * const * msgs;31long base;32unsigned int n_msgs;33};3435#ifdef __cplusplus36extern "C" {37#endif3839/* Public interfaces */40extern void KRB5_CALLCONV_C com_err41(const char *, errcode_t, const char *, ...)42#if !defined(__cplusplus) && (__GNUC__ > 2)43__attribute__((__format__(__printf__, 3, 4)))44#endif45;46extern void KRB5_CALLCONV com_err_va47(const char *whoami, errcode_t code, const char *fmt,48va_list ap)49#if !defined(__cplusplus) && (__GNUC__ > 2)50__attribute__((__format__(__printf__, 3, 0)))51#endif52;53extern /*@observer@*//*@dependent@*/ const char * KRB5_CALLCONV error_message54(errcode_t)55/*@modifies internalState@*/;56extern errcode_t KRB5_CALLCONV add_error_table57(/*@dependent@*/ const struct error_table *)58/*@modifies internalState@*/;59extern errcode_t KRB5_CALLCONV remove_error_table60(const struct error_table *)61/*@modifies internalState@*/;6263#if !defined(_WIN32)64/*65* The display routine should be application specific. A global hook,66* may cause inappropriate display procedures to be called between67* applications under non-Unix environments.68*/6970extern et_old_error_hook_func set_com_err_hook (et_old_error_hook_func);71extern et_old_error_hook_func reset_com_err_hook (void);72#endif7374#ifdef __cplusplus75}76#endif7778#define __COM_ERR_H79#endif /* ! defined(__COM_ERR_H) */808182