Blame src/include/k5-err.h

Packit Service 99d1c0
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
Packit Service 99d1c0
/* include/k5-err.h */
Packit Service 99d1c0
/*
Packit Service 99d1c0
 * Copyright 2006, 2007 Massachusetts Institute of Technology.
Packit Service 99d1c0
 * All Rights Reserved.
Packit Service 99d1c0
 *
Packit Service 99d1c0
 * Export of this software from the United States of America may
Packit Service 99d1c0
 *   require a specific license from the United States Government.
Packit Service 99d1c0
 *   It is the responsibility of any person or organization contemplating
Packit Service 99d1c0
 *   export to obtain such a license before exporting.
Packit Service 99d1c0
 *
Packit Service 99d1c0
 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
Packit Service 99d1c0
 * distribute this software and its documentation for any purpose and
Packit Service 99d1c0
 * without fee is hereby granted, provided that the above copyright
Packit Service 99d1c0
 * notice appear in all copies and that both that copyright notice and
Packit Service 99d1c0
 * this permission notice appear in supporting documentation, and that
Packit Service 99d1c0
 * the name of M.I.T. not be used in advertising or publicity pertaining
Packit Service 99d1c0
 * to distribution of the software without specific, written prior
Packit Service 99d1c0
 * permission.  Furthermore if you modify this software you must label
Packit Service 99d1c0
 * your software as modified software and not distribute it in such a
Packit Service 99d1c0
 * fashion that it might be confused with the original M.I.T. software.
Packit Service 99d1c0
 * M.I.T. makes no representations about the suitability of
Packit Service 99d1c0
 * this software for any purpose.  It is provided "as is" without express
Packit Service 99d1c0
 * or implied warranty.
Packit Service 99d1c0
 */
Packit Service 99d1c0
Packit Service 99d1c0
/*
Packit Service 99d1c0
 *
Packit Service 99d1c0
 * Error-message handling
Packit Service 99d1c0
 */
Packit Service 99d1c0
Packit Service 99d1c0
#ifndef K5_ERR_H
Packit Service 99d1c0
#define K5_ERR_H
Packit Service 99d1c0
Packit Service 99d1c0
#if defined(_MSDOS) || defined(_WIN32)
Packit Service 99d1c0
#include <win-mac.h>
Packit Service 99d1c0
#endif
Packit Service 99d1c0
#ifndef KRB5_CALLCONV
Packit Service 99d1c0
#define KRB5_CALLCONV
Packit Service 99d1c0
#define KRB5_CALLCONV_C
Packit Service 99d1c0
#endif
Packit Service 99d1c0
Packit Service 99d1c0
#include <stdarg.h>
Packit Service 99d1c0
Packit Service 99d1c0
struct errinfo {
Packit Service 99d1c0
    long code;
Packit Service 99d1c0
    char *msg;
Packit Service 99d1c0
};
Packit Service 99d1c0
#define EMPTY_ERRINFO { 0, NULL }
Packit Service 99d1c0
Packit Service 99d1c0
void k5_set_error(struct errinfo *ep, long code, const char *fmt, ...)
Packit Service 99d1c0
#if !defined(__cplusplus) && (__GNUC__ > 2)
Packit Service 99d1c0
    __attribute__((__format__(__printf__, 3, 4)))
Packit Service 99d1c0
#endif
Packit Service 99d1c0
    ;
Packit Service 99d1c0
Packit Service 99d1c0
void k5_vset_error(struct errinfo *ep, long code, const char *fmt,
Packit Service 99d1c0
                   va_list args)
Packit Service 99d1c0
#if !defined(__cplusplus) && (__GNUC__ > 2)
Packit Service 99d1c0
    __attribute__((__format__(__printf__, 3, 0)))
Packit Service 99d1c0
#endif
Packit Service 99d1c0
    ;
Packit Service 99d1c0
Packit Service 99d1c0
const char *k5_get_error(struct errinfo *ep, long code);
Packit Service 99d1c0
void k5_free_error(struct errinfo *ep, const char *msg);
Packit Service 99d1c0
void k5_clear_error(struct errinfo *ep);
Packit Service 99d1c0
void k5_set_error_info_callout_fn(const char *(KRB5_CALLCONV *f)(long));
Packit Service 99d1c0
Packit Service 99d1c0
#endif /* K5_ERR_H */