From 498dbdffe6208c6b3dc1fb9b90c3cb2ca339b600 Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Wed, 10 Jan 2024 18:16:30 -0500 Subject: [PATCH] add util --- src/util.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/util.h diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..bd82a91 --- /dev/null +++ b/src/util.h @@ -0,0 +1,38 @@ + +/************************************************************************* + * + * Copyright (c) 2023 Fabian Posch + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + ************************************************************************** + */ + + +#ifndef __UTIL_H__ +#define __UTIL_H__ + +#include +#include + +// debugging util print functions +#ifdef DEBUG +#define DEBUG_PRINT(msg) std::cerr << "Info: " << msg << std::endl; +#else +#define DEBUG_PRINT(msg) do {} while (0) +#endif + +#endif \ No newline at end of file