Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 10:01:14

0001 /*
0002  * Copyright 1988, Student Information Processing Board of the
0003  * Massachusetts Institute of Technology.
0004  *
0005  * Copyright 1995 by Cygnus Support.
0006  *
0007  * For copyright and distribution info, see the documentation supplied
0008  * with this package.
0009  */
0010 
0011 /* Header file for common error description library. */
0012 
0013 #ifndef __COM_ERR_H
0014 
0015 #if defined(_WIN32)
0016 #include <win-mac.h>
0017 #endif
0018 
0019 #ifndef KRB5_CALLCONV
0020 #define KRB5_CALLCONV
0021 #define KRB5_CALLCONV_C
0022 #endif
0023 
0024 #include <stdarg.h>
0025 
0026 typedef long errcode_t;
0027 typedef void (*et_old_error_hook_func) (const char *, errcode_t,
0028                     const char *, va_list ap);
0029 
0030 struct error_table {
0031     /*@shared@*/ char const * const * msgs;
0032         long base;
0033     unsigned int n_msgs;
0034 };
0035 
0036 #ifdef __cplusplus
0037 extern "C" {
0038 #endif
0039 
0040 /* Public interfaces */
0041 extern void KRB5_CALLCONV_C com_err
0042     (const char *, errcode_t, const char *, ...)
0043 #if !defined(__cplusplus) && (__GNUC__ > 2)
0044     __attribute__((__format__(__printf__, 3, 4)))
0045 #endif
0046     ;
0047 extern void KRB5_CALLCONV com_err_va
0048     (const char *whoami, errcode_t code, const char *fmt,
0049      va_list ap)
0050 #if !defined(__cplusplus) && (__GNUC__ > 2)
0051     __attribute__((__format__(__printf__, 3, 0)))
0052 #endif
0053     ;
0054 extern /*@observer@*//*@dependent@*/ const char * KRB5_CALLCONV error_message
0055     (errcode_t)
0056        /*@modifies internalState@*/;
0057 extern errcode_t KRB5_CALLCONV add_error_table
0058     (/*@dependent@*/ const struct error_table *)
0059        /*@modifies internalState@*/;
0060 extern errcode_t KRB5_CALLCONV remove_error_table
0061     (const struct error_table *)
0062        /*@modifies internalState@*/;
0063 
0064 #if !defined(_WIN32)
0065 /*
0066  * The display routine should be application specific.  A global hook,
0067  * may cause inappropriate display procedures to be called between
0068  * applications under non-Unix environments.
0069  */
0070 
0071 extern et_old_error_hook_func set_com_err_hook (et_old_error_hook_func);
0072 extern et_old_error_hook_func reset_com_err_hook (void);
0073 #endif
0074 
0075 #ifdef __cplusplus
0076 }
0077 #endif
0078 
0079 #define __COM_ERR_H
0080 #endif /* ! defined(__COM_ERR_H) */