FNFT
include
fnft_errwarn.h
Go to the documentation of this file.
1
/*
2
* This file is part of FNFT.
3
*
4
* FNFT is free software; you can redistribute it and/or
5
* modify it under the terms of the version 2 of the GNU General
6
* Public License as published by the Free Software Foundation.
7
*
8
* FNFT is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Contributors:
17
* Sander Wahls (TU Delft) 2017-2018.
18
*/
19
29
#ifndef FNFT_ERRWARN_H
30
#define FNFT_ERRWARN_H
31
32
#include "
fnft_numtypes.h
"
33
38
typedef
FNFT_INT
(*
fnft_printf_ptr_t
) (
const
char
*, ...);
39
44
#define FNFT_SUCCESS 0
45
46
/* --- Use the following macros when determining the type of an error. --- */
47
52
#define FNFT_EC_NOMEM 1
53
58
#define FNFT_EC_INVALID_ARGUMENT 2
59
64
#define FNFT_EC_DIV_BY_ZERO 3
65
70
#define FNFT_EC_TEST_FAILED 4
71
76
#define FNFT_EC_OTHER 5
77
82
#define FNFT_EC_NOT_YET_IMPLEMENTED 6
83
88
#define FNFT_EC_SANITY_CHECK_FAILED 7
89
94
#define FNFT_EC_ASSERTION_FAILED 8
95
101
void
fnft_errwarn_setprintf
(
fnft_printf_ptr_t
printf_ptr);
102
108
fnft_printf_ptr_t
fnft_errwarn_getprintf
();
109
110
#ifdef FNFT_ENABLE_SHORT_NAMES
111
#define SUCCESS FNFT_SUCCESS
112
#endif
113
114
#endif
FNFT_INT
int32_t FNFT_INT
Definition:
fnft_numtypes.h:56
fnft_numtypes.h
fnft_printf_ptr_t
FNFT_INT(* fnft_printf_ptr_t)(const char *,...)
Definition:
fnft_errwarn.h:38
fnft_errwarn_setprintf
void fnft_errwarn_setprintf(fnft_printf_ptr_t printf_ptr)
fnft_errwarn_getprintf
fnft_printf_ptr_t fnft_errwarn_getprintf()
Generated by
1.8.18