annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/com_err.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /*
jpayne@69 2 * Copyright 1988, Student Information Processing Board of the
jpayne@69 3 * Massachusetts Institute of Technology.
jpayne@69 4 *
jpayne@69 5 * Copyright 1995 by Cygnus Support.
jpayne@69 6 *
jpayne@69 7 * For copyright and distribution info, see the documentation supplied
jpayne@69 8 * with this package.
jpayne@69 9 */
jpayne@69 10
jpayne@69 11 /* Header file for common error description library. */
jpayne@69 12
jpayne@69 13 #ifndef __COM_ERR_H
jpayne@69 14
jpayne@69 15 #if defined(_WIN32)
jpayne@69 16 #include <win-mac.h>
jpayne@69 17 #endif
jpayne@69 18
jpayne@69 19 #ifndef KRB5_CALLCONV
jpayne@69 20 #define KRB5_CALLCONV
jpayne@69 21 #define KRB5_CALLCONV_C
jpayne@69 22 #endif
jpayne@69 23
jpayne@69 24 #include <stdarg.h>
jpayne@69 25
jpayne@69 26 typedef long errcode_t;
jpayne@69 27 typedef void (*et_old_error_hook_func) (const char *, errcode_t,
jpayne@69 28 const char *, va_list ap);
jpayne@69 29
jpayne@69 30 struct error_table {
jpayne@69 31 /*@shared@*/ char const * const * msgs;
jpayne@69 32 long base;
jpayne@69 33 unsigned int n_msgs;
jpayne@69 34 };
jpayne@69 35
jpayne@69 36 #ifdef __cplusplus
jpayne@69 37 extern "C" {
jpayne@69 38 #endif
jpayne@69 39
jpayne@69 40 /* Public interfaces */
jpayne@69 41 extern void KRB5_CALLCONV_C com_err
jpayne@69 42 (const char *, errcode_t, const char *, ...)
jpayne@69 43 #if !defined(__cplusplus) && (__GNUC__ > 2)
jpayne@69 44 __attribute__((__format__(__printf__, 3, 4)))
jpayne@69 45 #endif
jpayne@69 46 ;
jpayne@69 47 extern void KRB5_CALLCONV com_err_va
jpayne@69 48 (const char *whoami, errcode_t code, const char *fmt,
jpayne@69 49 va_list ap)
jpayne@69 50 #if !defined(__cplusplus) && (__GNUC__ > 2)
jpayne@69 51 __attribute__((__format__(__printf__, 3, 0)))
jpayne@69 52 #endif
jpayne@69 53 ;
jpayne@69 54 extern /*@observer@*//*@dependent@*/ const char * KRB5_CALLCONV error_message
jpayne@69 55 (errcode_t)
jpayne@69 56 /*@modifies internalState@*/;
jpayne@69 57 extern errcode_t KRB5_CALLCONV add_error_table
jpayne@69 58 (/*@dependent@*/ const struct error_table *)
jpayne@69 59 /*@modifies internalState@*/;
jpayne@69 60 extern errcode_t KRB5_CALLCONV remove_error_table
jpayne@69 61 (const struct error_table *)
jpayne@69 62 /*@modifies internalState@*/;
jpayne@69 63
jpayne@69 64 #if !defined(_WIN32)
jpayne@69 65 /*
jpayne@69 66 * The display routine should be application specific. A global hook,
jpayne@69 67 * may cause inappropriate display procedures to be called between
jpayne@69 68 * applications under non-Unix environments.
jpayne@69 69 */
jpayne@69 70
jpayne@69 71 extern et_old_error_hook_func set_com_err_hook (et_old_error_hook_func);
jpayne@69 72 extern et_old_error_hook_func reset_com_err_hook (void);
jpayne@69 73 #endif
jpayne@69 74
jpayne@69 75 #ifdef __cplusplus
jpayne@69 76 }
jpayne@69 77 #endif
jpayne@69 78
jpayne@69 79 #define __COM_ERR_H
jpayne@69 80 #endif /* ! defined(__COM_ERR_H) */