From 4a0c25f9fcaea2d48ddd5c319fad7e0ef6ccbba9 Mon Sep 17 00:00:00 2001 From: hasufell Date: Mon, 14 Apr 2014 22:25:57 +0200 Subject: [PATCH] ERR: add basic error macro --- src/err.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/err.h diff --git a/src/err.h b/src/err.h new file mode 100644 index 0000000..4ee1748 --- /dev/null +++ b/src/err.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 hasufell + * + * This file is part of a hasufell project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + + +#ifndef NTRU_ERR_H +#define NTRU_ERR_H + +#define NTRU_ABORT(...) \ +{ \ + fprintf(stderr, __VA_ARGS__); \ + abort(); \ +} + +#endif /* NTRU_ERR_H */